Skip to main content
Graduate
October 9, 2023
Question

How to get rid of "float formatting support is not enabled" in STM32CubeIDE for CMake project

  • October 9, 2023
  • 1 reply
  • 4703 views

Hi Community,

I am working on a CMake project where sprintf is being used. After building the project in the Problems window section, I see one error regarding the float formatting as below.

The float formatting support is not enabled, check your MCU Settings from "Project Properties > C/C++ Build > Settings > Tool Settings", or add manually "-u _printf_float" in linker flags

The flag "-u _printf_float" is added in the target link options and -mfpu=fpv4-sp-d16 and -mfloat-abi=hard is added as CPU parameters. But still showing this problem will it impose any issue while building although the build is not complaining about this.

    This topic has been closed for replies.

    1 reply

    Visitor II
    October 7, 2024

    Rather than adding the flag manually, it worked for me to check the option in the setting it's directing to "Project Properties > C/C++ Build > Settings > Tool Settings > MCU/MPU Settings > Use float with printf from newlib-nano (-u_printf_float)"