Go Down

Topic: Sketches Not Uploading To Mega (Read 4098 times) previous topic - next topic

Dante12129

Jan 02, 2012, 09:10 am Last Edit: Jan 02, 2012, 09:22 am by Dante12129 Reason: 1
I bought a Mega 2560 R3 from Radioshack a few days ago. I tried it on one computer, and it woldn't upload any sketches. On my second computer, it was able to upload Blink but when I tried the AnalogReadSerial, DigitalReadSerial, and BareMinimum, it wouldn't work. I did the loopback test and that worked fine. I am using XP. Here is my error code:

Binary sketch size: 678 bytes (of a 258048 byte maximum)
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x10
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x11
avrdude: stk500v2_disable(): failed to leave programming mode


Mozart

I am able to get sketches uploaded, however, I am unable to use avrdude to upload anything to the ATmega 2560.  It seems like a lot of people are having this same issue, however, there does not appear to be a consistent solution.

Dante12129

Would it be safe to try using the "Upload Using Programmer" option? What is the difference?

ajofscott

If the Mega is installed in windows correctly it posts as a com port in the device manager under ports com/lpt. Windows 7 users will have to download the divers from arduino.cc and then manually browse the arduino-1.0\drivers directory from the device manager update driver utility. The unistalled mega will be listed as an unknown device on USBxx where xx is the hub's logical port.

Mozart

I am currently running Windows XP.  The com port does show up in
<Control Panel>-><System>-><Hardware>-><Device Manager>-><Ports (Com & Lpt)>-><Arduino Mega 2560 R3 (Com4)>

I have tried all of the Reset advice provided in the documented solution (i.e. hold the button down and run run avrdude) but still the best I can get is the Timeout() error.  Is there some other piece of information that I can provide to assist in debugging this?

Mozart

I thought this might help, let me know if anyone needs more:

avrdude -F -v -pm2560 -cstk500v2 -P\\.\COM4 -b19200 -D -Uflash:w:"C:\Documents and Settings\Mozart\My Documents\Arduino Test Project\MEGA_GPIO_EXAMPLE1\MEGA_GPIO_EXAMPLE1\Debug\MEGA_GPIO_EXAMPLE1.hex":i

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Arduino\arduino-1.0\hardware\tool
s\avr\bin\avrdude.conf"

         Using Port                    : \\.\COM4
         Using Programmer              : stk500v2
         Overriding Baud Rate          : 19200
avrdude: stk500v2_ReceiveMessage(): timeout

Dante12129

Hpw did you get that? And can we try to fix my problem?

Dante12129

I'm going to get a replacement but it wouls still have been nice to be able to fix it.

Mozart

Sorry Dante, didn't mean to hijack the thread.  I thought you were experiencing the same issue as I was.  I will open a new thread.  I hope you figure this thing out...I hope I figure mine out too.

ajofscott

The serial monitor ties up the com port just as an upload would, make sure no serial monitors are open, go to com4's properties and click advanced, set a port spec above com10. Select the applicable port in the ports menu in the arduino ide  tools....Serial Ports

Dante12129

My new board is working fine now.

Dante12129

#12
Jan 07, 2012, 02:23 am Last Edit: Jan 07, 2012, 02:34 am by Dante12129 Reason: 1
Well I was able tp upload fine to it yesterday and now this one isn't working either. The last program I uploaded was the one for a PING, and it will still send the measurements from it back over serial. I've tried changing the COM number and that won't work. When I uploades ysterday, the TX/RX both blinked very rapidly but now they both blink every seconds. It's the same error as last time.

Edit: Now the onboard LED and TX are both permanetly on.

ajofscott

what external devices are connected to this board?

Dante12129

I've tried it with both ping hooked up and with nothing hooked up.

Go Up