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

Initialisation of structures in external memory

I have a set of initialised data structures that are now located in external memory. The structures are each defined using
__attribute__((section("menu_structures"))).

A linker scatter file is used to locate this section to external memory.

RW_RAM1 0x81000000 0x00100000
{ menu.o(menu_structures)
}

This compiles and links without errors, but the structure elements are all initialised to 0. I have tried setting the 'Options for target' for this memory area to NoInit, and also to not selected. Both ways seem to leave the structure contents at 0.

Originally the structures were all by default in internal ram, and they were correctly initialised with non-zero values.

Can anyone help me as to why the structures are no longer initialised properly when located in external memory?

0