Arduino v1.0.1 not compatible with some Shields

OK, I have mentioned this before, but I decided to elevate it to its own thread. so here goes:

I believe that there is a problem in the v1.0.1 Arduino code that prevents it from working with some shields. While I have been able to find some anecdotal evidence of several different shields having issues, internet reports are often sketchy and vague, so I am not sure it is a widespread problem or not. However, in particular, the popular RAMPS shield from the RepRap 3D printer world does have issues. Using Arduino v1.0 or v1.0.1 with a Mega 2560 and the RAMPS shield will cause the compiler to compile just fine but fail to ever complete the upload.

So, here is the setup I have: Arduino Mega 2560, RAMPS v1.4, Windows Vista Home 64. If I try to program the Mega 2560 without the shield on, it will work fine with any version of Arduino environment (v.0.22, v0.23, v1.0, v1.0.1). I can compile either something simple like Blink or complex and it will compile and upload quickly. Put the shield on and everything works fine in the 0.22 or 0.23 environments, but stalls before completing upload with either v1.0 or 1.0.1, again with either Blink or something more complex.

This seems like a pretty serious problem to me, so I thought I would elevate it to have those more knowledgeable than I work on solving it. For the moment, I will just stick with the older Arduino environment.

Here is the verbose output from the system when it tries to upload.

Binary sketch size: 1,632 bytes (of a 258,048 byte maximum)
C:\Users\Paul\Documents\Arduino\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\Users\Paul\Documents\Arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P\\.\COM15 -b115200 -D -Uflash:w:C:\Users\Paul\AppData\Local\Temp\build7138735795154356900.tmp\Blink.cpp.hex:i 

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Users\Paul\Documents\Arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM15
         Using Programmer              : stk500v2
         Overriding Baud Rate          : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]

This seems like a pretty serious problem to me

One that appears to have a pretty simple workaround. Remove the shield first.

Why are you using COM15? Using such a high com port can be a problem in itself.

The problem is most likely that the RAMPS shield is interfering with the reset.

OK, yes, I can unplug the shield each time I want to upload a sketch, but that is cumbersome and against the main idea of the simplicty of Arduino...

I tried changing the Com port to Com 6. Same result.

Also, I think it is telling that this problem ONLY occurs with the newer environment, not the older 22 or 23 ones. So,I think something should be fixed in the environment rather than making a bunch of existing shields not be usable!

Do you have the “reset fix” (a diode) installed? IIRC, that was triggered by having certain other connections. (Though I can’t think why it would be version specific.)

I would perform a test using a manual reset for uploading rather then relying on the auto-reset feature. So mount the shield and then press and hold the reset button on, and then hit upload. Release the reset button the second the compiler reports the sketch size. Let us know if that changes the symptom.

Lefty

Well, that does the trick. If you are very careful about when you releae the reset button then it will successfully upload a sketch that way. Since this is not a practical solution for out in the field, is there a way to fix this behavior so that it works reliably?

PogCarr: Well, that does the trick. If you are very careful about when you releae the reset button then it will successfully upload a sketch that way. Since this is not a practical solution for out in the field, is there a way to fix this behavior so that it works reliably?

Well first thing I would do is to review the schematic drawing of the shield board to see if it has any connection to the arduino reset pin and if so what components it might have wired to the reset circuit. Do you have a link to such a drawing? Alternately you might just try the 'diode' fix, it might be worth the effort, just temporarily wire a diode (just plug the wires into shield pins if the shield board has female header pins) from +5vdc to the reset pin, with the cathode end wired to the +5v pin.

Lefty