ads1115 only
Fork of mbed by
TARGET_ARCH_BLE/TOOLCHAIN_GCC_ARM/NRF51822.ld@122:f9eeca106725, 2016-07-07 (annotated)
- Committer:
- Kojto
- Date:
- Thu Jul 07 14:34:11 2016 +0100
- Revision:
- 122:f9eeca106725
- Parent:
- 99:dbbf35b96557
Release 122 of the mbed library
Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 88:9327015d4013 | 1 | /* Linker script to configure memory regions. */ |
bogdanm | 88:9327015d4013 | 2 | |
bogdanm | 88:9327015d4013 | 3 | MEMORY |
bogdanm | 88:9327015d4013 | 4 | { |
Kojto | 99:dbbf35b96557 | 5 | FLASH (rx) : ORIGIN = 0x0001C000, LENGTH = 0x24000 |
Kojto | 99:dbbf35b96557 | 6 | RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0x1800 |
bogdanm | 88:9327015d4013 | 7 | } |
bogdanm | 88:9327015d4013 | 8 | |
bogdanm | 88:9327015d4013 | 9 | OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") |
bogdanm | 88:9327015d4013 | 10 | |
bogdanm | 88:9327015d4013 | 11 | /* Linker script to place sections and symbol values. Should be used together |
bogdanm | 88:9327015d4013 | 12 | * with other linker script that defines memory regions FLASH and RAM. |
bogdanm | 88:9327015d4013 | 13 | * It references following symbols, which must be defined in code: |
bogdanm | 88:9327015d4013 | 14 | * Reset_Handler : Entry of reset handler |
bogdanm | 88:9327015d4013 | 15 | * |
bogdanm | 88:9327015d4013 | 16 | * It defines following symbols, which code can use without definition: |
bogdanm | 88:9327015d4013 | 17 | * __exidx_start |
bogdanm | 88:9327015d4013 | 18 | * __exidx_end |
bogdanm | 88:9327015d4013 | 19 | * __etext |
bogdanm | 88:9327015d4013 | 20 | * __data_start__ |
bogdanm | 88:9327015d4013 | 21 | * __preinit_array_start |
bogdanm | 88:9327015d4013 | 22 | * __preinit_array_end |
bogdanm | 88:9327015d4013 | 23 | * __init_array_start |
bogdanm | 88:9327015d4013 | 24 | * __init_array_end |
bogdanm | 88:9327015d4013 | 25 | * __fini_array_start |
bogdanm | 88:9327015d4013 | 26 | * __fini_array_end |
bogdanm | 88:9327015d4013 | 27 | * __data_end__ |
bogdanm | 88:9327015d4013 | 28 | * __bss_start__ |
bogdanm | 88:9327015d4013 | 29 | * __bss_end__ |
bogdanm | 88:9327015d4013 | 30 | * __end__ |
bogdanm | 88:9327015d4013 | 31 | * end |
bogdanm | 88:9327015d4013 | 32 | * __HeapLimit |
bogdanm | 88:9327015d4013 | 33 | * __StackLimit |
bogdanm | 88:9327015d4013 | 34 | * __StackTop |
bogdanm | 88:9327015d4013 | 35 | * __stack |
bogdanm | 88:9327015d4013 | 36 | */ |
bogdanm | 88:9327015d4013 | 37 | ENTRY(Reset_Handler) |
bogdanm | 88:9327015d4013 | 38 | |
bogdanm | 88:9327015d4013 | 39 | SECTIONS |
bogdanm | 88:9327015d4013 | 40 | { |
bogdanm | 88:9327015d4013 | 41 | .text : |
bogdanm | 88:9327015d4013 | 42 | { |
bogdanm | 88:9327015d4013 | 43 | KEEP(*(.Vectors)) |
bogdanm | 88:9327015d4013 | 44 | *(.text*) |
bogdanm | 88:9327015d4013 | 45 | |
bogdanm | 88:9327015d4013 | 46 | KEEP(*(.init)) |
bogdanm | 88:9327015d4013 | 47 | KEEP(*(.fini)) |
bogdanm | 88:9327015d4013 | 48 | |
bogdanm | 88:9327015d4013 | 49 | /* .ctors */ |
bogdanm | 88:9327015d4013 | 50 | *crtbegin.o(.ctors) |
bogdanm | 88:9327015d4013 | 51 | *crtbegin?.o(.ctors) |
bogdanm | 88:9327015d4013 | 52 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
bogdanm | 88:9327015d4013 | 53 | *(SORT(.ctors.*)) |
bogdanm | 88:9327015d4013 | 54 | *(.ctors) |
bogdanm | 88:9327015d4013 | 55 | |
bogdanm | 88:9327015d4013 | 56 | /* .dtors */ |
bogdanm | 88:9327015d4013 | 57 | *crtbegin.o(.dtors) |
bogdanm | 88:9327015d4013 | 58 | *crtbegin?.o(.dtors) |
bogdanm | 88:9327015d4013 | 59 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
bogdanm | 88:9327015d4013 | 60 | *(SORT(.dtors.*)) |
bogdanm | 88:9327015d4013 | 61 | *(.dtors) |
bogdanm | 88:9327015d4013 | 62 | |
bogdanm | 88:9327015d4013 | 63 | *(.rodata*) |
bogdanm | 88:9327015d4013 | 64 | |
bogdanm | 88:9327015d4013 | 65 | KEEP(*(.eh_frame*)) |
bogdanm | 88:9327015d4013 | 66 | } > FLASH |
bogdanm | 88:9327015d4013 | 67 | |
bogdanm | 88:9327015d4013 | 68 | |
bogdanm | 88:9327015d4013 | 69 | .ARM.extab : |
bogdanm | 88:9327015d4013 | 70 | { |
bogdanm | 88:9327015d4013 | 71 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
bogdanm | 88:9327015d4013 | 72 | } > FLASH |
bogdanm | 88:9327015d4013 | 73 | |
bogdanm | 88:9327015d4013 | 74 | __exidx_start = .; |
bogdanm | 88:9327015d4013 | 75 | .ARM.exidx : |
bogdanm | 88:9327015d4013 | 76 | { |
bogdanm | 88:9327015d4013 | 77 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
bogdanm | 88:9327015d4013 | 78 | } > FLASH |
bogdanm | 88:9327015d4013 | 79 | __exidx_end = .; |
bogdanm | 88:9327015d4013 | 80 | |
bogdanm | 88:9327015d4013 | 81 | __etext = .; |
bogdanm | 88:9327015d4013 | 82 | |
bogdanm | 88:9327015d4013 | 83 | .data : AT (__etext) |
bogdanm | 88:9327015d4013 | 84 | { |
bogdanm | 88:9327015d4013 | 85 | __data_start__ = .; |
bogdanm | 88:9327015d4013 | 86 | *(vtable) |
bogdanm | 88:9327015d4013 | 87 | *(.data*) |
bogdanm | 88:9327015d4013 | 88 | |
bogdanm | 88:9327015d4013 | 89 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 90 | /* preinit data */ |
bogdanm | 88:9327015d4013 | 91 | PROVIDE_HIDDEN (__preinit_array_start = .); |
bogdanm | 88:9327015d4013 | 92 | KEEP(*(.preinit_array)) |
bogdanm | 88:9327015d4013 | 93 | PROVIDE_HIDDEN (__preinit_array_end = .); |
bogdanm | 88:9327015d4013 | 94 | |
bogdanm | 88:9327015d4013 | 95 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 96 | /* init data */ |
bogdanm | 88:9327015d4013 | 97 | PROVIDE_HIDDEN (__init_array_start = .); |
bogdanm | 88:9327015d4013 | 98 | KEEP(*(SORT(.init_array.*))) |
bogdanm | 88:9327015d4013 | 99 | KEEP(*(.init_array)) |
bogdanm | 88:9327015d4013 | 100 | PROVIDE_HIDDEN (__init_array_end = .); |
bogdanm | 88:9327015d4013 | 101 | |
bogdanm | 88:9327015d4013 | 102 | |
bogdanm | 88:9327015d4013 | 103 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 104 | /* finit data */ |
bogdanm | 88:9327015d4013 | 105 | PROVIDE_HIDDEN (__fini_array_start = .); |
bogdanm | 88:9327015d4013 | 106 | KEEP(*(SORT(.fini_array.*))) |
bogdanm | 88:9327015d4013 | 107 | KEEP(*(.fini_array)) |
bogdanm | 88:9327015d4013 | 108 | PROVIDE_HIDDEN (__fini_array_end = .); |
bogdanm | 88:9327015d4013 | 109 | |
bogdanm | 88:9327015d4013 | 110 | *(.jcr) |
bogdanm | 88:9327015d4013 | 111 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 112 | /* All data end */ |
bogdanm | 88:9327015d4013 | 113 | __data_end__ = .; |
bogdanm | 88:9327015d4013 | 114 | |
bogdanm | 88:9327015d4013 | 115 | } > RAM |
bogdanm | 88:9327015d4013 | 116 | |
bogdanm | 88:9327015d4013 | 117 | .bss : |
bogdanm | 88:9327015d4013 | 118 | { |
bogdanm | 88:9327015d4013 | 119 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 120 | __bss_start__ = .; |
bogdanm | 88:9327015d4013 | 121 | *(.bss*) |
bogdanm | 88:9327015d4013 | 122 | *(COMMON) |
bogdanm | 88:9327015d4013 | 123 | . = ALIGN(4); |
bogdanm | 88:9327015d4013 | 124 | __bss_end__ = .; |
bogdanm | 88:9327015d4013 | 125 | } > RAM |
bogdanm | 88:9327015d4013 | 126 | |
Kojto | 122:f9eeca106725 | 127 | .heap (NOLOAD): |
bogdanm | 88:9327015d4013 | 128 | { |
bogdanm | 88:9327015d4013 | 129 | __end__ = .; |
bogdanm | 88:9327015d4013 | 130 | end = __end__; |
Kojto | 122:f9eeca106725 | 131 | __HeapBase = .; |
bogdanm | 88:9327015d4013 | 132 | *(.heap*) |
Kojto | 122:f9eeca106725 | 133 | . = ORIGIN(RAM) + LENGTH(RAM) - Stack_Size; |
bogdanm | 88:9327015d4013 | 134 | __HeapLimit = .; |
bogdanm | 88:9327015d4013 | 135 | } > RAM |
bogdanm | 88:9327015d4013 | 136 | |
bogdanm | 88:9327015d4013 | 137 | /* .stack_dummy section doesn't contains any symbols. It is only |
bogdanm | 88:9327015d4013 | 138 | * used for linker to calculate size of stack sections, and assign |
bogdanm | 88:9327015d4013 | 139 | * values to stack symbols later */ |
Kojto | 122:f9eeca106725 | 140 | .stack_dummy (NOLOAD): |
bogdanm | 88:9327015d4013 | 141 | { |
bogdanm | 88:9327015d4013 | 142 | *(.stack*) |
bogdanm | 88:9327015d4013 | 143 | } > RAM |
bogdanm | 88:9327015d4013 | 144 | |
bogdanm | 88:9327015d4013 | 145 | /* Set stack top to end of RAM, and stack limit move down by |
bogdanm | 88:9327015d4013 | 146 | * size of stack_dummy section */ |
bogdanm | 88:9327015d4013 | 147 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
bogdanm | 88:9327015d4013 | 148 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); |
bogdanm | 88:9327015d4013 | 149 | PROVIDE(__stack = __StackTop); |
bogdanm | 88:9327015d4013 | 150 | |
bogdanm | 88:9327015d4013 | 151 | /* Check if data + heap + stack exceeds RAM limit */ |
bogdanm | 88:9327015d4013 | 152 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
bogdanm | 88:9327015d4013 | 153 | } |