makefiles/tools: add common mspdebug makefile

This commit is contained in:
Alexandre Abadie 2020-12-01 12:10:43 +01:00
parent e2af953cc8
commit a74e005fbb
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -0,0 +1,17 @@
MSPDEBUGFLAGS += -j $(MSPDEBUG_PROGRAMMER)
ifeq ($(strip $(MSPDEBUG_PROGRAMMER)),uif)
MSPDEBUGFLAGS += -d $(PROG_DEV)
endif
FLASHER ?= mspdebug
FLASHFILE ?= $(HEXFILE)
FFLAGS = $(MSPDEBUGFLAGS) "prog $(FLASHFILE)"
# setup debugger
DEBUGSERVER = $(FLASHER)
DEBUGSERVER_FLAGS = $(MSPDEBUGFLAGS) gdb
DEBUGGER = $(PREFIX)gdb
DEBUGGER_FLAGS = --ex="target remote localhost:2000" --ex "monitor reset halt" --ex load -ex "monitor reset halt" $(ELFFILE)
# setup reset tool
RESET ?= mspdebug
RESET_FLAGS ?= $(MSPDEBUGFLAGS) reset