Escolar Documentos
Profissional Documentos
Cultura Documentos
• Templates
• Tutorials
• Contact Us
Introduction
Let's get started! If you're reading this then it means that you want to write some code for a PIC
Microcontroller but need a little help with installation on Ubuntu. Well my friend you're in the right
place! This is a step by step tutorial that will guide you through the installation process.
Tutorial Index
• Step 1: Downloading the files
• Step 2: Extract MPLAB X IDE
• Step 3: Install Dependencies
• Step 4: Install MPLAB X IDE
• Step 5: Install XC Compiler
• Summery (Quick-n-Dirty)
Quick Tip: Pressing Alt+Left Arrow Keys will take you back one "clicked link" on most web sites.
Step 1: Downloading the files
Download MPLAB X IDE
Link to Microchips MPLAB X IDE
Navigate towards the bottom until you see tabs that say Features, Downloads, Documentation, and
Webinars. Select the Downloads tab and go down to the section that says " Linux 32-Bit and Linux 64-
Bit (Required 32-Bit Compatibility Libraries) ". Locate the newest version of MPLAB, then go to the
right and click the zip file icon to start the download. When the Downloads dialog appears make sure
the Save File radial is selected then click OK to start the download.
Download XC Compiler
Link to Microchips XC Complier
Navigate towards the bottom until you see tabs that say Additional Information, Downloads,
Documentation, and Compiler FAQs. Select the Downloads tab and go down to the section that says "
Linux 32-Bit and Linux 64-Bit (Required 32-Bit Compatibility Libraries) ". Locate the newest version
of the XC8 Complier, then go to the right and click the zip file icon to start the download. When the
Downloads dialog appears make sure the Save File radial is selected then click OK to start the
download.
Quick Tip: Pressing the Home Key will take you to the top of most web sites.
CTRL + ALT + t
A terminal has opened. Now what? Let's start by changing into the Downloads folder with the
command cd (change directory) followed by the directories name that we want to change into. Linux is
case sensitive so it is critical to type in the command exactly as you see it. Type this into the terminal
followed by pressing Enter:
cd Downloads/
You should see something like this " name@computer:~/Downloads$ " this is good, you're now in the
downloads folder.
Let's extract the MPLAB tar file you downloaded by running the tar command. To make things easier I
will teach you a little trick by pressing the tab key. Instead of typing in a long file name, you only need
to type in the first few letters of the file name such as MP or MPLA followed by pressing the tab key
and the rest will auto-magically fill in for you. Type this into the terminal followed by pressing Enter:
During the extraction process you should have seen MPLABX-v4.15-linux-installer.sh or something
close to this before you were returned to the command prompt. Depending on the version you
downloaded the wording may be a little different but the same steps will apply.
Time to see the contents of the directory. To do this we will use the ls (list) command. Type this into the
terminal followed by pressing Enter:
ls
You should now see the following files listed MPLABX-v4.15-linux-installer.sh MPLABX-v4.15-
linux-installer.tar xc8-v1.45-full-install-linux-installer.run. If you see these files or something close to it
you are on the right track for a successful install.
Quick Tip: Pressing the Home Key will take you to the top of most web sites.
You will be prompted for your password, Type in the password you login in with. When you're done
press Enter.
Now let's install the missing 32bit library's that are required for MPLAB and the XC Compiler to run.
Copy-n-Paste this into the terminal followed by pressing Enter:
sudo apt-get install libc6-i386 lib32gcc-5-dev libexpat1:i386 libx11-6:i386 libxext6:i386
You will be prompted with: Do you want to continue? [Y/n] press y followed by pressing Enter.
After this process has completed and you are returned to the command prompt your system will be
ready to install MPLAB X IDE.
Quick Tip: Pressing the Home Key will take you to the top of most web sites.
On a successful launch you will see a Splash Screen like the one shown below.
Success!! At this point you are at the setup window. Let's proceed by clicking Next >
If you want to use Microchips MPLAB IDE you only have one choice and that is to select I accept the
agreement followed by clicking Next >.
The next screen is the default installation directory. We will keep this to the default setting of
/opt/microchip/mplabx/v4.15 click Next > to proceed.
Time to select the programs that you would like to install. By default all check boxes are selected in the
event that they are not make sure that MPLAB X IDE and MPLAB IPE is selected. The last checkbox
is optional and that is Help Improve MPLAB X Products. Personally I dislike anything that spies on
you even with your consent so this box is always left unchecked on my machines. After the box's are
set click Next >.
After a little clicking it's time to finally install the programs/software. Click Next >.
Depending on the speed of your machine the installation process can take some time, be patient and
wait for this process to complete.
Reboot Advisory. During the installation of the IPE (Integrated Programming Environment) USB
drivers were installed to support Microchip's line of chip programmers. Click OK to continue.
Last screen for MPLAB's installer. Deselect All Check Boxes and click Finish
You will be returned to the terminal when the installation of MPLAB is complete.
Quick Tip: Pressing the Home Key will take you to the top of most web sites.
Ok the file is now executable, Time to run it! Type this into the terminal followed by pressing Enter:
Success!! At this point you are at the setup window. Let's proceed by clicking Next >
If you want to use Microchips Compiler you only have one choice and that is to select I accept the
agreement followed by clicking Next >.
The next screen is the default installation directory. We will keep this to the default setting of
/opt/microchip/xc8/v1.45 click Next > to proceed.
You're now at the Compiler Settings screen. Select Apply settings to all users of this machine and Add
xc8 to the PATH environment variable. followed by clicking Next >.
After a little clicking it's time to finally install the XC8 Compiler. Click Next >.
Depending on the speed of your machine the installation process can take some time, be patient and
wait for this process to complete.
Almost done, you have arrived at the licensing screen now what? Well.... for the majority of us we will
click Next > and run it as the free version. For the people that do have a valid license key now is the
time to put it in followed by clicking Next >.
Success! After the installation you are returned to the command prompt.
Very good, Microchips MPLAB and XC8 is installed and ready to run. Let's close the terminal now.
Type this into the terminal followed by pressing Enter:
exit
Summery (Quick-n-Dirty)
01) Download MPLAB X IDE
02) Download XC Compiler
03) Open Terminal: CTRL+ALT+t
04) Change Directory: cd Downloads/
05) Extract MPLAB: tar -xvf MPL(press tab key)
06) Update repositories: sudo apt-get update
07) Install required programs\library's: sudo apt-get install libc6-i386 lib32gcc-5-dev libexpat1:i386
libx11-6:i386 libxext6:i386
08) Run MPLAB Installer: sudo ./MPL(press tab key)
09) Follow MPLAB Prompts.
10) Make XC8 executable: sudo chmod +x xc8(press tab key)
11) Run XC8 Installer: sudo ./xc8(press tab key)
12) Follow XC8 Prompts. Select Add xc8 to PATH environment variable and Apply settings to all users
of this machine
13) Exit Terminal: exit
14) Installation Complete