2018-10-28 19:42:48 +01:00
|
|
|
# include this module into the build
|
|
|
|
INCLUDES += -I$(RIOTBOARD)/common/nrf52/include
|
|
|
|
|
2020-02-13 06:34:58 +01:00
|
|
|
ifeq (bmp,$(PROGRAMMER))
|
|
|
|
# On Blackmagic Probe, the first ACM is used to connect to the gdb server,
|
|
|
|
# the second is the BMP's UART interface
|
|
|
|
PORT_LINUX ?= /dev/ttyACM1
|
|
|
|
PORT_DARWIN ?= $(wordlist 2, 2, $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
|
|
else
|
|
|
|
# configure the serial terminal
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# setup serial terminal
|
2018-10-28 19:42:48 +01:00
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
2018-06-20 10:42:38 +02:00
|
|
|
PROGRAMMER ?= jlink
|
2018-10-28 19:42:48 +01:00
|
|
|
ifeq (jlink,$(PROGRAMMER))
|
|
|
|
# setup JLink for flashing
|
2020-03-03 11:56:38 +01:00
|
|
|
JLINK_DEVICE = nrf52
|
2018-06-20 10:42:38 +02:00
|
|
|
else ifeq (openocd,$(PROGRAMMER))
|
2019-02-26 11:15:36 +01:00
|
|
|
ifneq (,$(filter $(BOARD),ruuvitag thingy52))
|
|
|
|
# openocd doesn't fully work with ruuvitag and thingy52
|
|
|
|
$(error Cannot use OpenOCD with $(BOARD) board)
|
|
|
|
endif
|
2018-06-20 10:42:38 +02:00
|
|
|
# setup OpenOCD for flashing. Version 0.10 of OpenOCD doesn't contain support
|
|
|
|
# for nrf52dk and nrf52840dk boards. To use OpenOCD with these a version
|
|
|
|
# build from source (master > 2018, August the 13rd) is required.
|
2019-05-31 11:43:47 +02:00
|
|
|
DEBUG_ADAPTER ?= jlink
|
2020-02-22 11:33:19 +01:00
|
|
|
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
2018-10-28 19:42:48 +01:00
|
|
|
endif
|