Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoPologruto committed Jun 6, 2023
1 parent b9ffc31 commit c2ca884
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

## 0.34.0

### `compile [sketch]` and `upload -p [port] [sketch]` now use the `default_profile`

The command `compile [sketch]` now compiles using the `default_profile` specified in the `sketch.yaml` file. The command
`upload -p [port] [sketch]` can now obtain the `fqbn` from the `default_profile`.

## 0.33.0

### gRPC `cc.arduino.cli.commands.v1.Compile` command now return expanded build_properties by default.
Expand Down
15 changes: 15 additions & 0 deletions docs/sketch-project-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ profiles:
- <LIB_NAME> (<LIB_VERSION>)
...more profiles here...
default_profile: <DEFAULT_PROFILE_NAME>
```

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

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

Expand Down Expand Up @@ -95,6 +98,8 @@ profiles:
- ArduinoIoTCloud (1.0.2)
- Arduino_ConnectionHandler (0.6.4)
- TinyDHT sensor library (1.1.0)
default_profile: nanorp
```

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

### Using a default profile

If a `default_profile` is specified in the `sketch.yaml` then the “classic” compile command:

```
arduino-cli compile [sketch]
```

will, instead, trigger a profile-based build using the default profile indicated in the `sketch.yaml`.

## Default flags for Arduino CLI usage

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

0 comments on commit c2ca884

Please sign in to comment.