Go Down

Topic: Arduino Mega2560 can't be programmed via USB (Read 11796 times) previous topic - next topic

Ragnar

Jul 19, 2012, 10:33 pm Last Edit: Jul 19, 2012, 10:51 pm by Ragnar Reason: 1
I received my new Arduino Mega2560 (already have had Uno R3 and Mega 1280). Problem is with programming. I just can't program it.
I have no problems programming my Uno or 1280. I also tried programming 2560 with Uno as ISP, but not working. I used the same method for Attiny85 and it works so Uno is working as a programmer.
I use OSX 10.7, Arduino 1.0.1
Errors I get:
Code: [Select]
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

What to do?

Louis Davis

Take a look at this issue: http://code.google.com/p/arduino/issues/detail?id=806

Edit your boards.txt file and change
From:
mega2560.upload.protocol=stk500v2

To:
mega2560.upload.protocol=wiring

Ragnar

#2
Jul 19, 2012, 11:41 pm Last Edit: Jul 19, 2012, 11:42 pm by Ragnar Reason: 1
No, nothing. RX LED only blinks 1 time and keeps giving same error.
Same thing with Arduino 0023
Binary sketch size: 6,198 bytes (of a 258,048 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_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout

Louis Davis

Select Show verbose output during upload in Arduino preferences.

Post back with the upload output and maybe that will give us an idea of what might be happening.

magic_smoke

Quote
Take a look at this issue: http://code.google.com/p/arduino/issues/detail?id=806

Edit your boards.txt file and change
From:
mega2560.upload.protocol=stk500v2

To:
mega2560.upload.protocol=wiring


@ Louis Davis

Thanks very much for this solution, my Arduino 2560 (early version) on XP Home Edition just stopped uploading and hanging. Com port was still in the tools menu, and serial monitor was still working but no uploading.

thanks again, been driving me nuts for ages

Zed's dead baby, Zed's dead

tothmane

hello,

i have a similar issue with my brand new mega 2560 rev3. i start uploading then i have this message :

avrdude: stk500v2_getsync(): can't communicate with device: resp=0x01

avrdude done.  Thank you.


when i take a look at my arduino board, i can clearly see that my program is not working, so i'm pretty

sure that the program haven't been uploaded right.

Please can i get some help ?

ah i forgot, i changed the "wiring" setting written above , but nothing :s

thanks you a lot !

mastermushi

#6
Dec 08, 2012, 01:47 pm Last Edit: Dec 08, 2012, 01:52 pm by mastermushi Reason: 1
Hello everyone!

I have just solved the programming issue thanks to this thread and want to share the experience.
Google does not have exact steps for the solution so I have decided to continue this conversation

In all "out of the box" arduino IDE I had the following error messages for Mega2560 board

Can't find programmer id "wiring"

But thanks to clever people above, I have found what to do.

1) Open boards.txt and find
mega2560.upload.protocol=wiring

2) Replace this string with
mega2560.upload.protocol=stk500v2

3) Save the file and restart IDE

4) In main menu Tools->Programmer please change AVR ISP MKII to AVR ISP

5) Program your sketches fellas!!!

I'm having the same problem.  I received my Mega2560 2 days ago. Until this afternoon, everything was working fine. Suddenly the same code that was uploading wouldn't upload any longer. I hadn't changed anything. I've read a bunch of threads, tried changing the AVRDUDE.EXE to an older version that someone posted on a different site, modified the boards.txt file to "wiring" as indicated here, tried using the ISP programmer vs the ISP mkII programmer and vice-versa- nothing works.  I can't upload any programs. They all do this same thing. Very strange since it was working just fine earlier...

Here's an output from my verbose upload after I reverted everything back to the original EXCEPT I kept the "wiring" setting in the boards.txt:

Binary sketch size: 3,496 bytes (of a 258,048 byte maximum)
C:\Users\Cameron\Desktop\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\Users\Cameron\Desktop\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cwiring -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\Cameron\AppData\Local\Temp\build1215771844599652454.tmp\MegaTEST.cpp.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:\Users\Cameron\Desktop\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM5
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]

Any thoughts?
Thanks,
Cameron

#8
Mar 25, 2013, 09:37 pm Last Edit: Mar 25, 2013, 09:41 pm by ubuntu_user Reason: 1
The same issue with my Mega2560. Reproduced with IDE 1.0.1 and 1.0.4.
I'm disappointed. It seems Arduino is NOT so user-friendly as people say.
Too much headache for too much money... It is more convenient now to buy Raspberry Pi with ADC chip if needed.

Here is my boot log:

Code: [Select]
/home/user/bin/arduino-1.0.4/hardware/tools/avrdude -C/home/user/bin/arduino-1.0.4/hardware/tools/avrdude.conf -v -v -v -v -patmega2560 -cwiring -P/dev/ttyACM12 -b57600 -D -Uflash:w:/tmp/build7626980947593966222.tmp/TempMonDS18B20.cpp.hex:i

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

        System wide configuration file is "/home/user/bin/arduino-1.0.4/hardware/tools/avrdude.conf"
        User configuration file is "/home/user/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : /dev/ttyACM12
        Using Programmer              : wiring
        Overriding Baud Rate          : 57600
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

retrolefty

Quote
The same issue with my Mega2560. Reproduced with IDE 1.0.1 and 1.0.4.
I'm disappointed. It seems Arduino is NOT so user-friendly as people say.


Correct PC usb driver installed?
Correct comm port selected in IDE menu?
Does the PC acknowledge the USB connection when you plug the board in?

Lefty

Louis Davis

Can you post the sketch that you are trying to upload?

Make sure you don't have three or more exclamations points in a row "!!!", the bootloader will interpret that as an escape sequence and enter a special mode.

Driver is correct. I've tried both in Windows 7 and Ubuntu 12.04.
Port is correct: it can upload small sketch "TimeSetRTC" which is DS1307 example. But my sketch doesn't.
In log file you can see PC recognized port as /dev/ttyACM12.


Can you post the sketch that you are trying to upload?

Make sure you don't have three or more exclamations points in a row "!!!", the bootloader will interpret that as an escape sequence and enter a special mode.

It seems some kind of black magic!!! There is no any warnings in user's manual about limitations on "!!!" symbols!!!
It was my case anyway. Thanks for advice.

borcabar

Thanks Louis Davis, The triple sign !!! was my problem too.


Hello everyone!

I have just solved the programming issue thanks to this thread and want to share the experience.
Google does not have exact steps for the solution so I have decided to continue this conversation

In all "out of the box" arduino IDE I had the following error messages for Mega2560 board

Can't find programmer id "wiring"

But thanks to clever people above, I have found what to do.

1) Open boards.txt and find
mega2560.upload.protocol=wiring

2) Replace this string with
mega2560.upload.protocol=stk500v2

3) Save the file and restart IDE

4) In main menu Tools->Programmer please change AVR ISP MKII to AVR ISP

5) Program your sketches fellas!!!


Thanks!! I just got a Mega2560 r3 and I thought it was defective. I am using v1.0.5 and it has been working great on my UNO r3. Now it works great on my new Mega! One thing I noticed is that once I changed the upload protocol from wiring to stk500v2, it works on either AVR ISP or AVR ISP MKII.

Go Up