ads1115 only

Fork of mbed by mbed official

Committer:
kaoshen
Date:
Tue Jan 17 23:27:32 2017 +0000
Revision:
135:fce8a9387ed1
Parent:
132:9baf128c2fab
333 ADS1115 ADC1

Who changed what in which revision?

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