Build Settings

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

Setting the Pre or Post Building settings

1

Open the Project Properties Window

From MPLAB® X with the Project Open:
.

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

2

Select the Building/Loading menu under Categories.

This is also called the Building node.

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

.

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

3

Select a macro in the Pre or Post build area.

You can type the macros yourself or clickInsert Macro to copy the macro name into the current position in theEdit 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

4

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

  • The commands you selected are inserted intonbproject/Makefile-$CONF.mk 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 thenbproject folder.