Is there a way to stop AVRDUDE retrying to upload?

I'm using V2-RC9 and am very happy.

My question:

Is it possible to stop AvrDude from trying to upload when communication isn't correct?

I periodically forget to set the COM port. So once I start the upload I immediately realize the comport is wrong. Is there a way to stop the repeated attempts at uploading? (short of closing the IDE).

Hi @JohnRob. I'm glad you are enjoying Arduino IDE 2.0.0-rc9.

There is not currently any way to cancel the upload process via the Arduino IDE interface. There is a request for it here:

I think there is some relevant information on the subject here in the previous request for such a capability in Arduino IDE 1.x:

I think most of us have experience quite some annoyance from the way AVRDUDE retries the upload over and over and over again. I don't recall a single time when this behavior was actually useful. In my experience, the upload works on the first try, or not at all.

I spent some time hunting through the AVRDUDE documentation to see if there was a way to configure the number of attempts, but found there was none (short of modifying the source code). Fortunately, things have changed since then. MCUdude (forum member hansibull) has made yet another valuable contribution by adding such a capability to AVRDUDE:

This is in the AVRDUDE 7.0 release, but the official Arduino boards platforms (and likely most of the 3rd party ones as well) are still using AVRDUDE 6.3.0. In theory you should be able to update the AVRDUDE version in use by your boards platform and then add the -x attempts=1 flag to the upload command in boards.txt of the AVR boards platforms you are using to impose sensible behavior on the tool.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.