Now that Splint is part of WinAVR (20100110) I thought I'd give it a go. But for the life of me I cannot get it to see the LARCH_PATH:
D:\test>splint -D__AVR_ATmega16__ -IC:\WinAVR-20100110\avr\include -larchpath c:\WinAVR-20100110\share\splint\lib -lclimportdir c:\WinAVR-20100110\share\splint\imports -unrecogcomments test.c Splint 3.1.2 --- 07 Jan 2010 Cannot find standard library: standard.lcd Check LARCH_PATH environment variable. test.c: (in function main) test.c:17:8: Test expression for while not boolean, type int: 1 Test expression type is not boolean or int. (Use -predboolint to inhibit warning) test.c:3:18: Variable exported but not used outside test: global_r18 A declaration is exported, but not used outside this module. Declaration can use static qualifier. (Use -exportlocal to inhibit warning) Finished checking --- 2 code warnings
That's just one of many tries I've made - this time using -larchpath and I know that standard.lcd is in the named directory but whether I use this or the LARCH_PATH environment var I cannot make the warning about standard.lcd disappear.
Anyway the above shows a few useful things such as the fact that you have to manually make the -D for the architecture selector that would usually be made by -mmcu= on the compiler command line.
It also shows that Splint does not like things like the Doxygen comment:
in stdint.h but this is over-ridden by -unrecogcomments
It also shows that you use -I (no space) to give the path where the AVR system headers are. Sadly it almost defaults to the right thing but uses "C:\Winavr\..." rather than "C:\Winavr20100110\..." where the WinAVR will actually be installed.
If anyone else "plays" with Splint, now it's there for everyone to use, perhaps you can add to this thread to say what you learned about its use too?
PS A tool like Lint or Splint is invaluable if you can make it work - so it's well worth exploring a bit.