Skip to content

Commit b6ff439

Browse files
committed
[EFR32] Make RTX using ARMCC aware of reserved stack and heap
1 parent dc71c66 commit b6ff439

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

targets/TARGET_Silicon_Labs/mbed_rtx.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@
2323
#define OS_CLOCK REFERENCE_FREQUENCY
2424
#endif
2525

26+
#if defined(__CC_ARM)
27+
extern uint32_t HEAP$$Base;
28+
extern uint32_t HEAP$$Limit;
29+
extern uint32_t STACK$$Limit;
30+
extern uint32_t STACK$$Base;
31+
#ifndef INITIAL_SP
32+
#define INITIAL_SP ((uint32_t)&STACK$$Limit)
33+
#endif
34+
#define ISR_STACK_START ((uint32_t)&STACK$$Base)
35+
#define ISR_STACK_SIZE ((uint32_t) ((uint32_t)&STACK$$Limit - (uint32_t)&STACK$$Base))
36+
#define HEAP_START ((unsigned char*) ((uint32_t)&HEAP$$Base))
37+
#define HEAP_SIZE ((uint32_t) ((uint32_t)&HEAP$$Limit - (uint32_t)&HEAP$$Base))
38+
#endif
39+
2640
#if defined(TARGET_EFM32GG_STK3700)
2741

2842
#ifndef INITIAL_SP

0 commit comments

Comments
 (0)