This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: initialization of a .data-section of a relocatable output module when using copy_in with different run- and load-adresses

Part Number: MCU-PLUS-SDK-AM243X

Hello,

we are loading some sw-parts dynamically via the copy-tables from the linker TABLE-operator. For this we use copy_in. It works nice so far but I noticed that all the .data-section is not initialized at all. it's just all 0xAAAAAAAA. Also I need to mention that the copied-in .data-sections are the .data-sections of a previous created relocatable output module.

The final linking for this uses the ram_model-option and the relocatable output module itself does not use any of the ram/rom_model-options when partial linking, since the manual recommends to not use it.

So I am not sure whether the problem is the initialization after copy_in or the initialization of the .data-section in the relocatable output module beforehand.

I noticed that even in the load-address the data is already 0xAAAAAAAA. so it seems the relocatable module already initialized it with those values? Is there a way to prevent this?

Edit: I may add that most of the symbols in the relocatable output modules are hidden via --make_static. Does this affect the initialization of those variables?

The data must be initialized at least with their default values, else the application crashes.

Compiler is LTS 2.1.2

Best regards

Felix

  • small update:

    to localize the problem, I also placed the .data-section of the relocatable output-module inside the RAM directly with the same run- and load-address, not via a separate load-address. And here the .data-section-content is filled correctly. So the relocatable-output-module already does initialize the .data-section as it should be.

    How can I now ensure that this is also the case when I place it at a different load-address?

    Best regards

    Felix

  • well ok.

    After rebuilding the whole sdk and our whole project it somehow works now. I really don't know why, but it seems to be resolved magically.

    best regards

    Felix