0
\$\begingroup\$

If I need to do Static Code analysis of my code or check for Misra C compliance for my code in TI's CCS for MCU RM57 then how can I do that? I can see 'Code Analysis' in the project preferences but I don't know if these will comply to which standard?

CCS Code Analysis

\$\endgroup\$
  • 3
    \$\begingroup\$ this does not seem to be related to electronics design, but to software development \$\endgroup\$ – jsotola Jan 15 at 6:10
  • 1
    \$\begingroup\$ @jsotola I posted it here as on a general programming or software development forum the community there may not have used TI's CCS IDE or programmed an MCU bare metal and would not possibly provide help in this. \$\endgroup\$ – alt-rose Jan 15 at 6:15
  • \$\begingroup\$ Looking at the screenshot, the IDE seems to be based on Eclipse. You could make your question more general by asking how to check the compliance in Eclipse. That said, I would like to know the answer as well.. \$\endgroup\$ – olltsu Jan 15 at 6:48
  • 1
    \$\begingroup\$ Did you search for other static analyzers? They don't need to be/have an Eclipse plug-in, you can add the call to them to your build process. \$\endgroup\$ – the busybee Jan 15 at 7:21
  • \$\begingroup\$ I personally use the Barr group embedded coding standard which follows (to a great extent) the MISRA rules; I do not know if a plug-in has ever been done. barrgroup.com/embedded-systems/books/embedded-c-coding-standard \$\endgroup\$ – Peter Smith Jan 15 at 9:59
2
\$\begingroup\$

What you have there is just a plugin with some basic static analysis.
If you require MISRA you'll have to buy a tool, MISRA is proprietary and not available in open source kits.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Few really good static checker tools that you must consider:

  1. PC-Lint -> My personal favorite.
  2. LDRA

Both of these are highly customisable, where rules can be suppressed or enabled, and also can be integrated with TI CCS.

Using a static code checker conforming to rules like MISRA or CERT etc, can save a lot of potential bugs in the long run. Consider using one.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Strongly disagree. I've used these two in particular extensively and they are both very prone to give false positives. If you want a cheap low quality analyser then definitely go with Lint. It's as bad as LDRA but costs 10 times less. \$\endgroup\$ – Lundin Feb 12 at 11:55
  • \$\begingroup\$ Any other good suggestions that i can use beside those two ? \$\endgroup\$ – AlphaGoku Feb 18 at 11:41
  • \$\begingroup\$ I don't really have any good experience with any static analyser on the market, so I only have anti-recommendations. I've only used Lint, LDRA and IAR and they are pretty much equally broken. And they all charge you support money for fixing the tool bugs that you found for them free of charge, in the non-conforming product you already paid for... \$\endgroup\$ – Lundin Feb 18 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.