Academic Program

MPLAB X Projects

MPLAB® X Projects

All development work using MPLAB® X IDE is done on projects. An MPLAB X Project is a collection of files needed to build a single application for a PIC® MCU.

A project is identified by a small chip icon in the "Projects" tab of the IDE.

There are several different project types available with MPLAB X IDE. The most common project type for 8 and 16-bit MCU developers is the Standalone Project. This type of project produces executable code based on a set of source, header, and library files.

Project Directory Structure

Once a project has been created, a filesystem directory structure that resembles the one below will have been set up. Two of the project's sub-folders, build and dist will not be created until you build your project for the first time.

Italicized directory names are the only ones you have any control over with respect to naming. The structure is fixed and may not be altered without destroying the integrity of the project.

Projects
The directory specified as the project location when the project was created. Any directory may be chosen for the project location but it is usually best to keep it close to the root directory (e.g. C:\ on Windows) to keep file paths short.
ProjectName.X
The project directory created by the IDE to contain all of the project's files. The directory's name is simply the project's name with a ".X" appended. In most cases, this is where all of your source files and header files will be placed. You may also create subdirectories for them or place them in directories external to your project.
build
Contains all of the intermediate files (*.o, *.o.d) generated by the compiler and/or assembler that are used by the linker to create the output files. The intermediate files are sorted by project configuration and then by debug versus production images.
dist
Contains all of the output files (*.elf, *.hex) generated by the linker. The output files are sorted by project configuration and then by debug versus production images.
default
This directory (under both build and dist) contains files for the default project configuration. If you don't create any project configurations, this directory will be named default, otherwise, there will be one or more directories at this level with the names of the project configurations you created.
debug
Contains files generated when the project was built in debug mode.
production
Contains files generated when the project was built in release mode.
nbproject
Contains your project's settings, such as which files are included, which tools are selected, and so on.
private
Contains project settings unique to your machine.