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: MISRA Support for C2000 support package in Matlab/Simulink

Tool/software: TI C/C++ Compiler

Hello,

I am trying to turn on the code generation MISRA C check option for my Ti compiler from within Simulink, so that when I build my model the C2000 V6.4.6 Ti compiler runs the MISRA checks on the generated C code. Note that I know how to turn on the MISRA C checks for my models (which is a Simulink built-in feature and has nothing to do with Ti compiler); what I want to do is to turn on the MISRA checks on the generated C code when the Ti compiler is called during the build process.

thanks

Shahin

  • I am not familiar with Simulink.  But I can tell you the TI compiler option to enable MISRA checks is --check_misra.  Please search for it in the C2000 compiler manual.

    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.

  • Hi,

    You can specify the compiler flags at:

    Venkatesh Chilapur   | MathWorks

  • In reply to venkatesh chilapur:

    Hi - I have used '--check_misra=all' (which is also the same command used in CCS) in the 'C Compiler' section and that seems to have done the trick! Loads of MISRA warnings to keep me busy now! Thanks all for contributing.

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.