diff --git a/cpu/cortexm_common/Makefile.include b/cpu/cortexm_common/Makefile.include index 72dac672a8..eef3eb0092 100644 --- a/cpu/cortexm_common/Makefile.include +++ b/cpu/cortexm_common/Makefile.include @@ -70,8 +70,12 @@ else endif # Configure riotboot bootloader and slot lengths -# 4KB are currently enough -RIOTBOOT_LEN ?= 0x1000 +# 4KB are currently enough, set it to 16KB if USB-DFU is used +ifneq (,$(filter usbus_dfu,$(USEMODULE))) + RIOTBOOT_LEN ?= 0x4000 +else + RIOTBOOT_LEN ?= 0x1000 +endif # Currently 2 slots are supported by default, equals in length NUM_SLOTS ?= 2 # Take the whole flash minus RIOTBOOT_LEN and divide it by NUM_SLOTS