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