Skip to content

Commit

Permalink
boards/frdm-k64f add riotboot support
Browse files Browse the repository at this point in the history
  • Loading branch information
fjmolinas committed Jun 6, 2019
1 parent 5db21a4 commit 42b1118
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions boards/frdm-k64f/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 9 additions & 2 deletions cpu/kinetis/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 42b1118

Please sign in to comment.