my fork

Dependents:   Nucleo_blueNRG

Fork of mbed by mbed official

Committer:
filartrix
Date:
Wed Apr 08 14:12:53 2015 +0000
Revision:
97:4298809c7c9e
Parent:
85:024bf7f99721
First reale BlueNRG module for nucleo 401 board

Who changed what in which revision?

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