Enable/Disable Code Coverage

To enable or disable code coverage:

  1. Right-click on the name of your project in the Projects window and select Properties.
  2. Under Categories, find the project compiler, i.e., XCnn, where nn is either 8, 16, or 32.
  3. Click on the Code Coverage under the compiler (see Figure 1 below).
  4. 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. This will result in an instrumentation code that is less complex and faster.
It is recommended that you select Near first, even if you use Far for your program code. If code coverage does not work, then select Far.
Enable Far memory Use Far RAM space for code coverage instrumentation. This will result in instrumentation code that is more complex and slower.
XC32 Disable Disable code coverage.
Enable Enable code coverage.
CC_PP_XC16_rc6.png
Figure 1: MPLAB XC16 Code Coverage Options
© 2019 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.