Skip to content

Commit 91085a5

Browse files
committed
add stack section for SRAM detection
1 parent b0779f0 commit 91085a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cores/nRF5/nrf5x_common.ld

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ SECTIONS
156156
. = ALIGN(__StackLimit);
157157
__HeapLimit = .;
158158
} > RAM
159+
160+
161+
/* .stack section doesn't contains any symbols. It is only
162+
* used for linker to calculate size of stack sections */
163+
.stack :
164+
{
165+
. = ALIGN(__StackLimit);
166+
. = ALIGN(__StackTop);
167+
} > RAM
159168

160169
/* Check if data + heap + stack exceeds RAM limit */
161170
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")

0 commit comments

Comments
 (0)