Skip to content

Commit 61bbfa8

Browse files
Replace hard coded heap size value with calculation
1 parent 5ae786d commit 61bbfa8

File tree

2 files changed

+2
-2
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS

2 files changed

+2
-2
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC54114/device/TARGET_LPC54114_M4/TOOLCHAIN_ARM_STD/LPC54114J256_cm4.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
#if (defined(__heap_size__))
9494
#define Heap_Size __heap_size__
9595
#else
96-
#define Heap_Size 0x0400
96+
#define Heap_Size (m_data_size - Stack_Size - (AlignExpr(ImageLimit(RW_IRAM1), 16) - m_data_start))
9797
#endif
9898

9999
LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; load region size_region

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MCU_LPC546XX/device/TOOLCHAIN_ARM_STD/LPC54628J512.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
#if (defined(__heap_size__))
8686
#define Heap_Size __heap_size__
8787
#else
88-
#define Heap_Size 0x0400
88+
#define Heap_Size (m_data_size - Stack_Size - (AlignExpr(ImageLimit(RW_IRAM1), 16) - m_data_start))
8989
#endif
9090

9191
LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; load region size_region

0 commit comments

Comments
 (0)