{"id":13599840,"url":"https://github.com/probe-rs/probe-rs","last_synced_at":"2025-05-14T08:05:06.017Z","repository":{"id":37731885,"uuid":"170021740","full_name":"probe-rs/probe-rs","owner":"probe-rs","description":"A debugging toolset and library for debugging embedded ARM and RISC-V targets on a separate host","archived":false,"fork":false,"pushed_at":"2025-05-13T22:56:08.000Z","size":37966,"stargazers_count":2109,"open_issues_count":299,"forks_count":430,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-14T08:02:54.309Z","etag":null,"topics":["arm","arm-cores","coresight","daplink","debug","debug-probes","jlink","probe-rs","riscv","rust","stlink"],"latest_commit_sha":null,"homepage":"https://probe.rs","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/probe-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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,"zenodo":null},"funding":{"github":["probe-rs"]}},"created_at":"2019-02-10T20:13:01.000Z","updated_at":"2025-05-14T01:36:43.000Z","dependencies_parsed_at":"2023-12-25T08:02:30.757Z","dependency_job_id":"d4bb9f14-c910-4b5c-aa81-1dab0062f602","html_url":"https://github.com/probe-rs/probe-rs","commit_stats":{"total_commits":4329,"total_committers":252,"mean_commits":"17.178571428571427","dds":0.8242088242088242,"last_synced_commit":"83d08aafe62c3de959da89f33c0b1c609a8eeee3"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-rs%2Fprobe-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-rs%2Fprobe-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-rs%2Fprobe-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probe-rs%2Fprobe-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probe-rs","download_url":"https://codeload.github.com/probe-rs/probe-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101588,"owners_count":22014907,"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":["arm","arm-cores","coresight","daplink","debug","debug-probes","jlink","probe-rs","riscv","rust","stlink"],"created_at":"2024-08-01T17:01:13.425Z","updated_at":"2025-05-14T08:05:06.010Z","avatar_url":"https://github.com/probe-rs.png","language":"Rust","funding_links":["https://github.com/sponsors/probe-rs","https://github.com/sponsors/probe-rs/"],"categories":["Rust","CPU RISC-V","Tools","Recently Updated"],"sub_categories":["网络服务_其他","Paid and commercially available materials","[Sep 15, 2024](/content/2024/09/15/README.md)"],"readme":"# probe-rs\n\na modern, embedded debugging toolkit,\nwritten in Rust\n\n[![crates.io](https://img.shields.io/crates/v/probe-rs)](https://crates.io/crates/probe-rs) [![documentation](https://docs.rs/probe-rs/badge.svg)](https://docs.rs/probe-rs) [![Actions Status](https://img.shields.io/github/actions/workflow/status/probe-rs/probe-rs/ci.yml?branch=master)](https://github.com/probe-rs/probe-rs/actions) [![chat](https://img.shields.io/badge/chat-probe--rs%3Amatrix.org-brightgreen)](https://matrix.to/#/#probe-rs:matrix.org) ![GitHub Sponsors](https://img.shields.io/github/sponsors/probe-rs)\n\nThe goal of this library is to provide a toolkit to interact with a variety of embedded MCUs and debug probes and provides a direct interface to the debug probe,\nwhich then enables other software to use its debug functionality.\n\nAdditionally the project offers a variety of tools to be used directly for flashing and debugging, such as cargo extensions, a VS Code extension, a GDB server and a standalone CLI.\n\n## Functionality\n\nAs of version 0.27.0 this library can:\n\n- Connect to a DAPLink, STLink, JLink, FTDI probes, ESP32 devices with USB JTAG, WLink and the Blackmagic probe.\n- Talk to ARM, Risc-V and Xtensa cores via SWD or JTAG.\n- Read and write arbitrary memory of the target.\n- Halt, run, step and step any core, operate breakpoints, enable trace functionality and much more.\n- Download ELF, BIN and IHEX binaries using standard CMSIS-Pack flash algorithms.\n- Debug a target via the CLI, VSCode (MS-DAP) and GDB.\n\nTo see what new functionality gets added every release, have a look at the [CHANGELOG](CHANGELOG.md)\n\n## Support\n\nIf you think probe-rs makes your embedded journey more enjoyable or even earns you money, please consider supporting the project on [Github Sponsors](https://github.com/sponsors/probe-rs/) for better support and more features.\n\n## Tools\n\nIn addition to being a library, probe-rs also includes a suite of tools which can be used for flashing and debugging.\n\n### Installation\n\nThe recommended way to install the tools is to download a precompiled version, using one of the methods below.\nSee \u003chttps://probe.rs/docs/getting-started/installation\u003e for a more detailed guide.\n\n### cargo-flash\n\nThe `cargo-flash` utility can be used as a cargo subcommand to download a compiled Rust program onto a target device. It can also be used to download arbitrary ELF files that might come out of a C/C++ compiler. Have a look at [cargo-flash](https://probe.rs/docs/tools/cargo-flash) for more information.\n\n### cargo-embed\n\nIf you are looking for a more extended debugging experience, please have a look at [cargo-embed](https://probe.rs/docs/tools/cargo-embed) which provides support for GDB, RTT, and config files.\n\n### Editors and IDEs\n\nWe have implemented the [Microsoft Debug Adapter Protocol (DAP)](https://microsoft.github.io/debug-adapter-protocol/). This makes embedded debugging via probe-rs available in modern code editors implementing the standard, such as VSCode. The DAP website includes [a list of editors and IDEs which support DAP](https://microsoft.github.io/debug-adapter-protocol/implementors/tools/).\n\n#### VSCode\n\nThe probe-rs website includes [VSCode configuration instructions](https://probe.rs/docs/tools/debugger).\n\n## Usage Examples\n\n### Halting the attached chip\n\n```rust,no_run\nuse probe_rs::probe::{list::Lister, Probe};\nuse probe_rs::Permissions;\n\nfn main() -\u003e Result\u003c(), probe_rs::Error\u003e {\n    // Get a list of all available debug probes.\n    let lister = Lister::new();\n\n    let probes = lister.list_all();\n\n    // Use the first probe found.\n    let mut probe = probes[0].open()?;\n\n    // Attach to a chip.\n    let mut session = probe.attach(\"nRF52840_xxAA\", Permissions::default())?;\n\n    // Select a core.\n    let mut core = session.core(0)?;\n\n    // Halt the attached core.\n    core.halt(std::time::Duration::from_millis(10))?;\n\n    Ok(())\n}\n```\n\n### Reading from RAM\n\n```rust,no_run\nuse probe_rs::{MemoryInterface, Permissions, Session, SessionConfig};\nuse probe_rs::probe::WireProtocol;\n\nfn main() -\u003e Result\u003c(), probe_rs::Error\u003e {\n    // Attach to a chip.\n    let speed = Some(5500);\n    let protocol = Some(WireProtocol::Swd);\n    let session_config = SessionConfig {\n      speed,\n      protocol,\n      ..Default::default()\n    };\n\n    let mut session = Session::auto_attach(\"nRF52840_xxAA\", session_config)?;\n\n    // Select a core.\n    let mut core = session.core(0)?;\n\n    // Read a block of 50 32 bit words.\n    let mut buff = [0u32; 50];\n    core.read_32(0x2000_0000, \u0026mut buff)?;\n\n    // Read a single 32 bit word.\n    let word = core.read_word_32(0x2000_0000)?;\n\n    // Writing is just as simple.\n    let buff = [0u32; 50];\n    core.write_32(0x2000_0000, \u0026buff)?;\n\n    // of course we can also write 8bit words.\n    let buff = [0u8; 50];\n    core.write_8(0x2000_0000, \u0026buff)?;\n\n    Ok(())\n}\n```\n\n## FAQ\n\n### I need help!\n\nDon't hesitate to [file an issue](https://github.com/probe-rs/probe-rs/issues/new), ask questions on [Matrix](https://matrix.to/#/#probe-rs:matrix.org), or contact [@Yatekii](https://github.com/Yatekii) via e-mail.\n\nThere is also a [troubleshooting section](https://probe.rs/docs/knowledge-base/troubleshooting) on the [project page](https://probe.rs/).\n\n### How can I help?\n\nPlease have a look at the issues or open one if you feel that something is needed.\n\nAny contributions are very welcome!\n\nAlso have a look at [CONTRIBUTING.md](CONTRIBUTING.md).\n\n### Our company needs feature X and would pay for its development\n\nPlease reach out to [@Yatekii](https://github.com/Yatekii)\n\n### Building\n\nBuilding requires Rust and Cargo which can be installed [using rustup](https://rustup.rs/). On Linux these can be installed with your package manager:\n\n```console\n# Ubuntu\n\u003e sudo apt install -y libudev-dev\n\n# Fedora\n\u003e sudo dnf install -y libudev-devel\n```\n\n### Adding Targets\n\nTarget files are generated using [target-gen](https://github.com/probe-rs/probe-rs/tree/master/target-gen) from CMSIS packs provided [here](https://developer.arm.com/tools-and-software/embedded/cmsis/cmsis-search).\nGenerated files are then placed in `probe-rs/targets` for inclusion in the probe-rs project.\n\n### Updating STM32 targets\n\nSTM32 memory region data has been proven unreliable on multiple occasions. We now rely on [stm32-data](https://github.com/embassy-rs/stm32-data/tree/main) for the correct values. Use target-gen to update the list of devices and their flash algorithms, then use the https://github.com/bugadani/stm-probers tool to regenerate memory maps for all STM32 devices.\n\n### Writing new flash algorithms\n\nIf there is no CMSIS-Pack with a flash algorithm available, it is necessary to write a target definition and a flash algorithm by oneself.\nYou can use our [template](https://github.com/probe-rs/flash-algorithm-template) for writing an algorithm. Please follow the instructions in the `README.md` in that repo.\n\n## Acknowledgements\n\nIn early stages of this library, we profited invaluably from the pyOCD code to understand how flashing works. Also it's always a good reference to cross check how ARM specific things work. So, a big thank you to the team behind pyOCD!\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  http://opensource.org/licenses/MIT) at your option.\n\n## Contributing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobe-rs%2Fprobe-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobe-rs%2Fprobe-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobe-rs%2Fprobe-rs/lists"}