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

__scatterload_copy from arm c library

Hi,

I'm using Arm DS Version: 2022.2 as a trial version.

I've no arm chip yet thus i'm using Cortex-M55 FVP.

I'm trying to write kind of a boot rom sw that runs and load another 'hello world' application into code and data to different execution addresses in memory.

After boot rom ends with loading the code and data into memory it jumps into the 'hello world' Reset_Handler address and starts execution.

So far so good, the 'hello world' begin to run but I've noticed that the "__scatterload_copy" from arm c library is overwriting the RW data section with default pattern of 0xDFDFDFCF.

As a result a "SystemCoreClock" variable from "system_ARMCM55.c" initial value is being overwritten from "0x17D7840" into 0xDFDFDFCF and code based on this variable isn't working as expected..

I would be happy to understand how to avoid the "__scatterload_copy" operation in order not to overwrite the data the boot rom already loaded into data memory?

Thanks,
Ronen

Parents
  • Hello Ronen,

    Are 'boot rom' and 'hello world' built as two separate applications? Is it the scatterload of helloworld over-writing the clock as set in bootrom? It is likely that you simply need to edit the scatterloading file of the helloworld application such that it does not go near the RW section of the bootrom code.

    It is likely that this is an over simplification. Perhaps if you could share a concrete example? If you wish to share with Arm privately, please raise a support case from the support menu above (referencing this thread).

    Regards, Ronan

Reply
  • Hello Ronen,

    Are 'boot rom' and 'hello world' built as two separate applications? Is it the scatterload of helloworld over-writing the clock as set in bootrom? It is likely that you simply need to edit the scatterloading file of the helloworld application such that it does not go near the RW section of the bootrom code.

    It is likely that this is an over simplification. Perhaps if you could share a concrete example? If you wish to share with Arm privately, please raise a support case from the support menu above (referencing this thread).

    Regards, Ronan

Children