diff --git a/src/main/config/config.c b/src/main/config/config.c index 2261cf067b..884f68f6c9 100755 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -118,8 +118,8 @@ void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, es #error "Flash page count not defined for target." #endif -#if FLASH_SIZE <= 128 -#define FLASH_TO_RESERVE_FOR_CONFIG 0x800 +#if FLASH_SIZE <= 64 +#define FLASH_TO_RESERVE_FOR_CONFIG 0x0800 #else #define FLASH_TO_RESERVE_FOR_CONFIG 0x1000 #endif diff --git a/src/main/target/stm32_flash_f103_128k.ld b/src/main/target/stm32_flash_f103_128k.ld index 48441c237c..f0a71b3c3f 100644 --- a/src/main/target/stm32_flash_f103_128k.ld +++ b/src/main/target/stm32_flash_f103_128k.ld @@ -12,7 +12,7 @@ /* Specify the memory areas. */ MEMORY { - FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 126K /* last 2kb used for config storage */ + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 124K /* last 4kb used for config storage */ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } diff --git a/src/main/target/stm32_flash_f303_128k.ld b/src/main/target/stm32_flash_f303_128k.ld index a13c304581..cb36249ddc 100644 --- a/src/main/target/stm32_flash_f303_128k.ld +++ b/src/main/target/stm32_flash_f303_128k.ld @@ -12,7 +12,7 @@ /* Specify the memory areas. */ MEMORY { - FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 126K /* last 2kb used for config storage */ + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 124K /* last 4kb used for config storage */ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 40K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K }