PiKdev Installation
Installation of PiKdev 1.4.x
PiKdev V1.4.x is only provided as source code, because I don't have enough time to package executable versions. However, building and installing the program is really simple. You will probably have to install pk2cmd, because modern computers only offer USB interfaces.

Needed software

  • The gcc C++ compiler (g++)
  • Qt 4.x development tools (available with all Linux distributions). A simple way to get them is to install the package Qt Creator.
  • Nothing else

Build and installation procedure for pikdev-1.4.0

  1. Unpack the archive (tar xzvf pikdev-1.4.0.tar.gz)
  2. Go to the src sub directory (cd src)
  3. Generate the Makefile (qmake -o Makefile pikdev140.pro)
  4. Build the application (make)
  5. Become root (su root)
  6. Install in /usr/bin (make install)
Important: The name of the executable is pikdev-1.4.0. The installation phase is not mandatory : you can execute pikdev from anywhere without being installed, so you don't need the root privilege. PiKedv 1.4.0 is self-contained: you don't need to copy cryptic files to cryptic location to get it working.
Because PiKdev is now a pure Qt4 application, it uses a configuration file ~/.config/GoldenBugSoftware/pikdev.conf

Build and installation procedure for pkp-1.4.0.
pkp may be built from a separate project file, which can be found in the same source directory than pikdev.

  1. Unpack the archive (tar xzvf pikdev-1.4.0.tar.gz) if this is not already done
  2. Go to the src sub directory (cd src)
  3. Generate the Makefile (qmake -o Makefile pkp.pro)
  4. Build the application (make)
  5. Become root (su root)
  6. Install in /usr/bin (make install)
Important: The name of the executable is pkp-1.4.0.



Installation of Microchip's pk2cmd tool for picKit2

Many people have trouble to get a working pk2cmd. Here are my advices to install pk2cmd properly.

  1. Verify that the libusb and libusb-dev are installed in your system (the actual name of the needed packages may vary from one distro to another)
  2. Get pk2cmd V1.20.0 (or higher) source code from Microchip's website, or from my download page
  3. Unpack the archive
  4. Enter the created directory
  5. Build the application with make linux (no ./configure needed .. NICE ! )
  6. Become root with su
  7. Install with make linux install (please do not try to bypass this step)
  8. Return to user mode with exit
  9. Make sure that your PATH environment variable contains /usr/share/pk2.
    If you use bash, you must add the following at the end of the .bashrc AND .bash_profile files :
    export PATH=$PATH:/usr/share/pk2
  10. Before trying to use your pickit2 programmer from pikdev, try to use it from command line interpreter:
    pk2cmd -P
    Programmer's LED should quickly flash, and pk2cmd should issue a Auto-Detect: No known part found. message. If this is not the case, the pikdev's picKit2 support will not work.

Installation of PiKdev <= 1.2.1 (obsolete)


The following information only concerns PiKdev for KDE 3.5.x and must be considered as obsolete

You need the following softwares :
  • KDE 3.5.x or newer
  • Qt 3.x
  • gputils v0.11.x or newer (gpasm is part of gputils)
  • The following support must be present within your system :
    ppdev, parport, parport_pc.

Of course, you also need the dev packages wich contain the headers files of KDE and Qt libraries if you plan to build pikdev from source code. Pikdev's build from source can be done in a traditionnal way, using a ./configure script and a Makefile (see below).
However, more and more people have trouble with the autotools suite, so I have decided to provide a simpler and more reliable way to build/install the application (see the next section).

  The build_pikdev and install_pikdev scripts (since V1.2.1)
The build_pikdev script build the pikdev and pkp applications from source code. The install_pikdev script install all the needed stuff at the proper location.

These scripts are (designed to be) very stupid : they will not try to guess anything about your system, so they must be manually configured. However, I expect they will be simple to understand and maintain for most users. They are pre-configured for DEBIAN distributions, under KDE3 or KDE4 and work perfectly in these situations.

  • Build
    1. Unpack the pikdev tarball
    2. Go to the src sub directory
    3. Edit the build_pikdev script (the script contains explanations about what must be configured)
    4. Type ./build_pikdev
    5. After a successful build, please send me informations about your configuration (distro, versions, etc.). I will update the script accordingly, so future users will be happy to get an easy to use script.
    6. Please note that a non-installed pikdev will not work properly.
  • Installation
    1. Edit the install_pikdev script (configuration of target directories)
    2. su root
    3. Type ./install_pikdev
    4. Return to user mode (exit)
    5. After a successful install, send me the configuration you have used

Pikdev in a KDE4.x environment
First of all: pikdev works perfectly under KDE4.x. You just need to install the KDE 3.5.x and Qt 3.x libs. Depending on the distribution you use, the name of the needed packages may vary. Here are the names of these packages for a DEBIAN unstable (sid), if you just need to run pikdev.

  • Qt 3.5.x : libqt3-mt (libraries)
  • KDE 3.xx : kdelibs4-dev (libraries and headers)

If you plan to build from source (recommended) you also need :

  • Qt 3.5.x : qt3-dev-tools (various utilities, such as moc) and libqt3-headers (headers)

To install pkp (the command line version of the PiKdev programming engine), you just need a gcc 3.x or 4.x C++ compiler (see installation instructions below).
pkp does not use any KDE or Qt libraries/headers.

Installation of Microchip's pk2cmd tool for picKit2
Many people have trouble to get a working pk2cmd. Here are my advices to install pk2cmd properly.

  1. Verify that the libusb and libusb-dev are installed in your system (the actual name of the needed packages may vary from one distro to another)
  2. Get pk2cmd V1.20.0 (or higher) source code from Microchip's website
  3. Unpack the archive
  4. Goto the created directory
  5. Build the application with make linux (no ./configure needed .. NICE ! )
  6. Become root with su
  7. Install with make linux install (please do not try to bypass this step)
  8. Return to user mode with exit
  9. Make sure that your PATH environment variable contains /usr/share/pk2.
    If you use bash, you must add the following at the end of the .bashrc AND .bash_profile files :
    export PATH=$PATH:/usr/share/pk2
  10. Before trying to use your pickit2 programmer from pikdev, try to use it from command line interpreter:
    pk2cmd -P
    Programmer's LED should quickly flash, and pk2cmd should issue a Auto-Detect: No known part found. message. If this is not the case, the pikdev's picKit2 support will not work.

Parallel port
PiKdev uses the parallel port in user mode (/dev/parport device). The parport devices are automatically detected since version 0.3.4.
If this device is not present in your filesystem, you can easily create it with the mknode command (with root privileges): (Note: /dev/parportN is a character device whose major number is 99 and minor number is N)

mknod /dev/parport0 c 99 0
(first parallel port)
mknod /dev/parport1 c 99 1
(eventually, second parallel port)
Moreover, be sure that the device is RW enabled:
chmod a+rw /dev/parport0

The previous informations are obsolete for most modern Linux distro (parport device is now automagically created)

Finally, you must have the ppdev support. This is necessary for using parallel ports in user mode. This support can be compiled into the linux kernel, or loaded as modules (depending on your system, you might have to update /etc/modprobe.preload or /etc/modules).

  Installation as root from tarball:
  1. Unpack the tarball:
    tar xzvf pikdev-[VERSION].tar.gz
  2. Enter the PiKdev directory:
    cd pikdev-[VERSION]
  3. Configure the software: (prefix is mandatory)
    ./configure --prefix=[DISTRIB-SPECIFIC-PREFIX]
  4. If the kde-config script is available in your system, you can directly use it to set the correcty prefix :
    ./configure --prefix=`kde-config --expandvars --prefix`
  5. Compilation:
    make
  6. Become root:
    su
    Password: [root password]
  7. Installation:
    make install
  8. Return to user mode:
    exit

Note: The following DISTRIB-SPECIFIC-PREFIXs seem to be correct :

  • Mandrake 9.x,10.x : /usr
  • Red Hat 8.x, 9.x : /usr
  • Suse 8.x : /opt/kde3
  • Debian : /usr

Another solution to obtain the correct prefix is to use the kde-config command:

kde-config --expandvars --prefix
will report the correct distribution specific prefix. and
kde-config --expandvars --path data
will report the correct distribution specific location for .rc files.

CAUTION

You might have to use an installation prefix which is not mentionned in the previous list. Please send me informations if this is the case.

If this prefix is not consistant with the way your distribution uses KDE, PiKdev will not find the files pikdev-main.rc and pikdev-prg.rc and will not be able to construct its graphical interface (No menu, no icon!). In this case, just copy these files in your home directory or use the good prefix, or use the installation method exposed below. Before changing the installation prefix, do not forget to uninstall PiKdev to keep your system clean.

make uninstall
(with root privileges)


Installation of pkp

The installation of pkp is totally independant from the PiKdev installation.
To compile pkp :

  1. Unpack the tarball:
    tar xzvf pikdev-[VERSION].tar.gz
  2. Enter the source directory:
    cd pikdev-[VERSION]/pikdev
  3. Compile pkp and the programming engine : (you might have to edit Makefile.pkp before this)
    make -f Makefile.pkp
  4. Installation:
    su
    Password: [root password]
  5. make -f Makefile.pkp install
  6. Return to user mode:
    exit

pkp uses two (hidden) configuration files :
    .pkprc : This files contains pins affection for your hardware. I don't provide any .pkprc file because pkp creates this file if it doesn't exist.
    You can move this file to your home directory, so it will be seen by pkp from any subdirectory.
    .pkprc is very simple and only contains informations about pins and port device name. Please edit this file to fit your hardware configuration. Here is the default .pkprc config file :

    # parallel port device
    # (use /dev/parports/x if your system is devfs based)
    port=/dev/parport0
    # pins assignation :
    # negative value means inverted signal
    # the following values are correct for
    # classic D. Tait's hardware
    type=parallel
    vpp=-5
    vdd=-4
    clock=3
    datao=2
    datai=10

    .pkpdefaults : This file only contains the name of the current pic device and the name of the current hex file. This file is created by pkp in the current directory, so each project may have its own default parameters.

Feel free to send reports about (successful or not) installations.