add stack section for SRAM detection

This commit is contained in:
hathach committed 2017-06-29 12:44:47 +07:00
1 parent b0779f0ee8
commit 91085a5799
1 file changed
+9
+9
View File
@@ -156,6 +156,15 @@ SECTIONS
. = ALIGN(__StackLimit);
__HeapLimit = .;
} > RAM
/* .stack section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections */
.stack :
{
. = ALIGN(__StackLimit);
. = ALIGN(__StackTop);
} > RAM
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")