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