-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
Hi All
Installing via this script works perfectly
But when trying to build the entire set of examples there is a failure at this point when building hello_serial_enc for a target of rp2350
the commands I submitted were
mkdir -p build
pushd build
cmake -DPICO_PLATFORM=rp2350 ${PICO_EXAMPLES_PATH}
make
popd
the error
ERROR: This picotool version (2.1.2-develop) is not compatible with SDK versions <=2.1.1 - you must manually build & install picotool version 2.1.1 to use those SDK versions with encryption
bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/build.make:969: recipe for target 'bootloaders/encrypted/hello_serial_enc.elf' failed
make[2]: *** [bootloaders/encrypted/hello_serial_enc.elf] Error 255
make[2]: *** Deleting file 'bootloaders/encrypted/hello_serial_enc.elf'
CMakeFiles/Makefile2:6655: recipe for target 'bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/all' failed
make[1]: *** [bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
Interestingly, there was a warning earlier in the process, which indicates that there is no available picotool 2.1.1
Build type is Release
CMake Warning at /home/USER/pi-pico/pico/pico-sdk/tools/Findpicotool.cmake:30 (message):
No installed picotool with version 2.1.1 found - building from source
It is recommended to build and install picotool separately, or to set
PICOTOOL_FETCH_FROM_GIT_PATH to a common directory for all your SDK
projects
Call Stack (most recent call first):
/home/USER/pi-pico/pico/pico-sdk/tools/CMakeLists.txt:138 (find_package)
/home/USER/pi-pico/pico/pico-sdk/src/cmake/on_device.cmake:34 (pico_init_picotool)
/home/USER/pi-pico/pico/pico-sdk/src/rp2350/boot_stage2/CMakeLists.txt:57 (pico_add_dis_output)
/home/USER/pi-pico/pico/pico-sdk/src/rp2350/boot_stage2/CMakeLists.txt:98 (pico_define_boot_stage2)
how can I fix this ?
Activity
eroom1966 commentedon Jun 4, 2025
Update:
If I run with 'bootloaders' commented out from the CMakeList.txt, all examples build to completion
lurch commentedon Jun 4, 2025
@will-v-pi This script checks out the
master
branch of pico-sdk and pico-examples, so to keep things "compatible" perhaps it also ought to check out themaster
branch of picotool?will-v-pi commentedon Jun 4, 2025
This is a known bug in the 2.1.0 and 2.1.1 SDK releases (raspberrypi/pico-sdk#2401) - as the error message states, the fix is to install picotool 2.1.1 separately, which is fixed by #43
lurch commentedon Jun 4, 2025
Closing as duplicate of #43
eroom1966 commentedon Jun 4, 2025
This is useful.
I can checkout and build the picotool in my tree somewhere
but, how do I stop the examples make process from attempting to download and build its own copy ?
do I just ensure that picotool is in the searchpath ?
I am not sure how the decision is made to download a version of picotool or not
lurch commentedon Jun 4, 2025
See https://github.com/raspberrypi/picotool?tab=readme-ov-file#usage-by-the-raspberry-pi-pico-sdk 🙂
eroom1966 commentedon Jun 4, 2025
@lurch apologies if I appear a little naive :-/
I already have picotool version 2.1.1 built and installed in /usr/local/bin
My problem is that when building the sdk examples, it downloads and builds its own local copy (version 2.1.2-develop)
How do I stop it from doing that, and instead use the version I already installed in /usr/local/bin
Thx
UPDATE : aah you posted a link above, let me take a look
eroom1966 commentedon Jun 4, 2025
@lurch
OK to clarify, I have picotool version 2.1.1 installed at /usr/local/bin/picotool
I can find no way of telling the build system to use this in preference to downloading a local copy, I have tried setting the following environment variables, or command line options
option 1
export picotool_DIR=/usr/local/bin
cmake -DPICO_PLATFORM=rp2350 ${PICO_EXAMPLES_PATH}
option 2
export picotool_INSTALL_DIR=/usr/local/bin
cmake -DPICO_PLATFORM=rp2350 ${PICO_EXAMPLES_PATH}
option 3 (directly to cmake)
cmake -Dpicotool_DIR=/usr/local/bin -DPICO_PLATFORM=rp2350 ${PICO_EXAMPLES_PATH}
None of these options seem to stop the downloading of a newer version of picotool, very confused as to what I am doing wrong here, but in all cases I get
to test it is correct
I should also add, I have a built version of picotool(2.1.1) here
/home/USER/pi-pico/pico/picotool
executable is here /home/USER/pi-pico/pico/picotool/build/picotool
All I need to know, is how to direct the build system to use this version of picotool, but it seems to ignore the variables from above ?
will-v-pi commentedon Jun 4, 2025
Just to confirm, when you built & installed picotool, did you definitely follow the instructions (ie use
sudo make install
or similar)? And did you delete your pico-examples build directory afterwards?You should have these additional files installed, which are the files the SDK actually searches for
Do not use any of your three options - the
picotool_DIR
variable should not need setting for a normal install, it only needs to be set when you install it in a custom location using the-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR -DPICOTOOL_FLAT_INSTALL=1
arguments. If it's still not finding your picotool, you can pass--debug-find-pkg=picotool
to yourcmake
command, and it will print the paths it searches:eroom1966 commentedon Jun 4, 2025
@will-v-pi forgive me - I am not quite correct in what I am saying, picotool was actually downloaded and built by the pico-setup.sh script itself, but it looks like it does not do a "make install" it just copies the binary file itself, so the files you describe above would not exist.
in which case should my actual flow be as follows ?
will-v-pi commentedon Jun 4, 2025
Yep, that's the bug in
pico_setup.sh
which is fixed by #43, so you should use thepico_setup.sh
from that PR until it's mergederoom1966 commentedon Jun 4, 2025
OK, I went back the folder that pico-setup.sh downloaded and built picotool and issued
sudo make install
this seems to have fixed my issue, is this the same as #43 ?
will-v-pi commentedon Jun 4, 2025
Yes
1 remaining item