6.1 Adding DVRT Support to a Project

The DVRT implementation in the target relies on a UART in order to communicate with the PC and a timer or a regular callback in order to process commands and stream data in a timely manner. Therefore the project device must have these resources available.

DVRT project examples may be found in zip file(s) on the MPLAB® Data Visualizer webpage under Documentation.

To set up a project for DVRT support:

  1. Create a new project or open an existing one to which you want to add DVRT functionality.
    Note: Currently any non-library project can be used for DVRT.
  2. Add the following files to your project: DVRunTime.c* and DVRunTime.h* (see figure below).
  3. Build and run the project for debug
    to create the ELF file required in the next section.
  4. Invoke DVRT_Initialize()* at the start of your application in order to initialize the DVRT driver.
  5. Invoke DVRT_Process()* periodically in your main loop to process DVRT commands (e.g., once per ms).
  6. Update the UART defines at the end of DVRunTime.h in accordance with the UART implementation on the target.

* See examples for content.

Figure 6-1. Example DVRT Project