From 690fab5c51b538b424b455ca81510be7370672a7 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Sat, 2 Sep 2023 05:33:12 +0200 Subject: [PATCH] Improved debugger experience --- .cargo/config.toml | 4 ++-- .embed.toml | 2 ++ .gdbinit | 2 -- wrapper.sh | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .embed.toml delete mode 100644 .gdbinit create mode 100755 wrapper.sh diff --git a/.cargo/config.toml b/.cargo/config.toml index 2fbea76..9876bd2 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,10 +3,10 @@ build-std = ["core"] build-std-features = ["panic_immediate_abort"] [target.'cfg(all(target_arch = "arm", target_os = "none"))'] -runner = "probe-rs run --chip RP2040" +runner = "./wrapper.sh" [build] target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ [env] -DEFMT_LOG = "debug" +DEFMT_LOG = "warn,rp=trace,bootloader=trace" diff --git a/.embed.toml b/.embed.toml new file mode 100644 index 0000000..c0614e5 --- /dev/null +++ b/.embed.toml @@ -0,0 +1,2 @@ +[default.general] +chip = "rp2040" diff --git a/.gdbinit b/.gdbinit deleted file mode 100644 index 0670c01..0000000 --- a/.gdbinit +++ /dev/null @@ -1,2 +0,0 @@ -file target/thumbv6m-none-eabi/debug/rp -target remote :1337 diff --git a/wrapper.sh b/wrapper.sh new file mode 100755 index 0000000..370f144 --- /dev/null +++ b/wrapper.sh @@ -0,0 +1,3 @@ +#!/bin/bash +probe-run --chip RP2040 --log-format="{L} {s} +└─ [{t}] {m} @ {F}:{l}" $@