Main Content

Create Project in Polyspace Desktop User Interface Using Configuration Template

This topic shows how to export and reuse a configuration in the user interface of the Polyspace® desktop products.

A configuration template is a predefined set of analysis options for a specific compilation environment.

Why Use Templates

Use templates to simplify your project setup. For instance, after you configure a project for a specific compilation environment, you can create a template out of the configuration. Using the template, you can reuse the configuration for projects that have the same compilation environment.

When creating a new project, you can do one of the following:

  • Use an existing template to automatically set analysis options for your compiler.

    Polyspace software provides predefined templates for common compilers such as IAR, Kiel, Visual and VxWorks. For additional templates, see Polyspace Compiler Templates.

  • Set analysis options manually. You can then save your options as a template and reuse them later. You can also share the template with other users and enforce consistent usage of Polyspace Bug Finder™ in your organization.

Use Predefined Template

  1. Select File > New Project.

  2. On the Project – Properties dialog box, after specifying the project name and location, under Project configuration, select Use template.

  3. On the next screen, select the template that corresponds to your compiler. For further details on a template, select the template and view the Description column on the right.

    If your compiler does not appear in the list of predefined templates, select Baseline_C or Baseline_C++.

  4. On the next screen, add your source files and include folders.

Create Your Own Template

This example shows how to save a configuration from an existing project and create a new project using the saved configuration.

  • To create a template from a project that is open on the Project Browser pane:

    1. Right-click the project configuration that you want to use, and then select Save As Template.

    2. Enter a description for the template, then click Proceed. Save your template file.

      Suppose you create a Code Prover configuration template that runs Code Prover analysis to a precision level of 1 and a verification level of 1. See:

      You can enter this description for the template.

  • When you create a new project, to use a saved template:

    1. Select .

    2. Navigate to the template that you saved earlier, and then click Open. The new template appears in the Custom templates folder on the Templates browser. Select the template for use.

Sharing Project Templates

A configuration template stores all options set on the Configuration pane in the Polyspace desktop user interface. If you share the template, another user who uses the template can benefit from those options.

Note however that options that refer to specific files point to their absolute paths. If a shared template sets one of those options, the corresponding file must also be shared. Preferably, the shared file must be in the same location as when the template was created, otherwise end-users have to modify the template to point to a new location. If you set one of those options in a configuration template that is meant to be shared with other users, make sure that the corresponding file is in a location accessible to the end-users. Some common options that refer to specific files are:

Related Topics