Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle board change while compiling & uploading #6035

Open
PaulStoffregen opened this issue Mar 3, 2017 · 5 comments
Open

Handle board change while compiling & uploading #6035

PaulStoffregen opened this issue Mar 3, 2017 · 5 comments
Assignees
Labels
Component: IDE user interface The Arduino IDE's user interface Component: Uploading Uploading programs to an Arduino board in progress Work on this item is in progress Type: Bug
Milestone

Comments

@PaulStoffregen
Copy link
Contributor

PaulStoffregen commented Mar 3, 2017

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.

@PaulStoffregen
Copy link
Contributor Author

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
Copy link
Collaborator

per1234 commented Mar 3, 2017

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.

facchinm added a commit to facchinm/Arduino that referenced this issue Mar 22, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes arduino#6035
@facchinm facchinm added this to the Release 1.8.3 milestone Mar 22, 2017
@ghost ghost assigned facchinm Mar 22, 2017
@ghost ghost added the in progress Work on this item is in progress label Mar 22, 2017
@PaulStoffregen
Copy link
Contributor Author

Opps, sorry, errant clicking on the milestone info.

@facchinm
Copy link
Member

No prob 😉

@PaulStoffregen
Copy link
Contributor Author

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

@cmaglie cmaglie modified the milestones: Release 1.8.3, Next Jul 18, 2017
facchinm added a commit that referenced this issue Oct 11, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Oct 16, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit to facchinm/Arduino that referenced this issue Oct 18, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes arduino#6035
cmaglie pushed a commit that referenced this issue Oct 23, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
cmaglie pushed a commit that referenced this issue Oct 30, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Nov 10, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Nov 15, 2017
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jan 11, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit to facchinm/Arduino that referenced this issue Jan 22, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes arduino#6035
facchinm added a commit that referenced this issue Feb 16, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Apr 12, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jul 19, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Aug 20, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Aug 23, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Sep 10, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Oct 5, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Oct 16, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Nov 21, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Dec 5, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Dec 13, 2018
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jan 18, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jan 19, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jan 21, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Mar 7, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Mar 8, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Mar 18, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue May 14, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue May 14, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jul 18, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jul 18, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jul 19, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Jul 23, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Sep 20, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Sep 30, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Oct 22, 2019
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Feb 13, 2020
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Mar 23, 2020
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
facchinm added a commit that referenced this issue Apr 7, 2020
By threading the boardChange callback we can busy wait until
the compilation/upload phase has ended and change the board when done.

Fixes #6035
@per1234 per1234 added Component: IDE user interface The Arduino IDE's user interface Type: Bug Component: Uploading Uploading programs to an Arduino board labels Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface Component: Uploading Uploading programs to an Arduino board in progress Work on this item is in progress Type: Bug
Projects
None yet
Development

No branches or pull requests

4 participants