We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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?
I am not ure that I can place my structures into the initial zero initialised section, since my structures contains non-zero values. If I attempt to do this then the compiler gives an error "variable may not be initialised".