Step 5: Build, Program and Observe the Output
Build, Hardware Setup and Program
Build the project by clicking the Clean and Build drop-down arrow, then select Clean and Build Main Project.
At this point, the application is ready to be implemented on the hardware. Check whether the lab builds and programs successfully, and verify the build results in the output dialog box.
Connect the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit to the host PC using a USB cable attached to the debug USB port. This provides power to the board and enables debugging through the embedded debugger (nEDBG).
In MPLAB® X IDE, navigate to File > Project Properties, and ensure that PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit EDBG is chosen as the debugger under Connected Hardware Tool, and XC32 is selected as the Compiler Toolchain for XC32.
Program the application to the device by clicking on the Make and Program button as shown in the accompanying image. Check whether the lab builds and programs successfully and verify the build results in the output dialog box.
Observe the Output for CPU-Driven Transfer
Now, open the Tera Term terminal application on the PC from the Windows® Start menu by pressing the Start button. Select the Serial Port as shown in the accompanying image.
Once the COM port is connected, click on Setup > Serial port. In the Tera Term: Additional settings window that appears, change the baud rate to 115200, as shown in the accompanying image.
Observe the output displayed on the serial terminal, which indicates the successful CPU memory transfer and shows the number of transfer cycles.

Observe the Output for DMA-Driven Transfer
Observe the output displayed on the serial terminal, which indicates the successful CPU memory transfer and shows the number of transfer cycles.

Output Comparison for CPU-Driven and DMA-Driven Transfers
This lab evaluates and compares the performance of CPU-driven and DMA-driven projects to demonstrate that DMA-driven transfers significantly improve system efficiency over CPU-driven transfers.
