Identify final board port address in machine readable upload
command response
#2245
Closed
3 tasks done
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
type: enhancement
Proposed improvement
Describe the request
In some cases, it is possible that the address of the board's port is different at the end of an
upload
operation. Arduino CLI should identify the final address of the target board's port and provide this information in the machine readableupload
command responses:cc.arduino.cli.commands.v1.ArduinoCoreService.Upload
methodtext
format is specified🙂 This information will be useful to consumers of Arduino CLI such as development tools and scripts.
Describe the current behavior
A common scenario under which the port address can change through an
upload
operation is uploading to a "native USB" board, where the primary microcontroller produces the USB CDC serial port. The typical upload procedure for these boards:upload.port.address
property.The port address may change following steps (2) and (6) in the above procedure. A system has already been implemented for Arduino CLI to effectively follow the address change after step (2), but there is no such following of the port after step (6). The reason for this is that, unlike the address change at step (2), Arduino CLI itself doesn't have a need to know the final address.
🙁 A final address identification system (which is fairly complex) must be implemented separately in each of the tools that do need this information.
Arduino CLI version
df12786
Operating system
All
Operating system version
Any
Additional context
This is somewhat related to arduino/arduino-ide#1319 in that it would enable the complete removal of automatic port selection code from the Arduino IDE codebase rather than only the partial removal that is required for the resolution of arduino/arduino-ide#1319.
Examples of tools not correctly determining the final port address:
serial
/network
and no "recognized" board arduino-ide#1366These issues highlight the value of maintaining a single reliable final port identification system instead of duplicating the effort of implementing the system in each individual downstream project.
Issue checklist
The text was updated successfully, but these errors were encountered: