Skip to content

Commit dbd2498

Browse files
committed
Refined platform specification on installation folder for platforms
1 parent bd3c784 commit dbd2498

File tree

1 file changed

+46
-15
lines changed

1 file changed

+46
-15
lines changed

docs/platform-specification.md

+46-15
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,62 @@ Platforms add support for new boards to the Arduino development software. They a
55
[Boards Manager](package_index_json-specification.md) or manual installation to the _hardware_ folder of Arduino's
66
sketchbook folder (AKA "user directory").<br> A platform may consist of as little as a single configuration file.
77

8-
## Hardware Folders structure
8+
## Platform installation directories
99

10-
The new hardware folders have a hierarchical structure organized in two levels:
10+
If the platforms are installed using the Board Manager the installation directory location will be as follow:
1111

12-
- the first level is the vendor/maintainer
13-
- the second level is the supported architecture
12+
`{directories.data}/packages/{VENDOR_NAME}/hardware/{ARCHITECTURE}/{VERSION}/...`
1413

15-
A vendor/maintainer can have multiple supported architectures. For example, below we have three hardware vendors called
16-
"arduino", "yyyyy" and "xxxxx":
14+
- `{directories.data}` is the data directory as specified in the
15+
[configuration file](configuration.md#default-directories).
16+
- `{VENDOR_NAME}` is the identifier of the vendor/maintainer of the platform.
17+
- `{ARCHITECTURE}` is the architecture of the CPU used in the platform.
18+
- `{VERSION}` is the platform version.
1719

20+
Alternatively, a platform may be manually installed by the user inside the Sketchbook/user directory as follows:
21+
22+
`{directories.user}/hardware/{VENDOR_NAME}/{ARCHITECTURE}/...`
23+
24+
- `{directories.user}` is the user directory as specified in the
25+
[configuration file](configuration.md#default-directories).
26+
- `{VENDOR_NAME}` is the identifier of the vendor/maintainer of the platform.
27+
- `{ARCHITECTURE}` is the architecture of the CPU used in the platform.
28+
29+
A vendor/maintainer can have multiple supported architectures.
30+
31+
For example, below we have four platforms downloaded from three hypothetical hardware vendors called "arduino", "foo"
32+
and "bar", and installed using the Board Manager:
33+
34+
```
35+
{directories.data}/packages/arduino/hardware/avr/1.2.3/...
36+
{directories.data}/packages/arduino/hardware/sam/1.4.5/...
37+
{directories.data}/packages/foo/hardware/avr/1.0.2/...
38+
{directories.data}/packages/bar/hardware/avr/1.1.0/...
1839
```
19-
hardware/arduino/avr/... - Arduino - AVR Boards
20-
hardware/arduino/sam/... - Arduino - SAM (32bit ARM) Boards
21-
hardware/yyyyy/avr/... - Yyy - AVR
22-
hardware/xxxxx/avr/... - Xxx - AVR
40+
41+
If the same platform were manually installed by the user, he should have unpacked them inside the following directories:
42+
43+
```
44+
{directories.user}/hardware/arduino/avr/...
45+
{directories.user}/hardware/arduino/sam/...
46+
{directories.user}/hardware/foo/avr/...
47+
{directories.user}/hardware/bar/avr/...
2348
```
2449

25-
The vendor "arduino" has two supported architectures (AVR and SAM), while "xxxxx" and "yyyyy" have only AVR.
50+
In this latter case the version is omitted.
51+
52+
We can also see that the vendor "arduino" has two supported architectures (AVR and SAM), while "foo" and "bar" have only
53+
AVR.
54+
55+
### Notes about the choosing the architecture name
2656

2757
Architecture values are case sensitive (e.g. `AVR` != `avr`).
2858

29-
If possible, follow existing architecture name conventions when creating hardware packages. Use the vendor folder name
30-
to differentiate your package. The architecture folder name is used to determine library compatibility and to permit
31-
referencing resources from another core of the same architecture, so use of a non-standard architecture name can have a
32-
harmful effect.
59+
Platform developers should follow the existing architecture name conventions when creating hardware packages, if you
60+
need to differentiate your package use the vendor/maintainer folder name to do so.
61+
62+
The architecture name is used to determine the libraries compatibility and to permit referencing resources from another
63+
platform of the same architecture. Use of a non-standard architecture name can have a harmful effect.
3364

3465
## Architecture configurations
3566

0 commit comments

Comments
 (0)