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 V5.5 - Does not match the target endianness

Other Parts Discussed in Thread: TMS570LC4357

Hello,

I am using CCS V5.5 to develop on a TMS570LC4357 (big endian 32bits) and I use a Spectrum Digital XDS510 emulator. I have been developing with this setup for several month now. Today I was working on a problem in my software tracing the code with the emulator and reflashing several times and it was ok. Suddenly when I want to flash I get the following error:

  

And this text in the Console:

CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0CortexR5: GEL: File: C:\data\workspace\controle\hardware\Bootloader_ODIN\Tms570LC43\PC-0061\rel\V1.2\bin\Bootloader_PC0061_v1_2_5_73572.out Does not match the target endianness, not loaded. Check project build options and target configuration file (ccxml).

I did not change any configuration in the project or the emulator. I tried flashing older versions (already compile) of the project and I get the same problem. So apparently the problem is not in the file to flash.

I check the configuration file (.ccxml) but it is ok. I tried making a new configuration and I still get the same problem.

I checked my project configuration but it is ok.

I am able to connect to the processor but when I look at the memory browser all the bytes are reversed. The software on the processor is working so what is displayed is not good.

I tried using CCS V6.1 and I get the same problem.

Apparently CCS thinks the processor is little endian but in fact it is big endian.

Any idea what can cause this kind of problem. It looks like some configuration somewhere got corrupted.

Thanks!

Martin

  • Martin,

    Please take a look at this thread, which contains a link to another thread with reasons why this may be occurring and suggestions for workarounds.
    https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/360083/1264428#1264428

    If the above thread does not help, I may have to move this post to the Hercules forum for the experts there to comment further.

  • Hi Aarti,

    Good suggestion, the proble in the link is very similar to the one I have. Unfortunately, I tried all the suggestions in the links and it did not work. The E bit in my CPRS register is always 0 and CCS thinks my processor is little endian.

    I would appreciate some more help on solving this problem and also what can cause this to suddenly happen.

    Thanks!

    Martin
  • Hello Aarti,

    I have some new information on my problem. I tested with another board and it works, the endian is correct. So it's not a problem with CCS its a problem with the DSP.

    On a working board, the CPRS register reads 0x80000313 and on the problematic one, it reads 0x20000093.

    Any idea what can cause this kind of behaviour?

    Thank!

    Martin

  • Martin,

    I think the experts in the Hercules forum will be in a better position to assist further with this, so I will move this thread to the Hercules forum.
  • Any idea what can cause this kind of behaviour?

    By default, CCS doesn't perform a System Reset when starting a debug session which can leave registers in non-default state which can cause such problems (seen on other ARM devices).

    Try setting "Reset the target on a connect" under the CCS project properties for the IcePick:

    Edit: Corrected post to say apply the reset to the IcePick rather than DAP.

  • Hi Chester,

    I checked the "Reset the target on connect" option and it doesn't change the behavior when I connect. I tried putting the check box in the 3 options CortexR5, Dap and IcePick and I always get the same behavior. However I discovered that when I click the "System Reset" button in the debugger and the behavior changed. This doesn't work with CCS5.5 so I switched to CCS6.1.

    Here what happens when I connect and reset manually on the problematic board:

    1. Connect the emulator in CCS V6.1
    2. Config on bottom right of the screen ARM - LE - SPV and the CPSR register = 0x20000093
    3. Click "System reset" (no effect)
    4. Click "System reset"
    5. Config on bottom right of the screen ARM - BE8 - SPV and the CPSR register = 0x000003D3
    6. When I try flashing "Bootloader_V1_2_5" (an old program) I get the following error:

    Error in the console window:

    CortexR5: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.
    CortexR5: File Loader: Verification failed: Values at address 0x0000000000000002 do not match Please verify target memory and memory map.
    CortexR5: GEL: File: C:\data\workspace\controle\hardware\Bootloader_ODIN\Tms570LC43\PC-0061\rel\V1.2\bin\Bootloader_PC0061_v1_2_5_73572.out: a data verification error occurred, file load failed.

    Then I tested with a working board and the behavior is like this:

    1. Connect the emulator in CCS V6.1
    2. Config on bottom right of the screen ARM - BE8 - SPV and the CPSR register = 0x60000313
    3. Click "System reset" (no effect)
    4. Click "System reset"
    5. Config on bottom right of the screen ARM - BE8 - SPV and the CPSR register = 0x000003D3
    6. When I try flashing "Bootloader_V1_2_5" (the same as previous test) it works fine.

    The difference between a working and not working board is that I flashed a new program "Bootloader_V1_2_6" on the non working one. I did that on 2 boards where we never had any problems flashing and as soon as I flash this new software we cannot flash anymore. We have this endian problem. The changes between the two programs are minor so I don't understand what my software can do to cause this problem.

    Do you have any idea what causes the flashing error and how I can make it work again?

    Do you have any idea what can causes CCS to connect with the wrong configuration?

    Thanks!

    Martin

  • Martin Beaucage said:
    The difference between a working and not working board is that I flashed a new program "Bootloader_V1_2_6" on the non working one. I did that on 2 boards where we never had any problems flashing and as soon as I flash this new software we cannot flash anymore.

    I think the "Bootloader_V1_2_6" is causing the device to crash / reset while the CCS debugger attempts to attach, leading to the failure.

    This post https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/264498/926061#926061 contains a sequence which may allow you perform an entire flash erase to be able to recover the non working board.

  • Hello Chester,

    I tested the procedure described in the post but it did not change anything because I am already able to connect to the board with JTAG. Then when I try to erase flash using Tools->On-Chip Flash. Erase Option "Entire Flash" and click on "Erase Flash" I get the following errorSelected sector:

    But this is not related to my problem because it does the same thing with a working board. Also when I use the "Selected Sectors Only" option I get strange behavior from the "Toggle Bank" buttons.

    • Toggle Bank 0 Selection : Pops an error saying "Error executing Flash operation "BankToggle0": Flash Programmer: Unsupported Operation Code.
    • Toggle Bank 1 Selection: Toggles bank0 check boxes.
    • Toggle Bank 7 Selection: Toggles bank1 check boxes.

    Apparently this is a CCS6.1 configuration or compatibility problem with spectrum digital XDS510 USB emulator. You might have to send me back to the CCS group for this one.

    That being said, I found a way to fix my problem. Here is the procedure I followed:

    Launch the target configuration

    1. Connect to the target
    2. The configuration on the bottom right shows ARM - LE - SPV
    3. Click "System Reset" two times for the configuration on the bottom right shows ARM - BE8 - SPV
    4. In Register window change PC address to 0x00000010 (2 times, first time did not work) to put the software in an infinite exception loop (our software doesn't implement this exception)
    5. Resume program execution
    6. Terminate the debug session
    7. Launch the target configuration
    8. Connect to the target
    9. PC is still running at address 0x00000010 and the configuration is ARM - BE8 - SPV
    10. Flash working software.

    Now I need to find why my new software is causing this strange behavior. I will let you know when I find it.

    Thanks for your help.

    Martin

  • Martin,

    The Spectrum Digital XDS510 USB emulator is not on the list of emulators that work with Hercules products:

    They still 'may work' but there have been no updates made to the drivers/software now for several years so we took this product off our list of compatible emulators.   The MCU you are trying to work with is newer ...

    Also we first started supporting TMS570LC4357 with CCSv6 so you really should update CCS.



    If you update CCS and upgrade your emulator (XDS200 class is a good replacement for the 510 USB) your problems will likely go away.

  • Thanks for the information, I did not know the XDS510 was not supported for this processor.

    Thanks for you help.

    Martin.