Skip to main content
bruce
Associate III
May 2, 2008
Question

Anglia Code-sourcery printf code size

  • May 2, 2008
  • 3 replies
  • 587 views
Posted on May 02, 2008 at 06:55

Anglia Code-sourcery printf code size

    This topic has been closed for replies.

    3 replies

    lanchon
    Associate III
    May 17, 2011
    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.

    bruce
    bruceAuthor
    Associate III
    May 17, 2011
    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.

    sjo
    Associate III
    May 17, 2011
    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