Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

I have an Arduino Mega 2560 and it was working fine until about lunch time when I started getting this error:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

I know it isn't the code I'm running as I tried to load it onto an UNO and it seemed to load without issue. I need to use the Mega as it has more ports, though.

From what I have read this is potentially an issue with the bootloader and is possibly related to the current version of Arduino. I know virtually nothing about the bootloader; all I know is that it is used to upload code to the Arduino (I think...), therefore I have a fear of just messing around with related files unknowingly.

These pages are the ones I've been looking at, but like I said, I don't really know enough to feel comfortable with just messing around with the files.

http://forum.arduino.cc/index.php?topic=135451.0 http://forum.arduino.cc/index.php/topic,83079.msg659993.html#msg659993

I tried uninstalling my Mega totally, then reinstalling it. I also downloaded an older version of Arduino (0022) and neither option seemed to work.

I don't know what to do, or how to change the avr files if necessary.

I'd really appreciate any help!

share|improve this question
    
    
Ohhh I didn't notice that post. I've tried everything except burning the bootloader... is there a simple way to do this without having to buy software? –  bladepanthera Mar 21 at 22:05
    
usually you just go to the IDE, look under the tools menu, select "Burn Bootloader". Make sure to select the right board first. –  TheDoctor Mar 21 at 22:53
    
@TheDoctor, I've seen that option, but I have no idea what to do afterwards. I presume I have to load it again with a new "bootloader" program? One site (learn.sparkfun.com/tutorials/installing-an-arduino-bootloader) says I need to buy hardware and download specific software... all to replace the software on the bootloader?! I'm not sure I understand why. –  bladepanthera Mar 21 at 23:14
1  
You can use the Uno to reprogram the Mega. Look up ArduinoISP –  microtherion Mar 22 at 0:13
show 6 more comments

1 Answer 1

The bootloader on an arduino is just a piece of software written to enable you to update your sketches using the usb connection. Without the bootloader you can't upload sketches using just the arduino ide.

More information about the bootloader can be found here: http://arduino.cc/en/Guide/Environment?from=Tutorial.Bootloader Look under the heading entitled uploading which explains the part the bootloader plays in uploading sketches.

When you use the "Burn Bootloader" button in the arduino ide it will attempt to write a new copy of the bootloader onto the attached Arduino board. To do this the board must be attached in a specific manner - that is - using the icsp/isp header rather than the usb cable.

Now to program the avr chip directly you have to use an external (hardware) programmer. Fortunately you don't have to buy one if you have a second arduino because the second arduino can be used as a programmer. Instructions for doing so can be found here: http://arduino.cc/en/Tutorial/ArduinoISP

Even more info about the bootloader: http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.