Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8037

SDK • Re: picotool in the Pico C/C++ Build Environment

$
0
0
Can you link me to the script?
I would guess it's this one - https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh

The pertinent part seems to be https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh#L99, see the end for 'picotool' installation -

Code:

# Debugprobe and picotoolfor REPO in debugprobe picotooldo    DEST="$OUTDIR/$REPO"    REPO_URL="${GITHUB_PREFIX}${REPO}${GITHUB_SUFFIX}"    git clone $REPO_URL    # Build both    cd $DEST    git submodule update --init    mkdir build    cd build    cmake ../    make -j$JNUM    if [[ "$REPO" == "picotool" ]]; then        echo "Installing picotool to /usr/local/bin/picotool"        sudo cp picotool /usr/local/bin/    fi    cd $OUTDIRdone
While that does appear to 'git clone picotool' and then build it, it seems to only copy the 'picotool' executable, doesn't run the 'sudo make install' which is now required to place the marker files so Pico SDK builds recognise that 'picotool' is installed.

Prior to Pico SDK 2.0.0 just having the executable in place was enough but that changed for Pico SDK 2.0.0 and I guess that change did not make it into 'pico_setup.sh'.

That would probably explain why 'picotool' is available as a system command but Pico SDK 'cmake' builds keep downloading it and rebuilding it again and again.

We now have three different ways to install the Pico development environment -
  • Manual install as per official documentation
  • Automated 'pico_setup.sh' - which seems to have diverged from manual install
  • Official VS Code Pico Extension install - which is different to the above
Plus 'manual VS Code install' for those who can't run the Official VS Code Pico Extension under their version of Raspberry Pi Bookworm OS. I'm not sure that is documented anywhere and there are two ways of doing that depending on whether one wants to replicate the normal manual install or a VS Code Pico Extension install - the files go in very different places.

Statistics: Posted by hippy — Mon Feb 10, 2025 10:32 am



Viewing all articles
Browse latest Browse all 8037

Trending Articles