Compile pk2cmd on Linux

From Curuxa

pk2cmd is the official command-line multiplatform program for interfacing Microchip PICkit2.

Here you can download precompiled binaries for Linux 2.4 and 2.6, but only for x86. If you are using some other architecture you'll have to compile it yourself.

If you just want to install pk2cmd on Debian/Ubuntu/derivatives you can use package repository.

System requirements

  • A working Linux installation
  • GCC
  • G++
  • make
  • libusb
  • libusb development libraries

Compiling pk2cmd

  1. Download pk2cmd source code (look for a file called PK2CMD Vx.xx Linux & Mac OS X Source Code with Makefile)
  2. From the command-line, cd into the source code directory
  3. Execute make linux
  4. Copy to another directory the following files:
    • pk2cmd
    • PK2DeviceFile.dat
    • PK2V023200.hex
    • ReadmeForPK2CMDLinux2-6.txt
    • usbhotplug.txt

Now you can use and redistribute the files in that new directory.