1
1
/*******************************************************************************
2
2
* \file cyb06xxa_cm0plus.icf
3
- * \version 2.70.1
3
+ * \version 2.80
4
4
*
5
5
* Linker file for the IAR compiler.
6
6
*
41
41
/*-Specials-*/
42
42
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
43
43
44
+ if (!isdefinedsymbol(MBED_ROM_START)) {
45
+ define symbol MBED_ROM_START = 0x10000000;
46
+ }
47
+
48
+ /* MBED_APP_START is being used by the bootloader build script and
49
+ * will be calculate by the system. Without bootloader the MBED_APP_START
50
+ * is equal to MBED_ROM_START
51
+ */
52
+ if (!isdefinedsymbol(MBED_APP_START)) {
53
+ define symbol MBED_APP_START = MBED_ROM_START;
54
+ }
55
+
56
+ if (!isdefinedsymbol(MBED_ROM_SIZE)) {
57
+ define symbol MBED_ROM_SIZE = 0x00010000;
58
+ }
59
+
60
+ /* MBED_APP_SIZE is being used by the bootloader build script and
61
+ * will be calculate by the system. Without bootloader the MBED_APP_SIZE
62
+ * is equal to MBED_ROM_SIZE
63
+ */
64
+ if (!isdefinedsymbol(MBED_APP_SIZE)) {
65
+ define symbol MBED_APP_SIZE = MBED_ROM_SIZE;
66
+ }
67
+
68
+ if (!isdefinedsymbol(MBED_RAM_START)) {
69
+ define symbol MBED_RAM_START = 0x080E0000;
70
+ }
71
+
72
+ if (!isdefinedsymbol(MBED_RAM_SIZE)) {
73
+ define symbol MBED_RAM_SIZE = 0x0000C000;
74
+ }
75
+
76
+ /*-Sizes-*/
77
+ if (!isdefinedsymbol(MBED_PUBLIC_RAM_SIZE)) {
78
+ define symbol MBED_PUBLIC_RAM_SIZE = 0x200;
79
+ }
80
+ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
81
+
82
+ if (!isdefinedsymbol(__STACK_SIZE)) {
83
+ define symbol MBED_BOOT_STACK_SIZE = 0x0400;
84
+ } else {
85
+ define symbol MBED_BOOT_STACK_SIZE = __STACK_SIZE;
86
+ }
87
+ }
88
+
89
+ define symbol __ICFEDIT_size_cstack__ = MBED_BOOT_STACK_SIZE;
90
+
91
+ define symbol __ICFEDIT_size_proc_stack__ = 0x0;
92
+
93
+ /* Defines the minimum heap size. The actual heap size will be expanded to the end of the stack region */
94
+ if (!isdefinedsymbol(__HEAP_SIZE)) {
95
+ define symbol __ICFEDIT_size_heap__ = 0x0400;
96
+ } else {
97
+ define symbol __ICFEDIT_size_heap__ = __HEAP_SIZE;
98
+ }
99
+
100
+ if (!isdefinedsymbol(MBED_PUBLIC_RAM_START)) {
101
+ define symbol MBED_PUBLIC_RAM_START = (MBED_RAM_START + MBED_RAM_SIZE - __ICFEDIT_size_cstack__ - MBED_PUBLIC_RAM_SIZE);
102
+ }
103
+
44
104
/* The symbols below define the location and size of blocks of memory in the target.
45
105
* Use these symbols to specify the memory regions available for allocation.
46
106
*/
@@ -51,12 +111,14 @@ define symbol __ICFEDIT_intvec_start__ = 0x00000000;
51
111
* where 'xx' is the device group; for example, 'cyb06xx7_cm4_dual.icf'.
52
112
*/
53
113
/* RAM */
54
- define symbol __ICFEDIT_region_IRAM1_start__ = 0x08000000;
55
- define symbol __ICFEDIT_region_IRAM1_end__ = 0x0803FFFF;
56
-
114
+ define symbol __ICFEDIT_region_IRAM1_start__ = MBED_RAM_START;
115
+ define symbol __ICFEDIT_region_IRAM1_end__ = (MBED_RAM_START + MBED_RAM_SIZE - 1);
116
+ /* Public RAM */
117
+ define symbol __ICFEDIT_region_IRAM2_start__ = MBED_PUBLIC_RAM_START;
118
+ define symbol __ICFEDIT_region_IRAM2_end__ = (MBED_PUBLIC_RAM_START + MBED_PUBLIC_RAM_SIZE - 1);
57
119
/* Flash */
58
- define symbol __ICFEDIT_region_IROM1_start__ = 0x10000000 ;
59
- define symbol __ICFEDIT_region_IROM1_end__ = 0x1003FFFF ;
120
+ define symbol __ICFEDIT_region_IROM1_start__ = MBED_APP_START ;
121
+ define symbol __ICFEDIT_region_IROM1_end__ = (MBED_APP_START + MBED_APP_SIZE - 0x8000 - 1) ;
60
122
61
123
/* The following symbols define a 32K flash region used for EEPROM emulation.
62
124
* This region can also be used as the general purpose flash.
@@ -101,29 +163,12 @@ define symbol __ICFEDIT_region_EROM2_end__ = 0x0;
101
163
define symbol __ICFEDIT_region_EROM3_start__ = 0x0;
102
164
define symbol __ICFEDIT_region_EROM3_end__ = 0x0;
103
165
104
-
105
- define symbol __ICFEDIT_region_IRAM2_start__ = 0x0;
106
- define symbol __ICFEDIT_region_IRAM2_end__ = 0x0;
107
166
define symbol __ICFEDIT_region_ERAM1_start__ = 0x0;
108
167
define symbol __ICFEDIT_region_ERAM1_end__ = 0x0;
109
168
define symbol __ICFEDIT_region_ERAM2_start__ = 0x0;
110
169
define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
111
170
define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
112
171
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
113
- /*-Sizes-*/
114
- if (!isdefinedsymbol(__STACK_SIZE)) {
115
- define symbol __ICFEDIT_size_cstack__ = 0x1000;
116
- } else {
117
- define symbol __ICFEDIT_size_cstack__ = __STACK_SIZE;
118
- }
119
- define symbol __ICFEDIT_size_proc_stack__ = 0x0;
120
-
121
- /* Defines the minimum heap size. The actual heap size will be expanded to the end of the stack region */
122
- if (!isdefinedsymbol(__HEAP_SIZE)) {
123
- define symbol __ICFEDIT_size_heap__ = 0x0400;
124
- } else {
125
- define symbol __ICFEDIT_size_heap__ = __HEAP_SIZE;
126
- }
127
172
/**** End of ICF editor section. ###ICF###*/
128
173
129
174
/* The size of the MCU boot header area at the start of FLASH */
@@ -141,7 +186,13 @@ define region IROM7_region = mem:[from __ICFEDIT_region_IROM7_start__ to __ICFED
141
186
define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFEDIT_region_IROM8_end__];
142
187
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
143
188
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
189
+ define region IRAM2_region = mem:[from __ICFEDIT_region_IRAM2_start__ to __ICFEDIT_region_IRAM2_end__];
144
190
191
+ define block RAM_DATA {readwrite section .data};
192
+ define block RAM_OTHER {readwrite section * };
193
+ define block RAM_NOINIT {readwrite section .noinit};
194
+ define block RAM_BSS {readwrite section .bss};
195
+ define block RAM with fixed order {block RAM_DATA, block RAM_OTHER, block RAM_NOINIT, block RAM_BSS};
145
196
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
146
197
define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { };
147
198
define block HEAP with expanding size, alignment = 8, minimum size = __ICFEDIT_size_heap__ { };
@@ -184,9 +235,13 @@ place at address (__ICFEDIT_region_IROM1_start__ + BOOT_HEADER_SIZE) { block RO
184
235
185
236
/* RAM */
186
237
place at start of IRAM1_region { readwrite section .intvec_ram};
187
- place in IRAM1_region { readwrite };
238
+ place in IRAM1_region { block RAM};
239
+ place in IRAM1_region { readwrite section .cy_ramfunc };
188
240
place at end of IRAM1_region { block HSTACK };
189
241
242
+ /* Public RAM */
243
+ place at start of IRAM2_region { section .cy_sharedmem };
244
+
190
245
/* These sections are used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. */
191
246
".cymeta" : place at address mem : 0x90500000 { readonly section .cymeta };
192
247
0 commit comments