Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1

Anonymous
Not applicable

Hi there,

   

I try to use 

   

sprintf (My_String, "%f ;", longitudeDegrees);
UART_PutString(My_String);

   

but this doesn't work.

   

sprintf (My_String, "%d ;", counter);

   

UART_PutString(My_String);

   

but this one is working. i think there a problem with convert from flaot to string. I am using PSoC Creator 3.3, ARM GCC 4.9-2015-q1-update, and PSoC 5 LP.

   

Could you help me with this problem? Thanks

0 Likes
1 Solution
Bob_Marlowe
Level 10
50 questions asked 10 questions asked 1000 solutions authored
Level 10

Hi Peter!

   

Set "Heap Size" to 0x0200 (in cydwr view, system tab)

   

Set "Use newlib-nano float formatting" to true (in Project->Build Settings -> Linker)

   

This should work Creator 3.3

   

 

   

Happy coding

   

Bob

View solution in original post

3 Replies