mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Nov 03 10:30:07 2014 +0000
Revision:
381:5460fc57b6e4
Synchronized with git revision 02478cd1f27fc7b9643486472635eb515b2bca81

Full URL: https://github.com/mbedmicro/mbed/commit/02478cd1f27fc7b9643486472635eb515b2bca81/

Target: LPC1549 - Fix serial interrupt issues (issue report #616)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 381:5460fc57b6e4 1 /* Linker script for STM32F407 */
mbed_official 381:5460fc57b6e4 2
mbed_official 381:5460fc57b6e4 3 /* Linker script to configure memory regions. */
mbed_official 381:5460fc57b6e4 4 MEMORY
mbed_official 381:5460fc57b6e4 5 {
mbed_official 381:5460fc57b6e4 6 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x10000
mbed_official 381:5460fc57b6e4 7 RAM (xrw) : ORIGIN = 0x20000188, LENGTH = 0x3000 - 0x0188
mbed_official 381:5460fc57b6e4 8 /* CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x1000 */
mbed_official 381:5460fc57b6e4 9 }
mbed_official 381:5460fc57b6e4 10
mbed_official 381:5460fc57b6e4 11 /* Linker script to place sections and symbol values. Should be used together
mbed_official 381:5460fc57b6e4 12 * with other linker script that defines memory regions FLASH and RAM.
mbed_official 381:5460fc57b6e4 13 * It references following symbols, which must be defined in code:
mbed_official 381:5460fc57b6e4 14 * Reset_Handler : Entry of reset handler
mbed_official 381:5460fc57b6e4 15 *
mbed_official 381:5460fc57b6e4 16 * It defines following symbols, which code can use without definition:
mbed_official 381:5460fc57b6e4 17 * __exidx_start
mbed_official 381:5460fc57b6e4 18 * __exidx_end
mbed_official 381:5460fc57b6e4 19 * __etext
mbed_official 381:5460fc57b6e4 20 * __data_start__
mbed_official 381:5460fc57b6e4 21 * __preinit_array_start
mbed_official 381:5460fc57b6e4 22 * __preinit_array_end
mbed_official 381:5460fc57b6e4 23 * __init_array_start
mbed_official 381:5460fc57b6e4 24 * __init_array_end
mbed_official 381:5460fc57b6e4 25 * __fini_array_start
mbed_official 381:5460fc57b6e4 26 * __fini_array_end
mbed_official 381:5460fc57b6e4 27 * __data_end__
mbed_official 381:5460fc57b6e4 28 * __bss_start__
mbed_official 381:5460fc57b6e4 29 * __bss_end__
mbed_official 381:5460fc57b6e4 30 * __end__
mbed_official 381:5460fc57b6e4 31 * end
mbed_official 381:5460fc57b6e4 32 * __HeapLimit
mbed_official 381:5460fc57b6e4 33 * __StackLimit
mbed_official 381:5460fc57b6e4 34 * __StackTop
mbed_official 381:5460fc57b6e4 35 * __stack
mbed_official 381:5460fc57b6e4 36 */
mbed_official 381:5460fc57b6e4 37 ENTRY(Reset_Handler)
mbed_official 381:5460fc57b6e4 38
mbed_official 381:5460fc57b6e4 39 SECTIONS
mbed_official 381:5460fc57b6e4 40 {
mbed_official 381:5460fc57b6e4 41 .text :
mbed_official 381:5460fc57b6e4 42 {
mbed_official 381:5460fc57b6e4 43 KEEP(*(.isr_vector))
mbed_official 381:5460fc57b6e4 44 *(.text*)
mbed_official 381:5460fc57b6e4 45
mbed_official 381:5460fc57b6e4 46 KEEP(*(.init))
mbed_official 381:5460fc57b6e4 47 KEEP(*(.fini))
mbed_official 381:5460fc57b6e4 48
mbed_official 381:5460fc57b6e4 49 /* .ctors */
mbed_official 381:5460fc57b6e4 50 *crtbegin.o(.ctors)
mbed_official 381:5460fc57b6e4 51 *crtbegin?.o(.ctors)
mbed_official 381:5460fc57b6e4 52 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
mbed_official 381:5460fc57b6e4 53 *(SORT(.ctors.*))
mbed_official 381:5460fc57b6e4 54 *(.ctors)
mbed_official 381:5460fc57b6e4 55
mbed_official 381:5460fc57b6e4 56 /* .dtors */
mbed_official 381:5460fc57b6e4 57 *crtbegin.o(.dtors)
mbed_official 381:5460fc57b6e4 58 *crtbegin?.o(.dtors)
mbed_official 381:5460fc57b6e4 59 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
mbed_official 381:5460fc57b6e4 60 *(SORT(.dtors.*))
mbed_official 381:5460fc57b6e4 61 *(.dtors)
mbed_official 381:5460fc57b6e4 62
mbed_official 381:5460fc57b6e4 63 *(.rodata*)
mbed_official 381:5460fc57b6e4 64
mbed_official 381:5460fc57b6e4 65 KEEP(*(.eh_frame*))
mbed_official 381:5460fc57b6e4 66 } > FLASH
mbed_official 381:5460fc57b6e4 67
mbed_official 381:5460fc57b6e4 68 .ARM.extab :
mbed_official 381:5460fc57b6e4 69 {
mbed_official 381:5460fc57b6e4 70 *(.ARM.extab* .gnu.linkonce.armextab.*)
mbed_official 381:5460fc57b6e4 71 } > FLASH
mbed_official 381:5460fc57b6e4 72
mbed_official 381:5460fc57b6e4 73 __exidx_start = .;
mbed_official 381:5460fc57b6e4 74 .ARM.exidx :
mbed_official 381:5460fc57b6e4 75 {
mbed_official 381:5460fc57b6e4 76 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
mbed_official 381:5460fc57b6e4 77 } > FLASH
mbed_official 381:5460fc57b6e4 78 __exidx_end = .;
mbed_official 381:5460fc57b6e4 79
mbed_official 381:5460fc57b6e4 80 __etext = .;
mbed_official 381:5460fc57b6e4 81
mbed_official 381:5460fc57b6e4 82 .data : AT (__etext)
mbed_official 381:5460fc57b6e4 83 {
mbed_official 381:5460fc57b6e4 84 __data_start__ = .;
mbed_official 381:5460fc57b6e4 85 *(vtable)
mbed_official 381:5460fc57b6e4 86 *(.data*)
mbed_official 381:5460fc57b6e4 87
mbed_official 381:5460fc57b6e4 88 . = ALIGN(4);
mbed_official 381:5460fc57b6e4 89 /* preinit data */
mbed_official 381:5460fc57b6e4 90 PROVIDE_HIDDEN (__preinit_array_start = .);
mbed_official 381:5460fc57b6e4 91 KEEP(*(.preinit_array))
mbed_official 381:5460fc57b6e4 92 PROVIDE_HIDDEN (__preinit_array_end = .);
mbed_official 381:5460fc57b6e4 93
mbed_official 381:5460fc57b6e4 94 . = ALIGN(4);
mbed_official 381:5460fc57b6e4 95 /* init data */
mbed_official 381:5460fc57b6e4 96 PROVIDE_HIDDEN (__init_array_start = .);
mbed_official 381:5460fc57b6e4 97 KEEP(*(SORT(.init_array.*)))
mbed_official 381:5460fc57b6e4 98 KEEP(*(.init_array))
mbed_official 381:5460fc57b6e4 99 PROVIDE_HIDDEN (__init_array_end = .);
mbed_official 381:5460fc57b6e4 100
mbed_official 381:5460fc57b6e4 101
mbed_official 381:5460fc57b6e4 102 . = ALIGN(4);
mbed_official 381:5460fc57b6e4 103 /* finit data */
mbed_official 381:5460fc57b6e4 104 PROVIDE_HIDDEN (__fini_array_start = .);
mbed_official 381:5460fc57b6e4 105 KEEP(*(SORT(.fini_array.*)))
mbed_official 381:5460fc57b6e4 106 KEEP(*(.fini_array))
mbed_official 381:5460fc57b6e4 107 PROVIDE_HIDDEN (__fini_array_end = .);
mbed_official 381:5460fc57b6e4 108
mbed_official 381:5460fc57b6e4 109 KEEP(*(.jcr*))
mbed_official 381:5460fc57b6e4 110 . = ALIGN(4);
mbed_official 381:5460fc57b6e4 111 /* All data end */
mbed_official 381:5460fc57b6e4 112 __data_end__ = .;
mbed_official 381:5460fc57b6e4 113
mbed_official 381:5460fc57b6e4 114 } > RAM
mbed_official 381:5460fc57b6e4 115
mbed_official 381:5460fc57b6e4 116 .bss :
mbed_official 381:5460fc57b6e4 117 {
mbed_official 381:5460fc57b6e4 118 . = ALIGN(4);
mbed_official 381:5460fc57b6e4 119 __bss_start__ = .;
mbed_official 381:5460fc57b6e4 120 *(.bss*)
mbed_official 381:5460fc57b6e4 121 *(COMMON)
mbed_official 381:5460fc57b6e4 122 . = ALIGN(4);
mbed_official 381:5460fc57b6e4 123 __bss_end__ = .;
mbed_official 381:5460fc57b6e4 124 } > RAM
mbed_official 381:5460fc57b6e4 125
mbed_official 381:5460fc57b6e4 126 .heap (COPY):
mbed_official 381:5460fc57b6e4 127 {
mbed_official 381:5460fc57b6e4 128 __end__ = .;
mbed_official 381:5460fc57b6e4 129 end = __end__;
mbed_official 381:5460fc57b6e4 130 *(.heap*)
mbed_official 381:5460fc57b6e4 131 __HeapLimit = .;
mbed_official 381:5460fc57b6e4 132 } > RAM
mbed_official 381:5460fc57b6e4 133
mbed_official 381:5460fc57b6e4 134 /* .stack_dummy section doesn't contains any symbols. It is only
mbed_official 381:5460fc57b6e4 135 * used for linker to calculate size of stack sections, and assign
mbed_official 381:5460fc57b6e4 136 * values to stack symbols later */
mbed_official 381:5460fc57b6e4 137 .stack_dummy (COPY):
mbed_official 381:5460fc57b6e4 138 {
mbed_official 381:5460fc57b6e4 139 *(.stack*)
mbed_official 381:5460fc57b6e4 140 } > RAM
mbed_official 381:5460fc57b6e4 141
mbed_official 381:5460fc57b6e4 142 /* Set stack top to end of RAM, and stack limit move down by
mbed_official 381:5460fc57b6e4 143 * size of stack_dummy section */
mbed_official 381:5460fc57b6e4 144 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
mbed_official 381:5460fc57b6e4 145 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
mbed_official 381:5460fc57b6e4 146 PROVIDE(__stack = __StackTop);
mbed_official 381:5460fc57b6e4 147
mbed_official 381:5460fc57b6e4 148 /* Check if data + heap + stack exceeds RAM limit */
mbed_official 381:5460fc57b6e4 149 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
mbed_official 381:5460fc57b6e4 150 }
mbed_official 381:5460fc57b6e4 151