anilgkts / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

stk500v2 bootloader is too big when compiled with the Arduino Compiler. #822

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get the latest stk500v2 bootloader from 
https://github.com/arduino/Arduino-stk500v2-bootloader
2. Point your paths at the gcc tools included with Arduino, and try a "make 
mega2560"
3. 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.

Original issue reported on code.google.com by wes...@gmail.com on 19 Feb 2012 at 10:48

Attachments: