This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2812: CCS编译后,程序运行错误

Part Number: TMS320F2812


CCS版本5.2,编译器版本TI v6.1.0

代码示例:

unsigned int A[2] = {0,0};
unsigned int B[2] = {0,0};

void test(void)
{
   unsigned int i = 0;

   for(i=0;i<2;i++)
   {
        if(A[i] > 10)
        {
           B[i] = 1;
        }
        else
       {
           A[i]++;
       }
   }
}


void main(void)
{
    while(1)
    {
        test();
     }
}

运行结果:B[0]和B[1]一直在增加,A[0]和A[1]一直都是0