Stm32Cubeide; Figure 60. Properties For Semihosting In Stm32Cubeide- Source Location - STMicroelectronics STM32 Application Note

Microcontroller debug toolbox
Hide thumbs Also See for STM32:
Table of Contents

Advertisement

AN4989
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.
AN4989 Rev 3
Printf debugging
81/118
117

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF