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