Skip to content

Handle board change while compiling & uploading #6035

Open
@PaulStoffregen

Description

@PaulStoffregen

The IDE allows users to change the board while compiling.

If the user clicked Upload, after the code is fully compiled for the old board, upload is started using the new board setting and an incompatible HEX file compiled for the old board. For example, code compiled for Arduino Uno can be uploaded to Arduino Due (if a Due is actually connected at the selected serial port).

This problem much easier to reproduce on slower Windows computers, where the compile process takes enough time for the user to change settings while the builder is still running.

Activity

PaulStoffregen

PaulStoffregen commented on Mar 3, 2017

@PaulStoffregen
SponsorContributorAuthor

Perhaps changing the setting could abort compiling?

Or maybe compiling could finish normally, but if settings have changed while compiling, simply don't upload?

per1234

per1234 commented on Mar 3, 2017

@per1234
Collaborator

You can "brick" an ATmega32U4 based board by starting the upload with Uno, etc. selected in the Tools > Board menu, then changing to the correct board selection before the upload begins. I've actually done this. It was easy enough for me to fix but not so much for a beginner.

I think the best solution would be to upload to the board that was selected when the upload button was pressed, rather than the board that is selected at the time the upload starts.

Another option would be to disable the Tools > Board and custom tools menus until the upload completes.

added a commit that references this issue on Mar 22, 2017
9da24d1
added this to the Release 1.8.3 milestone on Mar 22, 2017
ghost added
in progressWork on this item is in progress
on Mar 22, 2017
PaulStoffregen

PaulStoffregen commented on Mar 22, 2017

@PaulStoffregen
SponsorContributorAuthor

Opps, sorry, errant clicking on the milestone info.

facchinm

facchinm commented on Mar 22, 2017

@facchinm
Member

No prob 😉

PaulStoffregen

PaulStoffregen commented on Mar 22, 2017

@PaulStoffregen
SponsorContributorAuthor

Looks like you're getting ready to release 1.8.2, right?

removed this from the Release 1.8.3 milestone on Jul 18, 2017

55 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Handle board change while compiling & uploading · Issue #6035 · arduino/Arduino