Skip to content

Mega2560 bootloader - various bugfixes #1183

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 11, 2013

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Dec 24, 2012

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

See #181 #392 #505 #543 #544

@bkubicek
Copy link

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

@cmaglie
Copy link
Member Author

cmaglie commented Jan 24, 2013

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

C

@cmaglie
Copy link
Member Author

cmaglie commented Feb 4, 2013

@n0rad
Copy link

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
Copy link

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

@cmaglie
Copy link
Member Author

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
Copy link

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

@cmaglie
Copy link
Member Author

cmaglie commented Mar 7, 2013

@n0rad
It was a wrong addressing of EEPROM. Would you try the fix?

the updated bootloader:

https://raw.github.com/cmaglie/Arduino/8fa7d94a45b58696cd828f6a637f9da3b5404180/hardware/arduino/bootloaders/stk500v2/stk500boot_v2_mega2560.hex

@syrinx75
Copy link

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

@cmaglie
Copy link
Member Author

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
Copy link

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

@lestofante
Copy link

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" [email protected] 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//pull/1183#issuecomment-14667106
.

@n0rad
Copy link

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 mega2560-bootloader branch March 11, 2013 11:55
@cmaglie
Copy link
Member Author

cmaglie commented Mar 11, 2013

Merged.

@gokuhs
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: Bootloader The bootloader is the program used to load the uploaded program into the microcontroller's memory Component: Firmware Limited to the contents of the firmwares folder in the core packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants