1. Install JLink Driver
Download link: https://www.segger.com/downloads/jlink/. After purchasing the JLink driver, the seller usually provides the JLink driver program. Once the driver installation is complete, you can download the debugging program.


2. Porting RTT
2.1 Porting RTT Component in MDK
(1)The example project is grouped as follows:

(2)Create a new SEEGER folder in the project directory and add all the contents of the RTT component.

The added content is as follows:

(3)Add the RTT component to the MDK project. Add all four files from the RTT folder in step 2 to the MDK project. The result after adding is as follows:

(4)Finally, add the path.

2.2 Porting RTT Component in IAR
(1)The example project is grouped as follows:

(2)Create a new SEEGER folder in the project directory and add all the contents of the RTT component.

The added content is as follows:

(3)Add the RTT component to the IAR project. Add all four files from the RTT folder in step 2 to the IAR project. The result after adding is as follows:

(4)Finally, add the path.

3. Using RTT (RTT Viewer)
The computer software for RTT, JLINK RTT Viewer, is located in the installation directory of the JLINK driver on your computer.
Step 1: After downloading the program to the board, power it back on.
Step 2: Open the RTT Viewer software; the effect is as follows:


Step 3: The popped-up interface looks like this:

Step 4: Opening this software will connect automatically. If it doesn’t connect, click the menu File->Connect
to connect. You can select the Log option to view:

4. RTT API Function Description
RTT supports the following APIs:

<span>RTT</span> header file path and add the RTT source code to the project.
<span>JLinkRTTViewer.exe</span> in the JLink installation directory.
