This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: assigning NVRAM to variables
- From: "Hans Hübner" <hans dot huebner at gmail dot com>
- To: "saurabh prakash" <saurabhp75 at gmail dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 17 May 2006 07:05:48 +0200
- Subject: Re: [ECOS] assigning NVRAM to variables
- References: <eafe42230605162138g78b0fca9q4aea0eb7caebd32a@mail.gmail.com>
On 5/17/06, saurabh prakash <saurabhp75@gmail.com> wrote:
I am working on powerpc board. I want some of my global variables to
be assigned to non-volatile RAM. which is mapped from 0x02000000 to
0x0203FFFF. how can this be done.
You need to add a section for your non-volatile RAM to your
plattforms' linker file (platforms/hal/.../include/pkgconf/*.ldi).
Then, use the "section" attribute of gcc to put individual global
variables into the special section:
extern unsigned foo __attribute__ ((section ("nvram")));
-Hans
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss