aboutsummaryrefslogtreecommitdiff
path: root/bin/debug
blob: 983b9bb22535681f75c9fcdf2ce1b83aebb838ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

PROJ="${1?'project'}"

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)