[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] AVR-GCC 4.3.2 producing larger output than AVR-GCC 4.1.2
From: |
Nicholas Vinen |
Subject: |
[avr-gcc-list] AVR-GCC 4.3.2 producing larger output than AVR-GCC 4.1.2 with the same source and options (-Os) |
Date: |
Fri, 09 Jan 2009 14:32:41 +1100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090103) |
This seems rather unfortunate:
$ md5sum *.c
6c66b6bdb0e87a76b146e135b0b0fa0a charger.c
$ avr-gcc --version
avr-gcc (Gentoo 4.3.2-r2 p1.5, pie-10.1.4) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
avr-gcc -Os -Wall -mmcu=atmega48 -c -o charger.o charger.c
avr-gcc -Os -Wall -mmcu=atmega48 charger.o -o charger.obj
./check.py charger.obj
text: 3986, data: 128, bss: 52
ERROR: Flash size limit exceeded by 18 bytes.
make: *** [charger.hex] Error 1
$ md5sum *.c
6c66b6bdb0e87a76b146e135b0b0fa0a charger.c
$ avr-gcc --version
avr-gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
avr-gcc -Os -Wall -mmcu=atmega48 -c -o charger.o charger.c
avr-gcc -Os -Wall -mmcu=atmega48 charger.o -o charger.obj
./check.py charger.obj
text: 3848, data: 128, bss: 52
That's a pretty big difference. If somebody wants to look into it, I've
uploaded the source and object files here:
http://x256.org/~hb/avr-gcc/ <http://x256.org/%7Ehb/avr-gcc/>
Interestingly, avr-gcc 4.3.2 seems to do better on some functions (e.g.
update_buttons, update_state) but functions which contain integer
multiplies by fixed values seem to end up much larger than the older
version. I think if whatever is causing this can be "fixed" then the
output will be even smaller than either case, which would be excellent.
Thanks,
Nicholas.
- [avr-gcc-list] AVR-GCC 4.3.2 producing larger output than AVR-GCC 4.1.2 with the same source and options (-Os),
Nicholas Vinen <=