Hi
I need to use sprintf function with float numbers. But it does not work.
val=1.2243;
sprintf(text,"Value=%f",(float)val);LCD_Position(0u,0u);
LCD_PrintString(text);
Is there a setting in this regard?
Solved! Go to Solution.
To get sprintf() running you need to
#include <stdio.h>
Set "use newlib nano"
Set "Use newlib nano float formatting" in Build Settings -> Linker
And increase heap size to 0x0200 in system view.
Bob
To get sprintf() running you need to
#include <stdio.h>
Set "use newlib nano"
Set "Use newlib nano float formatting" in Build Settings -> Linker
And increase heap size to 0x0200 in system view.
Bob
Thanks Bob,
I'm Fixed it