The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Mon Aug 19 13:34:54 2013 +0300
Revision:
66:9c8f0e3462fb
Parent:
65:5798e58a58b1
New mbed library build with support for LPC1114.

Built from github tag 'mbed_lib_rev66'

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 66:9c8f0e3462fb 1 /* Linker script for mbed LPC1768
bogdanm 66:9c8f0e3462fb 2 *
bogdanm 66:9c8f0e3462fb 3 * Version:CodeSourcery Sourcery G++ Lite 2007q3-53
bogdanm 66:9c8f0e3462fb 4 * BugURL:https://support.codesourcery.com/GNUToolchain/
bogdanm 66:9c8f0e3462fb 5 *
bogdanm 66:9c8f0e3462fb 6 * Copyright 2007 CodeSourcery.
bogdanm 66:9c8f0e3462fb 7 *
bogdanm 66:9c8f0e3462fb 8 * The authors hereby grant permission to use, copy, modify, distribute,
bogdanm 66:9c8f0e3462fb 9 * and license this software and its documentation for any purpose, provided
bogdanm 66:9c8f0e3462fb 10 * that existing copyright notices are retained in all copies and that this
bogdanm 66:9c8f0e3462fb 11 * notice is included verbatim in any distributions. No written agreement,
bogdanm 66:9c8f0e3462fb 12 * license, or royalty fee is required for any of the authorized uses.
bogdanm 66:9c8f0e3462fb 13 * Modifications to this software may be copyrighted by their authors
bogdanm 66:9c8f0e3462fb 14 * and need not follow the licensing terms described here, provided that
bogdanm 66:9c8f0e3462fb 15 * the new terms are clearly indicated on the first page of each file where
bogdanm 66:9c8f0e3462fb 16 * they apply. */
bogdanm 66:9c8f0e3462fb 17 OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
bogdanm 66:9c8f0e3462fb 18 ENTRY(__cs3_reset_cortex_m)
bogdanm 66:9c8f0e3462fb 19 SEARCH_DIR(.)
bogdanm 66:9c8f0e3462fb 20
bogdanm 66:9c8f0e3462fb 21 /*
bogdanm 66:9c8f0e3462fb 22 ram ORIGIN: 8_byte_aligned(49 vect * 4 bytes) = 8_byte_aligned(0xC4) = 0xC8
bogdanm 66:9c8f0e3462fb 23 ram LENGTH: 32KB - 0xC8 = 0x7F38
bogdanm 66:9c8f0e3462fb 24 */
bogdanm 66:9c8f0e3462fb 25 MEMORY
bogdanm 66:9c8f0e3462fb 26 {
bogdanm 66:9c8f0e3462fb 27 rom (rx) : ORIGIN = 0x00000000, LENGTH = 512K
bogdanm 66:9c8f0e3462fb 28
bogdanm 66:9c8f0e3462fb 29 ram (rwx) : ORIGIN = 0x100000C8, LENGTH = 0x7F38
bogdanm 66:9c8f0e3462fb 30
bogdanm 66:9c8f0e3462fb 31 ram1(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K
bogdanm 66:9c8f0e3462fb 32 ram2(rwx) : ORIGIN = 0x20080000, LENGTH = 16K
bogdanm 66:9c8f0e3462fb 33 }
bogdanm 66:9c8f0e3462fb 34
bogdanm 66:9c8f0e3462fb 35 /* These force the linker to search for particular symbols from
bogdanm 66:9c8f0e3462fb 36 * the start of the link process and thus ensure the user's
bogdanm 66:9c8f0e3462fb 37 * overrides are picked up
bogdanm 66:9c8f0e3462fb 38 */
bogdanm 66:9c8f0e3462fb 39 EXTERN(__cs3_reset_cortex_m)
bogdanm 66:9c8f0e3462fb 40 EXTERN(__cs3_interrupt_vector_cortex_m)
bogdanm 66:9c8f0e3462fb 41 EXTERN(__cs3_start_c main __cs3_stack __cs3_stack_size __cs3_heap_end)
bogdanm 66:9c8f0e3462fb 42
bogdanm 66:9c8f0e3462fb 43 PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
bogdanm 66:9c8f0e3462fb 44 PROVIDE(__cs3_stack_size = __cs3_region_start_ram + __cs3_region_size_ram - _end);
bogdanm 66:9c8f0e3462fb 45 PROVIDE(__cs3_heap_start = _end);
bogdanm 66:9c8f0e3462fb 46 PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
bogdanm 66:9c8f0e3462fb 47
bogdanm 66:9c8f0e3462fb 48 SECTIONS
bogdanm 66:9c8f0e3462fb 49 {
bogdanm 66:9c8f0e3462fb 50 .text :
bogdanm 66:9c8f0e3462fb 51 {
bogdanm 66:9c8f0e3462fb 52 CREATE_OBJECT_SYMBOLS
bogdanm 66:9c8f0e3462fb 53 __cs3_region_start_rom = .;
bogdanm 66:9c8f0e3462fb 54 *(.cs3.region-head.rom)
bogdanm 66:9c8f0e3462fb 55 __cs3_interrupt_vector = __cs3_interrupt_vector_cortex_m;
bogdanm 66:9c8f0e3462fb 56 *(.cs3.interrupt_vector)
bogdanm 66:9c8f0e3462fb 57 /* Make sure we pulled in an interrupt vector. */
bogdanm 66:9c8f0e3462fb 58 ASSERT (. != __cs3_interrupt_vector_cortex_m, "No interrupt vector");
bogdanm 66:9c8f0e3462fb 59 *(.rom)
bogdanm 66:9c8f0e3462fb 60 *(.rom.b)
bogdanm 66:9c8f0e3462fb 61
bogdanm 66:9c8f0e3462fb 62 __cs3_reset = __cs3_reset_cortex_m;
bogdanm 66:9c8f0e3462fb 63 *(.cs3.reset)
bogdanm 66:9c8f0e3462fb 64 /* Make sure we pulled in some reset code. */
bogdanm 66:9c8f0e3462fb 65 ASSERT (. != __cs3_reset, "No reset code");
bogdanm 66:9c8f0e3462fb 66
bogdanm 66:9c8f0e3462fb 67 *(.text .text.* .gnu.linkonce.t.*)
bogdanm 66:9c8f0e3462fb 68 *(.plt)
bogdanm 66:9c8f0e3462fb 69 *(.gnu.warning)
bogdanm 66:9c8f0e3462fb 70 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
bogdanm 66:9c8f0e3462fb 71
bogdanm 66:9c8f0e3462fb 72 *(.rodata .rodata.* .gnu.linkonce.r.*)
bogdanm 66:9c8f0e3462fb 73
bogdanm 66:9c8f0e3462fb 74 *(.ARM.extab* .gnu.linkonce.armextab.*)
bogdanm 66:9c8f0e3462fb 75 *(.gcc_except_table)
bogdanm 66:9c8f0e3462fb 76 *(.eh_frame_hdr)
bogdanm 66:9c8f0e3462fb 77 *(.eh_frame)
bogdanm 66:9c8f0e3462fb 78
bogdanm 66:9c8f0e3462fb 79 . = ALIGN(4);
bogdanm 66:9c8f0e3462fb 80 KEEP(*(.init))
bogdanm 66:9c8f0e3462fb 81
bogdanm 66:9c8f0e3462fb 82 . = ALIGN(4);
bogdanm 66:9c8f0e3462fb 83 __preinit_array_start = .;
bogdanm 66:9c8f0e3462fb 84 KEEP (*(.preinit_array))
bogdanm 66:9c8f0e3462fb 85 __preinit_array_end = .;
bogdanm 66:9c8f0e3462fb 86
bogdanm 66:9c8f0e3462fb 87 . = ALIGN(4);
bogdanm 66:9c8f0e3462fb 88 __init_array_start = .;
bogdanm 66:9c8f0e3462fb 89 KEEP (*(SORT(.init_array.*)))
bogdanm 66:9c8f0e3462fb 90 KEEP (*(.init_array))
bogdanm 66:9c8f0e3462fb 91 __init_array_end = .;
bogdanm 66:9c8f0e3462fb 92
bogdanm 66:9c8f0e3462fb 93 . = ALIGN(0x4);
bogdanm 66:9c8f0e3462fb 94 KEEP (*crtbegin.o(.ctors))
bogdanm 66:9c8f0e3462fb 95 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
bogdanm 66:9c8f0e3462fb 96 KEEP (*(SORT(.ctors.*)))
bogdanm 66:9c8f0e3462fb 97 KEEP (*crtend.o(.ctors))
bogdanm 66:9c8f0e3462fb 98
bogdanm 66:9c8f0e3462fb 99 . = ALIGN(4);
bogdanm 66:9c8f0e3462fb 100 KEEP(*(.fini))
bogdanm 66:9c8f0e3462fb 101
bogdanm 66:9c8f0e3462fb 102 . = ALIGN(4);
bogdanm 66:9c8f0e3462fb 103 __fini_array_start = .;
bogdanm 66:9c8f0e3462fb 104 KEEP (*(.fini_array))
bogdanm 66:9c8f0e3462fb 105 KEEP (*(SORT(.fini_array.*)))
bogdanm 66:9c8f0e3462fb 106 __fini_array_end = .;
bogdanm 66:9c8f0e3462fb 107
bogdanm 66:9c8f0e3462fb 108 KEEP (*crtbegin.o(.dtors))
bogdanm 66:9c8f0e3462fb 109 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
bogdanm 66:9c8f0e3462fb 110 KEEP (*(SORT(.dtors.*)))
bogdanm 66:9c8f0e3462fb 111 KEEP (*crtend.o(.dtors))
bogdanm 66:9c8f0e3462fb 112
bogdanm 66:9c8f0e3462fb 113 . = ALIGN(4);
bogdanm 66:9c8f0e3462fb 114 __cs3_regions = .;
bogdanm 66:9c8f0e3462fb 115 LONG (0)
bogdanm 66:9c8f0e3462fb 116 LONG (__cs3_region_init_ram)
bogdanm 66:9c8f0e3462fb 117 LONG (__cs3_region_start_ram)
bogdanm 66:9c8f0e3462fb 118 LONG (__cs3_region_init_size_ram)
bogdanm 66:9c8f0e3462fb 119 LONG (__cs3_region_zero_size_ram)
bogdanm 66:9c8f0e3462fb 120 }
bogdanm 66:9c8f0e3462fb 121
bogdanm 66:9c8f0e3462fb 122 /* .ARM.exidx is sorted, so has to go in its own output section. */
bogdanm 66:9c8f0e3462fb 123 __exidx_start = .;
bogdanm 66:9c8f0e3462fb 124 .ARM.exidx :
bogdanm 66:9c8f0e3462fb 125 {
bogdanm 66:9c8f0e3462fb 126 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
bogdanm 66:9c8f0e3462fb 127 } >rom
bogdanm 66:9c8f0e3462fb 128 __exidx_end = .;
bogdanm 66:9c8f0e3462fb 129 .text.align :
bogdanm 66:9c8f0e3462fb 130 {
bogdanm 66:9c8f0e3462fb 131 . = ALIGN(8);
bogdanm 66:9c8f0e3462fb 132 _etext = .;
bogdanm 66:9c8f0e3462fb 133 } >rom
bogdanm 66:9c8f0e3462fb 134 __cs3_region_size_rom = LENGTH(rom);
bogdanm 66:9c8f0e3462fb 135 __cs3_region_num = 1;
bogdanm 66:9c8f0e3462fb 136
bogdanm 66:9c8f0e3462fb 137 .data :
bogdanm 66:9c8f0e3462fb 138 {
bogdanm 66:9c8f0e3462fb 139 __cs3_region_start_ram = .;
bogdanm 66:9c8f0e3462fb 140 *(.cs3.region-head.ram)
bogdanm 66:9c8f0e3462fb 141 KEEP(*(.jcr))
bogdanm 66:9c8f0e3462fb 142 *(.got.plt) *(.got)
bogdanm 66:9c8f0e3462fb 143 *(.shdata)
bogdanm 66:9c8f0e3462fb 144 *(.data .data.* .gnu.linkonce.d.*)
bogdanm 66:9c8f0e3462fb 145 *(.ram)
bogdanm 66:9c8f0e3462fb 146 . = ALIGN (8);
bogdanm 66:9c8f0e3462fb 147 _edata = .;
bogdanm 66:9c8f0e3462fb 148 } >ram AT>rom
bogdanm 66:9c8f0e3462fb 149 .bss :
bogdanm 66:9c8f0e3462fb 150 {
bogdanm 66:9c8f0e3462fb 151 *(.shbss)
bogdanm 66:9c8f0e3462fb 152 *(.bss .bss.* .gnu.linkonce.b.*)
bogdanm 66:9c8f0e3462fb 153 *(COMMON)
bogdanm 66:9c8f0e3462fb 154 *(.ram.b)
bogdanm 66:9c8f0e3462fb 155 . = ALIGN (8);
bogdanm 66:9c8f0e3462fb 156 _end = .;
bogdanm 66:9c8f0e3462fb 157 __end = .;
bogdanm 66:9c8f0e3462fb 158 } >ram AT>rom
bogdanm 66:9c8f0e3462fb 159 /* This used for USB RAM section */
bogdanm 66:9c8f0e3462fb 160 .usb_ram (NOLOAD):
bogdanm 66:9c8f0e3462fb 161 {
bogdanm 66:9c8f0e3462fb 162 *.o (USB_RAM)
bogdanm 66:9c8f0e3462fb 163 } > ram2
bogdanm 66:9c8f0e3462fb 164 .heap (NOLOAD) :
bogdanm 66:9c8f0e3462fb 165 {
bogdanm 66:9c8f0e3462fb 166 *(.heap)
bogdanm 66:9c8f0e3462fb 167 } >ram
bogdanm 66:9c8f0e3462fb 168 .stack (__cs3_stack - __cs3_stack_size) (NOLOAD):
bogdanm 66:9c8f0e3462fb 169 {
bogdanm 66:9c8f0e3462fb 170 *(.stack)
bogdanm 66:9c8f0e3462fb 171 _estack = .;
bogdanm 66:9c8f0e3462fb 172 PROVIDE(estack = .);
bogdanm 66:9c8f0e3462fb 173 } >ram
bogdanm 66:9c8f0e3462fb 174
bogdanm 66:9c8f0e3462fb 175 __cs3_region_init_ram = LOADADDR (.data);
bogdanm 66:9c8f0e3462fb 176 __cs3_region_init_size_ram = _edata - __cs3_region_start_ram;
bogdanm 66:9c8f0e3462fb 177 __cs3_region_zero_size_ram = _end - _edata;
bogdanm 66:9c8f0e3462fb 178 __cs3_region_size_ram = LENGTH(ram);
bogdanm 66:9c8f0e3462fb 179 __cs3_region_num = 1;
bogdanm 66:9c8f0e3462fb 180
bogdanm 66:9c8f0e3462fb 181 .stab 0 (NOLOAD) : { *(.stab) }
bogdanm 66:9c8f0e3462fb 182 .stabstr 0 (NOLOAD) : { *(.stabstr) }
bogdanm 66:9c8f0e3462fb 183 /* DWARF debug sections.
bogdanm 66:9c8f0e3462fb 184 * Symbols in the DWARF debugging sections are relative to the beginning
bogdanm 66:9c8f0e3462fb 185 * of the section so we begin them at 0. */
bogdanm 66:9c8f0e3462fb 186 /* DWARF 1 */
bogdanm 66:9c8f0e3462fb 187 .debug 0 : { *(.debug) }
bogdanm 66:9c8f0e3462fb 188 .line 0 : { *(.line) }
bogdanm 66:9c8f0e3462fb 189 /* GNU DWARF 1 extensions */
bogdanm 66:9c8f0e3462fb 190 .debug_srcinfo 0 : { *(.debug_srcinfo) }
bogdanm 66:9c8f0e3462fb 191 .debug_sfnames 0 : { *(.debug_sfnames) }
bogdanm 66:9c8f0e3462fb 192 /* DWARF 1.1 and DWARF 2 */
bogdanm 66:9c8f0e3462fb 193 .debug_aranges 0 : { *(.debug_aranges) }
bogdanm 66:9c8f0e3462fb 194 .debug_pubnames 0 : { *(.debug_pubnames) }
bogdanm 66:9c8f0e3462fb 195 /* DWARF 2 */
bogdanm 66:9c8f0e3462fb 196 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
bogdanm 66:9c8f0e3462fb 197 .debug_abbrev 0 : { *(.debug_abbrev) }
bogdanm 66:9c8f0e3462fb 198 .debug_line 0 : { *(.debug_line) }
bogdanm 66:9c8f0e3462fb 199 .debug_frame 0 : { *(.debug_frame) }
bogdanm 66:9c8f0e3462fb 200 .debug_str 0 : { *(.debug_str) }
bogdanm 66:9c8f0e3462fb 201 .debug_loc 0 : { *(.debug_loc) }
bogdanm 66:9c8f0e3462fb 202 .debug_macinfo 0 : { *(.debug_macinfo) }
bogdanm 66:9c8f0e3462fb 203 /* SGI/MIPS DWARF 2 extensions */
bogdanm 66:9c8f0e3462fb 204 .debug_weaknames 0 : { *(.debug_weaknames) }
bogdanm 66:9c8f0e3462fb 205 .debug_funcnames 0 : { *(.debug_funcnames) }
bogdanm 66:9c8f0e3462fb 206 .debug_typenames 0 : { *(.debug_typenames) }
bogdanm 66:9c8f0e3462fb 207 .debug_varnames 0 : { *(.debug_varnames) }
bogdanm 66:9c8f0e3462fb 208
bogdanm 66:9c8f0e3462fb 209 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
bogdanm 66:9c8f0e3462fb 210 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
bogdanm 66:9c8f0e3462fb 211 /DISCARD/ : { *(.note.GNU-stack) }
bogdanm 66:9c8f0e3462fb 212 }