软件:CCES;
芯片:BF609
使用自制开发板编写工程,之前一直调试正常。但因公司需要安装幻影系统,导致CCES程序重装。之后再打开之前可用的程序(系统更换前保存,确定可用),build,debug 出错:
A non-recoverable error or exception has occurred.
Description: An undefined instruction has been encountered (Exception with EXCAUSE=0x21).
General Type: UnhandledException
Specific Type: UndefinedInstruction
Error PC: 0x03002696
单步调试,程序中代码运行到SystemInit()之前还正常,但当试图进入SystemInit()函数内时,无法进行下去:
代码窗口:
int main(void)
{
/* Initialize managed drivers and/or services */
adi_initComponents();
/**
* Initialize managed drivers and/or services that have been added to
* the project.
* @return zero on success
*/
断点: if(SUCCESS != SystemInit())
{
return FAILURE;
}
...........
}
Disassembly窗口:
SystemInit:
03002694: JUMP.S SystemInit ; //——在该行停止,怎么都运行不下去!
03002696: JUMP.S 16 /*0x30026A6*/ ; //——寄存器返回用于错误信息提示的行!
03002698: R6 += 20 ;
0300269a: R0 = 0 ;
32 adi_initComponents();
0300269c: IF ! CC JUMP 64 /*0x30026DC*/ ( BP ) ;
0300269e: IDLE ;
030026a0: CC = R0 == 0 ;
030026a2: IF ! CC JUMP 64 /*0x30026E2*/ ;
030026a4: 0428 *illegal opcode*; //——间断性地出现不少类似的 *illegal opcode 行!
37 if(SUCCESS != PLL_Init())
030026a6: NOP ;
030026a8: R0 = B [ P5 + 0 ] ( Z ) ;
030026ac: 4700 *illegal opcode*;
39 return FAILURE;
030026ae: R4 = R0 | R1 ;
030026b0: JUMP.S -48 /*0x3002680*/ ;
030026b2: JUMP.S -4096 /*0x30016B2*/ ;
42 SET_PILOT_LED;
030026b4: NOP ;
030026b6: 0008 *illegal opcode*;
...........
更换为简单的点灯工程,正常闪烁,判断开发板应该没有问题!
请问大家,这个BUG该怎么排除呢?