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.

Compiler/LAUNCHXL-F280049C: Compiler crashes on function pointer call

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: LAUNCHXL-F28379D, TMS320F28377D, BOOST-DRV8711, C2000WARE

Tool/software: TI C/C++ Compiler

I have a problem related to these problems: 

Compiler/LAUNCHXL-F28379D: compiler crashes on function pointer call

and

Compiler/TMS320F28377D: compiler version of ti-cgt-c2000_20.2.0.LTS has a bug...

posted on April 3, 2020.

Like the related problems, my compiler also crashes whenever I uncomment my function pointer call. 

void (*DispFunc[4])(uint16_t);

void initDisplay(void)

{

    // Set function pointers

    DispFunc[0] = set_nSleep;

    DispFunc[1] = set_nReset;

    DispFunc[2] = set_NumSteps;

    initUART();

}

void ProcessDisplay()

{

    if (DispCharRcvd)

    {

        uint16_t messageType = receivedChars[0] << 8 + receivedChars[1];

        uint16_t displayData = receivedChars[2] << 16 + receivedChars[3] << 12 + receivedChars[4] << 8 + receivedChars[5];

        //DispFunc[messageType] (displayData);     <<<<<<<< uncommenting this causes the compiler crash

        DispCharRcvd = false;

    }

}

I have not created a test case yet, but I can if it is needed. I have also included my display.pp file. 

My complete console message is as follows:

**** Build of configuration CPU1_RAM for project BOOST-DRV8711_F280049C ****

/Applications/ti/ccs1000/ccs/utils/bin/gmake -k -j 3 all -O 

 

Building file: "../display.c"

Invoking: C2000 Compiler

"/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C" --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C/device" --include_path="/Applications/ti/c2000/C2000Ware_2_01_00_00/driverlib/f28004x/driverlib" --include_path="/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" --define=DEBUG --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="display.d_raw"  "../display.c"

 

>> Compilation failure

subdir_rules.mk:7: recipe for target 'display.obj' failed

 

INTERNAL ERROR: /Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/acia2000 experienced a segmentation fault

                  while processing function (unknown or file scope) file (unknown) line 0

 

This is caused by a defect in the TI EABI C/C++ Parser.

TI Customer Support may be able to suggest a workaround to avoid this.

 

Upgrading to the newest version of the compiler may fix this problem.

 

Contact TI in the E2E support forums at http://e2e.ti.com under

"Development Tools", "TI C/C++ Compiler".  See the link titled

"Submitting an issue".

 

We need to see this ENTIRE error message and a complete, reproducible

test case including ALL of the command-line options.

Include the .pp file created by option --preproc_with_comment

 

gmake: *** [display.obj] Error 1

Building file: "../main.c"

Invoking: C2000 Compiler

"/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C" --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C/device" --include_path="/Applications/ti/c2000/C2000Ware_2_01_00_00/driverlib/f28004x/driverlib" --include_path="/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" --define=DEBUG --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d_raw"  "../main.c"

Finished building: "../main.c"

 

Building file: "../device/f28004x_codestartbranch.asm"

Invoking: C2000 Compiler

"/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C" --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C/device" --include_path="/Applications/ti/c2000/C2000Ware_2_01_00_00/driverlib/f28004x/driverlib" --include_path="/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" --define=DEBUG --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="device/f28004x_codestartbranch.d_raw" --obj_directory="device"  "../device/f28004x_codestartbranch.asm"

Finished building: "../device/f28004x_codestartbranch.asm"

 

Building file: "../device/device.c"

Invoking: C2000 Compiler

"/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C" --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C/device" --include_path="/Applications/ti/c2000/C2000Ware_2_01_00_00/driverlib/f28004x/driverlib" --include_path="/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" --define=DEBUG --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="device/device.d_raw" --obj_directory="device"  "../device/device.c"

Finished building: "../device/device.c"

 

Building file: "../utility.c"

Invoking: C2000 Compiler

"/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C" --include_path="/Users/clark/Documents/CCS_Stepper/BOOST-DRV8711_F280049C/device" --include_path="/Applications/ti/c2000/C2000Ware_2_01_00_00/driverlib/f28004x/driverlib" --include_path="/Applications/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" --define=DEBUG --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="utility.d_raw"  "../utility.c"

"../utility.c", line 728 (col. 32): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

"../utility.c", line 728 (col. 68): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

"../utility.c", line 728 (col. 68): advice #2615-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division.

"../utility.c", line 728 (col. 38): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

"../utility.c", line 728 (col. 40): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

"../utility.c", line 728 (col. 96): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

"../utility.c", line 728 (col. 75): advice #3195-D: (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

Finished building: "../utility.c"

 

gmake: Target 'all' not remade because of errors.

**** Build Finished ****

I note that one of the above related problems has a resolution as follows:

C28 compiler version 20.2.1.LTS with fix for this issue is available as of 4/9/20.

You can install within CCS using CCS menu:

    help->Install Code Generation Compiler Tools... 

When I go to help>Install Code Generation Compiler Tools, I do not see any upgrades. I am using TI v20.2.0.LTS but I cannot find a v20.2.1.LTS.

Do you need a test case or any further information in order to provide a solution to this problem?

Clark

  • Clark,

    I see the 20.2.1 LTS compiler for C2000 in my mac CCSv10.

    Does anything show up?  I know there was an issue when it was originally posted.  It could be an issue with the update site being cached.

    You can clear that but going to the preferences dialog.  Then navigating to here the update site list as shown below.  Select the mac compiler update site and click the reload button.

    Another issue I have seen is CCS having trouble finding the compiler after installing.  If I click rediscover here that fixes it:

    Another option is to download the compiler manually from the site below.  After doing that make sure to go back to the Compiler section in the preferences dialog and specify where it is installed and click refresh to have CCS find it.

    http://www.ti.com/tool/download/C2000-CGT-19

    Regards,

    John

  • Thank you John! Your prompt suggestions helped me fix my problem.

    My problem was that CCS was not recognizing the new release. It was not shown on the download list because it was already installed. When I unchecked the "hide already installed software" button, I saw the new version there. Going into CCS preferences and refreshing  helped CCS find the new version. Then I went into project preferences, selected the new version and boom!...my app compiled. 

    This is exactly why I left ESP and ST. TI's support, as well as your training services and the quality of your software have caused me to be very loyal to TI.

    Well done, John,

    Clark

  • Clark,

    That is great.  Thank you very much for the feedback.

    In general CCS should auto discover the compiler if it is installed from CCS. However there is an issue with that right now.  That should be addressed in our next update (10.1).  Discovering packages can be slow and we used to do it every time you started CCS.  There were some optimizations done to improve when discover happens.  The update is supposed to trigger a discover but that is not working correctly

    Regards,

    John