/* * Copyright (c) 2020-2022 Arm Limited * Copyright (c) 2020-2021 IAR Systems AB * Copyright (c) 2021 Cypress Semiconductor Corp. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * This file is derivative of ../armclang/psoc6_ns.sct */ #include "region_defs.h" define block ER_CODE with fixed order, alignment = 8 { section .intvec, readonly}; define block LR_CODE with fixed order, maximum size = NS_CODE_SIZE {block ER_CODE}; place at address NS_CODE_START {block LR_CODE}; define block ER_DATA with alignment = 8 {readwrite}; #ifdef RAM_VECTORS_SUPPORT define block ER_RAM_VECTORS with alignment = 256 { section .ramvec }; #endif define block TFM_RAM_CODE with alignment = 32 { readonly section .ramfunc }; define block CSTACK with alignment = 32, size = NS_STACK_SIZE { }; define block HEAP with alignment = 8, size = NS_HEAP_SIZE { }; define block ARM_LIB_HEAP with alignment = 8, size = NS_HEAP_SIZE { }; define overlay HEAP_OVL {block HEAP}; define overlay HEAP_OVL {block ARM_LIB_HEAP}; keep {block CSTACK, block HEAP, block ARM_LIB_HEAP, block TFM_RAM_CODE}; do not initialize { section .noinit, rw section .ramvec }; initialize by copy { readwrite }; if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) { // Required in a multi-threaded application initialize by copy with packing = none { section __DLIB_PERTHREAD }; } define block DATA with fixed order, maximum size = NS_DATA_SIZE { #ifdef RAM_VECTORS_SUPPORT block ER_RAM_VECTORS, #endif block TFM_RAM_CODE, block ER_DATA, block CSTACK, overlay HEAP_OVL, }; place at address NS_DATA_START {block DATA}; #if defined(PSA_API_TEST_ENABLED) define region PSA_NVMEM_region = mem:[from PSA_API_TEST_NVMEM_START size PSA_API_TEST_NVMEM_SIZE]; #endif #if defined (NS_DATA_SHARED_START) /* Shared memory data */ define block TFM_SHARED_MEM with size = NS_DATA_SHARED_SIZE { }; keep {block TFM_SHARED_MEM}; place at address NS_DATA_SHARED_START {block TFM_SHARED_MEM}; #endif