Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
/ zig-pico Public archive

Not so scuffed Zig project for using the Raspberry Pi Pico SDK

License

Notifications You must be signed in to change notification settings

paperdev-code/zig-pico

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update

Going to do a complete rewrite as this doesn't work on Zig 0.10.x, archiving.

- Paperdev

Zig on the Raspberry Pi Pico

Zig on the Raspberry Pi Pico without losing access to the SDK.

Requirements

Install the Pico SDK dependencies

sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib

Clone the Pico SDK

git clone https://github.com/raspberrypi/pico-sdk path/to/pico-sdk

Make sure PICO_SDK_PATH is set

export PICO_SDK_PATH path/to/pico-sdk

Usage

Check build.zig and example/main.zig, it's fairly self explanatory.

Build

To build the example for the Pico W

zig build

Running

If you have picotool installed, load the resulting uf2 file

picotool load -f zig-out/uf2/pico-app.uf2

Todo

  • integrate cmake into zig build
  • add include paths of pico libraries to app
  • optimize cmake build steps
  • wrap pico-sdk functions into Pkgs
  • ???
  • profit

License

MIT

About

Not so scuffed Zig project for using the Raspberry Pi Pico SDK

Topics

Resources

License

Stars

Watchers

Forks