2017-11-21 16:22:33 +01:00
|
|
|
# this module contains shared code for all boards using the nrf52 CPU
|
|
|
|
export CPU = nrf52
|
|
|
|
|
|
|
|
# include this module into the build
|
2018-01-05 13:14:20 +01:00
|
|
|
ifeq (,$(filter thingy52 acd52832,$(BOARD)))
|
2017-08-25 11:54:02 +02:00
|
|
|
INCLUDES += -I$(RIOTBOARD)/common/nrf52xxxdk/include
|
|
|
|
USEMODULE += boards_common_nrf52
|
|
|
|
endif
|
2017-11-21 16:22:33 +01:00
|
|
|
|
|
|
|
# set default port depending on operating system
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
|
|
|
# setup JLink for flashing
|
|
|
|
export JLINK_DEVICE := nrf52
|
|
|
|
|
|
|
|
# special options when using SoftDevice
|
|
|
|
ifneq (,$(filter nordic_softdevice_ble,$(USEPKG)))
|
|
|
|
export JLINK_PRE_FLASH := erase\nloadfile $(BINDIR)/softdevice.hex
|
|
|
|
export FLASH_ADDR := 0x1f000
|
|
|
|
export LINKER_SCRIPT ?= $(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL)_sd.ld
|
|
|
|
endif
|
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|