Требуется программист в Зеленограде
- обработка данных с датчиков; ColdFire; 40 тыс. e-mail:jobsmp@pochta.ru |
Data placement at an absolute location
To place a variable at an absolute address, the argument to the operator @ and the
#pragma location directive should be a literal number, representing the actual
address.
Example
__no_init char alpha @ 0x2000; /* OK */
#pragma location=0x2002
const int beta=5; /* OK */
const int gamma @ 0x2004 = 3; /* OK */
int delta @ 0x2006; /* Error, neither */
/* "__no_init" nor "const".*/
See Located data, page 46 for information about how to handle this in the linker
command file.
Note: A variable placed in an absolute location should be defined in an include file, to
be included in every module that uses the variable. An unused definition in a module
will be ignored. A normal extern declaration—one that does not use an absolute
placement directive—can refer to a variable at an absolute address; however,
optimizations based on the knowledge of the absolute address cannot be performed.