2024-02-18 11:08 AM
Hi,
I wrote an application as below which prints formatted values. However, when I print the Adc.IntSensTmp, I dont see the value as expected. Instead, I see the output below. Could you pls help me resolve ?
Thanks.
Here is the output I get.
2024-02-18 12:13 PM
Need to enable the floating point printf() libraries, or use dtoa()
2024-02-18 12:23 PM
Thank you very much.
I did it by enabling a flag as below.
Project -- > properties --> C/C++ Build --> settings --> MCU GCC Linker --> Misc --> Other flags
add -u_printf_float
2024-02-18 12:55 PM
There are dedicated checkboxes for this in STM32CubeIDE.
The compiler also issues a warning about this if you have "%f" in a printf statement without those checkboxes enabled.