Fix NV14 linker script
This commit is contained in:
committed by
Raphael Coeffic
parent
6c1ca71740
commit
c39420bde7
@@ -20,28 +20,26 @@
|
|||||||
ENTRY(Reset_Handler)
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
/* Highest address of the user mode stack */
|
/* Highest address of the user mode stack */
|
||||||
|
_estack = 0x10010000; /* end of 64K CCM */
|
||||||
_heap_end = 0xC0800000; /* end of 8192K SDRAM */
|
_heap_end = 0xC0800000; /* 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 = 1024; /* 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_start = _estack - _Main_Stack_Size;
|
||||||
|
|
||||||
/* Specify the memory areas */
|
/* Specify the memory areas */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
||||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
|
||||||
CCM (xrw) : ORIGIN = 0x10000000, LENGTH = 65520
|
CCM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
|
||||||
NO_INIT (xrw) : ORIGIN = 0x1000FFF0, LENGTH = 16
|
|
||||||
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
|
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
|
||||||
SDRAM(xrw) : ORIGIN = 0xC0000000, LENGTH = 8192K
|
SDRAM(xrw) : ORIGIN = 0xC0000000, LENGTH = 8192K
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main stack end */
|
|
||||||
_estack = 0x10000000 + LENGTH(CCM);
|
|
||||||
_main_stack_start = _estack - _Main_Stack_Size;
|
|
||||||
|
|
||||||
/* Define output sections */
|
/* Define output sections */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
@@ -111,7 +109,7 @@ SECTIONS
|
|||||||
_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 */
|
||||||
@@ -119,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 */
|
||||||
} >CCM
|
} >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; */
|
||||||
@@ -133,14 +131,14 @@ SECTIONS
|
|||||||
*(COMMON)
|
*(COMMON)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_ebss = .; /* define a global symbol at bss end */
|
_ebss = .; /* define a global symbol at bss end */
|
||||||
} >CCM
|
} >RAM
|
||||||
|
|
||||||
/* Non-zeroed data section */
|
/* Non-zeroed data section */
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.noinit (NOLOAD) :
|
.noinit (NOLOAD) :
|
||||||
{
|
{
|
||||||
*(.noinit)
|
*(.noinit)
|
||||||
} >NO_INIT
|
} >RAM
|
||||||
|
|
||||||
/* collect all uninitialized .ccm sections */
|
/* collect all uninitialized .ccm sections */
|
||||||
.ram (NOLOAD) :
|
.ram (NOLOAD) :
|
||||||
@@ -150,14 +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 = .;
|
||||||
. = . + _Main_Stack_Size;
|
*(.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"))); */
|
||||||
@@ -175,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