mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 08:45:36 +03:00
BUGFIX - Linker script for F10x was not reserving the last 2kb which
meant that 1kb of code could be overwritten when saving the config. Fixed EEPROM write address for F30x so that code is also not overwritten when saving the config.
This commit is contained in:
parent
c77c93c8b7
commit
a947ef8fbb
3 changed files with 8 additions and 4 deletions
|
@ -41,6 +41,10 @@ void mixerUseConfigs(servoParam_t *servoConfToUse, flight3DConfig_t *flight3DCon
|
|||
escAndServoConfig_t *escAndServoConfigToUse, mixerConfig_t *mixerConfigToUse,
|
||||
airplaneConfig_t *airplaneConfigToUse, rxConfig_t *rxConfig, gimbalConfig_t *gimbalConfigToUse);
|
||||
|
||||
#ifdef STM32F303xC
|
||||
#define FLASH_PAGE_COUNT 256
|
||||
#endif
|
||||
|
||||
#ifndef FLASH_PAGE_COUNT
|
||||
#define FLASH_PAGE_COUNT 128
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
|
|||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 127K
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 126K /* last 2kb used for config storage */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
|
||||
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
**
|
||||
** File : stm32_flash.ld
|
||||
**
|
||||
** Abstract : Linker script for STM32F103C8 Device with
|
||||
** 128KByte FLASH, 20KByte RAM
|
||||
** Abstract : Linker script for STM32F30x Device with
|
||||
** 256KByte FLASH and 40KByte RAM
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
@ -22,7 +22,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
|
|||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 254K
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 254K /* last 2kb used for config storage */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 40K
|
||||
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue