Step 5: Build, Program and Observe the Output
Build, Hardware Setup and Program
Build the project by clicking the drop-down arrow next to the Clean and Build icon, 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.
Then click Apply and Ok
Program your 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
Observe that LED1 on the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit toggles every time switch SW1 is released.
