Other Parts Discussed in Thread: CCSTUDIO
I'm working on setting up the code analyzer (CDT Codan) on a CCS project, which works as expected within the CCS GUI. However, I encounter the following errors when attempting to run Codan from the command line:
${CCS_INSTALL_DIR}/ccs/eclipse/eclipse -noSplash -data ${CCS_WORKSPACE_DIR} -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import ${CI_PROJECT_DIR}Create.Opening 'H60-MCU-POC'.$ ${CCS_INSTALL_DIR}/ccs/eclipse/eclipse -noSplash -data ${CCS_WORKSPACE_DIR} -application org.eclipse.cdt.codan.core.application H60-MCU-POC -consoleLog!SESSION 2022-03-14 19:22:26.214 -----------------------------------------------eclipse.buildId=4.19.0.I20210303-1800java.version=11.0.13java.vendor=Eclipse AdoptiumBootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_USFramework arguments: -application org.eclipse.cdt.codan.core.application H60-MCU-POCCommand-line arguments: -os linux -ws gtk -arch x86_64 -data /ti/ccs/workspace -application org.eclipse.cdt.codan.core.application H60-MCU-POC -consoleLog!ENTRY com.ti.common.core 1 0 2022-03-14 19:22:27.399!MESSAGE path=ccs_base/DebugServer!ENTRY com.ti.common.core 1 0 2022-03-14 19:22:27.401!MESSAGE debugServerDir=/ti/ccs/ccs_base/DebugServer!ENTRY org.eclipse.core.jobs 4 2 2022-03-14 19:22:30.017!MESSAGE An internal error occurred during: "Extracting executable file checksum".!STACK 0java.lang.IllegalStateException: Workbench has not been created yet. at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:102) at com.ti.ccstudio.project.ui.internal.navigator.CRCLabelDecorator$1.run(CRCLabelDecorator.java:146) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)!ENTRY org.eclipse.core.jobs 4 2 2022-03-14 19:22:30.336!MESSAGE An internal error occurred during: "Refreshing built-in compiler settings".!STACK 0java.lang.NullPointerException at com.ti.ccstudio.project.core.internal.ProjectCorePlugin.log(ProjectCorePlugin.java:270) at com.ti.ccstudio.project.core.internal.build.CCSLanguageSettingsProvider$CompilerSettings.loadCoreSymbols(CCSLanguageSettingsProvider.java:710) at com.ti.ccstudio.project.core.internal.build.CCSLanguageSettingsProvider$CompilerSettings.updateSymbols(CCSLanguageSettingsProvider.java:557) at com.ti.ccstudio.project.core.internal.build.CCSLanguageSettingsProvider$CompilerSettings.update(CCSLanguageSettingsProvider.java:413) at com.ti.ccstudio.project.core.internal.build.CCSLanguageSettingsProvider$CompilerSettings$UpdateJob.runInWorkspace(CCSLanguageSettingsProvider.java:346) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)!ENTRY org.eclipse.core.resources 2 10035 2022-03-14 19:22:30.361!MESSAGE The workspace will exit with unsaved changes in this session.
This occurs both on a Linux machine (from which the log above is taken) and on a separate machine running Windows 11. I'm able to compile the project on both machines using either the GUI or command line without issues, so I know that CCS is installed correctly.
This appears to be an issue that exists in the grey area between CCS and Eclipse, as I realise that there is no CCS-specific headless command to run the CDT Codan tool. To get around this, I'm attempting to first import the CCS project as a regular Eclipse project before running the Codan application, but nonetheless the errors I am encountering are related to com.ti.ccstudio.project.core.internal.
Any help would be appreciated!