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 macOS®. The make to be run is GNU Make. There are two types of images that can be created when running make:
- A production image
- 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
Only a specific version of make and other GNU tools (such as rm) may be used as discussed below.
When you install MPLAB X IDE, the following directory will be created:
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 macOS
An out-of-the-box Apple macOS computer contains all the tools needed except the GNU Make executable. You have two choices:
- Install MPLAB X IDE. This will create the file:
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
- Install the X tools which will install the make in /usr/bin/make.
Make Environment in Linux OS
Install MPLAB X IDE to create the file:
Add /opt/microchip/mplabx/vx.xx/mplab_ide/bin to your path.