Skip to content

Commit 1dd4b50

Browse files
authored
feat: Remove misleading fqbn sketch build profile key from App template (#136)
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.
1 parent beee333 commit 1dd4b50

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

internal/orchestrator/app/generator/app_template/sketch/sketch.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
profiles:
22
default:
3-
fqbn: arduino:zephyr:unoq
43
platforms:
54
- platform: arduino:zephyr
65
libraries:

internal/orchestrator/app/generator/testdata/app-all.golden/sketch/sketch.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
profiles:
22
default:
3-
fqbn: arduino:zephyr:unoq
43
platforms:
54
- platform: arduino:zephyr
65
libraries:

internal/orchestrator/orchestrator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,8 +1187,8 @@ func compileUploadSketch(
11871187
response = "Error: " + msg.Error.String()
11881188
case *rpc.InitResponse_Profile:
11891189
response = fmt.Sprintf(
1190-
"Sketch profile configured: FQBN=%q, Port=%q",
1191-
msg.Profile.GetFqbn(),
1190+
"Sketch profile configured: Name=%q, Port=%q",
1191+
msg.Profile.GetName(),
11921192
msg.Profile.GetPort(),
11931193
)
11941194
}

0 commit comments

Comments
 (0)