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