From bca340d338eab5fdf1b5a036b3d31b7615cc81ad Mon Sep 17 00:00:00 2001 From: dylad Date: Tue, 15 Dec 2020 17:17:05 +0100 Subject: [PATCH] cpu/nrf52: update RIOTBOOT_LEN w/ MODULE_USBUS_DFU --- cpu/nrf52/Makefile.include | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpu/nrf52/Makefile.include b/cpu/nrf52/Makefile.include index cc3f0622e9..1fa7f149cf 100644 --- a/cpu/nrf52/Makefile.include +++ b/cpu/nrf52/Makefile.include @@ -1,7 +1,11 @@ # 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. -RIOTBOOT_LEN ?= 0x2000 +ifneq (,$(filter usbus_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