MPLAB Configuration for MPC
"Extended Instruction" errors
If you've received an error message like this:

MPLAB error
please consider upgrading to version 7.50 of MPLAB. See Microchip's website for more information.
Byte Craft Limited and Microchip Technology Inc. have worked together to fix this outstanding issue.
MPLAB, Microchip's IDE, can perform source-level debugging of MPC code. We support both MPLAB 5.x, and MPLAB 6.x and onward.
Due to language toolset changes in MPLAB, the latest version that we support is 7.50. Support for 7.52 and later versions is forthcoming.
MPLAB 6 support
To use MPC 2.0 with MPLAB 6 and later, see this PDF document. Note: the linker command file described should be created with the filename extension .lnk (optionally, .link).
MPLAB 5 support
These instructions configure older MPLAB software to perform source-level debugging with earlier version of MPC.
MPC configuration
Before configuring MPLAB, ensure that the following environment variables are set (probably through your AUTOEXEC.BAT):
set INCLUDE=c:\mpc\include rem substitute the path to the device rem headers directory on your MPC installation set LIBRARY=c:\mpc rem substitute the path to the MPC rem program directory, where mpc12.lib, rem mpc14.lib, and mpc16.lib reside
Restart if necessary.
MPLAB configuration
To enable support for the Byte Craft compiler within MPLAB, do the following:
-
Select Project|Install Language Tool. From the "Install language tool" window:
-
Select Byte Craft from the "language" drop box.
-
Select Assembler/C compiler from the "Tool Name" drop box.
-
Type in the path and filename of the MPC compiler in the "Executable" text field. Beneath the executable name, select "Command Line".
-
-
In MPLAB, select Project|New Project.
-
From the "New Project" dialog, select the directory and file name for the project.
-
Within the "Edit Project" dialog:
-
Select Byte Craft from the "Language tool suite" drop box.
-
Select
in the "Project files" area, and select the Node properties button.your_filename.HEX
-
Within the "Node properties" window:
Select Assembler/C compiler from the "language tool" drop box.
In the "Options" area, choose the following options:
-
Hex Format: select the Intel radio button.
-
Listing file: select the on switch.
-
Error file: select the on switch.
-
Source type: select the C radio button.
You should see +di +l +e -m in the "command line" text field. Choose OK.
-
-
-
Choose Add Node, and add in your source file as a project node. If you do not have a source file yet, be sure to add it in whenever possible.
-
Choose OK. The project is now configured to use Byte Craft's compiler.
Finally, place the following line at the top of your source file:
#pragma option +v;
Once you have completed this procedure, you should be able to perform C source level debugging within the MPLAB IDE.
DOS Box problems
If the compiler does not exit and close its DOS window, or if MPLAB reports that the compiler has timed out, one of two settings is probably incorrect.
If necessary, choose No in the "Build Error" dialog in MPLAB to return to editing. Use ALT+Tab to switch to the MPC.EXE compiler window (an MS-DOS box), and press Control+C to exit the compiler.
To fix the problem, try the following:
-
Within MPLAB, choose Project|Install Language Tool.
-
Select Byte Craft in the "Language Suite" list.
-
Ensure that you have selected the "Command Line" option for the compiler, as mentioned above.
-
If not, select "Command Line" and click OK. Try compiling again.
If that does not fix the problem, do the following:
-
Open the Windows Explorer, and navigate to the MPC program directory.
-
Select the compiler executable (MPC.EXE), and right-click on it. Choose Properties from the shortcut menu.
-
In the Properties dialog, choose the Program tab.
-
If Close on exit is not checked, check it and click OK.
-
Try compiling again.
If you have problems after using these instructions, please contact support@bytecraft.com.
MPLAB is a trademark of Microchip Technology Inc.

New: