|  | 
 
| 调试ucos程序时(如下),发现运行到程序OSTimeSet(0);句时总是进入databort,跟踪调试发现是 
 OS_EXIT_CRITICAL() 句执行进入下面汇编语句出错:
 
 ARMEnableInt
 LDMFD sp!, {r0}    ; pop current PSR
 MSR  cpsr_c, r0    ; restore original cpsr
 MOV  pc, lr                                         (在该句出错)
 
 pc指向0xffffffff  地址,且内容也为0xfffffff
 
 按道理前面执行基本初始化程序,PC不应该跑飞啊,斑竹能否指点下???
 
 ---------------------------------------------------------------------------------------
 
 
 
 附主程序:
 
 void Main(void)
 {
 
 char Id0 = '1';
 char Id1 = '2';
 char Id3 = '4';
 
 ARMTargetInit();
 
 Uart_Printf("\n\n\n\n\n");
 Uart_Printf("   ******************************\n");
 Uart_Printf("   *     uCos demo code    *\n");
 Uart_Printf("   *******************************\n");
 Uart_Printf("\n\n");
 Delay(100);
 
 OSInit();
 
 OSTimeSet(0);
 
 UartSem = OSSemCreate(1);
 KeySem = OSMboxCreate((void *)0);
 /*
 * create the tasks in uC/OS and assign decreasing
 * priority to them
 */
 OSTaskCreate(TaskStart, (void *)&Id0, (void *)&Stack0[STACKSIZE_L - 1], 1);
 OSTaskCreate(TaskLED, (void *)&Id1, (void *)&Stack1[STACKSIZE_L - 1], 51);
 OSTaskCreate(lwip_init_task, (void *)&Id3, &lwip_init_stk[STACKSIZE_H-1], 2);
 
 /* Start the  system running */
 ARMTargetStart();
 
 /* start the system */
 OSStart();
 
 /* never reached */
 }
 | 
 |