Skip to content

Commit 0dbaeef

Browse files
committed
Add IAR support for the target AN385 of MPS2.
Add file MPS2.icf and startup_MPS2.S to suppout IAR of the target AN385(ARM_MPS2_M3). Add "IAR" to supported_toolchain list. Change-Id: I038b05b8b21bd146a1568de897ed030ccd52ab79 Signed-off-by: Shawn Shan <[email protected]>
1 parent 151d6e0 commit 0dbaeef

File tree

3 files changed

+404
-1
lines changed

3 files changed

+404
-1
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
23+
/* Code memory zones */
24+
define symbol ZBT_SSRAM1_START = 0x00000000;
25+
define symbol ZBT_SSRAM1_SIZE = 0x00400000; /* 4 MiB */
26+
27+
/* Data memory zones */
28+
define symbol ZBT_SSRAM23_START = 0x20000000;
29+
define symbol ZBT_SSRAM23_SIZE = 0x00400000; /* 4 MiB */
30+
31+
/* NVIC vector numbers and size. */
32+
define symbol NVIC_NUM_VECTORS = 16 + 48;
33+
define symbol NVIC_VECTORS_SIZE = NVIC_NUM_VECTORS * 4;
34+
35+
/* Specials */
36+
define symbol __ICFEDIT_intvec_start__ = ZBT_SSRAM1_START;
37+
38+
/* Memory Regions */
39+
define symbol __ICFEDIT_region_ROM_start__ = ZBT_SSRAM1_START;
40+
define symbol __ICFEDIT_region_ROM_end__ = ZBT_SSRAM1_START + ZBT_SSRAM1_SIZE - 1;
41+
/*
42+
* At execution, RAM is set to be in ZBT SSRAM2 and 3, just after the vector
43+
* table previously moved from Flash.
44+
*/
45+
define symbol __ICFEDIT_region_RAM_start__ = ZBT_SSRAM23_START + NVIC_VECTORS_SIZE;
46+
define symbol __ICFEDIT_region_RAM_end__ = ZBT_SSRAM23_START + ZBT_SSRAM23_SIZE;
47+
48+
/* Sizes */
49+
/* Heap and Stack size */
50+
define symbol __ICFEDIT_size_heap__ = 0x1000;
51+
define symbol __ICFEDIT_size_cstack__ = 0x400;
52+
53+
define memory mem with size = 4G;
54+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
55+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
56+
57+
initialize by copy { readwrite };
58+
do not initialize { section .noinit };
59+
60+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
61+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
62+
63+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
64+
place in ROM_region { readonly };
65+
place in RAM_region { readwrite,
66+
block CSTACK, block HEAP };

0 commit comments

Comments
 (0)