szokesandor.hu |
PICkit2 and Debian Etch |
|
How to program PIC under Debian EtchI have had some time in the last weekend, to get up and running my PICkit2 programmer. It was working in a virtual Wind*ws XP environment without any problem. The steps needed to get it working under linux: Grab and compile this. Copy pk2cmd, PK2DeviceFile.dat and PK2V023200.hex to /usr/local/bin directory. As root issue the commands (chown and setuid): chown root.root pk2cmd chmod +s pk2cmd Create the file /etc/udev/rules.d/026-microchip.rules with this content: #PICKit2 SYSFS{idVendor}==\"04d8\",SYSFS{idProduct}==\"0033\", MODE=\"0660\" Restart udev /etc/init.d/udev restart Detach and attach PICkit2. It should work now. Check this as regular user issue the command: pk2cmd -?V Executable Version: 1.12.00 Device File Version: 1.52.00 OS Firmware Version: 2.01.00 After firmware upgrade (on other pc): Executable Version: 1.12.00 Device File Version: 1.52.00 OS Firmware Version: 2.32.00 List connected PICkits2 by firmware: pk2cmd -s# Blank check PIC18F458 by invoking: pk2cmd -PPIC18F458 -C Erase PIC18F458 by invoking: pk2cmd -PPIC18F458 -E Program PIC18F458 by invoking: pk2cmd -PPIC18F458 -Ffirmware.hex -M Verify program by invoking: pk2cmd -PPIC18F458 -Ffirmware.hex -Y If you have more PICkits2 assign (only one is attached) a nickname to each one using the pk2cmd -N nickname ... use the preferred PICkit2 (if more is connected) with pk2cmd -s nickname ... If you know how to use without setuid please tell it to me! |
Page last modified on 2008.12.19. 16:22:00 |