Skip to content

Commit cb72db2

Browse files
committed
fixed wrong __StackTop calculation
StackTop calculation was not adjusted when ram size was increased by using al 3 ram regions. This caused memory allocation failures althogh enough free heap was reported
1 parent 1c201b4 commit cb72db2

File tree

1 file changed

+1
-1
lines changed
  • targets/TARGET_NXP/TARGET_LPC15XX/device/TOOLCHAIN_GCC_ARM

1 file changed

+1
-1
lines changed

targets/TARGET_NXP/TARGET_LPC15XX/device/TOOLCHAIN_GCC_ARM/LPC1549.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ SECTIONS
145145

146146
/* Set stack top to end of RAM, and stack limit move down by
147147
* size of stack_dummy section */
148-
__StackTop = ORIGIN(Ram0_16) + LENGTH(Ram0_16);
148+
__StackTop = ORIGIN(Ram0_16) + LENGTH(Ram0_16) + LENGTH(Ram1_16) + LENGTH(Ram2_4);
149149
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
150150
PROVIDE(__stack = __StackTop);
151151

0 commit comments

Comments
 (0)