bill2009:
so even a static global variable gets reinitialized by design? I had expected it to get initialized only on the 1st load of the program.I'm now using attribute ((section (".noinit"))); accepting that the variable is uninitialized the first time after reloading the sketch.
static used in file scope is very different than static used in block scope. It's quite a confusing keyword.