-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
This is Issue 822 moved from a Google Code project.
Added by 2012-02-19T10:48:47.000Z by wes...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description
What steps will reproduce the problem?
- get the latest stk500v2 bootloader from https://github.com/arduino/Arduino-stk500v2-bootloader
- Point your paths at the gcc tools included with Arduino, and try a "make mega2560"
- Observe the size of the resulting image.
What is the expected output? What do you see instead?
In order to fit in the bootloader section, the image size needs to be less than 8192 bytes. Instead, it is over 9k!
A smaller image is produced if you compile under WINAVR_20100110.
Please use labels and text to provide additional information.
The compiler versions seems to make different decisions about when to inline functions. For minimal program size, it shouldn't be inlining functions at all (except for the most trivial.) -fno-inline-small-functions will stop this behavior and save space. Rather a lot of space; about 3kbytes when using gcc4.3.2
Diff attached.