{"id":27228104,"url":"https://github.com/linouth/zig-pico","last_synced_at":"2026-03-04T12:03:58.700Z","repository":{"id":211282729,"uuid":"434393535","full_name":"Linouth/zig-pico","owner":"Linouth","description":"Framework for writing Zig applications for the RPi Pico.","archived":false,"fork":false,"pushed_at":"2022-03-12T18:40:39.000Z","size":375,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T12:58:47.208Z","etag":null,"topics":["bare-metal","rp2040","rpi-pico","zig","ziglang"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linouth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-12-02T22:29:10.000Z","updated_at":"2025-01-10T03:50:41.000Z","dependencies_parsed_at":"2023-12-07T15:46:58.325Z","dependency_job_id":null,"html_url":"https://github.com/Linouth/zig-pico","commit_stats":null,"previous_names":["linouth/zig-pico"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Linouth/zig-pico","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linouth%2Fzig-pico","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linouth%2Fzig-pico/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linouth%2Fzig-pico/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linouth%2Fzig-pico/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linouth","download_url":"https://codeload.github.com/Linouth/zig-pico/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linouth%2Fzig-pico/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30079565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T11:57:42.557Z","status":"ssl_error","status_checked_at":"2026-03-04T11:56:10.793Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bare-metal","rp2040","rpi-pico","zig","ziglang"],"created_at":"2025-04-10T12:36:01.750Z","updated_at":"2026-03-04T12:03:58.679Z","avatar_url":"https://github.com/Linouth.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-pico - RP2040/Pico SDK for Zig\n\nThis framework is for writing zig applications for the Pico microcontroller\n(RP2040). It is far from finished but can be a great starting point for your own\nprojects. The project is in active development so anyting can change still. Any\nhelp would also be appreciated.\n\nRight now it only runs from RAM, no QSPI flash support (boot-stage2) has been\nimplemented yet.\n\n## Usage\nCurrently you can build your own application by using a `build.zig` file like~\n```\nconst std = @import(\"std\");\nconst pico = @import(\"libs/zig-pico/build.zig\");\n\npub fn build(b: *std.build.Builder) !void {\n    const mode = b.standardReleaseOptions();\n\n    const pico_exe = pico.PicoExe.init(b, \"myproject\", \"src/main.zig\");\n    const exe = pico_exe.exe;\n    exe.setBuildMode(mode);\n    exe.install();\n}\n```\nFor flashing you have to convert the elf file to a uf2 file manually (with the\nuf2 tool from the pico-sdk repo) and copy it to the pico mass storage drive. You\ncould also use the picoboot tool for flashing.\n\nCurrently I mostly use a gdb session with the swd interface for flashing.\n\nIn the future this will be done with the zig build system itself.\n\n## Progress\n\n### Systems and Peripherals\n\nFollowing are systems and peripherals taken from the datasheet. \n\n- [ ] SIO\n    - [ ] Spinlocks\n    - [ ] Integer dividers\n    - [ ] Interpolators\n    - [ ] FIFOs\n- [ ] SysTick Timer\n- [ ] MPU\n- [x] NVIC\n- [ ] DMA\n- [ ] Core Supply Regulator\n- [ ] Power Control\n- [ ] Chip-Level Reset\n- [ ] Power-On State Machine\n- [x] Subsystem Resets\n- [ ] Clocks\n    - [x] XOSC\n    - [ ] ROSC\n- [x] PLL ❕\n- [x] GPIO ❕\n    - [x] Manual read and writes\n    - [x] Interrupts\n- [ ] PIO\n- [ ] USB\n- [ ] UART\n- [ ] I2C\n- [ ] SPI\n- [ ] PWM\n- [x] Timer\n- [ ] RTC\n- [ ] ADC and Temperatue Sensor\n- [ ] SSI\n\nPeripherals marked with ❕ are working, but could use some improvements.\n\n### General TODOs\n\nSome general TODOs. There are more TODOs sprinkled throughout the code.\n\n- [ ] Figure out how to use the set of functions provided in the Bootrom.\n  (float and double operations, memory operations, and more).\n- [ ] Find a way to determine at compile time which modules are used, and add\n  initialization code for these modules to the reset sequence.\n- [ ] Implement error handler in `crt0.zig`\n- [ ] Add a boot-stage2 bootloader.\n- [ ] Add on demand compilation (and caching) for the picoboot, pioasm and uf2\n  tools in the pico-sdk.\n\n## Notes\n\n- All peripherals are put in 'reset' state after a hard reset. You cannot write\n  to their registers while in the reset state. First set the 'RESETS' register\n  to enable the peripherals you need.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinouth%2Fzig-pico","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinouth%2Fzig-pico","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinouth%2Fzig-pico/lists"}