123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- __ROM_BASE = 0x00000000;
- __ROM_SIZE = 0x00080000;
- __RAM_BASE = 0x20000000;
- __RAM_SIZE = 0x00080000;
- __DATA_SRAM_BASE = 0x01000000;
- __DATA_SRAM_SIZE = 0x00200000;
- __SRAM_BASE = 0x21000000;
- __SRAM_SIZE = 0x00200000;
- __STACK_SIZE = 0x00008000;
- __HEAP_SIZE = 0x00008000;
- __DDR_BASE = 0x60000000;
- __DDR_SIZE = 0x02000000;
- MEMORY
- {
- ITCM (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
- DTCM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
- DATA_SRAM (rwx) : ORIGIN = __DATA_SRAM_BASE, LENGTH = __DATA_SRAM_SIZE
- SRAM (rwx) : ORIGIN = __SRAM_BASE, LENGTH = __SRAM_SIZE
- DDR (rwx) : ORIGIN = __DDR_BASE, LENGTH = __DDR_SIZE
- }
- ENTRY(Reset_Handler)
- SECTIONS
- {
-
- .ddr :
- {
- . = ALIGN (16);
- *(.rodata.tvm)
- . = ALIGN (16);
- *(.data.tvm);
- . = ALIGN(16);
- } > DDR
- .text :
- {
- KEEP(*(.vectors))
- *(.text*)
- KEEP(*(.init))
- KEEP(*(.fini))
-
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
- *(.rodata*)
- KEEP(*(.eh_frame*))
- } > ITCM
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > ITCM
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > ITCM
- __exidx_end = .;
- .copy.table :
- {
- . = ALIGN(4);
- __copy_table_start__ = .;
- LONG (__etext)
- LONG (__data_start__)
- LONG (__data_end__ - __data_start__)
-
- __copy_table_end__ = .;
- } > ITCM
- .zero.table :
- {
- . = ALIGN(4);
- __zero_table_start__ = .;
- __zero_table_end__ = .;
- } > ITCM
-
- __etext = ALIGN (4);
- .sram :
- {
- . = ALIGN(16);
- } > SRAM AT > SRAM
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data)
- *(.data.*)
- . = ALIGN(4);
-
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- . = ALIGN(4);
-
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
- . = ALIGN(4);
-
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
- KEEP(*(.jcr*))
- . = ALIGN(4);
-
- __data_end__ = .;
- } > DTCM
- .bss.noinit (NOLOAD):
- {
- . = ALIGN(16);
- *(.bss.noinit.*)
- . = ALIGN(16);
- } > SRAM AT > SRAM
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss)
- *(.bss.*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > DTCM AT > DTCM
- .data_sram :
- {
- . = ALIGN(16);
- } > DATA_SRAM
- .heap (COPY) :
- {
- . = ALIGN(8);
- __end__ = .;
- PROVIDE(end = .);
- . = . + __HEAP_SIZE;
- . = ALIGN(8);
- __HeapLimit = .;
- } > DTCM
- .stack (ORIGIN(DTCM) + LENGTH(DTCM) - __STACK_SIZE) (COPY) :
- {
- . = ALIGN(8);
- __StackLimit = .;
- . = . + __STACK_SIZE;
- . = ALIGN(8);
- __StackTop = .;
- } > DTCM
- PROVIDE(__stack = __StackTop);
-
- ASSERT(__StackLimit >= __bss_end__, "region DTCM overflowed with stack")
- }
|