Skip to content

Commit aa2d49a

Browse files
linlingaoNaveen Kaje
authored andcommitted
Move BSS to SRAM2 to increase heap size on ST475 IOT board
1 parent 3d4582b commit aa2d49a

File tree

1 file changed

+3
-2
lines changed
  • targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/device/TOOLCHAIN_GCC_ARM

1 file changed

+3
-2
lines changed

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/device/TOOLCHAIN_GCC_ARM/STM32L475XX.ld

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ SECTIONS
152152
. = ALIGN(8);
153153
__bss_end__ = .;
154154
_ebss = .;
155-
} > SRAM1
155+
} > SRAM2
156156

157157
.heap (COPY):
158158
{
@@ -183,5 +183,6 @@ SECTIONS
183183
PROVIDE(__stack = __StackTop);
184184
/* Check if stack exceeds RAM2 limit */
185185
ASSERT((ORIGIN(SRAM2)+LENGTH(SRAM2)) >= __StackLimit, "SRAM2 overflow")
186-
186+
/* Check if bss exceeds __StackLimit */
187+
ASSERT(__bss_end__ <= __StackLimit, "BSS is too big for RAM2")
187188
}

0 commit comments

Comments
 (0)