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_LPC2368/TOOLCHAIN_GCC_ARM/LPC2368.ld@90:cb3d968589d8, 2014-10-28 (annotated)
- Committer:
- Kojto
- Date:
- Tue Oct 28 16:40:41 2014 +0000
- Revision:
- 90:cb3d968589d8
Release 90 of the mbed library
Changes:
- Freescale KSDK update (v1.0)
- K22 - new target addition
- KL43Z - new target addition
- Nucleo F091RC - new target addition
- Nucleo L152RE - STM32Cube driver
- Nordic - Softdevice v7.1.0
- Nvic files - BSD License
- LPC824 - various HAL fixes
- Nucleo F411RE - CMSIS - IAR files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 90:cb3d968589d8 | 1 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") |
Kojto | 90:cb3d968589d8 | 2 | OUTPUT_ARCH(arm) |
Kojto | 90:cb3d968589d8 | 3 | ENTRY(vectors) |
Kojto | 90:cb3d968589d8 | 4 | |
Kojto | 90:cb3d968589d8 | 5 | /* Memory Definitions: */ |
Kojto | 90:cb3d968589d8 | 6 | MEMORY |
Kojto | 90:cb3d968589d8 | 7 | { |
Kojto | 90:cb3d968589d8 | 8 | Flash (rx) : ORIGIN = 0x00000000, LENGTH = 512k |
Kojto | 90:cb3d968589d8 | 9 | Ram (rwx) : ORIGIN = 0x40000000, LENGTH = 32k |
Kojto | 90:cb3d968589d8 | 10 | UsbRam (rw) : ORIGIN = 0x7FD00000, LENGTH = 8k |
Kojto | 90:cb3d968589d8 | 11 | EthRam (rw) : ORIGIN = 0x7FE00000, LENGTH = 16k |
Kojto | 90:cb3d968589d8 | 12 | CanRam (rw) : ORIGIN = 0xE0038000, LENGTH = 2k |
Kojto | 90:cb3d968589d8 | 13 | BatRam (rw) : ORIGIN = 0xE0084000, LENGTH = 2k |
Kojto | 90:cb3d968589d8 | 14 | } |
Kojto | 90:cb3d968589d8 | 15 | |
Kojto | 90:cb3d968589d8 | 16 | /* Stack sizes: */ |
Kojto | 90:cb3d968589d8 | 17 | UND_Stack_Size = 16; |
Kojto | 90:cb3d968589d8 | 18 | SVC_Stack_Size = 512; |
Kojto | 90:cb3d968589d8 | 19 | ABT_Stack_Size = 16; |
Kojto | 90:cb3d968589d8 | 20 | FIQ_Stack_Size = 16; |
Kojto | 90:cb3d968589d8 | 21 | IRQ_Stack_Size = 256; |
Kojto | 90:cb3d968589d8 | 22 | Stack_Size_Total = UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size; |
Kojto | 90:cb3d968589d8 | 23 | |
Kojto | 90:cb3d968589d8 | 24 | /* Stack tops for each mode: */ |
Kojto | 90:cb3d968589d8 | 25 | __und_stack_top__ = __stacks_top__; |
Kojto | 90:cb3d968589d8 | 26 | __abt_stack_top__ = __und_stack_top__ - UND_Stack_Size ; |
Kojto | 90:cb3d968589d8 | 27 | __fiq_stack_top__ = __abt_stack_top__ - ABT_Stack_Size ; |
Kojto | 90:cb3d968589d8 | 28 | __irq_stack_top__ = __fiq_stack_top__ - FIQ_Stack_Size ; |
Kojto | 90:cb3d968589d8 | 29 | __svc_stack_top__ = __irq_stack_top__ - IRQ_Stack_Size ; |
Kojto | 90:cb3d968589d8 | 30 | |
Kojto | 90:cb3d968589d8 | 31 | /* C-accessible symbols for memory address ranges: */ |
Kojto | 90:cb3d968589d8 | 32 | __FLASH_segment_start__ = ORIGIN( Flash ); |
Kojto | 90:cb3d968589d8 | 33 | __FLASH_segment_end__ = ORIGIN( Flash ) + LENGTH( Flash ); |
Kojto | 90:cb3d968589d8 | 34 | __SRAM_segment_start__ = ORIGIN( Ram ); |
Kojto | 90:cb3d968589d8 | 35 | __SRAM_segment_end__ = ORIGIN( Ram ) + LENGTH( Ram ); |
Kojto | 90:cb3d968589d8 | 36 | |
Kojto | 90:cb3d968589d8 | 37 | /* Stacks (full descending) at top of RAM, grows downward: |
Kojto | 90:cb3d968589d8 | 38 | * |
Kojto | 90:cb3d968589d8 | 39 | * __stack_min__ is used by the malloc implementation to ensure heap never collides |
Kojto | 90:cb3d968589d8 | 40 | * with stack (assuming stack never grows beyond Stack_Size_Total in length) */ |
Kojto | 90:cb3d968589d8 | 41 | __stacks_top__ = __SRAM_segment_end__; |
Kojto | 90:cb3d968589d8 | 42 | __stacks_min__ = __SRAM_segment_end__ - Stack_Size_Total; |
Kojto | 90:cb3d968589d8 | 43 | |
Kojto | 90:cb3d968589d8 | 44 | SECTIONS |
Kojto | 90:cb3d968589d8 | 45 | { |
Kojto | 90:cb3d968589d8 | 46 | /* first section is .text which is used for code */ |
Kojto | 90:cb3d968589d8 | 47 | __text_start__ = . ; |
Kojto | 90:cb3d968589d8 | 48 | .text : { |
Kojto | 90:cb3d968589d8 | 49 | __privileged_code_start__ = . ; |
Kojto | 90:cb3d968589d8 | 50 | KEEP( *( .vectors ) ) |
Kojto | 90:cb3d968589d8 | 51 | *( .privileged_code ) |
Kojto | 90:cb3d968589d8 | 52 | |
Kojto | 90:cb3d968589d8 | 53 | __privileged_code_end__ = .; |
Kojto | 90:cb3d968589d8 | 54 | |
Kojto | 90:cb3d968589d8 | 55 | *( .text .text.* .gnu.linkonce.t.* ) |
Kojto | 90:cb3d968589d8 | 56 | *( .plt ) |
Kojto | 90:cb3d968589d8 | 57 | *( .gnu.warning ) |
Kojto | 90:cb3d968589d8 | 58 | *( .glue_7t ) *( .glue_7 ) *( .vfp11_veneer ) |
Kojto | 90:cb3d968589d8 | 59 | |
Kojto | 90:cb3d968589d8 | 60 | *( .rodata .rodata.* .gnu.linkonce.r.* ) |
Kojto | 90:cb3d968589d8 | 61 | |
Kojto | 90:cb3d968589d8 | 62 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
Kojto | 90:cb3d968589d8 | 63 | *(.gcc_except_table) |
Kojto | 90:cb3d968589d8 | 64 | *(.eh_frame_hdr) |
Kojto | 90:cb3d968589d8 | 65 | *(.eh_frame) |
Kojto | 90:cb3d968589d8 | 66 | |
Kojto | 90:cb3d968589d8 | 67 | . = ALIGN( 4 ) ; |
Kojto | 90:cb3d968589d8 | 68 | KEEP( *( .init ) ) |
Kojto | 90:cb3d968589d8 | 69 | . = ALIGN( 4 ) ; |
Kojto | 90:cb3d968589d8 | 70 | __preinit_array_start = . ; |
Kojto | 90:cb3d968589d8 | 71 | KEEP( *( .preinit_array ) ) |
Kojto | 90:cb3d968589d8 | 72 | __preinit_array_end = . ; |
Kojto | 90:cb3d968589d8 | 73 | . = ALIGN( 4 ) ; |
Kojto | 90:cb3d968589d8 | 74 | __init_array_start = . ; |
Kojto | 90:cb3d968589d8 | 75 | KEEP( *( SORT( .init_array.* ) ) ) |
Kojto | 90:cb3d968589d8 | 76 | KEEP( *( .init_array ) ) |
Kojto | 90:cb3d968589d8 | 77 | __init_array_end = . ; |
Kojto | 90:cb3d968589d8 | 78 | |
Kojto | 90:cb3d968589d8 | 79 | . = ALIGN( 4 ) ; |
Kojto | 90:cb3d968589d8 | 80 | KEEP( *crtbegin.o( .ctors ) ) |
Kojto | 90:cb3d968589d8 | 81 | KEEP( *( EXCLUDE_FILE( *crtend.o ) .ctors ) ) |
Kojto | 90:cb3d968589d8 | 82 | KEEP( *( SORT( .ctors.* ) ) ) |
Kojto | 90:cb3d968589d8 | 83 | KEEP( *crtend.o( .ctors ) ) |
Kojto | 90:cb3d968589d8 | 84 | |
Kojto | 90:cb3d968589d8 | 85 | . = ALIGN( 4 ) ; |
Kojto | 90:cb3d968589d8 | 86 | KEEP( *( .fini ) ) |
Kojto | 90:cb3d968589d8 | 87 | . = ALIGN( 4 ) ; |
Kojto | 90:cb3d968589d8 | 88 | __fini_array_start = . ; |
Kojto | 90:cb3d968589d8 | 89 | KEEP( *( .fini_array ) ) |
Kojto | 90:cb3d968589d8 | 90 | KEEP( *( SORT( .fini_array.* ) ) ) |
Kojto | 90:cb3d968589d8 | 91 | __fini_array_end = . ; |
Kojto | 90:cb3d968589d8 | 92 | |
Kojto | 90:cb3d968589d8 | 93 | KEEP( *crtbegin.o( .dtors ) ) |
Kojto | 90:cb3d968589d8 | 94 | KEEP( *( EXCLUDE_FILE( *crtend.o ) .dtors ) ) |
Kojto | 90:cb3d968589d8 | 95 | KEEP( *( SORT( .dtors.* ) ) ) |
Kojto | 90:cb3d968589d8 | 96 | KEEP( *crtend.o( .dtors ) ) |
Kojto | 90:cb3d968589d8 | 97 | |
Kojto | 90:cb3d968589d8 | 98 | } >Flash |
Kojto | 90:cb3d968589d8 | 99 | |
Kojto | 90:cb3d968589d8 | 100 | __exidx_start = . ; |
Kojto | 90:cb3d968589d8 | 101 | .ARM.exidx : { |
Kojto | 90:cb3d968589d8 | 102 | *( .ARM.exidx* .gnu.linkonce.armexidx.* ) |
Kojto | 90:cb3d968589d8 | 103 | } >Flash |
Kojto | 90:cb3d968589d8 | 104 | __exidx_end = . ; |
Kojto | 90:cb3d968589d8 | 105 | |
Kojto | 90:cb3d968589d8 | 106 | .text.align : { . = ALIGN( 8 ) ; } >Flash /* Alignment schenanigans */ |
Kojto | 90:cb3d968589d8 | 107 | __text_end__ = . ; |
Kojto | 90:cb3d968589d8 | 108 | |
Kojto | 90:cb3d968589d8 | 109 | /* .bss section -- used for uninitialized data */ |
Kojto | 90:cb3d968589d8 | 110 | /* Located at the start of RAM */ |
Kojto | 90:cb3d968589d8 | 111 | .bss (NOLOAD) : { |
Kojto | 90:cb3d968589d8 | 112 | __bss_start__ = . ; |
Kojto | 90:cb3d968589d8 | 113 | *crt0.o( .ram_vectors ) |
Kojto | 90:cb3d968589d8 | 114 | |
Kojto | 90:cb3d968589d8 | 115 | __user_bss_start__ = . ; |
Kojto | 90:cb3d968589d8 | 116 | *( .user_bss ) |
Kojto | 90:cb3d968589d8 | 117 | __user_bss_end__ = . ; |
Kojto | 90:cb3d968589d8 | 118 | |
Kojto | 90:cb3d968589d8 | 119 | *( .shbss ) |
Kojto | 90:cb3d968589d8 | 120 | *( .bss .bss.* .gnu.linkonce.b.* ) |
Kojto | 90:cb3d968589d8 | 121 | *( COMMON ) |
Kojto | 90:cb3d968589d8 | 122 | *( .ram.b ) |
Kojto | 90:cb3d968589d8 | 123 | . = ALIGN( 8 ) ; |
Kojto | 90:cb3d968589d8 | 124 | |
Kojto | 90:cb3d968589d8 | 125 | __bss_end__ = . ; |
Kojto | 90:cb3d968589d8 | 126 | } >Ram AT>Flash |
Kojto | 90:cb3d968589d8 | 127 | |
Kojto | 90:cb3d968589d8 | 128 | /* .data section -- used for initialized data */ |
Kojto | 90:cb3d968589d8 | 129 | .data : { |
Kojto | 90:cb3d968589d8 | 130 | __data_start__ = . ; |
Kojto | 90:cb3d968589d8 | 131 | KEEP( *( .jcr ) ) |
Kojto | 90:cb3d968589d8 | 132 | *( .got.plt ) *( .got ) |
Kojto | 90:cb3d968589d8 | 133 | *( .shdata ) |
Kojto | 90:cb3d968589d8 | 134 | *( .data .data.* .gnu.linkonce.d.* ) |
Kojto | 90:cb3d968589d8 | 135 | *( .ram ) |
Kojto | 90:cb3d968589d8 | 136 | . = ALIGN( 8 ) ; |
Kojto | 90:cb3d968589d8 | 137 | __data_end__ = . ; |
Kojto | 90:cb3d968589d8 | 138 | } >Ram AT>Flash |
Kojto | 90:cb3d968589d8 | 139 | |
Kojto | 90:cb3d968589d8 | 140 | __data_init_start__ = LOADADDR( .data ) ; |
Kojto | 90:cb3d968589d8 | 141 | |
Kojto | 90:cb3d968589d8 | 142 | /* Heap starts here and grows up in memory */ |
Kojto | 90:cb3d968589d8 | 143 | . = ALIGN( 8 ) ; |
Kojto | 90:cb3d968589d8 | 144 | __heap_start__ = . ; |
Kojto | 90:cb3d968589d8 | 145 | end = . ; |
Kojto | 90:cb3d968589d8 | 146 | __end__ = . ; |
Kojto | 90:cb3d968589d8 | 147 | |
Kojto | 90:cb3d968589d8 | 148 | .stab 0 (NOLOAD) : { *(.stab) } |
Kojto | 90:cb3d968589d8 | 149 | .stabstr 0 (NOLOAD) : { *(.stabstr) } |
Kojto | 90:cb3d968589d8 | 150 | /* DWARF debug sections. */ |
Kojto | 90:cb3d968589d8 | 151 | /* Symbols in the DWARF debugging sections are relative to the */ |
Kojto | 90:cb3d968589d8 | 152 | /* beginning of the section so we begin them at 0. */ |
Kojto | 90:cb3d968589d8 | 153 | /* DWARF 1 */ |
Kojto | 90:cb3d968589d8 | 154 | .debug 0 : { *(.debug) } |
Kojto | 90:cb3d968589d8 | 155 | .line 0 : { *(.line) } |
Kojto | 90:cb3d968589d8 | 156 | /* GNU DWARF 1 extensions */ |
Kojto | 90:cb3d968589d8 | 157 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
Kojto | 90:cb3d968589d8 | 158 | .debug_sfnames 0 : { *(.debug_sfnames) } |
Kojto | 90:cb3d968589d8 | 159 | /* DWARF 1.1 and DWARF 2 */ |
Kojto | 90:cb3d968589d8 | 160 | .debug_aranges 0 : { *(.debug_aranges) } |
Kojto | 90:cb3d968589d8 | 161 | .debug_pubnames 0 : { *(.debug_pubnames) } |
Kojto | 90:cb3d968589d8 | 162 | /* DWARF 2 */ |
Kojto | 90:cb3d968589d8 | 163 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
Kojto | 90:cb3d968589d8 | 164 | .debug_abbrev 0 : { *(.debug_abbrev) } |
Kojto | 90:cb3d968589d8 | 165 | .debug_line 0 : { *(.debug_line) } |
Kojto | 90:cb3d968589d8 | 166 | .debug_frame 0 : { *(.debug_frame) } |
Kojto | 90:cb3d968589d8 | 167 | .debug_str 0 : { *(.debug_str) } |
Kojto | 90:cb3d968589d8 | 168 | .debug_loc 0 : { *(.debug_loc) } |
Kojto | 90:cb3d968589d8 | 169 | .debug_macinfo 0 : { *(.debug_macinfo) } |
Kojto | 90:cb3d968589d8 | 170 | /* SGI/MIPS DWARF 2 extensions */ |
Kojto | 90:cb3d968589d8 | 171 | .debug_weaknames 0 : { *(.debug_weaknames) } |
Kojto | 90:cb3d968589d8 | 172 | .debug_funcnames 0 : { *(.debug_funcnames) } |
Kojto | 90:cb3d968589d8 | 173 | .debug_typenames 0 : { *(.debug_typenames) } |
Kojto | 90:cb3d968589d8 | 174 | .debug_varnames 0 : { *(.debug_varnames) } |
Kojto | 90:cb3d968589d8 | 175 | /* DWARF 3 */ |
Kojto | 90:cb3d968589d8 | 176 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
Kojto | 90:cb3d968589d8 | 177 | .debug_ranges 0 : { *(.debug_ranges) } |
Kojto | 90:cb3d968589d8 | 178 | |
Kojto | 90:cb3d968589d8 | 179 | .note.gnu.arm.ident 0 : { KEEP( *( .note.gnu.arm.ident ) ) } |
Kojto | 90:cb3d968589d8 | 180 | .ARM.attributes 0 : { |
Kojto | 90:cb3d968589d8 | 181 | KEEP( *( .ARM.attributes ) ) |
Kojto | 90:cb3d968589d8 | 182 | KEEP( *( .gnu.attributes ) ) |
Kojto | 90:cb3d968589d8 | 183 | } |
Kojto | 90:cb3d968589d8 | 184 | /DISCARD/ : { *( .note.GNU-stack ) } |
Kojto | 90:cb3d968589d8 | 185 | |
Kojto | 90:cb3d968589d8 | 186 | /* C data can be defined as being in special purpose RAMs using |
Kojto | 90:cb3d968589d8 | 187 | * __attribute__ ((section ("ethram"))) for example. */ |
Kojto | 90:cb3d968589d8 | 188 | .usbram (NOLOAD): |
Kojto | 90:cb3d968589d8 | 189 | { |
Kojto | 90:cb3d968589d8 | 190 | *( .usbram ) |
Kojto | 90:cb3d968589d8 | 191 | *( .usbram.* ) |
Kojto | 90:cb3d968589d8 | 192 | } > UsbRam |
Kojto | 90:cb3d968589d8 | 193 | .ethram (NOLOAD): |
Kojto | 90:cb3d968589d8 | 194 | { |
Kojto | 90:cb3d968589d8 | 195 | *( .ethram ) |
Kojto | 90:cb3d968589d8 | 196 | *( .ethram.* ) |
Kojto | 90:cb3d968589d8 | 197 | } > EthRam |
Kojto | 90:cb3d968589d8 | 198 | .canram (NOLOAD): |
Kojto | 90:cb3d968589d8 | 199 | { |
Kojto | 90:cb3d968589d8 | 200 | *( .canram ) |
Kojto | 90:cb3d968589d8 | 201 | *( .canram.* ) |
Kojto | 90:cb3d968589d8 | 202 | } > CanRam |
Kojto | 90:cb3d968589d8 | 203 | .batram (NOLOAD): |
Kojto | 90:cb3d968589d8 | 204 | { |
Kojto | 90:cb3d968589d8 | 205 | *( .batram ) |
Kojto | 90:cb3d968589d8 | 206 | *( .batram.* ) |
Kojto | 90:cb3d968589d8 | 207 | } > BatRam |
Kojto | 90:cb3d968589d8 | 208 | } |