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.
Hello,
I am working on a program where I need my variables to be placed sequentially in ram. How can I do this?
Currently I have them defined in the order that I wish for them to appear in the RAM, and for the most part this works. However, a few variables are scattered into other locations. I know this because I have checked their location using the Keil ULINK JTAG debugger.
Here is an example showing how I have my variables defined:
vars.c:
char MemStart; char Mem01; char Mem02[5]; char Mem03[10]; char Mem04[17]; char Mem05[15]; char Mem06; char Mem07[3]; char Mem08; char Mem09; ... char MemEnd;
MemStart is placed in address 0x400013FE, MemEnd in 0x4000149A;
And then: Mem01 0x400013FF --which seems correct Mem02 0x40001400 -- again, this seems correct Mem03 0x40001405 -- again, this is correct Mem04 0x40004C67 --- This is definitely not what I want!
Any ideas what I can do about this?
I am using the NXP2378 MCU, Keil uVision 3.51, RVMDK 3.05a.
Thanks! Eric