Problem printing float | Cypress Semiconductor
Problem printing float
I have been through the knowledgebase and applied suggestions
Project -> Build Options -> linker -> Command Line -> -u_printf_float
Then tried Linker -> General -> Use newlib nano ... False
Finally tried, asm (".global _scanf_float");
None of these seemed to help. I can sprintf decimal values and strings ok but not floating point.
I am using Psoc Creator 3.2 SP1, ARM GCC 4.8.4 compiler, debug build
Here is my code (initially I was trying to print a float var but set an exlicit value to test)
When I run this my buffer has values like
0x00, 0x2E, 0x80, 0x00, 0x20, 0x11, 0x00 ...
instead of 0x31, 0x2E, 0x33, 0x35
Any help much appreciated