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/OMAP-L138: Ti ARM CGT v18.12.2.LTS & Ti C6000 CGT v8.3.3.LTS compiler error when <vector> or <functional> included.

Part Number: OMAP-L138
Other Parts Discussed in Thread: CCSTUDIO, OMAPL138

Tool/software: TI C/C++ Compiler

I have been using Ti ARM CGT 18.1.5.LTS for my project which includes (#include <vector> and #include <functional>) for some time with this compiler but now I have switched to

the latest CCSTUDIO and using Ti CGT 18.12.2.LTS I get the following compiler errors (it's the same with Ti CGT 18.12.1.LTS ).

Comand line params:

-mv5e --code_state=32 -me --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" --define=DEVELOPMENT --define=omapl138 -g --c11 --c++14 --diag_warning=225 --diag_wrap=off --multithread --gen_cross_reference_listing --gen_preprocessor_listing --section_sizes=on

Errors:

no instance of overloaded function "std::__2::__c11_atomic_exchange" matches the argument list .ccsproject /MyArmProj line 1730, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-arm_18.12.2.LTS\include\libcxx\atomic C/C++ Problem

no instance of overloaded function "std::__2::__c11_atomic_exchange" matches the argument list .ccsproject /MyArmProj line 1733, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-arm_18.12.2.LTS\include\libcxx\atomic C/C++ Problem
no instance of overloaded function "std::__2::__c11_atomic_store" matches the argument list .ccsproject /MyArmProj line 1736, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-arm_18.12.2.LTS\include\libcxx\atomic C/C++ Problem
no instance of overloaded function "std::__2::__c11_atomic_store" matches the argument list .ccsproject /MyArmProj line 1739, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-arm_18.12.2.LTS\include\libcxx\atomic C/C++ Problem

I have also been compiling the same code for the DSP using Ti C6000 CGT 8.2.6.LTS successfully for some time, but now I have included (#include <vector> and #include <functional>) I have

needed to move to the Ti C6000 CGT 8.3.3.LTS this however is failing with the following errors.

Comand line params:

-mv6740 --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c6000_8.3.3/include" --define=omapl138 -g --c99 --diag_warning=225 --diag_wrap=off --multithread

Errors:

a template argument list is not allowed in a declaration of a primary template .ccsproject /MyDspProj line 5166, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-c6000_8.3.3\include\libcxx\memory C/C++ Problem
a template argument list is not allowed in a declaration of a primary template .ccsproject /MyDspProj line 5182, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-c6000_8.3.3\include\libcxx\memory C/C++ Problem
expected a ";" .ccsproject /MyDspProj line 5150, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-c6000_8.3.3\include\libcxx\memory C/C++ Problem
expected an identifier .ccsproject /MyDspProj line 3487, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-c6000_8.3.3\include\libcxx\memory C/C++ Problem
expected an identifier .ccsproject /MyDspProj line 4955, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-c6000_8.3.3\include\libcxx\memory C/C++ Problem
expected an identifier .ccsproject /MyDspProj line 5150, external location: C:\ti\ccs901\ccs\tools\compiler\ti-cgt-c6000_8.3.3\include\libcxx\memory C/C++ Problem
gmake: *** [MyDspProj.obj] Error 1 MyDspProj C/C++ Problem
gmake: Target 'all' not remade because of errors. MyDspProj C/C++ Problem

Is this a problem or am I missing something?

Thanks in advance,

Andy.

  • I'm not sure what is going on.  For each project, I'd appreciate if you would zip them up as described in the article Sharing Projects, then attach those zip files to your next post.

    Thanks and regards,

    -George

  • Thanks for your prompt reply George,

    With regard to the C6000 CGT v8.3.3 I just managed to get my project compiled and linked.

    I recreated the project using the required C6000 CGT v8.3.3 from the start and that seems to have done the trick. It appears that just changing the old project compiler version on the properties dialog doesn't do something! I have now gone back to the original project and found I can get it to work after changing the options from c99/none/c99 and c++14/c++03/c++14 (not sure of the exact sequence I used sadly). I'm not sure why this makes a difference as I noticed earlier --c++14 wasn't on the command line even though selected on the dialog. I tried adding it to the command line by editing it directly but this had no effect! It was only changing the values in the dialog that finally fixed it.

    So good news, my DSP project now builds so just the ARM one to fix.

    I will create a minimum ARM project exhibiting the issue when I return to work on Wednesday.

    Thanks,

    Andy.

  • Hi George,

    I finally managed to bottom it out today. There isn't a problem with the compiler, in fact its a very obvious error when you know why.

    It's all to do with defines of true and false in a file <hw_types.h> that is included in a 'C' library that my C++ project links with. The <hw_types.h> file comes from C:\ti\OMAPL138_StarterWare_1_10_04_01\include\hw and contains the following.


    #ifndef true
    #define true 1
    #endif

    #ifndef false
    #define false 0
    #endif

    This messes with the atomic.h parameter lists that use true and false.

    As I didn't want to change the StarterWare file I've just added the following before my includes of <vector> and <functional>

    #ifdef true
    #undef true
    #endif
    #ifdef false
    #undef false
    #endif

    This has done the trick (I don't know if there is a better way of doing this but unless I really have to I prefer not to change third party files).

    Thanks for your help and sorry I didn't see it before I posted (though initially it happened after changing to the new compiler and the code still built with the previous version. It should have crossed my mind that with the updates to C++14 anything could happen).

    Thanks again,

    Andy.