From 91085a5799dc80fce5b0073f6da54385771834ba Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 29 Jun 2017 12:44:47 +0700 Subject: [PATCH] add stack section for SRAM detection --- cores/nRF5/nrf5x_common.ld | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cores/nRF5/nrf5x_common.ld b/cores/nRF5/nrf5x_common.ld index 7c273ede..5c9077b1 100755 --- a/cores/nRF5/nrf5x_common.ld +++ b/cores/nRF5/nrf5x_common.ld @@ -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")