Pages: [1]   Go Down
Author Topic: Help! I think I've erased my bootloader!  (Read 1116 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Never saw that happen!
Logged

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.

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 7
Posts: 1545
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Pages: [1]   Go Up
Jump to: