
AT32 Printf Debug Demo
2019.08.05
7
Rev 1.0.2
2
Detailed information
2.1
Printf via Terminal I/O in IAR
2.1.1 Introduction
The IAR driver linked to the Terminal contains standard input and output driver functions such as
scanf and printf so that the information interaction of the project files can be done via the Terminal
I/O.
2.1.2 Example code
001_Printf_Test_IAR_Terminal\USER
2.1.3 Environment and hardware
2.1.3.1 Development environment
This method is used in the IAR environment. The compiling environment used in the example code
is IAR_V6/7/8 with the hardware board AT-START-F403_V1.2.
2.1.3.2 Hardware connection
J-Link/AT-Link&... connection
Table 2. Hardware connection table--(without JTDO)
Hardware connection table
--(without JTDO)
No.
AT-START-F403_V1.2
J-Link/AT-
Link&…
Attention
1
3.3V
3.3V
None
2
PA13
SWDIO
Must Pull up external
3
PA14
SWCLK
Must Pull down external
4
NRST
RSTn
None
5
GND
GND
None
2.1.4 Software
2.1.4.1 Header file
Add the
stdio.h
to the code project files.
2.1.4.2 Redirection settings
Unlock the redirection of Printf (Shield the Printf from the actual serial interface)
2.1.5 Debug and download
Compile the code and download to the MCU, then enter the debug environment to call up the
virtual terminal through
View
->
Terminal I/O
, and run the code at full speed, then
the “Hello World”
is visible in the Output column (Figure 2), and the data in the Input column is also displayed in this