mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Fixed start / end addresses for custom defaults.
This commit is contained in:
parent
e38d460acf
commit
3128328224
3 changed files with 9 additions and 12 deletions
|
@ -34,13 +34,6 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
} >FLASH AT >AXIM_FLASH
|
||||
|
||||
/* Storage for the address for the configuration section so we can grab it out of the hex file */
|
||||
.custom_defaults :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.custom_defaults_address)
|
||||
} >FLASH1 AT >AXIM_FLASH1
|
||||
|
||||
/* The program code and other data goes into FLASH */
|
||||
.text :
|
||||
{
|
||||
|
@ -103,7 +96,9 @@ SECTIONS
|
|||
.custom_defaults :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP (*(.custom_defaults_address))
|
||||
KEEP (*(.custom_defaults_start_address))
|
||||
. = ALIGN(4);
|
||||
KEEP (*(.custom_defaults_end_address))
|
||||
. = ALIGN(4);
|
||||
__custom_defaults_internal_start = .;
|
||||
*(.custom_defaults);
|
||||
|
|
|
@ -120,14 +120,16 @@ SECTIONS
|
|||
.custom_defaults :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP (*(.custom_defaults_address))
|
||||
KEEP (*(.custom_defaults_start_address))
|
||||
. = ALIGN(4);
|
||||
KEEP (*(.custom_defaults_end_address))
|
||||
. = ALIGN(4);
|
||||
__custom_defaults_internal_start = .;
|
||||
*(.custom_defaults);
|
||||
} >FLASH_CUSTOM_DEFAULTS
|
||||
|
||||
PROVIDE_HIDDEN (__custom_defaults_start = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? ORIGIN(FLASH_CUSTOM_DEFAULTS_EXTENDED) : __custom_defaults_internal_start);
|
||||
PROVIDE_HIDDEN (__custom_defaults_end = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? ORIGIN(FLASH_CUSTOM_DEFAULTS_EXTENDED) + LENGTH(FLASH_CUSTOM_DEFAULTS_EXTENDED) : ORIGIN(FLASH_CUSTOM_DEFAULTS) + LENGTH(FLASH_CUSTOM_DEFAULTS));
|
||||
PROVIDE_HIDDEN (__custom_defaults_end = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? ORIGIN(FLASH_CUSTOM_DEFAULTS_EXTENDED) + LENGTH(FLASH_CUSTOM_DEFAULTS_EXTENDED) : ORIGIN(FLASH_CUSTOM_DEFAULTS) + LENGTH(FLASH_CUSTOM_DEFAULTS));
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
|
|
@ -228,8 +228,8 @@ static char cliBufferTemp[CLI_IN_BUFFER_SIZE];
|
|||
#endif
|
||||
|
||||
#if defined(USE_CUSTOM_DEFAULTS_ADDRESS)
|
||||
static char __attribute__ ((section(".custom_defaults_address"))) *customDefaultsStart = CUSTOM_DEFAULTS_START;
|
||||
static char __attribute__ ((section(".custom_defaults_address"))) *customDefaultsEnd = CUSTOM_DEFAULTS_END;
|
||||
static char __attribute__ ((section(".custom_defaults_start_address"))) *customDefaultsStart = CUSTOM_DEFAULTS_START;
|
||||
static char __attribute__ ((section(".custom_defaults_end_address"))) *customDefaultsEnd = CUSTOM_DEFAULTS_END;
|
||||
#endif
|
||||
|
||||
#ifndef USE_QUAD_MIXER_ONLY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue