diff --git a/boards/nucleo-l476rg/Makefile.features b/boards/nucleo-l476rg/Makefile.features index c7fd38ab62..4bd9aedb8c 100644 --- a/boards/nucleo-l476rg/Makefile.features +++ b/boards/nucleo-l476rg/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 + # load the common Makefile.features for Nucleo boards include $(RIOTBOARD)/common/nucleo64/Makefile.features diff --git a/cpu/stm32l4/Makefile.include b/cpu/stm32l4/Makefile.include index 82e28ee689..a2f364d6d0 100644 --- a/cpu/stm32l4/Makefile.include +++ b/cpu/stm32l4/Makefile.include @@ -1,5 +1,11 @@ export CPU_ARCH = cortex-m4f export CPU_FAM = stm32l4 +# "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_NUMOFF for stm32l4 boards is < 91+16 so (107*4 bytes = 428 bytes ~= 0x200) +# RIOTBOOT_HDR_LEN can be set to 0x200 +RIOTBOOT_HDR_LEN ?= 0x200 + include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l4/include/cpu_conf.h b/cpu/stm32l4/include/cpu_conf.h index b820a8de3f..14e846cf90 100644 --- a/cpu/stm32l4/include/cpu_conf.h +++ b/cpu/stm32l4/include/cpu_conf.h @@ -55,6 +55,7 @@ extern "C" { #else #define CPU_IRQ_NUMOF (82U) #endif +#define CPU_FLASH_BASE FLASH_BASE /** @} */ /**