Build Settings

Last modified by Microchip on 2024/06/24 06:33

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

Setting the Pre-Building or Post-Building Settings

Open the Project Properties Window

MPLAB X IDE Project Open Menu

When the Project Properties window opens, locate the 'Categories' section on the left side of the window.

Back to Top

Under Categories, select the Building/Loading menu.

MPLAB X IDE Project Properties Window

Note: 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.

Back to Top

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 Namemacro Function
Devicedevice for the current-selected project configuration
IsDebug“true” for a Debug Run; “false” otherwise
ProjectDirlocation of the project files on the PC
ConfNamename of the currently-selected project configuration
ImagePathpath to the build image
ImageDirdirectory containing the build image
ImageNamename of the build image

Back to Top

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.

Back to Top