Code Profiling Plug-in Setup

Before a project's code is profiled, the MPLAB® REAL ICE™ in-circuit emulator settings need to be verified. Two settings are essential for code profiling to operate:

  1. Setting the MCU speed
  2. Enabling "Function Level Profiling" on the REAL ICE.

Setting the MCU Speed:

  1. Open the Project properties window (File>Project Properties).
  2. Click on “REAL ICE™” under “Categories” and select “Clock” from the “Option categories” drop-down box. Ensure this value matches the actual target speed as set by the configuration bits in code.
  3. Click Apply.
Figure: Clock - Selection and Setup
PP-Clock.gif

In some instances the MCU will run at the speed set but the data transfer from the device may not 'keep up'. It is possible to experience periodic speed reductions or pauses in program operation while the target is running during a profile session.

Enabling Function Level Profiling

From the Project Properties Window:

  1. Click on “REAL ICE” under “Categories” and select “Trace and Profiling” from the “Option categories” drop-down box.
  2. Under “Data Collection Selection”, select “Function Level Profiling”.
  3. Select a .log file and a desired length for the file which logs the profiled data
  4. Check “Include Time Stamp”. Two files are produced:
    • a file containing raw polling and time stamp data (the log file)
    • a file containing information about the log file, i.e., how to interpret the log file's contents (the .INX file)
  5. Click OK.
Figure: Function Level Profiling - Selection and Setup
pp-FPL1.gif
© 2024 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.