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.

Committer:
AnnaBridge
Date:
Wed Aug 31 18:09:46 2016 +0100
Revision:
125:2e9cc70d1897
Parent:
123:b0220dba8be7
Child:
130:d75b3fe1f5cb
Release 125 of the mbed library

Changes:

New target - KL27Z_IAR
New target - MAX32620HSP_ARM_STD
New target - MAX32620HSP_GCC_ARM
New target - MAX32620HSP_IAR
New target - NCS36510_ARM_STD
New target - NCS36510_GCC_ARM
New target - NCS36510_IAR

Added support for NSAPI_REUSEADDR to the lwip interface.
STM32F3 family : Add and enable asynchronous serial, plus tests.
STM32L4 family : Add and enable asynchronous serial, plus tests.
Fixing issue where GCC fails to report compile errors when non-verbose.
Add ethernet and IPV4 support for: NUCLEO_F207ZG, NUCLEO_F429ZI, NUCLEO_F767ZI, DISCO_F746NG.
RZ_A1H - Enable SPI1 on pins P6_4 to P6_7.
KL27Z : SPI driver bug fixes and Improvements, ARM linker file update.
STM32F4, STM32F7 families : Add entropy functions, documentation, code improvements, fix build issues.
HEXIWEAR: Update I2C pin mapping, Add support to create KDS projects.
LWIP - fix recv blocking send on accepted sockets.
SingletonPtr bugfixes.
Beetle: Implement sleep API.
uVisor: Update to v0.20.1-alpha, minor documentation update.
STM32F3 : fix RTOS IAR test, RTOS GCC_ARM test.
nrf5x : Introduce uart hardware flow control configuration.
K64F/K22F: Implement HAL lp_timer API.
Ticker: Move ticker initialisation to object creation time.
STM32F4 : remove printf from pwmout
NXP : Fix multiple definition errors in GCC_CR build, fix linker errors.
Add TOOLCHAIN_GCC_CR support.
STM32L1 family : Add and enable asynchronous serial, plus tests.
mbed-client : Fix Bootstrap and Connector functionality.
NUC472 : Fix Ethernet wrong INT status in RX_Action.
RTX_CM_lib.h : fix compiler warning.
NUCLEO : Use GCC small build for 64K flash STM32.
STM32F2 family : Add and enable asynchronous serial, plus tests.
uvisor : Move page heap after uVisor private data, update page allocator.
K64F: Revert to hardcoded stack pointer in RTX .
dns-query : Internal API change , documentation, Added support for multiple results and ipv6.
Add support for implementation-provided DNS servers.
Adopted netconn_gethostbyname in the lwip interface.
Restructured nsapi_dns.h to have clear separation between C/C++ .
Tool fixes.
Tests : New ones added and some updates to existing.

Who changed what in which revision?

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