lpcware

Static variable not cleared at reset

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by celephicus on Wed May 30 19:49:22 MST 2012
Greetings,

We all know that variables declared static with no explicit initialization are implicitly set to zero by the start up code. Now, how do I declare a static variable that is NOT so initialized? I need this to keep state during a watchdog reset so that I can ascertain which thread blocked and caused the reset.

Hopefully this can be done without linker trickery.

Outcomes