Enable/Disable Code Coverage
By default, MPLAB® Code Coverage is disabled. To enable it, complete the following steps:
- Right-click on the name of your project in the Projects window and select Properties.
- Under Categories, find the project compiler, i.e., XCnn, where nn is either 8, 16, or 32.
- Click on Code Coverage under the compiler (see Figure 1 below).
- Select Code Coverage Instrumentation. Selections differ for each MPLAB® XC Compiler. See the Table 1 below.
Table 1: Enable Code Coverage Options by Compiler
MPLAB XC C Compiler | Enable Options | Description |
---|---|---|
XC8 | Disable | Disable code coverage. |
Enable | Enable code coverage. | |
XC16 | Disable | Disable code coverage. |
Enable Near memory | Use Near RAM space for code coverage instrumentation (recommended). If there is a link error, then select Far. | |
Enable Far memory | Use Far RAM space for code coverage instrumentation. | |
XC32 | Disable | Disable code coverage. |
Enable | Enable code coverage. |
Figure 1: MPLAB XC16 Code Coverage Options