Skip to content

Commit a602445

Browse files
xjy198903Guozhanxin
authored andcommitted
add link file for iar project
1 parent 878be62 commit a602445

File tree

1 file changed

+87
-0
lines changed
  • bsp/imxrt/imxrt1170-nxp-evk/m7/board/linker_scripts

1 file changed

+87
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
** ###################################################################
3+
** Processors: MIMXRT1176AVM8A_cm7
4+
** MIMXRT1176CVM8A_cm7
5+
** MIMXRT1176DVMAA_cm7
6+
**
7+
** Compiler: IAR ANSI C/C++ Compiler for ARM
8+
** Reference manual: IMXRT1170RM, Rev 1, 02/2021
9+
** Version: rev. 1.1, 2022-04-02
10+
** Build: b220402
11+
**
12+
** Abstract:
13+
** Linker file for the IAR ANSI C/C++ Compiler for ARM
14+
**
15+
** Copyright 2016 Freescale Semiconductor, Inc.
16+
** Copyright 2016-2022 NXP
17+
** All rights reserved.
18+
**
19+
** SPDX-License-Identifier: BSD-3-Clause
20+
**
21+
** http: www.nxp.com
22+
23+
**
24+
** ###################################################################
25+
*/
26+
27+
define symbol m_interrupts_start = 0x00002000;
28+
define symbol m_interrupts_end = 0x000023FF;
29+
30+
define symbol m_text_start = 0x00002400;
31+
define symbol m_text_end = 0x0003FFFF;
32+
33+
define symbol m_data_start = 0x20000000;
34+
define symbol m_data_end = 0x2003FFFF;
35+
36+
define symbol m_data2_start = 0x202C0000;
37+
define symbol m_data2_end = 0x2033FFFF;
38+
39+
define exported symbol __NCACHE_REGION_START = m_data2_start;
40+
define exported symbol __NCACHE_REGION_SIZE = 0x0;
41+
42+
/* Sizes */
43+
if (isdefinedsymbol(__stack_size__)) {
44+
define symbol __size_cstack__ = __stack_size__;
45+
} else {
46+
define symbol __size_cstack__ = 0x0400;
47+
}
48+
49+
if (isdefinedsymbol(__heap_size__)) {
50+
define symbol __size_heap__ = __heap_size__;
51+
} else {
52+
define symbol __size_heap__ = 0x0400;
53+
}
54+
55+
define exported symbol __VECTOR_TABLE = m_interrupts_start;
56+
define exported symbol __VECTOR_RAM = m_interrupts_start;
57+
define exported symbol __RAM_VECTOR_TABLE_SIZE = 0x0;
58+
define exported symbol __RTT_HEAP_END = m_data2_end;
59+
60+
define memory mem with size = 4G;
61+
define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
62+
| mem:[from m_text_start to m_text_end];
63+
define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
64+
define region DATA2_region = mem:[from m_data2_start to m_data2_end];
65+
define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
66+
67+
define block CSTACK with alignment = 8, size = __size_cstack__ { };
68+
define block HEAP with alignment = 8, size = __size_heap__ { };
69+
define block RW { readwrite };
70+
define block ZI { zi };
71+
define block NCACHE_VAR { section NonCacheable , section NonCacheable.init };
72+
define block QACCESS_CODE { section CodeQuickAccess };
73+
define block QACCESS_DATA { section DataQuickAccess };
74+
75+
initialize by copy { readwrite, section .textrw, section CodeQuickAccess, section DataQuickAccess };
76+
do not initialize { section .noinit };
77+
78+
place at address mem: m_interrupts_start { readonly section .intvec };
79+
80+
place in TEXT_region { readonly };
81+
place in DATA_region { block RW };
82+
place in DATA_region { block ZI };
83+
place in DATA_region { last block HEAP };
84+
place in DATA_region { block NCACHE_VAR };
85+
place in TEXT_region { block QACCESS_CODE };
86+
place in DATA_region { block QACCESS_DATA };
87+
place in CSTACK_region { block CSTACK };

0 commit comments

Comments
 (0)