printf Float on psoc creator 3.2

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

cross mob
lock attach
Attachments are accessible only for community members.
alma_284856
Level 3
Level 3
First like received

Hi everyone;

   

I just changed my project to psoc creator 3.2 (3.0 to 3.2).

   

When I was on 3.0 I was able to use  

   

sprintf(buf,"my Float = %f\n\r", myFloat);
 UART_1_PutString(buf)

   

with these linker's parameters in attachments.
Recently I changed to 3.2 creator, and now I'm not able to display float through my UART, I try to change the linker but nothing works.

   

I saw this post :

   

https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=printf+float+psoc+5

   

But I don"t understand how to and where change heap size to 0x200 and to add custom parameter to linker I just ahve to right in the command -->  line -u_printf_float ??

   

 

   

Thank you very much

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

http://www.cypress.com/forum/psoc-5-device-programming/problem-printing-float tells you where to apply these settings. The heap size is set in the "design-wide resources" page.

View solution in original post

0 Likes
4 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

http://www.cypress.com/forum/psoc-5-device-programming/problem-printing-float tells you where to apply these settings. The heap size is set in the "design-wide resources" page.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You should upgrade to Creator 3.3! Only changes needed are Heap size and "use newlib-nano float formatting".

   

 

   

Bob

0 Likes
alma_284856
Level 3
Level 3
First like received

Works perfectly thank you 😉

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome, Alex!

   

 

   

Bob

0 Likes