newlib "light!
Wolfgang Fritz
wolfgang.fritz@gmx.net
Wed Feb 27 10:58:00 GMT 2002
[CC: to you, my mail2news gateway seems to suppress messages
sometimes..]
"J. Johnston" schrieb:
>
> Wolfgang Fritz wrote:
> >
> > Hi,
> >
> > I am developing communications applications on a 68LC302 platform using
> > the gcc toolchain and newlib. I've seen the binaries are much bigger as
> > the same application generated with a commercial toolchain. This is not
> > a compiler but a newlib issue. The commercial library does not have
> > floating point support, which is not needed in my application. (They
> > have a floating point version too).
> >
> > My question: Is it possible to strip down newlib to a pure integer
> > version (printf etc.)? A short look into the sources showed some
> > #defines which may imply that it is possible, but I could not find
> > options to configure it. The newlib sources are a real jungle for me.
> >
> > Is there any documentation available how to tailor newlib?
> >
>
> There is no documentation in this respect other than what's in the code.
>
> I would suggest an experiment. Try just #define'ing the various printf routines
> to point to their iprintf counterparts which are built without floating point
> support.
I tried that today. Here the results:
printf: .text: 88f0 .data: 0778 .bss 21b0
iprintf: .text: 4ccc .data: 075c .bss 21b0
==========================================
3c24 001c = 3c40 (15424 dec) bytes
difference.
That is comparable to the commercial toolchain. The floating point
routines are not loaded any more. That is what I wanted. Thanks.
> See how that lowers your application size. If it solves your problem I can tie
> it
> to a configuration option. If you are using scanf routines, there is a
> NO_FLOATING_POINT
> flag you can specify when building vfscanf.o.
Up to now I have no scanf in my application, but I will try your
suggestion if I have some spare time (but that won't be the next days,
because I expect my hardware prototypes tomorrow...)
Thanks again
Wolfgang
>
> -- Jeff J.
More information about the Newlib
mailing list