aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/debug7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/debug b/bin/debug
index f6ede81..983b9bb 100755
--- a/bin/debug
+++ b/bin/debug
@@ -2,6 +2,11 @@
PROJ="${1?'project'}"
-GDB=arm-none-eabi-gdb
+OPENOCD=openocd
+OPENOCD_PROC_FILE=/usr/share/openocd/scripts/board/st_nucleo_f401re.cfg
+$OPENOCD -f $OPENOCD_BOARD_DIR/$OPENOCD_PROC_FILE &
+GDB=arm-none-eabi-gdb
$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)