Yongtao Guo

Could somebody have a quick look to give me some hint ?

Discussion created by Yongtao Guo on Feb 22, 2006
Latest reply on Mar 8, 2006 by Joe Haas
We built a new board using Coldfire 5407

I built a simple application "Hello World" (automatically generated) by CW software). I added couple of inline assembly lines like the following

/*
* File: main.c
* Purpose: sample program
*
*/

#include

int main()
{
printf("Hello World MW in C\n\r");

fflush(stdout);

asm // added by me - begin
{
move.l #1,d0 // single step is ok
move.l d0,d1 // single step causes exeception

} // added by me - end

while(1); // Idle

return 0;
}

Then I do single step. Everything is fine until
"move.l d0,d1". I got the error message box as


"Critical Error
dbg_check_critical_error returned: IIIegal command error
from CPU - try a RESET"

Then I click OK, I got

"Bus error"




The same code works fine in the demo board - m5407c3. But it can't work on my new board.

asm // added by me - begin
{
move.l #1,d0 // single step is ok
move.l d0,d1 // single step causes exeception

} // added by me - end

What would be the possible reason to prevent the register to register copy "move.l d0,d1" ? hardware or software error? Any suggestions?


Thanks in advance.

Outcomes