2013-03-10 16:50:50 +01:00
|
|
|
## the cpu to build for
|
2014-12-01 17:32:29 +01:00
|
|
|
export CPU = msp430fxyz
|
2015-09-16 17:18:10 +02:00
|
|
|
export CPU_MODEL = msp430f1612
|
2013-03-10 16:50:50 +01:00
|
|
|
|
2015-09-16 17:18:10 +02:00
|
|
|
# set default port depending on operating system
|
|
|
|
PORT_LINUX ?= /dev/ttyUSB0
|
2016-02-13 21:51:08 +01:00
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
2015-09-16 17:18:10 +02:00
|
|
|
# setup serial terminal
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
2013-12-19 12:02:23 +01:00
|
|
|
|
2015-09-16 17:18:10 +02:00
|
|
|
# setup flash tool
|
|
|
|
export OFLAGS = -O ihex
|
2014-03-20 21:55:13 +01:00
|
|
|
export PROGRAMMER ?= olimex
|
2014-08-05 13:43:58 +02:00
|
|
|
export MSPDEBUGFLAGS += -j $(PROGRAMMER)
|
2014-03-20 21:55:13 +01:00
|
|
|
ifeq ($(strip $(PROGRAMMER)),uif)
|
2015-09-16 17:18:10 +02:00
|
|
|
export MSPDEBUGFLAGS += -d $(PORT)
|
2013-03-10 16:50:50 +01:00
|
|
|
endif
|
2015-09-16 17:18:10 +02:00
|
|
|
export FLASHER ?= mspdebug
|
|
|
|
export FFLAGS = $(MSPDEBUGFLAGS) "prog $(HEXFILE)"
|
|
|
|
|
|
|
|
# setup debugger
|
2014-08-05 13:43:58 +02:00
|
|
|
export DEBUGSERVER = $(FLASHER)
|
|
|
|
export DEBUGSERVER_FLAGS = $(MSPDEBUGFLAGS) gdb
|
|
|
|
export DEBUGGER = $(PREFIX)gdb
|
|
|
|
export DEBUGGER_FLAGS = --tui --ex="target remote localhost:2000" --ex "monitor reset halt" --ex load -ex "monitor reset halt" $(ELFFILE)
|
2013-04-09 11:25:04 +02:00
|
|
|
|
2015-09-16 17:18:10 +02:00
|
|
|
# export msb-430-common includes
|
|
|
|
export INCLUDES += -I$(RIOTBOARD)/msb-430-common/include
|
|
|
|
export INCLUDES += -I$(RIOTBOARD)/msb-430-common/drivers/include
|
2016-03-08 14:19:34 +01:00
|
|
|
|
|
|
|
USEMODULE += msb-430-common-drivers
|