Go Down

Topic: Help! I think I've erased my bootloader! (Read 1 time) previous topic - next topic

relic1974

I'm using EEPROM write / read to store a few bytes of data.  after resetting the 512k of memory to 0 I can no longer upload a sketch to my mega2560 so I'm assuming I have over-written part of it's bootloader.

I thought that the 512kb of EEPROM was for user storage, and was seperate memory locations from where the sketches are stored.  Is this NOT the case???

I've tried restoring the bootloader using the 'burn bootloader' option inside the arduino IDK.  it's not working.  Do I need to use another board as a programmer?  If so, do I just set the extra board up as a programmer and connect the broken board via ICSP header pins?

any info would be much appreciated!

relic1974

EDIT:  I got the bootloader working again, but would still like to know if there is any danger writing to EEPROM

CrossRoads

Shouldn't be.
When I tried to write more than 1K of eeprom, the address just wrapped around to 0 again, and screwed up the data I had save there.
Sketches cannot write to flash space. Only code running in the bootload area can write to flash space.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

relic1974

i have a sketch that will not completely upload.  it's 14kb compiled.  the hex file seems to almost make it, then avrdude keep spitting out, one letter at a time this...

B
O
O
T
L
O
A
D
E
R

H
U
H
?

any ideas?  other sketches upload fine...

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Bresser

Did you get the code from someone else and check it before you flashed it?

relic1974

thanks, but I fixed it long ago.  I don't quite remember what the problem was but it was something simple!  thanks for your reply anyway!

NI$HANT

Quote

B
O
O
T
L
O
A
D
E
R

H
U
H
?

any ideas?  other sketches upload fine...


Quote
t was something simple!


Like getting the Bootloader screwed or off the hook!
Another simple thing wrong would be changing the fuse bits of the ATmega and then it just programmes for once taking over the bootloader lock section at place , FOR example if you have pro mini 8Mhz bootloader and you just configure to run ATmega on the internal oscillator ,pretty simple wrong but develops programming problems!
"Real Men can Accomplish  Anything"
- <a href="http://www.winacro.com">  <b><font color="red">Website</font></b> </a> 
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

Go Up