summaryrefslogtreecommitdiff
path: root/core/cortex-m/ec.lds.S
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2020-07-28 19:54:03 -0600
committerCommit Bot <commit-bot@chromium.org>2020-08-05 19:58:53 +0000
commitffada375c6362de2f80255d6abb8bad35ccc8c0d (patch)
tree311c704e10d5fab0a2ed8d390b895de2c69e0a86 /core/cortex-m/ec.lds.S
parentac65404faa5e8d146e30606aafd18b1db379061a (diff)
downloadchrome-ec-ffada375c6362de2f80255d6abb8bad35ccc8c0d.tar.gz
linker: Add flash sizes as linker defined labels
Add linker defined labels for the configured flash sizes. This is only used for image analysis. BUG=none BRANCH=none TEST=make buildall TEST=To see the labels run "nm -n build/<board>/RW/ec.RW.elf | grep __config" Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib4db8478b19a8d93776c68fa24ee31fb21a50a24 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2325765 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core/cortex-m/ec.lds.S')
-rw-r--r--core/cortex-m/ec.lds.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 4b6bd04a48..27d71946e5 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -422,6 +422,17 @@ SECTIONS
*/
__hey_flash_used = LOADADDR(.data) + SIZEOF(.data) - FW_OFF(SECTION);
+#ifdef CONFIG_FLASH
+ /*
+ * These linker labels are just for analysis and not used in the code.
+ */
+ __config_flash_size = CONFIG_FLASH_SIZE;
+ __config_ro_size = CONFIG_RO_SIZE;
+ __config_ec_protected_storage_size = CONFIG_EC_PROTECTED_STORAGE_SIZE;
+ __config_rw_size = CONFIG_RW_SIZE;
+ __config_ec_writable_storage_size = CONFIG_EC_WRITABLE_STORAGE_SIZE;
+#endif
+
#ifdef CONFIG_FLASH_PHYSICAL
ASSERT((FW_SIZE(SECTION)
#if defined(CONFIG_RWSIG) && defined(SECTION_IS_RO)