The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Thu Nov 08 11:45:42 2018 +0000
Revision:
171:3a7713b1edbc
Parent:
169:a7c7b631e539
mbed library. Release version 164

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 156:ff21514d8981 1 /*
AnnaBridge 156:ff21514d8981 2 * NCS36510 ARM GCC linker script file
AnnaBridge 156:ff21514d8981 3 */
AnnaBridge 156:ff21514d8981 4
AnnaBridge 156:ff21514d8981 5 MEMORY {
Anna Bridge 169:a7c7b631e539 6 FIB (rx) : ORIGIN = 0x00002000, LENGTH = 0x00000800
Anna Bridge 169:a7c7b631e539 7 TRIM (rx) : ORIGIN = 0x00002800, LENGTH = 0x00000800
AnnaBridge 156:ff21514d8981 8 VECTORS (rx) : ORIGIN = 0x00003000, LENGTH = 0x00000090
Anna Bridge 169:a7c7b631e539 9 FLASH (rx) : ORIGIN = 0x00003090, LENGTH = 320K - 4K - 0x90
Anna Bridge 169:a7c7b631e539 10 RAM (rwx) : ORIGIN = 0x3FFF4090, LENGTH = 48K - 0x90 /* 8_byte_aligned(35 vectors * 4 bytes each) = 0x90 */
Anna Bridge 169:a7c7b631e539 11 }
AnnaBridge 156:ff21514d8981 12
AnnaBridge 156:ff21514d8981 13 /* Linker script to place sections and symbol values. Should be used together
AnnaBridge 156:ff21514d8981 14 * with other linker script that defines memory regions FLASH and RAM.
AnnaBridge 156:ff21514d8981 15 * It references following symbols, which must be defined in code:
AnnaBridge 156:ff21514d8981 16 * _reset_init : Entry of reset handler
AnnaBridge 156:ff21514d8981 17 *
AnnaBridge 156:ff21514d8981 18 * It defines following symbols, which code can use without definition:
AnnaBridge 156:ff21514d8981 19 * __exidx_start
AnnaBridge 156:ff21514d8981 20 * __exidx_end
AnnaBridge 156:ff21514d8981 21 * __etext
AnnaBridge 156:ff21514d8981 22 * __data_start__
AnnaBridge 156:ff21514d8981 23 * __preinit_array_start
AnnaBridge 156:ff21514d8981 24 * __preinit_array_end
AnnaBridge 156:ff21514d8981 25 * __init_array_start
AnnaBridge 156:ff21514d8981 26 * __init_array_end
AnnaBridge 156:ff21514d8981 27 * __fini_array_start
AnnaBridge 156:ff21514d8981 28 * __fini_array_end
AnnaBridge 156:ff21514d8981 29 * __data_end__
AnnaBridge 156:ff21514d8981 30 * __bss_start__
AnnaBridge 156:ff21514d8981 31 * __bss_end__
AnnaBridge 156:ff21514d8981 32 * __end__
AnnaBridge 156:ff21514d8981 33 * end
AnnaBridge 156:ff21514d8981 34 * __HeapLimit
AnnaBridge 156:ff21514d8981 35 * __StackLimit
AnnaBridge 156:ff21514d8981 36 * __StackTop
AnnaBridge 156:ff21514d8981 37 * __stack
AnnaBridge 156:ff21514d8981 38 */
AnnaBridge 156:ff21514d8981 39 ENTRY(Reset_Handler)
AnnaBridge 156:ff21514d8981 40
AnnaBridge 156:ff21514d8981 41 SECTIONS {
Anna Bridge 169:a7c7b631e539 42 .fib :
Anna Bridge 169:a7c7b631e539 43 {
Anna Bridge 169:a7c7b631e539 44 KEEP(*(.fib))
Anna Bridge 169:a7c7b631e539 45 } > FIB
Anna Bridge 169:a7c7b631e539 46
Anna Bridge 169:a7c7b631e539 47 .trim :
Anna Bridge 169:a7c7b631e539 48 {
Anna Bridge 169:a7c7b631e539 49 KEEP(*(.trim))
Anna Bridge 169:a7c7b631e539 50 } > TRIM
Anna Bridge 169:a7c7b631e539 51
Anna Bridge 169:a7c7b631e539 52 .isr_vector :
AnnaBridge 156:ff21514d8981 53 {
AnnaBridge 156:ff21514d8981 54 __vector_table = .;
AnnaBridge 156:ff21514d8981 55 KEEP(*(.vector_table))
AnnaBridge 171:3a7713b1edbc 56 . = ALIGN(8);
AnnaBridge 156:ff21514d8981 57 } > VECTORS
AnnaBridge 156:ff21514d8981 58
AnnaBridge 156:ff21514d8981 59
AnnaBridge 156:ff21514d8981 60 .text :
AnnaBridge 156:ff21514d8981 61 {
AnnaBridge 156:ff21514d8981 62
AnnaBridge 156:ff21514d8981 63 *(.text*)
AnnaBridge 156:ff21514d8981 64
AnnaBridge 156:ff21514d8981 65 KEEP(*(.init))
AnnaBridge 156:ff21514d8981 66 KEEP(*(.fini))
AnnaBridge 156:ff21514d8981 67
AnnaBridge 156:ff21514d8981 68 /* .ctors */
AnnaBridge 156:ff21514d8981 69 *crtbegin.o(.ctors)
AnnaBridge 156:ff21514d8981 70 *crtbegin?.o(.ctors)
AnnaBridge 156:ff21514d8981 71 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
AnnaBridge 156:ff21514d8981 72 *(SORT(.ctors.*))
AnnaBridge 156:ff21514d8981 73 *(.ctors)
AnnaBridge 156:ff21514d8981 74
AnnaBridge 156:ff21514d8981 75 /* .dtors */
AnnaBridge 156:ff21514d8981 76 *crtbegin.o(.dtors)
AnnaBridge 156:ff21514d8981 77 *crtbegin?.o(.dtors)
AnnaBridge 156:ff21514d8981 78 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
AnnaBridge 156:ff21514d8981 79 *(SORT(.dtors.*))
AnnaBridge 156:ff21514d8981 80 *(.dtors)
AnnaBridge 156:ff21514d8981 81
AnnaBridge 156:ff21514d8981 82 *(.rodata*)
AnnaBridge 156:ff21514d8981 83
AnnaBridge 156:ff21514d8981 84 KEEP(*(.eh_frame*))
AnnaBridge 156:ff21514d8981 85 } > FLASH
AnnaBridge 156:ff21514d8981 86
AnnaBridge 156:ff21514d8981 87 .ARM.extab :
AnnaBridge 156:ff21514d8981 88 {
AnnaBridge 156:ff21514d8981 89 *(.ARM.extab* .gnu.linkonce.armextab.*)
AnnaBridge 156:ff21514d8981 90 } > FLASH
AnnaBridge 156:ff21514d8981 91
AnnaBridge 156:ff21514d8981 92 .ARM.exidx :
AnnaBridge 156:ff21514d8981 93 {
AnnaBridge 156:ff21514d8981 94 __exidx_start = .;
AnnaBridge 156:ff21514d8981 95 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
AnnaBridge 156:ff21514d8981 96 __exidx_end = .;
AnnaBridge 156:ff21514d8981 97 } > FLASH
AnnaBridge 156:ff21514d8981 98
AnnaBridge 156:ff21514d8981 99 .data :
AnnaBridge 156:ff21514d8981 100 {
AnnaBridge 156:ff21514d8981 101 PROVIDE( __etext = LOADADDR(.data) );
AnnaBridge 156:ff21514d8981 102
AnnaBridge 156:ff21514d8981 103 __data_start__ = .;
AnnaBridge 156:ff21514d8981 104 *(vtable)
AnnaBridge 156:ff21514d8981 105 *(.data*)
AnnaBridge 156:ff21514d8981 106
AnnaBridge 171:3a7713b1edbc 107 . = ALIGN(8);
AnnaBridge 156:ff21514d8981 108 /* preinit data */
AnnaBridge 156:ff21514d8981 109 PROVIDE_HIDDEN (__preinit_array_start = .);
AnnaBridge 156:ff21514d8981 110 KEEP(*(.preinit_array))
AnnaBridge 156:ff21514d8981 111 PROVIDE_HIDDEN (__preinit_array_end = .);
AnnaBridge 156:ff21514d8981 112
AnnaBridge 171:3a7713b1edbc 113 . = ALIGN(8);
AnnaBridge 156:ff21514d8981 114 /* init data */
AnnaBridge 156:ff21514d8981 115 PROVIDE_HIDDEN (__init_array_start = .);
AnnaBridge 156:ff21514d8981 116 KEEP(*(SORT(.init_array.*)))
AnnaBridge 156:ff21514d8981 117 KEEP(*(.init_array))
AnnaBridge 156:ff21514d8981 118 PROVIDE_HIDDEN (__init_array_end = .);
AnnaBridge 156:ff21514d8981 119
AnnaBridge 171:3a7713b1edbc 120 . = ALIGN(8);
AnnaBridge 156:ff21514d8981 121 /* finit data */
AnnaBridge 156:ff21514d8981 122 PROVIDE_HIDDEN (__fini_array_start = .);
AnnaBridge 156:ff21514d8981 123 KEEP(*(SORT(.fini_array.*)))
AnnaBridge 156:ff21514d8981 124 KEEP(*(.fini_array))
AnnaBridge 156:ff21514d8981 125 PROVIDE_HIDDEN (__fini_array_end = .);
AnnaBridge 156:ff21514d8981 126
AnnaBridge 156:ff21514d8981 127 /* All data end */
AnnaBridge 156:ff21514d8981 128 . = ALIGN(32);
AnnaBridge 156:ff21514d8981 129 __data_end__ = .;
AnnaBridge 156:ff21514d8981 130
AnnaBridge 156:ff21514d8981 131 } >RAM AT>FLASH
AnnaBridge 156:ff21514d8981 132
AnnaBridge 156:ff21514d8981 133
AnnaBridge 156:ff21514d8981 134 .uninitialized (NOLOAD):
AnnaBridge 156:ff21514d8981 135 {
AnnaBridge 156:ff21514d8981 136 . = ALIGN(32);
AnnaBridge 156:ff21514d8981 137 __uninitialized_start = .;
AnnaBridge 156:ff21514d8981 138 *(.uninitialized)
AnnaBridge 156:ff21514d8981 139 KEEP(*(.keep.uninitialized))
AnnaBridge 156:ff21514d8981 140 . = ALIGN(32);
AnnaBridge 156:ff21514d8981 141 __uninitialized_end = .;
AnnaBridge 156:ff21514d8981 142 } > RAM
AnnaBridge 156:ff21514d8981 143
AnnaBridge 156:ff21514d8981 144 .bss (NOLOAD):
AnnaBridge 156:ff21514d8981 145 {
AnnaBridge 156:ff21514d8981 146 __bss_start__ = .;
AnnaBridge 156:ff21514d8981 147 *(.bss*)
AnnaBridge 156:ff21514d8981 148 *(COMMON)
AnnaBridge 156:ff21514d8981 149 __bss_end__ = .;
AnnaBridge 156:ff21514d8981 150 } > RAM
AnnaBridge 156:ff21514d8981 151
AnnaBridge 156:ff21514d8981 152 .heap (NOLOAD):
AnnaBridge 156:ff21514d8981 153 {
AnnaBridge 156:ff21514d8981 154 __end__ = .;
AnnaBridge 156:ff21514d8981 155 end = __end__;
AnnaBridge 156:ff21514d8981 156 *(.heap*);
AnnaBridge 156:ff21514d8981 157 . += 0x800;
AnnaBridge 156:ff21514d8981 158 __HeapLimit = .;
AnnaBridge 156:ff21514d8981 159 } > RAM
AnnaBridge 156:ff21514d8981 160 PROVIDE(__heap_size = SIZEOF(.heap));
AnnaBridge 156:ff21514d8981 161 PROVIDE(__mbed_sbrk_start = ADDR(.heap));
AnnaBridge 156:ff21514d8981 162 PROVIDE(__mbed_krbs_start = ADDR(.heap) + SIZEOF(.heap));
AnnaBridge 156:ff21514d8981 163
AnnaBridge 156:ff21514d8981 164 /* .stack section doesn't contains any symbols. It is only
AnnaBridge 156:ff21514d8981 165 * used for linker to reserve space for the main stack section
AnnaBridge 156:ff21514d8981 166 * WARNING: .stack should come immediately after the last secure memory
AnnaBridge 156:ff21514d8981 167 * section. This provides stack overflow detection. */
AnnaBridge 156:ff21514d8981 168 .stack (NOLOAD):
AnnaBridge 156:ff21514d8981 169 {
AnnaBridge 156:ff21514d8981 170 __StackLimit = .;
AnnaBridge 156:ff21514d8981 171 *(.stack*);
AnnaBridge 156:ff21514d8981 172 . += 0x800 - (. - __StackLimit);
AnnaBridge 156:ff21514d8981 173 } > RAM
AnnaBridge 156:ff21514d8981 174
AnnaBridge 156:ff21514d8981 175 /* Set stack top to end of RAM */
AnnaBridge 156:ff21514d8981 176 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
AnnaBridge 156:ff21514d8981 177 __StackLimit = __StackTop - SIZEOF(.stack);
AnnaBridge 156:ff21514d8981 178 PROVIDE(__stack = __StackTop);
AnnaBridge 156:ff21514d8981 179
AnnaBridge 156:ff21514d8981 180 }