File tree Expand file tree Collapse file tree 12 files changed +76
-40
lines changed Expand file tree Collapse file tree 12 files changed +76
-40
lines changed Original file line number Diff line number Diff line change
1
+ #! armcc -E
2
+ #include "mbed_config.h"
1
3
;; TMPM066FWUG scatter file
2
4
3
5
;; Vector table starts at 0
13
15
14
16
;; Compatible with ISSM model
15
17
18
+ #if (defined(__stack_size__))
19
+ #define Stack_Size __stack_size__
20
+ #else
21
+ #if (defined(MBED_CONF_RTOS_PRESENT))
22
+ #define Stack_Size 0x0400
23
+ #else
24
+ #define Stack_Size 0x1000
25
+ #endif
26
+ #endif
27
+
16
28
LR_IROM1 0x00000000 0x20000
17
29
{
18
30
ER_IROM1 0x00000000 0x20000
@@ -25,8 +37,11 @@ LR_IROM1 0x00000000 0x20000
25
37
}
26
38
27
39
/* 8_byte_aligned(32 + 16 vect * 4 bytes) = 8_byte_aligned(0xC0) */
28
- RW_IRAM1 0x200000C0 (0x4000 - 0xC0)
40
+ RW_IRAM1 0x200000C0 (0x4000 - 0xC0 - Stack_Size )
29
41
{
30
42
.ANY (+RW, +ZI)
31
43
}
44
+
45
+ ARM_LIB_STACK 0x200000C0+0x4000 EMPTY -Stack_Size { ; Stack region growing down
46
+ }
32
47
}
Original file line number Diff line number Diff line change 26
26
.section .stack
27
27
.align 3
28
28
#ifdef __STACK_SIZE
29
- .equ Stack_Size, __STACK_SIZE
29
+ .equ Stack_Size, __STACK_SIZE
30
30
#else
31
- .equ Stack_Size, 0x400
31
+ #if defined(MBED_CONF_RTOS_PRESENT)
32
+ .equ Stack_Size, 0x400
33
+ #else
34
+ .equ Stack_Size, 0x1000
35
+ #endif
32
36
#endif
33
37
.globl __StackTop
34
38
.globl __StackLimit
35
39
__StackLimit:
36
- .space Stack_Size
40
+ .globl Stack_Size
37
41
.size __StackLimit, . - __StackLimit
38
42
__StackTop:
39
43
.size __StackTop, . - __StackTop
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ SECTIONS
128
128
__end__ = .;
129
129
end = __end__;
130
130
*(.heap*)
131
+ . = ORIGIN (RAM) + LENGTH (RAM) - Stack_Size;
131
132
__HeapLimit = .;
132
133
} > RAM
133
134
@@ -137,12 +138,13 @@ SECTIONS
137
138
.stack_dummy :
138
139
{
139
140
*(.stack)
141
+ . += Stack_Size;
140
142
} > RAM
141
143
142
144
/* Set stack top to end of RAM, and stack limit move down by
143
145
* size of stack_dummy section */
144
146
__StackTop = ORIGIN (RAM) + LENGTH (RAM);
145
- __StackLimit = __StackTop - SIZEOF (.stack_dummy) ;
147
+ __StackLimit = __StackTop - Stack_Size ;
146
148
PROVIDE (__stack = __StackTop);
147
149
148
150
/* Check if data + heap + stack exceeds RAM limit */
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ define symbol __ICFEDIT_region_ROM_end__ = 0x0001FFFF;
9
9
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10
10
define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11
11
/*-Sizes-*/
12
- define symbol __ICFEDIT_size_cstack__ = 0x200 ;
12
+ define symbol __ICFEDIT_size_cstack__ = 0x400 ;
13
13
define symbol __ICFEDIT_size_heap__ = 0x1400;
14
14
/**** End of ICF editor section. ###ICF###*/
15
15
Original file line number Diff line number Diff line change
1
+ #! armcc -E
2
+ #include "mbed_config.h"
1
3
;; TMPM3H6FWFG scatter file
2
4
3
5
;; Vector table starts at 0
13
15
14
16
;; Compatible with ISSM model
15
17
18
+ #if (defined(__stack_size__))
19
+ #define Stack_Size __stack_size__
20
+ #else
21
+ #if (defined(MBED_CONF_RTOS_PRESENT))
22
+ #define Stack_Size 0x0400
23
+ #else
24
+ #define Stack_Size 0x1000
25
+ #endif
26
+ #endif
27
+
16
28
LR_IROM1 0x00000000 0x20000
17
29
{
18
30
ER_IROM1 0x00000000 0x20000
@@ -26,4 +38,6 @@ LR_IROM1 0x00000000 0x20000
26
38
{
27
39
.ANY (+RW, +ZI)
28
40
}
41
+ ARM_LIB_STACK 0x20000000+0x4000 EMPTY -Stack_Size { ; Stack region growing down
42
+ }
29
43
}
Original file line number Diff line number Diff line change 24
24
*/
25
25
26
26
#ifdef __STACK_SIZE
27
- .equ Stack_Size, __STACK_SIZE
27
+ .equ Stack_Size, __STACK_SIZE
28
28
#else
29
- .equ Stack_Size, 0x400
29
+ #if defined(MBED_CONF_RTOS_PRESENT)
30
+ .equ Stack_Size, 0x400
31
+ #else
32
+ .equ Stack_Size, 0x1000
33
+ #endif
30
34
#endif
31
35
.globl __StackTop
32
36
.globl __StackLimit
33
37
__StackLimit:
34
- .space Stack_Size
38
+ .globl Stack_Size
35
39
.size __StackLimit, . - __StackLimit
36
40
__StackTop:
37
41
.size __StackTop, . - __StackTop
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ SECTIONS
140
140
__end__ = .;
141
141
end = __end__;
142
142
KEEP(*(.heap*))
143
+ . = ORIGIN (RAM) + LENGTH (RAM) - Stack_Size;
143
144
__HeapLimit = .;
144
145
} > RAM
145
146
@@ -149,12 +150,13 @@ SECTIONS
149
150
.stack_dummy (COPY) :
150
151
{
151
152
KEEP(*(.stack*))
153
+ . += Stack_Size;
152
154
} > RAM
153
155
154
156
/* Set stack top to end of RAM, and stack limit move down by
155
157
* size of stack_dummy section */
156
158
__StackTop = ORIGIN (RAM) + LENGTH (RAM);
157
- __StackLimit = __StackTop - SIZEOF (.stack_dummy) ;
159
+ __StackLimit = __StackTop - Stack_Size ;
158
160
PROVIDE (__stack = __StackTop);
159
161
160
162
/* Check if data + heap + stack exceeds RAM limit */
Original file line number Diff line number Diff line change 1
1
#! armcc -E -I. --cpu Cortex-M4
2
+ #include "mbed_config.h"
2
3
;; TMPM46BF10 scatter file
3
4
4
5
;; Vector table starts at 0
14
15
15
16
;; Compatible with ISSM model
16
17
18
+ #if (defined(__stack_size__))
19
+ #define Stack_Size __stack_size__
20
+ #else
21
+ #if (defined(MBED_CONF_RTOS_PRESENT))
22
+ #define Stack_Size 0x0400
23
+ #else
24
+ #define Stack_Size 0x1000
25
+ #endif
26
+ #endif
27
+
17
28
#if !defined(MBED_APP_START)
18
29
#define MBED_APP_START 0x00000000
19
30
#endif
@@ -38,4 +49,7 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE ; load region size_region
38
49
tmpm46b_fc.o(+RO)
39
50
.ANY (+RW, +ZI)
40
51
}
52
+
53
+ ARM_LIB_STACK 0x200001E0+0x80000 EMPTY -Stack_Size { ; Stack region growing down
54
+ }
41
55
}
Original file line number Diff line number Diff line change 24
24
*/
25
25
26
26
#ifdef __STACK_SIZE
27
- .equ Stack_Size, __STACK_SIZE
27
+ .equ Stack_Size, __STACK_SIZE
28
28
#else
29
- .equ Stack_Size, 0x400
29
+ #if defined(MBED_CONF_RTOS_PRESENT)
30
+ .equ Stack_Size, 0x400
31
+ #else
32
+ .equ Stack_Size, 0x1000
33
+ #endif
30
34
#endif
31
35
.globl __StackTop
32
36
.globl __StackLimit
33
37
__StackLimit:
34
- .space Stack_Size
38
+ .globl Stack_Size
35
39
.size __StackLimit, . - __StackLimit
36
40
__StackTop:
37
41
.size __StackTop, . - __StackTop
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ SECTIONS
185
185
__end__ = .;
186
186
end = __end__;
187
187
KEEP(*(.heap*))
188
+ . = ORIGIN (RAM) + LENGTH (RAM) - Stack_Size;
188
189
__HeapLimit = .;
189
190
} > RAM
190
191
@@ -194,12 +195,13 @@ SECTIONS
194
195
.stack_dummy (COPY) :
195
196
{
196
197
KEEP(*(.stack*))
198
+ . += Stack_Size;
197
199
} > RAM
198
200
199
201
/* Set stack top to end of RAM, and stack limit move down by
200
202
* size of stack_dummy section */
201
203
__StackTop = ORIGIN (RAM) + LENGTH (RAM);
202
- __StackLimit = __StackTop - SIZEOF (.stack_dummy) ;
204
+ __StackLimit = __StackTop - Stack_Size ;
203
205
PROVIDE (__stack = __StackTop);
204
206
205
207
/* Check if data + heap + stack exceeds RAM limit */
Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ define symbol __ICFEDIT_region_RAM_end__ = 0x2006FFFF;
13
13
define symbol __ICFEDIT_region_BRAM_start__ = 0x20070000;
14
14
define symbol __ICFEDIT_region_BRAM_end__ = 0x200807FF;
15
15
/*-Sizes-*/
16
- /*Heap 1/4 of ram and stack 1/8*/
17
- define symbol __ICFEDIT_size_cstack__ = 0x10000;
16
+ define symbol __ICFEDIT_size_cstack__ = 0x400;
18
17
define symbol __ICFEDIT_size_heap__ = 0x20000;
19
18
/**** End of ICF editor section. ###ICF###*/
20
19
Original file line number Diff line number Diff line change 17
17
#ifndef MBED_MBED_RTX_H
18
18
#define MBED_MBED_RTX_H
19
19
20
- #if defined(TARGET_TMPM066 )
21
-
22
- #ifndef INITIAL_SP
23
- #define INITIAL_SP (0x20004000UL)
24
- #endif
25
-
26
- #endif
27
-
28
- #if defined(TARGET_TMPM46B )
29
-
30
- #ifndef INITIAL_SP
31
- #define INITIAL_SP (0x20080000UL)
32
- #endif
33
-
34
- #endif
35
-
36
- #if defined(TARGET_TMPM3H6 )
37
-
38
- #ifndef INITIAL_SP
39
- #define INITIAL_SP (0x20004000UL)
40
- #endif
41
-
42
- #endif
43
-
44
20
#endif // MBED_MBED_RTX_H
You can’t perform that action at this time.
0 commit comments