Hi Wang,
thank you :-).
The same principle applies as well to S32DS, as it uses the GNU linker as well. the only difference is that in the S32DS the memory sections are named differently.
I tried it quickly in the S32DS, and it worked fine (project attached).
in the linker file I have changed/added
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
/* PROVIDE_HIDDEN (__fini_array_end = .); */
} > FLASH_2
.fill :
{
FILL(0xDEADBEEF);
. = ORIGIN(FLASH_2) + LENGTH(FLASH_2) - 1;
BYTE(0xAA)
___ROM_AT = .;
PROVIDE_HIDDEN (__fini_array_end = .);
} > FLASH_2
I hope this helps,
Erich