Arduino reports "Binary sketch size: 31070 bytes (of a 32256 byte maximum)" When I upload the sketch it fails at 30720. Is this a bootloader problem? I could have sworn it was work before today.
Please share your code, most of the time there is room for optimization.
!! use the # button to provide [ code] and [/code] tags around the code so it will come in a nice scrollable box.
I'm using the AeroQuad code base and I'm sure you don't want me to post it here.
Avrdude is the one reporting the error:
Binary sketch size: 31430 bytes (of a 32256 byte maximum)
avrdude: verification error, first mismatch at byte 0x7800
0x07 != 0xff
avrdude: verification error; content mismatch
I assumd the Uno sketch size limit was 32256 bytes but now I've been told that there was a bug that limited the size 30720 and I need to reprogram the bootloader with a new version of Optiboot. Sound right?
I'm using the AeroQuad code base and I'm sure you don't want me to post it here.
Why not?
At least provide an URL to your code if you want help.
http://code.google.com/p/aeroquad/downloads/list
The code in question is AeroQuad_v2.1.2_Beta.zip
In AeroQuad.pde uncomment these defines to drive image over 30720 bytes:
#define AeroQuad_v18
#define HeadingMagHold
#define BattMonitor
That should give you a sketch size of:
Binary sketch size: 31574 bytes (of a 32256 byte maximum)
Which will fail to upload despite being below the 32256 maximum.
The error "first mismatch at byte 0x7800" translates to decimal 30720. So it seems to me that, as you say, there is a limit of 30720 rather than 32256. I'm a newbie, so I can't suggest how to increase the limit or reduce your code size - sorry.
Turns out that the optiboot bootloader version I have has some problems. I ordered a programmer so I could burn a new bootloader. The new optiboot from the optiboot software repo doesn't have this problem.