This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: assigning NVRAM to variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]