AN4989 Rev 3
81/118
AN4989
Printf debugging
117
7.4.3 STM32CubeIDE
Set linker parameters
First the linker must ignore the default syscalls.c file and has to use the newlib-nano
librairies, which contains printf() function.
in
Project -> Properties -> C/C++ General -> Paths and Symbol
Click on the Source Location tab. Click on the arrow near to “[Project name]/Core”, and
select “Filter(empty)”.
Then click on “Edit filter” button and add “syscall.c” to the Exclusion patterns list.
Figure 60. Properties for semihosting in STM32CubeIDE- Source Location
To use semihosting the librdimon must be enabled. Librdimon implements the semihosting
versions of syscalls from newlib.
On the left-side pane, go into
C/C++ Build -> Settings
and select the Tool Settings tab.
Then, select MCU GCC
Linker -> Libraries
. In the libraries pane, click the “Add” button and
enter rdimon.
Содержание 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 ...