2015-06-15 23:03:29 +02:00
|
|
|
# define the used CPU
|
|
|
|
export CPU = nrf51
|
|
|
|
export CPU_MODEL = nrf51x22xxaa
|
2014-07-30 15:02:03 +02:00
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# set default port depending on operating system
|
|
|
|
PORT_LINUX ?= /dev/ttyUSB0
|
|
|
|
PORT_DARWIN ?= $(shell ls -1 /dev/tty.SLAB_USBtoUART* | head -n 1)
|
2014-07-30 15:02:03 +02:00
|
|
|
|
2015-06-15 23:03:29 +02:00
|
|
|
# define flash and debugging environment
|
2014-08-27 15:15:20 +02:00
|
|
|
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
|
|
|
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
|
|
|
export DEBUGSERVER = JLinkGDBServer -device nrf51822 -if SWD
|
|
|
|
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
|
2014-07-30 15:02:03 +02:00
|
|
|
|
|
|
|
export OFLAGS = -O binary
|
2014-08-27 15:15:20 +02:00
|
|
|
export HEXFILE = $(ELFFILE:.elf=.bin)
|
2014-08-10 05:20:57 +02:00
|
|
|
export TERMFLAGS += -p "$(PORT)"
|
2014-08-27 15:15:20 +02:00
|
|
|
export FFLAGS = $(BINDIR) $(HEXFILE)
|
|
|
|
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
|
|
|
|
export RESET_FLAGS = $(BINDIR)
|
2014-07-30 15:02:03 +02:00
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTBOARD)/Makefile.include.serial
|
2014-11-18 18:02:09 +01:00
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# include cortex defaults
|
2015-05-28 15:09:17 +02:00
|
|
|
include $(RIOTBOARD)/Makefile.include.cortexm_common
|