region_defs.h file for Musca board includes following defines which used in the scatter files.
#define S_ROM_ALIAS(x) (S_SRAM_ALIAS_BASE+ x)
#define NS_ROM_ALIAS(x) (NS_SRAM_ALIAS_BASE+ x)
Offset values are "SRAM" offset values while these macro's need to return "ROM" offsets.
Due to this problem, linker locates the TF-m image in the wrong range which is not also supported by the Flash programming algorithm.
We assume, it must be fixed as below:
#define S_ROM_ALIAS(x) (S_ROM_ALIAS_BASE + x)
#define NS_ROM_ALIAS(x) (NS_ROM_ALIAS_BASE + x)