cancel
Showing results for 
Search instead for 
Did you mean: 

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

newbie_stm32
Associate III

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.

1 REPLY 1
klaytonme
Visitor

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)"