Hi,
Below is the part of code where execution stops. I also have the same piece of code in upper part of the same C file but it is working absolutely fine.
Here, I can see only "hi" printed on my console and nothing after that. Ideally it should print "BREAKED" & "1" & then break the loop & execute the following part of my C file. But it doesn't. PFA attachment for the error on console. Sometime I get this error and the console exits and sometime it gets freeze.
while (1)
{
for (i=0;i<1000000;i=i+1) //MAIN
{
}
L5 = IORD(OnChip,5);
L6 = IORD(OnChip,6);
L7 = IORD(OnChip,7);
L8 = IORD(OnChip,8);
//printf("\n%d %d %d %d",L5,L6,L7,L8);
if (L5 && L6 && L7 && L8)
{
printf("\n hi");
printf("\nBREAKED");
printf("\n1");
break;
printf("\n2");
}
}
I gave lot of try's and seems some issue with compiler or any other stuff. The code is absolutely fine. I don't know why it freezes at that time.
Can anyone tell me how to debug the C code, I tried but couldn't do that.