{"id":23276743,"url":"https://github.com/gamunu/raspberry-pi-pico-rs","last_synced_at":"2025-08-16T10:39:07.411Z","repository":{"id":76854022,"uuid":"556839633","full_name":"gamunu/raspberry-pi-pico-rs","owner":"gamunu","description":"Collection of Raspberry Pi Pico projects built on Rust","archived":false,"fork":false,"pushed_at":"2024-10-25T21:31:34.000Z","size":35,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-15T23:48:56.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gamunu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-24T16:00:13.000Z","updated_at":"2024-03-16T16:43:43.000Z","dependencies_parsed_at":"2024-05-05T10:42:25.577Z","dependency_job_id":null,"html_url":"https://github.com/gamunu/raspberry-pi-pico-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamunu%2Fraspberry-pi-pico-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamunu%2Fraspberry-pi-pico-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamunu%2Fraspberry-pi-pico-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamunu%2Fraspberry-pi-pico-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamunu","download_url":"https://codeload.github.com/gamunu/raspberry-pi-pico-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230506755,"owners_count":18236925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-19T21:36:53.779Z","updated_at":"2024-12-19T21:36:54.408Z","avatar_url":"https://github.com/gamunu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Setup\n\nRun the following commands to get your rust environment setup:\n\n```bash\n$ rustup target add thumbv6m-none-eabi\n$ cargo install cargo-binutils\n$ rustup component add llvm-tools-preview\n```\n\nInstall flip-link to ensure memory safety. `flip-link` implements stack overflow solution. Linking your program with\nflip-link produces the flipped memory layout, which is memory-safe in presence of stack overflows.\n\n```bash\n$ cargo install flip-link --locked\n```\n\n## One Pico Board Setup\n\nIf you want to work with one Pico microcontroller, then you will need to convert the cargo build output binary (.ELF)\ninto the.UF2 binary format. You can do this with a tool called elf2uf2. In your terminal, run the following in the\nproject’s directory:\n\n```bash\n$ cargo install elf2uf2-rs --locked\n```\n\nAfter the tool is installed, you can use the tool after a build of your project to produce a.uf2 file.\n\n```bash\n$ cargo build --release\n$ elf2uf2-rs target/thumbv6m-none-eabi/release/blink\n```\n\nIf you want to automatically run elf2uf2 when you type cargo run or cargo build - in the .cargo/config.toml, you need to\nset your runner to elf2uf2-rs:\n\n```toml\n[target.'cfg(all(target_arch = \"arm\", target_os = \"none\"))']\nrunner = \"elf2uf2-rs\"\n```\n\nAnd for further automation, if you want to automatically flash your Pico board with the new uf2 binary, put your Pico in\ntransfer mode, connect it to the usb, and add the -d option like so:\n\n```bash\n$ cargo build --release\n$ elf2uf2-rs -d target/thumbv6m-none-eabi/release/blink\n```\n\n## Two Pico Board Setup\n\nIf you haven’t set up your board for debugging yet, you can start\nhere: https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html#debugging-using-another-raspberry-pi-pico\n\nMake sure to download the picoprobe UF2 file from the link above and flash one of the Picos with this file. This will\nbecome your debug Pico.\n\nAlso, see Appendix A of https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf for a diagram of how to\nwire your two Picos together for debugging. This is where you will be using the breadboard and wires.\n\nWith a picoprobe debugger, we can use the Rust default output format binary (.ELF). To flash the.elf file onto the Pico,\nwe will use OpenoCD.\n\nLet’s install OpenoCD\n\nIf you have used the C/C++ Pico SDK, you probably already have this installed. You can skip this section if you do.\n\nFor macOS:\n\n```bash\n$ brew install open-ocd\n```\n\nFor Ubuntu:\n\n```bash\n$ sudo apt update\n$ sudo apt -y install openocd\n```\n\nLet’s Install GDB\n\nIf you have used the C/C++ Pico SDK, you probably already have this installed. You can skip this section if you do.\n\nFor macOS:\n\n```bash\n$ brew tap ArmMbed/homebrew-formulae\n$ brew install arm-none-eabi-gcc\n```\n\nFor Ubuntu:\n\n```bash\n$ sudo apt install git gdb-multiarch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamunu%2Fraspberry-pi-pico-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamunu%2Fraspberry-pi-pico-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamunu%2Fraspberry-pi-pico-rs/lists"}