EasyManua.ls Logo

STMicroelectronics STM32 - Figure 60. Properties for Semihosting in Stm32 Cubeide- Source Location; Stm32 Cubeide

STMicroelectronics STM32
118 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.

Table of Contents

Related product manuals