Build Settings

Build Settings allows customization of the build process inside the MPLAB® X project.

Setting the Pre or Post Building settings


Open the Project Properties Window

From MPLAB® X with the Project Open:

  • When the Project Properties window opens, locate the 'Categories' section on the left side of the window.
Click image to enlarge.


Select the Building/Loading menu under Categories.

This is also called the Building node.

  • The categories section of the Project Properties lists all the configurations for the project.


  • Select the 'Building node' under the configuration you wish to modify the build.
Click image to enlarge.


Select a macro in the Pre or Post build area.

You can type the macros yourself or click Insert Macro to copy the macro name into the current position in the Edit box.

macro Name macro Function
Device device for the current-selected project configuration
IsDebug “true” for a Debug Run; “false” otherwise
ProjectDir location of the project files on the PC
ConfName name of the currently-selected project configuration
ImagePath path to the build image
ImageDir directory containing the build image
ImageName name of the build image


Select OK at the bottom right of the window when you are done.

  • The commands you selected are inserted into nbproject/Makefile-$ file.
  • If you need to refer to project related items (e.g., image name), use the supplied macros.
  • Commands are run in the make process with the current directory being set to the MPLAB X IDE project directory.
  • The project directory is defined as the directory that contains the nbproject folder.
© 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.