mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
ff00096a39
MSPDEBUGFLAGS is evaluated only in the same file. Its value does not need to be exported. This will also prevent evaluating 'PORT' for MSPDEBUGFLAGS when not needed.
28 lines
840 B
Makefile
28 lines
840 B
Makefile
## the cpu to build for
|
|
export CPU = msp430fxyz
|
|
export CPU_MODEL = msp430f1612
|
|
|
|
# set default port depending on operating system
|
|
PORT_LINUX ?= /dev/ttyUSB0
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|
# setup serial terminal
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
# setup flash tool
|
|
export PROGRAMMER ?= olimex
|
|
MSPDEBUGFLAGS += -j $(PROGRAMMER)
|
|
ifeq ($(strip $(PROGRAMMER)),uif)
|
|
MSPDEBUGFLAGS += -d $(PORT)
|
|
endif
|
|
FLASHER ?= mspdebug
|
|
FFLAGS = $(MSPDEBUGFLAGS) "prog $(HEXFILE)"
|
|
|
|
# setup debugger
|
|
DEBUGSERVER = $(FLASHER)
|
|
DEBUGSERVER_FLAGS = $(MSPDEBUGFLAGS) gdb
|
|
DEBUGGER = $(PREFIX)gdb
|
|
DEBUGGER_FLAGS = --tui --ex="target remote localhost:2000" --ex "monitor reset halt" --ex load -ex "monitor reset halt" $(ELFFILE)
|
|
|
|
# export common msb-430 includes
|
|
export INCLUDES += -I$(RIOTBOARD)/common/msb-430/include
|