This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
C variables in sections
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] C variables in sections
- From: will <will_lentz at Trimble dot COM>
- Date: Wed, 19 Jan 2000 15:49:19 -0800
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..).