Integrating Klocwork with Wind River Workbench
Integrating Klocwork with Wind River WorkbenchIf you are using the Klocwork tools integrated with Wind River Workbench, the process is automatic for projects created in Wind River. The steps below are for projects that were created outside of the Wind River environment. Configuring simple projectsThese instructions are for individual, unstructured projects. If you are using a hierarchical subproject/superproject structure, see configuring structured projects. Rebuild and refresh the project. To do an incremental build, right-click your project and select Build Project. To do a full build, right-click your project and select Rebuild Project. In order to get the full build specification, you'll need to do a full build.
Note: Before you run analysis, you need to specify your license settings.
Specify your build settings
The properties are saved for the selected project and used when you run your next analysis. You only have to specify build settings once for your project, as long as your updated build specification file remains in the same location.
Connect to a project on the Klocwork ServerYou get the most from static code analysis when you connect a small local project to a larger project on the Klocwork Server. The small local project is analyzed quickly while incorporating Klocwork knowledge bases generated on the server where additional source files were analyzed (for example, shared libraries). Connecting to a server project also allows you to share issue status information with the integration build analysis and among team members. You can run a standalone desktop analysis, but the analysis only derives knowledge from the local project's source files. You perform this step only once for each project.
Configuring structured projectsThese instructions are for structured projects. If you are using an unstructured projects, see configuring unstructured projects. When you have a subproject/superproject structure in Wind River Workbench, the build settings you generate and specify for the superproject are applied to subprojects during the desktop analysis. Additionally, in a structured project hierarchy, Klocwork configuration settings, such as enabled or disabled checkers, are pulled from the Klocwork Server project that is connected to the superproject and applied to all projects in your hierarchy.
Specify your build settings for your superprojectRebuild and refresh your superproject. Klocwork will collect build information for all projects and analyze files from both the superproject and all subprojects. In order to view the defects, you need to select the superproject. The properties are saved for the selected project and used when you run your next analysis. You only have to specify build settings once for your project, as long as your updated build specification file remains in the same location. These build settings are applied to the superproject and all subprojects in your structure each time the desktop analysis runs. You can have a specific build specification for subprojects by specifying a build specification file, but all UI settings are still taken from the top project preferences page. Note: Before you run analysis, you need to specify your license settings.
If you need to start multiple builds, you can right-click your project and select Build options > Build Enabled Build Specs. If analysis is run while the native build is running, it will use the configuration from the last analysis.
Viewing detected issues in project structures and shared subprojectsYou may notice different issues in the list for the same file when referenced superprojects have different checkers enabled or disabled. For example, if the same library is referenced from two different superprojects, the defects that display in the Klocwork Issues view (or in the editor) for the library files depend on the settings from the last selected superproject. Next step: Connect to a project on the Klocwork Server. Important: You only connect your superproject to the project on the Klocwork Server. TroubleshootingThe build instrumentation does not work out-of-the box for the following project types:
These projects are using the "make" command by default, while other Wind River projects are using "%makeprefix% make". The build instrumentation relies on "%makeprefix%. The workaround is to add "%makeprefix%" manually:
|