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:
- 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
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:
- 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 - Install the X tools which will install the make in /usr/bin/make.
Make Environment in Linux OS
You have two choices:
- 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. - 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.