summaryrefslogtreecommitdiff
path: root/core/cortex-m/ec.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m/ec.lds.S')
-rw-r--r--core/cortex-m/ec.lds.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 25ce2ef221..b6882d7214 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -348,6 +348,10 @@ SECTIONS
/* NOTHING MAY GO AFTER THIS! */
} > IRAM
+ ASSERT((__shared_mem_buf + CONFIG_SHAREDMEM_MINIMUM_SIZE) <=
+ (CONFIG_RAM_BASE + CONFIG_RAM_SIZE),
+ "Not enough space for shared memory.")
+
/* The linker won't notice if the .data section is too big to fit,
* apparently because we're sending it into IRAM, not FLASH. The following
* symbol isn't used by the code, but running "objdump -t *.elf | grep hey"