From 09376230cbad7da8a4fceb66076a4c4e56ba24d0 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 3 Dec 2025 19:11:06 -0800 Subject: [PATCH] feat: Remove misleading `fqbn` sketch build profile key from App template When a new App is generated, it contains a sketch with a sketch project file that defines a build profile . Previously, the `fqbn` key ofthis build profile was set to `arduino: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, meaning the `fqbn` key 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 `fqbn` key of the build profile. For example, they might wish to 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 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 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 and misleading `fqbn` key from the generated build profile will better communicate the actual situation to the user. --- .../app/generator/app_template/sketch/sketch.yaml | 1 - .../app/generator/testdata/app-all.golden/sketch/sketch.yaml | 1 - internal/orchestrator/orchestrator.go | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/orchestrator/app/generator/app_template/sketch/sketch.yaml b/internal/orchestrator/app/generator/app_template/sketch/sketch.yaml index d9fe917e..079fe1ae 100644 --- a/internal/orchestrator/app/generator/app_template/sketch/sketch.yaml +++ b/internal/orchestrator/app/generator/app_template/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/internal/orchestrator/app/generator/testdata/app-all.golden/sketch/sketch.yaml b/internal/orchestrator/app/generator/testdata/app-all.golden/sketch/sketch.yaml index d9fe917e..079fe1ae 100644 --- a/internal/orchestrator/app/generator/testdata/app-all.golden/sketch/sketch.yaml +++ b/internal/orchestrator/app/generator/testdata/app-all.golden/sketch/sketch.yaml @@ -1,6 +1,5 @@ profiles: default: - fqbn: arduino:zephyr:unoq platforms: - platform: arduino:zephyr libraries: diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index 51a808cd..8eb26001 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -1187,8 +1187,8 @@ func compileUploadSketch( response = "Error: " + msg.Error.String() case *rpc.InitResponse_Profile: response = fmt.Sprintf( - "Sketch profile configured: FQBN=%q, Port=%q", - msg.Profile.GetFqbn(), + "Sketch profile configured: Name=%q, Port=%q", + msg.Profile.GetName(), msg.Profile.GetPort(), ) }