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-C option in ccs v4.2?



?span style="font:7.0pt "Times New Roman"">       

o  New project wizard page allowing users to select an example project to start with.
Currently, examples include simple Hello World type examples and SYS/BIOS examples for targets that support SYS/BIOS.

o  Added MISRA-C option support

o  Significantly improved simulator bring-up performance when connected to the network

but i don't find the MISRA-C option when i use ccs v4.2 to compiler tms570 project.

where's the MISRA-C option ?

MISRA-C option is a very useful function to my project.

IDE

 

  • Yang,

    The MISRA-C support included in CCS4.2.0 RC1 is currently limited to MSP430 devices. The ARM support is still under internal development but unfortunately I am not sure when it will be included in a production release.

    I will move your post to the code generation tools forum since the experts there may have additional details on this, ok?

    Best regards,

    Rafael

  • For our CCSv4.1.2 we apply MISAR using the following guidelines.

     

     

    Compiler options to enable MISRA check in the CGT:

    --check_misra=[all | required | advisory | none | <rulespec>] 

        <rulespec>: comma-separated list of the following specifiers:

          - [-]X      Enable (or disable) all rules in topic X.

          - [-]X-Z    Enable (or disable) all rules in topics X through Z.

          - [-]X.A    Enable (or disable) rule A in topic X.

          - [-]X.A-C  Enable (or disable) rules A through C in topic X

     

        Example: --check_misra=1-5,-1.1,7.2-4

          - checks topics 1 through 5

          - disables rule 1.1 (all other rules from topic 1 remain enabled)

          - checks rules 2 through 4 in topic 7

         

    --misra_required=[error | warning | remark | suppress]

          Sets the diagnostic severity for required MISRA-C:2004 rules

     

    --misra_advisory=[error | warning | remark | suppress]

          Sets the diagnostic severity for advisory MISRA-C:2004 rules

     

    Associated pragmas:

    #pragma CHECK_MISRA("all | required | advisory | none | <rulespec>")

    This pragma can be used to enable/disable MISRA-C:2004 rules at the source level. The string accepts the same format as the --check_misra option.

       

    #pragma RESET_MISRA("all | required | advisory | <rulespec>")

    This pragma will reset the specified MISRA-C:2004 rule(s) to the state they were before any CHECK_MISRA pragmas were processed. For instance, if a rule was enabled on the command line but disabled in the source, the RESET_MISRA pragma can be used to reset it to enabled. This pragma accepts the same format as the option, except for the "none" keyword and '-' operator.

     

  • MISRA support will be introduced in ARM compiler beta release v4.8.x.  This beta release (not a final production release) will be available in a few weeks.  Would you be interested in trying it out?

    Thanks and regards,

    -George

     

  • Yang,

    You may want to try manually adding the option in the tool settings tab "expert settings" dialog box.

    Add the MISRA related options to the "command line pattern" as in this example:

             ${command} ${flags} --check_misra=all ${inputs}

    Regards,

    Clint