Closed GoogleCodeExporter closed 9 years ago
Try using avr-gcc 3.3.x. It should generate smaller code.
Original comment by dmel...@gmail.com
on 7 Dec 2009 at 9:49
This is fixable :-) Seems like the main problem is they (avr-gcc) changed what
optimizations are done by default. In the Makefile, changing the OPTIMIZE= line
to:
OPTIMIZE = -Os -funsigned-char -funsigned-bitfields
-fno-inline-small-functions
does the trick for me (Arduino bootloader comfortably fits the boot block when
compiled with avr-gcc 4.3.2). For a bit of extra future-proofing though, you
can instruct the compiler the bootloader's main() cannot return: change int
main(void) to
//int main(void)
void main(void) __attribute__ ((noreturn));
void main(void)
will save some stack bytes and the overhead of managing them, in exchange for a
harmless warning that main() does not return a value. (who would it return one
to?)
Original comment by drmn...@gmail.com
on 10 Aug 2010 at 6:04
Original issue reported on code.google.com by
leonie.t...@gmail.com
on 7 Dec 2009 at 9:44