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:
- 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.
- Add the following files to your
project:
DVRunTime.c
* andDVRunTime.h
* (see figure below). - Build and run the project for debug to create the ELF file required in the next section.
- Invoke
DVRT_Initialize()
* at the start of your application in order to initialize the DVRT driver. - Invoke
DVRT_Process()
* periodically in your main loop to process DVRT commands (e.g., once per ms). - Update the UART
defines
at the end ofDVRunTime.h
in accordance with the UART implementation on the target.
* See examples for content.