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.

  • Resolved

Compiler/AWR1642: Mixed C/C++ source files, compiler flags, excessive template recursion, and Trig Transcendentals

Part Number: AWR1642

Tool/software: TI C/C++ Compiler

Hey guys and gals,

I'm developing on the C674x side of the AWR1642, and I require a lot of constants that are based trig transcendental functions. During my first pass, it seemed that the compiler was not simplifying the trig constants which I would normally expect out of a compiler.

In response I started working with a handful of Template Functions which should make good enough approximations (Taylor Series of depth 8-10), however, it seems that I'm hitting the 512 depth limit when I recurse through my array. I've seen a few posts for flags like --pending_instantiations=0 and --static_template_instantiation which should suffice. However, when I add these flags, I run into an issue where the C source files, which comprise the majority of my project, refuse to compile.

Is there a way to specify that my C++ files use the --pending_instantiations=0 or --static_template_instantiation flags, then link to the remainder of my C files?

I'm currently using Code Composer Studio Version: 7.3.0.00019

  • Alex Shirley
    However, when I add these flags, I run into an issue where the C source files, which comprise the majority of my project, refuse to compile.

    I'd appreciate if you would show the diagnostics you see when this happens.

    Alex Shirley
    Is there a way to specify that my C++ files use the --pending_instantiations=0 or --static_template_instantiation flags, then link to the remainder of my C files?

    Please try this.  Remove the --pending_instantiations and --static_template_instantiations options from the general project settings.  Then use File Specific Options to add those options back on only the C++ files.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue 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:

    The compiler error for my C files looks like this:
    Command-line error #985: pending instantiations option can be used only when compiling C++
    1 catastrophic error detected in this compilation.
    Compilation terminated.
    gmake[1]: *** [radar_proc.oe674] Error 1

    Removing the flags and setting it for the individual file worked perfectly.
  • In reply to Alex Shirley:

    Alex Shirley
    Command-line error #985: pending instantiations option can be used only when compiling C++

    That's annoying.  So, I filed CODEGEN-4182 in the SDOWP system.  This entry does not report a bug, but requests that the compiler be changed.  The option --pending_instantiations should be ignored when compiling a C file.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue 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.

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.