1 /*
2  * Copyright (c) 2018-2022 Arm Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __REGION_LIMITS_H__
18 #define __REGION_LIMITS_H__
19 
20 /* **************************************************************
21  * WARNING: this file is parsed both by the C/C++ compiler
22  * and the linker. As a result the syntax must be valid not only
23  * for C/C++ but for the linker scripts too.
24  * Beware of the following limitations:
25  *   - LD (GCC linker) requires white space around operators.
26  *   - UL postfix for macros is not suported by the linker script
27  ****************************************************************/
28 
29 /* Secure Code */
30 #define S_ROM_ALIAS               (0x11000000) /* SRAM_BASE_S */
31 #define TOTAL_S_ROM_SIZE          (0x00020000) /* 128 kB */
32 
33 /* Secure Data */
34 #define S_RAM_ALIAS               (0x31000000) /* ISRAM0_BASE_S */
35 #define TOTAL_S_RAM_SIZE          (0x00040000) /* 256 kB */
36 
37 /* Non-Secure Code */
38 #define NS_ROM_ALIAS              (0x01000000 + 0x00020000) /* SRAM_BASE_NS */
39 #define TOTAL_NS_ROM_SIZE         (0x00020000) /* 128 kB */
40 
41 /* Non-Secure Data */
42 #define NS_RAM_ALIAS              (0x21000000 + 0x00040000) /* ISRAM0_BASE_NS */
43 #define TOTAL_NS_RAM_SIZE         (0x00040000) /* 256 kB */
44 
45 /* Heap and Stack sizes for secure and nonsecure applications */
46 #define HEAP_SIZE                 (0x00000400) /* 1 KiB */
47 #define STACK_SIZE                (0x00000400) /* 1 KiB */
48 
49 #endif /* __REGION_LIMITS_H__ */
50