feat: Remove misleading fqbn key from sketch build profiles
#34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dependencies of the examples' sketch components are defined via build profiles in the sketch project file (
sketch.yaml).In addition to dependencies, the general build profile framework allows for specifying the board configuration. The board definition to use with the profile can be defined via the
fqbnkey of the profile. Suchfqbnkeys were present in the build profiles of the examples. It is also possible to specify the FQBN directly when triggering the compilation and upload operations. In this case, the explicitly specified FQBN overrides the one configured in the build profile.Arduino App CLI (and thus Arduino App Lab) explicitly specifies hard coded FQBNs when it performs compile and upload operations (arduino/arduino-app-cli#12). This means an
fqbnkey in the build profile of an App's sketch has absolutely no effect.The obvious problem with the presence of
fqbnkeys in the build profiles of examples is that it will lead the advanced user to believe they can configure the FQBN used by App Lab when running Apps created from the examples by modifying the value of thefqbnkey of the build profile. For example, they might try to make App Lab use thearduino:zephyr:unoq:flash_mode=flash,wait_linux_boot=noFQBN in cases where the sketch code is not reliant on the immediate availability of the Linux machine and they do not wish for the execution of the sketch program to be delayed after power on.Even more confusing is the fact that the
arduino:zephyr:unoq:flash_mode=ramFQBN used by Arduino App CLI when uploading is different from the FQBN the value of thefqbnkeys would lead the user to believe is in use (since the default value of theflash_modecustom board option isflashNOTram, and thus thearduino:zephyr:unoqused in the template is equivalent toarduino:zephyr:unoq:flash_mode=flash).Removing the unused
fqbnkeys from the build profiles of the sketches will avoid the chance of them causing confusion to users.This change has already been applied to the new App template: arduino/arduino-app-cli#136
The propagation of the change to the examples was recommended there: arduino/arduino-app-cli#136 (review)