To install PICkit 2 Development Programmer / Debugger on Debian 10 Buster 64-bit, we need to install library packages for i386 architecture. That we can do with Multiarch. What is Multiarch? Multiarch lets us install library packages from multiple architectures on the same machine.
So for that, we are gonna use a couple of commands to print current architecture, check foreign architecture, and add a new architecture.
The first command is gonna print the current machine architecture:
dpkg --print-architecture
amd64
The second command is gonna print foreign machine architecture. If print nothing, means we don't have foreign machine architecture added to our system:
dpkg --print-foreign-architectures
The next step is a way to add foreign machine architecture to our system:
dpkg --add-architecture i386
So now if we do check for other available architectures, it should print i386:
dpkg --print-foreign-architectures
i386
Now we need to install dependencies for compiling our source files:
sudo apt update
sudo apt install build-essential libusb-dev
That's all for preparing the system. The next step is downloading and unpacking the source files:
wget https://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz tar xzvf pk2cmdv1.20LinuxMacSource.tar.gz cd pk2cmdv1.20LinuxMacSource
Building the application:
make linux
Installing the application:
make install
Adding device file location to PATH:
echo 'export PATH="$PATH:/usr/share/pk2"' >> ~/.bashrc
Reboot system and test installation:
pk2cmd -?v # PICki2 not connected Executable Version: 1.20.00 Device File Version: 1.55.00 OS Firmware Version: PICkit 2 not found # PICkit2 connected Executable Version: 1.20.00 Device File Version: 1.55.00 OS Firmware Version: 2.32.00
Uninstall pk2cmd:
Remove file pk2cmd from /usr/local/bin: sudo rm -R /usr/local/bin/pk2cmd Remove all files from /usr/share/pk2/: sudo rm /usr/share/pk2/* Remove folder /usr/share/pk2/: sudo rm -R /usr/share/pk2 Edit file .bashrc: sudo nano ~/.bashrc Find and Remove line : export PATH="$PATH:/usr/share/pk2"
Stay healthy and safe till the next time!
No comments:
Post a Comment