This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to write a scatter file that produce a ELF with multiple load regions that have a common physical address range

Hi,

I am using SEGGER Ozone for debugging and it has a requirement that the ELF contain program table elements that indicate which memory regions code reside in at runtime.

However, I need fromelf to produce a hex file that only contain the flash range where the code is stored.

So my scatter file has a single load region in flash where all the various RAM segments are defined, and the scatter loader then moves the code to the appropriate locations runtime.

In order to use Ozone to debug the code I have in RAM I have to use a custom linker script that define multiple load regions. But if I use fromelf on that to generate a combined hex file then the hex file also map the RAM code to the RAM address and that is not desired (the RAM code should still map to flash during programming).

SEGGER support suggest I write the linker script so that the RAM regions get a physical address in flash and a virtual address in RAM but I cannot figure out how to write a scatter file to produce this format in the ELF/AXF.

Does anybody have any suggestions for how I can use virtual addresses in the ELF program table from a scatter file?

I use arm compiler v6.

Best regards, Patrick