summaryrefslogtreecommitdiffstats
path: root/platforms/chibios/boards
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/boards')
-rw-r--r--platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h14
-rw-r--r--platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h14
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_F401XC/configs/config.h10
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_F411XE/configs/config.h10
4 files changed, 44 insertions, 4 deletions
diff --git a/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h
index e181422eba..6d132ea6f3 100644
--- a/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h
+++ b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h
@@ -19,12 +19,22 @@
#ifndef STM32_LSECLK
# define STM32_LSECLK 32768U
-#endif // STM32_LSECLK
+#endif // STM32_LSECLK
#ifndef STM32_HSECLK
# define STM32_HSECLK 25000000U
-#endif // STM32_HSECLK
+#endif // STM32_HSECLK
#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/BLACKPILL_STM32_F411/configs/config.h b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h
index e181422eba..6d132ea6f3 100644
--- a/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h
+++ b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h
@@ -19,12 +19,22 @@
#ifndef STM32_LSECLK
# define STM32_LSECLK 32768U
-#endif // STM32_LSECLK
+#endif // STM32_LSECLK
#ifndef STM32_HSECLK
# define STM32_HSECLK 25000000U
-#endif // STM32_HSECLK
+#endif // STM32_HSECLK
#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_F401XC/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F401XC/configs/config.h
index e06ca0b725..9865311018 100644
--- a/platforms/chibios/boards/GENERIC_STM32_F401XC/configs/config.h
+++ b/platforms/chibios/boards/GENERIC_STM32_F401XC/configs/config.h
@@ -20,3 +20,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_F411XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F411XE/configs/config.h
index e06ca0b725..9865311018 100644
--- a/platforms/chibios/boards/GENERIC_STM32_F411XE/configs/config.h
+++ b/platforms/chibios/boards/GENERIC_STM32_F411XE/configs/config.h
@@ -20,3 +20,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