diff options
Diffstat (limited to 'core/cortex-m0/ec.lds.S')
-rw-r--r-- | core/cortex-m0/ec.lds.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S index bc461b90de..c5e66f9bcb 100644 --- a/core/cortex-m0/ec.lds.S +++ b/core/cortex-m0/ec.lds.S @@ -315,6 +315,12 @@ SECTIONS __flash_used = LOADADDR(.data) + SIZEOF(.data) - ORIGIN(FLASH); __image_size = __flash_used; +#if defined(SECTION_IS_RW) && (CONFIG_FLASH_WRITE_SIZE > 0) + /* Alignment is needed by flash_command_write() for RW update. */ + ASSERT(__image_size % CONFIG_FLASH_WRITE_SIZE == 0, + "Error: RW image is not aligned to CONFIG_FLASH_WRITE_SIZE") +#endif + #ifdef CONFIG_FLASH_CROS /* * These linker labels are just for analysis and not used in the code. |