summaryrefslogtreecommitdiff
path: root/core/riscv-rv32i/ec.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'core/riscv-rv32i/ec.lds.S')
-rw-r--r--core/riscv-rv32i/ec.lds.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S
index 6efbe49f1f..31a7972fa2 100644
--- a/core/riscv-rv32i/ec.lds.S
+++ b/core/riscv-rv32i/ec.lds.S
@@ -303,12 +303,18 @@ SECTIONS
__ram_free = (CONFIG_RAM_BASE + CONFIG_RAM_SIZE) -
(__shared_mem_buf + CONFIG_SHAREDMEM_MINIMUM_SIZE);
+ /*
+ * __flash_used is used in flash free calculations by the makefile.
+ * __image_size is stored in the struct image_data header and used
+ * in hash calcuations.
+ */
#if defined(CHIP_FAMILY_IT8XXX2)
- __image_size = LOADADDR(.data) + SIZEOF(.data) + \
+ __flash_used = LOADADDR(.data) + SIZEOF(.data) + \
CHIP_ILM_BASE - FW_OFF(SECTION);
#else
- __image_size = LOADADDR(.data) + SIZEOF(.data) - FW_OFF(SECTION);
+ __flash_used = LOADADDR(.data) + SIZEOF(.data) - FW_OFF(SECTION);
#endif
+ __image_size = __flash_used;
#ifdef CONFIG_FLASH
/*