Go Down

Topic: Upload Timeout Error on Mega 2560 - Not Sure What Changed (Read 59 times) previous topic - next topic

jessejay356

A lot of people seem to be having problems with the new version, including me.  *sigh*  Hopefully they figure it out..

jessejay356

Guys.   I used the avrdude.exe and avrdude.conf file from 022 and it worked fine for me.  There seems to be a bug in avrdude 5.11 that is causing some of these issues. 

jessejay356

#17
Jan 20, 2012, 04:49 am Last Edit: Jan 20, 2012, 04:54 am by jessejay356 Reason: 1
I believe I have found a fix.  But I had to compile an new avrdude.exe.  Here is a patch for 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(50*1000);
>   serial_set_dtr_rts(&pgm->fd, 0);
>   usleep(50*1000);


ahmadzein

where did you find this file ?? do i just add these?

jessejay356

AVRDUDE 5.11.1 can be found at http://download.savannah.gnu.org/releases/avrdude/

I provided a patch that can be applied to the file I mentioned.  But you need to apply the patch and recompile avrdude for it to work.   But my upload success rate went from 40% to 100%.   The code now matches more closely the way the old version worked.  It's a pain.  The arduino people should recognize there is a problem, and fix it.

JesseJay

Go Up