MPLAB Configuration for MPC

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:

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:

  1. Within MPLAB, choose Project|Install Language Tool.

  2. Select Byte Craft in the "Language Suite" list.

  3. Ensure that you have selected the "Command Line" option for the compiler, as mentioned above.

  4. If not, select "Command Line" and click OK. Try compiling again.

If that does not fix the problem, do the following:

  1. Open the Windows Explorer, and navigate to the MPC program directory.

  2. Select the compiler executable (MPC.EXE), and right-click on it. Choose Properties from the shortcut menu.

  3. In the Properties dialog, choose the Program tab.

  4. If Close on exit is not checked, check it and click OK.

  5. Try compiling again.

If you have problems after using these instructions, please contact support@bytecraft.com.

MPLAB is a trademark of Microchip Technology Inc.