Skip to content

Make programmers.txt snippet compatible with platforms that use pluggable discovery syntax #171

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

Merged
merged 1 commit into from
Sep 26, 2022
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Sep 26, 2022

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-style program.tool.<protocol_name> properties must be defined as well. If not, the "Upload Using Programmer" operation will fail:

Property 'program.tool.serial' is undefined

Or if no serial port is selected:

Property 'program.tool.' is undefined

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 an arduinoOTA115.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 the arduinoOTA115.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 the arduinoOTA115.program.tool property.

…able discovery syntax

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-style `program.tool` properties must be defined as well.

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. This is accomplished by adding an
`arduinoOTA115.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 the `arduinoOTA115.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 the `arduinoOTA115.program.tool` property.
@JAndrassy
Copy link
Owner

@per1234, I had to change it from

arduinoOTA104.program.default=arduinoOTA

to

arduinoOTA104.program.tool.default=arduinoOTA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants