Skip to main content
Graduate II
December 13, 2024
Question

assertios "REENT malloc succeeded" failed, RTOS and printf

  • December 13, 2024
  • 2 replies
  • 633 views

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?

    This topic has been closed for replies.

    2 replies

    Super User
    December 14, 2024
    Technical Moderator
    December 16, 2024

    Hello @EthanMankins 

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

    Saket_Om_0-1734358759751.png