I have spent a fair amount of time trying out various compiler options and
this is what I settled on for large projects.  A lot of suggested options
made no significant difference in my projects however, your mileage may
vary, so give em a try and see what happens:

CFLAGS += -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -fno-inline
#CFLAGS += -fno-inline-small-functions
#CFLAGS += -finline-limit=3
#CFLAGS += --param inline-call-cost=2
#CFLAGS += -fno-if-conversion
#CFLAGS += -fno-split-wide-types
CFLAGS += -mcall-prologues
CFLAGS += -Wall -Wstrict-prototypes


For a small project (e.g. tiny26) I think explicit inlining works best.  For
larger projects (as above) the biggest win was call-prologues.  The
"inline-limit=2" worked as well or better than explicit inlining, but since
I inline for specific reasons, I just keep it explicit.    

you might find this #define useful

#define _INLINE_ static inline __attribute__((always-inline))

as in

_INLINE_ void SomeFunction(void) {}


-----Original Message-----
From: avr-gcc-list-bounces+larry=barello....@nongnu.org
[mailto:avr-gcc-list-bounces+larry=barello....@nongnu.org] On Behalf Of
Royce Pereira
Sent: Monday, June 22, 2009 6:37 AM
To: avr-gcc-list@nongnu.org
Subject: Re: [avr-gcc-list] WINAVR with GCC 4.3.3

Hi,

I have a project built around a Tiny26.

It was compiled with WinAVR-20070525.

I'd stuck to this version for a long time, until recently when I upgraded to

20090313.

Soon after, I had to recompile my project due some change in specs.

Imagine my shock when AVRstudio complained that the hex file was too big for

the device !

Upon further checking I found the code size at 2234 bytes - correctly too 
big for the tiny26.

I quickly compiled with the older WinAVR, and the code size was back to 
original- 1760 bytes ...whew - tears of relief !!

The new WinAVR bloated the code by about 500 bytes . Wow.

Various posts on this list have indicated that each new release bloats the 
code ??

If that is true, then, by 2012, I'll have to redesign my current Tiny2313 / 
Tiny26 projects around a Mega128 :-))  !!!

(lol)

Regards,

--Royce.

 



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.78/2185 - Release Date: 06/22/09
06:54:00




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to