-
Notifications
You must be signed in to change notification settings - Fork 1.5k
tools/rp{2040,23xx}: Ensure that picotool is found or built #16855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools/rp{2040,23xx}: Ensure that picotool is found or built #16855
Conversation
Is the build failing because of the I don't think that the issue is caused by my changes anyway? |
@nmaggioni what's about this error:
|
@xiaoxiang781216 That means my patch is working as intended and stopping the build if the SDK is missing :) Let's see if the failure of the |
e3c64a6
to
325d900
Compare
325d900
to
cf4a2dc
Compare
@xiaoxiang781216 ACK, changes to CI tooling were moved to a dedicated PR. |
@nmaggioni please rebase this pr again. |
cf4a2dc
to
a075737
Compare
I'll rebase on top of #16876 when possible, that should fix CI. |
@nmaggioni please rebase this pr again. |
The current logic failed silently on some systems, maybe because of a different default shell? This resulted in builds that completed successfully but generated invalid UF2 files, which were refused by the uC bootloader. Now the check is properly enforced and picotool is either found in the $PATH or built from the pico-sdk source. Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
a075737
to
53c5282
Compare
Summary
The current Makefile logic failed silently on some systems, maybe because of a different default shell (ZSH, in my case)? This resulted in builds that completed successfully but generated invalid UF2 files, which were then refused by the uC bootloader.
Now the check is properly enforced and picotool is either found in the $PATH or built from the pico-sdk source.
Impact
No more silently corrupted UF2 files if neither picotool nor pico-sdk are found.
Testing
These changes were tested on a Linux host, targeting a custom Cortex-M0+ (RP2040) board using today's NuttX master.
I would anyway encourage other people to test these changes to ensure that they do not break anyone's workspace:
picotool
nor set thePICO_SDK_PATH
environment variable. The build should fail explicitly.PICO_SDK_PATH
environment variable and retry. The build should emit a warning, compilepicotool
, and then succeed.picotool
available somewhere in the $PATH. The build should succeed without any warnings and without compiling any additional tools.