
AT32 Printf Debug Demo
2019.08.05
11
Rev 1.0.2
2.3
Printf via Debug (printf) Viewer in Keil
2.3.1 Introduction
The Keil platform comes with a Debug (printf) Viewer that can be used for standard Printf
interaction on the premise that the ARM core integrates standard input and output driver functions
such as scanf and printf.
2.3.2 Example code
003_Printf_Test_Keil_JTDO\Project
2.3.3 Environment and hardware
2.3.3.1 Development environment
This method is used in the Keil environment. The compiling environment supported by the example
is Keil_V4/Keil_V5 with the hardware board AT-START-F403_V1.2.
2.3.3.2 Hardware connection
J-Link/AT-Link&... connection
Table 5. Hardware connection table--(with JTDO)
Hardware connection table
--(with 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
PB3
JTDO
Must Pull up external
6
GND
GND
None
2.3.4 Software
2.3.4.1 Header files
Add the
“
stdio.h
” to the code project files.
2.3.4.2 Trace pin assignment
DBGMCU->CTRL&=0xffdf;
DBGMCU->CTRL|=0x0020;