diff --git a/boards/common/silabs/Makefile.features b/boards/common/silabs/Makefile.features index 0f1b19ddfb..66b8cb066d 100644 --- a/boards/common/silabs/Makefile.features +++ b/boards/common/silabs/Makefile.features @@ -1,2 +1,3 @@ # Various other features (if any) FEATURES_PROVIDED += arduino +FEATURES_PROVIDED += riotboot diff --git a/boards/ikea-tradfri/Makefile.features b/boards/ikea-tradfri/Makefile.features index d03b3183b6..8bb814676b 100644 --- a/boards/ikea-tradfri/Makefile.features +++ b/boards/ikea-tradfri/Makefile.features @@ -8,3 +8,6 @@ FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart periph_uart_modecfg + +# Put other features for this board (in alphabetical order) +FEATURES_PROVIDED += riotboot diff --git a/boards/ikea-tradfri/board.c b/boards/ikea-tradfri/board.c index 9d1410bcc4..ee1d4b1b23 100644 --- a/boards/ikea-tradfri/board.c +++ b/boards/ikea-tradfri/board.c @@ -26,7 +26,9 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* initialize the LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); +#endif } diff --git a/boards/slstk3401a/board.c b/boards/slstk3401a/board.c index 37313bb027..3a346efd77 100644 --- a/boards/slstk3401a/board.c +++ b/boards/slstk3401a/board.c @@ -28,6 +28,7 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* perform common board initialization */ board_common_init(); @@ -36,4 +37,5 @@ void board_init(void) gpio_init(SI7021_EN_PIN, GPIO_OUT); gpio_set(SI7021_EN_PIN); #endif +#endif } diff --git a/boards/slstk3402a/board.c b/boards/slstk3402a/board.c index 4a0f9170e6..1ceed57ef9 100644 --- a/boards/slstk3402a/board.c +++ b/boards/slstk3402a/board.c @@ -28,6 +28,7 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* perform common board initialization */ board_common_init(); @@ -36,4 +37,5 @@ void board_init(void) gpio_init(SI7021_EN_PIN, GPIO_OUT); gpio_set(SI7021_EN_PIN); #endif +#endif } diff --git a/boards/sltb001a/board.c b/boards/sltb001a/board.c index 26bde761d8..94ec47af4c 100644 --- a/boards/sltb001a/board.c +++ b/boards/sltb001a/board.c @@ -32,6 +32,7 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* perform common board initialization */ board_common_init(); @@ -61,4 +62,5 @@ void board_init(void) (RGB_LED4_ENABLED << RGB_LED4_EN_BIT)); #endif #endif +#endif } diff --git a/boards/slwstk6000b/board.c b/boards/slwstk6000b/board.c index ed1d85e517..606e86415b 100644 --- a/boards/slwstk6000b/board.c +++ b/boards/slwstk6000b/board.c @@ -28,6 +28,7 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* perform common board initialization */ board_common_init(); @@ -36,4 +37,5 @@ void board_init(void) gpio_init(SI7021_EN_PIN, GPIO_OUT); gpio_set(SI7021_EN_PIN); #endif +#endif } diff --git a/boards/stk3600/board.c b/boards/stk3600/board.c index 3ee4f85774..19f1453ff1 100644 --- a/boards/stk3600/board.c +++ b/boards/stk3600/board.c @@ -27,6 +27,8 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* perform common board initialization */ board_common_init(); +#endif } diff --git a/boards/stk3700/board.c b/boards/stk3700/board.c index de838de006..27b36725d6 100644 --- a/boards/stk3700/board.c +++ b/boards/stk3700/board.c @@ -27,6 +27,8 @@ void board_init(void) /* initialize the CPU */ cpu_init(); +#ifndef RIOTBOOT /* perform common board initialization */ board_common_init(); +#endif } diff --git a/cpu/efm32/Makefile.include b/cpu/efm32/Makefile.include index 0a05483293..cb5d566fc4 100644 --- a/cpu/efm32/Makefile.include +++ b/cpu/efm32/Makefile.include @@ -3,6 +3,9 @@ include $(RIOTCPU)/efm32/efm32-info.mk export CPU_ARCH = $(EFM32_ARCHITECTURE) export CPU_FAM = $(EFM32_FAMILY) +# the size of riotboot on the EFM32 exceeds the default value +RIOTBOOT_LEN ?= 0x2000 + # the em_device.h header requires a global define with the cpu model CFLAGS += -D$(call uppercase_and_underscore,$(CPU_MODEL)) diff --git a/cpu/efm32/cpu.c b/cpu/efm32/cpu.c index 5c4a9a3835..4d34a9919d 100644 --- a/cpu/efm32/cpu.c +++ b/cpu/efm32/cpu.c @@ -51,6 +51,8 @@ #define EMU_EM4INIT EMU_EM4INIT_DEFAULT #endif +#ifndef RIOTBOOT + #ifdef _SILICON_LABS_32B_SERIES_1 /** * @brief Initialize integrated DC-DC regulator @@ -154,14 +156,20 @@ static void pm_init(void) #endif } +#endif + void cpu_init(void) { +#ifndef RIOTBOOT /* apply errata that may be applicable (see em_chip.h) */ CHIP_Init(); +#endif /* initialize the Cortex-M core */ cortexm_init(); +#ifndef RIOTBOOT + #ifdef _SILICON_LABS_32B_SERIES_1 /* initialize dc-dc */ dcdc_init(); @@ -178,4 +186,5 @@ void cpu_init(void) /* trigger static peripheral initialization */ periph_init(); +#endif }