From 7ffd01de4cf3c954c7e5bf130fe7fb07ac1becbf Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 8 Jun 2022 18:25:10 -0400 Subject: [PATCH] stm32: Support 4KiB bootloader on stm32f1 and stm32f0 The CanBoot bootloader can often fit in 4KiB and that may be useful for some devices with small flash sizes. Signed-off-by: Kevin O'Connor --- src/stm32/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stm32/Kconfig b/src/stm32/Kconfig index 30c72414..bad86a8c 100644 --- a/src/stm32/Kconfig +++ b/src/stm32/Kconfig @@ -204,6 +204,8 @@ choice config STM32_FLASH_START_800 bool "2KiB bootloader (HID Bootloader)" if MACH_STM32F103 + config STM32_FLASH_START_1000 + bool "4KiB bootloader" if MACH_STM32F1 || MACH_STM32F0 config STM32_FLASH_START_4000 bool "16KiB bootloader (HID Bootloader)" if MACH_STM32F207 || MACH_STM32F401 || MACH_STM32F4x5 || MACH_STM32F103 || MACH_STM32F072 config STM32_FLASH_START_20000 @@ -215,6 +217,7 @@ endchoice config FLASH_START hex default 0x8000800 if STM32_FLASH_START_800 + default 0x8001000 if STM32_FLASH_START_1000 default 0x8002000 if STM32_FLASH_START_2000 default 0x8004000 if STM32_FLASH_START_4000 default 0x8005000 if STM32_FLASH_START_5000