My target is TWR-K54F10M and I'm using KSDK1.2 and KSDK1.3 and DSK3.0.
I'm not able to print float values using PRINTF macro(debug_printf).
I have turned on the switch -u _printf_float and it shows up in the linking phase of the build.
However It does not work.
I would appreciate your help.
You do want the -u _printf_float and -u _scanf_float checked.
Try increasing your task stack size.
If still having issue please post your project.
Regarding the sprintf not working with float, I noticed that in one of your posts regarding this issue that -u _printf_float switch under the Linker Miscellaneous option , needs to be checked.
When I do this my code hits a trap when it tries to execute sprintf.
So without that option I get all zeros and with those option turned on ,I hit a trap.
Thanks much. Printf issue is resolved by the solution proposed by Jennie Zhang in the post you provided.
However now I'm having issue with sprintf :
sprintf(out_buff,"%f", flt_val); with the following:
when I look at out_buff using debugger it is all zeros with flt_val displaying a float as I expect it to.
Can't figure this one out. Is this the GCC arm or KDS.I've used GCC ARM before and never had any issues.
I need to covert a float number to string and I always used sprintf for this purpose successfully until now.