my fork
Fork of mbed by
TARGET_ARCH_GPRS/TOOLCHAIN_GCC_CR/LPC11U37.ld@88:9327015d4013, 2014-08-15 (annotated)
- Committer:
- bogdanm
- Date:
- Fri Aug 15 15:28:31 2014 +0100
- Revision:
- 88:9327015d4013
Release 88 of the mbed library
Main changes:
- changed "error.h" to "mbed_error.h" to avoid conflicts with 3rd party code
- LPC1549 SPI driver fixes
- K64F Ethernet TX buffer reclaim mechanism fix
- STDIO initialization fix
- NUCLEO_F334R8 I2C clock fix
- various other fixes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 88:9327015d4013 | 1 | /* mbed - LPC11U35 linker script |
bogdanm | 88:9327015d4013 | 2 | * Based linker script generated by Code Red Technologies Red Suite 4.1 |
bogdanm | 88:9327015d4013 | 3 | */ |
bogdanm | 88:9327015d4013 | 4 | GROUP(libgcc.a libc_s.a libstdc++_s.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o) |
bogdanm | 88:9327015d4013 | 5 | |
bogdanm | 88:9327015d4013 | 6 | MEMORY |
bogdanm | 88:9327015d4013 | 7 | { |
bogdanm | 88:9327015d4013 | 8 | /* Define each memory region */ |
bogdanm | 88:9327015d4013 | 9 | MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x20000 /* 128k */ |
bogdanm | 88:9327015d4013 | 10 | RamLoc8 (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40 /* 8k */ |
bogdanm | 88:9327015d4013 | 11 | RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2k */ |
bogdanm | 88:9327015d4013 | 12 | } |
bogdanm | 88:9327015d4013 | 13 | /* Define a symbol for the top of each memory region */ |
bogdanm | 88:9327015d4013 | 14 | __top_MFlash32 = 0x0 + 0x10000; |
bogdanm | 88:9327015d4013 | 15 | __top_RamLoc8 = 0x10000000 + 0x1F40; |
bogdanm | 88:9327015d4013 | 16 | __top_RamUsb2 = 0x20004000 + 0x800; |
bogdanm | 88:9327015d4013 | 17 | |
bogdanm | 88:9327015d4013 | 18 | ENTRY(ResetISR) |
bogdanm | 88:9327015d4013 | 19 | |
bogdanm | 88:9327015d4013 | 20 | SECTIONS |
bogdanm | 88:9327015d4013 | 21 | { |
bogdanm | 88:9327015d4013 | 22 | |
bogdanm | 88:9327015d4013 | 23 | /* MAIN TEXT SECTION */ |
bogdanm | 88:9327015d4013 | 24 | .text : ALIGN(4) |
bogdanm | 88:9327015d4013 | 25 | { |
bogdanm | 88:9327015d4013 | 26 | FILL(0xff) |
bogdanm | 88:9327015d4013 | 27 | KEEP(*(.isr_vector)) |
bogdanm | 88:9327015d4013 | 28 | *(.text.ResetISR) |
bogdanm | 88:9327015d4013 | 29 | . = 0x200; |
bogdanm | 88:9327015d4013 | 30 | |
bogdanm | 88:9327015d4013 | 31 | /* Global Section Table */ |
bogdanm | 88:9327015d4013 | 32 | . = ALIGN(4) ; |
bogdanm | 88:9327015d4013 | 33 | __section_table_start = .; |
bogdanm | 88:9327015d4013 | 34 | __data_section_table = .; |
bogdanm | 88:9327015d4013 | 35 | LONG(LOADADDR(.data)); |
bogdanm | 88:9327015d4013 | 36 | LONG( ADDR(.data)) ; |
bogdanm | 88:9327015d4013 | 37 | LONG( SIZEOF(.data)); |
bogdanm | 88:9327015d4013 | 38 | LONG(LOADADDR(.data_RAM2)); |
bogdanm | 88:9327015d4013 | 39 | LONG( ADDR(.data_RAM2)) ; |
bogdanm | 88:9327015d4013 | 40 | LONG( SIZEOF(.data_RAM2)); |
bogdanm | 88:9327015d4013 | 41 | __data_section_table_end = .; |
bogdanm | 88:9327015d4013 | 42 | __bss_section_table = .; |
bogdanm | 88:9327015d4013 | 43 | LONG( ADDR(.bss)); |
bogdanm | 88:9327015d4013 | 44 | LONG( SIZEOF(.bss)); |
bogdanm | 88:9327015d4013 | 45 | LONG( ADDR(.bss_RAM2)); |
bogdanm | 88:9327015d4013 | 46 | LONG( SIZEOF(.bss_RAM2)); |
bogdanm | 88:9327015d4013 | 47 | __bss_section_table_end = .; |
bogdanm | 88:9327015d4013 | 48 | __section_table_end = . ; |
bogdanm | 88:9327015d4013 | 49 | /* End of Global Section Table */ |
bogdanm | 88:9327015d4013 | 50 | |
bogdanm | 88:9327015d4013 | 51 | |
bogdanm | 88:9327015d4013 | 52 | *(.after_vectors*) |
bogdanm | 88:9327015d4013 | 53 | |
bogdanm | 88:9327015d4013 | 54 | *(.text*) |
bogdanm | 88:9327015d4013 | 55 | *(.rodata .rodata.*) |
bogdanm | 88:9327015d4013 | 56 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 57 | |
bogdanm | 88:9327015d4013 | 58 | /* C++ constructors etc */ |
bogdanm | 88:9327015d4013 | 59 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 60 | KEEP(*(.init)) |
bogdanm | 88:9327015d4013 | 61 | |
bogdanm | 88:9327015d4013 | 62 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 63 | __preinit_array_start = .; |
bogdanm | 88:9327015d4013 | 64 | KEEP (*(.preinit_array)) |
bogdanm | 88:9327015d4013 | 65 | __preinit_array_end = .; |
bogdanm | 88:9327015d4013 | 66 | |
bogdanm | 88:9327015d4013 | 67 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 68 | __init_array_start = .; |
bogdanm | 88:9327015d4013 | 69 | KEEP (*(SORT(.init_array.*))) |
bogdanm | 88:9327015d4013 | 70 | KEEP (*(.init_array)) |
bogdanm | 88:9327015d4013 | 71 | __init_array_end = .; |
bogdanm | 88:9327015d4013 | 72 | |
bogdanm | 88:9327015d4013 | 73 | KEEP(*(.fini)); |
bogdanm | 88:9327015d4013 | 74 | |
bogdanm | 88:9327015d4013 | 75 | . = ALIGN(0x4); |
bogdanm | 88:9327015d4013 | 76 | KEEP (*crtbegin.o(.ctors)) |
bogdanm | 88:9327015d4013 | 77 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
bogdanm | 88:9327015d4013 | 78 | KEEP (*(SORT(.ctors.*))) |
bogdanm | 88:9327015d4013 | 79 | KEEP (*crtend.o(.ctors)) |
bogdanm | 88:9327015d4013 | 80 | |
bogdanm | 88:9327015d4013 | 81 | . = ALIGN(0x4); |
bogdanm | 88:9327015d4013 | 82 | KEEP (*crtbegin.o(.dtors)) |
bogdanm | 88:9327015d4013 | 83 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
bogdanm | 88:9327015d4013 | 84 | KEEP (*(SORT(.dtors.*))) |
bogdanm | 88:9327015d4013 | 85 | KEEP (*crtend.o(.dtors)) |
bogdanm | 88:9327015d4013 | 86 | /* End C++ */ |
bogdanm | 88:9327015d4013 | 87 | } > MFlash32 |
bogdanm | 88:9327015d4013 | 88 | |
bogdanm | 88:9327015d4013 | 89 | /* |
bogdanm | 88:9327015d4013 | 90 | * for exception handling/unwind - some Newlib functions (in common |
bogdanm | 88:9327015d4013 | 91 | * with C++ and STDC++) use this. |
bogdanm | 88:9327015d4013 | 92 | */ |
bogdanm | 88:9327015d4013 | 93 | .ARM.extab : ALIGN(4) |
bogdanm | 88:9327015d4013 | 94 | { |
bogdanm | 88:9327015d4013 | 95 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
bogdanm | 88:9327015d4013 | 96 | } > MFlash32 |
bogdanm | 88:9327015d4013 | 97 | __exidx_start = .; |
bogdanm | 88:9327015d4013 | 98 | |
bogdanm | 88:9327015d4013 | 99 | .ARM.exidx : ALIGN(4) |
bogdanm | 88:9327015d4013 | 100 | { |
bogdanm | 88:9327015d4013 | 101 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
bogdanm | 88:9327015d4013 | 102 | } > MFlash32 |
bogdanm | 88:9327015d4013 | 103 | __exidx_end = .; |
bogdanm | 88:9327015d4013 | 104 | |
bogdanm | 88:9327015d4013 | 105 | _etext = .; |
bogdanm | 88:9327015d4013 | 106 | |
bogdanm | 88:9327015d4013 | 107 | |
bogdanm | 88:9327015d4013 | 108 | .data_RAM2 : ALIGN(4) |
bogdanm | 88:9327015d4013 | 109 | { |
bogdanm | 88:9327015d4013 | 110 | FILL(0xff) |
bogdanm | 88:9327015d4013 | 111 | *(.data.$RAM2*) |
bogdanm | 88:9327015d4013 | 112 | *(.data.$RamUsb2*) |
bogdanm | 88:9327015d4013 | 113 | . = ALIGN(4) ; |
bogdanm | 88:9327015d4013 | 114 | } > RamUsb2 AT>MFlash32 |
bogdanm | 88:9327015d4013 | 115 | |
bogdanm | 88:9327015d4013 | 116 | /* MAIN DATA SECTION */ |
bogdanm | 88:9327015d4013 | 117 | |
bogdanm | 88:9327015d4013 | 118 | .uninit_RESERVED : ALIGN(4) |
bogdanm | 88:9327015d4013 | 119 | { |
bogdanm | 88:9327015d4013 | 120 | KEEP(*(.bss.$RESERVED*)) |
bogdanm | 88:9327015d4013 | 121 | } > RamLoc8 |
bogdanm | 88:9327015d4013 | 122 | |
bogdanm | 88:9327015d4013 | 123 | .data : ALIGN(4) |
bogdanm | 88:9327015d4013 | 124 | { |
bogdanm | 88:9327015d4013 | 125 | FILL(0xff) |
bogdanm | 88:9327015d4013 | 126 | _data = .; |
bogdanm | 88:9327015d4013 | 127 | *(vtable) |
bogdanm | 88:9327015d4013 | 128 | *(.data*) |
bogdanm | 88:9327015d4013 | 129 | . = ALIGN(4) ; |
bogdanm | 88:9327015d4013 | 130 | _edata = .; |
bogdanm | 88:9327015d4013 | 131 | } > RamLoc8 AT>MFlash32 |
bogdanm | 88:9327015d4013 | 132 | |
bogdanm | 88:9327015d4013 | 133 | |
bogdanm | 88:9327015d4013 | 134 | .bss_RAM2 : ALIGN(4) |
bogdanm | 88:9327015d4013 | 135 | { |
bogdanm | 88:9327015d4013 | 136 | *(.bss.$RAM2*) |
bogdanm | 88:9327015d4013 | 137 | *(.bss.$RamUsb2*) |
bogdanm | 88:9327015d4013 | 138 | . = ALIGN(4) ; |
bogdanm | 88:9327015d4013 | 139 | } > RamUsb2 |
bogdanm | 88:9327015d4013 | 140 | |
bogdanm | 88:9327015d4013 | 141 | /* MAIN BSS SECTION */ |
bogdanm | 88:9327015d4013 | 142 | .bss : ALIGN(4) |
bogdanm | 88:9327015d4013 | 143 | { |
bogdanm | 88:9327015d4013 | 144 | _bss = .; |
bogdanm | 88:9327015d4013 | 145 | *(.bss*) |
bogdanm | 88:9327015d4013 | 146 | *(COMMON) |
bogdanm | 88:9327015d4013 | 147 | . = ALIGN(4) ; |
bogdanm | 88:9327015d4013 | 148 | _ebss = .; |
bogdanm | 88:9327015d4013 | 149 | PROVIDE(end = .); |
bogdanm | 88:9327015d4013 | 150 | __end__ = .; |
bogdanm | 88:9327015d4013 | 151 | } > RamLoc8 |
bogdanm | 88:9327015d4013 | 152 | |
bogdanm | 88:9327015d4013 | 153 | PROVIDE(_pvHeapStart = .); |
bogdanm | 88:9327015d4013 | 154 | PROVIDE(_vStackTop = __top_RamLoc8 - 0); |
bogdanm | 88:9327015d4013 | 155 | } |