[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Avoiding memory initialization

From: Anton Erasmus
Subject: Re: [avr-gcc-list] Avoiding memory initialization
Date: Fri, 19 Oct 2001 18:47:54 +0200


Use the  something like

int gTestVar __attribute__((section ("no_init")));

This will put gTestVar in a section called no_init. Any section you 
define is not initialised by the startup code. You might have to tell 
the linker where to put the code.

Hope this helps

> Hello Everybody,
> I am using Atmega103. I have declared an array of char
> which I do not wish to get initialized on every CPU
> reset signal. I am keeping some acquired data here. In
> short I want to use this array as battery backed up
> RAM. However startup code clears the entire bss
> section on every reset signal. Is there a way to avoid
> this? Can somebody provide me source code to do the
> same?
> Thanks.
> Sean.
> ____________________________________________________________
> *NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
>        Visit http://in.mobile.yahoo.com/smsmgr_signin.html
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]