Skip to content

Commit cfd577c

Browse files
committed
[skip changelog] Document Arduino CLI support for global platform.txt, and all recognized paths
Previously, the Platform Specification incorrectly stated that the "global platform.txt" feature is only supported by Arduino IDE. In fact, it is also perfectly well supported when using Arduino CLI. The cause of the misunderstanding is due to the documentation only mentioning that the file is recognized in the Arduino IDE bundled packages path. Since that concept is specific to Arduino IDE 1.x (Arduino IDE 2.x did not exist at the time this documentation was written, so the relevant IDE major version series was not specified), the assumption was made that the feature was only available when using Arduino IDE 1.x. However, the system is actually general to all packages folders, not exclusively the IDE bundled packages folder. The additional packages folders locations at which global platform.txt files will be recognized by Arduino CLI and Arduino IDE 2.x, in addition to 1.x, are hereby documented.
1 parent 20c9dd4 commit cfd577c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/platform-specification.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,17 @@ commands to run to compile the sketch), but the `post*` hooks and all compile co
522522

523523
## Global platform.txt
524524

525-
Properties defined in a platform.txt created in the **hardware** subfolder of the Arduino IDE installation folder will
526-
be used for all platforms and will override local properties. This feature is currently only available when using the
527-
Arduino IDE.
525+
Properties defined in a platform.txt file located in the root of any of the packages folders will be used for all
526+
platforms and will override local properties.
527+
528+
The packages folder locations are:
529+
530+
- `{directories.data}/packages`<br />(where `{directories.data}` is the path from the `directories.data`
531+
[configuration key](configuration.md))
532+
- `{directories.user}/hardware`<br />(where `{directories.user}` is the path from the `directories.user`
533+
[configuration key](configuration.md), or Arduino IDE "Sketchbook location" preference)
534+
- `{Arduino IDE installation}/hardware` (Arduino IDE 1.x only)<br />(where `{Arduino IDE installation}` is the path
535+
of the Arduino IDE installation folder)
528536

529537
## platform.local.txt
530538

0 commit comments

Comments
 (0)