This is the mail archive of the ecos-discuss@sourceware.cygnus.com 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]

C variables in sections



   Is there any way to put a C variable in a specific section
without having to initialize it?  I found the following example
for initialed variables:
  char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };

When I leave off the initialization to 0, the variable no longer
appears in the appropriate section.  I have some battery-backed
RAM that should not be cleared on startup.

Thanks,
Will

PS- I'm new to the GCC cross-compiler (so hopefully this mail
 is to the right place..).

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