boards/common/nrf52: add config for bmp

This commit is contained in:
Philipp Blum 2020-02-13 06:34:58 +01:00
parent aa2e84218f
commit 3240dfc0b2

View File

@ -1,9 +1,18 @@
# include this module into the build
INCLUDES += -I$(RIOTBOARD)/common/nrf52/include
# set default port depending on operating system
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
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
include $(RIOTMAKE)/tools/serial.inc.mk
# The following configuration are dependencies specific, specifically they need
@ -63,4 +72,6 @@ else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER ?= jlink
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
include $(RIOTMAKE)/tools/openocd.inc.mk
else ifeq (bmp,$(PROGRAMMER))
include $(RIOTMAKE)/tools/bmp.inc.mk
endif