summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/nds32/ec.lds.S3
-rw-r--r--core/riscv-rv32i/ec.lds.S3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index 4014aaaaaa..f5e2882222 100644
--- a/core/nds32/ec.lds.S
+++ b/core/nds32/ec.lds.S
@@ -253,9 +253,10 @@ SECTIONS
#endif
__h2ram_end = .;
} > H2RAM
-#endif
+
ASSERT((__h2ram_end) <= (CONFIG_H2RAM_BASE + CONFIG_H2RAM_SIZE),
"Not enough space for h2ram section.")
+#endif
#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : {
diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S
index 683e8f3e3c..53e6b99599 100644
--- a/core/riscv-rv32i/ec.lds.S
+++ b/core/riscv-rv32i/ec.lds.S
@@ -255,9 +255,10 @@ SECTIONS
#endif
__h2ram_end = .;
} > H2RAM
-#endif
+
ASSERT((__h2ram_end) <= (CONFIG_H2RAM_BASE + CONFIG_H2RAM_SIZE),
"Not enough space for h2ram section.")
+#endif
#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : {