2016-02-04 14:29:09 +01:00
|
|
|
# define the cpu used by the nRF52 DK
|
|
|
|
export CPU = nrf52
|
2017-04-05 12:10:13 +02:00
|
|
|
export CPU_MODEL = nrf52832xxaa
|
2016-02-04 14:29:09 +01:00
|
|
|
|
|
|
|
# set default port depending on operating system
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
2016-02-13 21:51:08 +01:00
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
2016-02-04 14:29:09 +01:00
|
|
|
|
|
|
|
# setup JLink for flashing
|
|
|
|
export JLINK_DEVICE := nrf52
|
2016-07-09 11:25:34 +02:00
|
|
|
|
|
|
|
# special options when using SoftDevice
|
|
|
|
ifneq (,$(filter nordic_softdevice_ble,$(USEPKG)))
|
2016-09-29 22:02:36 +02:00
|
|
|
export JLINK_PRE_FLASH := erase\nloadfile $(BINDIR)/softdevice.hex
|
2017-07-13 15:01:20 +02:00
|
|
|
export FLASH_ADDR := 0x1f000
|
2016-07-09 11:25:34 +02:00
|
|
|
export LINKER_SCRIPT ?= $(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL)_sd.ld
|
|
|
|
endif
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
2016-02-04 14:29:09 +01:00
|
|
|
|
|
|
|
# setup serial terminal
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|