|
20 | 20 |
|
21 | 21 | #if defined(TARGET_RZ_A1H) || defined(TARGET_VK_RZ_A1H) || defined(TARGET_GR_LYCHEE)
|
22 | 22 |
|
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) |
32 | 32 | #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)) |
38 | 33 | #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)) |
41 | 34 | #elif defined(__ICCARM__)
|
42 | 35 | /* No region declarations needed */
|
43 | 36 | #else
|
|
0 commit comments