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 rules missing in the CCS dialog window

Other Parts Discussed in Thread: TMS570LS3137

Rule 6.3 and Rule 19.15 are missing in the dialog window (Project=>Properties=>CCS Build=>ARM Compiler=>MISRA-C:2004)

I am building for the TMS570LS3137 on CCS Version 5.2.1.00018 (Update made on Aug-13-2012)

  • Some MISRA rules are not checked by the compiler.  The file misra.txt lists which rules are checked.  It is located in the root directory of the compiler installation.  A typical path for this file is:

    C:\Program Files\Texas Instruments\ccsv5\tools\compiler\tms470\misra.txt

    You will see that rules 6.3 and 19.15 are not listed in that document.

    Thanks and regards,

    -George

  • I am having my team of engineers use this great built-in feature during development and the customer seems to like the idea of reducing many hours in coding standard meetings by tailoring their coding standards to include many of the rules.  I have come across the same issue by turning all advisory rules on and getting many errors.

    I found the misra text document and you are correct that 6.3 is not listed, but the check for 6.3 is being excercised...

    "../Source/uart.c", line 1925: warning #1498-D: (MISRA-C:2004 6.3/A) typedefs that indicate size and signedness should be used in place of the basic numerical types

    ...and since the GUI checkbox is not there - I am unable to turn rule 6.3 on/off in the same manner as other rules.  I assume, this will likely be fixed in a future release, but is there a way to add a [-6.3] to the compiler command line in the meantime?

     

  • steve spaeth said:
    I am unable to turn rule 6.3 on/off in the same manner as other rules.

    I filed SDSCM00045280 in the SDOWP system to address this issue.  Feel free to follow it with the SDOWP link below in my signature.

    steve spaeth said:
    is there a way to add a [-6.3] to the compiler command line in the meantime?

    You can manually add it to the build options.  First, disable all misra checking.  Then manually add in the desired --check_misra option.  Details on that option are in the section titled Using MISRA-C:2004 in the ARM compiler manual.  In the screen shot below, I enable all misra checks, except for rule 6.3.

    Thanks and regards,

    -George



  • This issue was fixed based on earlier SDSCM00042570.

    4.9.3 and later releases have the fix.

    You can check your compiler version with:

    % cl430 --tool_version

    Greg

  • Rule 19.15 are missing in the dialog window (Project=>Properties=>CCS Build=>C600Compiler=>MISRA-C:2004)

    I am using CCS5.1.09 ver  compiler 7.3 ver , even in this the problem exists . How to disable 19.15 Rule?

    I gave option in command line as indicated by you in earlier post but still its not getting disabled .

    Thanks 

    Akshatha

  • Akshatha,

    Sorry you are still dealing with this.

    Which 7.3 patch release do you have?

    7.3.3 and later versions have the fix.  I'd recommend upgrading to the latest release.  Please let me know especially if you already have 7.3.3+ (might indicate an issue with how CCS caches options to build the option GUI).

    Regarding George's earlier work around.  There's an issue with putting the check_misra in "command" box versus "command-line pattern" box.

    If you do below, and have misra options all checked, or even just rule 6 checked, you get something like this.  The 2nd check_misra entry overrides the first so you just get all rules.

                     cl6x  ....   --check_misra=all,-6.3   ....   --check_misra=all  .....   files

    Instead try doing below.  It places your overrides at end of options.  You get this:

                     cl6x  ....      ....   --check_misra=all  .....   files    --check_misra=all,-6.3

    Please let me know what compiler version you are using so I can rule out any possible CCS issues.

    Thanks

    Greg

  • Thanks Greg,

    I updated the compiler to latest version and now this got fixed .

    Thanks,

    Akshatha