scripts: make code relocation work for non-XIP system

on non-XIP system, loading address shouldn't be located on
FLASH memory region.

Fixes: #16090.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
Wentong Wu 2019-05-14 01:04:06 +08:00 committed by Anas Nashif
commit c8f43b9c25

View file

@ -39,7 +39,13 @@ SECTION_LOAD_MEMORY_SEQ = """
__{0}_{1}_rom_start = LOADADDR(_{2}_{3}_SECTION_NAME);
"""
LOAD_ADDRESS_LOCATION_FLASH = "GROUP_DATA_LINK_IN({0}, FLASH)"
LOAD_ADDRESS_LOCATION_FLASH = """
#ifdef CONFIG_XIP
GROUP_DATA_LINK_IN({0}, FLASH)
#else
GROUP_DATA_LINK_IN({0}, {0})
#endif
"""
LOAD_ADDRESS_LOCATION_BSS = "GROUP_LINK_IN({0})"
MPU_RO_REGION_START = """