Iam using keil version-2 compiler, AT809c51Rd2 microcontroller.
Iam using both ".C" and ".asm" files in my project. I wrote my program by considering small memory model in both assembly and c files.
Now iam facing "Address space overflow" error. As per my understanding RAM area is not having enough space to fit all my data variables.
I tried by changing memory model from SMALL to LARGE and compiled.Now my assembly files wont support this memory model(because of indirect addressing). If this is the case, whether i must do modifications in assembly file? or please sujjest me if any alternative is there?
Is it possible by keeping mine as SMALL memory model and to shift Stack to extended RAM.
Do your assembly code need to access all variables? If not, move just some variables. You don't need to switch memory model - you can tag individual variables with the memory area you want them in.
Does your assembly code make use of variable overlaying ? Variables whose lifetimes do not overlap can share the same memory location.
"Now iam facing 'Address space overflow' error. As per my understanding RAM area is not having enough space to fit all my data variables."
The message tells you specifically which address space has overflowed - are you sure it's data rather than code?
are you using the rtos?
are the variables preserved in a code switch?
"are you using the rtos?"
What RTOS?
what what rtos?
the one he might be using?
OK - you said, "the RTOS" as if you knew specifically which one he might be using.
I guess that was just a problem with the translation into English?
...translation into english?
yes that must be it?
he still does not say if he uses rtos?
will he answer for us to see?
You said: "...Now I am facing "Address space overflow" error. As per my understanding RAM area is not having enough space to fit all my data variables."
Please post the original full error message.
It should look something like this:
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: _DATA_GROUP_ LENGTH: 0014H
If you are receiving this error for the DATA space, you need to follow the instructions in this KB article:
http://www.keil.com/support/docs/1241.htm
Instead of changing the memory model, move some of your data variables to XDATA. Use the XDATA keyword when you define your global variable, or use the XDATA linker directive. See:
http://www.keil.com/support/man/docs/bl51/bl51_xdata.htm
Also under project -> Options for Target -> 'Target' tab, do you have 'Operating System' set to 'None'?
Instead of changing the memory model, move some of your data variables to XDATA. Use the XDATA keyword when you define your global variable, or use the XDATA linker directive. IDATA would be far better if he has room there. ALso many boards do not have XDATA
Erik
Hello Erik,
You said: IDATA would be far better if he has room there.
I agree, I should have been more clear that IDATA was an option as well.
Either XDATA or IDATA would work; it comes down to Raju's hardware implementation.
I wanted to make sure Raju saw the Keil documentation pertaining to his overflow issue.
thanx kevin... i declared some of the global variables as Xdata... now i can able to compile properly..
Thanx to all for ur support...