Keil Logo

ARMCC: VARIABLES IN NON-VOLATILE MEMORY


Information in this article applies to:

  • RealView C Compiler Version 3
  • RealView Microcontroller Development Kit 3.04

QUESTION

How can I locate variables in the non-volatile memory area? µVision offers the checkbox Project — Options — Target — NoInit. But this is not enough, because my variables are zero initialized.

ANSWER

In addition to setting of the NoInit checkbox, you must define the variables using the zero_init attribute as shown below.

__attribute__((zero_init)) int i;

MORE INFORMATION

  • RV Compiler Introduction (available in µVision)
  • RealView Compilation Tools Compiler and Libraries - Variable Attributes
  • RealView Compilation Tools Linker and Utilities User's Guide - Using Scatter-loading Description Files

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, January 30, 2007


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.