Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Mega2560 bootloader - various bugfixes #1183

Merged
merged 6 commits into from Mar 11, 2013

Conversation

6 participants
Owner

cmaglie commented Dec 24, 2012

Patches to Mega2560 stk500v2 bootloader from Mark Sproul, to be tested.

See #181 #392 #505 #543 #544

@ghost ghost assigned cmaglie Dec 24, 2012

please merge, finally the watchdog reset might work on an arduino mega 2560....

Owner

cmaglie commented Jan 24, 2013

Please check the fix, and report if it works.
Any report will speed up the merge.

C

n0rad commented Mar 2, 2013

I can confirm that this bootloader allow upload of the eeprom on a 2560.

I'm working on a restful client/server that store board settings in eeprom : https://github.com/housecream/restmcu.

n0rad commented Mar 3, 2013

It seems that data are not well written to the eeprom on latests bytes :

avrdude: reading input file "target/restmcu.eep"
avrdude: input file target/restmcu.eep auto detected as Intel Hex
avrdude: writing eeprom (433 bytes):

Writing | ################################################## | 100% 1.79s

avrdude: 433 bytes of eeprom written
avrdude: verifying eeprom memory against target/restmcu.eep:
avrdude: load data eeprom data from input file target/restmcu.eep:
avrdude: input file target/restmcu.eep auto detected as Intel Hex
avrdude: input file target/restmcu.eep contains 433 bytes
avrdude: reading on-chip eeprom data:

Reading | ################################################## | 100% 0.05s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x01b0
0x00 != 0xff
avrdude: verification error; content mismatch

Owner

cmaglie commented Mar 5, 2013

@n0rad
I cannot reproduce your issue, just tested write and read of the eeprom. Can you provide your command line and .hex file?
C

n0rad commented Mar 6, 2013

avrdude -C /etc/avrdude.conf -p atmega2560 -P /dev/ttyACM0 -c stk500v2 -b 115200 -D -U flash:w:n0rad2560.hex -U eeprom:w:n0rad2560.eep

https://raw.github.com/housecream/restmcu/master/board/n0rad2560.eep
https://raw.github.com/housecream/restmcu/master/board/n0rad2560.hex

syrinx75 commented Mar 9, 2013

Is it normal to get this error? I use an Arduino UNO as ISP.

avrdude: verification error, first mismatch at byte 0x1e000
0xff != 0x0d
avrdude: verification error; content mismatch

Owner

cmaglie commented Mar 9, 2013

@syrinx75
I don't understand what are you trying to do, are you using the Arduino UNO (as ISP) to burn the bootloader into the Mega2560 (through the ICSP connector)?

syrinx75 commented Mar 9, 2013

Yes, I use an Arduino UNO as ISP with this wiring: https://www.sparkfun.com/tutorial/ArduinoBootloader/BootloadArduino1.jpg
to burn the bootloader of the 2560 with ArduioIDE 1.03

Use this guide:
http://www.michelemenniti.it/arduino_burn_bootloader.phpis in Italian
but image are universal, also a hood tramslator can help
Il giorno 09/mar/2013 18:41, "syrinx75" notifications@github.com ha
scritto:

Yes, I use an Arduino UNO as ISP with this wiring:
https://www.sparkfun.com/tutorial/ArduinoBootloader/BootloadArduino1.jpg
to burn the bootloader of the 2560 with ArduioIDE 1.03


Reply to this email directly or view it on GitHubhttps://github.com/arduino/Arduino/pull/1183#issuecomment-14667106
.

n0rad commented Mar 10, 2013

The eeprom is well written with the new version

@cmaglie cmaglie merged commit f8ad1bc into arduino:master Mar 11, 2013

@cmaglie cmaglie deleted the cmaglie:mega2560-bootloader branch Mar 11, 2013

Owner

cmaglie commented Mar 11, 2013

Merged.

gokuhs commented Apr 22, 2013

My atmega2560 now works perfetly with the cmaglie's hex ( #1183 (comment) ),

To program it, I follow this tutorial and I program it with a Arduino Uno : https://www.sparkfun.com/tutorials/247

Tip: the command i use:
$ avrdude -P /dev/ttyACM0 -b 19200 -c avrisp -p atmega2560 -v -e -U flash:w:stk500boot_v2_mega2560.hex -U lock:w:oxoF:m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment