ARM Technical Support Knowledge Articles

CONST ARRAY IN ROM

Applies to: General Topics

Answer

QUESTION

I have a const byte array. I want to access it out of code memory space. The compiler sets up two segments; one in ROM and one in data space. Then during initialization it copies all the data from ROM into the data space. I want to set up a single segment in ROM. How can I do that?

ANSWER

Put CODE in front of the array declaration, in addition to CONST. Your declaration should something like the following:

code const array [];

Article last edited on: 2000-05-24 00:00:00

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