Appendix B: Using Picotool
It is possible to embed information into a Raspberry Pi Pico binary, which can be retrieved using a command line utility
called
picotool.
Getting picotool
The
picotool utility is available in its own repository. You will need to clone and build it if you haven’t ran the pico-setup
script.
$ git clone -b master https://github.com/raspberrypi/picotool.git
$ cd picotool
You will also need to install
libusb if it is not already installed,
$ sudo apt-get install libusb-1.0-0-dev
NOTE
If you are building picotool on macOS you can install libusb using Homebrew,
$ brew install libusb pkg-config
While if you are building on Microsoft Windows you can download and install a Windows binary of
libusb directly
from the
libusb.info site.
Building picotool
Building
picotool can be done as follows,
$ mkdir build
$ cd build
$ export PICO_SDK_PATH=~/pico/pico-sdk
$ cmake ../
$ make
this will generate a
picotool command-line binary in the build/picotool directory.
Getting started with Raspberry Pi Pico
Getting picotool 65