1/* Program Entry, set to mark it as "used" and avoid gc */ 2MEMORY 3{ 4 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K 5 FLASH (rx) : ORIGIN = 0x1010000, LENGTH = 3008K 6} 7ENTRY(Reset_Handler) 8_system_stack_size = 0x4000; 9 10SECTIONS 11{ 12 .app_info : 13 { 14 . = ALIGN(512); 15 KEEP(*(.app_info)) 16 . = ALIGN(512); 17 } >FLASH 18 .text : 19 { 20 . = ALIGN(4); 21 __isr_start_address = .; 22 _stext = .; 23 KEEP(*(.isr_vector)) /* Startup code */ 24 25 . = ALIGN(4); 26 *startup_gcc.o(.text .text.*) 27 *(.text) /* remaining code */ 28 *(.text.*) /* remaining code */ 29 *(.rodata) /* read-only data (constants) */ 30 *(.rodata*) 31 *(.glue_7) 32 *(.glue_7t) 33 *(.gnu.linkonce.t*) 34 35 /* section information for finsh shell */ 36 . = ALIGN(4); 37 __fsymtab_start = .; 38 KEEP(*(FSymTab)) 39 __fsymtab_end = .; 40 41 . = ALIGN(4); 42 __vsymtab_start = .; 43 KEEP(*(VSymTab)) 44 __vsymtab_end = .; 45 46 /* section information for initial. */ 47 . = ALIGN(4); 48 __rt_init_start = .; 49 KEEP(*(SORT(.rti_fn*))) 50 __rt_init_end = .; 51 52 . = ALIGN(4); 53 54 PROVIDE(__ctors_start__ = .); 55 KEEP (*(SORT(.init_array.*))) 56 KEEP (*(.init_array)) 57 PROVIDE(__ctors_end__ = .); 58 59 . = ALIGN(4); 60 61 _etext = .; 62 } > FLASH 63 64 /* .ARM.exidx is sorted, so has to go in its own output section. */ 65 __exidx_start = .; 66 .ARM.exidx : 67 { 68 *(.ARM.exidx* .gnu.linkonce.armexidx.*) 69 70 /* This is used by the startup in order to initialize the .data secion */ 71 _sidata = .; 72 } > FLASH 73 __exidx_end = .; 74 75 /* .data section which is used for initialized data */ 76 77 .data : AT (_sidata) 78 { 79 . = ALIGN(4); 80 /* This is used by the startup in order to initialize the .data secion */ 81 _sdata = . ; 82 83 *(.data) 84 *(.data.*) 85 *(.gnu.linkonce.d*) 86 *(.RamFunc) /* .RamFunc sections */ 87 *(.RamFunc*) /* .RamFunc* sections */ 88 . = ALIGN(4); 89 /* This is used by the startup in order to initialize the .data secion */ 90 _edata = . ; 91 } >RAM 92 93 .stack : 94 { 95 . = ALIGN(4); 96 _sstack = .; 97 . = . + _system_stack_size; 98 . = ALIGN(4); 99 _estack = .; 100 } >RAM 101 102 __bss_start = .; 103 .bss : 104 { 105 . = ALIGN(4); 106 /* This is used by the startup in order to initialize the .bss secion */ 107 _sbss = .; 108 109 *(.bss) 110 *(.bss.*) 111 *(COMMON) 112 113 . = ALIGN(4); 114 /* This is used by the startup in order to initialize the .bss secion */ 115 _ebss = . ; 116 117 *(.bss.init) 118 } > RAM 119 __bss_end = .; 120 121 _end = .; 122 123 /* Stabs debugging sections. */ 124 .stab 0 : { *(.stab) } 125 .stabstr 0 : { *(.stabstr) } 126 .stab.excl 0 : { *(.stab.excl) } 127 .stab.exclstr 0 : { *(.stab.exclstr) } 128 .stab.index 0 : { *(.stab.index) } 129 .stab.indexstr 0 : { *(.stab.indexstr) } 130 .comment 0 : { *(.comment) } 131 /* DWARF debug sections. 132 * Symbols in the DWARF debugging sections are relative to the beginning 133 * of the section so we begin them at 0. */ 134 /* DWARF 1 */ 135 .debug 0 : { *(.debug) } 136 .line 0 : { *(.line) } 137 /* GNU DWARF 1 extensions */ 138 .debug_srcinfo 0 : { *(.debug_srcinfo) } 139 .debug_sfnames 0 : { *(.debug_sfnames) } 140 /* DWARF 1.1 and DWARF 2 */ 141 .debug_aranges 0 : { *(.debug_aranges) } 142 .debug_pubnames 0 : { *(.debug_pubnames) } 143 /* DWARF 2 */ 144 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 145 .debug_abbrev 0 : { *(.debug_abbrev) } 146 .debug_line 0 : { *(.debug_line) } 147 .debug_frame 0 : { *(.debug_frame) } 148 .debug_str 0 : { *(.debug_str) } 149 .debug_loc 0 : { *(.debug_loc) } 150 .debug_macinfo 0 : { *(.debug_macinfo) } 151 /* SGI/MIPS DWARF 2 extensions */ 152 .debug_weaknames 0 : { *(.debug_weaknames) } 153 .debug_funcnames 0 : { *(.debug_funcnames) } 154 .debug_typenames 0 : { *(.debug_typenames) } 155 .debug_varnames 0 : { *(.debug_varnames) } 156} 157