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.

MISRA on CCS 11 support

Hello, how do I get MISRA support on Code Composer Studio 11? I compiled a project that had MISRA checks from CCS10, opened it in CCS11 and got the warning "Misra checking is no longer supported"

MISRA is handy for increasing code quality.

  • Derek,

    MISRA support is dependent on the compiler being used.  Which compiler are you using with CCSv10 (i.e. something like Arm 20.2.5)?  If you use that same version in CCSv11 then MISRA checking is present.

    These screen captures are from CCSV11.1.0.

    Here you can see my compiler version:

    MISRA options still available:

    I have another project for a C2000 device.  If I move it to the 21.0.0 compiler I can see that the options are gone.

    If I change that project back to use the 20.2.5 compiler then the options are available.

    The natural next question is why has support been removed?  Our MISRA support was quite out of date.  At this point, we recommend using a specialized 3rd party tool (many available) for performing complete MISRA checking.

    Regards,

    John

  • Hello, I'm using the MSP430 compiler. It was there in CCS10, that used the MSP430 v20 compiler, but not in the v21.6.0.LTS compiler included in CCS11. 

    Can you please consider adding it back in? We use a subset of the MISRA standards in all our projects to catch dumb errors. It's very convenient when built into the compiler.

    Also, what 3rd party MISRA checking tool would work best? Are there any that integrate into CCS?

    Compilers have gotten much smarter and more efficient over the years but they still lack a lot of features to help developers write better code. Things like MISRA and other static checking should just be built into the compiler. It's just text analysis. Also when compiling, it would be handy for the compiler to flag functions that never get called, etc. Work smarter not harder.

  • Derek,

    If you still have your CCSv10 install you can point CCSv11 to that compiler and it will use it.  You can tell CCS where compilers are installed in the preferences here:

    If you don't have CCSv10 still installed you can download additional compilers by going to the help menu and selecting "Install code generation compiler tools".  Type MSP in the filter box to reduce the results.  The compiler you are looking for will be there:

    As far as 3rd Party tools that off this support a few I would suggest looking at are:

    • VectorCAST
    • ParaSoft
    • LDRA

    Regards,

    John

  • I really wish that MISRA support would be included directly in CCS; I would even be willing to pay for an "advanced" version of CCS that includes this. I started investigating VectorCast, LDRA, etc. and it's a pain. Nobody publishes prices directly; I need to set up a bunch of meetings. And some of them want me to use a separate IDE which I don't want to do.

    It's worth noting that MISRA is not just useful for tightly controlled industries like automotive & medical; it's very useful for improving overall code quality. I don't enable all the rules because some of the libraries we use (like TI driverlib) are not compliant. Increasing code quality is good; I ask you to please consider adding it back to CCS.

  • I investigated these - they run about $5,000 USD or more each. Do you know of any lower cost solutions, preferably something that integrates with CCS nicely?

  • ParaSoft C/C++ Test used to have pretty good integration with CCS.  A lot of these tools are expensive.  Companies put a lot of effort into ensuring that they work correctly.

    PC-lint used to have a free version.  Not sure if that tool is still supported.  https://gimpel.com/

  • Hello, I looked into these too. They're all (including PC-Lint) $5k and up unfortunately.