sprintf code size

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

sprintf code size

578 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Sun May 01 06:12:54 MST 2011
Hi, I am trying to use sprintf function but my code syze overflowed with 19k.
So is there stdio pack of functions which is the bare minimum of code. My only goal is just printing to string.
0 Kudos
Reply
1 Reply

551 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun May 01 07:55:12 MST 2011
In the first place, if you do not need to sprintf floating point values, then you could try setting the define "CR_INTEGER_PRINTF", as described in the FAQ:

http://support.code-red-tech.com/CodeRedWiki/UsingPrintf

If that doesn't reduce things sufficiently for you, then you could take a look at the "lib_small_printf_m0" that NXP provide as part of their LPC1114 examples for LPCXpresso. This is a port that NXP have done of the "small printf" that can be found at:

http://www.menie.org/georges/embedded/index.html

Regards,
CodeRedSupport
0 Kudos
Reply