Skip to content

Commit c85ca4d

Browse files
author
Deepika
committed
TARGET_RENESAS: _sbrk updated to use limits from linker files no need to set defines
1 parent a814078 commit c85ca4d

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

targets/TARGET_RENESAS/mbed_rtx.h

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,17 @@
2020

2121
#if defined(TARGET_RZ_A1H) || defined(TARGET_VK_RZ_A1H) || defined(TARGET_GR_LYCHEE)
2222

23-
#if defined(__CC_ARM)
24-
extern char Image$$ARM_LIB_STACK$$Base[];
25-
extern char Image$$ARM_LIB_STACK$$ZI$$Limit[];
26-
extern char Image$$ARM_LIB_HEAP$$Base[];
27-
#define ISR_STACK_START ((unsigned char*)Image$$ARM_LIB_STACK$$Base)
28-
#define ISR_STACK_SIZE ((uint32_t)((uint32_t)Image$$ARM_LIB_STACK$$ZI$$Limit - (uint32_t)Image$$ARM_LIB_STACK$$Base))
29-
#define INITIAL_SP (Image$$ARM_LIB_STACK$$ZI$$Limit)
30-
#define HEAP_START ((unsigned char*)Image$$ARM_LIB_HEAP$$Base)
31-
#define HEAP_SIZE ((uint32_t)((uint32_t)ISR_STACK_START - (uint32_t)HEAP_START))
23+
#if defined(__ARMCC_VERSION)
24+
extern uint32_t Image$$ARM_LIB_STACK$$Base[];
25+
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Limit[];
26+
extern uint32_t Image$$ARM_LIB_HEAP$$Base[];
27+
#define ISR_STACK_START Image$$ARM_LIB_STACK$$Base
28+
#define ISR_STACK_SIZE (uint32_t)(Image$$ARM_LIB_STACK$$ZI$$Limit - Image$$ARM_LIB_STACK$$Base)
29+
#define INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit
30+
#define HEAP_START Image$$ARM_LIB_HEAP$$Base
31+
#define HEAP_SIZE (uint32_t)(ISR_STACK_START - HEAP_START)
3232
#elif defined(__GNUC__)
33-
extern uint32_t __StackTop;
34-
extern uint32_t __StackLimit;
35-
extern uint32_t __end__;
36-
#define ISR_STACK_START ((unsigned char*)&__StackLimit)
37-
#define ISR_STACK_SIZE ((uint32_t)((uint32_t)&__StackTop - (uint32_t)&__StackLimit))
3833
#define INITIAL_SP (&__StackTop)
39-
#define HEAP_START ((unsigned char*)&__end__)
40-
#define HEAP_SIZE ((uint32_t)((uint32_t)ISR_STACK_START - (uint32_t)HEAP_START))
4134
#elif defined(__ICCARM__)
4235
/* No region declarations needed */
4336
#else

0 commit comments

Comments
 (0)