How to convert an MPLAB 8 project to MPLAB X
tutorial.png Tutorial Contents

If you have a project from in MPLAB 8, in most cases it can easily be converted to the new MPLAB X format. There are however a few things you can do first to help ensure that the process goes smoothly.

  • From time to time, the project file format of MPLAB 8.x and earlier has changed. To ensure that you are using the latest project file format before attempting the conversion, first save your project with MPLAB 8.14.03A or later.
  • If your project #includes files that are not in the project tree (other than those that install with the compiler or assembler), include them in the header folder of the project tree so that the conversion utility can find them. (Required for beta versions of MPLAB X)
  • If your project uses relative paths for its files, ensure that all required files are still present in their relative locations.

Also, if you are planning on running MPLAB on Linux or a Mac, there are a couple other items you need to consider:

  • Linux and Mac file systems are case sensitive. Header file names must match the case of the actual files. For example: #include "p24fj128ga010.h" will not work. The file will not be found because the actual file name is p24FJ128GA010.h, where all letters except the initial 'p' and final 'h' are capitalized.
  • Relative paths must use forward slashes '/' which work on all operating systems rather than back slashes '\' which work only on Windows. For example, #include "Graphics\Graphics.h" needs to be changed to #include "Graphics/Graphics.h".

video.png Video Tutorial

steps.png Step-By-Step Tutorial

From the menu, select File ► New Project… or click on the New Project icon Main_New_Project.png on the toolbar.


NewProject_001.png
Click image to enlarge
Choose Project Type

From the Categories list, choose Microchip Embedded and from the Projects list, choose Existing MPLAB IDE v8 Project. Click Next > when done.


NewProject_002.png
Click image to enlarge
Import Legacy Project

Click the Browse… button and select the *.mcp file for the project you wish to convert. Click Next > when done.


NewProject_003.png
Click image to enlarge
Select Device

The project's target device should be automatically detected from the *.mcp file, so just click Next >. You may however change to a different device if you know the older project supports it.

NewProject_003a.png
Click image to enlarge
Select Header

(This step is scheduled to be consolodated into the previous screen in an upcoming beta release)
A header interface provides debug capability with no pin loss to the target application. Headers are required for most low pin-count devices and are available as an option for some high pin-count devices. See the main website for more details.
An example of a low pin-count device's header is shown below.
HeaderTop.png HeaderBottom.png

  • If you are using a debug header, check the box. Otherwise leave it unchecked.
  • Click Next >

NewProject_004.png
Click image to enlarge
Select Tool

Choose the debug/programming tool you wish to use with the new project. Click **Next > ** when done.


NewProject_005.png
Click image to enlarge
Select Compiler

Choose the compiler or assembler you wish to use with the new project. Click **Next > ** when done.


NewProject_006.png
Click image to enlarge
Select Project Name and Folder

By default, the MPLAB X project directory will be created inside the MPLAB 8 project's directory. Here, you can change the location and/or name of the new project and its directory. Click **Next > ** when done.


NewProject_007.png
Click image to enlarge
Summary

This slide simply shows you what the converter will do and where it will do it. Click Finish when done.


Your project has now been converted. You should see all of the files from the MPLAB 8 project tree in the new MPLAB X project tree. You should now be able to successfully build your project by clicking the build button Main_Build_Project.png on the toolbar without any further changes. If you get any messages about a compiler not being found you may need to configure your compiler for MPLAB X.

If you are converting a project to run on a Mac or under Linux, you may also have to change the names of header files to ensure that they are properly capitalized (e.g. p24FJ128GA010.h instead of p24fj128ga010.h) and change any back slash characters '\' in relative paths to forward slash characters '/'. (e.g. "graphics/graphics.h" from "graphics\graphics.h")
Failing to correct either of these situations will result in "file not found" errors when the compiler looks for the header files.

Information contained in this publication 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.

Page tags: convert mplab project
© Microchip Technology Inc.