You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/device/TOOLCHAIN_IAR/CC3220SF.icf
+72-21Lines changed: 72 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -7,43 +7,94 @@ define symbol FLASH_HDR_SIZE = 0x800;
7
7
define symbol RAM_START = 0x20000000;
8
8
define symbol RAM_SIZE = 0x40000;
9
9
define symbol VECTORS = 195; /* This value must match NVIC_NUM_VECTORS */
10
-
define symbol HEAP_SIZE = 0xA000;
11
10
12
11
/* Common - Do not change */
13
12
14
-
if (!isdefinedsymbol(MBED_APP_START)) {
15
-
define symbol MBED_APP_START = (ROM_START + FLASH_HDR_SIZE);
13
+
if (isdefinedsymbol(MBED_APP_START)) {
14
+
/*
15
+
* There're two cases if MBED_APP_START is defined.
16
+
* Case 1: MBED_APP_START is defined as ROM_START, this happens when restrict_size is turned on, most likely for bootloader build.
17
+
* In this build, include FLASH_HDR region.
18
+
*/
19
+
if (MBED_APP_START == ROM_START) {
20
+
define symbol FLASH_HDR_INCLUDED = 1;
21
+
if (isdefinedsymbol(MBED_APP_SIZE)) {
22
+
define symbol ROM_EXEC_START = (ROM_START + FLASH_HDR_SIZE);
23
+
define symbol ROM_EXEC_SIZE = (MBED_APP_SIZE - FLASH_HDR_SIZE);
24
+
}
25
+
}
26
+
else {
27
+
/*
28
+
* Case 2: MBED_APP_START is defined as a value greater than ROM_START, this is most likely a build other than the bootloader. E.g., the MCC build.
29
+
* In this build, exclude FLASH_HDR region. This workarounds an issue in managed boodloader MCC build where the jump address and stack pointer point to the cookie area
30
+
*/
31
+
define symbol FLASH_HDR_INCLUDED = 0;
32
+
define symbol ROM_EXEC_START = MBED_APP_START;
33
+
if (isdefinedsymbol(MBED_APP_SIZE)) {
34
+
define symbol ROM_EXEC_SIZE= MBED_APP_SIZE;
35
+
}
36
+
else {
37
+
define symbol ROM_EXEC_SIZE = (ROM_SIZE- (MBED_APP_START - ROM_START));
38
+
}
39
+
}
16
40
}
17
-
18
-
if (!isdefinedsymbol(MBED_APP_SIZE)) {
19
-
define symbol MBED_APP_SIZE = (ROM_SIZE - FLASH_HDR_SIZE);
41
+
else {
42
+
/*
43
+
* MBED_APP_START is not defined. This is most likely a bootloader build, or other apps that do not require boodloader.
44
+
* In this build, include FLASH_HDR region
45
+
*/
46
+
define symbol FLASH_HDR_INCLUDED = 1;
47
+
define symbol ROM_EXEC_START = (ROM_START + FLASH_HDR_SIZE);
48
+
if (isdefinedsymbol (MBED_APP_SIZE)) {
49
+
define symbol ROM_EXEC_SIZE = (MBED_APP_SIZE - FLASH_HDR_SIZE);
50
+
}
51
+
else {
52
+
define symbol ROM_EXEC_SIZE = (ROM_SIZE - FLASH_HDR_SIZE);
0 commit comments