Which Header Files Are Used?

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

  • DFP artifacts embedded within a Harmony 3 Project
  • DFP artifacts installed with the compiler
  • DFPs installed/maintained by the IDE


When you build a project in MPLAB® X, which header files are used in the build?


Priority 1 - Search Project Files

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

priority-1-project-dfps.png

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.

priority-2-ide-dfps.png

DFPs in the XC compilers are normally ignored unless you override the IDE setting:

dfp-override-setting.png

Selecting the DFP Version used by the IDE

1

Click on the current DFP's icon in the Dashboard.

selecting-dfp-step-1.png

2

Select a different DFP in Project Properties to use it.

selecting-dfp-step-2.png

Priority 3 - Search Compiler DFPs

If no other DFP is present, the XC compiler can use its own header files:

priority-3-compiler-dfps.png


© 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.