From 3d924f52ec46a9dec351be1b6aa6d0b13bdcd686 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 16 May 2022 20:21:44 -0400 Subject: [PATCH] stm32: Support 16KiB application start on stm32f4 The default remains 32KiB, but a smaller size bootloader may be useful for testing. Signed-off-by: Kevin O'Connor --- src/stm32/Kconfig | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/stm32/Kconfig b/src/stm32/Kconfig index 49ffd54..b7fea6a 100644 --- a/src/stm32/Kconfig +++ b/src/stm32/Kconfig @@ -343,15 +343,20 @@ config CANBUS_FREQUENCY choice prompt "Application start offset" - depends on MACH_STM32F0 || MACH_STM32F1 + config STM32_APP_START_8000 + bool "32KiB offset" if MACH_STM32F4 + config STM32_APP_START_4000 + bool "16KiB offset" if MACH_STM32F4 config STM32_APP_START_2000 - bool "8KiB offset" + bool "8KiB offset" if MACH_STM32F0 || MACH_STM32F1 config STM32_APP_START_1000 - bool "4KiB offset" + bool "4KiB offset" if MACH_STM32F0 || MACH_STM32F1 endchoice config APPLICATION_START hex + default 0x8008000 if STM32_APP_START_8000 + default 0x8004000 if STM32_APP_START_4000 default 0x8002000 if STM32_APP_START_2000 default 0x8001000 if STM32_APP_START_1000 default 0x8008000