feat: Remove misleading fqbn sketch build profile key from App template
#136
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.
Motivation
When a new App is generated, it contains a sketch which in turn contains a build profile. Previously, the
fqbnkey of this build profile was set toarduino:zephyr:unoq. Since the build profile is indeed used to control the dependencies of the sketch, the user would be led to also believe that the FQBN specified in the build profile is used when compiling and uploading the sketch. This is not so. An FQBN is instead hardcoded into the compilation and upload code (#12):arduino-app-cli/internal/orchestrator/orchestrator.go
Line 1209 in 51dab70
arduino-app-cli/internal/orchestrator/orchestrator.go
Line 1256 in 51dab70
This means the
fqbnkey in the build profile has absolutely no effect.The obvious problem with this is that it will lead the advanced user to believe they can configure the FQBN used by App Lab via the
fqbnkey of the build profile. For example, they might wish to use thearduino:zephyr:unoq:flash_mode=flash,wait_linux_boot=noFQBN (arduino/ArduinoCore-zephyr@8119c2b) 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 when uploading is different from the FQBN the default build profile 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).Change description
Remove the unused and misleading
fqbnkey from the generated build profile. This will better communicate the actual situation to the user.Additional Notes
Related: https://forum.arduino.cc/t/issues-witho-monitor-and-bridge/1416857
Reviewer checklist
main.