Skip to content

Option/button to cancel avrdude when successful sync does not happen #1292

Closed as not planned
@InstantMuffin

Description

@InstantMuffin

Describe the request

For numerous reasons it can happen that avrdude is unable to sync with the MCU, thus being unable to upload the sketch.

I would love to have an option to kill avrdude from within the IDE whenever this happens.

Describe the current behavior

When this happens one of two cases occurs:

  1. avrdude does 10 retries which all happen very quickly.
  2. avrdude does 10 retries with timeouts, which happens very slowly (30 seconds and up if I would guess).

In the latter one the avrdude process stalls any upload retry you want to do.
For example you are uploading a sketch and you noticed you wired up the MCU incorrectly. You correct that mistake in a few seconds, but can't start another upload until the 10 retries all failed. This can currently only be circumvented by killing the avrdude process manually.

Also avrdude still runs in this state when the device has been unplugged (and therefore it would definitely be safe to kill it).

I would love one or both of these proposed solutions to be implemented:

  1. Clicking "Upload" again cancels an avrdude process and restarts the entire procedure.
  2. A "Cancel upload" button that appears.
  3. Configuring avrdude's retry count (and maybe timeout) using the IDE (safe option).

Now, I understand why this might not have been implemented, and that reason may be that if the actual upload is going (well) and you cancel it, you might brick your device.
I propose three barriers for this:

  1. Only allow for this to happen when avrdude's output clearly indicates a stall (and maybe wait a few seconds to be sure)
  2. Make this ability a non-default option that the user has to activate with the user being informed of the possible risks.
  3. Proposed solution 3) from above.

Arduino IDE version

2.0rc-9.1 and nightly

Operating system

Linux

Operating system version

XUbuntu 22.04 LTS

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions