summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortim <tim2.lin@ite.corp-partner.google.com>2019-11-20 16:04:17 +0800
committerCommit Bot <commit-bot@chromium.org>2019-11-22 11:22:04 +0000
commitf4e7f8be8f9ddccd6da1be7e630b3002bbad4292 (patch)
treec40c5077d4ee87b215e7bd971f154e94d841eb87
parent85b276f5158a544229073f24834147bb2ae5ebb8 (diff)
downloadchrome-ec-f4e7f8be8f9ddccd6da1be7e630b3002bbad4292.tar.gz
core/nds32 and riscv-rv32i/ec.lds.S: no assert if section is not present
When the h2ram section is not present, we don't need the assert to check the space whether enough or not. BUG=none BRANCH=none TEST=No error when we don't define configration of CONFIG_HOSTCMD_x86 or CONFIG_H2RAM_SIZE. Change-Id: Id5d0e674f65cfdb220bc996c597740390000d861 Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868132 Reviewed-by: Jett Rink <jettrink@chromium.org>
-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/ : {