Arduino Mega2560 can't upload sketch

Hi

I've built a Mega2560 and Ican't updload any sketch.

I use windows XP pro sp3, arduino 0022.
I download Flip 3.4.2 from Atmel
I use AVRISP to Upload the bootloader in the ATMEGA2560, it worked fine ( led is blinking normally.
I see the Atmega2560 com port in windows, and in Arduino0022,
The power led is on
I followed the instruction to burn the bootloader in the AT90USB82, ( I did solder the 10k resistor on the back) I did remove it when it was done.

I use the blink sketch to try to upload ( I change the timing in it to prove it load correctly)
I did select the Atmega2560, I check and the software select the good com port
I click upload and I saw the TX led flash one time in the beginning, then I see the RX flashed at regular time, the sofware indicate Uploading to I/O board.
It could either stay in that mode for almost 20 minutes , then I got the error:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

I have also a Atemga1280, wish I use the same software ( I select the board Mega1280) to program and it work fine.

So it's not the cable, I don't suspect the driver since I see it correctly( when I short the pin near C10 the COM Port disappear then reappear.

I double check the part orientation, value, on the board.

Is someone could give me some hint to where I could check to make it work correctly??

Thank You
Bryltech

I have the same problem.

Seem to be Issue 392: STK500V2 bootloader on Mega 2560 fails on sketches containing !!!

I have been to Hell and am still not back with this. I got an Arduino Mega 2560 a week ago. I use a Macbook pro (OSx10.5.8) and Arduino 1.0. I have been trying to get the Mega2560 to work on my Mac. I select the right board and the right serial port (the one that says tty usbmodem***** etc but I get the same Timeout message. This is on my MAC. Now, I also have Parrallels for MAC and sometimes use it running windows XP ( for some UNI work.). The Mega2560 uploads perfectly with the PC emulator. I have posted elsewhere on this forum about this problem and have had some suggestions, none of which seem to work.I also accidentally over wrote the bootloader and thought I'd bricked my board but I managed to get it back using DFU-programmer (phew.) So now I am back where I started, a MEGA2560 board that uploads fine on a windows emulator on a MAC but doesn't on the MAC itself.... :!
If any one finds THE solution for this, I would love to know it....Cheers 4 now,
Steve.

On my case, it was the !!! syndrome.

I skipped those !!! and all went fine again.

It seems this bug is one year old and still alive. Why hasn't it been fixed yet?

I'm using Arduino 1.0 on a mega2560 v2 I bought last week.

what do you mean you spiked them?

I changed the !!! for another string.

I was having the same problem with a Mega2560 R2 that I bought about a year ago but never used until just now. (Lots of projects on Uno but now need the Mega) I tried multiple computers and USB ports without luck until I tried watching the pin 13 LED while attempting to upload. I found that if I pressed the reset button as fast as I could after the LED began to flash, it would upload every time.

I see there is now an R3 board. Mine is an R2. Can anyone confirm that R3 does not have this problem?

I have the same problem with the Mega2560 R3. The only way I can get a sketch to upload is on the very first load of IDE and sketch if I click upload imediately. If I wait too long after the intial start of the IDE or do an edit after the intial successful upload and try another upload, it hangs at "UPLOADING" indefinitely. Close the IDE, restart IDE and sketch and quickly click upload and I get one successful upload again. I too sometimes can get an upload to work after rapid manual resets once stuck, but even that is not reliable. This happens with any example sketch I upload and once I get the first upload to work the sketches run fine.

I have been reading many posts on this seemingly same problem and except for those with the "!!!", Com port selection or driver missing, this appears to be a real either H/W timing or S/W problem. Any suggestions from the long experienced Arduino and IDE contributors would help many of us out...

Thanks in advance!

atheis:
I have the same problem with the Mega2560 R3.
<>
I have been reading many posts on this seemingly same problem and except for those with the "!!!", Com port selection or driver missing, this appears to be a real either H/W timing or S/W problem. Any suggestions from the long experienced Arduino and IDE contributors would help many of us out...

That is disappointing and I suspect you are right based on my experience. My guess is that there is somebody out there that could help with this, but the number of users of the Mega2560 is so small compared to the Uno that it just doesn't seem important enough or even noticed.

Right now, I have two different projects that require the Mega2560 for either the expanded digitals or additional serial ports which will be going into a high profile museum. After multiple successful uploads by using the timing method I described, I feel somewhat confident I can get the job done, but I worry about long term maintenance if any updating has to be done.

See this earlier thread, it may help with the issues you are seeing:

Here is a link to the relevant post on the Arduino developers forum that explains the issue:
http://mail.arduino.cc/pipermail/developers_arduino.cc/2011-December/006095.html

Thanks Louis,

I will give replacing the 1.0.1 avrdude.exe and avrdude.conf files with those from 0023 a try. The thread issue and solution you referred us to makes a lot of sense to me. Since my first exposure to Aduino is with the Mega2560 and 1.0 IDE, I had no previous experience reference. I hope to give this a try today after work and will let you know my results.

Thanks for the pointer as I missed that one in my searching.

:smiley: YES! The simple status line "avrdude done. Thank you." never looked so good!

Louis, I can't thank you enough. Reversion back to the older avrdude files fixed me right up. I can upload sketches to my Mega2560 at will now with the 1.0.1 IDE. You saved me countless hours and frustration with your point to that thread.

Now I can get on with teaching my son for his Boy Scout Robot Merit Badge. Maybe I can help someone with a different issue one day.

not worked for me... blink and all works, but large sketch doesent...

Hello
Another posibility is this: New Mega 2560 can't upload Sketches,Time out errors!!!!!! - #2 by Alfaville - IDE 1.x - Arduino Forum

still not working