2020-12-01 12:10:43 +01:00
|
|
|
FLASHFILE ?= $(HEXFILE)
|
2023-05-06 23:26:00 +02:00
|
|
|
MSPDEBUG_PROGRAMMER ?= olimex
|
2024-02-06 15:23:02 +01:00
|
|
|
MSPDEBUG ?= $(RIOTTOOLS)/mspdebug/mspdebug
|
|
|
|
FLASHER ?= $(MSPDEBUG)
|
|
|
|
FLASHDEPS += $(MSPDEBUG)
|
2023-05-06 23:26:00 +02:00
|
|
|
|
|
|
|
DEBUGSERVER_PORT ?= 2000
|
|
|
|
DEBUGGER := $(RIOTTOOLS)/mspdebug/debug.sh
|
|
|
|
MSPDEBUG_PROTOCOL ?= JTAG
|
|
|
|
MSPDEBUG_TTY ?=
|
|
|
|
|
2024-02-06 15:23:02 +01:00
|
|
|
DEBUG_TARGET := $(call uppercase_and_underscore,$(CPU_MODEL))
|
|
|
|
|
2023-05-06 23:26:00 +02:00
|
|
|
ifeq (JTAG,$(strip $(MSPDEBUG_PROTOCOL)))
|
|
|
|
FFLAGS += -j
|
|
|
|
endif
|
|
|
|
ifneq (,$(strip $(MSPDEBUG_TTY)))
|
|
|
|
FFLAGS += -d "$(MSPDEBUG_TTY)"
|
|
|
|
endif
|
|
|
|
ifneq (,$(strip $(DEBUG_ADAPTER_ID)))
|
|
|
|
FFLAGS += -s "$(DEBUG_ADAPTER_ID)"
|
|
|
|
endif
|
2024-02-06 15:23:02 +01:00
|
|
|
FFLAGS += --expect-id "$(DEBUG_TARGET)"
|
2023-05-06 23:26:00 +02:00
|
|
|
FFLAGS += $(MSPDEBUG_PROGRAMMER) "prog $(FLASHFILE)"
|
2020-12-01 12:10:43 +01:00
|
|
|
|
2024-02-06 15:23:02 +01:00
|
|
|
DEBUGGER_FLAGS = $(MSPDEBUG) $(MSPDEBUG_PROGRAMMER) $(MSPDEBUG_PROTOCOL) "$(MSPDEBUG_TTY)" "$(DEBUG_ADAPTER_ID)" "$(DEBUG_TARGET)" $(DEBUGSERVER_PORT) $(ELFFILE) $(PREFIX) $(RIOTBASE)
|
2023-05-06 23:26:00 +02:00
|
|
|
DEBUGSERVER := $(RIOTTOOLS)/mspdebug/debug_srv.sh
|
2024-02-06 15:23:02 +01:00
|
|
|
DEBUGSERVER_FLAGS = $(MSPDEBUG) $(MSPDEBUG_PROGRAMMER) $(MSPDEBUG_PROTOCOL) "$(MSPDEBUG_TTY)" "$(DEBUG_ADAPTER_ID)" "$(DEBUG_TARGET)" $(DEBUGSERVER_PORT)
|
2020-12-01 12:10:43 +01:00
|
|
|
|
|
|
|
# setup reset tool
|
2024-02-06 15:23:02 +01:00
|
|
|
RESET ?= $(MSPDEBUG)
|
2023-05-06 23:26:00 +02:00
|
|
|
RESET_FLAGS ?= -j $(MSPDEBUG_PROGRAMMER) reset
|