arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

Allow storing the `protocol`+`port` info per sketch profile

Open dankeboy36 opened this issue 1 year ago • 0 comments
trafficstars

Describe the request

Please let the sketch profile file store the preferred port (address) and (port) protocol per profile.

Assuming this format:

profiles:
  <PROFILE_NAME>:
    notes: <USER_NOTES>
    fqbn: <FQBN>
    platforms:
      - platform: <PLATFORM> (<PLATFORM_VERSION>)
        platform_index_url: <3RD_PARTY_PLATFORM_URL>
      - platform: <PLATFORM_DEPENDENCY> (<PLATFORM_DEPENDENCY_VERSION>)
        platform_index_url: <3RD_PARTY_PLATFORM_DEPENDENCY_URL>
    libraries:
      - <LIB_NAME> (<LIB_VERSION>)
      - <LIB_NAME> (<LIB_VERSION>)
      - <LIB_NAME> (<LIB_VERSION>)

  ...more profiles here...

Please support this:

4a5,6
>     protocol: <PROTOCOL> # serial, network, teensy, etc.
>     port: <PORT> # /dev/ttyACM0, COM2, etc.

Thank you!

Describe the current behavior

Currently, it's possible to store a single preferred protocol+port pair in the sketch profile.

default_port: /dev/ttyACM0
default_protocol: serial

It would be great to store it per profile. If a profile does not specify a port/protocol, the default_port/default_protocol is used.

Arduino CLI version

af0b60e6069d3c26b764f17dbbf83b269a9ddbf8

Operating system

macOS

Operating system version

11.7.10

Additional context

Related

  • https://github.com/arduino/arduino-ide/issues/1892 / https://github.com/arduino/arduino-ide/issues/2438
  • https://github.com/arduino/arduino-ide/issues/136

Issue checklist

  • [X] I searched for previous requests in the issue tracker
  • [X] I verified the feature was still missing when using the nightly build
  • [X] My request contains all necessary details

dankeboy36 avatar Feb 28 '24 15:02 dankeboy36