Going to do a complete rewrite as this doesn't work on Zig 0.10.x, archiving.
Zig on the Raspberry Pi Pico without losing access to the SDK.
Install the Pico SDK dependencies
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlibClone the Pico SDK
git clone https://github.com/raspberrypi/pico-sdk path/to/pico-sdkMake sure PICO_SDK_PATH is set
export PICO_SDK_PATH path/to/pico-sdkCheck build.zig and example/main.zig, it's fairly self explanatory.
To build the example for the Pico W
zig build
If you have picotool installed, load the resulting uf2 file
picotool load -f zig-out/uf2/pico-app.uf2
- integrate cmake into zig build
- add include paths of pico libraries to app
- optimize cmake build steps
- wrap pico-sdk functions into Pkgs
- ???
- profit
MIT