Fix PID specification for arduino-cli #2157
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.
When using pluggable discovery, the
arduino-cli
tool expectsboards.txt
files to list device identification properties like USB VID and PID inboardname.upload_port.N.{vid,pid,...}
properties.There is compatibility logic to convert old style
boardname.N.{vid,pid}
properties into that format, however it only runs if the platform is not "pluggable discovery aware", i.e.platform.txt
contains anypluggable_discovery.*
properties, and this platform does include such properties, so the compatibility logic doesn't run. That means that before this change,arduino-cli
wouldn't actually identify USB-connected RP2040 boards with their board type.This change adds
boardname.upload_port.N.{vid,pid}
properties, while also keeping classicboardname.N.{vid,pid}
properties for compatibility with older Arduino IDE versions.Note, as a side effect of refactoring the VID/PID code slightly,
boards.txt
no longer includes duplicate VID/PID pairs when the PID-mangling-for-compound-devices logic OR's in bits that were already present.