Documente Academic
Documente Profesional
Documente Cultură
Piklab is a mature and extraordinarily well-designed IDE (integrated development environment) for Microchip's PIC series of microcontrollers. Piklab is more
convenient (and faster!) than Microchip's own MPLAB. Even better, Piklab is a Linux program. Microchip recently introduced MPLAB-X, apparently
recognizing the need for a cross-platform IDE. Piklab has one major advantage over MPLAB-X: it works.
Unfortunately, the KDE developers have moved on to a new version of QT (the underlying UI library) without maintaining backward compatibility.
Consequently, most Linux distributions, such as Ubuntu 11.04 and later, no longer support software that is based on QT version 3. This includes Piklab.
This guide is a list of steps it took me to install Piklab on Ubuntu 14.04 through 17.10 with a separate set of instructions for older Ubuntu 11.10 and 12.04. It is
likely going to work with Ubuntu 11.04, Mint 12, and similar distributions.
Acknowledgements: Adnan Mustafic contributed significantly to this list. Similar instructions can be found at the Big Bang blog.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
We need fakeroot in the next step, that is, the creation of a deb package. Depending on the Piklab version you downloaded, the version numbers may differ.
Adjust the version numbers ("-0.16.1...") accordingly.
fakeroot alien --scripts -d piklab-0.16.1-6.fc20.x86_64.rpm
The result is a new package, piklab_0.16.1-7_amd64.deb. You can now use dpkg to install:
sudo dpkg -i piklab_0.16.1-7_amd64.deb
Click on this link to download the .deb file that I created by following the above steps. No warranty, and ... YMMV.
To install the command-line utilities related to the PIC family: Install gputils and sdcc. Look for related stuff you may like, such as JAL. This can be done
with Aptitude. Alternatively, use
To install the bootloaders: Download MPLAB 8 from the Microchip web site and install it, for example, under WINE. Choose a suitable location for the hex8
files, for example with
Use the WINE desktop to copy all files from C:\Program Files\Microchip\MPLAB IDE\ICD2 to the new directory /usr/share/kde4/apps/piklab/hex8. Next, open
Piklab, choose "settings" and "configure programmers". Select the ICD2 programmer, set to USB port, and select the "specific" tab. There, enter
/usr/share/kde4/apps/piklab/hex8 in the Firmware Directoy entry field.
and copy and paste the folowing two lines into the file:
SUBSYSTEM=="usb" ATTR{idVendor}=="04d8" ATTR{idProduct}=="8000" GROUP="plugdev" SYMLINK+="mcidc2"
SUBSYSTEM=="usb" ATTR{idVendor}=="04d8" ATTR{idProduct}=="8001" GROUP="plugdev" SYMLINK+="mcidc2"
for your convenience, you may download the file 99-microchip_icd2.rules by right-clicking on this link. Just copy the file into /etc/udev/rules.d
Finally, add your login name to the group "plugdev" in /etc/group. Start Piklab and try to connect to the ICD-2.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Installation on Ubuntu 11.04 Through 13.10
These instructions are valid for all distributions that allow concurrent installation of the QT4 and QT3 libraries, and the main challenge is to get all required
QT3 libraries installed.
If you got to this point, Piklab is ready and needs to be configured for the programmer or debugger that you use. For the ICD-2 debugger, two steps are
necessary. The proprietary bootloaders from Microchip needs to be installed, and a rule to access the ICD-2 via USB needs to be created.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
To install the bootloaders: Download MPLAB 8 from the Microchip web site and install it, for example, under WINE. Choose a suitable location for the hex8
files, for example with
Use the WINE desktop to copy all files from C:\Program Files\Microchip\MPLAB IDE\ICD2 to the new directory /usr/share/apps/piklab/hex8. Next, open
Piklab, choose "settings" and "configure programmers". Select the ICD2 programmer, set to USB port, and select the "specific" tab. There, enter
/usr/share/apps/piklab/hex8 in the Firmware Directoy entry field.
and copy and paste the folowing two lines into the file:
SUBSYSTEM=="usb" ATTR{idVendor}=="04d8" ATTR{idProduct}=="8000" GROUP="plugdev" SYMLINK+="mcidc2"
SUBSYSTEM=="usb" ATTR{idVendor}=="04d8" ATTR{idProduct}=="8001" GROUP="plugdev" SYMLINK+="mcidc2"
Finally, add your login name to the group "plugdev" in /etc/group. Start Piklab and try to connect to the ICD-2.
(...)
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Compiling from source was particularly important for me when I wanted to add a microcontroller that was not supported. I knew that the family was supported,
but the PIC18f13k50 was not. Quite importantly, the gputils toolchain supports the 18f13k50, and it is sufficient to explain to Piklab that this chip is a valid
option. This chip needs to be added to a series of files:
coff/xml/gpprocessor.cpp
coff/base/coff_data.cpp
coff/base/coff.xml
devices/pic/xml_data/18F13K50.xml
progs/icd2/base/icd2_data.cpp
progs/icd2/base/icd2.xml
Recompiling gave me a Piklab binary that was able to program the PIC18F13k50 via ICD-2 programmer.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD