Could not initialize cppcheck for project

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Could not initialize cppcheck for project

29 次查看
rshipman
Senior Contributor I

Hi,


I've just tried to install the ccpcheck plugin etc and it refuses to run:

I get this error:

Could not initialize cppcheck for project...

Here is the exception stack trace:
java.lang.NullPointerException: Cannot invoke "org.eclipse.core.runtime.IPath.toFile()" because the return value of "org.eclipse.cdt.core.settings.model.ACPathEntry.getLocation()" is null
at com.googlecode.cppcheclipse.ui.ToolchainSettings.getIncludes(ToolchainSettings.java:182)
at com.googlecode.cppcheclipse.ui.ToolchainSettings.getUserIncludes(ToolchainSettings.java:88)
at com.googlecode.cppcheclipse.core.Checker.<init>(Checker.java:81)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.initChecker(Builder.java:164)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.processFile(Builder.java:199)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.visit(Builder.java:122)
at org.eclipse.core.internal.resources.Resource.lambda$1(Resource.java:154)
at org.eclipse.core.internal.resources.Resource.lambda$0(Resource.java:122)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:135)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:131)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:92)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:154)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:142)
at com.googlecode.cppcheclipse.ui.Builder.processResource(Builder.java:306)
at com.googlecode.cppcheclipse.ui.commands.RunCodeAnalysis$RunCodeAnalysisJob.runResource(RunCodeAnalysis.java:26)
at com.googlecode.cppcheclipse.ui.commands.ResourceSelectionJob.run(ResourceSelectionJob.java:44)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Info:
MCUXpresso IDE v24.12 [Build 148] [2025-01-10]

I downloaded Cppcheck 2.18 from here: https://cppcheck.sourceforge.io/
I followed these instructions: https://github.com/cppchecksolutions/cppcheclipse/wiki/Installation
I added cppcheck path to PATH environment variable and restarted MCUXpresso.

Any ideas please?

标记 (2)
0 项奖励
回复
1 回复

11 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @rshipman,

I'm afraid this is outside of NXP's support scope, since it is related to an Eclipse level plugin, rather than a MCUXpresso IDE issue.

I recommend you take a look at the following links:
Static Code Analysis Tool cppcheck on MCUXpresso IDE - NXP Community
java.lang.NullPointerException: Could not initialize cppcheck for project lib-ltc · Issue #98 · kwin...

BR,
Edwin.

0 项奖励
回复