Static code analysis

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I was wondering if any of you knows of a product for static code analysis which works with the at32uc3 parts (does not necessarily need to be integrated into Atmel Studio 6).

P.S.: I would have done a search if there is already such a question, but the search gave me "zero sized result", which looked like a "something went wrong" error message.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

CppCheck is available as a free download for AS6. Works nicely, but is not completely foolproof. Otherwise, it does help find most common code problems. Well worth using in my opinion.

Another free download is Naggy. Naggy does not recognize some elements of the AVR-LibC functions, but for the most part does flag some very common problems.

Both are available as extension downloads for Studio 6, and I would recommend both. Hopefully Naggy will at some point be able to recognize more of the Library functions better .

Jerry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also consider split which is also "free" or if you want "industrial strength" code analysis get lint from Gimpel software.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Thanks to both of you for your suggestions. I saw that Naggy was already installed :). I additionally installed cppcheck and will try it out on the next project.

I also checked out splint (I guess you meant splint, right?) but unfortunately it's only available for unix-oides :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

somnatic wrote:
I also checked out splint (I guess you meant splint, right?) but unfortunately it's only available for unix-oides :(
https://github.com/maoserr/splint_win32/downloads
Ref.
The following is one use of some commercial static code analyzers:
How to enforce coding standards automatically by Michael Barr (embedded.com; July 27, 2011).

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or run a VM with Linux in it. Share folder between Windows and Linux and you can run the tool in Linux to test the files that are really in Windows. (which is exactly how I run splint (spelled it right this time!)).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow, so there is a Win32 port - and I thought since the website says there isn't, there isn't :)

Also, great article, thanks for the hint.