Debugging applications using DMCI X

The Data Monitor and Control Interface (DMCI) provide dynamic input control of application variables in MPLAB IDE projects. Application-generated data can be viewed graphically using any of 4 dynamically-assignable graph windows.

Data logging is an important feature for an embedded application. Embedded application requires precise data viewing facility tool to capture the data while debugging/running the application. DMCI enables the embedded developer to fine tune the project application variables and view the output to suit their requirements.

Following five features enables debugging capability with DMCI tool

1. Modify/Capture on a Debugger break

2.Simulator runtime, Data capture

3. Runtime watch

4. DMA

5. RTDM

These features enable the user to view and fine tune the data in different environments. Based on the debugger and device selected we need to use the appropriate feature.

Debugging an Embedded project application can be done in distinct steps.

Step 1: Develop your application using simulator as the debugger. Modify the variable values on a debugger break and rerun the application. View the array data on a graph during a debugger halt.

Step 2: Now you can use simulator runtime to view the graph while running.

Step 3: Use a Real time debugger such as Real Ice and use real time debugging facility available under the debugger/device using DMCI to recheck the application.

Step 4: Creates a production build and check the application using RTDM feature available under DMCI.

All the features are listed below

1. Modify/Capture data on a Debug break

Application input variables should be configured under DMCI input controls and the output should be configured under the graph controls. Debug the application and change the variable values on a debugger halt and view the array values on a graph. Repeat the process to verify the output on input changes.

User can use Simulator , Real ICE and In-Circuit Debuggers(ICD 2,ICD 3) to support this feature

2. Simulator runtime

If the user selected simulator as the debugger then he can use this feature. Data will be logged to the Graph on a project debug. Please go through the video to check how can we achieve this with the DMCI under MPLAB X IDE.

Once the program is debugged and verified using simulator, we may need to verify the same by running the target using the real time debuggers. Depending on the hardware capability (device and debugger) we can use the runtime data logging facility under DMCI.

If the user selected simulator as the debugger then he can use this feature. Data will be logged to the Graph on a project debug.

Please go through the video to check how can we achieve this with the DMCI under MPLAB X IDE.

2. Data capture and Runtime watches

Data capture support provides streaming data from a device to the DMCI Graph. Device should support this feature to enable the data logging.

A runtime watch updates variable data to the DMCI graph. This is a debugger supported feature and Real ICE debugger supports this feature. These debug functions are specific to 8 bit and 16 bit devices.

Please go through the video which shows how to use the Runtime watch feature using DMCI.

3. DMA(Direct Memory Access)

Device should have DMA controller to use this feature. Use real time debugger which supports supports DMA (i.e., MPLAB REAL ICE in-circuit emulator), the DMCI will be able to transmit and receive Control (Sliders, Booleans, User Defined Input) and Graph data to/from the target data memory.DMA used with the DMCI provides real-time operation without halting. Therefore you may change application variable values and have these values written to the target device in real-time. These feature support is there under PIC32 devices.

4. Real-Time Data Monitoring (RTDM)

A RTDM library must be linked into the target application for this function to be available. The RTDM agent on the running target will allow DMCI to transmit and receive Control (Sliders, Booleans, User Defined Input) and Graph data to/from the target data memory using a UART on the target.

You may communicate directly with the target device or through a debug tool to the target device. RTDM uses the run-time control and update buttons.