Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
TARGET_LPC824/TOOLCHAIN_GCC_CR/LPC824.ld@97:433970e64889, 2015-04-14 (annotated)
- Committer:
- Kojto
- Date:
- Tue Apr 14 10:58:58 2015 +0200
- Revision:
- 97:433970e64889
Release 97 of the mbed library
Changes:
- NRF51 - Update Softdevice, fix us ticker
- MTS Dragonfly - bugfixes, IAR support
- MTS mdot - bootloader support
- RZ_A1 - nvic wrapper
- STM F3xx, F4xx - hal reorganization
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Kojto | 97:433970e64889 | 1 | /*Based on following file |
| Kojto | 97:433970e64889 | 2 | * (c) Code Red Technologies Ltd, 2008-13 |
| Kojto | 97:433970e64889 | 3 | * (c) NXP Semiconductors 2013-2015 |
| Kojto | 97:433970e64889 | 4 | * Generated linker script file for LPC824 |
| Kojto | 97:433970e64889 | 5 | * Created from generic_c.ld (LPCXpresso v7.4 (0 [Build 229] [2014-09-16] )) |
| Kojto | 97:433970e64889 | 6 | * By LPCXpresso v7.4.0 [Build 229] [2014-09-16] on Fri Jan 02 03:36:48 JST 2015 |
| Kojto | 97:433970e64889 | 7 | */ |
| Kojto | 97:433970e64889 | 8 | |
| Kojto | 97:433970e64889 | 9 | /* Linker script to configure memory regions. */ |
| Kojto | 97:433970e64889 | 10 | MEMORY |
| Kojto | 97:433970e64889 | 11 | { |
| Kojto | 97:433970e64889 | 12 | /* Define each memory region */ |
| Kojto | 97:433970e64889 | 13 | MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32K bytes */ |
| Kojto | 97:433970e64889 | 14 | RamLoc8 (rwx) : ORIGIN = 0x10000000+0xC0, LENGTH = 0x2000-0xC0 /* 8K bytes */ |
| Kojto | 97:433970e64889 | 15 | |
| Kojto | 97:433970e64889 | 16 | |
| Kojto | 97:433970e64889 | 17 | } |
| Kojto | 97:433970e64889 | 18 | |
| Kojto | 97:433970e64889 | 19 | /* Define a symbol for the top of each memory region */ |
| Kojto | 97:433970e64889 | 20 | __top_MFlash32 = 0x0 + 0x8000; |
| Kojto | 97:433970e64889 | 21 | __top_RamLoc8 = 0x10000000 + 0x2000; |
| Kojto | 97:433970e64889 | 22 | |
| Kojto | 97:433970e64889 | 23 | GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o) |
| Kojto | 97:433970e64889 | 24 | /*GROUP(libcr_nohost.a libcr_c.a libcr_eabihelpers.a libm.a)*/ |
| Kojto | 97:433970e64889 | 25 | /* Linker script to place sections and symbol values. Should be used together |
| Kojto | 97:433970e64889 | 26 | * with other linker script that defines memory regions FLASH and RAM. |
| Kojto | 97:433970e64889 | 27 | * It references following symbols, which must be defined in code: |
| Kojto | 97:433970e64889 | 28 | * Reset_Handler : Entry of reset handler |
| Kojto | 97:433970e64889 | 29 | * |
| Kojto | 97:433970e64889 | 30 | * It defines following symbols, which code can use without definition: |
| Kojto | 97:433970e64889 | 31 | * __exidx_start |
| Kojto | 97:433970e64889 | 32 | * __exidx_end |
| Kojto | 97:433970e64889 | 33 | * __etext |
| Kojto | 97:433970e64889 | 34 | * __data_start__ |
| Kojto | 97:433970e64889 | 35 | * __preinit_array_start |
| Kojto | 97:433970e64889 | 36 | * __preinit_array_end |
| Kojto | 97:433970e64889 | 37 | * __init_array_start |
| Kojto | 97:433970e64889 | 38 | * __init_array_end |
| Kojto | 97:433970e64889 | 39 | * __fini_array_start |
| Kojto | 97:433970e64889 | 40 | * __fini_array_end |
| Kojto | 97:433970e64889 | 41 | * __data_end__ |
| Kojto | 97:433970e64889 | 42 | * __bss_start__ |
| Kojto | 97:433970e64889 | 43 | * __bss_end__ |
| Kojto | 97:433970e64889 | 44 | * __end__ |
| Kojto | 97:433970e64889 | 45 | * end |
| Kojto | 97:433970e64889 | 46 | * __HeapLimit |
| Kojto | 97:433970e64889 | 47 | * __StackLimit |
| Kojto | 97:433970e64889 | 48 | * __StackTop |
| Kojto | 97:433970e64889 | 49 | * __stack |
| Kojto | 97:433970e64889 | 50 | */ |
| Kojto | 97:433970e64889 | 51 | ENTRY(ResetISR) |
| Kojto | 97:433970e64889 | 52 | |
| Kojto | 97:433970e64889 | 53 | SECTIONS |
| Kojto | 97:433970e64889 | 54 | { |
| Kojto | 97:433970e64889 | 55 | |
| Kojto | 97:433970e64889 | 56 | /* MAIN TEXT SECTION */ |
| Kojto | 97:433970e64889 | 57 | .text : ALIGN(4) |
| Kojto | 97:433970e64889 | 58 | { |
| Kojto | 97:433970e64889 | 59 | FILL(0xff) |
| Kojto | 97:433970e64889 | 60 | __vectors_start__ = ABSOLUTE(.) ; |
| Kojto | 97:433970e64889 | 61 | KEEP(*(.isr_vector)) |
| Kojto | 97:433970e64889 | 62 | |
| Kojto | 97:433970e64889 | 63 | /* Global Section Table */ |
| Kojto | 97:433970e64889 | 64 | . = ALIGN(4) ; |
| Kojto | 97:433970e64889 | 65 | __section_table_start = .; |
| Kojto | 97:433970e64889 | 66 | __data_section_table = .; |
| Kojto | 97:433970e64889 | 67 | LONG(LOADADDR(.data)); |
| Kojto | 97:433970e64889 | 68 | LONG( ADDR(.data)); |
| Kojto | 97:433970e64889 | 69 | LONG( SIZEOF(.data)); |
| Kojto | 97:433970e64889 | 70 | __data_section_table_end = .; |
| Kojto | 97:433970e64889 | 71 | __bss_section_table = .; |
| Kojto | 97:433970e64889 | 72 | LONG( ADDR(.bss)); |
| Kojto | 97:433970e64889 | 73 | LONG( SIZEOF(.bss)); |
| Kojto | 97:433970e64889 | 74 | __bss_section_table_end = .; |
| Kojto | 97:433970e64889 | 75 | __section_table_end = . ; |
| Kojto | 97:433970e64889 | 76 | /* End of Global Section Table */ |
| Kojto | 97:433970e64889 | 77 | |
| Kojto | 97:433970e64889 | 78 | |
| Kojto | 97:433970e64889 | 79 | *(.after_vectors*) |
| Kojto | 97:433970e64889 | 80 | } >MFlash32 |
| Kojto | 97:433970e64889 | 81 | |
| Kojto | 97:433970e64889 | 82 | .text : ALIGN(4) |
| Kojto | 97:433970e64889 | 83 | { |
| Kojto | 97:433970e64889 | 84 | *(.text*) |
| Kojto | 97:433970e64889 | 85 | *(.rodata .rodata.* .constdata .constdata.*) |
| Kojto | 97:433970e64889 | 86 | . = ALIGN(4); |
| Kojto | 97:433970e64889 | 87 | |
| Kojto | 97:433970e64889 | 88 | |
| Kojto | 97:433970e64889 | 89 | /* C++ constructors etc */ |
| Kojto | 97:433970e64889 | 90 | . = ALIGN(4); |
| Kojto | 97:433970e64889 | 91 | KEEP(*(.init)) |
| Kojto | 97:433970e64889 | 92 | |
| Kojto | 97:433970e64889 | 93 | . = ALIGN(4); |
| Kojto | 97:433970e64889 | 94 | __preinit_array_start = .; |
| Kojto | 97:433970e64889 | 95 | KEEP (*(.preinit_array)) |
| Kojto | 97:433970e64889 | 96 | __preinit_array_end = .; |
| Kojto | 97:433970e64889 | 97 | |
| Kojto | 97:433970e64889 | 98 | . = ALIGN(4); |
| Kojto | 97:433970e64889 | 99 | __init_array_start = .; |
| Kojto | 97:433970e64889 | 100 | KEEP (*(SORT(.init_array.*))) |
| Kojto | 97:433970e64889 | 101 | KEEP (*(.init_array)) |
| Kojto | 97:433970e64889 | 102 | __init_array_end = .; |
| Kojto | 97:433970e64889 | 103 | |
| Kojto | 97:433970e64889 | 104 | KEEP(*(.fini)); |
| Kojto | 97:433970e64889 | 105 | |
| Kojto | 97:433970e64889 | 106 | /* .ctors */ |
| Kojto | 97:433970e64889 | 107 | *crtbegin.o(.ctors) |
| Kojto | 97:433970e64889 | 108 | *crtbegin?.o(.ctors) |
| Kojto | 97:433970e64889 | 109 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
| Kojto | 97:433970e64889 | 110 | *(SORT(.ctors.*)) |
| Kojto | 97:433970e64889 | 111 | *(.ctors) |
| Kojto | 97:433970e64889 | 112 | |
| Kojto | 97:433970e64889 | 113 | /* .dtors */ |
| Kojto | 97:433970e64889 | 114 | *crtbegin.o(.dtors) |
| Kojto | 97:433970e64889 | 115 | *crtbegin?.o(.dtors) |
| Kojto | 97:433970e64889 | 116 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
| Kojto | 97:433970e64889 | 117 | *(SORT(.dtors.*)) |
| Kojto | 97:433970e64889 | 118 | *(.dtors) |
| Kojto | 97:433970e64889 | 119 | |
| Kojto | 97:433970e64889 | 120 | *(.rodata*) |
| Kojto | 97:433970e64889 | 121 | |
| Kojto | 97:433970e64889 | 122 | KEEP(*(.eh_frame*)) |
| Kojto | 97:433970e64889 | 123 | |
| Kojto | 97:433970e64889 | 124 | |
| Kojto | 97:433970e64889 | 125 | |
| Kojto | 97:433970e64889 | 126 | } > MFlash32 |
| Kojto | 97:433970e64889 | 127 | |
| Kojto | 97:433970e64889 | 128 | /* |
| Kojto | 97:433970e64889 | 129 | * for exception handling/unwind - some Newlib functions (in common |
| Kojto | 97:433970e64889 | 130 | * with C++ and STDC++) use this. |
| Kojto | 97:433970e64889 | 131 | */ |
| Kojto | 97:433970e64889 | 132 | .ARM.extab : ALIGN(4) |
| Kojto | 97:433970e64889 | 133 | { |
| Kojto | 97:433970e64889 | 134 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
| Kojto | 97:433970e64889 | 135 | } > MFlash32 |
| Kojto | 97:433970e64889 | 136 | __exidx_start = .; |
| Kojto | 97:433970e64889 | 137 | |
| Kojto | 97:433970e64889 | 138 | .ARM.exidx : ALIGN(4) |
| Kojto | 97:433970e64889 | 139 | { |
| Kojto | 97:433970e64889 | 140 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
| Kojto | 97:433970e64889 | 141 | } > MFlash32 |
| Kojto | 97:433970e64889 | 142 | __exidx_end = .; |
| Kojto | 97:433970e64889 | 143 | |
| Kojto | 97:433970e64889 | 144 | _etext = .; |
| Kojto | 97:433970e64889 | 145 | |
| Kojto | 97:433970e64889 | 146 | |
| Kojto | 97:433970e64889 | 147 | /* MAIN DATA SECTION */ |
| Kojto | 97:433970e64889 | 148 | |
| Kojto | 97:433970e64889 | 149 | /* Default MTB section */ |
| Kojto | 97:433970e64889 | 150 | .mtb_buffer_default (NOLOAD) : |
| Kojto | 97:433970e64889 | 151 | { |
| Kojto | 97:433970e64889 | 152 | KEEP(*(.mtb*)) |
| Kojto | 97:433970e64889 | 153 | } > RamLoc8 |
| Kojto | 97:433970e64889 | 154 | |
| Kojto | 97:433970e64889 | 155 | .uninit_RESERVED : ALIGN(4) |
| Kojto | 97:433970e64889 | 156 | { |
| Kojto | 97:433970e64889 | 157 | KEEP(*(.bss.$RESERVED*)) |
| Kojto | 97:433970e64889 | 158 | . = ALIGN(4) ; |
| Kojto | 97:433970e64889 | 159 | _end_uninit_RESERVED = .; |
| Kojto | 97:433970e64889 | 160 | } > RamLoc8 |
| Kojto | 97:433970e64889 | 161 | |
| Kojto | 97:433970e64889 | 162 | |
| Kojto | 97:433970e64889 | 163 | /* Main DATA section (RamLoc8) */ |
| Kojto | 97:433970e64889 | 164 | .data : ALIGN(4) |
| Kojto | 97:433970e64889 | 165 | { |
| Kojto | 97:433970e64889 | 166 | FILL(0xff) |
| Kojto | 97:433970e64889 | 167 | _data = . ; |
| Kojto | 97:433970e64889 | 168 | *(vtable) |
| Kojto | 97:433970e64889 | 169 | *(.ramfunc*) |
| Kojto | 97:433970e64889 | 170 | *(.data*) |
| Kojto | 97:433970e64889 | 171 | . = ALIGN(4) ; |
| Kojto | 97:433970e64889 | 172 | _edata = . ; |
| Kojto | 97:433970e64889 | 173 | } > RamLoc8 AT>MFlash32 |
| Kojto | 97:433970e64889 | 174 | |
| Kojto | 97:433970e64889 | 175 | |
| Kojto | 97:433970e64889 | 176 | /* MAIN BSS SECTION */ |
| Kojto | 97:433970e64889 | 177 | .bss : ALIGN(4) |
| Kojto | 97:433970e64889 | 178 | { |
| Kojto | 97:433970e64889 | 179 | _bss = .; |
| Kojto | 97:433970e64889 | 180 | *(.bss*) |
| Kojto | 97:433970e64889 | 181 | *(COMMON) |
| Kojto | 97:433970e64889 | 182 | . = ALIGN(4) ; |
| Kojto | 97:433970e64889 | 183 | _ebss = .; |
| Kojto | 97:433970e64889 | 184 | PROVIDE(end = .); |
| Kojto | 97:433970e64889 | 185 | } > RamLoc8 |
| Kojto | 97:433970e64889 | 186 | |
| Kojto | 97:433970e64889 | 187 | |
| Kojto | 97:433970e64889 | 188 | /* DEFAULT NOINIT SECTION */ |
| Kojto | 97:433970e64889 | 189 | .noinit (NOLOAD): ALIGN(4) |
| Kojto | 97:433970e64889 | 190 | { |
| Kojto | 97:433970e64889 | 191 | _noinit = .; |
| Kojto | 97:433970e64889 | 192 | *(.noinit*) |
| Kojto | 97:433970e64889 | 193 | . = ALIGN(4) ; |
| Kojto | 97:433970e64889 | 194 | _end_noinit = .; |
| Kojto | 97:433970e64889 | 195 | } > RamLoc8 |
| Kojto | 97:433970e64889 | 196 | |
| Kojto | 97:433970e64889 | 197 | PROVIDE(_pvHeapStart = DEFINED(__user_heap_base) ? __user_heap_base : .); |
| Kojto | 97:433970e64889 | 198 | PROVIDE(_vStackTop = DEFINED(__user_stack_top) ? __user_stack_top : __top_RamLoc8 - 0); |
| Kojto | 97:433970e64889 | 199 | } |
