Hi! I'm using Philips P89v51RD2FBC microcontroller. I build my project using Keil version 2.0. After compilation, total memory utillization is: Data: 155.2, Xdata: 327, Const: 2062, Code: 23176
Eventhough there is a free memory space in Data as well as in Xdata(MCU XRAM) memory, still I'm facing problems in accessing variables declared as "far" in MCU XRAM. i.e. the value of these variables get corrupted.
So, kindly help me in solving this problem.
Regards, Kshama.
Why are you declaring them as FAR?
So, how do I declare them? the variables in MCU XRAM are needed to be declared as FAR.
Kshama
What makes you say that??
http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm
Do you have any idea how to declare these variables? kindly guide me in this matter.
You didn't read that link, did you?
That is what tells you what you need to know!
The only thing to beware of is if your chip requires any specific configuration to enable the XRAM; eg, writing to some SFR(s). If it does, then you need to add that manually in your startup code - the tools will not do this for you automatically!
For details of the startup code, see: http://www.keil.com/support/man/docs/c51/c51_ap_startup.htm
You really need to spend some time familiarising yourself with the manuals...
Thank you for your reply. I visited the link you have sent.
At present, I have added startup.a51 file in my project and I'm using NXP P89v51RD2FBC microcontroller. So could you please tell me is it an appropriate file?
you are trying to run before you know how to walk, you are trying to walk before you have learned to crawl. this is a surefire way to break a leg.
WORK THROUGH (I did NOT say 'read') the "Keil getting started guide" and then come back with the questions you may have then.
Erik
View all questions in Keil forum