MPLAB® Harmony v2 Folder Structure

The MPLAB® Harmony Integrated Software Framework consists of many source files. We have created an intuitive and organized folder structure to help you navigate through the framework.

Keep in mind, some of these source files are dependent on others, and a standard MPLAB Harmony project will be configured to find these files in specific locations. We highly recommend that using the standard Harmony folder structure to ensure the project can find all the files it needs at build time. Using this folder structure will also help you migrate from one Harmony version to another.

MPLAB Harmony Disc Folder Structure


The Harmony Install Path includes the Harmony version number. Note that if you install a new version of Harmony, it will have a new install path. This allows you to install new versions of Harmony without having to worry about how it might affect your existing Harmony projects. It also allows you to use multiple versions of Harmony on the same computer.

Directly under the Harmony Install Path are the framework and apps folders. The framework folder contains the Harmony library files. The apps folder contains many example Harmony applications. Each example application has its own folder.

When you create a new MPLAB Harmony project, a new folder using the same name as your project will be created for you. These other folders will also be created:

  • The firmware folder contains the project folder (<your project name>.X) and the src (short for source) folder.
  • The project folder contains the folders found in all standard MPLAB X projects.
  • The src folder holds all your application's source files and includes the system_config folder.
  • The system_config folder is used to hold the system configuration files.

For a description of all the folders in the Harmony install path, click here.

MPLAB X Integrated Development Environment (IDE) Folder Structure for Harmony Projects


This image shows the logical folders found in a standard MPLAB Harmony project and how these folders relate to the physical folders found on the disk. Note the app logical folder in the project contains the same information found in your application's src folder on disk. Also, note the Harmony library files needed for a particular application are added to the local folder named framework.

The app Folder

The app folder contains all your application specific source files. This will include the minimum following files:

  • main.c
    • Contains the main() function and little else
  • app.c and app.h
    • Implements your application's logic
  • System configuration files in the system_config folder:
    • system_config.h
      • Defines all static build options
    • system_init.c
      • Initializes all libraries, applications and processor config bits
    • system_tasks.c
      • Calls all polled system logic and maintains system state
    • system_interrupt.c (optional)
      • Implements all interrupt vector stubs and calls all Interrupt Service Routines (ISRs)

The Framework Folder

The Framework Logical folder contains the source files for the MPLAB Harmony framework and libraries. You should never have to edit these files.They are included in your project directly from the MPLAB Harmony installation using relative directory paths.

You always have the option of copying the framework files directly into your project's source folder. In fact, doing so is a good idea if you plan to move or distribute your project separately from the MPLAB Harmony installation.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.