Skip to content

Commit

Permalink
Move wear leveling location to beginning of flash on STM32F4s
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Sep 20, 2024
1 parent 9cbb4a2 commit d96617b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d96617b

Please sign in to comment.