Make programmers.txt snippet compatible with platforms that use pluggable discovery syntax #171
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.
A new flexible and powerful "pluggable discovery" system was added to the Arduino boards platform framework. This system makes it easy for Arduino boards platform authors to use any arbitrary communication channel between the board and development tools.
Boards platform configurations that use the old property syntax are automatically translated to the new syntax by Arduino CLI.
https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-upload-configuration
This translation is only done in platforms that use the old syntax exclusively. If
pluggable_discovery
properties are defined for the platform then the new pluggable discovery-styleprogram.tool.<protocol_name>
properties must be defined as well. If not, the "Upload Using Programmer" operation will fail:Or if no serial port is selected:
Since the
programmers.txt
snippet provided in the readme is intended to be used with any platform, it must be compatible with those that use the new pluggable discovery syntax (e.g., arduino/ArduinoCore-samd#648). This is accomplished by adding anarduinoOTA115.program.tool.default
property.It is also important to provide compatibility with older versions of Arduino development tools. For this reason, the old style property
arduinoOTA115.program.tool
is retained. Old versions of the development tools will treat thearduinoOTA115.program.tool.default
property as an arbitrary user defined property with no special significance and the new versions of the development tools will do the same for thearduinoOTA115.program.tool
property.