What are the advantages of module and function static variables in an embedded application?
Module and function static variables combine the aspect of hiding for other parts of the program (reduced visibility scope in comparison with global variables) with a fixed memory location.
The last aspect allows inspection of the variable even when the instruction pointer is in a foreign scope. Universal Debug Engine supports this feature.