diff --git a/boards/frdm-k64f/Makefile.features b/boards/frdm-k64f/Makefile.features index 6a5f7c94c3ae..ed6bdd432c3f 100644 --- a/boards/frdm-k64f/Makefile.features +++ b/boards/frdm-k64f/Makefile.features @@ -8,6 +8,9 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart +# Put other features for this board (in alphabetical order) +FEATURES_PROVIDED += riotboot + # The board MPU family (used for grouping by the CI system) FEATURES_MCU_GROUP = cortex_m4_1 diff --git a/cpu/kinetis/Makefile.include b/cpu/kinetis/Makefile.include index 969b2df068eb..17af151c7289 100644 --- a/cpu/kinetis/Makefile.include +++ b/cpu/kinetis/Makefile.include @@ -6,12 +6,19 @@ endif # "The Vector table must be naturally aligned to a power of two whose alignment # value is greater than or equal to number of Exceptions supported x 4" -# CPU_IRQ_NUMOF for KWxD boards is < 81+16 so (81*4 bytes = 388 bytes ~= 0x200) +# CPU_IRQ_NUMOF for KWxD and KxF boards is < 102+16 so (81*4 bytes = 472 bytes ~= 0x200) # RIOTBOOT_HDR_LEN can be set to 0x200 -ifeq (DW, $(KINETIS_CORE)$(KINETIS_SERIES)) +ifneq (,$(filter FK DW,$(KINETIS_CORE)$(KINETIS_SERIES))) RIOTBOOT_HDR_LEN ?= 0x200 endif +# 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. +ifeq (K, $(KINETIS_SERIES)) + RIOTBOOT_LEN ?= 0x2000 +endif + # Add search path for linker scripts LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts