
AT32 Printf Debug Demo
2019.08.05
21
Rev 1.0.2
2.6.4.3 Output to PC
Then, call either SEGGER_RTT_WriteString or SEGGER_RTT_printf command from the code and
output to PC.
SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n\r\n");
SEGGER_RTT_printf(0, "printf Test: %%c, 'S' : %c.\r\n", 'S');
2.6.5 Debug and download
2.6.5.1 Printf via JLinkRTTClient window
Compile the code and download it into the MCU, and enter the debug environment, open the
JLinkRTTClient application in the JLink installation path. Then run the code step by step, you can
find the print information is output to the JLinkRTTClient window, as shown in Figure 10 and Figure
11.
Figure 10. Code debug