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.
TARGET_NUMAKER_PFM_M453/TOOLCHAIN_GCC_ARM/M453.ld@140:97feb9bacc10, 2017-04-12 (annotated)
- Committer:
- <>
- Date:
- Wed Apr 12 16:07:08 2017 +0100
- Revision:
- 140:97feb9bacc10
- Parent:
- 130:d75b3fe1f5cb
- Child:
- 141:794e51388b66
Release 140 of the mbed library
Ports for Upcoming Targets
3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992
Fixes and Changes
3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 128:9bcdf88f62b0 | 1 | /* |
<> | 128:9bcdf88f62b0 | 2 | * Nuvoton M453 GCC linker script file |
<> | 128:9bcdf88f62b0 | 3 | */ |
<> | 128:9bcdf88f62b0 | 4 | |
<> | 130:d75b3fe1f5cb | 5 | StackSize = 0x800; |
<> | 128:9bcdf88f62b0 | 6 | |
<> | 128:9bcdf88f62b0 | 7 | MEMORY |
<> | 128:9bcdf88f62b0 | 8 | { |
<> | 128:9bcdf88f62b0 | 9 | VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400 |
<> | 128:9bcdf88f62b0 | 10 | FLASH (rx) : ORIGIN = 0x00000400, LENGTH = 0x00040000 - 0x00000400 |
<> | 128:9bcdf88f62b0 | 11 | RAM_INTERN (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 - 0x00000000 |
<> | 128:9bcdf88f62b0 | 12 | } |
<> | 128:9bcdf88f62b0 | 13 | |
<> | 128:9bcdf88f62b0 | 14 | /** |
<> | 128:9bcdf88f62b0 | 15 | * Must match cmsis_nvic.h |
<> | 128:9bcdf88f62b0 | 16 | */ |
<> | 128:9bcdf88f62b0 | 17 | __vector_size = 4 * (16 + 64); |
<> | 128:9bcdf88f62b0 | 18 | |
<> | 128:9bcdf88f62b0 | 19 | |
<> | 128:9bcdf88f62b0 | 20 | /* Linker script to place sections and symbol values. Should be used together |
<> | 128:9bcdf88f62b0 | 21 | * with other linker script that defines memory regions FLASH and RAM. |
<> | 128:9bcdf88f62b0 | 22 | * It references following symbols, which must be defined in code: |
<> | 128:9bcdf88f62b0 | 23 | * Reset_Handler : Entry of reset handler |
<> | 128:9bcdf88f62b0 | 24 | * |
<> | 128:9bcdf88f62b0 | 25 | * It defines following symbols, which code can use without definition: |
<> | 128:9bcdf88f62b0 | 26 | * __exidx_start |
<> | 128:9bcdf88f62b0 | 27 | * __exidx_end |
<> | 128:9bcdf88f62b0 | 28 | * __etext |
<> | 128:9bcdf88f62b0 | 29 | * __data_start__ |
<> | 128:9bcdf88f62b0 | 30 | * __preinit_array_start |
<> | 128:9bcdf88f62b0 | 31 | * __preinit_array_end |
<> | 128:9bcdf88f62b0 | 32 | * __init_array_start |
<> | 128:9bcdf88f62b0 | 33 | * __init_array_end |
<> | 128:9bcdf88f62b0 | 34 | * __fini_array_start |
<> | 128:9bcdf88f62b0 | 35 | * __fini_array_end |
<> | 128:9bcdf88f62b0 | 36 | * __data_end__ |
<> | 128:9bcdf88f62b0 | 37 | * __bss_start__ |
<> | 128:9bcdf88f62b0 | 38 | * __bss_end__ |
<> | 128:9bcdf88f62b0 | 39 | * __end__ |
<> | 128:9bcdf88f62b0 | 40 | * end |
<> | 128:9bcdf88f62b0 | 41 | * __HeapLimit |
<> | 128:9bcdf88f62b0 | 42 | * __StackLimit |
<> | 128:9bcdf88f62b0 | 43 | * __StackTop |
<> | 128:9bcdf88f62b0 | 44 | * __stack |
<> | 128:9bcdf88f62b0 | 45 | */ |
<> | 128:9bcdf88f62b0 | 46 | ENTRY(Reset_Handler) |
<> | 128:9bcdf88f62b0 | 47 | |
<> | 128:9bcdf88f62b0 | 48 | SECTIONS |
<> | 128:9bcdf88f62b0 | 49 | { |
<> | 128:9bcdf88f62b0 | 50 | .isr_vector : |
<> | 128:9bcdf88f62b0 | 51 | { |
<> | 128:9bcdf88f62b0 | 52 | __vector_table = .; |
<> | 128:9bcdf88f62b0 | 53 | KEEP(*(.vector_table)) |
<> | 128:9bcdf88f62b0 | 54 | . = ALIGN(4); |
<> | 128:9bcdf88f62b0 | 55 | } > VECTORS |
<> | 128:9bcdf88f62b0 | 56 | |
<> | 128:9bcdf88f62b0 | 57 | /* ensure that uvisor bss is at the beginning of memory */ |
<> | 128:9bcdf88f62b0 | 58 | .uvisor.bss (NOLOAD): |
<> | 128:9bcdf88f62b0 | 59 | { |
<> | 128:9bcdf88f62b0 | 60 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 61 | __uvisor_bss_start = .; |
<> | 128:9bcdf88f62b0 | 62 | |
<> | 128:9bcdf88f62b0 | 63 | /* protected uvisor main bss */ |
<> | 128:9bcdf88f62b0 | 64 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 65 | __uvisor_bss_main_start = .; |
<> | 128:9bcdf88f62b0 | 66 | KEEP(*(.keep.uvisor.bss.main)) |
<> | 128:9bcdf88f62b0 | 67 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 68 | __uvisor_bss_main_end = .; |
<> | 128:9bcdf88f62b0 | 69 | |
<> | 128:9bcdf88f62b0 | 70 | /* protected uvisor secure boxes bss */ |
<> | 128:9bcdf88f62b0 | 71 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 72 | __uvisor_bss_boxes_start = .; |
<> | 128:9bcdf88f62b0 | 73 | KEEP(*(.keep.uvisor.bss.boxes)) |
<> | 128:9bcdf88f62b0 | 74 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 75 | __uvisor_bss_boxes_end = .; |
<> | 128:9bcdf88f62b0 | 76 | |
<> | 128:9bcdf88f62b0 | 77 | /* Ensure log2(size) alignment of the uvisor region, to ensure that the region can be effectively protected by the MPU. */ |
<> | 128:9bcdf88f62b0 | 78 | . = ALIGN(1 << LOG2CEIL(__uvisor_bss_boxes_end - __uvisor_bss_start)); |
<> | 128:9bcdf88f62b0 | 79 | __uvisor_bss_end = .; |
<> | 128:9bcdf88f62b0 | 80 | } > RAM_INTERN |
<> | 128:9bcdf88f62b0 | 81 | |
<> | 128:9bcdf88f62b0 | 82 | .text : |
<> | 128:9bcdf88f62b0 | 83 | { |
<> | 128:9bcdf88f62b0 | 84 | /* uVisor code and data */ |
<> | 128:9bcdf88f62b0 | 85 | . = ALIGN(4); |
<> | 128:9bcdf88f62b0 | 86 | __uvisor_main_start = .; |
<> | 128:9bcdf88f62b0 | 87 | *(.uvisor.main) |
<> | 128:9bcdf88f62b0 | 88 | __uvisor_main_end = .; |
<> | 128:9bcdf88f62b0 | 89 | |
<> | 128:9bcdf88f62b0 | 90 | *(.text*) |
<> | 128:9bcdf88f62b0 | 91 | |
<> | 128:9bcdf88f62b0 | 92 | KEEP(*(.init)) |
<> | 128:9bcdf88f62b0 | 93 | KEEP(*(.fini)) |
<> | 128:9bcdf88f62b0 | 94 | |
<> | 128:9bcdf88f62b0 | 95 | /* .ctors */ |
<> | 128:9bcdf88f62b0 | 96 | *crtbegin.o(.ctors) |
<> | 128:9bcdf88f62b0 | 97 | *crtbegin?.o(.ctors) |
<> | 128:9bcdf88f62b0 | 98 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
<> | 128:9bcdf88f62b0 | 99 | *(SORT(.ctors.*)) |
<> | 128:9bcdf88f62b0 | 100 | *(.ctors) |
<> | 128:9bcdf88f62b0 | 101 | |
<> | 128:9bcdf88f62b0 | 102 | /* .dtors */ |
<> | 128:9bcdf88f62b0 | 103 | *crtbegin.o(.dtors) |
<> | 128:9bcdf88f62b0 | 104 | *crtbegin?.o(.dtors) |
<> | 128:9bcdf88f62b0 | 105 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
<> | 128:9bcdf88f62b0 | 106 | *(SORT(.dtors.*)) |
<> | 128:9bcdf88f62b0 | 107 | *(.dtors) |
<> | 128:9bcdf88f62b0 | 108 | |
<> | 128:9bcdf88f62b0 | 109 | *(.rodata*) |
<> | 128:9bcdf88f62b0 | 110 | |
<> | 128:9bcdf88f62b0 | 111 | KEEP(*(.eh_frame*)) |
<> | 128:9bcdf88f62b0 | 112 | } > FLASH |
<> | 128:9bcdf88f62b0 | 113 | |
<> | 128:9bcdf88f62b0 | 114 | .ARM.extab : |
<> | 128:9bcdf88f62b0 | 115 | { |
<> | 128:9bcdf88f62b0 | 116 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
<> | 128:9bcdf88f62b0 | 117 | } > FLASH |
<> | 128:9bcdf88f62b0 | 118 | |
<> | 128:9bcdf88f62b0 | 119 | .ARM.exidx : |
<> | 128:9bcdf88f62b0 | 120 | { |
<> | 128:9bcdf88f62b0 | 121 | __exidx_start = .; |
<> | 128:9bcdf88f62b0 | 122 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
<> | 128:9bcdf88f62b0 | 123 | __exidx_end = .; |
<> | 128:9bcdf88f62b0 | 124 | } > FLASH |
<> | 128:9bcdf88f62b0 | 125 | |
<> | 128:9bcdf88f62b0 | 126 | /* .stack section doesn't contains any symbols. It is only |
<> | 128:9bcdf88f62b0 | 127 | * used for linker to reserve space for the main stack section |
<> | 128:9bcdf88f62b0 | 128 | * WARNING: .stack should come immediately after the last secure memory |
<> | 128:9bcdf88f62b0 | 129 | * section. This provides stack overflow detection. */ |
<> | 128:9bcdf88f62b0 | 130 | .stack (NOLOAD): |
<> | 128:9bcdf88f62b0 | 131 | { |
<> | 128:9bcdf88f62b0 | 132 | __StackLimit = .; |
<> | 128:9bcdf88f62b0 | 133 | *(.stack*); |
<> | 128:9bcdf88f62b0 | 134 | . += StackSize - (. - __StackLimit); |
<> | 128:9bcdf88f62b0 | 135 | } > RAM_INTERN |
<> | 128:9bcdf88f62b0 | 136 | |
<> | 128:9bcdf88f62b0 | 137 | /* Set stack top to end of RAM, and stack limit move down by |
<> | 128:9bcdf88f62b0 | 138 | * size of stack_dummy section */ |
<> | 128:9bcdf88f62b0 | 139 | __StackTop = ADDR(.stack) + SIZEOF(.stack); |
<> | 128:9bcdf88f62b0 | 140 | __StackLimit = ADDR(.stack); |
<> | 128:9bcdf88f62b0 | 141 | PROVIDE(__stack = __StackTop); |
<> | 128:9bcdf88f62b0 | 142 | |
<> | 128:9bcdf88f62b0 | 143 | /* Relocate vector table in SRAM */ |
<> | 128:9bcdf88f62b0 | 144 | .isr_vector.reloc (NOLOAD) : |
<> | 128:9bcdf88f62b0 | 145 | { |
<> | 128:9bcdf88f62b0 | 146 | . = ALIGN(1 << LOG2CEIL(__vector_size)); |
<> | 128:9bcdf88f62b0 | 147 | PROVIDE(__start_vector_table__ = .); |
<> | 128:9bcdf88f62b0 | 148 | . += __vector_size; |
<> | 128:9bcdf88f62b0 | 149 | PROVIDE(__end_vector_table__ = .); |
<> | 128:9bcdf88f62b0 | 150 | } > RAM_INTERN |
<> | 128:9bcdf88f62b0 | 151 | |
<> | 128:9bcdf88f62b0 | 152 | .data : |
<> | 128:9bcdf88f62b0 | 153 | { |
<> | 128:9bcdf88f62b0 | 154 | PROVIDE( __etext = LOADADDR(.data) ); |
<> | 128:9bcdf88f62b0 | 155 | |
<> | 128:9bcdf88f62b0 | 156 | __data_start__ = .; |
<> | 128:9bcdf88f62b0 | 157 | *(vtable) |
<> | 128:9bcdf88f62b0 | 158 | *(.data*) |
<> | 128:9bcdf88f62b0 | 159 | |
<> | 128:9bcdf88f62b0 | 160 | . = ALIGN(4); |
<> | 128:9bcdf88f62b0 | 161 | /* preinit data */ |
<> | 128:9bcdf88f62b0 | 162 | PROVIDE_HIDDEN (__preinit_array_start = .); |
<> | 128:9bcdf88f62b0 | 163 | KEEP(*(.preinit_array)) |
<> | 128:9bcdf88f62b0 | 164 | PROVIDE_HIDDEN (__preinit_array_end = .); |
<> | 128:9bcdf88f62b0 | 165 | |
<> | 128:9bcdf88f62b0 | 166 | . = ALIGN(4); |
<> | 128:9bcdf88f62b0 | 167 | /* init data */ |
<> | 128:9bcdf88f62b0 | 168 | PROVIDE_HIDDEN (__init_array_start = .); |
<> | 128:9bcdf88f62b0 | 169 | KEEP(*(SORT(.init_array.*))) |
<> | 128:9bcdf88f62b0 | 170 | KEEP(*(.init_array)) |
<> | 128:9bcdf88f62b0 | 171 | PROVIDE_HIDDEN (__init_array_end = .); |
<> | 128:9bcdf88f62b0 | 172 | |
<> | 128:9bcdf88f62b0 | 173 | . = ALIGN(4); |
<> | 128:9bcdf88f62b0 | 174 | /* finit data */ |
<> | 128:9bcdf88f62b0 | 175 | PROVIDE_HIDDEN (__fini_array_start = .); |
<> | 128:9bcdf88f62b0 | 176 | KEEP(*(SORT(.fini_array.*))) |
<> | 128:9bcdf88f62b0 | 177 | KEEP(*(.fini_array)) |
<> | 128:9bcdf88f62b0 | 178 | PROVIDE_HIDDEN (__fini_array_end = .); |
<> | 128:9bcdf88f62b0 | 179 | |
<> | 128:9bcdf88f62b0 | 180 | /* All data end */ |
<> | 128:9bcdf88f62b0 | 181 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 182 | __data_end__ = .; |
<> | 128:9bcdf88f62b0 | 183 | |
<> | 128:9bcdf88f62b0 | 184 | } >RAM_INTERN AT>FLASH |
<> | 128:9bcdf88f62b0 | 185 | |
<> | 128:9bcdf88f62b0 | 186 | /* uvisor configuration data */ |
<> | 128:9bcdf88f62b0 | 187 | .uvisor.secure : |
<> | 128:9bcdf88f62b0 | 188 | { |
<> | 128:9bcdf88f62b0 | 189 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 190 | __uvisor_secure_start = .; |
<> | 128:9bcdf88f62b0 | 191 | |
<> | 128:9bcdf88f62b0 | 192 | /* uvisor secure boxes configuration tables */ |
<> | 128:9bcdf88f62b0 | 193 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 194 | __uvisor_cfgtbl_start = .; |
<> | 128:9bcdf88f62b0 | 195 | KEEP(*(.keep.uvisor.cfgtbl)) |
<> | 128:9bcdf88f62b0 | 196 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 197 | __uvisor_cfgtbl_end = .; |
<> | 128:9bcdf88f62b0 | 198 | |
<> | 128:9bcdf88f62b0 | 199 | /* pointers to uvisor secure boxes configuration tables */ |
<> | 128:9bcdf88f62b0 | 200 | /* note: no further alignment here, we need to have the exact list of pointers */ |
<> | 128:9bcdf88f62b0 | 201 | __uvisor_cfgtbl_ptr_start = .; |
<> | 128:9bcdf88f62b0 | 202 | KEEP(*(.keep.uvisor.cfgtbl_ptr_first)) |
<> | 128:9bcdf88f62b0 | 203 | KEEP(*(.keep.uvisor.cfgtbl_ptr)) |
<> | 128:9bcdf88f62b0 | 204 | __uvisor_cfgtbl_ptr_end = .; |
<> | 128:9bcdf88f62b0 | 205 | |
<> | 128:9bcdf88f62b0 | 206 | /* the following symbols are kept for backward compatibility and will be soon |
<> | 128:9bcdf88f62b0 | 207 | * deprecated; applications actively using uVisor (__uvisor_mode == UVISOR_ENABLED) |
<> | 128:9bcdf88f62b0 | 208 | * will need to use uVisor 0.8.x or above, or the security assertions will halt the |
<> | 128:9bcdf88f62b0 | 209 | * system */ |
<> | 128:9bcdf88f62b0 | 210 | /************************/ |
<> | 128:9bcdf88f62b0 | 211 | __uvisor_data_src = .; |
<> | 128:9bcdf88f62b0 | 212 | __uvisor_data_start = .; |
<> | 128:9bcdf88f62b0 | 213 | __uvisor_data_end = .; |
<> | 128:9bcdf88f62b0 | 214 | /************************/ |
<> | 128:9bcdf88f62b0 | 215 | |
<> | 128:9bcdf88f62b0 | 216 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 217 | __uvisor_secure_end = .; |
<> | 128:9bcdf88f62b0 | 218 | } >FLASH |
<> | 128:9bcdf88f62b0 | 219 | |
<> | 128:9bcdf88f62b0 | 220 | .uninitialized (NOLOAD): |
<> | 128:9bcdf88f62b0 | 221 | { |
<> | 128:9bcdf88f62b0 | 222 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 223 | __uninitialized_start = .; |
<> | 128:9bcdf88f62b0 | 224 | *(.uninitialized) |
<> | 128:9bcdf88f62b0 | 225 | KEEP(*(.keep.uninitialized)) |
<> | 128:9bcdf88f62b0 | 226 | . = ALIGN(32); |
<> | 128:9bcdf88f62b0 | 227 | __uninitialized_end = .; |
<> | 128:9bcdf88f62b0 | 228 | } > RAM_INTERN |
<> | 128:9bcdf88f62b0 | 229 | |
<> | 128:9bcdf88f62b0 | 230 | .bss (NOLOAD): |
<> | 128:9bcdf88f62b0 | 231 | { |
<> | 128:9bcdf88f62b0 | 232 | __bss_start__ = .; |
<> | 128:9bcdf88f62b0 | 233 | *(.bss*) |
<> | 128:9bcdf88f62b0 | 234 | *(COMMON) |
<> | 128:9bcdf88f62b0 | 235 | __bss_end__ = .; |
<> | 128:9bcdf88f62b0 | 236 | } > RAM_INTERN |
<> | 128:9bcdf88f62b0 | 237 | |
<> | 128:9bcdf88f62b0 | 238 | .heap (NOLOAD): |
<> | 128:9bcdf88f62b0 | 239 | { |
<> | 128:9bcdf88f62b0 | 240 | __end__ = .; |
<> | 128:9bcdf88f62b0 | 241 | end = __end__; |
<> | 128:9bcdf88f62b0 | 242 | *(.heap*); |
<> | 128:9bcdf88f62b0 | 243 | . += (ORIGIN(RAM_INTERN) + LENGTH(RAM_INTERN) - .); |
<> | 128:9bcdf88f62b0 | 244 | __HeapLimit = .; |
<> | 128:9bcdf88f62b0 | 245 | } > RAM_INTERN |
<> | 128:9bcdf88f62b0 | 246 | PROVIDE(__heap_size = SIZEOF(.heap)); |
<> | 128:9bcdf88f62b0 | 247 | PROVIDE(__mbed_sbrk_start = ADDR(.heap)); |
<> | 128:9bcdf88f62b0 | 248 | PROVIDE(__mbed_krbs_start = ADDR(.heap) + SIZEOF(.heap)); |
<> | 128:9bcdf88f62b0 | 249 | |
<> | 128:9bcdf88f62b0 | 250 | /* Provide physical memory boundaries for uVisor. */ |
<> | 128:9bcdf88f62b0 | 251 | __uvisor_flash_start = ORIGIN(VECTORS); |
<> | 128:9bcdf88f62b0 | 252 | __uvisor_flash_end = ORIGIN(FLASH) + LENGTH(FLASH); |
<> | 128:9bcdf88f62b0 | 253 | __uvisor_sram_start = ORIGIN(RAM_INTERN); |
<> | 128:9bcdf88f62b0 | 254 | __uvisor_sram_end = ORIGIN(RAM_INTERN) + LENGTH(RAM_INTERN); |
<> | 128:9bcdf88f62b0 | 255 | } |