I have this static variable that gets corrupted without my knowledge.
My program has a structure like this
#class static
#memmap xmem
long variable1;
long variable2;
#use “xxx.lib”
int variable3;
int variable4
char variable5
char variable6[10]
function1()
{
auto int variable7;
}
function2()
{
int variable8;
}
function3()
{
variable1=variable1+1
}
main()
{
variable1=0;
while(1)
{
function3();
}
}
somehow variable1 after a while gets corrupted.
Can anyone help me on my problem?
Thanks