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.

Failed branch instruction

 

OK, here's the situation:

The caller invoked board_init(), but instead of returning to the caller, board_init() loaded  R0 with #0, and the BX instruction FELL THROUGH!  You can see R14 has 0x402061D8 in it, and that the PC currently holds 0x40202154, the instruction following the BX. 

The instruction that got us to board_init was a "BL board_init"  Can someone PLEASE give me an idea why this is failing?  This is not the original x-loader code, I've had to modify it slightly to investigate the processor's behavior.  Previously, I got the exact same behavior with the function pointer table you can find in board.c in the am3517evm directory.

Thanks,

Matt

  •  

    Followup:

    If you look at R3, after executing the MOV R0,#0, R3 is highlighted in red and contains 0x000000F0.  I've looked at the output of dis470, and other than the fact that dis470 only shows the instructions in BE format, not LE (why???), what's on the screen shot here and what's being disassembled match perfectly.

    If I look at a memory dump, what I see on the screen in the disassembly from CCS, the output from dis470 and the memory dump all agree.

    Thanks,

    Matt

     

  • I'm sorry, but we compiler experts cannot help you with this one.  That file am3517evm.c is not supplied with the compiler.  We don't know anything about it.  I could move this thread to a Cortex-A8 processor forum, but I'm not sure that is correct either.  It seems you need to work this issue with whoever supplies that file.  And I think that is the company which built that EVM.

    Thanks and regards,

    -George

  • x-loader is a TI program. I will try in another forum.

    Thanks.