小弟作测试,采用周立功模版,创建任务如下。其中INT32U *PBoxMessage;编译可以过去,进入axd后将PBoxMessage放入witch提示如下:variable removed by compiler(optimization)
其中 tempc = *PBoxMessage; tempc = *(PBoxMessage+4); tempc = *(PBoxMessage+8); tempc = *(PBoxMessage+12);
没有编译。 void Task0 (void *pdata) { INT8U err; INT32U *PBoxMessage; INT32U tempc; OS_SEM_DATA PdemoPara; INT32U cnt = 0; pdata = pdata; Pdemo = OSSemCreate(0); Pboxdemo = OSMboxCreate((void *)0);
TargetInit (); OSStatInit(); OSTaskCreate (Task1,(void *)0, &TaskStk1[TaskStkLengh - 1], 3); while (1) { PBoxMessage =(INT32U *) OSMboxPend(Pboxdemo,1000,&err); tempc = *PBoxMessage; tempc = *(PBoxMessage+4); tempc = *(PBoxMessage+8); tempc = *(PBoxMessage+12); /* err = OSSemQuery(Pdemo,&PdemoPara); do{ err = OSSemAccept(Pdemo); }while(err); OSSemPend((OS_EVENT *)Pdemo,1000,&err); */ cnt++; if(cnt%2) { LEDOFF; } else { LEDON; } //Pdemo->OSEventCnt = 0;
} }
|