Keil Logo

GENERAL: CONST ARRAY IN ROM

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 [];

Last Reviewed: Wednesday, May 24, 2000


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.