Skip to content

stk500v2 bootloader is too big when compiled with the Arduino Compiler. [imported] #212

@cmaglie

Description

@cmaglie

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?

  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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions