Skip to content

Commit 0194135

Browse files
committed
[NUC472] Fix heap configuration error with armcc
In rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h, Image$$ARM_LIB_HEAP$$Base/Image$$ARM_LIB_HEAP$$Length will cause zero memory allocation. Fix it with Image$$ARM_LIB_HEAP$$ZI$$Base/Image$$ARM_LIB_HEAP$$ZI$$Length. This is to place heap at external SRAM.
1 parent 9111aa4 commit 0194135

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,12 @@ osThreadDef_t os_thread_def_main = {(os_pthread)pre_main, osPriorityNormal, 1U,
576576

577577
#elif defined(TARGET_NUMAKER_PFM_NUC472)
578578
# if defined(__CC_ARM)
579-
extern uint32_t Image$$ARM_LIB_HEAP$$Base[];
580-
extern uint32_t Image$$ARM_LIB_HEAP$$Length[];
579+
extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Base[];
580+
extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
581581
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
582582
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[];
583-
#define HEAP_START ((unsigned char*) Image$$ARM_LIB_HEAP$$Base)
584-
#define HEAP_SIZE ((uint32_t) Image$$ARM_LIB_HEAP$$Length)
583+
#define HEAP_START ((unsigned char*) Image$$ARM_LIB_HEAP$$ZI$$Base)
584+
#define HEAP_SIZE ((uint32_t) Image$$ARM_LIB_HEAP$$ZI$$Length)
585585
#define ISR_STACK_START ((unsigned char*)Image$$ARM_LIB_STACK$$ZI$$Base)
586586
#define ISR_STACK_SIZE ((uint32_t)Image$$ARM_LIB_STACK$$ZI$$Length)
587587
# elif defined(__GNUC__)

0 commit comments

Comments
 (0)