cancel
Showing results for 
Search instead for 
Did you mean: 

assertios "REENT malloc succeeded" failed, RTOS and printf

EthanMankins
Senior

My project is fully working with touchgfx and FreeRtos; however, I need to add in a printf("%f") statement. Whenever I use %f i get the following error:

 

assertios "REENT malloc succeeded" failed: file "/build/gnu-tools-for-stm32_12.3
.rel1.20240926-1715/src/newlib/newlib/libc/stdlib/dtoa.c", line 239

 

 I have used printf("%d") fine. I tried following others advice of generating a new project and copying over the sysmem.c file to the new version of sbreak, but when I do that my project no longer works as expected.

Is there another way to fix specifically the printf issue without having to risk the integrity of the rest of my project?

2 REPLIES 2
Pavel A.
Evangelist III
Saket_Om
ST Employee

Hello @EthanMankins 

Please ensure that you are enabling the use of floating point with printf in your STM32CubeIDE project.

Saket_Om_0-1734358759751.png

 

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar