No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tobias Simetsreiter d8df33801d upgrade to zig 0.17.0
2026-10-04 18:51:56 +02:00
.github/workflows statically link libusb by default 2026-09-13 13:08:30 +02:00
src handle read errors in binh 2026-08-16 09:47:12 +02:00
.gitignore add zig-pkg to ignore 2026-07-05 17:36:40 +02:00
build.zig statically link libusb by default 2026-09-13 13:08:30 +02:00
build.zig.zon upgrade to zig 0.17.0 2026-10-04 18:51:56 +02:00
LICENSE.txt update license to the one from raspberry 2025-09-05 10:34:50 +02:00
README.md statically link libusb by default 2026-09-13 13:08:30 +02:00

raspberry picotool on the zig buildsystem

Requirements

  • zig 0.16.0

Picotool

this repo builds the raspberry picotool from the sdk source on the zig buildsystem.

At the moment Debug and ReleaseSafe builds crash in libusb, use ReleaseFast or ReleaseSmall builds for flashing.

you can run it directy from zig build:

foo@bar:~$ zig build -Doptimize=ReleaseSmall run -- version
picotool v2.3.1 (2.3.1, zig-0.16.0)
foo@bar:~$ zig build -Doptimize=ReleaseSmall run
PICOTOOL:
    Tool for interacting with RP-series device(s) in BOOTSEL mode, or with an RP-series binary

SYNOPSIS:
    picotool help [<cmd>]
    picotool version [-s] [<version>]
    picotool info [-b] [-m] [-p] [-d] [--debug] [-l] [-a] [device-selection]
    picotool info [-b] [-m] [-p] [-d] [--debug] [-l] [-a] <filename> [-t <type>]
    picotool config [-s <key> <value>] [-g <group>] [device-selection]
    picotool config [-s <key> <value>] [-g <group>] <filename> [-t <type>]
    picotool load [--ignore-partitions] [--family <family_id>] [-p <partition>] [-n] [-N] [-u] [-v] [-x] <filename> [-t <type>] [-o <offset>] [device-selection]
    picotool save [-p] [-v] [--family <family_id>] <filename> [-t <type>] [device-selection]
    picotool save -a [-v] [--family <family_id>] <filename> [-t <type>] [device-selection]
    picotool save -r <from> <to> [-v] [--family <family_id>] <filename> [-t <type>] [device-selection]
    picotool verify <filename> [-t <type>] [device-selection] [-r <from> <to>] [-o <offset>] [device-selection]
    picotool erase [-a] [device-selection]
    picotool erase -p <partition> [device-selection]
    picotool erase -r <from> <to> [device-selection]
    picotool reboot [-a] [-u] [-g <partition>] [-c <cpu>] [device-selection]
    picotool partition info|create
    picotool uf2 convert|combine|info
    picotool otp get|set|load|white-label|permissions|dump|list
    picotool coprodis [--quiet] [--verbose] <infile> <outfile>
    picotool link [--quiet] [--verbose] <outfile> [-t <type>] <infile1> [-t <type>] <infile2> [-t <type>] [<infile3>] [-t <type>] [-p <pad>]
    picotool bdev ls|mkdir|cp|rm|cat|format

COMMANDS:
    help        Show general help or help for a specific command
    version     Display picotool version
    info        Display information from the target device(s) or file.
                Without any arguments, this will display basic information for all connected RP-series devices in BOOTSEL mode
    config      Display or change program configuration settings from the target device(s) or file.
    load        Load the program / memory range stored in a file onto the device.
    save        Save the program / memory stored in flash on the device to a file.
    verify      Check that the device contents match those in the file.
    erase       Erase the program / memory stored in flash on the device.
    reboot      Reboot the device
    partition   Commands related to RP2350 Partition Tables
    uf2         Commands related to UF2 creation and status
    otp         Commands related to the RP2350 OTP (One-Time-Programmable) Memory
    coprodis    Post-process coprocessor instructions in disassembly files.
    link        Link multiple binaries into one block loop.
    bdev        Commands related to embedded block devices

Use "picotool help <cmd>" for more info