/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / sprintf usage...

Username:     
Password:     
             

Forum

# 1   2010-02-08 22:30:30 sprintf usage...

logictechs
Member
Registered: 2009-05-07
Posts: 68

sprintf usage...

Hi,

Can someone please provide a step by step useage of the sprintf function.  I've searched this forum and tried what has been said already but still no go.  Everything compiles correctly and even works during debug running of the app.  Problem is when I try to load the release version that I get all the error messages as indicated here at the last post:  http://www.stm32circle.com/forum/viewtopic.php?id=742

I have the latest versions of everything including 3.8OS.

Offline

 

# 2   2010-02-09 15:05:32 sprintf usage...

VincentC
Administrator
Registered: 2007-11-08
Posts: 149

Re: sprintf usage...

Hi,

Please tell us the versions of the Ride7 and ARM kits that you are using. ("the latest" might be tricky)


From what you describe I guess that your application is using the small printf option...?

This option tells the linker to link one of the small_printf libraries, as explained in the Ride documentation.

But there is no such option in the link performed by Circle_mgr, because it would have some undesirable side-effects. So in your situation the linker takes the sprintf from gcc, which does not work so easily.

The solution is to take the sources of the small_printf library that you are using (with or without floats support) and include the sources of the functions that you call (sprintf) directly in the sources of your application.

Please refer to the GettingStartedARM document for the description of these libraries and where to find their sources.


Best Regards,

Vincent

Offline

 

# 3   2010-02-13 20:33:36 sprintf usage...

logictechs
Member
Registered: 2009-05-07
Posts: 68

Re: sprintf usage...

Hi Vincent,

Thanks for the reply but it does not help.  As I stated, I have the latest versions of everything downloaded from here and the Raisonance site.


Can you please post an example application for me to work with?  I'm uncertain how to include the sprintf source code in my app as you suggested.  I've compiled the sprintf project with Ride and then included the object file in my app but that did not allow my final release app to be loaded.

Offline

 

Board footer