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've got a project that I'm trying to move to the latest MDK-ARM from older tools. I've created a scatter-loading file that describes my memory layout, but I can;'t figure out how to move my read-write data from flash into RAM. Everything I've tried points only to the "execute" address, I can't seem to determine the "load" address.
Any help? Thanks Dan
I don't have any examples available since I'm sitting at home (almost midnight now).
But before main() is called, the runtime library will decompress any initialized data and copy to RAM and any non-initialized data will be zero-filled.
You can't see it in the startup file. Much of the magic happens in the call __main.
In the scatter file, you normally have a RW_IRAMx block inside a LR_IROMx block which will tell the linker the start address of the RAM, and that the compressed data for the rw variables should be stored in that flash. The startup code will then look at the +RW segments to figure out how to data to initialize, and the +ZI segments to figure out how much RAM to clear.