123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- #define __ASSEMBLY__
- #include <target_mem_config.h>
- MEMORY {
- #if (REGION_ICCM_SIZE != 0)
- REGION_ICCM : ORIGIN = REGION_ICCM_START, LENGTH = REGION_ICCM_SIZE
- #endif
- #if (REGION_DCCM_SIZE !=0)
- REGION_DCCM : ORIGIN = REGION_DCCM_START, LENGTH = REGION_DCCM_SIZE
- #endif
- #if (REGION_XCCM_SIZE != 0)
- REGION_XCCM : ORIGIN = REGION_XCCM_START, LENGTH = REGION_XCCM_SIZE
- #endif
- #if (REGION_YCCM_SIZE != 0)
- REGION_YCCM : ORIGIN = REGION_YCCM_START, LENGTH = REGION_YCCM_SIZE
- #endif
- #if (REGION_EXT_ROM_SIZE != 0)
- REGION_EXT_ROM : ORIGIN = REGION_EXT_ROM_START, LENGTH = REGION_EXT_ROM_SIZE
- #endif
- #if (REGION_EXT_RAM_SIZE != 0)
- REGION_EXT_RAM : ORIGIN = REGION_EXT_RAM_START, LENGTH = REGION_EXT_RAM_SIZE
- #endif
- }
- ENTRY(_start)
- SECTIONS {
- GROUP : {
- .image_head: {
- . = . + IMAGE_HEAD_SIZE;
- }
- .init_bootstrap:{
- _f_init = .;
- *(.init_vector .init_vector.*)
- *(.init_bootstrap .init_bootstrap.*)
- _e_init = .;
- }
- .vector ALIGN(1024): {
- _f_vector = .;
- *(.vector .vector.*)
- _e_vector = .;
- }
- } > REGION_ROM
- #if (REGION_XCCM_SIZE != 0)
- GROUP (NOLOAD): {
- .x_ccm ALIGN(8): {
- _f_x_ccm = .;
- *(.x_ccm)
- *(.x_ccm.*)
- _e_x_ccm = .;
- }
- } > REGION_XCCM
- #endif
- #if (REGION_YCCM_SIZE != 0)
- GROUP (NOLOAD): {
- .y_ccm ALIGN(8): {
- _f_y_ccm = .;
- *(.y_ccm)
- *(.y_ccm.*)
- _e_y_ccm = .;
- }
- } > REGION_YCCM
- #endif
- GROUP : {
- .text ALIGN(4): {
- _f_text = .;
- *(TYPE text)
- *(.text*)
- _e_text = .;
- }
- .rodata ALIGN(4): {
- _f_rodata = .;
- _fctors = .;
- *(.ctors*)
- _ectors = .;
- _fdtors = .;
- *(.dtors*)
- _edtors = .;
- _feh_frame = .;
- *(.eh_frame*)
- _eeh_frame = .;
- *(TYPE lit)
- /* section information for finsh shell */
- . = ALIGN(4);
- __fsymtab_start = .;
- *(FSymTab*)
- __fsymtab_end = .;
- . = ALIGN(4);
- __vsymtab_start = .;
- *(VSymTab*)
- __vsymtab_end = .;
- . = ALIGN(4);
- __rt_init_start = .;
- *(.rti_fn*)
- __rt_init_end = .;
- . = ALIGN(4);
- _e_rodata = .;
- }
- } > REGION_ROM
- GROUP : {
- .data ALIGN(8): {
- _f_data = .;
- _f_sdata = .;
- *(.sdata)
- *(.sbss)
- _e_sdata = .;
- *(TYPE data)
- }
- #if defined(EMBARC_UNIT_TEST)
- .unit_test ALIGN(8): {
- _f_embarc_unittest = .;
- KEEP(*(".embarc_unittest"))
- _e_embarc_unittest = .;
- }
- #endif
- .tls ALIGN(8): {
- *(.tls*)
- _e_data = .;
- }
- } > REGION_RAM AT > REGION_ROM
- GROUP (NOLOAD) : {
- .bss ALIGN(8): {
- _f_bss = .;
- *(TYPE bss)
- _e_bss = .;
- }
- .stack ALIGN(4) SIZE(_STACKSIZE): {}
- .heap? ALIGN(4) SIZE(_HEAPSIZE): {}
- } > REGION_RAM
- _f_stack = ADDR(.stack);
- _e_stack = ADDR(.stack) + SIZEOF(.stack);
- _f_heap = ADDR(.heap);
- _e_heap = ADDR(.heap) + SIZEOF(.heap);
- _load_addr_text = LOADADDR(.text);
- _load_addr_rodata = LOADADDR(.rodata);
- _load_addr_data = LOADADDR(.data);
- }
|