queezythegreat/arduino-cmake — Issue #27: make upload timeout with mega2560
Author: mark0x52
Created: 2012-02-11 09:13:07+00:00
State: open

avrdude times out on when I call make ${name}-upload. I get the following messages over and over again:

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

However, I do not get this problem when uploading from the Arduino SDK. I am able to upload immediately.

Turns out, I can get the upload to work if I push the reset button and then command the upload within a very short period. After some research on arduino's forums, it looks like this may have to do with not having a DTR pulse (or not have the correct pulse width). Is there a way to fix this without having to manually reset (like the Arduino SDK)?

I am using a mega2560- Specifically an Ardupilot with a sensor shield (IMU Shield).