mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
Anna Bridge
Date:
Fri Apr 28 14:04:18 2017 +0100
Revision:
163:74e0ce7f98e8
Parent:
151:5eaa88a5bcc7
Child:
188:bcfe06ba3d64
This updates the lib to the mbed lib v141

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 149:156823d33999 1 /*
<> 149:156823d33999 2 * Nuvoton M453 GCC linker script file
<> 149:156823d33999 3 */
<> 149:156823d33999 4
Anna Bridge 163:74e0ce7f98e8 5 #if !defined(MBED_APP_START)
Anna Bridge 163:74e0ce7f98e8 6 #define MBED_APP_START 0x00000000
Anna Bridge 163:74e0ce7f98e8 7 #endif
Anna Bridge 163:74e0ce7f98e8 8
Anna Bridge 163:74e0ce7f98e8 9 #if !defined(MBED_APP_SIZE)
Anna Bridge 163:74e0ce7f98e8 10 #define MBED_APP_SIZE 0x00040000
Anna Bridge 163:74e0ce7f98e8 11 #endif
Anna Bridge 163:74e0ce7f98e8 12
<> 151:5eaa88a5bcc7 13 StackSize = 0x800;
<> 149:156823d33999 14
<> 149:156823d33999 15 MEMORY
<> 149:156823d33999 16 {
Anna Bridge 163:74e0ce7f98e8 17 VECTORS (rx) : ORIGIN = MBED_APP_START, LENGTH = 0x00000400
Anna Bridge 163:74e0ce7f98e8 18 FLASH (rx) : ORIGIN = MBED_APP_START + 0x400, LENGTH = MBED_APP_SIZE - 0x00000400
<> 149:156823d33999 19 RAM_INTERN (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 - 0x00000000
<> 149:156823d33999 20 }
<> 149:156823d33999 21
<> 149:156823d33999 22 /**
<> 149:156823d33999 23 * Must match cmsis_nvic.h
<> 149:156823d33999 24 */
<> 149:156823d33999 25 __vector_size = 4 * (16 + 64);
<> 149:156823d33999 26
<> 149:156823d33999 27
<> 149:156823d33999 28 /* Linker script to place sections and symbol values. Should be used together
<> 149:156823d33999 29 * with other linker script that defines memory regions FLASH and RAM.
<> 149:156823d33999 30 * It references following symbols, which must be defined in code:
<> 149:156823d33999 31 * Reset_Handler : Entry of reset handler
<> 149:156823d33999 32 *
<> 149:156823d33999 33 * It defines following symbols, which code can use without definition:
<> 149:156823d33999 34 * __exidx_start
<> 149:156823d33999 35 * __exidx_end
<> 149:156823d33999 36 * __etext
<> 149:156823d33999 37 * __data_start__
<> 149:156823d33999 38 * __preinit_array_start
<> 149:156823d33999 39 * __preinit_array_end
<> 149:156823d33999 40 * __init_array_start
<> 149:156823d33999 41 * __init_array_end
<> 149:156823d33999 42 * __fini_array_start
<> 149:156823d33999 43 * __fini_array_end
<> 149:156823d33999 44 * __data_end__
<> 149:156823d33999 45 * __bss_start__
<> 149:156823d33999 46 * __bss_end__
<> 149:156823d33999 47 * __end__
<> 149:156823d33999 48 * end
<> 149:156823d33999 49 * __HeapLimit
<> 149:156823d33999 50 * __StackLimit
<> 149:156823d33999 51 * __StackTop
<> 149:156823d33999 52 * __stack
<> 149:156823d33999 53 */
<> 149:156823d33999 54 ENTRY(Reset_Handler)
<> 149:156823d33999 55
<> 149:156823d33999 56 SECTIONS
<> 149:156823d33999 57 {
<> 149:156823d33999 58 .isr_vector :
<> 149:156823d33999 59 {
<> 149:156823d33999 60 __vector_table = .;
<> 149:156823d33999 61 KEEP(*(.vector_table))
<> 149:156823d33999 62 . = ALIGN(4);
<> 149:156823d33999 63 } > VECTORS
<> 149:156823d33999 64
<> 149:156823d33999 65 /* ensure that uvisor bss is at the beginning of memory */
<> 149:156823d33999 66 .uvisor.bss (NOLOAD):
<> 149:156823d33999 67 {
<> 149:156823d33999 68 . = ALIGN(32);
<> 149:156823d33999 69 __uvisor_bss_start = .;
<> 149:156823d33999 70
<> 149:156823d33999 71 /* protected uvisor main bss */
<> 149:156823d33999 72 . = ALIGN(32);
<> 149:156823d33999 73 __uvisor_bss_main_start = .;
<> 149:156823d33999 74 KEEP(*(.keep.uvisor.bss.main))
<> 149:156823d33999 75 . = ALIGN(32);
<> 149:156823d33999 76 __uvisor_bss_main_end = .;
<> 149:156823d33999 77
<> 149:156823d33999 78 /* protected uvisor secure boxes bss */
<> 149:156823d33999 79 . = ALIGN(32);
<> 149:156823d33999 80 __uvisor_bss_boxes_start = .;
<> 149:156823d33999 81 KEEP(*(.keep.uvisor.bss.boxes))
<> 149:156823d33999 82 . = ALIGN(32);
<> 149:156823d33999 83 __uvisor_bss_boxes_end = .;
<> 149:156823d33999 84
<> 149:156823d33999 85 /* Ensure log2(size) alignment of the uvisor region, to ensure that the region can be effectively protected by the MPU. */
<> 149:156823d33999 86 . = ALIGN(1 << LOG2CEIL(__uvisor_bss_boxes_end - __uvisor_bss_start));
<> 149:156823d33999 87 __uvisor_bss_end = .;
<> 149:156823d33999 88 } > RAM_INTERN
<> 149:156823d33999 89
<> 149:156823d33999 90 .text :
<> 149:156823d33999 91 {
<> 149:156823d33999 92 /* uVisor code and data */
<> 149:156823d33999 93 . = ALIGN(4);
<> 149:156823d33999 94 __uvisor_main_start = .;
<> 149:156823d33999 95 *(.uvisor.main)
<> 149:156823d33999 96 __uvisor_main_end = .;
<> 149:156823d33999 97
<> 149:156823d33999 98 *(.text*)
<> 149:156823d33999 99
<> 149:156823d33999 100 KEEP(*(.init))
<> 149:156823d33999 101 KEEP(*(.fini))
<> 149:156823d33999 102
<> 149:156823d33999 103 /* .ctors */
<> 149:156823d33999 104 *crtbegin.o(.ctors)
<> 149:156823d33999 105 *crtbegin?.o(.ctors)
<> 149:156823d33999 106 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
<> 149:156823d33999 107 *(SORT(.ctors.*))
<> 149:156823d33999 108 *(.ctors)
<> 149:156823d33999 109
<> 149:156823d33999 110 /* .dtors */
<> 149:156823d33999 111 *crtbegin.o(.dtors)
<> 149:156823d33999 112 *crtbegin?.o(.dtors)
<> 149:156823d33999 113 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
<> 149:156823d33999 114 *(SORT(.dtors.*))
<> 149:156823d33999 115 *(.dtors)
<> 149:156823d33999 116
<> 149:156823d33999 117 *(.rodata*)
<> 149:156823d33999 118
<> 149:156823d33999 119 KEEP(*(.eh_frame*))
<> 149:156823d33999 120 } > FLASH
<> 149:156823d33999 121
<> 149:156823d33999 122 .ARM.extab :
<> 149:156823d33999 123 {
<> 149:156823d33999 124 *(.ARM.extab* .gnu.linkonce.armextab.*)
<> 149:156823d33999 125 } > FLASH
<> 149:156823d33999 126
<> 149:156823d33999 127 .ARM.exidx :
<> 149:156823d33999 128 {
<> 149:156823d33999 129 __exidx_start = .;
<> 149:156823d33999 130 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
<> 149:156823d33999 131 __exidx_end = .;
<> 149:156823d33999 132 } > FLASH
<> 149:156823d33999 133
<> 149:156823d33999 134 /* .stack section doesn't contains any symbols. It is only
<> 149:156823d33999 135 * used for linker to reserve space for the main stack section
<> 149:156823d33999 136 * WARNING: .stack should come immediately after the last secure memory
<> 149:156823d33999 137 * section. This provides stack overflow detection. */
<> 149:156823d33999 138 .stack (NOLOAD):
<> 149:156823d33999 139 {
<> 149:156823d33999 140 __StackLimit = .;
<> 149:156823d33999 141 *(.stack*);
<> 149:156823d33999 142 . += StackSize - (. - __StackLimit);
<> 149:156823d33999 143 } > RAM_INTERN
<> 149:156823d33999 144
<> 149:156823d33999 145 /* Set stack top to end of RAM, and stack limit move down by
<> 149:156823d33999 146 * size of stack_dummy section */
<> 149:156823d33999 147 __StackTop = ADDR(.stack) + SIZEOF(.stack);
<> 149:156823d33999 148 __StackLimit = ADDR(.stack);
<> 149:156823d33999 149 PROVIDE(__stack = __StackTop);
<> 149:156823d33999 150
<> 149:156823d33999 151 /* Relocate vector table in SRAM */
<> 149:156823d33999 152 .isr_vector.reloc (NOLOAD) :
<> 149:156823d33999 153 {
<> 149:156823d33999 154 . = ALIGN(1 << LOG2CEIL(__vector_size));
<> 149:156823d33999 155 PROVIDE(__start_vector_table__ = .);
<> 149:156823d33999 156 . += __vector_size;
<> 149:156823d33999 157 PROVIDE(__end_vector_table__ = .);
<> 149:156823d33999 158 } > RAM_INTERN
<> 149:156823d33999 159
<> 149:156823d33999 160 .data :
<> 149:156823d33999 161 {
<> 149:156823d33999 162 PROVIDE( __etext = LOADADDR(.data) );
<> 149:156823d33999 163
<> 149:156823d33999 164 __data_start__ = .;
<> 149:156823d33999 165 *(vtable)
<> 149:156823d33999 166 *(.data*)
<> 149:156823d33999 167
<> 149:156823d33999 168 . = ALIGN(4);
<> 149:156823d33999 169 /* preinit data */
<> 149:156823d33999 170 PROVIDE_HIDDEN (__preinit_array_start = .);
<> 149:156823d33999 171 KEEP(*(.preinit_array))
<> 149:156823d33999 172 PROVIDE_HIDDEN (__preinit_array_end = .);
<> 149:156823d33999 173
<> 149:156823d33999 174 . = ALIGN(4);
<> 149:156823d33999 175 /* init data */
<> 149:156823d33999 176 PROVIDE_HIDDEN (__init_array_start = .);
<> 149:156823d33999 177 KEEP(*(SORT(.init_array.*)))
<> 149:156823d33999 178 KEEP(*(.init_array))
<> 149:156823d33999 179 PROVIDE_HIDDEN (__init_array_end = .);
<> 149:156823d33999 180
<> 149:156823d33999 181 . = ALIGN(4);
<> 149:156823d33999 182 /* finit data */
<> 149:156823d33999 183 PROVIDE_HIDDEN (__fini_array_start = .);
<> 149:156823d33999 184 KEEP(*(SORT(.fini_array.*)))
<> 149:156823d33999 185 KEEP(*(.fini_array))
<> 149:156823d33999 186 PROVIDE_HIDDEN (__fini_array_end = .);
<> 149:156823d33999 187
<> 149:156823d33999 188 /* All data end */
<> 149:156823d33999 189 . = ALIGN(32);
<> 149:156823d33999 190 __data_end__ = .;
<> 149:156823d33999 191
<> 149:156823d33999 192 } >RAM_INTERN AT>FLASH
<> 149:156823d33999 193
<> 149:156823d33999 194 /* uvisor configuration data */
<> 149:156823d33999 195 .uvisor.secure :
<> 149:156823d33999 196 {
<> 149:156823d33999 197 . = ALIGN(32);
<> 149:156823d33999 198 __uvisor_secure_start = .;
<> 149:156823d33999 199
<> 149:156823d33999 200 /* uvisor secure boxes configuration tables */
<> 149:156823d33999 201 . = ALIGN(32);
<> 149:156823d33999 202 __uvisor_cfgtbl_start = .;
<> 149:156823d33999 203 KEEP(*(.keep.uvisor.cfgtbl))
<> 149:156823d33999 204 . = ALIGN(32);
<> 149:156823d33999 205 __uvisor_cfgtbl_end = .;
<> 149:156823d33999 206
<> 149:156823d33999 207 /* pointers to uvisor secure boxes configuration tables */
<> 149:156823d33999 208 /* note: no further alignment here, we need to have the exact list of pointers */
<> 149:156823d33999 209 __uvisor_cfgtbl_ptr_start = .;
<> 149:156823d33999 210 KEEP(*(.keep.uvisor.cfgtbl_ptr_first))
<> 149:156823d33999 211 KEEP(*(.keep.uvisor.cfgtbl_ptr))
<> 149:156823d33999 212 __uvisor_cfgtbl_ptr_end = .;
<> 149:156823d33999 213
<> 149:156823d33999 214 /* the following symbols are kept for backward compatibility and will be soon
<> 149:156823d33999 215 * deprecated; applications actively using uVisor (__uvisor_mode == UVISOR_ENABLED)
<> 149:156823d33999 216 * will need to use uVisor 0.8.x or above, or the security assertions will halt the
<> 149:156823d33999 217 * system */
<> 149:156823d33999 218 /************************/
<> 149:156823d33999 219 __uvisor_data_src = .;
<> 149:156823d33999 220 __uvisor_data_start = .;
<> 149:156823d33999 221 __uvisor_data_end = .;
<> 149:156823d33999 222 /************************/
<> 149:156823d33999 223
<> 149:156823d33999 224 . = ALIGN(32);
<> 149:156823d33999 225 __uvisor_secure_end = .;
<> 149:156823d33999 226 } >FLASH
<> 149:156823d33999 227
<> 149:156823d33999 228 .uninitialized (NOLOAD):
<> 149:156823d33999 229 {
<> 149:156823d33999 230 . = ALIGN(32);
<> 149:156823d33999 231 __uninitialized_start = .;
<> 149:156823d33999 232 *(.uninitialized)
<> 149:156823d33999 233 KEEP(*(.keep.uninitialized))
<> 149:156823d33999 234 . = ALIGN(32);
<> 149:156823d33999 235 __uninitialized_end = .;
<> 149:156823d33999 236 } > RAM_INTERN
<> 149:156823d33999 237
<> 149:156823d33999 238 .bss (NOLOAD):
<> 149:156823d33999 239 {
<> 149:156823d33999 240 __bss_start__ = .;
<> 149:156823d33999 241 *(.bss*)
<> 149:156823d33999 242 *(COMMON)
<> 149:156823d33999 243 __bss_end__ = .;
<> 149:156823d33999 244 } > RAM_INTERN
<> 149:156823d33999 245
<> 149:156823d33999 246 .heap (NOLOAD):
<> 149:156823d33999 247 {
<> 149:156823d33999 248 __end__ = .;
<> 149:156823d33999 249 end = __end__;
<> 149:156823d33999 250 *(.heap*);
<> 149:156823d33999 251 . += (ORIGIN(RAM_INTERN) + LENGTH(RAM_INTERN) - .);
<> 149:156823d33999 252 __HeapLimit = .;
<> 149:156823d33999 253 } > RAM_INTERN
<> 149:156823d33999 254 PROVIDE(__heap_size = SIZEOF(.heap));
<> 149:156823d33999 255 PROVIDE(__mbed_sbrk_start = ADDR(.heap));
<> 149:156823d33999 256 PROVIDE(__mbed_krbs_start = ADDR(.heap) + SIZEOF(.heap));
<> 149:156823d33999 257
<> 149:156823d33999 258 /* Provide physical memory boundaries for uVisor. */
<> 149:156823d33999 259 __uvisor_flash_start = ORIGIN(VECTORS);
<> 149:156823d33999 260 __uvisor_flash_end = ORIGIN(FLASH) + LENGTH(FLASH);
<> 149:156823d33999 261 __uvisor_sram_start = ORIGIN(RAM_INTERN);
<> 149:156823d33999 262 __uvisor_sram_end = ORIGIN(RAM_INTERN) + LENGTH(RAM_INTERN);
<> 149:156823d33999 263 }