Skip to content

Commit

Permalink
[skip changelog] Document platform bundled libraries (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
per1234 authored Jul 28, 2020
1 parent c4d5571 commit 17299a0
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions docs/platform-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,9 @@ Note that we don't need to specify any architecture since the same architecture
The platform.txt settings are inherited from the referenced core platform, thus there is no need to provide a
platform.txt unless there are some specific properties that need to be overridden.

The libraries from the referenced platform are used, thus there is no need to provide 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.
The [bundled libraries](#platform-bundled-libraries) from the referenced platform are used, thus there is no need for
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:

Expand Down Expand Up @@ -823,6 +823,20 @@ actual arduino-cli code, the "board platform" is called `targetPlatform`, the "c
Introduced in Arduino IDE 1.6.6. This file can be used to override properties defined in boards.txt or define new
properties without modifying boards.txt.

## Platform bundled libraries

Arduino libraries placed in the platform's `libraries` subfolder are accessible when a board of the platform, or of a
platform that [references](#referencing-another-core-variant-or-tool) the platform's core, is selected. When any other
board is selected, the platform bundled libraries are inaccessible.

These are often architecture-specific libraries (e.g., SPI, Wire) which must be implemented differently for each
architecture.

Platform bundled libraries may be used to provide specialized versions of libraries which use the
[dependency resolution system](sketch-build-process.md#dependency-resolution) to override built-in libraries.

For more information, see the [Arduino library specification](library-specification.md).

## keywords.txt

As of Arduino IDE 1.6.6, per-platform keywords can be defined by adding a keywords.txt file to the platform's
Expand Down

0 comments on commit 17299a0

Please sign in to comment.