Fix linker script
This commit is contained in:
committed by
Raphael Coeffic
parent
26bb790d89
commit
49d654a07d
@@ -24,7 +24,7 @@ _estack = 0x10010000; /* end of 64K CCM */
|
|||||||
_heap_end = 0xD0800000; /* end of 8192K SDRAM */
|
_heap_end = 0xD0800000; /* end of 8192K SDRAM */
|
||||||
|
|
||||||
/* Generate a link error if heap and stack don't fit into RAM */
|
/* Generate a link error if heap and stack don't fit into RAM */
|
||||||
_Min_Heap_Size = 0; /* required amount of heap */
|
_Min_Heap_Size = 4096K; /* required amount of heap */
|
||||||
_Main_Stack_Size = 8192; /* required amount of stack for interrupt stack (Main stack) */
|
_Main_Stack_Size = 8192; /* required amount of stack for interrupt stack (Main stack) */
|
||||||
|
|
||||||
/* Main stack end */
|
/* Main stack end */
|
||||||
@@ -105,21 +105,11 @@ SECTIONS
|
|||||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.ccm_ram (NOLOAD) :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sccm_ram = .;
|
|
||||||
*(.ccm)
|
|
||||||
. = ALIGN(4);
|
|
||||||
. = . + _Main_Stack_Size;
|
|
||||||
_eccm_ram = .;
|
|
||||||
} >CCM
|
|
||||||
|
|
||||||
/* used by the startup to initialize data */
|
/* used by the startup to initialize data */
|
||||||
_sidata = .;
|
_sidata = .;
|
||||||
|
|
||||||
/* Initialized data sections goes into RAM, load LMA copy after code */
|
/* Initialized data sections goes into RAM, load LMA copy after code */
|
||||||
.data : AT ( _sidata )
|
.data :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_sdata = .; /* create a global symbol at data start */
|
_sdata = .; /* create a global symbol at data start */
|
||||||
@@ -127,12 +117,12 @@ SECTIONS
|
|||||||
*(.data*) /* .data* sections */
|
*(.data*) /* .data* sections */
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_edata = .; /* define a global symbol at data end */
|
_edata = .; /* define a global symbol at data end */
|
||||||
} >RAM
|
} >RAM AT> FLASH
|
||||||
|
|
||||||
/* Uninitialized data section */
|
/* Uninitialized data section */
|
||||||
. = ALIGN(4);
|
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .bss secion */
|
/* This is used by the startup in order to initialize the .bss secion */
|
||||||
_sbss = .; /* define a global symbol at bss start */
|
_sbss = .; /* define a global symbol at bss start */
|
||||||
/* __bss_start__ = _sbss; */
|
/* __bss_start__ = _sbss; */
|
||||||
@@ -158,13 +148,15 @@ SECTIONS
|
|||||||
*(.ram)
|
*(.ram)
|
||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
.ccm (NOLOAD) :
|
||||||
._user_heap_stack :
|
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
. = . + _Min_Heap_Size;
|
_sccm = .;
|
||||||
|
*(.ccm)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >RAM
|
. = . + _Main_Stack_Size;
|
||||||
|
_eccm = .;
|
||||||
|
} >CCM
|
||||||
|
|
||||||
/* MEMORY_bank1 section, code must be located here explicitly */
|
/* MEMORY_bank1 section, code must be located here explicitly */
|
||||||
/* Example: extern int foo(void) __attribute__ ((section (".mb1text"))); */
|
/* Example: extern int foo(void) __attribute__ ((section (".mb1text"))); */
|
||||||
@@ -182,8 +174,10 @@ SECTIONS
|
|||||||
*(.sdram*)
|
*(.sdram*)
|
||||||
*(.sdram_rodata)
|
*(.sdram_rodata)
|
||||||
*(.sdram_rodata*)
|
*(.sdram_rodata*)
|
||||||
. = ALIGN(4);
|
|
||||||
_eram = .;
|
_eram = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
. = . + _Min_Heap_Size;
|
||||||
|
. = ALIGN(4);
|
||||||
} >SDRAM
|
} >SDRAM
|
||||||
|
|
||||||
PROVIDE ( end = _eram );
|
PROVIDE ( end = _eram );
|
||||||
|
|||||||
Reference in New Issue
Block a user