Step 2: Create and Generate a New Project
Creating and Generating a New Project
Before creating a new project, navigate to Tools > Packs and install the specific DFP (Device Family Pack) for the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit.

In the Packs tab, search for PIC32CM-LS, then click Show Logs to display the available DFP versions for this device kit. To install the DFP for the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit, select Install next to the latest DFP version.

To create a new project, go to File > New Project.

A new project can also be created by selecting the designated icon or by using the Ctrl + Shift + N shortcut.

Go to Microchip Embedded > Application Project(s) and click Next.

Enter the device part number PIC32CM5164LS00048 for PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit in the Device field and click Next.

Choose the latest version of MPLAB® XC32 Compiler and click Next.

Choose the Project Name and Project location. Then click Finish.

After clicking Finish, the project will be generated, and MPLAB Code Configurator (MCC) will open. The MCC window appears as shown in the accompanying image.

The following sections are present in MCC:
- Project Graph
- A graphical interface that visually represents and manages all the software components, drivers, middleware and their interconnections within an embedded project
- Project Resource
- Displays modules and peripherals included in the project
- Device Resource
- Lists all available peripherals and libraries for the selected device
- User Output
- Displays generated code and reports
- Notifications
- Shows configuration errors and warnings
- Configuration Options
- Allows adjustment of settings for each module

To generate code, click on either Project Resource or Device Resource. Then click Generate.

After code generation, the main.c file will appear under two locations:
- lab1_ide_setup > Source Files > main.c
- lab1_ide_setup_secure > Source Files > main.c
Double click on main.c (under non-secure) to open that code file.

