# Slot size is determined by "((total_flash_size - RIOTBOOT_LEN) / 2)". # If RIOTBOOT_LEN uses an uneven number of flashpages, the remainder of the # flash cannot be divided by two slots while staying FLASHPAGE_SIZE aligned. ifneq (,$(filter usbus_dfu tinyusb_dfu,$(USEMODULE))) RIOTBOOT_LEN ?= 0x4000 else RIOTBOOT_LEN ?= 0x2000 endif # Export internal ROM alignment and slot sizes for bootloader support export MCUBOOT_IMAGE_ALIGN = 8 export MCUBOOT_SLOT0_SIZE = 0x8000 export MCUBOOT_SLOT1_SIZE = 0x3C000 export MCUBOOT_SLOT2_SIZE = 0x3C000 # Set ROM and RAM lengths according to CPU model ifneq (,$(filter nrf52805xxaa nrf52810xxaa nrf52811xxaa,$(CPU_MODEL))) ROM_LEN ?= 0x30000 RAM_LEN ?= 0x6000 endif ifneq (,$(filter nrf52820xxaa,$(CPU_MODEL))) ROM_LEN ?= 0x40000 RAM_LEN ?= 0x8000 endif ifneq (,$(filter nrf52832xxaa,$(CPU_MODEL))) ROM_LEN ?= 0x80000 RAM_LEN ?= 0x10000 endif ifneq (,$(filter nrf52833xxaa,$(CPU_MODEL))) ROM_LEN ?= 0x80000 RAM_LEN ?= 0x20000 endif ifneq (,$(filter nrf52840xxaa,$(CPU_MODEL))) ROM_LEN ?= 0x100000 RAM_LEN ?= 0x40000 endif # Set the target for the JLink programmer for flashing, JLINK expects an # underscore in the target, like "nrf52832_xxaa". # Boards that do not use a JLink ignore the flag. JLINK_DEVICE = $(subst xx,_xx,$(CPU_MODEL)) VECTORS_O ?= $(BINDIR)/nrf52_vectors/vectors_$(CPU_MODEL).o include $(RIOTCPU)/nrf5x_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk