File tree Expand file tree Collapse file tree 4 files changed +22
-18
lines changed
TARGET_AMEBA/TARGET_MCU_RTL8195A/device Expand file tree Collapse file tree 4 files changed +22
-18
lines changed Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
; Realtek Semiconductor Corp.
2
3
;
3
4
; RTL8195A ARMCC Scatter File
10
11
; DRAM (rwx) : ORIGIN = 0x30000000, LENGTH = 2M
11
12
; }
12
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
+
13
20
LR_IRAM 0x10007000 (0x70000 - 0x7000) {
14
21
15
22
IMAGE2_TABLE 0x10007000 FIXED {
@@ -43,7 +50,7 @@ LR_IRAM 0x10007000 (0x70000 - 0x7000) {
43
50
*mbed_boot*.o (+ZI)
44
51
}
45
52
46
- ARM_LIB_STACK (0x10070000 - 0x1000 ) EMPTY 0x1000 {
53
+ ARM_LIB_STACK (0x10070000) EMPTY -Stack_Size {
47
54
}
48
55
}
49
56
Original file line number Diff line number Diff line change @@ -25,8 +25,12 @@ MEMORY
25
25
SRAM2 (rwx) : ORIGIN = 0x30000000, LENGTH = 2M
26
26
}
27
27
28
+ #if !defined(MBED_BOOT_STACK_SIZE)
29
+ #define MBED_BOOT_STACK_SIZE 0x400
30
+ #endif
31
+
28
32
/* Stack sizes : */
29
- StackSize = 0x1000 ;
33
+ StackSize = MBED_BOOT_STACK_SIZE ;
30
34
31
35
/* Linker script to place sections and symbol values. Should be used together
32
36
* with other linker script that defines memory regions FLASH and RAM.
@@ -221,7 +225,7 @@ SECTIONS
221
225
/* Set stack top to end of RAM, and stack limit move down by
222
226
* size of stack_dummy section */
223
227
__StackTop = ORIGIN (SRAM1) + LENGTH (SRAM1);
224
- __StackLimit = __StackTop - SIZEOF (.stack_dummy) ;
228
+ __StackLimit = __StackTop - StackSize ;
225
229
PROVIDE (__stack = __StackTop);
226
230
227
231
/* Check if data + heap + stack exceeds RAM limit */
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ define region TCM_region = mem:[from __DTCM_start__ to __DTCM_end__];
29
29
define region RAM_region = mem:[from __SRAM_start__ to __SRAM_end__] |
30
30
mem:[from __DRAM_start__ to __DRAM_end__];
31
31
32
- define block CSTACK with alignment = 8, size = 0x1000 { };
32
+ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
33
+ define symbol MBED_BOOT_STACK_SIZE = 0x400;
34
+ }
35
+
36
+ define block CSTACK with alignment = 8, size = MBED_BOOT_STACK_SIZE { };
33
37
define block HEAP with alignment = 8, size = 0x19000 { };
34
38
35
39
do not initialize { section .noinit };
Original file line number Diff line number Diff line change 23
23
24
24
#if defined(__CC_ARM ) || (defined(__ARMCC_VERSION ) && (__ARMCC_VERSION >= 6010050 ))
25
25
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base [];
26
- extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length [];
27
- #define ISR_STACK_START (unsigned char *)(Image$$ARM_LIB_STACK$$ZI$$Base)
28
- #define ISR_STACK_SIZE (uint32_t)(Image$$ARM_LIB_STACK$$ZI$$Length)
29
- #define INITIAL_SP (uint32_t)(Image$$ARM_LIB_STACK$$ZI$$Base)
26
+ #define INITIAL_SP ((uint32_t)(Image$$ARM_LIB_STACK$$ZI$$Base))
30
27
#elif defined(__GNUC__ )
31
- extern uint32_t __StackTop [];
32
- extern uint32_t __StackLimit [];
33
- extern uint32_t __HeapLimit [];
34
- #define INITIAL_SP (__StackTop)
35
- #endif
36
-
37
- #if defined(__GNUC__ )
38
- #ifndef ISR_STACK_SIZE
39
- #define ISR_STACK_SIZE (0x1000)
40
- #endif
28
+ extern uint32_t __StackTop ;
29
+ #define INITIAL_SP ((uint32_t)(&__StackTop))
41
30
#endif
42
31
43
32
#endif
You can’t perform that action at this time.
0 commit comments