1#! armclang --target=arm-arm-none-eabi -march=armv8.1-m.main -E -xc 2 3;/* 4; * Copyright (c) 2018-2023 Arm Limited 5; * 6; * Licensed under the Apache License, Version 2.0 (the "License"); 7; * you may not use this file except in compliance with the License. 8; * You may obtain a copy of the License at 9; * 10; * http://www.apache.org/licenses/LICENSE-2.0 11; * 12; * Unless required by applicable law or agreed to in writing, software 13; * distributed under the License is distributed on an "AS IS" BASIS, 14; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15; * See the License for the specific language governing permissions and 16; * limitations under the License. 17; * 18; */ 19 20#include "region_defs.h" 21 22LR_CODE S_CODE_START { 23 ER_CODE S_CODE_START { 24 *.o (RESET +First) 25 .ANY (+RO) 26 } 27 28 /* This empty, zero long execution region is here to mark the limit address 29 * of the last execution region that is allocated in SRAM. 30 */ 31 CODE_WATERMARK +0 EMPTY 0x0 { 32 } 33 /* Make sure that the sections allocated in the SRAM does not exceed the 34 * size of the SRAM available. 35 */ 36 ScatterAssert(ImageLimit(CODE_WATERMARK) <= S_CODE_START + S_CODE_SIZE) 37 38 ER_DATA S_DATA_START { 39 .ANY (+ZI +RW) 40 } 41 42 #if HEAP_SIZE > 0 43 ARM_LIB_HEAP +0 ALIGN 8 EMPTY HEAP_SIZE { ; Reserve empty region for heap 44 } 45 #endif 46 47 ARM_LIB_STACK +0 ALIGN 32 EMPTY STACK_SIZE - 0x8 { ; Reserve empty region for stack 48 } 49 50 STACKSEAL +0 EMPTY 0x8 { 51 } 52 53 /* This empty, zero long execution region is here to mark the limit address 54 * of the last execution region that is allocated in SRAM. 55 */ 56 SRAM_WATERMARK +0 EMPTY 0x0 { 57 } 58 /* Make sure that the sections allocated in the SRAM does not exceed the 59 * size of the SRAM available. 60 */ 61 ScatterAssert(ImageLimit(SRAM_WATERMARK) <= S_DATA_START + S_DATA_SIZE) 62} 63