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.

CCS/TMS570LC4357: TMS570LC4357 Working project suddenly gets endianness error when loading debugger

Part Number: TMS570LC4357

Tool/software: Code Composer Studio

I have a working project which was running very slowly compared to another project, so I was changing cache settings.  Suddenly I cannot debug anymore, the debugger give me an error about ".out Does not match target endianness" and it exits. I changed to another board which initially worked and then developed the same problem.  I have not change the endianness settings from the original "be32". Two different projects that I have been working on suddenly have the same issue (i have not tried any other projects).   I have cycled power on the two boards, restarted CCS and rebooted the computer but it made no difference.  I have not used the AJSM module. Is this an AJSM issue, did the boards somehow get locked and what can I do to recover them?

  • Hi Darryl,

    Darryl Uchitil said:
    Two different projects that I have been working on suddenly have the same issue (i have not tried any other projects). 

    These two different projects... did you modify them at all since when they were working (like with the first project)?

    Also what exact version of CCS are you using?

    Thanks

    ki

  • KI,

      I modified one working project, then the problem appeared. I removed the two lines I had added, but the problem remained.  I tried another project that had been working, it no longer would load the debugger.

      I pulled out a different hardware board (both boards are TMS570 eval boards) and repeated the test.  Second board worked until I re-enabled my two lines of code.  After that the second board no longer would load the debugger.

    Both TMS570's are Rev B

    I am using CCS Version: 9.2.0.00013 

    Darryl 

  • Darryl Uchitil said:
    I pulled out a different hardware board (both boards are TMS570 eval boards) and repeated the test.  Second board worked until I re-enabled my two lines of code.  After that the second board no longer would load the debugger.

    What exactly are these two lines of code? 

  • Technically only one line of code

     void coreEnableDC(void);
     coreEnableDC();

  • Thanks. I can't explain why you see the behavior you see. I believe the issue is beyond just an issue with the tools. I will bring this thread to the attention of the device experts.

  • Darryl Uchitil said:
    I have not used the AJSM module. Is this an AJSM issue, did the boards somehow get locked and what can I do to recover them?

    It is possible the code in flash is crashing before the debug session can fully attach.

    Does the sequence in https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/264498/926061#926061 allow you to recover access?

  • That sequence is written for R0, I have R5.  Nothing happens when i write a byte 0 to 0xFFFFFFFE (which is already zero).  The Cortex_R5 is either  in "Suspended" or "Disconnected:Running", it toggles when I select "Connect Target".  I tried a similar procedure for Cortex_R4 which involved lucky timing with the nRST button, this also did nothing.

  • The sequence allows me to connect at the assembly level, where the CPSR E bit is zero and the CPU keeps re-executing code at 0x10.  I can use the Sys RESET to go back to zero, manually set the endian to ONE in CPSR, and single step about 25 steps until the crash happens again.  But the Tools->OnChipFlash->EraseFlash fails with a message "Target is not connected or does not support current Flash operation".   Is there a register I can poke to cause a flash erase?

  • Darryl Uchitil said:
    But the Tools->OnChipFlash->EraseFlash fails with a message "Target is not connected or does not support current Flash operation".   Is there a register I can poke to cause a flash erase?

    Not sure there is a single register which can cause a flash erase.

    Can you first see if setting "System Reset on Connect" in the CCS Project Properties -> Debug -> Flash Settings allows you to recover.

    Albeit on a different device, setting "System Reset on Connect" has allowed me in the past to recover a device which crashes early during start up - see https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/517846/1881742#1881742

  • Darryl Uchitil said:
    Is there a register I can poke to cause a flash erase?

    Once you have connected the debugger, under the Tools -> On-Chip Flash menu you get the option to "Erase Flash" under the Erase Options. While not shown on the screenshot below, at the top of the Erase Options there is an option to select to erase the Entire Flash.

  • The problem is that the program is corrupt and the CPU crashes in the first 25 instructions with a data fault.  At that point the endian bit has become cleared in CPSR. With the help of some other folks at TI, we were able to recover one board but (so far) not the other.  The "Reset on Connect" did not , in itself, fix the problem. We also disabled "Verify" and even then we only got this to work once.

  • Hi Darry,

    I heard that the boards have been recovered by using nowflash.