1
0
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:
Alexandre Abadie 2020-12-01 17:46:21 +01:00 committed by GitHub
commit edcea0b9f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 20 deletions

View File

@ -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

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