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.
Hi
I write a C program in uvision3. I have a global vriable "byte xdata *MemoryArea = (byte *)0x8000" and I define it in "flashdata.c". I have a function that use "MemoryArea". This function define in "mmngr.c". In this function there is a local variable "byte * tmp" and tmp = MemoryArea; When I run this program tmp get value "X:0x0c84" ??? why??? I want tmp get value "X:0x8000". Whatis problem?
When "byte xdata *MemoryArea = (byte *)0x8000" is define in "mmngr.c" all thing is true and tmp get value "X:0x8000".
My Microcontroller is "Sle66c360pe"
what is problem that anybody don't reply to me? whether my question is ambiguous ???
This is a discussion forum - it is not a consultancy service!
Do you really expect to receive free consultancy in under 2 hours?!
But yes, your post is hard to follow.
Why don't you just post the smallest complete code sample that illustrates your problem?
Be sure to follow the instructions for posting code: http://www.keil.com/forum/tips.asp
Be sure that your code compiles without errors or warning.
Explain what you expect the code to do, and what actually happens, and what steps you have taken to explain the difference.
eg, have you tried it in the simulator?
what is problem that anybody don't reply to me?
It's called "sleep". Most people do it for a good part of the day. And then there's this other phenomenon, called a "day job", which keeps people off their private internet connections for almost longer than "sleep" ;-)
BTW, is it just me, or does there appear to be a considerable anisotropy in the distribution of timezones of people doing the asking, and those doing the answering in this forum?
As to your question: one rather likely cause for that that problem is incorrect treatment of declaration vs. definition of global variables.
"sleep" .... do it for a good part of the day. "day job"
Not a good combination according to my employer :)
Erik
... "day job", "endless computer nights", "please answer me right now". These are definitely antagonic activities.
Some of us must balance the heavy load of a few concurrent projects in our 'day jobs', the research that said 'day jobs' require in the 'home lab', and a few hours of forum thread follow-up in the meantime.
"anisotropy of timezones" That is an interesting geographic effect indeed.