aboutsummaryrefslogtreecommitdiffstats
path: root/os/various/gdb.mk
diff options
context:
space:
mode:
Diffstat (limited to 'os/various/gdb.mk')
-rw-r--r--os/various/gdb.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/os/various/gdb.mk b/os/various/gdb.mk
new file mode 100644
index 0000000..aa636a8
--- /dev/null
+++ b/os/various/gdb.mk
@@ -0,0 +1,13 @@
+GDB ?= arm-none-eabi-gdb
+GDB_PROGRAM ?= $(BUILDDIR)/$(PROJECT).elf
+GDB_PORT ?= 2331
+GDB_START_ADDRESS ?= 0
+GDB_BREAK ?= main
+
+gdb-debug:
+ printf "target remote localhost:$(GDB_PORT)\nmem $(GDB_START_ADDRESS) 0\nbreak $(GDB_BREAK)\nload\nmon reset\ncontinue" > .gdbinit
+ $(GDB) --command=.gdbinit $(GDB_PROGRAM)
+
+
+
+.PHONY: gdb-debug