From 922cba0a398a3f091085931fb34dcd47e6baec74 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 10 Dec 2025 23:37:32 -0800 Subject: [PATCH] feat: Remove misleading `fqbn` key from sketch build profiles 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 `fqbn` key of the profile. Such `fqbn` keys 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. This means an `fqbn` key in the build profile of an App's sketch has absolutely no effect. The obvious problem with the presence of `fqbn` keys 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 the `fqbn` key of the build profile. For example, they might try to make App Lab use the `arduino:zephyr:unoq:flash_mode=flash,wait_linux_boot=no` FQBN 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=ram` FQBN used by Arduino App CLI when uploading is different from the FQBN the value of the `fqbn` keys would lead the user to believe is in use (since the default value of the `flash_mode` custom board option is `flash` NOT `ram`, and thus the `arduino:zephyr:unoq` used in the template is equivalent to `arduino:zephyr:unoq:flash_mode=flash`). Removing the unused `fqbn` keys from the build profiles of the sketches will avoid the chance of them causing confusion to users. --- examples/air-quality-monitoring/sketch/sketch.yaml | 1 - examples/blink-with-ui/sketch/sketch.yaml | 1 - examples/blink/sketch/sketch.yaml | 1 - examples/cloud-blink/sketch/sketch.yaml | 1 - examples/home-climate-monitoring-and-storage/sketch/sketch.yaml | 1 - examples/keyword-spotting/sketch/sketch.yaml | 1 - examples/led-matrix-painter/sketch/sketch.yaml | 1 - examples/mascot-jump-game/sketch/sketch.yaml | 1 - examples/real-time-accelerometer/sketch/sketch.yaml | 1 - examples/unoq-pin-toggle/sketch/sketch.yaml | 1 - examples/vibration-anomaly-detection/sketch/sketch.yaml | 1 - examples/weather-forecast/sketch/sketch.yaml | 1 - 12 files changed, 12 deletions(-) diff --git a/examples/air-quality-monitoring/sketch/sketch.yaml b/examples/air-quality-monitoring/sketch/sketch.yaml index d9fe917..079fe1a 100644 --- a/examples/air-quality-monitoring/sketch/sketch.yaml +++ b/examples/air-quality-monitoring/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/blink-with-ui/sketch/sketch.yaml b/examples/blink-with-ui/sketch/sketch.yaml index d9fe917..079fe1a 100644 --- a/examples/blink-with-ui/sketch/sketch.yaml +++ b/examples/blink-with-ui/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/blink/sketch/sketch.yaml b/examples/blink/sketch/sketch.yaml index cb644bb..b500881 100644 --- a/examples/blink/sketch/sketch.yaml +++ b/examples/blink/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/cloud-blink/sketch/sketch.yaml b/examples/cloud-blink/sketch/sketch.yaml index d9fe917..079fe1a 100644 --- a/examples/cloud-blink/sketch/sketch.yaml +++ b/examples/cloud-blink/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/home-climate-monitoring-and-storage/sketch/sketch.yaml b/examples/home-climate-monitoring-and-storage/sketch/sketch.yaml index f0dbe8d..2df9767 100644 --- a/examples/home-climate-monitoring-and-storage/sketch/sketch.yaml +++ b/examples/home-climate-monitoring-and-storage/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/keyword-spotting/sketch/sketch.yaml b/examples/keyword-spotting/sketch/sketch.yaml index cb644bb..b500881 100644 --- a/examples/keyword-spotting/sketch/sketch.yaml +++ b/examples/keyword-spotting/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/led-matrix-painter/sketch/sketch.yaml b/examples/led-matrix-painter/sketch/sketch.yaml index d9fe917..079fe1a 100644 --- a/examples/led-matrix-painter/sketch/sketch.yaml +++ b/examples/led-matrix-painter/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/mascot-jump-game/sketch/sketch.yaml b/examples/mascot-jump-game/sketch/sketch.yaml index cb644bb..b500881 100644 --- a/examples/mascot-jump-game/sketch/sketch.yaml +++ b/examples/mascot-jump-game/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/real-time-accelerometer/sketch/sketch.yaml b/examples/real-time-accelerometer/sketch/sketch.yaml index a3d6ef3..9175c96 100644 --- a/examples/real-time-accelerometer/sketch/sketch.yaml +++ b/examples/real-time-accelerometer/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/unoq-pin-toggle/sketch/sketch.yaml b/examples/unoq-pin-toggle/sketch/sketch.yaml index d9fe917..079fe1a 100644 --- a/examples/unoq-pin-toggle/sketch/sketch.yaml +++ b/examples/unoq-pin-toggle/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/vibration-anomaly-detection/sketch/sketch.yaml b/examples/vibration-anomaly-detection/sketch/sketch.yaml index a3d6ef3..9175c96 100644 --- a/examples/vibration-anomaly-detection/sketch/sketch.yaml +++ b/examples/vibration-anomaly-detection/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/examples/weather-forecast/sketch/sketch.yaml b/examples/weather-forecast/sketch/sketch.yaml index d9fe917..079fe1a 100644 --- a/examples/weather-forecast/sketch/sketch.yaml +++ b/examples/weather-forecast/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: