diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..45a2207 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,45 @@ +// The format of this file is specified in https://probe.rs/docs/tools/vscode/#start-a-debug-session-with-minimum-configuration +{ + "version": "0.2.0", + "configurations": [ + { + "preLaunchTask": "rust: cargo build", + "type": "probe-rs-debug", + "request": "launch", + "name": "rp2040-project", + "cwd": "${workspaceFolder}", + "chip": "rp2040", + // RP2040 doesn't support connectUnderReset + "connectUnderReset": false, + "speed": 4000, + "runtimeExecutable": "probe-rs-debugger", + "runtimeArgs": [ + "debug" + ], + "flashingConfig": { + "flashingEnabled": true, + "resetAfterFlashing": true, + "haltAfterReset": true, + }, + "coreConfigs": [ + { + "coreIndex": 0, + "programBinary": "target/thumbv6m-none-eabi/debug/rp2040-project-template", + "chip": "RP2040", + // Uncomment this if you've downloaded the SVD from + // https://github.com/raspberrypi/pico-sdk/raw/1.3.1/src/rp2040/hardware_regs/rp2040.svd + // and placed it in the .vscode directory + // "svdFile": "./.vscode/rp2040.svd", + "rttEnabled": true, + "options": { + "env": { + "DEFMT_LOG": "debug" + } + }, + } + ], + "consoleLogLevel": "Info", //Error, Warn, Info, Debug, Trace + "wireProtocol": "Swd" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index ae6f1a2..c1f7587 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,24 @@ Some of the options for your `runner` are listed below: $ cargo run --release ``` +* **probe-rs-debugger** + + *Step 1* - Download [`probe-rs-debugger VSCode plugin 0.4.0`](https://github.com/probe-rs/vscode/releases/download/v0.4.0/probe-rs-debugger-0.4.0.vsix) + + *Step 2* - Install `probe-rs-debugger VSCode plugin` + ```console + $ code --install-extension probe-rs-debugger-0.4.0.vsix + ``` + + *Step 3* - Install `probe-rs-debugger` + ```console + $ cargo install --git https://github.com/probe-rs/probe-rs probe-rs-debugger + ``` + + *Step 4* - Open this project in VSCode + + *Step 5* - Launch a debug session by choosing `Run`>`Start Debugging` (or press F5) + * **Loading a UF2 over USB** *Step 1* - Install [`elf2uf2-rs`](https://github.com/JoNil/elf2uf2-rs):