diff --git a/chip/g/config_chip.h b/chip/g/config_chip.h index 50655d5e22..1818fbce60 100644 --- a/chip/g/config_chip.h +++ b/chip/g/config_chip.h @@ -25,6 +25,7 @@ #define CONFIG_PROGRAM_MEMORY_BASE 0x40000 #define CONFIG_FLASH_SIZE (512 * 1024) #define CONFIG_RO_HEAD_ROOM 1024 /* Room for ROM signature. */ +#define CONFIG_RW_HEAD_ROOM CONFIG_RO_HEAD_ROOM /* same for RW */ /* Memory-mapped internal flash */ #define CONFIG_INTERNAL_STORAGE diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 9fe53747b2..38a235d53f 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -66,6 +66,9 @@ SECTIONS .text : { #if defined(SECTION_IS_RO) && defined(CONFIG_RO_HEAD_ROOM) . = . + CONFIG_RO_HEAD_ROOM; +#endif +#if defined(SECTION_IS_RW) && defined(CONFIG_RW_HEAD_ROOM) + . = . + CONFIG_RW_HEAD_ROOM; #endif OUTDIR/core/CORE/init.o (.text.vecttable) . = ALIGN(4);