This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set external memory for Dallas 390

I set the following target options:

0x0000:0xfc00 ROM,0xfc00:0x100 RAM,0x10000:0x20000 ROM,0x30000:0x4c380 RAM

I want to use the 0xfc00:0x100 area for my hardware interface.what can I do?The following code results in linker error

#define ATAPI_INTERFACE_BASE_ADDR 0XFC00
unsigned char xdata atapi[0x100] _at_ ATAPI_INTERFACE_BASE_ADDR;
void main(void)
{
......
}

*** ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: XDATA
SEGMENT: _XDATA_GROUP_
LENGTH: 00041DH

But when I delete the target options0xfc00:0x100 RAM,the linker error doesn't exist,and the the pointer atapi equal 0x3fc00.It look like that the compiler add the right most byte 0x3xxxx to atapi,0x30000+0xfc00=0x3fc00.
I found that the following statement doesn't do what I want.
*((unsigned char xdata *)ATAPI_INTERFACE_BASE_ADDR) = 0x00;
I want to access memory unit 0xfc00,but it acess 0x3fc00.
Can I access any xdata merroy in 0x00-0xffff when there is another target options 0x30000:0x4c380 RAM ?