How do I create a non initialized variable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I create a non initialized variable

317 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kcarolan on Thu Apr 24 18:56:34 MST 2014
I am using the Lpc11e14 and I need to create a few variable the will not get initialized when I come out of reset.  I am putting the Lpc11e14 to sleep and using the WDT to bring the Lpx11exx out of sleep.  I would like to keep the variables intact when I come out of sleep. I did a search on un-initialized variable in lpcxpresso and found the following but I could not get it to compile.

volatile int32 __attribute__ ((section(“.noinit”))) variable;

Thanks, Kevin
0 Kudos
2 Replies

292 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Apr 25 04:10:36 MST 2014
See:

http://www.lpcware.com/content/faq/lpcxpresso/noinit-memory-sections

Regards,
LPCXpresso Support
0 Kudos

292 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Fri Apr 25 01:07:44 MST 2014
What is an "int32"? Where is the type int32 defined?

This compiles for me (using a standard C data type):
__attribute__ ((section(".noinit"))) volatile int  variable;
0 Kudos