| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- /* memory map */
- MEMORY
- {
- FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 7680K
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
- TCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
- }
- ENTRY(Reset_Handler)
- /* Provide the stack pointer at the end of RAM */
- _estack = ORIGIN(RAM) + LENGTH(RAM);
- SECTIONS
- {
- __stack_size = DEFINED(__stack_size) ? __stack_size : 2K;
- __heap_size = DEFINED(__heap_size) ? __heap_size : 1K;
- /* ISR vectors */
- .vectors :
- {
- . = ALIGN(4);
- __Vectors = .;
- KEEP(*(.vectors))
- KEEP(*(.isr_vector)) /* Also keep .isr_vector for compatibility */
- . = ALIGN(4);
- __Vectors_End = .;
- __Vectors_Size = __Vectors_End - __Vectors;
- } >FLASH
- /* text section, such as program code */
- .text :
- {
- . = ALIGN(4);
- _stext = .;
- *(.text)
- *(.text*)
- *(.glue_7)
- *(.glue_7t)
- *(.eh_frame)
- *(.gnu.linkonce.t*)
- KEEP (*(.init))
- KEEP (*(.fini))
- /* section information for finsh shell */
- . = ALIGN(4);
- __fsymtab_start = .;
- KEEP(*(FSymTab))
- __fsymtab_end = .;
- . = ALIGN(4);
- __vsymtab_start = .;
- KEEP(*(VSymTab))
- __vsymtab_end = .;
- . = ALIGN(4);
- /* section information for initial. */
- . = ALIGN(4);
- __rt_init_start = .;
- KEEP(*(SORT(.rti_fn*)))
- __rt_init_end = .;
- . = ALIGN(4);
- /* the symbol '_etext' will be defined at the end of code section */
- . = ALIGN(4);
- _etext = .;
- } >FLASH
- /* ro-data section, such as constant data */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata)
- *(.rodata*)
- . = ALIGN(4);
- } >FLASH
- /* exception process table */
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } >FLASH
- /* exception process table index */
- .ARM :
- {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
- /* ARM attributes */
- .ARM.attributes :
- {
- *(.ARM.attributes)
- } >FLASH
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(.fini_array*))
- KEEP (*(SORT(.fini_array.*)))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
- /* provide some necessary symbols for initialized data */
- _sidata = LOADADDR(.data);
- .data :
- {
- . = ALIGN(4);
- /* the symbol '_sdata' will be defined at the data section end start */
- _sdata = .;
- *(.data)
- *(.data*)
- . = ALIGN(4);
- /* the symbol '_edata' will be defined at the data section end */
- _edata = .;
- } > RAM AT> FLASH
- /* provide some necessary symbols for uninitialized data */
- . = ALIGN(4);
- .bss :
- {
- . = ALIGN(4);
- /* the symbol '_sbss' will be defined at the bss section start */
- _sbss = .;
- __bss_start__ = _sbss;
- __bss_start = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- /* the symbol '_ebss' will be defined at the bss section end */
- _ebss = .;
- __bss_end__ = _ebss;
- __bss_end = _ebss;
- } > RAM
- /* heap and stack space */
- .heap_stack :
- {
- . = ALIGN(8);
- PROVIDE ( end = _ebss );
- PROVIDE ( _end = _ebss );
- . = . + __heap_size;
- PROVIDE( _heap_end = . );
- . = . + __stack_size;
- PROVIDE( _sp = . );
- . = ALIGN(8);
- } > RAM
- /* Note: To use TCMRAM, initialization in the startup file is required. */
- _sitcmram = LOADADDR(.tcmram);
- .tcmram :
- {
- . = ALIGN(4);
- .stcmram = .;
- *(.tcmram)
- *(.tcmram*)
- . = ALIGN(4);
- _etcmram = .;
- } > TCMRAM AT> FLASH
- }
- /* input sections */
- GROUP(libgcc.a libc.a libm.a libnosys.a)
|