From f6282f33ffd1c07a2e6e18bde43764525d54dd49 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 19 Mar 2019 17:16:45 +0100 Subject: [PATCH] gdb with `cargo run` --- .cargo/config | 2 +- .gdbinit => openocd.gdb | 0 shell.nix | 3 +-- 3 files changed, 2 insertions(+), 3 deletions(-) rename .gdbinit => openocd.gdb (100%) diff --git a/.cargo/config b/.cargo/config index 7eb2ed4..a1f54ec 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,5 +1,5 @@ [target.thumbv7em-none-eabihf] -runner = 'gdb' +runner = "arm-none-eabihf-gdb -q -x openocd.gdb" rustflags = [ "-C", "link-arg=-Tlink.x", ] diff --git a/.gdbinit b/openocd.gdb similarity index 100% rename from .gdbinit rename to openocd.gdb diff --git a/shell.nix b/shell.nix index e5fbda8..2f098ff 100644 --- a/shell.nix +++ b/shell.nix @@ -41,7 +41,6 @@ stdenv.mkDerivation { # Let openocd output scroll by sleep 1 - echo "Run 'cargo build --release --features=semihosting'" - echo "Then '${targetPlatform.config}-gdb target/thumbv7em-none-eabihf/release/adc2tcp'" + echo "Run 'cargo run --release --features=semihosting'" ''; }