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