File tree Expand file tree Collapse file tree 5 files changed +25
-12
lines changed Expand file tree Collapse file tree 5 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 1
1
#! armcc -E
2
+ #include "mbed_config.h"
2
3
3
4
LR_IROM1 0x00003000 0x0004F000 { ; load region size_region
4
5
ER_IROM1 0x00003000 0x0004F000 { ; load address = execution address
@@ -8,8 +9,20 @@ LR_IROM1 0x00003000 0x0004F000 { ; load region size_region
8
9
}
9
10
10
11
12
+ #if (defined(__stack_size__))
13
+ #define Stack_Size __stack_size__
14
+ #else
15
+ #if (defined(MBED_CONF_RTOS_PRESENT))
16
+ #define Stack_Size 0x0400
17
+ #else
18
+ #define Stack_Size 0x1000
19
+ #endif
20
+ #endif
21
+
11
22
RW_IRAM1 0x3FFF4000 + 0x90 { ; 8_byte_aligned(35 vectors * 4 bytes each) = 0x90
12
23
.ANY(+RW +ZI)
13
24
}
14
- ARM_LIB_HEAP AlignExpr(+0, 8) ALIGN 8 EMPTY (0x3FFF4000 + 0xC000 - AlignExpr(ImageLimit(RW_IRAM1),8) ) {}
25
+ ARM_LIB_HEAP AlignExpr(+0, 8) ALIGN 8 EMPTY (0x3FFF4000 + 0xC000 - AlignExpr(ImageLimit(RW_IRAM1),8) - Stack_Size ) {}
26
+ ARM_LIB_STACK 0x3FFF4000+0xC000 EMPTY -Stack_Size { ; Stack region growing down
27
+ }
15
28
}
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ MEMORY {
154
154
__end__ = .;
155
155
end = __end__;
156
156
*(.heap*);
157
- . += 0x800 ;
157
+ . = ORIGIN (RAM) + LENGTH (RAM) - Stack_Size - . ;
158
158
__HeapLimit = .;
159
159
} > RAM
160
160
PROVIDE (__heap_size = SIZEOF (.heap));
@@ -169,12 +169,12 @@ MEMORY {
169
169
{
170
170
__StackLimit = .;
171
171
*(.stack*);
172
- . += 0x800 - (. - __StackLimit) ;
172
+ . += Stack_Size ;
173
173
} > RAM
174
174
175
175
/* Set stack top to end of RAM */
176
176
__StackTop = ORIGIN (RAM) + LENGTH (RAM);
177
- __StackLimit = __StackTop - SIZEOF (.stack) ;
177
+ __StackLimit = __StackTop - Stack_Size ;
178
178
PROVIDE (__stack = __StackTop);
179
179
180
180
}
Original file line number Diff line number Diff line change 39
39
.section .stack
40
40
.align 3
41
41
#ifdef __STACK_SIZE
42
- .equ Stack_Size, __STACK_SIZE
42
+ .equ Stack_Size, __STACK_SIZE
43
43
#else
44
- .equ Stack_Size, 0x400
44
+ #if defined(MBED_CONF_RTOS_PRESENT)
45
+ .equ Stack_Size, 0x400
46
+ #else
47
+ .equ Stack_Size, 0x1000
48
+ #endif
45
49
#endif
46
50
.globl __StackTop
47
51
.globl __StackLimit
48
52
__StackLimit:
49
- .space Stack_Size
53
+ .globl Stack_Size
50
54
.size __StackLimit, . - __StackLimit
51
55
__StackTop:
52
56
.size __StackTop, . - __StackTop
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
29
29
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
30
30
31
31
/*-Sizes-*/
32
- define symbol __ICFEDIT_size_cstack__ = 0x200 ;
32
+ define symbol __ICFEDIT_size_cstack__ = 0x400 ;
33
33
define symbol __ICFEDIT_size_heap__ = 0x4000;
34
34
/**** End of ICF editor section. ###ICF###*/
35
35
Original file line number Diff line number Diff line change 19
19
20
20
#if defined(TARGET_NCS36510 )
21
21
22
- #ifndef INITIAL_SP
23
- #define INITIAL_SP (0x40000000UL)
24
- #endif
25
-
26
22
#endif
27
23
28
24
#endif // MBED_MBED_RTX_H
You can’t perform that action at this time.
0 commit comments