diff options
author | Paul Selkirk <paul@psgd.org> | 2020-10-15 14:04:19 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2020-10-15 14:04:19 -0400 |
commit | 9177a48f05b09fe48c0b81347b69c9f024180ed1 (patch) | |
tree | 5bfb4599019c897cebb3e8ef8aa3f2804379e3b0 | |
parent | 307f309133be53ef440654dff3ee70521bcafb45 (diff) |
Ubuntu replaced arm-none-eabi-gdb with gdb-multiarch over 2 years ago, but
maybe we're running an old version that still has it? Check for both.
-rwxr-xr-x | bin/debug | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -14,7 +14,13 @@ if [ "x`lsusb -d 0483:374b`" != "x" ]; then fi $OPENOCD -f $OPENOCD_BOARD_DIR/$OPENOCD_PROC_FILE & -GDB=arm-none-eabi-gdb +for gdb in gdb-multiarch arm-none-eabi-gdb; do + if command -v $gdb &>/dev/null; then + GDB=$gdb + break + fi +done + $GDB -ex "target remote localhost:3333" -ex "set remote hardware-breakpoint-limit 6" -ex "set remote hardware-watchpoint-limit 4" $PROJ.elf kill -9 $(pidof $OPENOCD) |