From d8ba4b4aa072fe7c46b47b1511da207f0f8b8aa9 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Sat, 12 Dec 2015 23:09:53 +0000 Subject: [PATCH] Bump config size to 4k for 128k targets. Note: The new G-Tune feature added a few configuration setting which pushed the NAZE target over 2K. 256k targets were already using 4kb. --- src/main/config/config.c | 4 ++-- src/main/target/stm32_flash_f103_128k.ld | 2 +- src/main/target/stm32_flash_f303_128k.ld | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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 }