Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

[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?
 

KerimF

Advanced Member level 4
Joined
May 17, 2011
Messages
1,461
Helped
374
Reputation
756
Reaction score
370
Trophy points
1,363
Location
Syria
Activity points
12,314
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?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,959
Helped
14,145
Reputation
28,549
Reaction score
12,831
Trophy points
1,393
Location
Bochum, Germany
Activity points
278,225
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.
 

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
@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.
 

ckshivaram

Advanced Member level 5
Joined
Apr 21, 2008
Messages
5,070
Helped
2,149
Reputation
4,304
Reaction score
2,089
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,097
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...
 

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
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

Top