ads1115 only

Fork of mbed by mbed official

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

Who changed what in which revision?

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