@@ -28,7 +28,7 @@ If you are updating your own linker script, you must:
28
28
- Arm - The boot stack is the ` ARM_LIB_STACK ` region.
29
29
- GCC_ARM - The boot stack starts at the symbol ` __StackLimit ` and ends at the symbol ` __StackTop ` .
30
30
- Add defines for a relocatable application - ` MBED_APP_START ` and ` MBED_APP_SIZE ` .
31
- - Add the define for boot stack size - ` MBED_BOOT_STACK_SIZE ` .
31
+ - Add the define for boot stack size - ` MBED_CONF_TARGET_BOOT_STACK_SIZE ` .
32
32
- Add preprocessing directive ` #! armcc -E ` (ARM compiler only).
33
33
34
34
If you are using the below linker script, then you need to update all the defines in the ` /* Device specific values */ ` section for your target.
@@ -54,9 +54,9 @@ If you are using the below linker script, then you need to update all the define
54
54
#define MBED_APP_SIZE MBED_ROM_SIZE
55
55
#endif
56
56
57
- #if !defined(MBED_BOOT_STACK_SIZE )
57
+ #if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE )
58
58
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
59
- #define MBED_BOOT_STACK_SIZE 0x400
59
+ #define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
60
60
#endif
61
61
62
62
/* Round up VECTORS_SIZE to 8 bytes */
@@ -74,10 +74,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
74
74
.ANY (+RW +ZI)
75
75
}
76
76
77
- ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
77
+ ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE - MBED_CONF_TARGET_BOOT_STACK_SIZE - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
78
78
}
79
79
80
- ARM_LIB_STACK (RAM_START + RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; Stack region growing down
80
+ ARM_LIB_STACK (RAM_START + RAM_SIZE) EMPTY -MBED_CONF_TARGET_BOOT_STACK_SIZE { ; Stack region growing down
81
81
}
82
82
}
83
83
```
@@ -102,10 +102,10 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
102
102
define symbol MBED_APP_SIZE = MBED_ROM_SIZE;
103
103
}
104
104
105
- if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE )) {
105
+ if (!isdefinedsymbol(MBED_CONF_TARGET_BOOT_STACK_SIZE )) {
106
106
/* This value is normally defined by the tools
107
107
to 0x1000 for bare metal and 0x400 for RTOS */
108
- define symbol MBED_BOOT_STACK_SIZE = 0x400;
108
+ define symbol MBED_CONF_TARGET_BOOT_STACK_SIZE = 0x400;
109
109
}
110
110
111
111
/* Round up VECTORS_SIZE to 8 bytes */
@@ -117,7 +117,7 @@ define memory mem with size = 4G;
117
117
define region ROM_region = mem:[from MBED_APP_START size MBED_APP_SIZE];
118
118
define region RAM_region = mem:[from RAM_REGION_START size RAM_REGION_SIZE];
119
119
120
- define block CSTACK with alignment = 8, size = MBED_BOOT_STACK_SIZE { };
120
+ define block CSTACK with alignment = 8, size = MBED_CONF_TARGET_BOOT_STACK_SIZE { };
121
121
define block HEAP with alignment = 8, size = HEAP_SIZE { };
122
122
123
123
initialize by copy { readwrite };
@@ -150,10 +150,10 @@ GCC linker script template:
150
150
#define MBED_APP_SIZE MBED_ROM_SIZE
151
151
#endif
152
152
153
- #if !defined(MBED_BOOT_STACK_SIZE )
153
+ #if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE )
154
154
/* This value is normally defined by the tools
155
155
to 0x1000 for bare metal and 0x400 for RTOS */
156
- #define MBED_BOOT_STACK_SIZE 0x400
156
+ #define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
157
157
#endif
158
158
159
159
/* Round up VECTORS_SIZE to 8 bytes */
@@ -300,7 +300,7 @@ SECTIONS
300
300
__end__ = .;
301
301
PROVIDE(end = .);
302
302
*(.heap*)
303
- . = ORIGIN(RAM) + LENGTH(RAM) - MBED_BOOT_STACK_SIZE ;
303
+ . = ORIGIN(RAM) + LENGTH(RAM) - MBED_CONF_TARGET_BOOT_STACK_SIZE ;
304
304
__HeapLimit = .;
305
305
} > RAM
306
306
@@ -315,7 +315,7 @@ SECTIONS
315
315
/* Set stack top to end of RAM, and stack limit move down by
316
316
* size of stack_dummy section */
317
317
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
318
- __StackLimit = __StackTop - MBED_BOOT_STACK_SIZE ;
318
+ __StackLimit = __StackTop - MBED_CONF_TARGET_BOOT_STACK_SIZE ;
319
319
PROVIDE(__stack = __StackTop);
320
320
321
321
/* Check if data + heap + stack exceeds RAM limit */
0 commit comments