Hi,
To assign a variable to a specific addresses, I tried using the '@' directive as given below:
int glob @0x0500 = 10;
This gives a compiler error which says:
"Expected ; instead of '@' ".
I tried with the C99 & GCC extensions enabled in c/C++ Language settings tab. This did not help.
Any solutions?
Thanks,
Chen
Solved! Go to Solution.
This thread really has nothing to do with MQX
Firstly, you should define the varible as global i.e. outside your code body in the following format
volatile type name @0xADDRESS;
//Example copied from one of my 8 bit processors I happen to have open
volatile unsigned char __far NV_ICSTRM_FAR @0x0000FFBE;
You could always check the header files for definitions of the standard ports and copy those
This thread really has nothing to do with MQX
Firstly, you should define the varible as global i.e. outside your code body in the following format
volatile type name @0xADDRESS;
//Example copied from one of my 8 bit processors I happen to have open
volatile unsigned char __far NV_ICSTRM_FAR @0x0000FFBE;
You could always check the header files for definitions of the standard ports and copy those
Thank You,
I hadnt declared it as a global - that was the mistake.
Thanks,
Chen