Since cppcheck is integrated with MCUXpresso, it causes MCUXpresso to crash, which I have to manually it. As I said the crash is related to cppcheclipse configuration, I am not sure how to configure it from cppcheckgui or its command line version exactly as I did from MCUXpresso.
Attached is the configuration I am currently using, apparently it gives me the good results. Please refer to the attachment.
cppcheck --enable=all --inconclusive --library=posix --force --verbose --xml <your include paths in CDT> <path to your code>
Just an idea to get the exact command line.. maybe you could make a small command line utility that just prints out the command line options and terminates. The replace the cppcheck binary with that utility. I would guess that your utility could output a fake empty report on stderr:
In one screenshot where the configuration is shown when it crashes it can be seen that debug (--debug) is enabled. Does this maybe cause crashes? Can you test with this option enabled and disabled?
The debug output normally is not interesting and not necessary, so i would not enable it.
I am not sure if Cppcheck is able to crash the IOConsole Updater of eclipse/cppcheclipse by itself. But there can be much debug output. Maybe this crahes the console? That would not be an error in Cppcheck i would say.
The latest cppcheck(1.88) integrated with MCUXpresso installed from Eclipse Marketplace , MCUXpresso is not crashed any more with the same configuration settings. Also I have tried the different settings, most of them are OK now. If I have all box checked then MCUXpresso still crashes as I reported previously, so I just avoid that(not reason for me to do so anyway).
The new issue I have is the folowing message:
Could not run cppcheck
“Resource ‘/*/nofile’ does not exist.
Not sure what is the ‘nofile’, and how to get rid the issue.
I have had issue to use cppcheck on MCUXpresso, and I have posted my questoins and findings on MCUXpresso Forum.
Bascially, the issue is related to configuration of cppcheck, if it is in one of a few configurations, it will cause MCUXpresso to crash.
Please refer to the link below
https://community.nxp.com/thread/496223
what tool is crashing? cppcheck? cppcheclipse? mcuxpresso?
can this crash be reproduced if you run cppcheck manually on the command line?
does cppcheck generate some unexpected output for you?
Last edit: Daniel Marjamäki 2019-02-23
Since cppcheck is integrated with MCUXpresso, it causes MCUXpresso to crash, which I have to manually it. As I said the crash is related to cppcheclipse configuration, I am not sure how to configure it from cppcheckgui or its command line version exactly as I did from MCUXpresso.
Attached is the configuration I am currently using, apparently it gives me the good results. Please refer to the attachment.
I don't know. Something like this:
Just an idea to get the exact command line.. maybe you could make a small command line utility that just prints out the command line options and terminates. The replace the cppcheck binary with that utility. I would guess that your utility could output a fake empty report on stderr:
In one screenshot where the configuration is shown when it crashes it can be seen that debug (
--debug
) is enabled. Does this maybe cause crashes? Can you test with this option enabled and disabled?The debug output normally is not interesting and not necessary, so i would not enable it.
I am not sure if Cppcheck is able to crash the
IOConsole Updater
of eclipse/cppcheclipse by itself. But there can be much debug output. Maybe this crahes the console? That would not be an error in Cppcheck i would say.Since cppcheclipse is an independent project maybe it makes sense to report the issue there?
https://github.com/kwin/cppcheclipse/issues
The latest cppcheck(1.88) integrated with MCUXpresso installed from Eclipse Marketplace , MCUXpresso is not crashed any more with the same configuration settings. Also I have tried the different settings, most of them are OK now. If I have all box checked then MCUXpresso still crashes as I reported previously, so I just avoid that(not reason for me to do so anyway).
The new issue I have is the folowing message:
Could not run cppcheck
“Resource ‘/*/nofile’ does not exist.
Not sure what is the ‘nofile’, and how to get rid the issue.