Skip to content

Commit

Permalink
[skip changelog] Add headings to delineate the platform referencing d…
Browse files Browse the repository at this point in the history
…ocumentation (#874)

The platform referencing documentation content falls into four categories:

- general
- core
- variant
- tool

Previously, it was not obvious where the content for each category began and ended.
  • Loading branch information
per1234 authored Jul 28, 2020
1 parent 17299a0 commit 678a48b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions docs/platform-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,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 @@ -787,20 +793,27 @@ The [bundled libraries](#platform-bundled-libraries) from the referenced platfor
the referencing platform to bundle those libraries. If libraries are 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

0 comments on commit 678a48b

Please sign in to comment.