Hi guys, we are having some problems uploading firmware with Arduino to APM 1280 board when the size of the sketch is more than 122880 bytes (0x1E000).
I understand that bootloader starts at 0x1F000, so the maximum sketch size is 126976 bytes as Arduino shows.
What can be wrong? Tested on different boards and different computers. Arduino 0022 version.
Binary sketch size: 122904 bytes (of a 126976 byte maximum)
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x1e000
0xe1 != 0xff
avrdude: verification error; content mismatch
I've uploaded sketches a few hundred bytes shy to a 1280 without problems. Older versions of AC2 were 125k.
Jason do you have any of the older versions with 125k? If so, please post the zip to give a try, I'm not sure if it is code related, I can't upload over 0x1E000.
I just added some lines to APM code to go over 122880 bytes, can you try to compile and upload this code?
I would really appreciate it if someone could try to upload the sketch and post the results.
I tried to upload to Arduino Mega board with success, then I just found the problem, my APM boards came with fuses set wrong.
Boot flash start is wrong, preventing to write from 0x1E000 to 0x1EFFF.
Comparing to Arduino Mega fuses the brown out detection is wrong too.
I've set the fuses in APM board and now it's working.
Who know how many APM boards are out there with wrong fuses?
Take a look at BODLEVEL and BOOTSZ.
My APM boards fuses:
Arduino Mega fuses:
From DIYDrones Store.
Right fuses should be as shown from Arduino Mega board?
Maybe it happened with a batch because I got several boards with same condition. Never noticed using sketches of less than 122880 bytes.
I will look for the date of purchase if it helps.
The fuses settings from Arduino Mega are fine for APM? I'm not sure what the settings should be in right condition.