Can't upload to Arduino Mega 2560

Hi all guys!

I've just started a little project with my brand new Arduino Mega 2560 and things seemed to work till today when i came back from work. I connected the board via USB to the pc, tried uploading a modified version of my last sketch and......i get a timeout on uploading. The bootloader seems to be fine cause when i reset the board, the led connected to pin 13 flash 2 times.
I've tried to change USB port, change comupter, unistall and reinstall driver...nothing works. The UI send the first string to the board, and RX led flash shortly then it doesn't send anything...TX stay off. Here is some output from the command line (Shift pressed while clicking uploading).

Binary sketch size: 1588 bytes (of a 258048 byte maximum)
C:\Program Files (x86)\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P\.\COM3 -b115200 -D -Uflash:w:C:\Users\Lucia\AppData\Local\Temp\build7788845569130688806.tmp\Blink.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
Copyright (c) 2000-2005 Brian Dean,

System wide configuration file is "C:\Program Files (x86)\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM3
Using Programmer : stk500v2
Overriding Baud Rate : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_send(): write error: sorry no info avail

I've tried to push reset before uploading too.

Someone can help me?!

Thank you very much!
Michele

I have similar problems and many other people do too- it seems an issue with the bootloader. I have searched and no one on the forum can give a straight answer how to re burn the 2560 bootloader. there are 100 half answers. i found the developer who actually programed the bootloader and sent him an email a few hours ago for a step by step guide specifically for the 2560. I hope to have a difinitive answer soon! ;D

if you find something first please post here, I am listening.

Hi Will.

I thinked it's a bootloader problem too, but it seems it's booting ok because it flash 2 times after a reset. However we can try flash it with a parallel cable http://arduino.cc/en/Hacking/ParallelProgrammer .

If the developer reply to you please write here =) i'm still searching a soliution!

no response from the developer yet- but I talked to spark fun where is bought it and sent them my tests... I did the "general test" and the "tone test" direct from the Arduino IDE version 22... both with failed results. Sparkfun said it was the bootloader too and has a tutorial to re-burn here:
http://www.sparkfun.com/tutorials/247

the tutorial is for an UNO, so the only change you need to make is in the FUSE file with this:
#############################################
mega2560.name=Arduino Mega 2560

mega2560.upload.protocol=stk500v2
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200

mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F

mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=16000000L
mega2560.build.core=arduino

#############################################

You also need to download WINAVR from SourceForge AND one of these tools:
http://store.atmel.com/PartDetail.aspx?q=p:10500054

Or the one that SparkFun has listed in the Tutorial- but I think the tool from Atmel would be less buggy- since it is made for the chip in the Mega 2560 :wink:

can you say YIKES!

Nice Job!

The only problem is that we need a programmer or another arduino (wich i don't have). Since i bought my arduino in MY electronic store i think it's faster to send in RMA the old arduino and get a new one! xD

I just completed my RMA too, I hope the new board is solid. Good Luck on your Projects!

OH YES- I heard back from the the Bootloader Developer. He said don't put !!! anywhere in your code. There is a bug when you use 3 exclamations in a row, no matter how you use them, the bootloader tries to go to a monitor mode and breaks the sketch. no !!! :stuck_out_tongue:

xD

I think i've make a "///" for the comment...hope this don't make the board break too xD xD.....i'll make more attention to this thing!

Thank you very much...hope this post could help someone else!

having a trouble uploading my program to my board please help hellllllllllpppppppppppppp

the program used
void setup()
{
pinMode(2,INPUT);
pinMode(13, OUTPUT);
}

void loop()
{
int x=digitalRead(2);
if(x==HIGH)
{
digitalWrite(13,HIGH);
delay(100);
}
else
digitalWrite(13,LOW);
}
the error we are getting
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

please help :cry: :cry: :cry: :cry: :cry: :cry: :cry:
i am very depressed so kindly help fast

it seems a baud rate communication error...try change it in the configuration of avrdude

what a baud and how can i do it :frowning: :-[

@naman
When that error occurs, you are referred to your local copy of this file.
http://arduino.cc/en/Guide/Troubleshooting

Notice that jumping on the forum and complaining, while providing no details, is wwwwaaaayyyyy down on the list of things to try.

After you have worked through the earlier items on the list, you will know what kinds of questions you need to provide the answers to, here.

What operating system are you using is one of the first things that you need to define. Check out the troubleshooting guide yourself, for a while, first.