upload issues with mega 2650, bootloader is timing out...

Everyone,
By looking at the source to avrdude, I was able to fix my upload issue. I made it do the reset like what is done in arduino.c. This fixed all my upload issues. My theory is that the reset is done by the gui, then it loads avrdude. But, if too much time elapses, the bootloader has moved on. I also reset the serial timeout, and retries to the values from 5.4-arduino. Between these changes, my upload is now much more solid.

Here is my patch on avrdude-5.11.1/stk500v2.c

73c73
< #define SERIAL_TIMEOUT 2

#define SERIAL_TIMEOUT 5
76c76
< #define RETRIES 5


#define RETRIES 33
1317a1318,1325

printf("trying this reset stuff now..\n");
usleep(50*1000);

serial_set_dtr_rts(&pgm->fd, 1);
usleep(501000);
serial_set_dtr_rts(&pgm->fd, 0);
usleep(50
1000);

JesseJay

Thought I'd bump this. The above patch to AVRDUDE 5.11.1 fixed all my upload issues on my mega2650. Anyone else willing to try it out? What does it take to submit a real bug report?

I rebuilt avrdude with the above patch and can report that it didn't fix the issue for me. I'm using a Mac, OSX 10.6.8.

I'm also having problems with my board timing out. Would it be possible for you to walk me through how you went about doing this?

Thanks a lot,