Skip to content

Conversation

@per1234
Copy link

@per1234 per1234 commented Dec 11, 2025

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 (arduino/arduino-app-cli#12). 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.


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)

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.
@stefanotorneo
Copy link
Contributor

stefanotorneo commented Dec 11, 2025

@per1234 Could you fix the licenses, please?
Follow these instructions to update them correctly.

@per1234
Copy link
Author

per1234 commented Dec 11, 2025

@stefanotorneo the license metadata sync is out of scope for this pull request. The changes I made here do not change the project dependencies in any way.

So you will need to make a fix for the licensing metadata separately. You should investigate how the metadata got out of sync and fix your infrastructure to ensure that doesn't happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants