mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
391164a788
Prevent CPU from using cortexm_init() when softdevice is used for NRF52 devices as the softdevice already do some obscur inits Also ensure the softdevice pkg will be used by hacking Makefile due to RIOT's build system limitations (will be fix later with the new build system)
33 lines
1.1 KiB
Makefile
33 lines
1.1 KiB
Makefile
# this module contains shared code for all boards using the nrf52 CPU
|
|
export CPU = nrf52
|
|
|
|
# get SoftDevice dependency if needed (dirty hack!)
|
|
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
|
|
|
# include this module into the build
|
|
ifeq (,$(filter thingy52 acd52832,$(BOARD)))
|
|
INCLUDES += -I$(RIOTBOARD)/common/nrf52xxxdk/include
|
|
USEMODULE += boards_common_nrf52
|
|
endif
|
|
|
|
# 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
|
|
|
|
# The following configuration is dependencies specific
|
|
# but they are resolved later
|
|
# Hack to know now if 'nordic_softdevice_ble' is used
|
|
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
|
|
|
# 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
|