From 2dd70b171bde90620a631b6ba8d129acc911f93e Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 7 Jun 2016 11:59:43 -0400 Subject: Check the HARDWARE_EARLY_DFU_JUMP flag as soon as possible in the boot process. This avoids the situation where the bootloader systick happens during firmware initialization, and freaks out. Also build the bootloader with the minimum resources needed (no RTOS, no SPI, no I2C). --- projects/bootloader/stm-init.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 projects/bootloader/stm-init.c (limited to 'projects/bootloader/stm-init.c') diff --git a/projects/bootloader/stm-init.c b/projects/bootloader/stm-init.c new file mode 100644 index 0000000..209dc8c --- /dev/null +++ b/projects/bootloader/stm-init.c @@ -0,0 +1,8 @@ +/* Disable modules that the bootloader doesn't need. */ + +#include "stm32f4xx_hal.h" + +#undef HAL_I2C_MODULE_ENABLED +#undef HAL_SPI_MODULE_ENABLED + +#include "../../stm-init.c" -- cgit v1.2.3