Skip to main content

IAR Embedded Workbench for RISC-V 3.40

Getting started using code coverage

In this section:
To get started using code coverage:
  1. Before you can use the code coverage functionality, you must build your application using these options:

    Category

    Setting

    C/C++ Compiler

    Output>Generate debug information

    Linker

    Output>Include debug information in output

    Table 22. Project options for enabling code coverage


  2. After you have built your application and started C-SPY, choose View>Code Coverage to open the Code Coverage window.

  3. Click activateButton.pngthe Activate button, alternatively choose Activate from the context menu, to switch on code coverage.

  4. Start the execution. When the execution stops, for instance because the program exit is reached or a breakpoint is triggered, the code coverage information is updated automatically.