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

far type memory support in C51 using xbanking.a51

Hi All,

I have problem with far type.

I have the following code.

Each function contains xdata of 64K. when I replaced xdata with far

the linker generated the following error



Build target 'Banking Demo'

compiling main.c...

MAIN.C(40): error C249: 'FDATA': SEGMENT TOO LARGE

Target not created





I have included XBANKING.A51



void fun();
void fun1();
void fun2();
void fun3();

void main()
{
	fun();
	while(1);
}

void fun()
{
	fun1();
	fun2();
	fun3();
}




void fun1()
{
	unsigned char xdata arr[0xFFFF];
	unsigned int i;
	for(i =0; i<0xFFFF; i++)
	{
	 	arr[i] = 0;
	}
}

void fun2()
{
	unsigned char xdata arr[0xFFFF];
	unsigned int i;
	for(i =0; i<0xFFFF; i++)
	{
	 	arr[i] = 0;
	}
}

void fun3()
{
	unsigned char xdata arr[0xFFFF];
	unsigned int i;
	for(i =0; i<0xFFFF; i++)
	{
	 	arr[i] = 0;
	}
}

0