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