nothing changed
Fork of mbed by
LPC1768/GCC_CR/LPC1768.ld@0:a8fa94490a0a, 2012-09-22 (annotated)
- Committer:
- gokmenascioglu
- Date:
- Sat Sep 22 10:32:07 2012 +0000
- Revision:
- 0:a8fa94490a0a
alican library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gokmenascioglu | 0:a8fa94490a0a | 1 | /* mbed - LPC1768 linker script |
gokmenascioglu | 0:a8fa94490a0a | 2 | * Based linker script generated by Code Red Technologies Red Suite 4.1 |
gokmenascioglu | 0:a8fa94490a0a | 3 | */ |
gokmenascioglu | 0:a8fa94490a0a | 4 | GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o) |
gokmenascioglu | 0:a8fa94490a0a | 5 | |
gokmenascioglu | 0:a8fa94490a0a | 6 | MEMORY |
gokmenascioglu | 0:a8fa94490a0a | 7 | { |
gokmenascioglu | 0:a8fa94490a0a | 8 | /* Define each memory region */ |
gokmenascioglu | 0:a8fa94490a0a | 9 | MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */ |
gokmenascioglu | 0:a8fa94490a0a | 10 | RamLoc32 (rwx) : ORIGIN = 0x100000C8, LENGTH = 0x7F38 /* 32k */ |
gokmenascioglu | 0:a8fa94490a0a | 11 | RamAHB32 (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x8000 /* 32k */ |
gokmenascioglu | 0:a8fa94490a0a | 12 | |
gokmenascioglu | 0:a8fa94490a0a | 13 | } |
gokmenascioglu | 0:a8fa94490a0a | 14 | /* Define a symbol for the top of each memory region */ |
gokmenascioglu | 0:a8fa94490a0a | 15 | __top_MFlash512 = 0x0 + 0x80000; |
gokmenascioglu | 0:a8fa94490a0a | 16 | __top_RamLoc32 = 0x10000000 + 0x8000; |
gokmenascioglu | 0:a8fa94490a0a | 17 | __top_RamAHB32 = 0x2007c000 + 0x8000; |
gokmenascioglu | 0:a8fa94490a0a | 18 | |
gokmenascioglu | 0:a8fa94490a0a | 19 | ENTRY(ResetISR) |
gokmenascioglu | 0:a8fa94490a0a | 20 | |
gokmenascioglu | 0:a8fa94490a0a | 21 | SECTIONS |
gokmenascioglu | 0:a8fa94490a0a | 22 | { |
gokmenascioglu | 0:a8fa94490a0a | 23 | |
gokmenascioglu | 0:a8fa94490a0a | 24 | /* MAIN TEXT SECTION */ |
gokmenascioglu | 0:a8fa94490a0a | 25 | .text : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 26 | { |
gokmenascioglu | 0:a8fa94490a0a | 27 | FILL(0xff) |
gokmenascioglu | 0:a8fa94490a0a | 28 | KEEP(*(.isr_vector)) |
gokmenascioglu | 0:a8fa94490a0a | 29 | |
gokmenascioglu | 0:a8fa94490a0a | 30 | /* Global Section Table */ |
gokmenascioglu | 0:a8fa94490a0a | 31 | . = ALIGN(4) ; |
gokmenascioglu | 0:a8fa94490a0a | 32 | __section_table_start = .; |
gokmenascioglu | 0:a8fa94490a0a | 33 | __data_section_table = .; |
gokmenascioglu | 0:a8fa94490a0a | 34 | LONG(LOADADDR(.data)); |
gokmenascioglu | 0:a8fa94490a0a | 35 | LONG( ADDR(.data)) ; |
gokmenascioglu | 0:a8fa94490a0a | 36 | LONG( SIZEOF(.data)); |
gokmenascioglu | 0:a8fa94490a0a | 37 | LONG(LOADADDR(.data_RAM2)); |
gokmenascioglu | 0:a8fa94490a0a | 38 | LONG( ADDR(.data_RAM2)) ; |
gokmenascioglu | 0:a8fa94490a0a | 39 | LONG( SIZEOF(.data_RAM2)); |
gokmenascioglu | 0:a8fa94490a0a | 40 | __data_section_table_end = .; |
gokmenascioglu | 0:a8fa94490a0a | 41 | __bss_section_table = .; |
gokmenascioglu | 0:a8fa94490a0a | 42 | LONG( ADDR(.bss)); |
gokmenascioglu | 0:a8fa94490a0a | 43 | LONG( SIZEOF(.bss)); |
gokmenascioglu | 0:a8fa94490a0a | 44 | LONG( ADDR(.bss_RAM2)); |
gokmenascioglu | 0:a8fa94490a0a | 45 | LONG( SIZEOF(.bss_RAM2)); |
gokmenascioglu | 0:a8fa94490a0a | 46 | __bss_section_table_end = .; |
gokmenascioglu | 0:a8fa94490a0a | 47 | __section_table_end = . ; |
gokmenascioglu | 0:a8fa94490a0a | 48 | /* End of Global Section Table */ |
gokmenascioglu | 0:a8fa94490a0a | 49 | |
gokmenascioglu | 0:a8fa94490a0a | 50 | |
gokmenascioglu | 0:a8fa94490a0a | 51 | *(.after_vectors*) |
gokmenascioglu | 0:a8fa94490a0a | 52 | |
gokmenascioglu | 0:a8fa94490a0a | 53 | *(.text*) |
gokmenascioglu | 0:a8fa94490a0a | 54 | *(.rodata .rodata.*) |
gokmenascioglu | 0:a8fa94490a0a | 55 | . = ALIGN(4); |
gokmenascioglu | 0:a8fa94490a0a | 56 | |
gokmenascioglu | 0:a8fa94490a0a | 57 | /* C++ constructors etc */ |
gokmenascioglu | 0:a8fa94490a0a | 58 | . = ALIGN(4); |
gokmenascioglu | 0:a8fa94490a0a | 59 | KEEP(*(.init)) |
gokmenascioglu | 0:a8fa94490a0a | 60 | |
gokmenascioglu | 0:a8fa94490a0a | 61 | . = ALIGN(4); |
gokmenascioglu | 0:a8fa94490a0a | 62 | __preinit_array_start = .; |
gokmenascioglu | 0:a8fa94490a0a | 63 | KEEP (*(.preinit_array)) |
gokmenascioglu | 0:a8fa94490a0a | 64 | __preinit_array_end = .; |
gokmenascioglu | 0:a8fa94490a0a | 65 | |
gokmenascioglu | 0:a8fa94490a0a | 66 | . = ALIGN(4); |
gokmenascioglu | 0:a8fa94490a0a | 67 | __init_array_start = .; |
gokmenascioglu | 0:a8fa94490a0a | 68 | KEEP (*(SORT(.init_array.*))) |
gokmenascioglu | 0:a8fa94490a0a | 69 | KEEP (*(.init_array)) |
gokmenascioglu | 0:a8fa94490a0a | 70 | __init_array_end = .; |
gokmenascioglu | 0:a8fa94490a0a | 71 | |
gokmenascioglu | 0:a8fa94490a0a | 72 | KEEP(*(.fini)); |
gokmenascioglu | 0:a8fa94490a0a | 73 | |
gokmenascioglu | 0:a8fa94490a0a | 74 | . = ALIGN(0x4); |
gokmenascioglu | 0:a8fa94490a0a | 75 | KEEP (*crtbegin.o(.ctors)) |
gokmenascioglu | 0:a8fa94490a0a | 76 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
gokmenascioglu | 0:a8fa94490a0a | 77 | KEEP (*(SORT(.ctors.*))) |
gokmenascioglu | 0:a8fa94490a0a | 78 | KEEP (*crtend.o(.ctors)) |
gokmenascioglu | 0:a8fa94490a0a | 79 | |
gokmenascioglu | 0:a8fa94490a0a | 80 | . = ALIGN(0x4); |
gokmenascioglu | 0:a8fa94490a0a | 81 | KEEP (*crtbegin.o(.dtors)) |
gokmenascioglu | 0:a8fa94490a0a | 82 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
gokmenascioglu | 0:a8fa94490a0a | 83 | KEEP (*(SORT(.dtors.*))) |
gokmenascioglu | 0:a8fa94490a0a | 84 | KEEP (*crtend.o(.dtors)) |
gokmenascioglu | 0:a8fa94490a0a | 85 | /* End C++ */ |
gokmenascioglu | 0:a8fa94490a0a | 86 | } > MFlash512 |
gokmenascioglu | 0:a8fa94490a0a | 87 | |
gokmenascioglu | 0:a8fa94490a0a | 88 | /* |
gokmenascioglu | 0:a8fa94490a0a | 89 | * for exception handling/unwind - some Newlib functions (in common |
gokmenascioglu | 0:a8fa94490a0a | 90 | * with C++ and STDC++) use this. |
gokmenascioglu | 0:a8fa94490a0a | 91 | */ |
gokmenascioglu | 0:a8fa94490a0a | 92 | .ARM.extab : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 93 | { |
gokmenascioglu | 0:a8fa94490a0a | 94 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
gokmenascioglu | 0:a8fa94490a0a | 95 | } > MFlash512 |
gokmenascioglu | 0:a8fa94490a0a | 96 | __exidx_start = .; |
gokmenascioglu | 0:a8fa94490a0a | 97 | |
gokmenascioglu | 0:a8fa94490a0a | 98 | .ARM.exidx : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 99 | { |
gokmenascioglu | 0:a8fa94490a0a | 100 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
gokmenascioglu | 0:a8fa94490a0a | 101 | } > MFlash512 |
gokmenascioglu | 0:a8fa94490a0a | 102 | __exidx_end = .; |
gokmenascioglu | 0:a8fa94490a0a | 103 | |
gokmenascioglu | 0:a8fa94490a0a | 104 | _etext = .; |
gokmenascioglu | 0:a8fa94490a0a | 105 | |
gokmenascioglu | 0:a8fa94490a0a | 106 | |
gokmenascioglu | 0:a8fa94490a0a | 107 | .data_RAM2 : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 108 | { |
gokmenascioglu | 0:a8fa94490a0a | 109 | FILL(0xff) |
gokmenascioglu | 0:a8fa94490a0a | 110 | *(.data.$RAM2*) |
gokmenascioglu | 0:a8fa94490a0a | 111 | *(.data.$RamAHB32*) |
gokmenascioglu | 0:a8fa94490a0a | 112 | . = ALIGN(4) ; |
gokmenascioglu | 0:a8fa94490a0a | 113 | } > RamAHB32 AT>MFlash512 |
gokmenascioglu | 0:a8fa94490a0a | 114 | |
gokmenascioglu | 0:a8fa94490a0a | 115 | /* MAIN DATA SECTION */ |
gokmenascioglu | 0:a8fa94490a0a | 116 | |
gokmenascioglu | 0:a8fa94490a0a | 117 | .uninit_RESERVED : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 118 | { |
gokmenascioglu | 0:a8fa94490a0a | 119 | KEEP(*(.bss.$RESERVED*)) |
gokmenascioglu | 0:a8fa94490a0a | 120 | } > RamLoc32 |
gokmenascioglu | 0:a8fa94490a0a | 121 | |
gokmenascioglu | 0:a8fa94490a0a | 122 | .data : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 123 | { |
gokmenascioglu | 0:a8fa94490a0a | 124 | FILL(0xff) |
gokmenascioglu | 0:a8fa94490a0a | 125 | _data = .; |
gokmenascioglu | 0:a8fa94490a0a | 126 | *(vtable) |
gokmenascioglu | 0:a8fa94490a0a | 127 | *(.data*) |
gokmenascioglu | 0:a8fa94490a0a | 128 | . = ALIGN(4) ; |
gokmenascioglu | 0:a8fa94490a0a | 129 | _edata = .; |
gokmenascioglu | 0:a8fa94490a0a | 130 | } > RamLoc32 AT>MFlash512 |
gokmenascioglu | 0:a8fa94490a0a | 131 | |
gokmenascioglu | 0:a8fa94490a0a | 132 | |
gokmenascioglu | 0:a8fa94490a0a | 133 | .bss_RAM2 : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 134 | { |
gokmenascioglu | 0:a8fa94490a0a | 135 | *(.bss.$RAM2*) |
gokmenascioglu | 0:a8fa94490a0a | 136 | *(.bss.$RamAHB32*) |
gokmenascioglu | 0:a8fa94490a0a | 137 | . = ALIGN(4) ; |
gokmenascioglu | 0:a8fa94490a0a | 138 | } > RamAHB32 |
gokmenascioglu | 0:a8fa94490a0a | 139 | |
gokmenascioglu | 0:a8fa94490a0a | 140 | /* MAIN BSS SECTION */ |
gokmenascioglu | 0:a8fa94490a0a | 141 | .bss : ALIGN(4) |
gokmenascioglu | 0:a8fa94490a0a | 142 | { |
gokmenascioglu | 0:a8fa94490a0a | 143 | _bss = .; |
gokmenascioglu | 0:a8fa94490a0a | 144 | *(.bss*) |
gokmenascioglu | 0:a8fa94490a0a | 145 | *(COMMON) |
gokmenascioglu | 0:a8fa94490a0a | 146 | . = ALIGN(4) ; |
gokmenascioglu | 0:a8fa94490a0a | 147 | _ebss = .; |
gokmenascioglu | 0:a8fa94490a0a | 148 | PROVIDE(end = .); |
gokmenascioglu | 0:a8fa94490a0a | 149 | } > RamLoc32 |
gokmenascioglu | 0:a8fa94490a0a | 150 | |
gokmenascioglu | 0:a8fa94490a0a | 151 | PROVIDE(_pvHeapStart = .); |
gokmenascioglu | 0:a8fa94490a0a | 152 | PROVIDE(_vStackTop = __top_RamLoc32 - 0); |
gokmenascioglu | 0:a8fa94490a0a | 153 | } |