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.
Comment #1
Posted on May 6, 2010 by Happy HippoCode was compiled on avr-gcc-4.3.3, using Objective Developments Crosspack distribution for Mac.
I'll update documentation to make this clear.
Comment #2
Posted on May 6, 2010 by Helpful RhinoI tried 4.3.4, same problem (from the arduino-0018 for windows from arduino.cc). I can try their Mac version but I suspect it will be the same.
Comment #3
Posted on Aug 30, 2010 by Helpful CatThe 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.
Comment #4
Posted on Sep 28, 2010 by Massive Kangaroo-nostdlib works like a charm. Thx
Comment #5
Posted on Dec 31, 2010 by Quick Giraffe-nostdlib works perfectly with avr-gcc 4.5.1 on linux
Attached the diff + can be pulled from my clone https://code.google.com/r/lifeeth-optiboot/source/diff?spec=svn7139951c381588d85562d64db21a8dc1ca6a7090&r=7139951c381588d85562d64db21a8dc1ca6a7090&format=side&path=/optiboot/bootloaders/optiboot/Makefile
- makefile.diff 625
Comment #6
Posted on Apr 25, 2011 by Swift Horsestill not in tree? is this project abandoned? last commit was 6 months ago!
Comment #7
Posted on Oct 30, 2011 by Happy DogFixed as part of the great optiboot/Arduino sync-up http://code.google.com/p/optiboot/source/detail?r=8559b64fd093d3976cae58778a1540256cde5c8e
Status: Fixed
Labels:
Type-Defect
Priority-Medium