2023-10-09 02:11 AM - last edited on 2024-10-07 02:38 AM by Andrew Neil
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.
2024-10-07 01:54 AM
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)"