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

Declaring EDATA in C-source?

I am using a Philips 89C662 (with 768 bytes ERAM) and 32kByte XRAM.
I would like to declare variables (globals and/or locals) in XRAM and and others in ERAM.
Something like:

idata  int  g_ivar;
edata  char g_evar[] = "Global in ERAM";

void
function_one(void)
  {
   data   int  dvar1, dvar2;  // 2 variables in internal ram
   xdata  int  xvar1, xvar2;  // 2 variables in off-chip xram
   edata  int  evar1, evar2;  // 2 variables in on-chip eram

   dvar1 = xvar2 * evar1;
   .....
  }
Is this possible with Keil's C-compiler?
I did not find it in the manuals.