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