#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4 ; ; Copyright (c) 2019-2021 SparkFun Electronics ; SPDX-License-Identifier: MIT ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; ; The above copyright notice and this permission notice shall be included in ; all copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ; SOFTWARE. ; #if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE) /* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */ #if defined(MBED_BOOT_STACK_SIZE) #define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE #else #define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400 #endif #endif #define MBED_APP_START 0x0000C000 #define MBED_APP_SIZE 0x000F4000 #define MBED_RAM_START 0x10000000 #define MBED_RAM_SIZE 0x60000 #define MBED_RAM0_START MBED_RAM_START #define MBED_RAM0_SIZE 0x100 #define MBED_RAM1_START (MBED_RAM0_START + MBED_RAM0_SIZE) #define MBED_RAM1_SIZE (MBED_RAM_SIZE - (MBED_RAM0_SIZE)) ; This section does not contain any symbols. It is only used for the linker ; to calculate the size of the stack sections and assign values to stack ; symbols later #define STACK_DUMMY_START (MBED_RAM1_START + MBED_RAM1_SIZE) #define STACK_DUMMY_SIZE 0x8 #define Stack_Start (STACK_DUMMY_START - STACK_DUMMY_SIZE) #define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE ; The heap dummy section is used to identify the beginning of available dynamic memory. #define HEAP_DUMMY_SIZE 0x8 #define Heap_Start AlignExpr(+0, 16) #define Heap_Size (MBED_RAM_SIZE - RAM_FIXED_SIZE + MBED_RAM1_START - AlignExpr(ImageLimit(RW_IRAM1), 16) - HEAP_DUMMY_SIZE) #define RAM_FIXED_SIZE (MBED_CONF_TARGET_BOOT_STACK_SIZE+MBED_RAM0_SIZE) LR_IROM1 MBED_APP_START MBED_APP_SIZE { ER_IROM1 MBED_APP_START MBED_APP_SIZE { *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM0 MBED_RAM0_START UNINIT MBED_RAM0_SIZE { ;no init section *(*nvictable) } RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { .ANY (+RW +ZI) } ARM_LIB_HEAP Heap_Start EMPTY Heap_Size { ; Heap region growing up } ARM_LIB_STACK Stack_Start EMPTY -Stack_Size { ; Stack region growing down } }