3 Data Visualizer Setup for DV Run Time

This section describes the steps needed to set up the DV Run Time Library in the MPLAB Data Visualizer when using the MCC Melody DV Run Time Library.

Figure 3-1. I2C Host Proximity Sensor Example Using the DV Run Time Example Visualization
Tip: The following steps pertain to an example that has been properly configured in MCC Melody, with the code generation initiated by pressing the button.
Tip: In the Data Streamer, application variables must be added to the Data Streamer Table before they can be plotted. In contrast, the DV Run Time exposes variables as debug symbols when you load the appropriate .elf file. To improve the chances of locating a variable’s debug symbol, declare the variable as volatile and/or static. The .elf files contain the variables' names, addresses and types (length in bytes). This means that, at compile time, the locations of volatile variables in the microcontroller’s RAM are predetermined.
  1. Within MPLAB X, click the icon to open the MPLAB Data Visualizer.
  2. Click the button to see the current DVRT session or to start a new one.

    A new DVRT session will open as follows:

  3. Next, select a data source matching the DVRT protocol format. This will be the COM port (UART) configured as a dependency to the MCC Melody DV Run Time Library.
  4. Configure the Data Visualizer COM Settings (PC side) to match what was configured in the MCC Melody DV Run Time Library (MCU side).
  5. Next, load the .elf debug symbols file.
    Attention: Choose between the debug and the production version of the .elf, depending on which matches the compilation settings:
    • Debug, when in a debug session
    • Production, when simply having programmed the MCU
  6. Add variables to the DVRT Streaming Table.
    Tip: The volatile and static variables will show up in the symbols file.
  7. Reposition the DVRT Streaming Table.
    Tip: Drag the DVRT Streaming Table to the bottom pannel of the Data Visualizer to view it and the Time Plot variables simultaneously.
  8. Once the Plot all variables button is clicked, the DVRT Procol starts streaming and the Time Plot starts rolling.