[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Variables in external ram
From: |
Patrizio Zelotti |
Subject: |
[avr-gcc-list] Variables in external ram |
Date: |
Sat, 6 Mar 2004 21:12:38 +0100 |
Hi to all,
I'm developing an application with ATmega128 and external ram with battery
backup; external ram is used to store variables that have to be kept when the
system is switched off.
So I have declared the variables
int foo __attribute__ ((section (".noinit")));
and then use the option
-Wl,--section-start=.noinit=0x802000
for the linker.
Is possible to declare a section .noinit instead of declare the section for
each variable ?
For example
... __attribute__ ((section (".noinit")))
int a; // external ram variables
long b;
short c;
... end section .noinit
int c; // internal ram variables
In other application I have developed using 683xx, I declared the variables in
order and the linker allocate the variables in the declared order; so when I
modified the software and add new variables, I just add at the end of the other
declarations, and the new variables declared are allocated after the other
variables, so the old variables keep their address and their value in external
ram.
How the allocation is handled in AVR gcc ? How can I handled this situation
with AVR gcc ?
I'm using WinAVR 20030913 on XP system and use Insight to debug. Since new
version of gcc, avarice and other tools are available, a new version of WinAVR
is planned in the near future ?
Or a new binary for Win32 of the tools is available for download somewheare in
the net ?
Thank you all in advance.
Regards,
Patrizio Zelotti
address@hidden
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list
- [avr-gcc-list] Variables in external ram,
Patrizio Zelotti <=