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
My problem is that SEGGER who provide the Ozone tool that works with their debuggers claim that the ELFs need to have multiple load regions for the software to identify where code reside.I have argued that we need one load region since we export the ELF to a Intel HEX file that we flash which need to contain all code (be it in ROM or RAM). The ELF contain headers that describe the code segments that will be scatter loaded into RAM but Ozone does not acknowledge these.
So I have to use two linker scripts so I get one ELF with multiple load regions that Ozone use and one with a single load region which is converted to hex.
SEGGER support suggests it would be possible to use a ELF with multiple load regions where the regions have a virtual address different from the physical address which I support could work for exporting to a valid HEX. But I cannot find how to write a scatter file that can produce this format.
Could you share the scatter file you are using? To share privately with Arm, please raise a support case from the menu above.
I have raised a support case. Thanks for the suggestion.