Main Content

Configure Code Coverage with Third-Party Tools

During a top-model or Model block SIL or PIL simulation, you can collect code coverage metrics for generated code using a third-party tool. Embedded Coder® supports the following tools:

  • The LDRA tool suite from LDRA Software Technology. For information about installing and using this tool, go to https://ldra.com.

    The software supports LDRA code coverage for SIL and PIL.

  • BullseyeCoverage from Bullseye Testing Technology. For information about installing and using this tool, go to www.bullseye.com.

    The software supports BullseyeCoverage code coverage for SIL and, in certain cases, PIL.

    Note

    SIL and PIL simulation support for BullseyeCoverage will be removed in a future release.

To configure a code coverage tool for a top-model or Model block SIL or PIL simulation, in the Configuration Parameters dialog box, select the Verification pane:

  1. From the Third-party tool drop-down list, select a tool, for example, BullseyeCoverage or LDRAcover or LDRA tool suite.

  2. Click Configure to open the Code Coverage Settings dialog box.

  3. In the Installation folder field, specify the location where your coverage tool is installed. If you click Browse, the Select Installation Folder dialog box opens, which allows you to navigate to the folder where your coverage tool is installed. The software detects and displays the tool version.

    By default, the following parameters are enabled:

    • Code coverage for this model — Generate coverage data for the current (top) model.

    • Code coverage for referenced models — Generate data for models referenced by the current (top) model.

    If your top model has Model blocks, these parameters of the top model override the corresponding parameters of referenced models.

  4. Click OK.

With the LDRA tool suite:

  • The evaluation of cumulative code coverage begins from the point when you last added a new file to the existing set of source files. For example, existing code coverage results are deleted when you:

    • Run a simulation with a new model using the existing code generation folder.

    • Run a simulation that results in additional source code files being instrumented.

  • If you switch between SIL and PIL simulations of a model, the software generates separate cumulative code coverage results for the SIL and PIL simulations.

For a model in a reference hierarchy, the software does not support simultaneous function execution time measurement and code coverage.

Related Topics

External Websites