Hello,
I have a problem concerning explizit initialization of global variables. Every global variable which I define & declare in a c-File is not getting initialized to the desired value. Before copying them from flash to ram, all the variables are set to 0. After copying, they are filled with "1".
In the .map file I can see, that these variables are in the .data and .sdata sections so i guess something is wrong with my startup code.
I am using CW 10.2 and MPC5643L (Leopard). For initialization I use RAppID generated files.
My linker-file, startup-code and the copy-routine are attached.
Does anybody know this issue?
Any help would be appreciated.
Thanks in advance.
Original Attachment has been moved to: crt0_p0.s.zip
Original Attachment has been moved to: default5643L.lcf.zip
Original Attachment has been moved to: romcopy.inc.zip
Solved! Go to Solution.
Hello
You need to Create a ROM Image for your application.
This is done as follows:
Add the options -romaddr and -rambuffer with the start address of your flash area.
CrasyCat
Hello
You need to Create a ROM Image for your application.
This is done as follows:
Add the options -romaddr and -rambuffer with the start address of your flash area.
CrasyCat
Hello,
Thank you very much for your help. After a little trying I got it to work with your suggestion.
The thing is that I have to specify the internal flash adress in both fields (0x00002000 in my case).
Now it works like a charme!