2.15.2 Display coverage measurement results

Coverage measurement starts (ends) automatically with the start (end) of the program execution.

(1)

Code coverage rates

(a)

Display of code coverage rates for source lines and disassemble lines

The code coverage rates are indicated on the Editor panel or Disassemble panel that is displaying the target program.

On each panel, the target source text lines and disassembled result lines are shown in color-coded background (see Table 2.19) according to their code coverage rate that was calculated based on the formula described in Table 2.18.

The results are not shown when disconnected from the debug tool or during the program execution.

Selecting [Clear coverage information] from the context menu will reset all the coverage information acquired, including the color coding on each panel.

Table 2.18

Calculating Code Coverage Rates for Source Lines and Disassemble Lines

Panel

Calculation method

Editor panel

Number of bytes executed in the address area corresponding to the source line / Total number of bytes present in the address area corresponding to the source line

Disassemble panel

Number of bytes executed in the address area corresponding to the disassembled result line / Total number of bytes present in the address area corresponding to the disassembled result line

Table 2.19

Color-coded Code Coverage Measurement Results (Default)

Code Coverage

Background Color

100 %

 

1 to 99 %

 

0 % (not executed)

 

Remark 1.

The code coverage measurement result displayed on each panel is updated at every program break.

Remark 2.

The above color coding rule is determined according to the settings in [General - Font and Color] category in the Option dialog box.

Remark 3.

The above color coding rule does not apply to the lines that are outside the target area (see "Table 2.17 Subject Areas of Coverage Measurements").

Remark 4.

The Editor panel will not display the code coverage measurement result in cases where the source file currently displayed is updated after the update of the downloaded modules.

Figure 2.164

Example of Code Coverage Measurement Results (Editor Panel)

Figure 2.165

Example of the Code Coverage Measurement Result (Disassemble Panel)

(b)

Display of code coverage rates for each function

Check the [Code Coverage[%]] item in the Function List panel of the analysis tool for the code coverage rates of each function (i.e., function coverage rates).

For details on the "code coverage ratio of functions," see the separate edition "CS+ Analysis Tool."

(2)

Data coverage rates[Simulator]

Check the [Data Coverage[%]] item in the Variable List panel of the analysis tool for the data coverage rates of each variable.

For details on the "data coverage ratio of variables," see the separate edition "CS+ Analysis Tool."