@@ -95,6 +95,8 @@ profiles:
9595 - ArduinoIoTCloud (1.0.2)
9696 - Arduino_ConnectionHandler (0.6.4)
9797 - TinyDHT sensor library (1.1.0)
98+
99+ default_profile: nanorp
98100```
99101
100102### Building a sketch
@@ -116,6 +118,16 @@ not be used in any way. In other words, the build is isolated from the system an
116118specified in the profile: this will ensure that the build is portable and reproducible independently from the platforms
117119and libraries installed in the system.
118120
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+
119131## Default flags for Arduino CLI usage
120132
121133The 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:
124136- The ` default_fqbn ` key sets the default value for the ` --fqbn ` flag
125137- The ` default_port ` key sets the default value for the ` --port ` flag
126138- 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
127140
128141For example:
129142
130143```
131144default_fqbn: arduino:avr:uno
132145default_port: /dev/ttyACM0
133146default_protocol: serial
147+ default_profile: myprofile
134148```
135149
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 )
138152commands when compiling or uploading the sketch.
0 commit comments