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.

In CCS 11.1 a project for a TMS570LC4357 using the TI Clang compiler no longer supports the correct device endianess of be32

Other Parts Discussed in Thread: TMS570LC4357

In CCS 10.3.0.00007 when a project is created for a TMS570LC4357 using the TI Clang compiler the Device endianess is set to be32 which is the correct value for a TMS570LC4357:

Whereas with CCS 11.1.0.00011 the device endianess is big:

In CCS 10.3 the available device endianess options for a TMS570LC4357 when the TI Clang compiler is selected are be32, be8, big or little.

Whereas with CCS 11.1 the available device endianess options for a TMS570LC4357 when the TI Clang compiler is selected are only big or little.

In the related thread found an issue where a project created in CCS 10.3 for a TMS570LC4357 using the TI Clang compiler v1.3.0.LTS no longer compiled a correct executable on either CCS 10.4, 11.0 or 11.1. The issue was that the later CCS versions were no longer passing the --be32 option to the linker resulting in the generated executable having the incorrect endianess in the sections in flash. This seems related to CCS no longer recognising the be32 device endianess option when the TI Clang compiler is used for the TMS570LC4357.

The ccs/ccs_base/common/targetdb/devices/tms570lc43xx.xml file in the CCS 10.3 and 11.1 installations is the same, so don't know what is causing the difference.

  • Chester,

    There are multiple issues.  First, the device xml files for TMS570 do not have the default options for clang.  So it is going to end up with some defaults for the processor variant.  Right now I believe that armcl is the recommended compiler for TMS570.

    If you run through the wizard and select the 43xx and clang in CCSv10.3 and build you are going to get an error like this: 

    tiarmclang: error: big endian not supported for subtarget.

    In 10.3 if I set the processor options then it builds ok for me and is passing be32 to the linker.  Interestingly it does not let me edit this option via the UI.

    If I follow the same process in CCSv11.1 (selecting big in the wizard) the first error is the same and I can get past it by setting the processor options.  However, the second step is different as it is not passing be32 to the linker.  If I copy my linker options from CCS10.3 to CCSv11 it works.  

    We will have to dig into this more to find out why we are no longer letting you select be32.

    Regards,

    John

  • Chester,

    Ok I can get it to build ok in CCSv11.1.

    Failure test case:

    Building target: "CCSv11.1test.out"

    Invoking: Arm Linker

    "/Applications/ti/ccs1110/ccs/tools/compiler/ti-cgt-armllvm_1.3.0.LTS/bin/tiarmclang" -march=armv7r -mcpu=cortex-r5 -mbig-endian -Og -gstrict-dwarf -gdwarf-3 -Wl,-m"CCSv11.1test.map" -Wl,-i"/Applications/ti/ccs1110/ccs/tools/compiler/ti-cgt-armllvm_1.3.0.LTS/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="CCSv11.1test_linkInfo.xml" -Wl,--rom_model -Wl, --be32 -o "CCSv11.1test.out" "./main.o" 

    tiarmclang: error: unsupported option '--be32'

    Working test case:

    Building target: "CCSv11.1test.out"

    Invoking: Arm Linker

    "/Applications/ti/ccs1110/ccs/tools/compiler/ti-cgt-armllvm_1.3.0.LTS/bin/tiarmclang" -march=armv7r -mcpu=cortex-r5 -mbig-endian -Og -gstrict-dwarf -gdwarf-3 -Wl,-m"CCSv11.1test.map" -Wl,-i"/Applications/ti/ccs1110/ccs/tools/compiler/ti-cgt-armllvm_1.3.0.LTS/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="CCSv11.1test_linkInfo.xml" -Wl,--rom_model -Wl,--be32 -o "CCSv11.1test.out" "./main.o"  

    warning #10247-D: creating output section ".text" without a SECTIONS specification

    warning #10247-D: creating output section ".stack" without a SECTIONS specification

    warning #10210-D: creating ".stack" section with default size of 0x800; use the -stack option to change the default size

    Finished building target: "CCSv11.1test.out"

    The difference is that in the second there is no space before the --be32.  I am manually adding in --be32.

    We are checking on why the project wizard was changed to not allow selecting be32.

    Regards,

    John

  • Chester,

    So the be32 option was removed from the CCS Project Wizard as that option was not part of the validation suite for the toolset.  You can workaround that by adding "-Wl,--be32" in the linker options, which is basically what the wizard was doing in 10.3.  However, just be aware that this toolset is not currently running be32 tests.  There are discussions going on now about adding that.

    Regards,

    John

  • First, the device xml files for TMS570 do not have the default options for clang.  So it is going to end up with some defaults for the processor variant.

    Are the defaults for the processor variant specified in a XML file somewhere in the CCS installation, or are the defaults in the CCS executables?

  • Chester,

    What I was talking about there were these options:

    If the device xml does not specify them then CCS does not set a value.  The compiler would have a default that is used when not specified.  That is in the compiler binaries.

    Regards,

    John