diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-05-19 00:16:03 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2012-05-19 00:19:51 +0000 |
commit | 36107b54d45d9e79c09936a686661f8b83bc8708 (patch) | |
tree | 9a07fb03dc713bcac73d14ae460861317d21da4a /common/firmware_image.lds.S | |
parent | 9f39cd9fc3e02afbad53f653436dc31b9f1c85d5 (diff) | |
download | chrome-ec-36107b54d45d9e79c09936a686661f8b83bc8708.tar.gz |
Fix flash base in full image ELF
When the flash base address is non null (e.g. stm32), it's nice to have
the full ELF image (including the 3 copies) at the right address.
This doesn't change anything to the final .bin image but allow to load
directly the .obj with tools which handle ELF format.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=Flash ec.obj on a Snow board using the ST-Link JTAG over GDB.
Change-Id: I51a6d9c00b359c6204bd51b30ee7a4fec362d88e
Diffstat (limited to 'common/firmware_image.lds.S')
-rw-r--r-- | common/firmware_image.lds.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/firmware_image.lds.S b/common/firmware_image.lds.S index bfaaaee7f4..98bbb7cb62 100644 --- a/common/firmware_image.lds.S +++ b/common/firmware_image.lds.S @@ -14,23 +14,23 @@ MEMORY SECTIONS { . = ALIGN(CONFIG_FLASH_BANK_SIZE); - .image.RO : AT(CONFIG_FW_RO_OFF) { + .image.RO : AT(CONFIG_FLASH_BASE + CONFIG_FW_RO_OFF) { *(.image.RO) } > FLASH =0xff . = ALIGN(CONFIG_FLASH_BANK_SIZE); - .image.A : AT(CONFIG_FW_A_OFF) { + .image.A : AT(CONFIG_FLASH_BASE + CONFIG_FW_A_OFF) { *(.image.A) BYTE(0xEA) /* Mark end explicitly */ } > FLASH =0xff #ifndef CONFIG_NO_RW_B . = ALIGN(CONFIG_FLASH_BANK_SIZE); - .image.B : AT(CONFIG_FW_B_OFF) { + .image.B : AT(CONFIG_FLASH_BASE + CONFIG_FW_B_OFF) { *(.image.B) BYTE(0xEB) /* Mark end explicitly */ } > FLASH =0xff #endif /* NOTE: EC implementation reserves one bank for itself */ - .padding : AT(CONFIG_FLASH_SIZE - CONFIG_FLASH_BANK_SIZE - 1) { + .padding : AT(CONFIG_FLASH_BASE + CONFIG_FLASH_SIZE - CONFIG_FLASH_BANK_SIZE - 1) { BYTE(0xff); } > FLASH =0xff } |