diff options
Diffstat (limited to 'lib/chibios-contrib/os/various/gdb.mk')
-rw-r--r-- | lib/chibios-contrib/os/various/gdb.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/various/gdb.mk b/lib/chibios-contrib/os/various/gdb.mk new file mode 100644 index 000000000..aa636a844 --- /dev/null +++ b/lib/chibios-contrib/os/various/gdb.mk | |||
@@ -0,0 +1,13 @@ | |||
1 | GDB ?= arm-none-eabi-gdb | ||
2 | GDB_PROGRAM ?= $(BUILDDIR)/$(PROJECT).elf | ||
3 | GDB_PORT ?= 2331 | ||
4 | GDB_START_ADDRESS ?= 0 | ||
5 | GDB_BREAK ?= main | ||
6 | |||
7 | gdb-debug: | ||
8 | printf "target remote localhost:$(GDB_PORT)\nmem $(GDB_START_ADDRESS) 0\nbreak $(GDB_BREAK)\nload\nmon reset\ncontinue" > .gdbinit | ||
9 | $(GDB) --command=.gdbinit $(GDB_PROGRAM) | ||
10 | |||
11 | |||
12 | |||
13 | .PHONY: gdb-debug | ||