/* Entry Point */ ENTRY(main) /* Highest address of the user mode stack */ _estack = ORIGIN(CODE1) + LENGTH(CODE1); /* end of "DATA" */ _Min_Heap_Size = 0x400; /* required amount of heap */ _Min_Stack_Size = 0x800; /* required amount of stack */ /* Memories definition */ MEMORY { CODE1 (rxw) : ORIGIN = 0x10000000, LENGTH = 142K CODE2 (rxw) : ORIGIN = 0x11800000, LENGTH = 512K } /* Sections */ SECTIONS { .code1 : /* code runs from RAM */ { . = ALIGN(128); main.o (.text .text.* .rodata.* ) . += 0x20000; } >CODE1 .code2 : /* code runs from RAM */ { *(.text*) /* .text* sections (code) */ . = ALIGN(8); } >CODE2 .gnu.sgstubs : { . = ALIGN(8); *(.gnu.sgstubs*) /* Secure Gateway stubs */ . = ALIGN(8); } >CODE1 /* Initialized data sections into "DATA" */ .data : { . = ALIGN(8); _sdata = .; /* create a global symbol at data start */ *(.data) /* .data sections */ *(.data*) /* .data sections */ . = ALIGN(8); _edata = .; /* define a global symbol at data end */ } >CODE1 .bss : { *(.bss) *(.bss*) *(COMMON) . = ALIGN(8); _ebss = .; /* define a global symbol at bss end */ . = ALIGN(8); PROVIDE ( end = . ); /*reserve space stack and heap */ PROVIDE ( _end = . ); . = ALIGN(8); } >CODE1 /* Remove information from the compiler libraries */ /DISCARD/ : { libc.a ( * ) libm.a ( * ) libgcc.a ( * ) } .ARM.attributes 0 : { *(.ARM.attributes) } }