diff --git a/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h index 90a41326a16..5333a919a0b 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h +++ b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h @@ -21,3 +21,13 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE #endif + +#ifdef WEAR_LEVELING_EMBEDDED_FLASH +# ifndef WEAR_LEVELING_EFL_FIRST_SECTOR +# ifdef BOOTLOADER_TINYUF2 +# define WEAR_LEVELING_EFL_FIRST_SECTOR 3 +# else +# define WEAR_LEVELING_EFL_FIRST_SECTOR 1 +# endif +# endif +#endif diff --git a/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h index 90a41326a16..5333a919a0b 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h +++ b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h @@ -21,3 +21,13 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE #endif + +#ifdef WEAR_LEVELING_EMBEDDED_FLASH +# ifndef WEAR_LEVELING_EFL_FIRST_SECTOR +# ifdef BOOTLOADER_TINYUF2 +# define WEAR_LEVELING_EFL_FIRST_SECTOR 3 +# else +# define WEAR_LEVELING_EFL_FIRST_SECTOR 1 +# endif +# endif +#endif diff --git a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h index cbb98f90980..362327efded 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h +++ b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h @@ -17,3 +17,13 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE #endif + +#ifdef WEAR_LEVELING_EMBEDDED_FLASH +# ifndef WEAR_LEVELING_EFL_FIRST_SECTOR +# ifdef BOOTLOADER_TINYUF2 +# define WEAR_LEVELING_EFL_FIRST_SECTOR 3 +# else +# define WEAR_LEVELING_EFL_FIRST_SECTOR 1 +# endif +# endif +#endif