ARM Technical Support Knowledge Articles

ASSIGNING AN I/O ADDRESS TO A VARIABLE

Applies to: C51 C Compiler

Answer

QUESTION

How do I assign a variable to a specific memory location, an I/O address, using uVision?

ANSWER

You may use one of the following methods to assign a specific address to a variable.

  1. Use the _at_ keyword when you declare the variable.
  2. Use the Absolute Access Macros defined in ABSACC.H in C51INC.
  3. Use the CODE, XDATA, BIT, and other directives in the BL51 linker to locate a SEGMENT at a particular address.

All three of these methods are discussed in detail in the C51 Compiler User's Guide.

MORE INFORMATION

Article last edited on: 2005-09-16 09:33:50

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential