diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..e13123c --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,8 @@ +[target.thumbv6m-none-eabi] +runner = "probe-rs run --chip RP2040" + +[build] +target = "thumbv6m-none-eabi" + +[unstable] +build-std = ["core", "alloc"] diff --git a/.run/Flash_Pico_W.run.xml b/.run/Flash_Pico_W.run.xml new file mode 100644 index 0000000..6161567 --- /dev/null +++ b/.run/Flash_Pico_W.run.xml @@ -0,0 +1,15 @@ + + + + diff --git a/README.md b/README.md index 7b4c6a1..ac3ac2d 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,27 @@ flatpak run org.example.rustdevshell | **flip-link** | Stack overflow protection for embedded | | **tea** | Gitea CLI for repository management | +## Flashing & IDE Integration + +This project is configured for seamless flashing from the IDE or terminal. + +### 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". + +### Flashing from Terminal + +You can flash the Pico W by running: + +```bash +cargo run --release +``` + +This uses `probe-rs` (configured in `.cargo/config.toml`) to flash and run the binary via a CMSIS-DAP debugger or similar. + +If you prefer to use the UF2 bootloader (dragging to the drive or using `elf2uf2-rs`), you can change the runner in `.cargo/config.toml` to: +`runner = "elf2uf2-rs -d"` + ## Testing & Development Features Build and testing tools: