µVision User's Guide

legacy

COVERAGE

SyntaxDescription
COVERAGEDisplays 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 ASMDisplays coverage information including assembly instructions of the whole application.
COVERAGE CLEARClear all code coverage information.
COVERAGE LOAD path\filenameLoad the code coverage information from a file. This allows to merge code coverage information of pervious sessions with the current session and therefore multi-session testing of an application.
COVERAGE SAVE path\filenameSave the code coverage information to a file. 

Note

  • The options ASM, CLEAR, DETAILS, LOAD, and SAVE are available with some drivers only.

Use the COVERAGE command to control or display the code coverage information of the µVision3 debugger. You may use this command with the LOG command to copy code coverage information to a log file.

You may also use the Code Coverage Window to review coverage information. This window opens via the main menu View — Code Coverage Window.

Example

The following example were created using the MEASURE example program of the C51 Compiler package.

\\Measure\MEASURE\{CvtB} - 32% of 52 instructions executed
\\Measure\MEASURE\{CvtB} - 0% of 127 instructions executed
\\Measure\MEASURE\{CvtB} - 100% of 1 instructions executed
\\Measure\MEASURE\{CvtB} - 100% of 6 instructions executed
\\Measure\MEASURE\{CvtB} - 0% of 595 instructions executed
\\Measure\MEASURE\{CvtB} - 0% of 5 instructions executed
\\Measure\MEASURE\{CvtB} - 100% of 1 instructions executed
\\Measure\MEASURE\SAVE_CURRENT_MEASUREMENTS - 0% of 46 instructions executed
\\Measure\MEASURE\TIMER0 - 72% of 94 instructions executed
\\Measure\MEASURE\READ_INDEX - 0% of 64 instructions executed
\\Measure\MEASURE\CLEAR_RECORDS - 100% of 24 instructions executed
\\Measure\MEASURE\MAIN - 31% of 215 instructions executed
\\Measure\MCOMMAND\{CvtB} - 0% of 74 instructions executed
\\Measure\MCOMMAND\MEASURE_DISPLAY - 100% of 44 instructions executed
\\Measure\MCOMMAND\SET_TIME - 0% of 58 instructions executed
\\Measure\MCOMMAND\SET_INTERVAL - 0% of 101 instructions executed
\\Measure\GETLINE\GETLINE - 78% of 51 instructions executed
\\Measure\TOUPPER\{CvtB} - 100% of 18 instructions executed
\\Measure\TOUPPER\{CvtB} - 51% of 91 instructions executed
\\Measure\TOUPPER\{CvtB} - 0% of 0 instructions executed