mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
Merge pull request #15533 from aabadie/pr/tools/mspdebug_programmer
tools: add common makefile for mspdebug programmer
This commit is contained in:
commit
edcea0b9f9
@ -1,3 +1,5 @@
|
||||
INCLUDES += -I$(RIOTBOARD)/common/msb-430/include
|
||||
|
||||
# set default port depending on operating system
|
||||
PORT_LINUX ?= /dev/ttyUSB0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
@ -5,23 +7,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# setup flash tool
|
||||
PROGRAMMER ?= olimex
|
||||
MSPDEBUGFLAGS += -j $(PROGRAMMER)
|
||||
ifeq ($(strip $(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)
|
||||
|
||||
INCLUDES += -I$(RIOTBOARD)/common/msb-430/include
|
||||
|
||||
# setup reset tool
|
||||
RESET ?= mspdebug
|
||||
RESET_FLAGS ?= $(MSPDEBUGFLAGS) reset
|
||||
PROGRAMMER ?= mspdebug
|
||||
MSPDEBUG_PROGRAMMER ?= olimex
|
||||
|
17
makefiles/tools/mspdebug.inc.mk
Normal file
17
makefiles/tools/mspdebug.inc.mk
Normal 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
|
Loading…
Reference in New Issue
Block a user