cancel
Showing results for 
Search instead for 
Did you mean: 

Anglia Code-sourcery printf code size

bruce
Associate II
Posted on May 02, 2008 at 06:55

Anglia Code-sourcery printf code size

3 REPLIES 3
bruce
Associate II
Posted on May 17, 2011 at 12:34

I've been using the codeSourcery environment through Anglia, but I've noticed that the code is getting a little big, because I've included sprintf and sscanf. Is there a way, short of writing my own versions, of getting a leaner version of sscanf and sprintf? Specifically, I would like to cut out the float support, if it would gain me some space.

Thanks.

lanchon
Associate II
Posted on May 17, 2011 at 12:34

hi,

anglia uses codesourcery toolchain. codesourcery uses newlib. I believe newlib either:

-can be compiled without float support for printf

-or includes a printf alternative without float support

check the manuals.

sjo
Associate II
Posted on May 17, 2011 at 12:34

yes the anglia toolchain uses newlib.

It can be a bit bulky, you could reduce the size by using the integer only versions, eg. siprintf, iprintf etc. but they still use heap memory.

The best solution is to use one of the many free implementations on the net.

Cheers

sjo