Documentation

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:

  • LDRA Testbed®from LDRA Software Technology. For information about installing and using this tool, go towww.ldra.com

    The software supports LDRA Testbed code coverage for SIL and PIL.

  • BullseyeCoveragefromBullseye Testing Technology。installi信息ng and using this tool, go towww.bullseye.com

    The software supportsBullseyeCoveragecode coverage for SIL and, in certain cases, PIL.

To configure a code coverage tool for a top-model orModelblock SIL or PIL simulation, in the Configuration Parameters dialog box, select theVerificationpane:

  1. From theThird-party tooldrop-down list, select a tool, for example,BullseyeCoverageorLDRA Testbed

  2. ClickConfigureto open the Code Coverage Settings dialog box.

  3. In theInstallation folderfield, specify the location where your coverage tool is installed. If you clickBrowse, 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 hasModelblocks, these parameters of the top model override the corresponding parameters of referenced models.

  4. ClickOK。You return toVerificationsettings.

  5. To view cumulative code coverage results within a code generation report, in theReportpane of the Configuration Parameters dialog box, select these check boxes:

    • Create code generation report

    • Open report automatically

  6. ClickOK

With LDRA Testbed:

  • 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