Add board autodetection on upload #1581
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Adds a new feature.
The user must always provide an FQBN when trying to upload either with the
compile
orupload
commands.Example:
arduino-cli upload -p /dev/ttyACM1 -b arduino:avr:uno
arduino-cli compile -u -p /dev/ttyACM1 -b arduino:avr:uno
What is the new behavior?
The user can now upload to a port without specifying an FQBN, if there is no ambiguity in the list of detected boards by the discoveries the commands will be successful. If the
arduino-cli
can't understand with 100% certainty which board is connected to the specified port the commands will exit with an error and let the user know that an FQBN must be provided.Example commands:
arduino-cli upload -p /dev/ttyACM1
arduino-cli compile -u -p /dev/ttyACM1
Successful detection:
In case multiple boards are detected an error is returned telling the user to specify the FQBN:
This also affects the gRPC consumers.
titled accordingly?
Nope.
New fields have been added to existing gRPC messages so consumers will need to regenerate the source files from the
.proto
but there is no breaking change.Closes #1357.
To test this you'll have to connect a board to your PC and run the
test_upload.py
integration tests since upload tests are not run on CI.See how to contribute