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.

Cannot load program - target endianness does not match

Other Parts Discussed in Thread: UNIFLASH, TMS570LS3137, RM48L950

Hi,

I have the Hitex SafeTI-HSK.  I have successfully used the example safety program.  I have also created my own program that has run successfully, and I have used CCS uniFlash to program the flash.

 

However, today I came in and I cannot debug.  When it tries to download a program I get an error:

Load program error.

HSK_Safety_Application_BE.out does not match the target endianness, not loaded.

 

I haven't changed anything since this was successful.  The program I created has the same message, as does uniFlash when I try to reprogram the flash.

 

I have verified that the target endianness in the project settings is set to be32.

 

What else can I do to get my board working again?

 

Thanks

  • Hello:

    We have received your post. We will come back soon with some feedback.

    Regards.

  • Hello:

    Have you tried using both UniFlash and programming from CCS?

    Regards,

    Enrique

  • I have tried in UniFlash, and it gives the error for the TMS570LS3137.  The RM48's seem to program OK.

    I have tried downloading / debugging from CCS, with the same error that the endianness does not match.  Is there a different way that I can program from CCS?

     

    Thanks,

    David

  • David,

    Are you using the correct CCXML file for each device?  They are different for the RM48 and TMS570LS3137.

    Also are you trying to program the same binary in each device?  They will also need different binaries.

     

     

  • Hi,

     

    As best as I know I am using the appropriate files.

     

    When I try to program through uniFlash I use the pairs below:

    SafetyTMS570LS3137.ccxml uses HSK_Safety_Application_BE.out  -->>gives the error that endianness does not match

    SafetyRM48XX.ccxml uses  HSK_Safety_Application_LE.out

    MonitorRM48L950.ccxml uses HSK_Monitor_Application.out

     

  • David,

    Ok, then a likely scenario is this:  there are 2x XDS100v2 emulators behind a USB switch on the HSK board.   This is necessary because the monitor CPU is capable of switching on/off the power to the application CPU as part of fault injection and if we daisy-chained the JTAG ports it would crash when power gets turned off on the safety MCU as the chain would break.  So we have two independent emulators on the board.

    If you try to program into the wrong XDS100v2 then you might be trying to put the BE .out file into the monitor CPU.  The monitor CPU is always the LE RM48 and you'd get this error message.

    Your error message would be consistent with this.  By the file names you report using it looks like you're using the right combination of files, but the filename itself is not what the emulator selection keys off of.  It keys off of the serial #.  You can read about that in detail here:  http://processors.wiki.ti.com/index.php/XDS100#Q:_Can_I_plug_more_than_one_XDS100_.28multiple_XDS100.29_into_a_PC.3F

    Now if you had to update the serial number or reprogram the emulator on the HSK or if someone else did this before you the serial numbers could be mixed up.  Or the .ccxmls if they were modified could be pointing to the wrong emulator.

    So what I would do is to check the serial #'s in the .ccxml files (shows up on the 'advanced' tab in CCS when you open the target config file and highlight the XDS100v2 in the tree...)  against the board.  

     

  • Hi,

     

    Thanks for the info.  I should have mentioned it originally, but I am connecting through USB not JTAG.  Is this still applicable?

    I can't find where the serial number is on the board, so I can't check that they match, but a co-worker checked his ccxml file for the TMS570LS3137 and has the same serial number listed as I do (TISAF001).  It looks like both the SafetyRM48 and TMS570 ccxml files list TISAF001 as the serial number, the MonitorRM48 listsTIMON001.

  • I am still dead in the water and cannot get any work done until this gets resolved.  I have tried the following:

    - Used a second board that I know is good.  I get the same error.

    - Did a complete uninstall / re-install of CCS and all of the related software, same issue.

    - Created a new project with an empty main (attached) 0272.testHitex.zip

    - I tried installing everything on a second computer, but recieved an error message that the board had no power.

     

    I don't know what else to try, or why this worked and now suddenly doesn't.

    Thanks in advance for any help you can provide.

  • David,

    Sorry - I think I missed this in your earlier post:

    If you are doing this:

    When I try to program through uniFlash I use the pairs below:

    Fails: SafetyTMS570LS3137.ccxml uses HSK_Safety_Application_BE.out 

    Works: SafetyRM48XX.ccxml uses  HSK_Safety_Application_LE.out

    Works: MonitorRM48L950.ccxml uses HSK_Monitor_Application.out

    Then I think you have an HSK for the RM48xx.  You'll never be able to program all three .out files onto a single HSK.  The HSK comes with a monitor CPu that is always an RM48L950 and then either a second RM48 or a TMS570 as the safety application CPU (the one that you're going to run your code on...)

    Please let me know what the part #s are on the two 337 BGA packages on your HDK are.  Should be two RM48's.

    -Anthony

  • Thanks for your help.

     

    I don't know what was going on before, I'm assuming that I was doing something wrong, but I don't know what I am doing differently now, but I am able to program the TMS570 OK (the kit has a RM48 control & monitor MCU and a TMS570 safety MCU).

     

    I get a warning when I program the TMS570

    WARNING >> CortexR4: 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. 

     

    And I don't know if this is expected or not.  But based on your post I should only be able to / need to program the monitor application and the TMS570.

     

    Thanks,

    David

     

     

  • I'm having a very similar issue.

    Suddenly, my CCS was no longer able to upload image and start debugging. I'm using TMS570LS3137 on a custom board. Everything worked fine for a couple of months. Now I'm unable to do anything.

    I'm getting the same message as David:

    "Load Program Error.

    File: (path to my *.out)

    Does not match the target endanness, not loaded.

    Check project build options and target configuration file (ccxml)"


    My configuration is as follows:

     - JTAG is XDS100v2 USB Emulator (from Spectrum Digital);

     - I'm using serial numbers (I have two XSD100v2 connected since my projects uses two separate TMS570LS3137);

     - I'm using external makefiles (But I'm 100% sure there is --be32 option there);

     - I'm having the same problem on both MCUs on my board. One failed to load couple of minutes after the other (maybe one successful flashing later; I'm not sure);

     - my project file is this:

    <?xml version="1.0" encoding="UTF-8" ?>
    <?ccsproject version="1.0"?>
    <projectOptions>
    	<deviceVariant value="Cortex R.TMS570LS3137"/>
    	<deviceFamily value="TMS470"/>
    	<deviceEndianness value="be32"/>
    	<codegenToolVersion value="4.9.5"/>
    	<isElfFormat value="true"/>
    	<connection value="common/targetdb/connections/TIXDS100v2_Connection.xml"/>
    	<rts value="rtsv7R4_T_be_v3D16_eabi.lib"/>
    	<templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
    	<isTargetManual value="false"/>
    </projectOptions>

     - my ccxml file is this:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
        <configuration XML_version="1.2" id="configuration_0">
            <instance XML_version="1.2" desc="Texas Instruments XDS100v2 USB Emulator" href="connections/TIXDS100v2_Connection.xml" id="Texas Instruments XDS100v2 USB Emulator" xml="TIXDS100v2_Connection.xml" xmlpath="connections"/>
            <connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Emulator">
                <instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
                <instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
                <instance XML_version="1.2" href="drivers/tixds100v2cortexR.xml" id="drivers" xml="tixds100v2cortexR.xml" xmlpath="drivers"/>
                <property Type="choicelist" Value="1" id="Emulator Selection">
                    <choice Name="Select by serial number" value="0">
                        <property Type="stringfield" Value="SDWML08K" id="-- Enter the serial number"/>
                    </choice>
                </property>
                <property Type="choicelist" Value="3" id="The JTAG TCLK Frequency (MHz)">
                    <choice Name="Adaptive with user specified limit" value="ADAPTIVE">
                        <property Type="stringfield" Value="10.0MHz" id="-- Enter a value from 488Hz to 30.0MHz"/>
                    </choice>
                </property>
                <platform XML_version="1.2" id="platform_0">
                    <instance XML_version="1.2" desc="TMS570LS3137" href="devices/tms570ls3137.xml" id="TMS570LS3137" xml="tms570ls3137.xml" xmlpath="devices"/>
                </platform>
            </connection>
        </configuration>
    </configurations>
    


    Note: I was able to download memory to file using UniFlash. I also run the JTAG self test and it passes.

    Could it be a hardware failure? What else can I try?

    Thanks in advance.

  • Lukasz,

    Some things to try:
    1) Can you please check that the .out file that you are trying to download uses --be32 for every source file in the project?
    2) The code currently inside the flash may be changing the "Data Endianness" bit in the Current Program Status Register (CPSR) in the CPU.
    Can you first erase the part using Uniflash and then try download using CCS?
    3) Is the CCS project for the .out file that you are downloading actually using the be32 .ccxml file that you posted?

    Sunil
  • Sunil,


    I'm sure the code is compiled in be32. I don't know what happened to the MCUs that caused them to enter error state.

    I wasn't able to erase them using UniFlash. But out of curiosity, I've checked the older nowFlash (v3.42) and it succeeded to erase the MCUs. Then I was able to program using CCS.

    I'm now running the exact same code which I've tried to upload earlier. It now runs without error. This is strange.

    Anyway, the suggestion to erase entire flash is what helped me.

    Thanks.