Skip to content
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

[skip changelog] Add headings to delineate the platform referencing documentation #874

Merged
merged 1 commit into from
Jul 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions docs/platform-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,12 @@ There is no limit to the number of custom menus that can be defined.

## Referencing another core, variant or tool

The Arduino platform referencing system allows using components of other platforms in cases where it would otherwise be
necessary to duplicate those components. This feature allows us to reduce the minimum set of files needed to define a
new "hardware" to just the boards.txt file.

### Core reference

Inside the boards.txt we can define a board that uses a core provided by another vendor/maintainer using the syntax
**VENDOR_ID:CORE_ID**. For example, if we want to define a board that uses the "arduino" core from the "arduino" vendor
we should write:
Expand All @@ -750,20 +756,27 @@ The libraries from the referenced platform are used, thus there is no need to pr
provided the list of available libraries are the sum of the 2 libraries where the referencing platform has priority over
the referenced platform.

In the same way we can use variants and tools defined on another platform:
### Variant reference

In the same way we can use a variant defined on another platform using the syntax **VENDOR_ID:VARIANT_ID**:

[....]
myboard.build.variant=arduino:standard
myboard.upload.tool=arduino:avrdude
myboard.bootloader.tool=arduino:avrdude
[....]

Using this syntax allows us to reduce the minimum set of files needed to define a new "hardware" to just the boards.txt
file.

Note that referencing a variant in another platform does _not_ inherit any properties from that platform's platform.txt
(like referencing a core does).

### Tool references

Tool recipes defined in the platform.txt of other platforms can also be referenced using the syntax
**VENDOR_ID:TOOL_ID**:

[....]
myboard.upload.tool=arduino:avrdude
myboard.bootloader.tool=arduino:avrdude
[....]

### Platform Terminology

Because boards can reference cores, variants and tools in different platforms, this means that a single build or upload
Expand Down