I am working wih LpcXpresso IDE and have problems to use the function sprintf() with float conversion. A lot of hints are available in the internet (e.g. uses -u _printf_float). But I do not know, how to handle this. Can anybody give me a solution?
Very hard to give a solution if you don't describe the problem. Please describe exactly your problem and show us the code you are using.
Here is the code example:
sprintf(temp,"%1.3f",wert)The result is an empty string. If I use an integer wert and format it with "%d" I get the right string.
So is your project configured to use Redlib, Newlib or NewlibNano as your selected C library?
What are Redlib and Newlib?
If you are using Redlib, then make sure you haven't got CR_INTEGER_PRINTF symbol defined:
And if you are using NewlibNano, then make sure you have "Enable printf/scanf float" enabled in Project properties:
If you need further assistance, then please confirm the version of LPCXpresso IDE that you are using, and export and post an example project that shows up your problem:
How to import/export projects
Retrieving data ...