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

Better detection of required serial port during upload. #1398

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Aug 13, 2021

Previously we checked the upload recipe for the variable {serial.port} to determine if the upload requires a serial port, but this is not sufficient because we must check also for the variable {serial.port.file}.
No breaking changes.

Current output:

$ arduino-cli upload --dry-run -v -b arduino:samd:adafruit_circuitplayground_m0
Skipping 1200-bps touch reset: no serial port selected!
Waiting for upload port...
No upload port found, using  as fallback
"/home/megabug/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac" -i -d --port={serial.port.file} -U true -i -e -w -v "/tmp/arduino-sketch-61DECCCDDA68480BC07770DEB6E56DDB/Bare.ino.bin" -R

As we can see the bossac tool is launched anyway with the unexpanded {serial.port.file} variable.

New behavior:

$ arduino-cli upload --dry-run -v -b arduino:samd:adafruit_circuitplayground_m0
Skipping 1200-bps touch reset: no serial port selected!
Waiting for upload port...
No upload port found, using  as fallback
Error during Upload: uploading error: no upload port provided

The message No upload port found, using as fallback can be still improved, but at least we have a clear indication that the error is caused by no upload port provided.

Previously we checked the recipe for the {serial.port} key to determine
if the upload requires a serial port, but this is not sufficient because
we must check also for the {serial.port.file} key.
@per1234 per1234 added the topic: code Related to content of the project itself label Jan 15, 2022
@cmaglie cmaglie merged commit 5beeba4 into arduino:master Jan 17, 2022
@cmaglie cmaglie deleted the better-no-port-detection branch January 17, 2022 10:51
@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants