Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] *** ERROR L107: ADDRESS SPACE OVERFLOW in 8051

Status
Not open for further replies.

scorrpeio

Full Member level 5
Joined
Dec 26, 2006
Messages
286
Helped
10
Reputation
20
Reaction score
9
Trophy points
1,298
Activity points
3,496
Hello,

I am working on 89V51RD2 where I declared 2 char Buf of 32 bytes each. Further there are few char variables like BufIndex.
This code works fine. But when I declare one more char Buf of 32 bytes, I get following error during linking...

Code:
*** ERROR L107: ADDRESS SPACE OVERFLOW
    SPACE:   DATA    
    SEGMENT: _DATA_GROUP_

I have searched for this on keil website also. But, could not get the solution.
I suppose as 89V51RD2 has 1kb data ram, the memory should not be full with just three char bufs.
Can anyone tell me, how to overcome this hurdle?
 

I always write my firmware in assembly. There are 128 direct RAM, 128 indirect RAM and 768 extended RAM (as if it is external though in the MCU)
The first 128 RAM bytes consist of:
8 * 4 = 32 bytes as bank registers
16 bytes as bit addressable registers
so the remained general registers are : 128 - 32 - 16 = 80 Bytes
Do you think this can explain why 64 bytes are accepted while 96 bytes return an error?
 
The error message indicates, that the data space is overflowing, which refers to the lowest 128 bytes. I suggest to learn about the idata and xdata storage qualifiers provided by the Keil compiler. The memory space above 0x100 has to acessed as xdata.
 
@KerimF and FvM

Thank you for the invaluable information.

I will read about xdata first and then try to implement by my own.

in case any problem, I will come back on this thread.
 

you can better optimize your code a little by reducing the number of variables stored..... if you use array which will not change in the program execution and any constants then put it in code memory.... that should solve your problem...

---------- Post added at 10:24 ---------- Previous post was at 10:22 ----------

The message also told you which particular address space has overflowed, and which module caused the overflow - it might not be a code space overflow...
 
The issue seems to be resolved.
I just made one of the buffer as idata and it worked.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top