How to Install MPLAB X IDE for AVR Development

If you’re looking for a modern, cross-platform alternative to Atmel Studio and Microchip Studio, this guide explains how to install MPLAB and configure it for 8-bit AVR microcontrollers. Tested on Linux Mint MATE, the step-by-step instructions show how to download MPLAB X IDE, install the XC8 and AVR-GCC toolchains, and point MPLAB X IDE to the AVR GCC toolchain.


Table of Contents

What is the quickest answer to how to install MPLAB and the AVR GCC toolchain?

To install MPLAB X IDE on Linux, Windows, or Mac you download the MPLAB X IDE installer from Microchip, run the installer, then separately install the AVR8 GNU toolchain (avr8-gnu-toolchain) to /opt/microchip and add that toolchain inside MPLAB X IDE via Tools → Options → Embedded → Build Tools tab → Add. This sequence covers the essentials for AVR development. Continue reading for all these steps in detail.


How to Install MPLAB: Download and Install MPLAB X IDE

Visit Microchip’s MPLAB X IDE page and download the Linux package (example: MPLABX-v6.25-linux-installer.tar – this file name is different for each new version of MPLAB). If using Windows or Mac, select the appropriate package and download it. Then do a Windows or Mac installation. The following image shows the download options on the MPLAB X IDE page.

Optional File Integrity Test

At the left of the Version Number column in the above image is the option to download or copy the SHA256 sum for the downloaded file. This is used as a basic integrity test of the downloaded file.

To do this test, firstly download the SHA256 file that corresponds to the MPLAB file that you downloaded. It is a simple text file. Secondly, open a terminal window in the folder where the MPLAB download exists. This can usually be done by navigating to the Downloads folder, right-clicking in the folder, and then selecting Open in Terminal on the pop-up menu. Finally, run sha256sum on the MPLAB file and then check the result against the downloaded SHA256 sum. The following code shows how to get the SHA256 sum on the command line.

Bash
sha256sum MPLABX-v6.25-linux-installer.tar

The following image shows the SHA256 sum calculated on the command line and then compared with the downloaded number. A simple visual inspection of the two sums is enough. Compare the first four digits and the last four digits of each sum as a quick solution.

On Windows, install 7-zip, which gives you a SHA256 tool. Right-click on the downloaded MPLAB file, and then find the SHA256 tool on the pop-up menu, or a sub-menu of the pop-up menu. Click this item and it calculates the SHA256 sum of the file. Now compare this sum with the downloaded SHA256 sum.

How to Install MPLAB on Linux

On Linux, extract the tarball and locate the installer script (e.g., MPLABX-v6.25-linux-installer.sh).

Make the installer executable and run it as the following command line instructions show. The chmod command should not be necessary as the script file should already be marked as executable.

Bash
chmod +x MPLABX-v6.25-linux-installer.sh
sudo ./MPLABX-v6.25-linux-installer.sh

Follow the GUI prompts and install the XC8 compiler if you wish — note: AVR-GCC must be installed separately. There is a dialog box during the installation that allows you to select or deselect various toolchains for the various microcontrollers that the MPLAB X IDE supports. Selected toolchains are downloaded during the installation. Because of this you must be online during the installation.


How to Install MPLAB with the AVR-GCC Toolchain

After the MPLAB X IDE install in the previous section, download the AVR8 GNU toolchain (example file: avr8-gnu-toolchain-4.0.0.52-linux.any.x86_64.tar.gz). The following image shows the download options on the Microchip GCC Compilers page. Download for your operating system, either Linux, Windows, or macOS.

Install the AVR-GCC Toolchain

Extract the contents of the downloaded zipped file to the Downloads folder. On Linux, the folder extracted is avr8-gnu-toolchain-linux_x86_64. Open another file manager and navigate to the root file system and then to the opt folder. The following image shows how to find the opt folder: first, click File System, and then double-click the opt folder to open it.

Inside the opt folder is a microchip folder from the MPLAB X IDE install. Right-click this folder and then select Open as Administrator on the pop-up menu. Enter your login password when prompted. As a result, a new file manager window opens with superuser privileges. Finally drag and drop the extracted avr8-gnu-toolchain-linux_x86_64 folder from Downloads into the superuser microchip folder. The following image shows the copy. Close the superuser file manager window when done.

After the extract and copy to /opt/microchip you end up with the GCC AVR toolchain in the following folder:

Bash
/opt/microchip/avr8-gnu-toolchain-linux_x86_64

Ensure the bin directory is readable by your user (no need to add to PATH if you register the toolchain inside MPLAB X IDE).


How to Install MPLAB and Configure AVR GCC

Complete the previous steps in the previous sections. That is, install the MPLAB X IDE first. Secondly, manually install the AVR 8-bit GCC toolchain as described. It is preferable to reboot the computer after installation. Now follow the steps below to configure AVR GCC in the MPLAB X IDE.

  1. Start MPLAB X IDE. On Linux Mint MATE it is found under the main menu → All applications → Programming.
  2. Go to Tools → Options (Preferences on macOS).
  3. Select Embedded on the toolbar.
  4. Click the Build Tools tab.
  5. Click Add… to register a new toolchain.
  6. Browse to /opt/microchip/avr8-gnu-toolchain-linux_x86_64/bin/ and select it.
  7. Click OK to finish. MPLAB X IDE now detects avr-gcc and related utilities.

The following image shows the AVR-GCC toolchain settings in the MPLAB X IDE after completing the above steps.


Quick Reference Table

The following table is a quick summary of the files, folders, and settings used in the previous steps on a Linux system. Remember that file names change slightly with each new version, as the version number forms part of the file name.

ItemExample file/folder
MPLAB X IDE installerMPLABX-v6.25-linux-installer.tar
avr-gcc archiveavr8-gnu-toolchain-4.0.0.52-linux.any.x86_64.tar.gz
avr-gcc install path/opt/microchip/avr8-gnu-toolchain-linux_x86_64
MPLAB menuTools → Options → Embedded → Build Tools → Add

Tips on How to Install MPLAB

  • Run the installer with sudo if required by your distribution.
  • Install to standard locations (/opt/microchip) so MPLAB X IDE can find toolchains easily. This also keeps all related software tools in the same location.
  • If you use multiple toolchains (XC8, AVR-GCC), be sure to select the desired one when creating a new project.

Did You Know?

MPLAB X IDE is built on the NetBeans platform, which is why it’s cross-platform and supports multiple compiler toolchains. Although Atmel Studio (now Microchip Studio) remains Windows-only, MPLAB X IDE lets developers work on Linux and macOS while still targeting 8-bit AVR microcontrollers.


Frequently Asked Questions About How to Install MPLAB

Do I need Atmel Studio to use MPLAB X IDE?

No. MPLAB X IDE replaces the need for Atmel Studio on non-Windows systems; you can use XC8 or avr-gcc toolchains with MPLAB X IDE.

Can I use the XC8 compiler for AVR in MPLAB X IDE?

Yes — XC8 is available via the MPLAB installer for AVR8 targets. avr-gcc is installed separately and added via Tools → Options.

Where should I install avr-gcc on Linux?

A common, recommended location is /opt/microchip/avr8-gnu-toolchain-linux_x86_64. Register this folder’s bin inside MPLAB X IDE.

Will MPLAB X IDE work on macOS and Windows?

Yes. MPLAB X IDE is cross-platform and runs on Linux, Windows, and macOS.

How do I verify MPLAB X IDE recognizes the toolchain?

Open Tools → Options → Embedded. The registered toolchain appears with its version and detected compilers (gcc, avr-g++, avr-objcopy, etc.) under the Build Tools tab.


Conclusion on How to Install MPLAB

This guide covered how to install MPLAB on Linux and configure it for AVR development with both the XC8 and avr-gcc toolchains. By installing the MPLAB X IDE, placing the AVR8 GNU toolchain under /opt/microchip, and registering the toolchain in Tools → Options, you’ll have a full cross-platform development setup for 8-bit AVR microcontrollers. Now you can build and debug AVR projects on Linux without relying on Windows-only tools.

Next step: Create Your First MPLAB Project

Testing of the MPLAB X IDE installation for this article was done on a Linux Mint MATE 22.2 Zara 64-bit computer.