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/TMS320F280049: Compiler/TMS320F280049: Defect in the TI C/C++ Parser

Part Number: TMS320F280049

Tool/software: TI C/C++ Compiler

I am getting this error when I call a function via function pointer in .cla file which is defined in a structure. The function pointer has been assigned the address of function in main().

Using sample code from C2000 folder.

I also tried to install the latest compiler but CCS v8 doesn't show the compiler in preferences. Does it require higher CCS version?

Building file: "../cla_ex1_background_task_cla.cla"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="C:/Users/RND17/Desktop/cla_ex1_background_task" --include_path="C:/ti/c2000/C2000Ware_2_00_00_03/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_2_00_00_03/device_support/f28004x/headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --cla_background_task=on --preproc_with_compile --preproc_dependency="cla_ex1_background_task_cla.d_raw"  "../cla_ex1_background_task_cla.cla"

>> Compilation failure
subdir_rules.mk:16: recipe for target 'cla_ex1_background_task_cla.obj' failed
 
INTERNAL ERROR: C:\ti\ccsv8\tools\compiler\ti-cgt-c2000_18.1.1.LTS\bin\accla.exe experienced a segmentation fault
                  while processing function (unknown or file scope) file (unknown) line 0
 
This is caused by a defect in the TI 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

I am also attaching the pp file.cla_ex1_background_task_cla.pp.txt

  • Our compiler expert will be able to comment more tomorrow however maybe I can help with using the latest compiler in CCSv8.

    The latest C2000 compiler is 20.2.1.  Is that the version that you installed?  I just installed this into my CCSv8.1 installation by going to Help -> Install Code Generation Compiler Tools.  I then selected the C2800 20.2.1 compiler.  CCS has to restart as part of the installation process.  After doing that I can see the compiler in the preferences:

    It is also available as a selection in my project options:

    Regards,

    John

  • These are compiler preferences.

    This is the path where the compiler got installed.

    I am not able to see the installed compiler, 20.2.1 LTS in compiler preferences.

  • Thank you for the test case.  I can reproduce the same behavior.  The compiler should not crash like that.  I filed the entry EXT_EP-9826 to have this investigated.  You are welcome to follow it with the link below in my signature.

    At the same time, there are errors in your code.  The CLA compiler does not support the full C language, but a subset.  Among the features not supported are function pointers, and making a function call from a background task.  For further details, please search the C28x compiler manual for the sub-chapter titled C Language Restrictions.  

    Thanks and regards,

    -George

  • Making a function call from a background task is supported I guess as I have used it. But the thing is I had to inline them and set optimization level to 1.

    So, there's no way to use function pointer from CLA. I will keep that in mind and will read the compiler guide as you suggested.

    Thank you.