Skip to content

Commit c2ca884

Browse files
Update documentation
1 parent b9ffc31 commit c2ca884

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Diff for: docs/UPGRADING.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Here you can find a list of migration guides to handle breaking changes between releases of the CLI.
44

5+
## 0.34.0
6+
7+
### `compile [sketch]` and `upload -p [port] [sketch]` now use the `default_profile`
8+
9+
The command `compile [sketch]` now compiles using the `default_profile` specified in the `sketch.yaml` file. The command
10+
`upload -p [port] [sketch]` can now obtain the `fqbn` from the `default_profile`.
11+
512
## 0.33.0
613

714
### gRPC `cc.arduino.cli.commands.v1.Compile` command now return expanded build_properties by default.

Diff for: docs/sketch-project-file.md

+15
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ profiles:
3333
- <LIB_NAME> (<LIB_VERSION>)
3434
3535
...more profiles here...
36+
37+
default_profile: <DEFAULT_PROFILE_NAME>
3638
```
3739

3840
There is an optional `profiles:` section containing all the profiles. Each field in a profile is mandatory (unless noted
@@ -50,6 +52,7 @@ otherwise below). The available fields are:
5052
- `libraries:` is a section where the required libraries to build the project are defined. This section is optional.
5153
- `<LIB_VERSION>` is the version required for the library, for example, `1.0.0`.
5254
- `<USER_NOTES>` is a free text string available to the developer to add comments. This field is optional.
55+
- `<DEFAULT_PROFILE_NAME>` is the profile used by default (more on that later)
5356

5457
A complete example of a sketch project file may be the following:
5558

@@ -95,6 +98,8 @@ profiles:
9598
- ArduinoIoTCloud (1.0.2)
9699
- Arduino_ConnectionHandler (0.6.4)
97100
- TinyDHT sensor library (1.1.0)
101+
102+
default_profile: nanorp
98103
```
99104

100105
### Building a sketch
@@ -116,6 +121,16 @@ not be used in any way. In other words, the build is isolated from the system an
116121
specified in the profile: this will ensure that the build is portable and reproducible independently from the platforms
117122
and libraries installed in the system.
118123

124+
### Using a default profile
125+
126+
If a `default_profile` is specified in the `sketch.yaml` then the “classic” compile command:
127+
128+
```
129+
arduino-cli compile [sketch]
130+
```
131+
132+
will, instead, trigger a profile-based build using the default profile indicated in the `sketch.yaml`.
133+
119134
## Default flags for Arduino CLI usage
120135

121136
The sketch project file may be used to set the default value for some command line flags of the Arduino CLI, in

0 commit comments

Comments
 (0)