Go Down

Topic: [solved]Flashing Arduino 2560 with AVRdude and Eclipse (Read 697 times) previous topic - next topic

chrisliebaer

Nov 22, 2011, 07:48 pm Last Edit: Nov 23, 2011, 12:01 am by chrisliebaer Reason: 1
Hey guys,

I've just received my Arduino 2560 and want to try a simple testprogramm. I've configured Eclipse already so it creates my hex Files.

The Problem is the following:
Flashing an Sketch with the Arduino IDE works very well but I dont get it working with Eclipse. I've configured it to call the following command line
Quote
Launching C:\dev\avr\win-avr\bin\avrdude -pm2560 -cstk500v2 "-P\\.\COM3" -b115200 -Uflash:w:FirstTest.hex:a


But this will always result in:
Quote
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude execution aborted


Of course I could also post the whole config but I think those avrdude specialists out there dont need any more information to tell me what I've to fix.

Thanks in advance
Chris

James C4S

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

chrisliebaer

Yes I've tried nearly everthing that sounds possible. But I'm quite sure that stk500v2 is right as it also appears in the boards.txt

chrisliebaer

#3
Nov 22, 2011, 11:33 pm Last Edit: Nov 23, 2011, 12:01 am by chrisliebaer Reason: 1
Okay seems I found the problem.
As far as I understood the bootloader it is a tiny process, which waits just a few seconds after initialization for a special "signal" from avrdude. If it doesn't receive sucht a signal it will jump to main function of sketches.

To get this working the avrdude has to reset the ┬ÁC and immediatly begin with communication. This reset never occurs if I use the comandline above. If I press reset while hitting return to trigger avrdude it will work nearly 100% (the others is maybe because I'm to slow).

Sadly this information was hidden behind completly useless phrases. I've edited it so that you will find the solution if you run into this problem.
http://arduino.cc/playground/Code/Eclipse

Thanks for helping

Chris

Go Up