Free tools to check compliance with MISRA C?

32.3k views Asked by At

Are there any open-source or free tools out there, that check the MISRA C compliance?

2

There are 2 answers

3
Throwback1986 On

Relatively speaking, PC-Lint is virtually free when compared to full-blown static analysis tools with MISRA compliance checks. Furthermore, I have found that PC-Lint does a better job of reporting than those expensive (i.e. >$20,000) tools.

2
begarco On

Cppcheck (free and open source) has an official addon allowing to check MISRA-C 2012 rules.

The way to do so:

  1. cppcheck --dump file.c
  2. python misra.py file.c.dump

You can simply find misra.py in your Cppcheck installation or here: https://github.com/danmar/cppcheck/blob/master/addons/misra.py