-
The
third_party/pico-sdksubmodule, initialized recursively (pico-sdk itself pulls in further submodules — tinyusb, btstack, cyw43-driver, lwip, mbedtls):git submodule update --init --recursive
-
An ARM GNU Toolchain (
arm-none-eabi-gccand friends) onPATH. -
CMake 3.20+.
-
Python 3 (used by pico-sdk's own build for code generation and
picotool).
This repository builds a standalone, per-board "picofuse" installation —
a compiled libpicosdk.a (plus the picofuse/sys runtime layer) together
with its headers and pkg-config metadata, installed under a plain
directory prefix (e.g. /opt/picofuse/<board>). A third party who only has
that installed prefix — not this repository, not the pico-sdk source tree —
can build a real .elf for that board using nothing but pkg-config and
the ARM GNU toolchain:
export PKG_CONFIG_PATH=/opt/picofuse/<board>/lib/pkgconfig
arm-none-eabi-gcc $(pkg-config --cflags picosdk) -c app.c -o app.o
arm-none-eabi-gcc app.o $(pkg-config --libs picosdk) -o app.elfDefine PICO_BOARD for the target board/chip combination.
# Pico (RP2040)
cmake -S . -B build-pico -DPICO_BOARD=pico
cmake --build build-pico --target picosdk_static picofuse_sys_pico_static
cmake --install build-pico --prefix /opt/picofuse/pico
# Pico W (RP2040 + CYW43 Wi-Fi/Bluetooth)
cmake -S . -B build-pico_w -DPICO_BOARD=pico_w
cmake --build build-pico_w --target picosdk_static picofuse_sys_pico_static
cmake --install build-pico_w --prefix /opt/picofuse/pico_w
# Pico 2 (RP2350)
cmake -S . -B build-pico2 -DPICO_BOARD=pico2
cmake --build build-pico2 --target picosdk_static picofuse_sys_pico_static
cmake --install build-pico2 --prefix /opt/picofuse/pico2
# Pico 2 W (RP2350 + CYW43)
cmake -S . -B build-pico2_w -DPICO_BOARD=pico2_w
cmake --build build-pico2_w --target picosdk_static picofuse_sys_pico_static
cmake --install build-pico2_w --prefix /opt/picofuse/pico2_wInstalling produces, under each prefix:
lib/libpicosdk.a,lib/libpicofuse_sys_pico.ainclude/— every SDK module's headers merged into one consolidated tree, pluspicofuse/andruntime/lib/pkgconfig/picosdk.pc,lib/pkgconfig/picofuse_sys_pico.pc(the latterRequires: picosdk, so pulling it in viapkg-configalso pulls in picosdk's own flags)lib/picosdk/src/— the linker script fragments the.pcfile'sLibspoint at