Skip to content

Commit 153bf44

Browse files
committed
Add documentation for additional-paths feature
1 parent 372288d commit 153bf44

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

docs/configuration.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- `board_manager`
44
- `additional_urls` - the URLs to any additional Boards Manager package index files needed for your boards platforms.
5-
- `additional_paths` - the file paths to any additional Boards Manager package index files needed for your boards platforms.
5+
- `additional_paths` - the absolute file paths to any additional Boards Manager package index files needed for your boards platforms.
66
- `daemon` - options related to running Arduino CLI as a [gRPC] server.
77
- `port` - TCP port used for gRPC client connections.
88
- `directories` - directories used by Arduino CLI.
@@ -67,10 +67,10 @@ Setting an additional Boards Manager URL using the `ARDUINO_BOARD_MANAGER_ADDITI
6767
$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=https://downloads.arduino.cc/packages/package_staging_index.json
6868
```
6969

70-
Setting an additional Boards Manager URL using the `ARDUINO_BOARD_MANAGER_ADDITIONAL_PATHS` environment variable:
70+
Setting an additional Boards Manager file using the `ARDUINO_BOARD_MANAGER_ADDITIONAL_PATHS` environment variable:
7171

7272
```sh
73-
$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_PATHS=packages/package_staging_index.json
73+
$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_PATHS=/path/to/your/package_staging_index.json
7474
```
7575

7676
### Configuration file
@@ -135,6 +135,21 @@ Doing the same using a TOML format file:
135135
additional_urls = [ "https://downloads.arduino.cc/packages/package_staging_index.json" ]
136136
```
137137

138+
Setting an additional Boards Manager File using a YAML format configuration file:
139+
140+
```yaml
141+
board_manager:
142+
additional_paths:
143+
- /path/to/your/package_staging_index.json
144+
```
145+
146+
Doing the same using a TOML format file:
147+
148+
```toml
149+
[board_manager]
150+
additional_paths = [ "/path/to/your/package_staging_index.json" ]
151+
```
152+
138153
[grpc]: https://grpc.io
139154
[sketchbook directory]: sketch-specification.md#sketchbook
140155
[arduino cli lib install]: commands/arduino-cli_lib_install.md

docs/getting-started.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,24 @@ board_manager:
177177
- https://arduino.esp8266.com/stable/package_esp8266com_index.json
178178
```
179179
180-
From now on, commands supporting custom cores will automatically use the additional URL from the configuration file:
180+
If you have your package indexes locally installed, you can list their file path in the
181+
Arduino CLI configuration file.
182+
183+
For example, to add the NRF52832 core, edit the configuration file and change the `board_manager` settings as follows:
184+
185+
```yaml
186+
board_manager:
187+
additional_paths:
188+
- /absolute/path/to/your/package_nrf52832_index.json
189+
```
190+
191+
From now on, commands supporting custom cores will automatically use the additional URL and additional paths from the configuration file:
181192

182193
```sh
183194
$ arduino-cli core update-index
184195
Updating index: package_index.json downloaded
185196
Updating index: package_esp8266com_index.json downloaded
197+
Updating index: package_nrf52832_index.json
186198
Updating index: package_index.json downloaded
187199
188200
$ arduino-cli core search esp8266
@@ -202,6 +214,18 @@ ID Version Name
202214
esp8266:esp8266 2.5.2 esp8266
203215
```
204216

217+
The same applies to the additional package index file provided by file paths. Use the `--additional-paths` option, that has to
218+
be specified every time and for every command that operates on a 3rd party platform core, for example:
219+
220+
```sh
221+
$ arduino-cli core update-index --additional-paths /absolute/path/to/your/package_esp8266com_index.json
222+
Updating index: package_esp8266com_index.json downloaded
223+
224+
$ arduino-cli core search esp8266 --additional-paths /absolute/path/to/your/package_esp8266com_index.json
225+
ID Version Name
226+
esp8266:esp8266 2.5.2 esp8266
227+
```
228+
205229
## Compile and upload the sketch
206230

207231
To compile the sketch you run the `compile` command, passing the proper FQBN string:

0 commit comments

Comments
 (0)