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_SDT64B/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld@172:65be27845400, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 20:53:29 2019 +0000
- Revision:
- 172:65be27845400
- Parent:
- 171:3a7713b1edbc
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 171:3a7713b1edbc | 1 | /* |
AnnaBridge | 171:3a7713b1edbc | 2 | ** ################################################################### |
AnnaBridge | 171:3a7713b1edbc | 3 | ** Processors: MK64FN1M0CAJ12 |
AnnaBridge | 171:3a7713b1edbc | 4 | ** MK64FN1M0VDC12 |
AnnaBridge | 171:3a7713b1edbc | 5 | ** MK64FN1M0VLL12 |
AnnaBridge | 171:3a7713b1edbc | 6 | ** MK64FN1M0VLQ12 |
AnnaBridge | 171:3a7713b1edbc | 7 | ** MK64FN1M0VMD12 |
AnnaBridge | 171:3a7713b1edbc | 8 | ** |
AnnaBridge | 171:3a7713b1edbc | 9 | ** Compiler: GNU C Compiler |
AnnaBridge | 171:3a7713b1edbc | 10 | ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014 |
AnnaBridge | 171:3a7713b1edbc | 11 | ** Version: rev. 2.9, 2016-03-21 |
AnnaBridge | 171:3a7713b1edbc | 12 | ** Build: b160613 |
AnnaBridge | 171:3a7713b1edbc | 13 | ** |
AnnaBridge | 171:3a7713b1edbc | 14 | ** Abstract: |
AnnaBridge | 171:3a7713b1edbc | 15 | ** Linker file for the GNU C Compiler |
AnnaBridge | 171:3a7713b1edbc | 16 | ** |
AnnaBridge | 171:3a7713b1edbc | 17 | ** Copyright (c) 2016 Freescale Semiconductor, Inc. |
AnnaBridge | 171:3a7713b1edbc | 18 | ** All rights reserved. |
AnnaBridge | 171:3a7713b1edbc | 19 | ** |
AnnaBridge | 171:3a7713b1edbc | 20 | ** Redistribution and use in source and binary forms, with or without modification, |
AnnaBridge | 171:3a7713b1edbc | 21 | ** are permitted provided that the following conditions are met: |
AnnaBridge | 171:3a7713b1edbc | 22 | ** |
AnnaBridge | 171:3a7713b1edbc | 23 | ** o Redistributions of source code must retain the above copyright notice, this list |
AnnaBridge | 171:3a7713b1edbc | 24 | ** of conditions and the following disclaimer. |
AnnaBridge | 171:3a7713b1edbc | 25 | ** |
AnnaBridge | 171:3a7713b1edbc | 26 | ** o Redistributions in binary form must reproduce the above copyright notice, this |
AnnaBridge | 171:3a7713b1edbc | 27 | ** list of conditions and the following disclaimer in the documentation and/or |
AnnaBridge | 171:3a7713b1edbc | 28 | ** other materials provided with the distribution. |
AnnaBridge | 171:3a7713b1edbc | 29 | ** |
AnnaBridge | 171:3a7713b1edbc | 30 | ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its |
AnnaBridge | 171:3a7713b1edbc | 31 | ** contributors may be used to endorse or promote products derived from this |
AnnaBridge | 171:3a7713b1edbc | 32 | ** software without specific prior written permission. |
AnnaBridge | 171:3a7713b1edbc | 33 | ** |
AnnaBridge | 171:3a7713b1edbc | 34 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
AnnaBridge | 171:3a7713b1edbc | 35 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
AnnaBridge | 171:3a7713b1edbc | 36 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
AnnaBridge | 171:3a7713b1edbc | 37 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
AnnaBridge | 171:3a7713b1edbc | 38 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
AnnaBridge | 171:3a7713b1edbc | 39 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
AnnaBridge | 171:3a7713b1edbc | 40 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
AnnaBridge | 171:3a7713b1edbc | 41 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
AnnaBridge | 171:3a7713b1edbc | 42 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
AnnaBridge | 171:3a7713b1edbc | 43 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
AnnaBridge | 171:3a7713b1edbc | 44 | ** |
AnnaBridge | 171:3a7713b1edbc | 45 | ** http: www.freescale.com |
AnnaBridge | 171:3a7713b1edbc | 46 | ** mail: support@freescale.com |
AnnaBridge | 171:3a7713b1edbc | 47 | ** |
AnnaBridge | 171:3a7713b1edbc | 48 | ** ################################################################### |
AnnaBridge | 171:3a7713b1edbc | 49 | */ |
AnnaBridge | 171:3a7713b1edbc | 50 | |
AnnaBridge | 171:3a7713b1edbc | 51 | /* Entry Point */ |
AnnaBridge | 171:3a7713b1edbc | 52 | ENTRY(Reset_Handler) |
AnnaBridge | 171:3a7713b1edbc | 53 | |
AnnaBridge | 171:3a7713b1edbc | 54 | __ram_vector_table__ = 1; |
AnnaBridge | 171:3a7713b1edbc | 55 | |
AnnaBridge | 171:3a7713b1edbc | 56 | #if !defined(MBED_APP_START) |
AnnaBridge | 171:3a7713b1edbc | 57 | #define MBED_APP_START 0 |
AnnaBridge | 171:3a7713b1edbc | 58 | #endif |
AnnaBridge | 171:3a7713b1edbc | 59 | |
AnnaBridge | 171:3a7713b1edbc | 60 | #if !defined(MBED_APP_SIZE) |
AnnaBridge | 171:3a7713b1edbc | 61 | #define MBED_APP_SIZE 0x100000 |
AnnaBridge | 171:3a7713b1edbc | 62 | #endif |
AnnaBridge | 171:3a7713b1edbc | 63 | |
AnnaBridge | 172:65be27845400 | 64 | #if !defined(MBED_BOOT_STACK_SIZE) |
AnnaBridge | 172:65be27845400 | 65 | #define MBED_BOOT_STACK_SIZE 0x400 |
AnnaBridge | 172:65be27845400 | 66 | #endif |
AnnaBridge | 172:65be27845400 | 67 | |
AnnaBridge | 172:65be27845400 | 68 | /* With the RTOS in use, this does not affect the main stack size. The size of |
AnnaBridge | 172:65be27845400 | 69 | * the stack where main runs is determined via the RTOS. */ |
AnnaBridge | 172:65be27845400 | 70 | __stack_size__ = MBED_BOOT_STACK_SIZE; |
AnnaBridge | 172:65be27845400 | 71 | |
AnnaBridge | 172:65be27845400 | 72 | __heap_size__ = 0x6000; |
AnnaBridge | 172:65be27845400 | 73 | |
AnnaBridge | 171:3a7713b1edbc | 74 | HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400; |
AnnaBridge | 171:3a7713b1edbc | 75 | STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400; |
AnnaBridge | 171:3a7713b1edbc | 76 | M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0; |
AnnaBridge | 172:65be27845400 | 77 | M_CRASH_DATA_RAM_SIZE = 0x100; |
AnnaBridge | 171:3a7713b1edbc | 78 | |
AnnaBridge | 171:3a7713b1edbc | 79 | /* Specify the memory areas */ |
AnnaBridge | 171:3a7713b1edbc | 80 | MEMORY |
AnnaBridge | 171:3a7713b1edbc | 81 | { |
AnnaBridge | 171:3a7713b1edbc | 82 | m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400 |
AnnaBridge | 171:3a7713b1edbc | 83 | m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10 |
AnnaBridge | 171:3a7713b1edbc | 84 | m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410 |
AnnaBridge | 171:3a7713b1edbc | 85 | m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000 |
AnnaBridge | 171:3a7713b1edbc | 86 | m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000 |
AnnaBridge | 171:3a7713b1edbc | 87 | } |
AnnaBridge | 171:3a7713b1edbc | 88 | |
AnnaBridge | 171:3a7713b1edbc | 89 | /* Define output sections */ |
AnnaBridge | 171:3a7713b1edbc | 90 | SECTIONS |
AnnaBridge | 171:3a7713b1edbc | 91 | { |
AnnaBridge | 171:3a7713b1edbc | 92 | /* The startup code goes first into internal flash */ |
AnnaBridge | 171:3a7713b1edbc | 93 | .interrupts : |
AnnaBridge | 171:3a7713b1edbc | 94 | { |
AnnaBridge | 171:3a7713b1edbc | 95 | __VECTOR_TABLE = .; |
AnnaBridge | 171:3a7713b1edbc | 96 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 97 | KEEP(*(.isr_vector)) /* Startup code */ |
AnnaBridge | 171:3a7713b1edbc | 98 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 99 | } > m_interrupts |
AnnaBridge | 171:3a7713b1edbc | 100 | |
AnnaBridge | 171:3a7713b1edbc | 101 | .flash_config : |
AnnaBridge | 171:3a7713b1edbc | 102 | { |
AnnaBridge | 171:3a7713b1edbc | 103 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 104 | KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */ |
AnnaBridge | 171:3a7713b1edbc | 105 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 106 | } > m_flash_config |
AnnaBridge | 171:3a7713b1edbc | 107 | |
AnnaBridge | 171:3a7713b1edbc | 108 | .text : |
AnnaBridge | 171:3a7713b1edbc | 109 | { |
AnnaBridge | 171:3a7713b1edbc | 110 | |
AnnaBridge | 171:3a7713b1edbc | 111 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 112 | *(.text) /* .text sections (code) */ |
AnnaBridge | 171:3a7713b1edbc | 113 | *(.text*) /* .text* sections (code) */ |
AnnaBridge | 171:3a7713b1edbc | 114 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ |
AnnaBridge | 171:3a7713b1edbc | 115 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ |
AnnaBridge | 171:3a7713b1edbc | 116 | *(.glue_7) /* glue arm to thumb code */ |
AnnaBridge | 171:3a7713b1edbc | 117 | *(.glue_7t) /* glue thumb to arm code */ |
AnnaBridge | 171:3a7713b1edbc | 118 | *(.eh_frame) |
AnnaBridge | 171:3a7713b1edbc | 119 | KEEP (*(.init)) |
AnnaBridge | 171:3a7713b1edbc | 120 | KEEP (*(.fini)) |
AnnaBridge | 171:3a7713b1edbc | 121 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 122 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 123 | |
AnnaBridge | 171:3a7713b1edbc | 124 | .ARM.extab : |
AnnaBridge | 171:3a7713b1edbc | 125 | { |
AnnaBridge | 171:3a7713b1edbc | 126 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
AnnaBridge | 171:3a7713b1edbc | 127 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 128 | |
AnnaBridge | 171:3a7713b1edbc | 129 | .ARM : |
AnnaBridge | 171:3a7713b1edbc | 130 | { |
AnnaBridge | 171:3a7713b1edbc | 131 | __exidx_start = .; |
AnnaBridge | 171:3a7713b1edbc | 132 | *(.ARM.exidx*) |
AnnaBridge | 171:3a7713b1edbc | 133 | __exidx_end = .; |
AnnaBridge | 171:3a7713b1edbc | 134 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 135 | |
AnnaBridge | 171:3a7713b1edbc | 136 | .ctors : |
AnnaBridge | 171:3a7713b1edbc | 137 | { |
AnnaBridge | 171:3a7713b1edbc | 138 | __CTOR_LIST__ = .; |
AnnaBridge | 171:3a7713b1edbc | 139 | /* gcc uses crtbegin.o to find the start of |
AnnaBridge | 171:3a7713b1edbc | 140 | the constructors, so we make sure it is |
AnnaBridge | 171:3a7713b1edbc | 141 | first. Because this is a wildcard, it |
AnnaBridge | 171:3a7713b1edbc | 142 | doesn't matter if the user does not |
AnnaBridge | 171:3a7713b1edbc | 143 | actually link against crtbegin.o; the |
AnnaBridge | 171:3a7713b1edbc | 144 | linker won't look for a file to match a |
AnnaBridge | 171:3a7713b1edbc | 145 | wildcard. The wildcard also means that it |
AnnaBridge | 171:3a7713b1edbc | 146 | doesn't matter which directory crtbegin.o |
AnnaBridge | 171:3a7713b1edbc | 147 | is in. */ |
AnnaBridge | 171:3a7713b1edbc | 148 | KEEP (*crtbegin.o(.ctors)) |
AnnaBridge | 171:3a7713b1edbc | 149 | KEEP (*crtbegin?.o(.ctors)) |
AnnaBridge | 171:3a7713b1edbc | 150 | /* We don't want to include the .ctor section from |
AnnaBridge | 171:3a7713b1edbc | 151 | from the crtend.o file until after the sorted ctors. |
AnnaBridge | 171:3a7713b1edbc | 152 | The .ctor section from the crtend file contains the |
AnnaBridge | 171:3a7713b1edbc | 153 | end of ctors marker and it must be last */ |
AnnaBridge | 171:3a7713b1edbc | 154 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)) |
AnnaBridge | 171:3a7713b1edbc | 155 | KEEP (*(SORT(.ctors.*))) |
AnnaBridge | 171:3a7713b1edbc | 156 | KEEP (*(.ctors)) |
AnnaBridge | 171:3a7713b1edbc | 157 | __CTOR_END__ = .; |
AnnaBridge | 171:3a7713b1edbc | 158 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 159 | |
AnnaBridge | 171:3a7713b1edbc | 160 | .dtors : |
AnnaBridge | 171:3a7713b1edbc | 161 | { |
AnnaBridge | 171:3a7713b1edbc | 162 | __DTOR_LIST__ = .; |
AnnaBridge | 171:3a7713b1edbc | 163 | KEEP (*crtbegin.o(.dtors)) |
AnnaBridge | 171:3a7713b1edbc | 164 | KEEP (*crtbegin?.o(.dtors)) |
AnnaBridge | 171:3a7713b1edbc | 165 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)) |
AnnaBridge | 171:3a7713b1edbc | 166 | KEEP (*(SORT(.dtors.*))) |
AnnaBridge | 171:3a7713b1edbc | 167 | KEEP (*(.dtors)) |
AnnaBridge | 171:3a7713b1edbc | 168 | __DTOR_END__ = .; |
AnnaBridge | 171:3a7713b1edbc | 169 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 170 | |
AnnaBridge | 171:3a7713b1edbc | 171 | .preinit_array : |
AnnaBridge | 171:3a7713b1edbc | 172 | { |
AnnaBridge | 171:3a7713b1edbc | 173 | PROVIDE_HIDDEN (__preinit_array_start = .); |
AnnaBridge | 171:3a7713b1edbc | 174 | KEEP (*(.preinit_array*)) |
AnnaBridge | 171:3a7713b1edbc | 175 | PROVIDE_HIDDEN (__preinit_array_end = .); |
AnnaBridge | 171:3a7713b1edbc | 176 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 177 | |
AnnaBridge | 171:3a7713b1edbc | 178 | .init_array : |
AnnaBridge | 171:3a7713b1edbc | 179 | { |
AnnaBridge | 171:3a7713b1edbc | 180 | PROVIDE_HIDDEN (__init_array_start = .); |
AnnaBridge | 171:3a7713b1edbc | 181 | KEEP (*(SORT(.init_array.*))) |
AnnaBridge | 171:3a7713b1edbc | 182 | KEEP (*(.init_array*)) |
AnnaBridge | 171:3a7713b1edbc | 183 | PROVIDE_HIDDEN (__init_array_end = .); |
AnnaBridge | 171:3a7713b1edbc | 184 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 185 | |
AnnaBridge | 171:3a7713b1edbc | 186 | .fini_array : |
AnnaBridge | 171:3a7713b1edbc | 187 | { |
AnnaBridge | 171:3a7713b1edbc | 188 | PROVIDE_HIDDEN (__fini_array_start = .); |
AnnaBridge | 171:3a7713b1edbc | 189 | KEEP (*(SORT(.fini_array.*))) |
AnnaBridge | 171:3a7713b1edbc | 190 | KEEP (*(.fini_array*)) |
AnnaBridge | 171:3a7713b1edbc | 191 | PROVIDE_HIDDEN (__fini_array_end = .); |
AnnaBridge | 171:3a7713b1edbc | 192 | } > m_text |
AnnaBridge | 171:3a7713b1edbc | 193 | |
AnnaBridge | 171:3a7713b1edbc | 194 | .interrupts_ram : |
AnnaBridge | 171:3a7713b1edbc | 195 | { |
AnnaBridge | 171:3a7713b1edbc | 196 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 197 | __VECTOR_RAM__ = .; |
AnnaBridge | 171:3a7713b1edbc | 198 | __interrupts_ram_start__ = .; /* Create a global symbol at data start */ |
AnnaBridge | 171:3a7713b1edbc | 199 | *(.m_interrupts_ram) /* This is a user defined section */ |
AnnaBridge | 171:3a7713b1edbc | 200 | . += M_VECTOR_RAM_SIZE; |
AnnaBridge | 171:3a7713b1edbc | 201 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 202 | __interrupts_ram_end__ = .; /* Define a global symbol at data end */ |
AnnaBridge | 171:3a7713b1edbc | 203 | } > m_data |
AnnaBridge | 172:65be27845400 | 204 | |
AnnaBridge | 172:65be27845400 | 205 | .crash_data_ram : |
AnnaBridge | 172:65be27845400 | 206 | { |
AnnaBridge | 172:65be27845400 | 207 | . = ALIGN(8); |
AnnaBridge | 172:65be27845400 | 208 | __CRASH_DATA_RAM__ = .; |
AnnaBridge | 172:65be27845400 | 209 | __CRASH_DATA_RAM_START__ = .; /* Create a global symbol at data start */ |
AnnaBridge | 172:65be27845400 | 210 | KEEP(*(.keep.crash_data_ram)) |
AnnaBridge | 172:65be27845400 | 211 | *(.m_crash_data_ram) /* This is a user defined section */ |
AnnaBridge | 172:65be27845400 | 212 | . += M_CRASH_DATA_RAM_SIZE; |
AnnaBridge | 172:65be27845400 | 213 | . = ALIGN(8); |
AnnaBridge | 172:65be27845400 | 214 | __CRASH_DATA_RAM_END__ = .; /* Define a global symbol at data end */ |
AnnaBridge | 172:65be27845400 | 215 | } > m_data |
AnnaBridge | 171:3a7713b1edbc | 216 | |
AnnaBridge | 171:3a7713b1edbc | 217 | |
AnnaBridge | 171:3a7713b1edbc | 218 | __VECTOR_RAM = DEFINED(__ram_vector_table__) ? __VECTOR_RAM__ : ORIGIN(m_interrupts); |
AnnaBridge | 171:3a7713b1edbc | 219 | __RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(__ram_vector_table__) ? (__interrupts_ram_end__ - __interrupts_ram_start__) : 0x0; |
AnnaBridge | 171:3a7713b1edbc | 220 | |
AnnaBridge | 171:3a7713b1edbc | 221 | .data : |
AnnaBridge | 171:3a7713b1edbc | 222 | { |
AnnaBridge | 171:3a7713b1edbc | 223 | PROVIDE(__etext = LOADADDR(.data)); /* Define a global symbol at end of code, */ |
AnnaBridge | 171:3a7713b1edbc | 224 | PROVIDE(__DATA_ROM = LOADADDR(.data)); /* Symbol is used by startup for data initialization. */ |
AnnaBridge | 171:3a7713b1edbc | 225 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 226 | __DATA_RAM = .; |
AnnaBridge | 171:3a7713b1edbc | 227 | __data_start__ = .; /* create a global symbol at data start */ |
AnnaBridge | 171:3a7713b1edbc | 228 | *(.data) /* .data sections */ |
AnnaBridge | 171:3a7713b1edbc | 229 | *(.data*) /* .data* sections */ |
AnnaBridge | 171:3a7713b1edbc | 230 | KEEP(*(.jcr*)) |
AnnaBridge | 171:3a7713b1edbc | 231 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 232 | __data_end__ = .; /* define a global symbol at data end */ |
AnnaBridge | 171:3a7713b1edbc | 233 | } > m_data_2 AT > m_text |
AnnaBridge | 171:3a7713b1edbc | 234 | |
AnnaBridge | 171:3a7713b1edbc | 235 | __DATA_END = __DATA_ROM + (__data_end__ - __data_start__); |
AnnaBridge | 171:3a7713b1edbc | 236 | text_end = ORIGIN(m_text) + LENGTH(m_text); |
AnnaBridge | 171:3a7713b1edbc | 237 | ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") |
AnnaBridge | 171:3a7713b1edbc | 238 | |
AnnaBridge | 171:3a7713b1edbc | 239 | |
AnnaBridge | 171:3a7713b1edbc | 240 | /* Uninitialized data section |
AnnaBridge | 171:3a7713b1edbc | 241 | * This region is not initialized by the C/C++ library and can be used to |
AnnaBridge | 171:3a7713b1edbc | 242 | * store state across soft reboots. */ |
AnnaBridge | 171:3a7713b1edbc | 243 | .uninitialized (NOLOAD): |
AnnaBridge | 171:3a7713b1edbc | 244 | { |
AnnaBridge | 171:3a7713b1edbc | 245 | . = ALIGN(32); |
AnnaBridge | 171:3a7713b1edbc | 246 | __uninitialized_start = .; |
AnnaBridge | 171:3a7713b1edbc | 247 | *(.uninitialized) |
AnnaBridge | 171:3a7713b1edbc | 248 | KEEP(*(.keep.uninitialized)) |
AnnaBridge | 171:3a7713b1edbc | 249 | . = ALIGN(32); |
AnnaBridge | 171:3a7713b1edbc | 250 | __uninitialized_end = .; |
AnnaBridge | 171:3a7713b1edbc | 251 | } > m_data_2 |
AnnaBridge | 171:3a7713b1edbc | 252 | |
AnnaBridge | 171:3a7713b1edbc | 253 | USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800; |
AnnaBridge | 171:3a7713b1edbc | 254 | |
AnnaBridge | 171:3a7713b1edbc | 255 | /* Uninitialized data section */ |
AnnaBridge | 171:3a7713b1edbc | 256 | .bss : |
AnnaBridge | 171:3a7713b1edbc | 257 | { |
AnnaBridge | 171:3a7713b1edbc | 258 | /* This is used by the startup in order to initialize the .bss section */ |
AnnaBridge | 171:3a7713b1edbc | 259 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 260 | __START_BSS = .; |
AnnaBridge | 171:3a7713b1edbc | 261 | __bss_start__ = .; |
AnnaBridge | 171:3a7713b1edbc | 262 | *(.bss) |
AnnaBridge | 171:3a7713b1edbc | 263 | *(.bss*) |
AnnaBridge | 171:3a7713b1edbc | 264 | . = ALIGN(512); |
AnnaBridge | 171:3a7713b1edbc | 265 | USB_RAM_START = .; |
AnnaBridge | 171:3a7713b1edbc | 266 | . += USB_RAM_GAP; |
AnnaBridge | 171:3a7713b1edbc | 267 | *(COMMON) |
AnnaBridge | 171:3a7713b1edbc | 268 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 269 | __bss_end__ = .; |
AnnaBridge | 171:3a7713b1edbc | 270 | __END_BSS = .; |
AnnaBridge | 171:3a7713b1edbc | 271 | } > m_data_2 |
AnnaBridge | 171:3a7713b1edbc | 272 | |
AnnaBridge | 171:3a7713b1edbc | 273 | .heap : |
AnnaBridge | 171:3a7713b1edbc | 274 | { |
AnnaBridge | 171:3a7713b1edbc | 275 | . = ALIGN(8); |
AnnaBridge | 171:3a7713b1edbc | 276 | __end__ = .; |
AnnaBridge | 171:3a7713b1edbc | 277 | PROVIDE(end = .); |
AnnaBridge | 171:3a7713b1edbc | 278 | __HeapBase = .; |
AnnaBridge | 172:65be27845400 | 279 | . = ORIGIN(m_data_2) + LENGTH(m_data_2) - STACK_SIZE; |
AnnaBridge | 171:3a7713b1edbc | 280 | __HeapLimit = .; |
AnnaBridge | 171:3a7713b1edbc | 281 | __heap_limit = .; /* Add for _sbrk */ |
AnnaBridge | 171:3a7713b1edbc | 282 | } > m_data_2 |
AnnaBridge | 171:3a7713b1edbc | 283 | |
AnnaBridge | 171:3a7713b1edbc | 284 | m_usb_bdt USB_RAM_START (NOLOAD) : |
AnnaBridge | 171:3a7713b1edbc | 285 | { |
AnnaBridge | 171:3a7713b1edbc | 286 | *(m_usb_bdt) |
AnnaBridge | 171:3a7713b1edbc | 287 | USB_RAM_BDT_END = .; |
AnnaBridge | 171:3a7713b1edbc | 288 | } |
AnnaBridge | 171:3a7713b1edbc | 289 | |
AnnaBridge | 171:3a7713b1edbc | 290 | m_usb_global USB_RAM_BDT_END (NOLOAD) : |
AnnaBridge | 171:3a7713b1edbc | 291 | { |
AnnaBridge | 171:3a7713b1edbc | 292 | *(m_usb_global) |
AnnaBridge | 171:3a7713b1edbc | 293 | } |
AnnaBridge | 171:3a7713b1edbc | 294 | |
AnnaBridge | 171:3a7713b1edbc | 295 | /* Initializes stack on the end of block */ |
AnnaBridge | 171:3a7713b1edbc | 296 | __StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2); |
AnnaBridge | 171:3a7713b1edbc | 297 | __StackLimit = __StackTop - STACK_SIZE; |
AnnaBridge | 171:3a7713b1edbc | 298 | PROVIDE(__stack = __StackTop); |
AnnaBridge | 171:3a7713b1edbc | 299 | |
AnnaBridge | 171:3a7713b1edbc | 300 | .ARM.attributes 0 : { *(.ARM.attributes) } |
AnnaBridge | 171:3a7713b1edbc | 301 | |
AnnaBridge | 171:3a7713b1edbc | 302 | ASSERT(__StackLimit >= __HeapLimit, "Region m_data_2 overflowed with stack and heap") |
AnnaBridge | 171:3a7713b1edbc | 303 | |
AnnaBridge | 171:3a7713b1edbc | 304 | } |