Quote:
Originally Posted by rsodimbakam
Is there any difference b/w global variable and static global variable?
static is a storage class specifier (static, auto, register, extern). Global variables (those defined outside a function body) without an explicit storage class are always static, but global variables not specifically declared static have external linkage.

Confusing?
Code: c
static int i; // available anywhere in this file (translation unit)
int j; // available anywhere in this file, and in other files by those files using "extern"
extern int k; // available anywhere in this file, but actually declared in some other file;

void main(void)
{ // ...
}

If you have no good reason to allow external linkage, I suggest you explicitly declare global variables to be static. Furthermore, I suggest avoiding global variables unless you have no good alternative. (You may not have a good alternative, especially in embedded systems, given your mention of RTS).