Hi Jerry,
Attached is project created using KDS_3.x+KSDK_1.3 for the frdm-k64. Look in main.c for example code.
I pulled in the platform drivers, hal, other stuff for interrupts and clocking, and also utilities which has if own printf (debug_printf) and associated scanf too.
To enable floating for the debug_printf | scanf the added "PRINTF_FLOAT_ENABLE" and "SCANF_FLOAT_ENABLE" to the Cross ARM C Cpompiler Preprocessor "Defined symbols (-D)". So this is using embedded code for printf/scanf and not gcc library.
Now to get sprintf working which is using the gcc library, I had to check the boxes for the in the Cross ARM C++ Linker0>Miscellaneous setting that are labeled "Use float with nano printf (-u _printf_float)" and "Use float with nano scanf (-u _scanf_float)" to get the sprintf to work with float and also the formatting.
Here is terminal output:
Just a test...here is 314.16
Hello World!
PI = 3.141590
Enter floating point number <followed by Enter> to multiple by PI:
You entered 1.000000............The answer is 3.14
PI = 3.141590
Enter floating point number <followed by Enter> to multiple by PI:
You entered 10.000000............The answer is 31.42
PI = 3.141590
Enter floating point number <followed by Enter> to multiple by PI:
You entered 100.000000............The answer is 314.16
PI = 3.141590
Enter floating point number <followed by Enter> to multiple by PI:
You entered 1000.000000............The answer is 3141.59
Regards,
David