The ICD2 programmer contains a 16F876 that needs a different firmware for each family of devices to access. For copyright reasons, the firmwares cannot be distributed with piklab so you need to have an installation of MPLAB or to get them from a friend.
Firmwares from versions of MPLAB prior to 7.21 are not supported by Piklab.
Piklab: Could not find firmware file "ICD0X??????.hex" in direct
You need to tell piklab where to find the icd2 firmwares:
- Get the configure dialog with "Settings" -> "Configure Piklab..."
- Select "Programmer Selection" then "ICD2 Programmer" or "ICD2 Debugger" then the "Specific" tab.
- Enter the fimrware directory, for e.g. /mnt/windows/Program Files/Microchip/MPLAB IDE/ICD2
piklab-prog: Error: Firmware directory is not configured or does not exist.
You can add the option --firmware-dir <dir> where <dir> is the directory where the firmwares are.
Alternatively you can manually load a firmware by using:
piklab-prog -c upload_firmware -p icd2 /<path>/ICD<0X??????>.hex
where <path> is the path to the firmware directory, <0X??????> is the requested firmware number followed by the version of the firmware that you have (different for different MPLAB versions).