ARM Technical Support Knowledge Articles

VARIABLES IN NON-VOLATILE MEMORY

Applies to: RealView C Compiler

Answer


Information in this article applies to:


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

Article last edited on: 2007-01-30 09:08:51

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