Compiler/TMS320F28335: C2000 Compiler Version problems

Part Number: TMS320F28335

Tool/software: TI C/C++ Compiler

We've moved one of our work stations from CCS V6.0.1.00040 with compiler  C2000 TI v6.2.7 to CCS  V6.2.0.00050 and compiler c2000_15.12.3.LTS, it compiles and runs fine on the early vertsion but on the newer version we are getting compiler failure as shown below:

>> Compilation failure
source/subdir_rules.mk:91: recipe for target 'source/Phase_A_Controller.obj' failed
"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/_defs.h", line 187: warning #328-D: "inline" is not allowed
"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/_defs.h", line 188: error #66: expected a ";"
"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/math.h", line 252: warning #12-D: parsing restarts here after previous syntax error
1 error detected in the compilation of "../source/Phase_A_Controller.c".
gmake: *** [source/Phase_A_Controller.obj] Error 1
gmake: Target 'all' not remade because of errors.

looking at _defs.h, which is a TI file, the relevant code is shown below:-

187 _CODE_ACCESS __inline int __isfinitef(float f)
 188 { return __FLOAT_BIASED_EXP_IS_MAX(f) == 0; }

  I can't see anything obvious and looking through the forums I again can't find any reference to why 'inlines' are not allowed. Copying the older compiler into the compiler folder with the new CCS version and selecting this as the compiler options works, but I'm not happy about releasing this until I find out what is happening.

Best regards

Tony

6 Replies

  • Please show all the build options, exactly as the compiler sees them.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    Hi George,

    Thanks for taking an interest, here are the compiler options set when using  compiler c2000_15.12.3.LTS:-

    -v28 -ml -mt --float_support=fpu32 --opt_for_speed=5 --fp_reassoc=off --include_path="C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include" --include_path="../include" -g --define="_DEBUG" --define="LARGE_MODEL" --display_error_number --diag_wrap=off --diag_warning=225 --asm_listing

    and the linker options are:-

    -v28 -ml -mt --float_support=fpu32 --opt_for_speed=5 --fp_reassoc=off -g --define="_DEBUG" --define="LARGE_MODEL" --display_error_number --diag_wrap=off --diag_warning=225 --asm_listing -z -m"droop.map" --stack_size=0x300 --warn_sections -i"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include" -i"C:/Users/Toshiba/workspace_V6_0/Cockle_output" --reread_libs --display_error_number --diag_wrap=off --xml_link_info="Cockle_output_linkInfo.xml" --rom_model

    This produces :-

    'Building file: ../source/Phase_A_Controller.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --opt_for_speed=5 --fp_reassoc=off --include_path="C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include" --include_path="../include" -g --define="_DEBUG" --define="LARGE_MODEL" --display_error_number --diag_wrap=off --diag_warning=225 --asm_listing --preproc_with_compile --preproc_dependency="source/Phase_A_Controller.d" --obj_directory="source"  "../source/Phase_A_Controller.c"

    >> Compilation failure
    source/subdir_rules.mk:91: recipe for target 'source/Phase_A_Controller.obj' failed
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/_defs.h", line 187: warning #328-D: "inline" is not allowed
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/_defs.h", line 188: error #66: expected a ";"
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/math.h", line 252: warning #12-D: parsing restarts here after previous syntax error
    1 error detected in the compilation of "../source/Phase_A_Controller.c".
    gmake: *** [source/Phase_A_Controller.obj] Error 1

    and an error.

    Using compiler c2000_6.2.7 we get

    -v28 -ml -mt --float_support=fpu32 --opt_for_speed=5 --fp_reassoc=off --include_path="C:/ti/ccsv6/tools/compiler/c2000_6.2.7/include" --include_path="../include" -g --define="_DEBUG" --define="LARGE_MODEL" --diag_warning=225 --display_error_number --diag_wrap=off --asm_listing

    This produces:-

    'Building file: ../source/Phase_A_Controller.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/c2000_6.2.7/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --opt_for_speed=5 --fp_reassoc=off --include_path="C:/ti/ccsv6/tools/compiler/c2000_6.2.7/include" --include_path="../include" -g --define="_DEBUG" --define="LARGE_MODEL" --diag_warning=225 --display_error_number --diag_wrap=off --asm_listing --preproc_with_compile --preproc_dependency="source/Phase_A_Controller.d" --obj_directory="source"  "../source/Phase_A_Controller.c"
    'Finished building: ../source/Phase_A_Controller.c'

    with no errors.

    I'd be grateful for any ideas.

    Thanks and best regards

    Tony

  • In reply to Tony Lakin:

    Unfortunately, I am unable to reproduce ...

    Tony Lakin
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/_defs.h", line 187: warning #328-D: "inline" is not allowed
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/_defs.h", line 188: error #66: expected a ";"
    "C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include/math.h", line 252: warning #12-D: parsing restarts here after previous syntax error

    The file _defs.h does not have the keyword inline on line 187, but __inline.  I wonder if your copy of _defs.h is corrupted.  Please attach it to your next post.  So the forum will accept it, add the file extension .txt.  

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    _defs.txtHi George,

    Here is the _defs.h file

    Best regards

    Tony

  • In reply to George Mock:

    Do you have a definition of __inline somewhere in your program? Perhaps "#define__inline inline" or "-D__inline=inline"?
  • In reply to Archaeologist:

    Your copy of _defs.h is fine. So that is not the problem.

    The suggestion by Archaeologist is a good one.  Another way to see the problem ... Build with --gen_acp_raw and inspect the resulting .rl file.  Search for instances of inline.  You should be able to find out whether __inline gets changed to inline, and where that occurs.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.