1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*
* Copyright (c) 2020 Arm Limited
*
* 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/mps2_an521_ns.sct
*/
/* Linker script to configure memory regions. */
/* This file will be run trough the pre-processor. */
#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};
define block ARM_LIB_STACK_MSP with alignment = 8, size = NS_MSP_STACK_SIZE { };
define block ARM_LIB_STACK with alignment = 8, size = NS_PSP_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 ARM_LIB_STACK_MSP, block ARM_LIB_STACK,
block HEAP, block ARM_LIB_HEAP};
do not initialize { section .noinit };
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 {
block ER_DATA,
block ARM_LIB_STACK_MSP,
block ARM_LIB_STACK,
overlay HEAP_OVL
};
place at address NS_DATA_START {block DATA};
|