ads1115 only

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Apr 29 10:16:23 2015 +0100
Revision:
98:8ab26030e058
Parent:
92:4fc01daae5a5
Child:
99:dbbf35b96557
Release 98 of the mbed library

Changes:
- Silabs new targets (Giant, Zero, Happy, Leopard, Wonder Geckos)
- Asynchronous SPI, I2C, Serial
- LowPower classes
- Nordic - nordic SDK v8.0 update
- Teensy - gcc arm fix for startup
- Nucleo F411 - usb freq fix

Who changed what in which revision?

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