Eclipse programming

Hello to everyone;
I have a little problem with my MEGA2560.
I'm trying to use external IDE's to program the I/O board, rather than Arduino IDE. Currently I'm working with Eclipse,
and I am unavailable to send my program to the board.
This is what I get after trying to program with eclipse and avr plugin.

Launching C:\WinAVR-20100110\bin\avrdude -pm2560 -carduino -PCOM15 -b115200 -Uflash:w:dd.hex:a 
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.

avrdude finished

I know that port is OK because MEGA2560 flashes its LEDs a few times.


I also had this issue. I can upload no problem with the Arduino IDE but couldn't with avrdude from eclipse or the command line!
I tried all the reset tricks and that used to work for me but alas no longer.

So I used the sysinternals tool procmon to find the command the IDE was using.
When I found it I tried the exact same command and that also failed :frowning:

But this was good as then I figured the IDE must be doing some tricks before calling avrdude.
So I downloaded the latest code and found it does in fact do some magic before calling avrdude!

The code is in the IDE's AvrdudeUploader class in the method flushSerialBuffer.
I simply extracted the functionality into a simple command line java app.
However you MUST call the avrdude command immediately after this or it WILL fail...

It works perfectly now :slight_smile:

If anyone is interested in help with this please reply to me.
I am probably going to modify avrdude to do this "magic" and contribute it back when I get time.