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_K64F/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld@136:ef9c61f8c49f, 2017-02-14 (annotated)
- Committer:
- Kojto
- Date:
- Tue Feb 14 11:24:20 2017 +0000
- Revision:
- 136:ef9c61f8c49f
- Parent:
- 135:176b8275d35d
- Child:
- 138:093f2bd7b9eb
Release 136 of the mbed library
Ports for Upcoming Targets
Fixes and Changes
3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 120:7c328cabac7e | 1 | /* |
Kojto | 120:7c328cabac7e | 2 | ** ################################################################### |
<> | 130:d75b3fe1f5cb | 3 | ** Processors: MK64FN1M0CAJ12 |
<> | 130:d75b3fe1f5cb | 4 | ** MK64FN1M0VDC12 |
Kojto | 120:7c328cabac7e | 5 | ** MK64FN1M0VLL12 |
Kojto | 120:7c328cabac7e | 6 | ** MK64FN1M0VLQ12 |
Kojto | 120:7c328cabac7e | 7 | ** MK64FN1M0VMD12 |
Kojto | 120:7c328cabac7e | 8 | ** |
Kojto | 120:7c328cabac7e | 9 | ** Compiler: GNU C Compiler |
Kojto | 120:7c328cabac7e | 10 | ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014 |
<> | 130:d75b3fe1f5cb | 11 | ** Version: rev. 2.9, 2016-03-21 |
<> | 130:d75b3fe1f5cb | 12 | ** Build: b160613 |
Kojto | 120:7c328cabac7e | 13 | ** |
Kojto | 120:7c328cabac7e | 14 | ** Abstract: |
Kojto | 120:7c328cabac7e | 15 | ** Linker file for the GNU C Compiler |
Kojto | 120:7c328cabac7e | 16 | ** |
<> | 130:d75b3fe1f5cb | 17 | ** Copyright (c) 2016 Freescale Semiconductor, Inc. |
Kojto | 120:7c328cabac7e | 18 | ** All rights reserved. |
Kojto | 120:7c328cabac7e | 19 | ** |
Kojto | 120:7c328cabac7e | 20 | ** Redistribution and use in source and binary forms, with or without modification, |
Kojto | 120:7c328cabac7e | 21 | ** are permitted provided that the following conditions are met: |
Kojto | 120:7c328cabac7e | 22 | ** |
Kojto | 120:7c328cabac7e | 23 | ** o Redistributions of source code must retain the above copyright notice, this list |
Kojto | 120:7c328cabac7e | 24 | ** of conditions and the following disclaimer. |
Kojto | 120:7c328cabac7e | 25 | ** |
Kojto | 120:7c328cabac7e | 26 | ** o Redistributions in binary form must reproduce the above copyright notice, this |
Kojto | 120:7c328cabac7e | 27 | ** list of conditions and the following disclaimer in the documentation and/or |
Kojto | 120:7c328cabac7e | 28 | ** other materials provided with the distribution. |
Kojto | 120:7c328cabac7e | 29 | ** |
Kojto | 120:7c328cabac7e | 30 | ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its |
Kojto | 120:7c328cabac7e | 31 | ** contributors may be used to endorse or promote products derived from this |
Kojto | 120:7c328cabac7e | 32 | ** software without specific prior written permission. |
Kojto | 120:7c328cabac7e | 33 | ** |
Kojto | 120:7c328cabac7e | 34 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
Kojto | 120:7c328cabac7e | 35 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
Kojto | 120:7c328cabac7e | 36 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 120:7c328cabac7e | 37 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
Kojto | 120:7c328cabac7e | 38 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
Kojto | 120:7c328cabac7e | 39 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
Kojto | 120:7c328cabac7e | 40 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
Kojto | 120:7c328cabac7e | 41 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
Kojto | 120:7c328cabac7e | 42 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
Kojto | 120:7c328cabac7e | 43 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 120:7c328cabac7e | 44 | ** |
Kojto | 120:7c328cabac7e | 45 | ** http: www.freescale.com |
Kojto | 120:7c328cabac7e | 46 | ** mail: support@freescale.com |
Kojto | 120:7c328cabac7e | 47 | ** |
Kojto | 120:7c328cabac7e | 48 | ** ################################################################### |
Kojto | 120:7c328cabac7e | 49 | */ |
Kojto | 120:7c328cabac7e | 50 | |
Kojto | 120:7c328cabac7e | 51 | /* Entry Point */ |
Kojto | 120:7c328cabac7e | 52 | ENTRY(Reset_Handler) |
Kojto | 120:7c328cabac7e | 53 | |
Kojto | 120:7c328cabac7e | 54 | __ram_vector_table__ = 1; |
Kojto | 120:7c328cabac7e | 55 | |
Kojto | 136:ef9c61f8c49f | 56 | /* With the RTOS in use, this does not affect the main stack size. The size of |
Kojto | 136:ef9c61f8c49f | 57 | * the stack where main runs is determined via the RTOS. */ |
Kojto | 136:ef9c61f8c49f | 58 | __stack_size__ = 0x400; |
Kojto | 136:ef9c61f8c49f | 59 | |
Kojto | 136:ef9c61f8c49f | 60 | /* This is the guaranteed minimum available heap size for an application. When |
Kojto | 136:ef9c61f8c49f | 61 | * uVisor is enabled, this is also the maximum available heap size. The |
Kojto | 136:ef9c61f8c49f | 62 | * HEAP_SIZE value is set by uVisor porters to balance the size of the legacy |
Kojto | 136:ef9c61f8c49f | 63 | * heap and the page heap in uVisor applications. */ |
Kojto | 136:ef9c61f8c49f | 64 | __heap_size__ = 0x6000; |
Kojto | 120:7c328cabac7e | 65 | |
Kojto | 120:7c328cabac7e | 66 | HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400; |
Kojto | 120:7c328cabac7e | 67 | STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400; |
Kojto | 120:7c328cabac7e | 68 | M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0; |
Kojto | 120:7c328cabac7e | 69 | |
Kojto | 120:7c328cabac7e | 70 | /* Specify the memory areas */ |
Kojto | 120:7c328cabac7e | 71 | MEMORY |
Kojto | 120:7c328cabac7e | 72 | { |
Kojto | 120:7c328cabac7e | 73 | m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400 |
Kojto | 120:7c328cabac7e | 74 | m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010 |
Kojto | 120:7c328cabac7e | 75 | m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x000FFBF0 |
Kojto | 120:7c328cabac7e | 76 | m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000 |
Kojto | 120:7c328cabac7e | 77 | m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000 |
Kojto | 120:7c328cabac7e | 78 | } |
Kojto | 120:7c328cabac7e | 79 | |
Kojto | 120:7c328cabac7e | 80 | /* Define output sections */ |
Kojto | 120:7c328cabac7e | 81 | SECTIONS |
Kojto | 120:7c328cabac7e | 82 | { |
Kojto | 120:7c328cabac7e | 83 | /* The startup code goes first into internal flash */ |
Kojto | 120:7c328cabac7e | 84 | .interrupts : |
Kojto | 120:7c328cabac7e | 85 | { |
Kojto | 120:7c328cabac7e | 86 | __VECTOR_TABLE = .; |
Kojto | 120:7c328cabac7e | 87 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 88 | KEEP(*(.isr_vector)) /* Startup code */ |
Kojto | 120:7c328cabac7e | 89 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 90 | } > m_interrupts |
Kojto | 120:7c328cabac7e | 91 | |
Kojto | 120:7c328cabac7e | 92 | .flash_config : |
Kojto | 120:7c328cabac7e | 93 | { |
Kojto | 120:7c328cabac7e | 94 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 95 | KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */ |
Kojto | 120:7c328cabac7e | 96 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 97 | } > m_flash_config |
Kojto | 120:7c328cabac7e | 98 | |
Kojto | 120:7c328cabac7e | 99 | /* The program code and other data goes into internal flash */ |
Kojto | 122:f9eeca106725 | 100 | /* Note: The uVisor expects this section at a fixed location, as specified by |
Kojto | 122:f9eeca106725 | 101 | * the porting process configuration parameter: FLASH_OFFSET. */ |
<> | 135:176b8275d35d | 102 | __UVISOR_FLASH_OFFSET = 0x410; |
<> | 135:176b8275d35d | 103 | __UVISOR_FLASH_START = ORIGIN(m_interrupts) + __UVISOR_FLASH_OFFSET; |
<> | 135:176b8275d35d | 104 | .text __UVISOR_FLASH_START : |
Kojto | 120:7c328cabac7e | 105 | { |
Kojto | 122:f9eeca106725 | 106 | /* uVisor code and data */ |
Kojto | 122:f9eeca106725 | 107 | . = ALIGN(4); |
Kojto | 122:f9eeca106725 | 108 | __uvisor_main_start = .; |
Kojto | 122:f9eeca106725 | 109 | *(.uvisor.main) |
Kojto | 122:f9eeca106725 | 110 | __uvisor_main_end = .; |
Kojto | 122:f9eeca106725 | 111 | |
Kojto | 120:7c328cabac7e | 112 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 113 | *(.text) /* .text sections (code) */ |
Kojto | 120:7c328cabac7e | 114 | *(.text*) /* .text* sections (code) */ |
Kojto | 120:7c328cabac7e | 115 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ |
Kojto | 120:7c328cabac7e | 116 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ |
Kojto | 120:7c328cabac7e | 117 | *(.glue_7) /* glue arm to thumb code */ |
Kojto | 120:7c328cabac7e | 118 | *(.glue_7t) /* glue thumb to arm code */ |
Kojto | 120:7c328cabac7e | 119 | *(.eh_frame) |
Kojto | 120:7c328cabac7e | 120 | KEEP (*(.init)) |
Kojto | 120:7c328cabac7e | 121 | KEEP (*(.fini)) |
Kojto | 120:7c328cabac7e | 122 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 123 | } > m_text |
Kojto | 120:7c328cabac7e | 124 | |
Kojto | 120:7c328cabac7e | 125 | .ARM.extab : |
Kojto | 120:7c328cabac7e | 126 | { |
Kojto | 120:7c328cabac7e | 127 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
Kojto | 120:7c328cabac7e | 128 | } > m_text |
Kojto | 120:7c328cabac7e | 129 | |
Kojto | 120:7c328cabac7e | 130 | .ARM : |
Kojto | 120:7c328cabac7e | 131 | { |
Kojto | 120:7c328cabac7e | 132 | __exidx_start = .; |
Kojto | 120:7c328cabac7e | 133 | *(.ARM.exidx*) |
Kojto | 120:7c328cabac7e | 134 | __exidx_end = .; |
Kojto | 120:7c328cabac7e | 135 | } > m_text |
Kojto | 120:7c328cabac7e | 136 | |
Kojto | 120:7c328cabac7e | 137 | .ctors : |
Kojto | 120:7c328cabac7e | 138 | { |
Kojto | 120:7c328cabac7e | 139 | __CTOR_LIST__ = .; |
Kojto | 120:7c328cabac7e | 140 | /* gcc uses crtbegin.o to find the start of |
Kojto | 120:7c328cabac7e | 141 | the constructors, so we make sure it is |
Kojto | 120:7c328cabac7e | 142 | first. Because this is a wildcard, it |
Kojto | 120:7c328cabac7e | 143 | doesn't matter if the user does not |
Kojto | 120:7c328cabac7e | 144 | actually link against crtbegin.o; the |
Kojto | 120:7c328cabac7e | 145 | linker won't look for a file to match a |
Kojto | 120:7c328cabac7e | 146 | wildcard. The wildcard also means that it |
Kojto | 120:7c328cabac7e | 147 | doesn't matter which directory crtbegin.o |
Kojto | 120:7c328cabac7e | 148 | is in. */ |
Kojto | 120:7c328cabac7e | 149 | KEEP (*crtbegin.o(.ctors)) |
Kojto | 120:7c328cabac7e | 150 | KEEP (*crtbegin?.o(.ctors)) |
Kojto | 120:7c328cabac7e | 151 | /* We don't want to include the .ctor section from |
Kojto | 120:7c328cabac7e | 152 | from the crtend.o file until after the sorted ctors. |
Kojto | 120:7c328cabac7e | 153 | The .ctor section from the crtend file contains the |
Kojto | 120:7c328cabac7e | 154 | end of ctors marker and it must be last */ |
Kojto | 120:7c328cabac7e | 155 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)) |
Kojto | 120:7c328cabac7e | 156 | KEEP (*(SORT(.ctors.*))) |
Kojto | 120:7c328cabac7e | 157 | KEEP (*(.ctors)) |
Kojto | 120:7c328cabac7e | 158 | __CTOR_END__ = .; |
Kojto | 120:7c328cabac7e | 159 | } > m_text |
Kojto | 120:7c328cabac7e | 160 | |
Kojto | 120:7c328cabac7e | 161 | .dtors : |
Kojto | 120:7c328cabac7e | 162 | { |
Kojto | 120:7c328cabac7e | 163 | __DTOR_LIST__ = .; |
Kojto | 120:7c328cabac7e | 164 | KEEP (*crtbegin.o(.dtors)) |
Kojto | 120:7c328cabac7e | 165 | KEEP (*crtbegin?.o(.dtors)) |
Kojto | 120:7c328cabac7e | 166 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)) |
Kojto | 120:7c328cabac7e | 167 | KEEP (*(SORT(.dtors.*))) |
Kojto | 120:7c328cabac7e | 168 | KEEP (*(.dtors)) |
Kojto | 120:7c328cabac7e | 169 | __DTOR_END__ = .; |
Kojto | 120:7c328cabac7e | 170 | } > m_text |
Kojto | 120:7c328cabac7e | 171 | |
Kojto | 120:7c328cabac7e | 172 | .preinit_array : |
Kojto | 120:7c328cabac7e | 173 | { |
Kojto | 120:7c328cabac7e | 174 | PROVIDE_HIDDEN (__preinit_array_start = .); |
Kojto | 120:7c328cabac7e | 175 | KEEP (*(.preinit_array*)) |
Kojto | 120:7c328cabac7e | 176 | PROVIDE_HIDDEN (__preinit_array_end = .); |
Kojto | 120:7c328cabac7e | 177 | } > m_text |
Kojto | 120:7c328cabac7e | 178 | |
Kojto | 120:7c328cabac7e | 179 | .init_array : |
Kojto | 120:7c328cabac7e | 180 | { |
Kojto | 120:7c328cabac7e | 181 | PROVIDE_HIDDEN (__init_array_start = .); |
Kojto | 120:7c328cabac7e | 182 | KEEP (*(SORT(.init_array.*))) |
Kojto | 120:7c328cabac7e | 183 | KEEP (*(.init_array*)) |
Kojto | 120:7c328cabac7e | 184 | PROVIDE_HIDDEN (__init_array_end = .); |
Kojto | 120:7c328cabac7e | 185 | } > m_text |
Kojto | 120:7c328cabac7e | 186 | |
Kojto | 120:7c328cabac7e | 187 | .fini_array : |
Kojto | 120:7c328cabac7e | 188 | { |
Kojto | 120:7c328cabac7e | 189 | PROVIDE_HIDDEN (__fini_array_start = .); |
Kojto | 120:7c328cabac7e | 190 | KEEP (*(SORT(.fini_array.*))) |
Kojto | 120:7c328cabac7e | 191 | KEEP (*(.fini_array*)) |
Kojto | 120:7c328cabac7e | 192 | PROVIDE_HIDDEN (__fini_array_end = .); |
Kojto | 120:7c328cabac7e | 193 | } > m_text |
Kojto | 120:7c328cabac7e | 194 | |
Kojto | 120:7c328cabac7e | 195 | .interrupts_ram : |
Kojto | 120:7c328cabac7e | 196 | { |
Kojto | 120:7c328cabac7e | 197 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 198 | __VECTOR_RAM__ = .; |
Kojto | 120:7c328cabac7e | 199 | __interrupts_ram_start__ = .; /* Create a global symbol at data start */ |
Kojto | 120:7c328cabac7e | 200 | *(.m_interrupts_ram) /* This is a user defined section */ |
Kojto | 120:7c328cabac7e | 201 | . += M_VECTOR_RAM_SIZE; |
Kojto | 120:7c328cabac7e | 202 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 203 | __interrupts_ram_end__ = .; /* Define a global symbol at data end */ |
Kojto | 120:7c328cabac7e | 204 | } > m_data |
Kojto | 120:7c328cabac7e | 205 | |
<> | 135:176b8275d35d | 206 | /* uVisor own memory and private box memories |
<> | 135:176b8275d35d | 207 | /* If uVisor shares the SRAM with the OS/app, ensure that this section is |
<> | 135:176b8275d35d | 208 | * the first one after the VTOR relocation section. */ |
<> | 135:176b8275d35d | 209 | /* Note: The uVisor expects this section at a fixed location, as specified |
<> | 135:176b8275d35d | 210 | by the porting process configuration parameter: SRAM_OFFSET. */ |
Kojto | 122:f9eeca106725 | 211 | __UVISOR_SRAM_OFFSET = 0x400; |
<> | 135:176b8275d35d | 212 | __UVISOR_SRAM_START = ORIGIN(m_data) + __UVISOR_SRAM_OFFSET; |
<> | 135:176b8275d35d | 213 | .uvisor.bss __UVISOR_SRAM_START (NOLOAD): |
Kojto | 122:f9eeca106725 | 214 | { |
Kojto | 122:f9eeca106725 | 215 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 216 | __uvisor_bss_start = .; |
Kojto | 122:f9eeca106725 | 217 | |
<> | 135:176b8275d35d | 218 | /* Protected uVisor own BSS section */ |
Kojto | 122:f9eeca106725 | 219 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 220 | __uvisor_bss_main_start = .; |
Kojto | 122:f9eeca106725 | 221 | KEEP(*(.keep.uvisor.bss.main)) |
Kojto | 122:f9eeca106725 | 222 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 223 | __uvisor_bss_main_end = .; |
Kojto | 122:f9eeca106725 | 224 | |
<> | 135:176b8275d35d | 225 | /* Protected uVisor boxes' static memories */ |
Kojto | 122:f9eeca106725 | 226 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 227 | __uvisor_bss_boxes_start = .; |
Kojto | 122:f9eeca106725 | 228 | KEEP(*(.keep.uvisor.bss.boxes)) |
Kojto | 122:f9eeca106725 | 229 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 230 | __uvisor_bss_boxes_end = .; |
Kojto | 122:f9eeca106725 | 231 | |
Kojto | 122:f9eeca106725 | 232 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 233 | __uvisor_bss_end = .; |
Kojto | 122:f9eeca106725 | 234 | } > m_data |
Kojto | 122:f9eeca106725 | 235 | |
<> | 135:176b8275d35d | 236 | /* Heap space for the page allocator |
<> | 135:176b8275d35d | 237 | /* If uVisor shares the SRAM with the OS/app, ensure that this section is |
<> | 135:176b8275d35d | 238 | * the first one after the uVisor BSS section. Otherwise, ensure it is the |
<> | 135:176b8275d35d | 239 | * first one after the VTOR relocation section. */ |
AnnaBridge | 125:2e9cc70d1897 | 240 | .page_heap (NOLOAD) : |
AnnaBridge | 125:2e9cc70d1897 | 241 | { |
AnnaBridge | 125:2e9cc70d1897 | 242 | . = ALIGN(32); |
AnnaBridge | 125:2e9cc70d1897 | 243 | __uvisor_page_start = .; |
AnnaBridge | 125:2e9cc70d1897 | 244 | KEEP(*(.keep.uvisor.page_heap)) |
AnnaBridge | 125:2e9cc70d1897 | 245 | . = ALIGN(32); |
AnnaBridge | 125:2e9cc70d1897 | 246 | __uvisor_page_end = .; |
AnnaBridge | 125:2e9cc70d1897 | 247 | } > m_data_2 |
AnnaBridge | 125:2e9cc70d1897 | 248 | |
Kojto | 120:7c328cabac7e | 249 | __VECTOR_RAM = DEFINED(__ram_vector_table__) ? __VECTOR_RAM__ : ORIGIN(m_interrupts); |
Kojto | 120:7c328cabac7e | 250 | __RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(__ram_vector_table__) ? (__interrupts_ram_end__ - __interrupts_ram_start__) : 0x0; |
Kojto | 120:7c328cabac7e | 251 | |
Kojto | 122:f9eeca106725 | 252 | .data : |
Kojto | 120:7c328cabac7e | 253 | { |
Kojto | 122:f9eeca106725 | 254 | PROVIDE(__etext = LOADADDR(.data)); /* Define a global symbol at end of code, */ |
Kojto | 122:f9eeca106725 | 255 | PROVIDE(__DATA_ROM = LOADADDR(.data)); /* Symbol is used by startup for data initialization. */ |
Kojto | 120:7c328cabac7e | 256 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 257 | __DATA_RAM = .; |
Kojto | 120:7c328cabac7e | 258 | __data_start__ = .; /* create a global symbol at data start */ |
Kojto | 120:7c328cabac7e | 259 | *(.data) /* .data sections */ |
Kojto | 120:7c328cabac7e | 260 | *(.data*) /* .data* sections */ |
Kojto | 120:7c328cabac7e | 261 | KEEP(*(.jcr*)) |
Kojto | 120:7c328cabac7e | 262 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 263 | __data_end__ = .; /* define a global symbol at data end */ |
Kojto | 122:f9eeca106725 | 264 | } > m_data_2 AT > m_text |
Kojto | 120:7c328cabac7e | 265 | |
Kojto | 120:7c328cabac7e | 266 | __DATA_END = __DATA_ROM + (__data_end__ - __data_start__); |
Kojto | 120:7c328cabac7e | 267 | text_end = ORIGIN(m_text) + LENGTH(m_text); |
Kojto | 120:7c328cabac7e | 268 | ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") |
Kojto | 120:7c328cabac7e | 269 | |
Kojto | 122:f9eeca106725 | 270 | /* uVisor configuration section |
Kojto | 122:f9eeca106725 | 271 | * This section must be located after all other flash regions. */ |
Kojto | 122:f9eeca106725 | 272 | .uvisor.secure : |
Kojto | 122:f9eeca106725 | 273 | { |
Kojto | 122:f9eeca106725 | 274 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 275 | __uvisor_secure_start = .; |
Kojto | 122:f9eeca106725 | 276 | |
Kojto | 122:f9eeca106725 | 277 | /* uVisor secure boxes configuration tables */ |
Kojto | 122:f9eeca106725 | 278 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 279 | __uvisor_cfgtbl_start = .; |
Kojto | 122:f9eeca106725 | 280 | KEEP(*(.keep.uvisor.cfgtbl)) |
Kojto | 122:f9eeca106725 | 281 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 282 | __uvisor_cfgtbl_end = .; |
Kojto | 122:f9eeca106725 | 283 | |
Kojto | 122:f9eeca106725 | 284 | /* Pointers to the uVisor secure boxes configuration tables */ |
Kojto | 122:f9eeca106725 | 285 | /* Note: Do not add any further alignment here, as uVisor will need to have |
Kojto | 122:f9eeca106725 | 286 | * access to the exact list of pointers. */ |
Kojto | 122:f9eeca106725 | 287 | __uvisor_cfgtbl_ptr_start = .; |
Kojto | 122:f9eeca106725 | 288 | KEEP(*(.keep.uvisor.cfgtbl_ptr_first)) |
Kojto | 122:f9eeca106725 | 289 | KEEP(*(.keep.uvisor.cfgtbl_ptr)) |
Kojto | 122:f9eeca106725 | 290 | __uvisor_cfgtbl_ptr_end = .; |
Kojto | 122:f9eeca106725 | 291 | |
Kojto | 122:f9eeca106725 | 292 | /* Pointers to all boxes register gateways. These are grouped here to allow |
Kojto | 122:f9eeca106725 | 293 | * discoverability and firmware verification. */ |
Kojto | 122:f9eeca106725 | 294 | __uvisor_register_gateway_ptr_start = .; |
Kojto | 122:f9eeca106725 | 295 | KEEP(*(.keep.uvisor.register_gateway_ptr)) |
Kojto | 122:f9eeca106725 | 296 | __uvisor_register_gateway_ptr_end = .; |
Kojto | 122:f9eeca106725 | 297 | |
Kojto | 122:f9eeca106725 | 298 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 299 | __uvisor_secure_end = .; |
Kojto | 122:f9eeca106725 | 300 | } > m_text |
Kojto | 122:f9eeca106725 | 301 | |
Kojto | 122:f9eeca106725 | 302 | /* Uninitialized data section |
Kojto | 122:f9eeca106725 | 303 | * This region is not initialized by the C/C++ library and can be used to |
Kojto | 122:f9eeca106725 | 304 | * store state across soft reboots. */ |
Kojto | 122:f9eeca106725 | 305 | .uninitialized (NOLOAD): |
Kojto | 122:f9eeca106725 | 306 | { |
Kojto | 122:f9eeca106725 | 307 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 308 | __uninitialized_start = .; |
Kojto | 122:f9eeca106725 | 309 | *(.uninitialized) |
Kojto | 122:f9eeca106725 | 310 | KEEP(*(.keep.uninitialized)) |
Kojto | 122:f9eeca106725 | 311 | . = ALIGN(32); |
Kojto | 122:f9eeca106725 | 312 | __uninitialized_end = .; |
Kojto | 122:f9eeca106725 | 313 | } > m_data_2 |
Kojto | 122:f9eeca106725 | 314 | |
Kojto | 120:7c328cabac7e | 315 | USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800; |
<> | 135:176b8275d35d | 316 | |
Kojto | 120:7c328cabac7e | 317 | /* Uninitialized data section */ |
Kojto | 120:7c328cabac7e | 318 | .bss : |
Kojto | 120:7c328cabac7e | 319 | { |
Kojto | 120:7c328cabac7e | 320 | /* This is used by the startup in order to initialize the .bss section */ |
Kojto | 120:7c328cabac7e | 321 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 322 | __START_BSS = .; |
Kojto | 120:7c328cabac7e | 323 | __bss_start__ = .; |
Kojto | 120:7c328cabac7e | 324 | *(.bss) |
Kojto | 120:7c328cabac7e | 325 | *(.bss*) |
Kojto | 120:7c328cabac7e | 326 | . = ALIGN(512); |
Kojto | 120:7c328cabac7e | 327 | USB_RAM_START = .; |
Kojto | 120:7c328cabac7e | 328 | . += USB_RAM_GAP; |
Kojto | 120:7c328cabac7e | 329 | *(COMMON) |
Kojto | 120:7c328cabac7e | 330 | . = ALIGN(4); |
Kojto | 120:7c328cabac7e | 331 | __bss_end__ = .; |
Kojto | 120:7c328cabac7e | 332 | __END_BSS = .; |
Kojto | 122:f9eeca106725 | 333 | } > m_data_2 |
Kojto | 120:7c328cabac7e | 334 | |
Kojto | 120:7c328cabac7e | 335 | .heap : |
Kojto | 120:7c328cabac7e | 336 | { |
Kojto | 120:7c328cabac7e | 337 | . = ALIGN(8); |
Kojto | 122:f9eeca106725 | 338 | __uvisor_heap_start = .; |
Kojto | 120:7c328cabac7e | 339 | __end__ = .; |
Kojto | 120:7c328cabac7e | 340 | PROVIDE(end = .); |
Kojto | 120:7c328cabac7e | 341 | __HeapBase = .; |
Kojto | 120:7c328cabac7e | 342 | . += HEAP_SIZE; |
Kojto | 120:7c328cabac7e | 343 | __HeapLimit = .; |
Kojto | 120:7c328cabac7e | 344 | __heap_limit = .; /* Add for _sbrk */ |
Kojto | 122:f9eeca106725 | 345 | __uvisor_heap_end = .; |
Kojto | 120:7c328cabac7e | 346 | } > m_data_2 |
Kojto | 120:7c328cabac7e | 347 | |
Kojto | 120:7c328cabac7e | 348 | m_usb_bdt USB_RAM_START (NOLOAD) : |
Kojto | 120:7c328cabac7e | 349 | { |
Kojto | 120:7c328cabac7e | 350 | *(m_usb_bdt) |
Kojto | 120:7c328cabac7e | 351 | USB_RAM_BDT_END = .; |
Kojto | 120:7c328cabac7e | 352 | } |
Kojto | 120:7c328cabac7e | 353 | |
Kojto | 120:7c328cabac7e | 354 | m_usb_global USB_RAM_BDT_END (NOLOAD) : |
Kojto | 120:7c328cabac7e | 355 | { |
Kojto | 120:7c328cabac7e | 356 | *(m_usb_global) |
Kojto | 120:7c328cabac7e | 357 | } |
Kojto | 120:7c328cabac7e | 358 | |
Kojto | 120:7c328cabac7e | 359 | /* Initializes stack on the end of block */ |
AnnaBridge | 125:2e9cc70d1897 | 360 | __StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2); |
Kojto | 120:7c328cabac7e | 361 | __StackLimit = __StackTop - STACK_SIZE; |
Kojto | 120:7c328cabac7e | 362 | PROVIDE(__stack = __StackTop); |
Kojto | 120:7c328cabac7e | 363 | |
Kojto | 120:7c328cabac7e | 364 | .ARM.attributes 0 : { *(.ARM.attributes) } |
Kojto | 120:7c328cabac7e | 365 | |
<> | 135:176b8275d35d | 366 | ASSERT(__StackLimit >= __HeapLimit, "Region m_data_2 overflowed with stack and heap") |
Kojto | 122:f9eeca106725 | 367 | |
Kojto | 122:f9eeca106725 | 368 | /* Provide the physical memory boundaries for uVisor. */ |
Kojto | 122:f9eeca106725 | 369 | __uvisor_flash_start = ORIGIN(m_interrupts); |
Kojto | 122:f9eeca106725 | 370 | __uvisor_flash_end = ORIGIN(m_text) + LENGTH(m_text); |
Kojto | 122:f9eeca106725 | 371 | __uvisor_sram_start = ORIGIN(m_data); |
Kojto | 122:f9eeca106725 | 372 | __uvisor_sram_end = ORIGIN(m_data_2) + LENGTH(m_data_2); |
<> | 135:176b8275d35d | 373 | __uvisor_public_sram_start = __uvisor_sram_start; |
<> | 135:176b8275d35d | 374 | __uvisor_public_sram_end = __uvisor_sram_end; |
Kojto | 120:7c328cabac7e | 375 | } |