Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:RP2350 picobin block

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

The block format of RP2350 images and partition tables (pico-sdk boot/picobin.h): blocks start with 0xffffded3 and end with 0xab123579, hold typed items such as image definition, vector table, entry point, load map, hash, signature and partition table, and form a loop through next-block offsets.

Overview

RP2350 boot ROM looks in flash and OTP-selected locations for blocks instead of the RP2040's checksummed boot2 (Format:RP2040 boot2). Blocks are word aligned. The constants live in pico-sdk src/common/boot_picobin_headers/include/boot/picobin.h (BSD-3-Clause).

Block

A block is: start marker 0xffffded3, a sequence of items, a last-item marker, a 32-bit offset to the next block (or to itself when single), then end marker 0xab123579. The header says the markers were chosen not to look like likely ARM or RISC-V instructions or valid pointers. Maximum block size 0x280 bytes; an image-definition block at most 0x180; a partition-table block at most 0x280. Exact item framing (size byte, little-endian item header) was not read: Unverified.

Item types

The low 7 bits identify the item; bit 6 (0x40) appears set for items of 1-byte size words ('1BS'): 0x41 next block offset, 0x42 image type, 0x03 vector table, 0x44 entry point, 0x05 rolling window delta, 0x06 load map, 0x47 hash definition, 0x48 version, 0x09 signature, 0x0a partition table, 0x4b hash value, 0x0c salt, 0xfe ignored, 0xff last (these two are 2-byte-size items).

Image type word

Bits 0-3 type (1 exe, 2 data), bits 4-5 security (1 NS, 2 S), bits 8-10 CPU (0 ARM, 1 RISC-V, 2 'varmulet'), bit 11 extra security, bits 12-14 chip (0 RP2040, 1 RP2350), bit 15 try-before-you-buy.

Load map

Header word encodes entry count in bits 24-18 as (header << 1) >> 25, and the sign bit clear means relative addresses. Each entry is storage address, runtime address, size (three words); relative storage addresses are relative to the load-map item, and in absolute mode the size field is the end of the runtime region.

Partition table item

Partition permissions in the top six bits 26-31 (S read/write, NS read/write, NSBOOT read/write), first/last sector in 13-bit fields (bits 0-12 and 13-25) of a 4 KiB sector unit (the unit is Unverified), and flags for id, name, link type and accepted UF2 families. Hashes: SHA-256 is 1; signatures: SECP256K1 is 1.

See also Format:UF2 and Platform:ARM Cortex-M.

Code & repositories

  • https://github.com/raspberrypi/pico-sdk @ 079c6f39023649b154152db30f1d781e884879bc · license: BSD-3-Clause
    pico-sdk: src/rp2040/boot_stage2 (pad_checksum, boot_stage2.ld) and src/common/boot_picobin_headers picobin.h.
    Tested on: source read, not run: source read only · checked 2026-10-19; last activity 2026-10-18