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