@@ -33,6 +33,8 @@ profiles:
33
33
- <LIB_NAME> (<LIB_VERSION>)
34
34
35
35
...more profiles here...
36
+
37
+ default_profile: <DEFAULT_PROFILE_NAME>
36
38
```
37
39
38
40
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:
50
52
- ` libraries: ` is a section where the required libraries to build the project are defined. This section is optional.
51
53
- ` <LIB_VERSION> ` is the version required for the library, for example, ` 1.0.0 ` .
52
54
- ` <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)
53
56
54
57
A complete example of a sketch project file may be the following:
55
58
@@ -95,6 +98,8 @@ profiles:
95
98
- ArduinoIoTCloud (1.0.2)
96
99
- Arduino_ConnectionHandler (0.6.4)
97
100
- TinyDHT sensor library (1.1.0)
101
+
102
+ default_profile: nanorp
98
103
```
99
104
100
105
### Building a sketch
@@ -116,6 +121,16 @@ not be used in any way. In other words, the build is isolated from the system an
116
121
specified in the profile: this will ensure that the build is portable and reproducible independently from the platforms
117
122
and libraries installed in the system.
118
123
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
+
119
134
## Default flags for Arduino CLI usage
120
135
121
136
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