Click here to Skip to main content
16,018,525 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello, I want to know if there is a really good (yet free) software tool which can analyse my C code (which i have written based on PIC and 8051/52 controllers), can find possible coding mistakes and also check MISRA Compliance...


What I have tried:

I know about PC_LINT, LINT, SPLINT..
but never used them..do these fullfuil these requirements and if they are free and can also check MISRA_C compliance?
Posted
Updated 9-Mar-18 4:53am

1 solution

You wont find a good and free code analysis tool. Normally code analysis is included in the IDE in which you are programming.

The best way of avoiding bugs is to have some clear, simple and plain program flow. The parameter should be checked at input in your code (like when data is read from memory).

A very helpful step is always some peer review. When your peer understands your code than the controller may also be fine with it.

No code analysis will eliminate the bugs your program - for that you need to write some test functions with (known) edge cases like (-1, 0, "") or other random input. Fuzzing is also an option but it is a profi tool which need a lot of preparement.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900