Compile PicoBoot firmware
The recommended way to build PicoBoot is using VS Code with the provided devcontainer environment. This ensures all dependencies are properly set up and consistent across different development machines.
Development Environment Setup
- Install VS Code
- Install Docker
- Install Remote - Containers extension in VS Code
- Clone the PicoBoot repository
- Open the project in VS Code
- When prompted, click "Reopen in Container" or use Command Palette (F1) and select "Remote-Containers: Reopen in Container"
The devcontainer includes all necessary dependencies including the Raspberry Pi Pico SDK.
Building PicoBoot
Starting with v0.4 release, PicoBoot introduced split payload from modchip code. Now only part of the Pico can be updated to replace starting homebrew application. This was done in order to make PicoBoot more resilient to corrupted flash memory as well as to enforce interoperability between PicoBoot and other projects like gekkoboot or Swiss.
To build PicoBoot:
-
Place your
payload.dol
file in the project root directory- The entrypoint address of the *.dol must be 0x81300000
- gekkoboot is recommended and this is what PicoBoot releases are shipped with
-
Run the build script:
./tools/build.sh
After successful build, you'll find the following files in the dist/
directory:
payload_*.uf2
- payload file for partial updatepicoboot_*.uf2
- modchip code for partial udpatepicoboot_full_*.uf2
- full firmware + payload file, recommended for end-users and testing
Flashing the Firmware
To flash new firmware to your Pico board:
- Boot the Pico in
BOOTSEL
mode (holdBOOTSEL
button and plug USB cable) - Copy
picoboot_full_*.uf2
file to the newRPI-RP2
(orRP2350
) device - The device will auto-eject and the green LED will light up on Pico