Skip to content

Add note about pico-sdk-tools to README.md #146

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

Merged
merged 6 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ git submodule update --init lib/mbedtls

You also need to install `libusb-1.0` if you want to use the USB functionality.

> If libusb-1.0 is not installed, picotool still builds, but it omits all options that deal with managing a pico via USB (load, save, erase, verify, reboot). Builds that do not include USB support can be recognized because these commands also do not appear in the help command. The build output message 'libUSB is not found - no USB support will be built' also appears in the build logs.

### Linux / macOS

Use your favorite package tool to install dependencies. For example, on Ubuntu:
Expand All @@ -16,8 +18,6 @@ Use your favorite package tool to install dependencies. For example, on Ubuntu:
sudo apt install build-essential pkg-config libusb-1.0-0-dev cmake
```

> If libusb-1.0-0-dev is not installed, picotool still builds, but it omits all options that deal with managing a pico via USB (load, save, erase, verify, reboot). Builds that do not include USB support can be recognized because these commands also do not appear in the help command. The build output message 'libUSB is not found - no USB support will be built' also appears in the build logs.

Then simply build like a normal CMake project:

```console
Expand All @@ -39,7 +39,7 @@ sudo cp udev/99-picotool.rules /etc/udev/rules.d/

Download libUSB from here https://libusb.info/

set LIBUSB_ROOT environment variable to the install directory.
Set LIBUSB_ROOT environment variable to the install directory.
```console
mkdir build
cd build
Expand All @@ -51,7 +51,7 @@ nmake

Download libUSB from here https://libusb.info/

set LIBUSB_ROOT environment variable to the install directory.
Set LIBUSB_ROOT environment variable to the install directory.

```console
mkdir build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Note commands that aren't acting on files require a device in BOOTSEL mode to be

## Building & Installing

If you don't want to build picotool yourself, you can find pre-built executables for Windows, macOS, and Linux in the [pico-sdk-tools](https://github.com/raspberrypi/pico-sdk-tools/releases) repository. Assuming you've unzipped that directory to `$PICOTOOL_LOC` (with the actual picotool executable at `$PICOTOOL_LOC/picotool/picotool`), you can point the Pico SDK at this binary by setting the `picotool_DIR` environment variable to `$PICOTOOL_LOC/picotool`, or by passing `-Dpicotool_DIR=$PICOTOOL_LOC/picotool` to your `cmake` command or setting it in your `CMakeLists.txt` file.
If you don't want to build picotool yourself, you can find pre-built executables for Windows, macOS, and Linux in the [pico-sdk-tools](https://github.com/raspberrypi/pico-sdk-tools/releases) repository. Assuming you've extracted that archive to `$EXTRACT_LOCATION` (with the actual picotool executable at `$EXTRACT_LOCATION/picotool/picotool`), you can point the Pico SDK at this binary by setting the `picotool_DIR` environment variable to `$EXTRACT_LOCATION/picotool`, or by passing `-Dpicotool_DIR=$EXTRACT_LOCATION/picotool` to your `cmake` command or setting it in your `CMakeLists.txt` file.

If you do wish to build picotool yourself, then see [Building](BUILDING.md#building) for build instructions. For the Pico SDK to find your picotool you will need to install it, the simplest way being to run `cmake --install .` - see [Installing](BUILDING.md#installing-so-the-pico-sdk-can-find-it) for more details and alternatives. **You cannot just copy the binary into your `PATH`, else the Pico SDK will not be able to locate it.**

Expand Down
Loading