Skip to content

Commit cc400b9

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

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

docs/configuration.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
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
6+
boards platforms.
67
- `daemon` - options related to running Arduino CLI as a [gRPC] server.
78
- `port` - TCP port used for gRPC client connections.
89
- `directories` - directories used by Arduino CLI.
@@ -67,10 +68,10 @@ Setting an additional Boards Manager URL using the `ARDUINO_BOARD_MANAGER_ADDITI
6768
$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=https://downloads.arduino.cc/packages/package_staging_index.json
6869
```
6970

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

7273
```sh
73-
$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_PATHS=packages/package_staging_index.json
74+
$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_PATHS=/path/to/your/package_staging_index.json
7475
```
7576

7677
### Configuration file
@@ -135,6 +136,21 @@ Doing the same using a TOML format file:
135136
additional_urls = [ "https://downloads.arduino.cc/packages/package_staging_index.json" ]
136137
```
137138

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

docs/getting-started.md

+25-1
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 Arduino CLI configuration file.
181+
182+
For example, to add the NRF52832 core, edit the configuration file and change the `board_manager` settings as follows:
183+
184+
```yaml
185+
board_manager:
186+
additional_paths:
187+
- /absolute/path/to/your/package_nrf52832_index.json
188+
```
189+
190+
From now on, commands supporting custom cores will automatically use the additional URL and additional paths from the
191+
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
218+
has to 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)