Pages: [1]   Go Down
Author Topic: Arduino Mega2560 can't be programmed via USB  (Read 10504 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 147
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
What to do?
« Last Edit: July 19, 2012, 03:51:31 pm by Ragnar » Logged

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 147
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 19, 2012, 04:42:49 pm by Ragnar » Logged

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Aotearoa
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Zed's dead baby, Zed's dead

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Ukraine
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Yes we can do it!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!!
« Last Edit: December 08, 2012, 07:52:18 am by mastermushi » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
/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.
« Last Edit: March 25, 2013, 03:41:47 pm by ubuntu_user » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

southamerica
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: