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 mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
