Make Environment

The make process must be run from a command line native to the OS. This is cmd.exe in Windows® OS and any shell for Linux® OS or Mac® OS X®. The make to be run is GNU Make. There are two types of images that can be created when running make:

  1. A production image
  2. A debug image

By default, running the make process produces a production image. To have the make process produce a debug image you need to add to the following to the make command line: TYPE_IMAGE=DEBUG_RUN

The debug image contains everything MPLAB® X IDE needs to run a debug session. This information is tool specific. At this point, there is no way to tell the Makefile which tool to build for. This information is hard coded in the Makefile when it is created based on the values selected in the IDE for each configuration in each project.

Make Environment in Windows OS

We need to use a specific version of make and other GNU tools (such as rm).
When you install MPLAB X IDE, the following directory will be created:
$InstallDir\gnuBins\GnuWin32\bin
where $InstallDir is either:
C:\Program Files\Microchip\MPLABX\vx.xx (32-bit system)
C:\Program Files (x86)\Microchip\MPLABX\vx.xx (64-bit system)

This directory contains the gnuWin32 tools. You must use these tools to run the make process. You cannot use Cygwin or any other GNU port.

Make sure the path above is the very first thing in your %PATH% environment variable:

c:> set PATH=C:\Program Files\Microchip\MPLABX\vx.xx\gnuBins\GnuWin32\bin;%PATH%

before you run the make process.

Make Environment in Apple Mac OS X

An out-of-the-box Apple OS X computer contains all the tools needed except the GNU Make executable. You have two choices:

  1. Install MPLAB X IDE. This will create the file:
    /Applications/microchip/mplabx/vx.xx/mplab_ide.app/Contents/Resources/mplab_ide/bin/make
    Then, add the directory where Make is to your path before you run the make process:
    export PATH=/Applications/microchip/mplabx/vx.xx/mplab_ide.app/Contents/Resources/mplab_ide/bin:$PATH
  2. Install the X tools which will install the make in /usr/bin/make.

Make Environment in Linux OS

You have two choices:

  1. Install MPLAB X IDE (v2.10 and above). This will create the file:
    /opt/microchip/mplabx/vx.xx/mplab_ide/bin/make
    Add /opt/microchip/mplabx/vx.xx/mplab_ide/bin to your path.
    Note: Versions of MPLAB X IDE prior to v2.10 did not include make. It was expected that you would install it yourself. After v2.10, make is included with MPLAB X IDE.
  2. Use the GNU Make that will probably be present in a typical Linux distribution. To test that Make is available:
    $ which make
    /usr/bin/make
    If Make is not installed, use the package manager in your system to install it.
    Note: If you are running a 64-bit Linux distribution, you MUST have the 32-bit libraries installed, since our compilers are 32-bit applications.
© 2017 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.