{"id":15578983,"url":"https://github.com/supimdos/embassy-rp-skeleton","last_synced_at":"2025-08-22T03:32:11.442Z","repository":{"id":219854066,"uuid":"534002060","full_name":"SupImDos/embassy-rp-skeleton","owner":"SupImDos","description":"Project Skeleton for RP2040 Embedded Firmware using Embassy","archived":false,"fork":false,"pushed_at":"2024-09-03T14:25:41.000Z","size":35,"stargazers_count":30,"open_issues_count":2,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-11T14:11:45.695Z","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":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SupImDos.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-08T01:22:02.000Z","updated_at":"2024-11-27T20:02:12.000Z","dependencies_parsed_at":"2024-01-30T02:50:40.048Z","dependency_job_id":null,"html_url":"https://github.com/SupImDos/embassy-rp-skeleton","commit_stats":null,"previous_names":["supimdos/embassy-rp-skeleton"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupImDos%2Fembassy-rp-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupImDos%2Fembassy-rp-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupImDos%2Fembassy-rp-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupImDos%2Fembassy-rp-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SupImDos","download_url":"https://codeload.github.com/SupImDos/embassy-rp-skeleton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230554330,"owners_count":18244234,"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-10-02T19:13:31.259Z","updated_at":"2024-12-20T08:08:55.201Z","avatar_url":"https://github.com/SupImDos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Title --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=15% src=\"https://www.svgrepo.com/show/68860/microchip.svg\"\u003e\n  \u003ch1 align=\"center\"\u003eEmbassy RP Skeleton\u003c/h1\u003e\n\u003c/p\u003e\n\nThe **Embassy RP Skeleton** repository is a project template intended as a starting point for developing your own\nfirmware for the [`rp2040`][1] based on the [`embassy`][2] asynchronous embedded development framework for [Rust][3].\n\nIt includes all of the [`knurling-rs`][4] tooling ([`defmt`][5], [`defmt-rtt`][5], [`panic-probe`][5], [`flip-link`][6],\n[`probe-run`][7]) to enhance the embedded development process.\n\nThe default [`cargo`][8] runner is configured as [`probe-run`][7], so you can build, flash and run your firmware _with_\noutput from the device via a [`probe-rs`][9] compatible debug probe with the command:\n\n```shell\n$ cargo run\n```\n\nIf you want to use a different runner with your debugger (e.g., [`cargo-embed`][10], [`probe-rs-debugger`][11], etc.) or\nif you _aren't_ using a debugger and want the runner to flash the firmware via USB (e.g., [`elf2uf2-rs`][12],\n[`picotool`][13], etc.) then see: [Alternative Runners][14]\n\n## Table of Contents\n1. [Requirements](#requirements)\n2. [Setup](#setup)\n    1. [System Setup](#system-setup)\n    2. [Probe Setup](#probe-setup)\n    3. [Hardware Setup](#hardware-setup)\n3. [Usage](#usage)\n6. [Appendix](#appendix)\n\n## Requirements\n* Ubuntu\n* Raspberry Pi Pico\n* Debug Probe (*or* another Raspberry Pi Pico)\n* Rust Toolchain ([`cargo`][8], [`rustup`][15])\n\n## Setup\n### System Setup\n1. Install [Rust][3] and [`cargo`][8] using [`rustup`][15]\n```shell\n# Install `rustup` for Rust Toolchain\n$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\n2. Install Cortex-M Target Toolchain Support for [`Rust`][3]\n```shell\n# Install `thumbv6m-none-eabi` Target for `rp2040`\n$ rustup target add thumbv6m-none-eabi\n```\n\n3. Install [`probe-run`][7]\n```shell\n# Install Linux Dependencies\n$ sudo apt install -y libusb-1.0-0-dev libudev-dev\n\n# Install `probe-run`\n$ cargo install probe-run\n\n# (Optional) Install `udev` Rules and Reload\n$ sudo curl https://probe.rs/files/69-probe-rs.rules -o /etc/udev/rules.d/69-probe-rs.rules\n$ sudo udevadm control --reload\n$ sudo udevadm trigger\n\n# (Optional) Add User to `plugdev` Group\n$ sudo usermod -aG plugdev $USER\n```\n\n4. Install [`flip-link`][6]\n```shell\n# Install `flip-link`\n$ cargo install flip-link\n```\n\n### Probe Setup\nYou can use a Raspberry Pi Pico as a CMSIS-DAP debug probe.\n\n1. Download CMSIS-DAP debugger firmware [`DapperMime`][16] for the Raspberry Pi Pico\n2. Boot the Raspberry Pi Pico in \"Bootloader Mode\" by holding the _BOOTSEL_ button while plugging it in\n3. Open the mounted Raspberry Pi Pico storage device\n4. Copy the `raspberry_pi_pico-DapperMime.uf2` onto the Raspberry Pi Pico\n5. Firmware will be flashed to the Raspberry Pi Pico and it will disconnect\n\nAny [`probe-rs`][9] compatible debug probe can be used with [`probe-run`][7]. For a short list of alternative\ncompatible debug probes see: [Alternative Debug Probes][17].\n\n### Hardware Setup\n#### Connecting the Raspberry Pi Pico Debug Probe\nThe diagram below shows the wiring loom between Raspberry Pi Pico A (left) and Raspberry Pi Pico B (right), configuring\nRaspberry Pi Pico A as a debug probe.\n\n\u003c!-- Embed Image --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=50% src=\"https://user-images.githubusercontent.com/62866982/191892108-daabc0d6-5ec1-4265-8722-226c512b995c.svg\"\u003e\n\u003c/p\u003e\n\nThe connections shown in the diagram above are listed below.\n\n```\nPico A GND -\u003e Pico B GND\nPico A GP2 -\u003e Pico B SWCLK\nPico A GP3 -\u003e Pico B SWDIO\nPico A GP4/UART1 TX -\u003e Pico B GP1/UART0 RX\nPico A GP5/UART1 RX -\u003e Pico B GP0/UART0 TX\nPico A VSYS -\u003e Pico B VSYS\n```\n\nFor more information on connecting the two Raspberry Pi Picos, the wiring loom between them and its connections, see\nthe section _Appendix A \u003e Wiring Loom_ in: [Getting Started with Raspberry Pi Pico][18]\n\n#### Raspberry Pi Pico Dev Board\nAlternatively, a custom printed Raspberry Pi Pico Dev Board can be used to enhance development, which includes:\n\n* Debug Probe Host (Raspberry Pi Pico)\n* Detachable Target (Raspberry Pi Pico)\n* Serial Interface\n* Reset Button\n* Breakout Pins\n* Selection of _VSys_ or _VBus_ Power Sources\n\nThe custom printed Raspberry Pi Pico Dev board is shown below:\n\n\u003c!-- Embed Image --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=50% src=\"https://user-images.githubusercontent.com/62866982/191941119-a21dd273-d29b-49a5-8daf-5e4429268965.png\"\u003e\n\u003c/p\u003e\n\nFor more information on printing your own custom Raspberry Pi Pico Dev Board, see:\n[Raspberry Pi Pico Dev Board][19]\n\n## Usage\n#### Running\nTo run the firmware in debug mode:\n```shell\n$ cargo run\n```\n\nTo run the firmware in release mode:\n```shell\n$ cargo run --release\n```\n\n#### Logging\nTo change the default [`defmt`][5] log level, see `.cargo/config.toml`:\n```toml\n[env]\nDEFMT_LOG = \"trace\"\n```\n\nYou can also set the log level inline:\n```shell\n$ DEFMT_LOG=debug cargo run\n$ DEFMT_LOG=error cargo run --release\n```\n\n## Appendix\n#### Documentation\n* [Raspberry Pi Pico][1]\n* [Rust][3]\n* [Cargo][8]\n* [Rustup][15]\n* [Embassy][2]\n* [Knurling-RS `defmt`][5]\n* [Knurling-RS `flip-link`][6]\n* [Knurling-RS `probe-run`][7]\n* [Probe-RS `cargo-embed`][10]\n* [Probe-RS `probe-rs-debugger`][11]\n* [Raspberry Pi Pico `elf2uf2`][12]\n* [Raspberry Pi Pico `picotool`][13]\n* [CMSIS-DAP Firmware `DapperMime`][16]\n\n#### Resources\n* [Rust Embedded Book][20]\n* [Awesome Embedded Rust][21]\n* [Getting Started with Raspberry Pi Pico][22]\n* [Ferrous Systems Embedded Training][23]\n* [Ferrous Systems Embedded Teaching Material][24]\n* [RP-RS App Template][25]\n* [RP-RS Alternative Debug Probes][17]\n* [RP-RS Alternative Runners][14]\n* [Knurling-RS App Template][4]\n* [Probe-RS Probe Setup][9]\n* [Raspberry Pi Pico Dev Board][19]\n\n\n\u003c!-- Reference --\u003e\n[1]: https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html\n[2]: https://embassy.dev/dev/index.html\n[3]: https://www.rust-lang.org/\n[4]: https://github.com/knurling-rs/app-template\n[5]: https://github.com/knurling-rs/defmt\n[6]: https://github.com/knurling-rs/flip-link\n[7]: https://github.com/knurling-rs/probe-run\n[8]: https://doc.rust-lang.org/cargo/\n[9]: https://probe.rs/docs/getting-started/probe-setup/\n[10]: https://github.com/probe-rs/cargo-embed\n[11]: https://github.com/probe-rs/vscode\n[12]: https://github.com/JoNil/elf2uf2-rs\n[13]: https://github.com/raspberrypi/picotool\n[14]: https://github.com/rp-rs/rp2040-project-template#alternative-runners\n[15]: https://rustup.rs/\n[16]: https://github.com/majbthrd/DapperMime\n[17]: https://github.com/rp-rs/rp2040-project-template/blob/main/debug_probes.md\n[18]: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#picoprobe-wiring-section\n[19]: https://timsavage.github.io/rpi-pico-devboard/\n[20]: https://docs.rust-embedded.org/book/\n[21]: https://github.com/rust-embedded/awesome-embedded-rust\n[22]: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf\n[23]: https://embedded-trainings.ferrous-systems.com/\n[24]: https://github.com/ferrous-systems/teaching-material\n[25]: https://github.com/rp-rs/rp2040-project-template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupimdos%2Fembassy-rp-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupimdos%2Fembassy-rp-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupimdos%2Fembassy-rp-skeleton/lists"}