2016-10-29 14:26:31 +02:00
|
|
|
# define the used CPU
|
|
|
|
export CPU = nrf51
|
|
|
|
export CPU_MODEL = nrf51x22xxab
|
|
|
|
|
|
|
|
# define the default port depending on the host OS
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|
|
|
|
|
|
|
# setup serial terminal
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
2016-10-29 14:26:31 +02:00
|
|
|
|
|
|
|
# we support flashing through plain fscopy or using JLink
|
2017-05-18 13:18:54 +02:00
|
|
|
PROGRAMMER ?= fscopy
|
|
|
|
ifeq (fscopy,$(PROGRAMMER))
|
2016-10-29 14:26:31 +02:00
|
|
|
export OFLAGS = -O ihex
|
|
|
|
export HEXFILE = $(ELFFILE:.elf=.hex)
|
|
|
|
export FFLAGS =
|
|
|
|
export DEBUGGER_FLAGS =
|
|
|
|
|
|
|
|
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
|
|
|
export DEBUGGER =
|
|
|
|
export DEBUGSERVER =
|
2017-05-18 13:18:54 +02:00
|
|
|
else ifeq (jlink,$(PROGRAMMER))
|
2016-10-29 14:26:31 +02:00
|
|
|
export JLINK_DEVICE := nrf51822
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
2016-10-29 14:26:31 +02:00
|
|
|
else
|
|
|
|
$(info ERROR: invalid flash tool specified)
|
|
|
|
endif
|