Step 2: Create and Generate a New Project

Last modified by Microchip on 2026/06/26 07:36

 

Creating and Generating a New Project

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

File drop down menu

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

create project icon

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

New Project window

Enter the device part number in the Device field and click Next.

Select Device section

Information

Note: The part number for PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit is PIC32CM5164LS00048.

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

Select Compiler section

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

Select Project Name and Folder section

Information

Note: The Project Folder field cannot be edited. A firmware folder is created inside lab1_ide_setup because two files will be generated: secure and non-secure.

After clicking Finish, the project will be generated and MPLAB Code Configurator (MCC) will open. This is how the MCC window looks.

MCC window

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

MCC sections

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

Project Resources section

Information

Note: Once the project is created and generated, it generates both a secure and a non-secure project. Additionally, the secure project is included as a loadable project.

Projects files

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
main.c file
Information

Note: The file named main.c in the lab1_ide_setup directory is referred to as the non-secure main.c, while the main.c in the lab1_ide_setup_secure directory is known as the secure main.c.

Double click on main.c (under non-secure) to open that code file.

Back to Top