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 detection preprocessor directive needed for code composer studio for msp 430

 

Hi Team,

  Can u please let me know the compiler detection preprocessor directive for code composer studio for msp430.  As similar to _IAR_SYSTEMS_ICC_ for IAR.

Thanks for help 

  • For TI compilers you can use __TI_COMPILER_VERSION__.

    FYI, to see the full list of pre-defined macros, you can compile a null C program ("void main(void) { }") with the -ppm compiler option.  This will produce the file <filename>.pp which contains the macro definitions of all the pre-defined macros. 

  • Hi,

    As you mentioned in the above thread, I tried for the same with  CCS 4.2 compiler version.

    But the comipler  throwing out an error: option --preproc_macros is missing its parameter 'filename'.  

    Could You Please let me know, Where can I set a filename, So that I can able to compile and  to generate  filename.pp. Please find the attached image below. 

     

     

    Regards,

     Nagaraj Desai 

     

     

     

  • Nagaraj,

    This seems to be an issue with the compiler build settings GUI for the MSP430, I can duplicate it as well. I will submit this as an issue so it gets addressed in a future release.

    To workaround it for now, you can add the option manually to the command line by doing the following:

    Go to Project Properties->C/C++ Build->MSP430 Compiler, and in the Command window, add the option:

    "${MSP430_CG_ROOT}/bin/cl430" --preproc_macros="<your_desired_path>/file.pp"

    This will add the --preproc_macros option to the list of compiler options. Hope this helps.

  • FYI, the issue with the GUI display of the Preprocessor Analysis options for MSP430 is being tracked under bug # SDSCM00039206.

    You can track the status of this issue using the SDOWP link in my signature.