Help with ARMCC 5/6 scatter file for executing bare metal app without debugger


I try to build a bare metal app for the Arria V SoC devkit that will be loaded by the preloader and executed from RAM.

I use the DS5 built-in ARMCC 5/6 (paid subscription) on windows.

My problem is that when I use a debugger with the built ELF everything works fine but if I use the mkimage and flash the resulted .bin , its not loaded by the preloader

on the devkit.

I looked for examples everywhere and asked on Intel forums. I didn't find any relevant guides/examples. All of them address the GNU toolchain or describe how to use the ARMCC only to load the ELF with the debugger.

On intel support forum they answered that they are not support armcc 5 and asked me to use the GNU toolchain (answered privatly)

this is the thread: 

When I looked at the GNU examples linker script, I saw they took in consideration extra space for the mkimage header in the resulting .bin . They didn't do that in any of the ARMM CC examples.

I think it may cause my problem (but I'm not sure).

So, I need help with a suitable scatter file that takes in consideration the vectors table, app stack and heap, mkimage header in will allow the resulting mkimage .bin to be loaded to the RAM by the preloader.

Right now I kinda stuck with a paid tool without the ability to execute bare metal app from RAM.