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.

TMS570LC4357: Compiling TMS570LC code with GCC

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, TI-CGT

Hi Team,

I want to compile code for TMS570LC4357 using GCC. I have done following steps:

  1. generated code for sci interfaces with GCC Tools selected under Tools section in HALCoGen

I have installed ccs12.8, in the new CCS project -> compiler version : I only see TI-CGT, TI-CLANG versions only. How can I add GCC here? Also in the ti/ccs12/tools/compilers - as well I see only ti-cgt, ti-clang, versions only.

Also, at different forums, I see that I need to change some config settings. Is there any comprehensive document?

 

Regards,

Kamlesh 

  •  ,

    Thanks for replying  I went through the forums. Now my program is compiling with these errors/warnings:

    However, when I try to load the program, the load program fails with error as: endian mismatch.

    On further investigation, I could see that even if I use `-mbe32`, `-marm` compiler and linker flags, the compiled binary has little endian format, which gives the load program error. 

    cause of this issue found is the runtime libraries being compiled in little endian which ignores the flags. So, now I am in need of GNU ARM toolchain compiled in big endian. I am using 14.3 (latest) version of toolchain. Could you provide me any support here? Do you have any readily available toolchain compiled with run time libraries in big endian format.

    Regards,

    Kamlesh

  • Hi Kamlesh,

    Apologies for the delayed response.

    On further investigation, I could see that even if I use `-mbe32`, `-marm` compiler and linker flags, the compiled binary has little endian format, which gives the load program error. 

    The RM57 device i shared is a little-endian device and TMS570LC4357 that you are using is a big-endian device. Maybe this is creating an issue.

    Change endianness at below location:

    Right click on the project and go to the properties:

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish, 
    with some support from TI e2e posts, I could use a gcc 7.5 version with TI CCS and the code was executing on TMS570lc4357. I want to use newer versions of gcc. Any reference on the same. I got some references for gcc12.2. Although the compilation was successful, but it is not executing on controller. It is showing when I pause during debug:

    Break at address "0x4" with no debug information available, or outside of program code.


    The compiler and linker settings are same as for gcc v7.5 as below:

    -mcpu=cortex-r5 -marm -mbig-endian -mfpu=vfpv3-d16 -mfloat-abi=softfp -nostartfiles

    Regards,

    Kamlesh