Unable to use sprintf with CW for ColdFire v6.3 and MCF52223

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to use sprintf with CW for ColdFire v6.3 and MCF52223

1,664 Views
BobJohnson
Contributor I
Hello,
 
I am using a MCF52223 Demo Board with Code Warrior for Coldfire V6.3.
 
I am having some problems using the sprintf function. Initially I tried including the <stdio.h> library, and when doing this I got the link error that sprintf was undefined. After doing some reading I found the information that I should try including the C_TRK__2i_CF_MSL.a library or the C_TRK__4i_CF_MSL.a library. I tried this, then got 19 link errors such as "Undefined: __rt_add64 Referenced from __msl_generic_count_bits64" in C_TRK_2i_CF_MSL.a"
 
Any information would be much appreciated.
 
Thanks.

J2MEJediMaster added CW version and MCU type to header


Message Edited by J2MEJediMaster on 2007-05-25 11:08 AM
Labels (1)
0 Kudos
Reply
1 Reply

369 Views
CompilerGuru
NXP Employee
NXP Employee
Check the Help\PDF\Targeting_ColdFire.pdf, the "Using MSL for ColdFire" chapter.
It described how the library names are constructed.
The *_TRK_* libs are needed if you want printf support, for just sprintf (no stdout...), I would use the lib without the _TRK_ prefix.

Also check what the provided stationeries link against, I'm sure sprintf works for those.

Daniel
0 Kudos
Reply