diff options
author | Keith Short <keithshort@chromium.org> | 2020-07-28 19:54:03 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-05 19:58:53 +0000 |
commit | ffada375c6362de2f80255d6abb8bad35ccc8c0d (patch) | |
tree | 311c704e10d5fab0a2ed8d390b895de2c69e0a86 /core/cortex-m0/ec.lds.S | |
parent | ac65404faa5e8d146e30606aafd18b1db379061a (diff) | |
download | chrome-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-m0/ec.lds.S')
-rw-r--r-- | core/cortex-m0/ec.lds.S | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S index ca2984bd0f..bfcbaecc18 100644 --- a/core/cortex-m0/ec.lds.S +++ b/core/cortex-m0/ec.lds.S @@ -300,6 +300,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 + ASSERT((FW_SIZE(SECTION) #if defined(CONFIG_RWSIG) && defined(SECTION_IS_RO) - CONFIG_RO_PUBKEY_SIZE |