aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/os/various/gdb.mk
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/os/various/gdb.mk')
-rw-r--r--lib/chibios-contrib/os/various/gdb.mk13
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 @@
1GDB ?= arm-none-eabi-gdb
2GDB_PROGRAM ?= $(BUILDDIR)/$(PROJECT).elf
3GDB_PORT ?= 2331
4GDB_START_ADDRESS ?= 0
5GDB_BREAK ?= main
6
7gdb-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