Merge pull request #11940 from basilfx/feature/efm32_riotboot
efm32: add support for riotboot
This commit is contained in:
commit
c4fa0842a2
@ -1,2 +1,3 @@
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += arduino
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -27,6 +27,8 @@ void board_init(void)
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
#ifndef RIOTBOOT
|
||||
/* perform common board initialization */
|
||||
board_common_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -27,6 +27,8 @@ void board_init(void)
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
#ifndef RIOTBOOT
|
||||
/* perform common board initialization */
|
||||
board_common_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -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))
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user