diff --git a/.cargo/config.toml b/.cargo/config.toml index 14eed71..d1ef37b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [target.thumbv6m-none-eabi] -runner = "sh ./probe-rs-nix run --chip RP2040" +runner = "direnv exec . probe-rs run --chip RP2040" [build] target = "thumbv6m-none-eabi" diff --git a/README.md b/README.md index a5bbe4e..d544f5a 100644 --- a/README.md +++ b/README.md @@ -104,10 +104,23 @@ flatpak run org.example.rustdevshell This project is configured for seamless flashing from the IDE or terminal. +### Troubleshooting: No Connected Probes + +If you encounter the error `Error: No connected probes were found` or udev rule warnings, check the following: + +1. **Hardware Connection**: Ensure your Raspberry Pi Pico W is connected via a compatible debugger (e.g., another Pico running `picoprobe`, a CMSIS-DAP debugger, or an ESP-Prog). +2. **Udev Rules (Linux)**: `probe-rs` needs permission to access the USB device. + - Create a file named `/etc/udev/rules.d/69-probe-rs.rules`. + - Add the rules provided by the [probe-rs documentation](https://probe.rs/docs/getting-started/probe-setup/). + - Reload rules: `sudo udevadm control --reload` and `sudo udevadm trigger`. +3. **Group Membership**: Ensure your user is in the `plugdev` or `dialout` group (depending on your distro's udev rules). + ### Flashing from IDE If you are using **RustRover** or **IntelliJ Rust**, you can use the "Flash Pico W" run configuration provided in the `.run` folder. Just select it from the run menu and click "Run". +**Note:** The project is configured to use `direnv exec .` in `.cargo/config.toml` to ensure `probe-rs` is available. Ensure `direnv` is installed and allowed (`direnv allow`) on your system. For the best experience, we recommend installing the **direnv** plugin for your IDE. + ### Flashing from Terminal You can flash the Pico W by running: diff --git a/probe-rs-nix b/probe-rs-nix deleted file mode 100755 index eb97cc8..0000000 --- a/probe-rs-nix +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# Wrapper to run probe-rs within the Nix environment via direnv -exec direnv exec "$(dirname "$0")" probe-rs "$@"