diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-06-10 15:25:25 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-06-10 15:25:25 -0700 |
commit | 01cc10090feba7d9a9e3183744292e1198ebbbc0 (patch) | |
tree | 8ea9f2f6acdccbdb3ad6226b7e37f9e159d8904e | |
parent | 9cb0177cdf178e7f941341b98bf85289c6b30b1f (diff) |
Allow users to override the GDB port
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,6 +14,7 @@ endif # Default target BOARD ?= freedom-e300-hifive1 PROGRAM ?= demo_gpio +GDB_PORT ?= 3333 # Variables the user probably shouldn't override. builddir := work/build @@ -209,7 +210,7 @@ OPENOCDARGS += -f $(OPENOCDCFG) GDB_UPLOAD_ARGS ?= --batch GDB_UPLOAD_CMDS += -ex "set remotetimeout 240" -GDB_UPLOAD_CMDS += -ex "target extended-remote localhost:3333" +GDB_UPLOAD_CMDS += -ex "target extended-remote localhost:$(GDB_PORT)" GDB_UPLOAD_CMDS += -ex "monitor reset halt" GDB_UPLOAD_CMDS += -ex "monitor flash protect 0 64 last off" GDB_UPLOAD_CMDS += -ex "load" @@ -230,7 +231,7 @@ run_openocd: $(RISCV_OPENOCD) $(OPENOCDARGS) GDBCMDS += -ex "set remotetimeout 240" -GDBCMDS += -ex "target extended-remote localhost:3333" +GDBCMDS += -ex "target extended-remote localhost:$(GDB_PORT)" run_gdb: $(RISCV_GDB) $(PROGRAM_DIR)/$(PROGRAM) $(GDBARGS) $(GDBCMDS) |