SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32

Printf support for semihosting/ITM debugging for float variables.


I have compiled and tested my code using the System Workbench and works well. However the printf for the float does not work, and gives either a long random number or -0.0000.

Any linker directives should I add to support it? The “-u _printf_float” and the “- -specs = nano.specs” inside don’t work at all too.

Thanks for the opinion.

by default printf and all flavor (aka vsprintf etc..) come without support for float on the std lib ther’s may be some some option or over lib that enabel or add float support


However, there is no extra option on enabing floats on that stdlib.

Will there be future updates to support floating point for printf?


Hello all,

Looking at this problem, we just discover it was probably due to a small glitch in the linker script provided by ST. There was, near the beginning of the fine a line that reads
_estack = 0x2000FFFF;    /* end of RAM */
This should be, in fact, a byte higher, just after the end of the RAM area, that is:
_estack = 0x20010000;    /* end of RAM */

The problem is that the original setup creates a stack pointer that is not 8-byte aligned, thus causing problems when storing double values in the stack or passing them as parameters.

Editing the linker script shoul correct the problem, so keep us informed. Anyway the correction will be in the next update, due beginning of August.


Hello Bernard,

Thanks for the help. I have suspected that there’s an error in the linker directive earlier, but I do not have enough knowledge to modify it. :-)

I got the printfs working for the floats if I used the supplied GCC’s linker scripts and initialization code ones, but I have to set up the tool chain manually. Luckily there is the OpenSTM32, so I can develop the firmware easier.

By the way, could you add the “Enable float for printf” and the “Enable Semihosting” and/or “Enable SWO” checkboxes in the “Project Options”? This allows the programmer to decide whether he/she wants to enable these in the project.

How did you make the printf work ? Did you use the Liviu Ionescu trace library ?

I cannot get sprintf to work with floats either.

I checked the linker script and the _estack is fine

_estack = 0x20020000; /* end of RAM */

I am using an M4 and have the Hard FPU selected.

How do I enable printf with float?

Hi all,

I am also having issues with printf and sprintf. The codebase which I am using was generated using cubemx for the MCU STM32F103VET. When I use printf in my code Execution is jumping to hard fault handler. Also seeing some weird memory overflow kind of behavior with sprintf.

But these two functions are working well in the firmware (generated by using cubemx) for STM32F103RB.

Are there any issues in the linker script of the STM32F103VET project?