Printf debugging
AN4989
74/118
AN4989 Rev 3
Figure 52. IAR™ EWARM SWO Clock setting
Once configured, IAR™ EWARM properly sets TRACE_IOEN and TRACE_MODE and
configures the related GPIO.
SWO printf occurrences are visible in Terminal I/O windows.
Port Stimulus 0 is used by printf and scanf. It is not configurable.
Keil
®
MDK-Arm µVISION:
In MDK-Arm it is required to redirect printf to SWO by some piece of code following same
model as for UART (Refer to
Section 7.2: Printf via UART on page 69
)
#include "stdio.h"
int fputc(int ch, FILE *f)
{
ITM_SendChar(ch);
return(ch);
}
Keil
®
must be properly configured for the SWO communication to be properly set. An
example is given in
In
Projet Option
->
Debug
->
Probe Settings
->
Trace Pane:
1.
Tick Trace Enable
2. Enter correct Core Clock
3. Enable ITM Stimulus Port 0
Содержание STM32 Series
Страница 46: ...Connecting to the board AN4989 46 118 AN4989 Rev 3 Figure 30 Keil hotplug step2 ...
Страница 91: ...AN4989 Rev 3 91 118 AN4989 Debug through hardware exploration 117 Figure 69 STM32F4 F7 dual MCO capabilities ...
Страница 103: ...AN4989 Rev 3 103 118 AN4989 Managing DBGMCU registers 117 Figure 78 Generator Options debug MCU in STM32CubeIDE ...