@@ -95,6 +95,8 @@ profiles:
95
95
- ArduinoIoTCloud (1.0.2)
96
96
- Arduino_ConnectionHandler (0.6.4)
97
97
- TinyDHT sensor library (1.1.0)
98
+
99
+ default_profile: nanorp
98
100
```
99
101
100
102
### Building a sketch
@@ -116,6 +118,16 @@ not be used in any way. In other words, the build is isolated from the system an
116
118
specified in the profile: this will ensure that the build is portable and reproducible independently from the platforms
117
119
and libraries installed in the system.
118
120
121
+ ### Using a default profile
122
+
123
+ If a ` default_profile ` is specified in the ` sketch.yaml ` then the “classic” compile command:
124
+
125
+ ```
126
+ arduino-cli compile [sketch]
127
+ ```
128
+
129
+ will, instead, trigger a profile-based build using the default profile indicated in the ` sketch.yaml ` .
130
+
119
131
## Default flags for Arduino CLI usage
120
132
121
133
The sketch project file may be used to set the default value for some command line flags of the Arduino CLI, in
@@ -124,15 +136,17 @@ particular:
124
136
- The ` default_fqbn ` key sets the default value for the ` --fqbn ` flag
125
137
- The ` default_port ` key sets the default value for the ` --port ` flag
126
138
- The ` default_protocol ` key sets the default value for the ` --protocol ` flag
139
+ - The ` default_profile ` key sets the default value for the ` --profile ` flag
127
140
128
141
For example:
129
142
130
143
```
131
144
default_fqbn: arduino:avr:uno
132
145
default_port: /dev/ttyACM0
133
146
default_protocol: serial
147
+ default_profile: myprofile
134
148
```
135
149
136
- With this configuration set, it is not necessary to specify the ` --fqbn ` , ` --port ` , or ` --protocol ` flags to the
137
- [ ` arduino-cli compile ` ] ( commands/arduino-cli_compile.md ) or [ ` arduino-cli upload ` ] ( commands/arduino-cli_upload.md )
150
+ With this configuration set, it is not necessary to specify the ` --fqbn ` , ` --port ` , ` --protocol ` or ` --profile ` flags to
151
+ the [ ` arduino-cli compile ` ] ( commands/arduino-cli_compile.md ) or [ ` arduino-cli upload ` ] ( commands/arduino-cli_upload.md )
138
152
commands when compiling or uploading the sketch.
0 commit comments