Keil Logo

COVERAGE

The command COVERAGE shows statistics about the executed code of an application or parts of an application. Refer to Fully Qualified Symbols for details about the syntax of modules.

Syntax Description
COVERAGE Displays coverage information of the whole application.
COVERAGE \module [DETAILS]
Displays coverage information for the selected module. The option DETAILS provides additional information about conditional instruction execution.
COVERAGE \module\func [DETAILS] Displays coverage information for symbols of function func contained in module. The option DETAILS provides additional information about conditional instruction execution.
COVERAGE ASM Displays coverage information including assembly instructions of the whole application. The output format has the form:

<qualifier> | <addr> <opcode> <assembly code>

The values below lists the possible qualifiers:

NE Not executed.
EX Executed.
AT Always taken. Conditional instruction which was always taken (condition always true).
NT Not Taken. Conditional instruction which was never taken (condition always false).
FT Fully Taken. Conditional instruction which was each taken and not taken for at least one time.
COVERAGE CLEAR Clear all code coverage information.
COVERAGE FLOW filespec Prints program execution flow information to a file specified by filespec. Available only in Simulation mode.
COVERAGE GCOV * Prints program execution flow information for all modules. For details, refer to the command below.
COVERAGE GCOV module Prints program execution flow information for the specified module to a file with the extension module.gcov. The output file is located in the Output folder of the target. For highly optimized code, the output might not be accurate. The command creates files similar to the gcov utility. Further details are described in Code Coverage Export.
COVERAGE LOAD path\filename Load the code coverage information from a file. This allows to merge code coverage information of previous sessions with the current session and therefore multi-session testing of an application.
COVERAGE MTB filename Imports trace records from an external MTB recording to be analyzed for code coverage. filename specifies the file containing the records. filename can consist of the file path. For correct symbol mapping, you must load the image of the source application into the debugger. For details, refer to MTB Trace Import for Code Coverage.
COVERAGE SAVE path\filename Save the code coverage information to a file. The file must exist before writing to it.

Note

  • The options ASM, CLEAR, DETAILS, LOAD, and SAVE are valid for some drivers only.
  • Use the command LOG to copy code coverage information to a log file.
  • The Code Coverage Window also shows coverage information.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.