Ravi Gautam

Accessing Program/Data hard addresses  in C: Please help!!!

Discussion created by Ravi Gautam on Apr 24, 2008
Latest reply on Apr 29, 2008 by Pascal Irrle
The bootloader and OS are sharing the same UART and the OS needs to access some variables defined in the UART section of the bootloader.
Using the Keil compiler all I had to do was:
On the BL side:
unsigned int x _at_ SOME_HARD_CODED_VECTOR;
On the OS side:
unsigned int x _at_ SOME_HARD_CODED_VECTOR;
and both would essentially refer to the same address location.
However, code warrior doesnt support the _at_ keyword. How do I go about doing this in code warrior?
Basically how do I define
int x;
int * y;
In the bootloader and also have access to it from the OS?
Please help! The datasheet shows accessing memory locations in assembly using P:$xxxx and D:$xxxx but how do I do it in C?
Thanks a bunch!