ARM Technical Support Knowledge Articles

ACCESSING THE FULL ADDRESS RANGE

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

Is it possible to access the full address range (16Mb) in C?

ANSWER

Yes. The huge and xhuge memory types allow access to the full 16Mb address range of the C167. The huge memory type only uses 16-bit address calculation, so the maximum size of an object may be 64kb, however, it is the optimum memory type for the microcontroller. The xhuge memory type does not have a limit on the maximum size of an object.

For example, you may declare variables and pointers using these memory types. Here are some examples:

unsigned char xhuge foo;
int huge bar;
unsigned char huge thing[50000];
char xhuge *xptr;
long huge *baz;

If you choose the HLARGE memory model, the variables default to being huge.

MORE INFORMATION

Article last edited on: 2005-07-15 13:15:42

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