Am 20.11.2010 00:49, schrieb Mark J. Blair:
> I'm porting some TI example code which uses the "__no_init" keyword,
> and I'm having trouble figuring out whether there's an equivalent for
> it in GCC,
#define __no_init __attribute__ ((section (".noinit")))
> and/or if it's something I can simply ignore/omit.
no.
"no init" variables are not cleared or initialized by the C startup code
(a piece of code that is run before your "main" function).
it is useful e.g. to implement a clock. if you have a seconds counter
that is incremented by the timer. with a no init variable, the device
can be reset and it continues, after the reset, to count at the current
time instead of starting from zero. (in the case of a clock, the device
reset makes the clock to loose up to 1 second, so many resets make the
clock go behind but its still better than starting at zero)
chris
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users