My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 1: Too big when compiled with ubuntu current 4.2.4 gcc
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Closed:  Oct 2011

Sign in to add a comment
Reported by tz2026, May 2, 2010
If I try to remake the hex, it will end up about 20 bytes over.

I tried this several times.

What version of the compiler is required?

Under linux, the compiler is installed separately from the arduino
environment so might not be the latest one or one too new.

May 6, 2010
Code was compiled on avr-gcc-4.3.3, using Objective Developments Crosspack distribution for Mac.

I'll update documentation to make this clear.
Status: Accepted
Owner: cathedrow
May 6, 2010
#2 tz2026
I tried 4.3.4, same problem (from the arduino-0018 for windows from  I
can try their Mac version but I suspect it will be the same.

Aug 29, 2010
The problem appears to be that the avr-gcc provided by Ubuntu and Arduino inserts the "zero data and bss" prologue code even though the "-nostartfiles" switch is passed in. I found that when the LDFLAGS in the Makefile includes the "-nostdlib" switch the resulting program is identical to what is provided in binary form (according to the .lst files).

To clarify, modifying line 61 of the Makefile to the following allows me to compile optiboot to less than 512 bytes:
    override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles -nostdlib

I am using avr-gcc 4.3.4 on Ubuntu 10.04. I hope this helps.
Sep 28, 2010
-nostdlib works like a charm.
Apr 25, 2011
still not in tree? is this project abandoned? last commit was 6 months ago!
Oct 30, 2011
Project Member #7
Fixed as part of the great optiboot/Arduino sync-up

Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting