Skip to content

Commit 17299a0

Browse files
authored
[skip changelog] Document platform bundled libraries (#872)
1 parent c4d5571 commit 17299a0

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/platform-specification.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,9 @@ Note that we don't need to specify any architecture since the same architecture
783783
The platform.txt settings are inherited from the referenced core platform, thus there is no need to provide a
784784
platform.txt unless there are some specific properties that need to be overridden.
785785

786-
The libraries from the referenced platform are used, thus there is no need to provide those libraries. If libraries are
787-
provided the list of available libraries are the sum of the 2 libraries where the referencing platform has priority over
788-
the referenced platform.
786+
The [bundled libraries](#platform-bundled-libraries) from the referenced platform are used, thus there is no need for
787+
the referencing platform to bundle those libraries. If libraries are provided the list of available libraries are the
788+
sum of the 2 libraries where the referencing platform has priority over the referenced platform.
789789

790790
In the same way we can use variants and tools defined on another platform:
791791

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

826+
## Platform bundled libraries
827+
828+
Arduino libraries placed in the platform's `libraries` subfolder are accessible when a board of the platform, or of a
829+
platform that [references](#referencing-another-core-variant-or-tool) the platform's core, is selected. When any other
830+
board is selected, the platform bundled libraries are inaccessible.
831+
832+
These are often architecture-specific libraries (e.g., SPI, Wire) which must be implemented differently for each
833+
architecture.
834+
835+
Platform bundled libraries may be used to provide specialized versions of libraries which use the
836+
[dependency resolution system](sketch-build-process.md#dependency-resolution) to override built-in libraries.
837+
838+
For more information, see the [Arduino library specification](library-specification.md).
839+
826840
## keywords.txt
827841

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

0 commit comments

Comments
 (0)