Mega 2560 - Can't upload sketch

Got a couple of these but can't upload anything.

avrdude: stk500_2_ReceiveMessage(): timeout

My old Mega 1280 and all other boards work just fine.

Any clues?

Thanks!

g

I made a similar post and also no information or replies. Seems strange! Did you get any further? :frowning:

Problem is this board is so new, there isn't a lot of experience with it.

I have the same problem. Help can't upload anything >:(

Sorry, I don't own a Mega or an Uno, but I figured I'd throw some ideas out there.

What IDE version you guys running? I think v21 is made for the newer boards.
Is the correct board selected in the IDE?
Also, there has to be new drivers for the new type of boards. Were the new drivers installed?
I don't know if they simulate a com ports now, but you might want to check if the com settings are correct if they do.

Good luck...
Dave

I have the same problem with New Mega2560 board on a MAC. It recognizes the USB modem but cant upload the sketch. Same message as above! I have the new version 021.

Any fixes

Regards

Nandana

Yes, running version 021, proper board selected, proper serial device selected, nothing obviously dumb like that. There are no need for drivers (I don't use Windows), it is automatically recognized as a "modem". I've posted this on Sparkfun's forum as well. No resolution as of yet. I haven't had the time to debug avrdude. I will probably spend some time with it this weekend.

I wrote the bootloader in the 2560 so hopefully I can help.

I know you said you picked the right board but make sure you pick Mega2560 and not mega 1280.

If that doesnt work, you can open up a serial port at 115200 and type in "!!!" to see if you can talk to the built in monitor.

For more info on the monitor check out http://www.arduino-avr.com/bootloaderdocs/index.html

If you still dont get anywhere, send me more details.

Mark

Hello Mark,

I' quite desperate. I'm facing simillar issue to the one described on the top. I have Mega2560, cose size~15k and falsh upload get stuck in the middle of the process. Using verbose mode I get the the point where lot of Recv: messages are comming up and some
"stk500_2_ReceiveMessage(): timeout" in between. That is it. I checked yout the bootloader stuff you described. I get the CLI, everything seems to be ok. I get te FLASH, EEPROM, RAM content, bink, etc... I digged quite a lot in this issue of mine and found 2 wierd things.

  1. If I keep the key F donw in the bootloader CLI, it get stuck after a coule of dump pages are shown and have to reset to make arduino responsive. (addresses I reached using Flash dump and keeping F key down: 1ff0,17f0,1ff0, etc...) I'm mentioning this just becouse for me this process is very smilillar to the falshing(fast access tot he FLASH memeory over seral port). Also the LED "L" is lid the same as if the flash upload process is stuck
  2. In my case, I have a code that is using Ether board, serial RFID reader, buzzer and LED. VERY wierd thing is that If I comment out one line in the code, the upload succeed. If I try to replace the line with simillar code doing the same stuff, it's stuck again. I just dont get it.

Base on this i dont think it is a size related. If you can, try to flash the project of mine with/without the line commented out. I'm a C newbie, sorry for the messed up code. There is nothing connected to the board during the flashing, only USB. I'm using WIN XP SP2, Arduino 0021. Mega2560 is selected, correct COM port is used(I see the LEDS bilnking :slight_smile: ).Bords were purchased 2 days ago in Germany.

The code I'm using is: http://www.safar.info/HTTP.pde Compilation goes just fine.

See the bootloader info:

Bootloader>? CPU stats
Arduino explorer stk500V2 by MLS
Compiled on  = Sep  9 2010
CPU Type     = ATmega2560
__AVR_ARCH__ = 6
GCC Version  = 4.3.3
AVR LibC Ver = 1.6.7
CPU signature= 1E9801
Low fuse     = FF
High fuse    = D0
Ext fuse     = FD
Lock fuse    = CF

Please help or advice what to try. Thanks!

Vit

I have selected the board correctly, and serial port selected as dev/tty.usbmodem1d11 But when I try to upload the sketch nothing happens for about 30 seconds and get the message "dude: stk500_2_ReceiveMessage(): timeout" and this continue to be displayed several lines.

LED 13 continue to blink at about 1 sec interval.
I have used the old Mega boards and Dem boards without any problem!

On mac USB device list in the system profile it is recognized as Arduino mega 2560.

Please help

Hi I am still unable to upload a sketch to my new Mega2560 board. Could this be a defective board. Should I try to get another board. As I said earlier all my previous Mega boards are working fine.

Very grateful if somebody could point to a solution.

Regards

Nandana

Yes, I have it set as "MEGA 2560" for the board type. Note that I ordered two of them and they both show the same behavior (as the other ones in this thread).

If I connect directly with a terminal at 115200, I get no response to any command. However, once in a while the board sends some binary gobbledygook:

ffx~xxxx`xfxxx~x

g

Can you guys hold down "shift" while pressing the upload button in the toolbar and paste the output you get?

Hola Mellis, este es el reporte que me da el programa, espero me puedas ayudar para poner a funcionar mi arduino Mega. :frowning:

Binary sketch size: 1542 bytes (of a 258048 byte maximum)
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P/dev/tty.usbmodem621 -b115200 -D -Uflash:w:/var/folders/HK/HKg2YHJaGcuMk0Dhq2qVw++++TI/-Tmp-/build8798648030248448959.tmp/Blink.cpp.hex:i 

avrdude: Version 5.4-arduino, compiled on Oct  9 2007 at 11:20:31
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/ANDRESM/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port            : /dev/tty.usbmodem621
         Using Programmer      : stk500v2
         Overriding Baud Rate  : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]

I also got the problem with exact error log which Ozonic gets.

Same for me for both boards...

g

somebody who come up with an elegant solution would be very appreciated.

Hello guys,

I have a sketch at about 13000bytes and I am trying to upload it to Arduino Mega 2560. The uploading procedure begins normally (the Tx Rx leds start blinking like crazy :P) but it suddenly stops and the uploading procedure seems to stuck. No error report though.

Holding down shift while pressing the upload button gives me :

.
.
.
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] ? [3f] . [00] . [01] . [0e] . [01] * [2a] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv:
.
.
.

This report is shown when the leds Tx Rx stop blinking.

I have also uploaded the same sketch (13000 bytes) to an Arduino Duemilanove with no problem.

I have uploaded the examples sketches normally to the Arduino Mega with no problem though.

Does anyone have a suggestion or a solution to this? I cant explain why this happens!

To make sure I had the same version as everyone else I just downloaded a new copy of 0021 from the web site.

I run on MacOSX V10.6.4

Using a 2 week old Mega2560 board, it works fine with 23K program

The only thing I can think of is baudrate errors on the PC.

Binary sketch size: 23628 bytes (of a 258048 byte maximum)


avrdude: Version 5.4-arduino, compiled on Oct  9 2007 at 11:20:31
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/msproul/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port            : /dev/tty.usbmodem1a231
         Using Programmer      : stk500v2
         Overriding Baud Rate  : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: . [00]

I didn't get a time out error but I couldn't upload the sketch. I found reinstalling the drivers fixed my probblem:
http://forums.adafruit.com/viewtopic.php?f=25&t=17769

Maybe it will work for you.