Skip to content

Commit 063d5dc

Browse files
committed
Add IAR support for the target AN500 of MPS2.
Add file MPS2.icf and startup_MPS2.S to suppout IAR of the target AN500(ARM_MPS2_M7). Add "IAR" to supported_toolchain list. Change-Id: I0b8f018fc937727382b27ea0669940ae6675c834 Signed-off-by: Shawn Shan <[email protected]>
1 parent 0d0f14b commit 063d5dc

File tree

3 files changed

+403
-1
lines changed

3 files changed

+403
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the License) you may
7+
* 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, WITHOUT
14+
* 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+
* This file is derivative of mbed-os V5.10.4 CM3DS MPS2.icf for IAR
21+
*/
22+
/* Code memory zones */
23+
define symbol ZBT_SSRAM1_START = 0x00000000;
24+
define symbol ZBT_SSRAM1_SIZE = 0x00400000; /* 4 MiB */
25+
26+
/* Data memory zones */
27+
define symbol ZBT_SSRAM23_START = 0x20000000;
28+
define symbol ZBT_SSRAM23_SIZE = 0x00400000; /* 4 MiB */
29+
30+
/* NVIC vector numbers and size. */
31+
define symbol NVIC_NUM_VECTORS = 16 + 48;
32+
define symbol NVIC_VECTORS_SIZE = NVIC_NUM_VECTORS * 4;
33+
34+
/* Specials */
35+
define symbol __ICFEDIT_intvec_start__ = ZBT_SSRAM1_START;
36+
37+
/* Memory Regions */
38+
define symbol __ICFEDIT_region_ROM_start__ = ZBT_SSRAM1_START;
39+
define symbol __ICFEDIT_region_ROM_end__ = ZBT_SSRAM1_START + ZBT_SSRAM1_SIZE - 1;
40+
/*
41+
* At execution, RAM is set to be in ZBT SSRAM2 and 3, just after the vector
42+
* table previously moved from Flash.
43+
*/
44+
define symbol __ICFEDIT_region_RAM_start__ = ZBT_SSRAM23_START + NVIC_VECTORS_SIZE;
45+
define symbol __ICFEDIT_region_RAM_end__ = ZBT_SSRAM23_START + ZBT_SSRAM23_SIZE;
46+
47+
/* Sizes */
48+
/* Heap and Stack size */
49+
define symbol __ICFEDIT_size_heap__ = 0x1000;
50+
define symbol __ICFEDIT_size_cstack__ = 0x400;
51+
52+
define memory mem with size = 4G;
53+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
54+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
55+
56+
initialize by copy { readwrite };
57+
do not initialize { section .noinit };
58+
59+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
60+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
61+
62+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
63+
place in ROM_region { readonly };
64+
place in RAM_region { readwrite,
65+
block CSTACK, block HEAP };

0 commit comments

Comments
 (0)