Which Device Header Files are Used to Build Your Project?

Last modified by Microchip on 2025/09/19 13:45

MCU header files are included in the Device Family Packs (DFPs) which are installed in various locations on your PC:

  • DFP artifacts embedded within an MPLAB® Harmony 3 project
  • DFPs installed/maintained by the Integrated Development Environment (IDE)
  • DFP artifacts installed with the compiler*

* DFPs Components No Longer Bundled With MPLAB XC Compilers

The default method that the compiler uses to select the device header file is a prioritized search of the project. The compiler will first look for explicitly included header files (like in the MPLAB Harmony 3 project). Next the compiler will look in the paths of the DFPs included with the project.

If you wish to manually select an IDE-managed DFP, you can choose the version you wish to use in the Project Properties window as shown in the "Selecting the DFP Version Used by the IDE" section.

Compiler Default Selection Method: Prioritized Search

Priority 1 - Search Project Files

The first location searched is the project itself. MPLAB Harmony 3 projects are self-contained. DFPs in the MPLAB Integrated Development Environment (IDE) and MPLAB XC32 are ignored.

Project packs

Priority 2 - Search IDE-Managed DFPs

If no local header files are found in the project, the DFPs in the IDE are used. The version can be selected in the Project Properties window.

Project packs

Back to Top

 

Selecting the DFP Version Used by the IDE

1. Select DFP to Change

In the Dashboard window, click on the DFP that you wish to change. This will open the Project Properties window.

SAME54_DFP

2. Select the DFP That You Want

In the Project Properties window, select the DFP version that you wish to use and click the OK button to save your selection.

DFP

Back to Top