HI all, I am working on a project based on Electronic lockers using 89V51RD2 microcontroller. and keil for programming. but when i try to compile i am getting an error
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?SAS_USING_89V51RD2 LENGTH: 006BH Program Size: data=160.1 xdata=0 code=9272 Target not created
As per the datasheet of controller i am using, it contains the 1-KB of data ram and 64-KB of Flash memory. so why i am getting this error in keil while i am trying to build it... please give me an solution to this. thanks...
The chip does not have 1kB of DATA RAM, because a 8051 chip can only address 128+128 byte of DATA RAM, unless the chip has some banking support.
Your chip has 256 bytes of DATA RAM of which 128 bytes can be directly accessed and 128 bytes only indirectly accessed. It also has 768 bytes of XDATA RAM.
Spend some time with §7.1 in the datasheet. It clearly draws a diagram of 768 bytes of "EXPANDED RAM", and also indicates that you need to use MOVX to access it, i.e. the 768 bytes are accessible as XDATA.
But you would already know this if you had spent some time looking closer at the 8051 architecture before writing your post.
Since the processor can only directly access 128 bytes of DATA, it isn't good with a printout indicating 160.1 bytes. So it's time to figure out what to store in XDATA - just that all accesses to XDATA is much more expensive so you want to store data that is seldom accessed there.
Note that "DATA" (uppercase) here is being used in the specific sense of Keil's DATA Memory Area - which is not the same thing as the generic English word, "data" (lowercase).
As already noted, you need to study the 8051 documentation about the different memory areas.
You also need to study Keil's documentation on how they have implemented it as extensions to the standard 'C' programming language:
http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm
http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm