Hello,
Working with the Arm Development Studio I build an image to ARM CORTEX-M55.
I have a simple scatter file with RO ZI RW,When uploading the AXF to the target the RW variables that should be initialized (global variables) are NOT initialized with the proper values.
When looking at the load address on the target (cortex M-55) for a global variable i do NOT see the correct value on the target, so when running target I also do not see the correct value in the execution address of the variable.
I can see that scatter copy is done but not with the correct value.
I can see in the .AXF file that the initial value exits.
Thanks
Ethan
Hi EthanMy name is Stephen and I work at Arm.Sorry, I can't immediately explain the case of the problem you are seeing.If you can see the initial values of RW variables in the .axf file correctly, but not in the target memory (load address) after the .axf file has been uploaded, then there must be some problem with the upload process or with your target's memory.Are you loading into RAM or Flash on the target? Which debug adapter are you using, e.g. DSTREAM or ULinkPro? Which compiler are you using, e.g. Arm Compiler 6 or GCC? Do any of the code/data regions overlap? Feel free to share your scatter-file.Have you tried the ready-made "Cortex-M55" project that is supplied in the Arm DS Examples?For larger projects, the AC6 linker (armlink) compresses RW data by default to help reduce ROM/Flash size.developer.arm.com/.../Optimization-with-RW-data-compressionFrom what you have written, I don't think this is the cause of the problem, but you could try turning off data compression with "--datacompressor off".Stephen
Hi Stephen,
Thank you for your reply,
When loading the file as a .bin (doing fromelf) I can see that values are correct in the target for load address and execution.
This is the scatter file i am using
#include "region_defs.h" LR_CODE S_CODE_START { ER_CODE S_CODE_START { *.o (RESET +First) *(+RO) } ER_CODE_CMSE_VENEER +0 ALIGN 32 { *(Veneer$$CMSE) } ER_CODE_CMSE_VENEER_DUMMY +0 ALIGN 32 EMPTY 0 {} CODE_WATERMARK +0 EMPTY 0x0 { } ScatterAssert(ImageLimit(CODE_WATERMARK) <= S_CODE_START + S_CODE_SIZE) ER_DATA_S_RW S_DATA_START { *(+RW) } ER_DATA_ZI imageLimit(ER_DATA_S_RW) { *(+ZI) } #if HEAP_SIZE > 0 ARM_LIB_HEAP +0 ALIGN 8 EMPTY HEAP_SIZE { ; Reserve empty region for heap } #endif ARM_LIB_STACK +0 ALIGN 32 EMPTY STACK_SIZE { ; Reserve empty region for stack } SRAM_WATERMARK +0 EMPTY 0x0 { } ScatterAssert(ImageLimit(SRAM_WATERMARK) <= S_DATA_START + S_DATA_SIZE) }
Hi again EthanThe .axf file generated by AC6 is in industry-standard ELF format (possibly containing DWARF debug information).If a plain .bin is being loaded correctly, but the .axf is not, that would point to the ELF format not being handled correctly by the debug adapter (or by the software interface between debugger and debug adapter), which seems unlikely.Your scatter-file looks OK to me - a single load region containing a few load regions.As an experiment, maybe you can try a loading a small "Hello World" program with a simple scatter-file. Does this smaller/simpler ELF image load correctly?Stephen
Did the following
Downloaded the Ozone debugger, now AXF is loaded correctly so something is wrong when working with eclipse gdb and the gdb server,
Thanks for you support!