mbed library sources

Dependents:   Freedman_v2 Nucleo_i2c_OLED_BME280_copy

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Wed Jun 03 09:00:09 2015 +0100
Revision:
558:0880f51c4036
Synchronized with git revision 927c31ab8457cfef0ee8a8316117b7a41fd79133

Full URL: https://github.com/mbedmicro/mbed/commit/927c31ab8457cfef0ee8a8316117b7a41fd79133/

Add WIZwiki-W7500

Who changed what in which revision?

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