File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
targets/TARGET_GigaDevice/TARGET_GD32F4XX/device Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 11
11
#define MBED_APP_SIZE 0x200000
12
12
#endif
13
13
14
+ #if !defined(MBED_BOOT_STACK_SIZE)
15
+ #define MBED_BOOT_STACK_SIZE 0x400
16
+ #endif
17
+
18
+ #define Stack_Size MBED_BOOT_STACK_SIZE
19
+
14
20
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region (3*1024K)
15
21
16
22
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
@@ -20,7 +26,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region (3*1024K)
20
26
}
21
27
22
28
; 107 vectors (16 core + 91 peripheral) * 4 bytes = 428 bytes to reserve (0x1B0, 8-byte aligned)
23
- RW_IRAM1 (0x20000000+0x1B0) (0x30000-0x1B0) { ; RW data
29
+ RW_IRAM1 (0x20000000+0x1B0) (0x30000-0x1B0-Stack_Size ) { ; RW data
24
30
.ANY (+RW +ZI)
25
31
}
32
+
33
+ ARM_LIB_STACK 0x20000000+0x30000 EMPTY -Stack_Size { ; Stack region growing down
34
+ }
26
35
}
Original file line number Diff line number Diff line change 6
6
#define MBED_APP_SIZE 2048k
7
7
#endif
8
8
9
+ #if !defined(MBED_BOOT_STACK_SIZE)
10
+ #define MBED_BOOT_STACK_SIZE 0x400
11
+ #endif
12
+
9
13
/* specify memory regions */
10
14
MEMORY
11
15
{
@@ -113,6 +117,7 @@ SECTIONS
113
117
__end__ = .;
114
118
end = __end__;
115
119
*(.heap*)
120
+ . = ORIGIN (RAM) + LENGTH (RAM) - MBED_BOOT_STACK_SIZE;
116
121
__HeapLimit = .;
117
122
} > RAM
118
123
@@ -124,7 +129,7 @@ SECTIONS
124
129
/* initializes stack on the end of block */
125
130
__StackTop = ORIGIN (RAM) + LENGTH (RAM);
126
131
_estack = __StackTop;
127
- __StackLimit = __StackTop - SIZEOF (.stack_dummy) ;
132
+ __StackLimit = __StackTop - MBED_BOOT_STACK_SIZE ;
128
133
PROVIDE (__stack = __StackTop);
129
134
130
135
ASSERT (__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
Original file line number Diff line number Diff line change 4
4
5
5
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
6
6
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x200000; }
7
+ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) { define symbol MBED_BOOT_STACK_SIZE = 0x400; }
7
8
/*-Specials-*/
8
9
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
9
10
/*-Memory Regions-*/
@@ -17,7 +18,7 @@ define symbol __ICFEDIT_region_RAM_start__ = 0x200001B0;
17
18
define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
18
19
19
20
/*-Sizes-*/
20
- define symbol __ICFEDIT_size_cstack__ = 0x400 ;
21
+ define symbol __ICFEDIT_size_cstack__ = MBED_BOOT_STACK_SIZE ;
21
22
define symbol __ICFEDIT_size_heap__ = 0x10000;
22
23
/**** End of ICF editor section. ###ICF###*/
23
24
You can’t perform that action at this time.
0 commit comments