avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] avr-gcc printf optimisation ?


From: Weddington, Eric
Subject: RE: [avr-gcc-list] avr-gcc printf optimisation ?
Date: Wed, 17 Dec 2008 15:01:58 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Pink Boy
> Sent: Wednesday, December 17, 2008 2:26 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] avr-gcc printf optimisation ?
> 
> 
> Joerg Wunsch sez,
> 
> > In hosted mode (which is the default), you are not allowed
> > to replace library functions by your own implementation.  
> > Either use -ffreestanding, or use a non-conflicting name 
> > instead.
> 
> I have a question, unrelated. I use my own non conflicting printf
> that looks like,
> 
> int d_printf_P(int vebose, PSTR *c, ....);
> 
> What gets me is that it seems like each call to printf consumes
> a lot of code space, 100 bytes or so.  Is that normal or am I 
> doing something wrong?  It's annoying because 20 printf's is 2K
> of code space.

It sounds like the code is being inlined in all of those places.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]