Hello,
I am running a sample app on DSP and code snippet for app is given below.
volatile unsigned int count = 10;
main()
{
printf("Example App\n");
while (count);
}
ISR()
{
printf("Count: %d \n",count-1);
count--;
}
Setup:
The compiler used for this code is c6000 version 7.4.1 and optimization level is o3.
Expected Result:
Example App
Count:9
Count:8
....
Count:0
What is observed with O3 Level:
Example App
Count:9
Example App
Count:8
....
Example App
Count:0
When i changed the optimization level to o1 i got the expected output. Is this a known issue? If i want to use o3 optimization how can i solve the problem?
Thanks