Running Multiple Instances of the IDE

Some set up is required before using hardware tools (PICkit 3, etc.) with an instance of MPLAB® X IDE. After any hardware tool setup, an instance of the IDE may be invoked from its own directory.

Setting Up Hardware Tools to Work with Multiple Instances

By default, you can work with up to five (5) instances of the IDE. If you want to have more instances, you will need to modify the “mchpdefport” file manually.

Use and Format of the “mchpdefport” File

The “mchpdefport” file provides the information necessary for tool hot-plug use to both the IDE and to the low-level USB library (DLL, so, or dylib file). The format for this file is as follows:

localhost
30000
30002
30004
30006
30008

The first line indicates the host name on which the IDE is running.

The other lines represent port or socket numbers through which the low-level library communicates with the upper-level IDE. Each instance of the IDE will be assigned to a different port or socket. All communications between the instances of the IDE should be hidden from the user.

For up to five (5) instances of MPLAB X IDE, you do not need to alter this file. If you want more than five instances, you can edit the file to add more port or socket numbers.

Location of the “mchpdefport” File

Within a default installation of the IDE, the “mchpdefport” file can be found in the following place, depending on the operating system:

OS Location
Windows (64-bit) C:\Windows\system32
and
C:\Windows\SysWOW64
(Note: Both occurrences of “mchpdefport” must be modified.)
Windows (32-bit) C:\Windows\system32
Linux /etc/.mplab_ide
Mac (OS X) /etc/.mplab_ide

Invoking Instances of the IDE

MPLAB X IDE requires that each instance has its own user directory. Therefore, preferences that are set or plugins that are added to one instance will not be reflected in another instance.

In order to invoke multiple instances, launch the IDE with the --userdir option and specify a directory.

Windows OS

Create a shortcut with the --userdir option. For example, on Windows 7 OS:
1. Right click on the desktop and select New > Shortcut.
2. Browse to the installed MPLAB X IDE executable, by default at:

C:\Program Files (x86)\Microchip\MPLABX\vx.xx\mplab_ide\bin\mplab_ide.exe

where vx.xx is the MPLAB X IDE version.

3. At the end of that line, type the location of the user directory. You can either place your directory under the default location for this type of MPLAB X IDE information:

--userdir "C:\Users\MyFiles\AppData\Roaming\.mplab_ide\dev\anydir"

or you can place it where ever you like:
--userdir anydir

4. Click OK.

Linux OS

The installed version, run without any parameters (clicking on the desktop icon), will run with a user directory of $(HOME)/.mplab_ide. To change the user directory, run the $InstallationDir/mplab_ide/bin/mplab_ide shell script, passing the argument --userid anydir. For example, to run MPLAB X IDE in two different instances:

$ /opt/microchip/mplabx/vx.xx/mplab_ide/bin/mplab_ide --userdir ~/.anydir1 &
$ /opt/microchip/mplabx/vx.xx/mplab_ide/bin/mplab_ide --userdir ~/.anydir2 &

where vx.xx is the MPLAB X IDE version.

You can create desktop icons that have the user ID embedded, too.

Mac OS

Open a Shell window and type a command line listed below to execute your installation of MPLAB X IDE in an alternate user directory. You can either place your directory under the default location for this type of MPLAB X IDE information:

$/bin/sh /Applications/microchip/mplabx/vx.xx/mplab_ide.app/Contents/Resources/mplab_ide/bin/mplab_ide --userdir "${HOME}/Library/Application Support/mplab_ide/dev/anydir"

or you can place it wherever you like:

$/bin/sh /Applications/microchip/mplabx/vx.xx/mplab_ide.app/Contents/Resources/mplab_ide/bin/mplab_ide --userdir anydir
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site 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.