PICkit 2 "pk2cmd" update for 2.6x device files

Author
MichaelS
Moderator
  • Total Posts : 200
  • Reward points : 0
  • Joined: 2009/06/24 09:57:07
  • Location: Microchip Technology - Chandler, AZ
  • Status: offline
2010/12/02 15:36:06 (permalink)
5 (2)

PICkit 2 "pk2cmd" update for 2.6x device files

By popular demand, here is an unofficial, testing version of the pk2cmd application modified to work with the latest 2.6x device files (same as the current version of the GUI). As usual, device file updates can be downloaded from the PICkit 2 site.

It can be downloaded here: http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit2_PK2CMD_WIN32_SourceV1-21_RC1.zip

I have not seen any problems on Midrange, Enhanced Midrange, or PIC18 devices. PIC24_K devices (with 9 config words) are most likely to have problems and have not been thoroughly tested yet (feedback on these would be most welcome).

Please use with caution. Feedback is welcome in this thread.
post edited by MichaelS - 2010/12/11 00:22:04
#1

11 Replies Related Threads

    Ian.M
    Super Member
    • Total Posts : 13114
    • Reward points : 0
    • Joined: 2009/07/23 07:02:40
    • Location: UK
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2010/12/02 16:31:03 (permalink)
    0
    YAY! Smile THANK YOU for an excellent Christmas present.   I'm Looking forward to trying it out.

    post edited by Ian.M - 2010/12/02 16:32:40
    #2
    TimEdwards
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2011/01/31 15:10:48
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/01/31 15:24:05 (permalink)
    0
    MichaelS

    By popular demand, here is an unofficial, testing version of the pk2cmd application modified to work with the latest 2.6x device files (same as the current version of the GUI). As usual, device file updates can be downloaded from the PICkit 2 site.

    It can be downloaded here: http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit2_PK2CMD_WIN32_SourceV1-21_RC1.zip

     Feedback is welcome in this thread.



    I just downloaded pk2cmd-1.20 for Linux, noted that the device list includes the PIC18F45K22 that I want to program, found that the device file didn't have it, found that the updated device file does, downloaded the new device file, and then found that it demands an updated pk2cmd, where no such updated version exists.  You guys really go out of your way to frustrate your end-users!  Is there a 1.21 version of the pk2cmd Linux/MacOS source tarball that can be downloaded?

                       ---Tim
    #3
    TimEdwards
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2011/01/31 15:10:48
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/02/01 09:52:26 (permalink)
    0
    For the record, I would like to state that a helpful participant of the gmane newsgroups clued me in to the fact that the above-referenced Windows source file for pk2cmd-1.21 includes a Makefile for Linux and MacOS.  So I downloaded the source, and was able to compile and run the new version under Linux pretty much out of the box.  I am now able to program my 18F45K22 with the PICkit2 using pk2cmd-1.21.  Presumably this should also work for MacOS users.  One caveat that is not mentioned in the web page for pk2cmd:  Linux systems come with two conflicting versions of "libusb".  Most systems come with the runtime library but not the header files.  If you install the libusb development files, be sure to get the right one, which is libusb-0.1, NOT libusb-1.0.  For those who have installed libusb from packages rather than compiled it from scratch, it will probably be necessary to edit the pk2cmd Makefile to change the LIBUSB variable from "/usr/local" to "/usr" to find the header and library files.

        ---Tim
    #4
    fabienlyrique
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2010/10/24 14:18:38
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/02/01 16:22:45 (permalink)
    0
    does this update support the PIC18F46K22, by chance?
    #5
    C_IRQ
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2009/06/04 06:53:18
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/06/04 01:37:12 (permalink)
    0
    First of all.. Thank you for the updated pk2cmd!

    Anyone used it with the latest DeviceFile.dat (PK2DFUpdate-1-62-09.zip)?

    At least it seems to accept it, I get this when typing "pk2cmd -?P"

    Device File Version:   1.62.09
    Number of devices = 624
    Device Name                  Device Family
    -----------                  -------------
    PIC10F200                    Baseline
    PIC10F202                    Baseline
    PIC10F204                    Baseline
    PIC10F206                    Baseline
    PIC10F220                    Baseline
    PIC10F222                    Baseline
    ...
    @fabienlyrique: I have no chance to test it but the PIC18F46K22 is listed in the latest device file so it may be worth a try...
     
     
    post edited by C_IRQ - 2011/06/04 01:58:30
    #6
    mluerkens
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2010/07/05 03:59:58
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/06/08 04:00:05 (permalink)
    0
    Hi Michael,
    thanks for posting the source code. I have a feedback, regarding using the PicKit2 with unit IDs. pk2cmd just returns a zero, when the PicKit2 with the given ID is not found.  Seems it is somewher here:

    cmd_app.cpp line 643
     if (j == 0)
        printf("\nNo PICkit 2 Units Found...\n");
    else
        printf("\nPICkit 2 with Unit ID '%s' not found.\n", unitIDString);


    which should probably be:
     if (j == 0)
    {
        printf("\nNo PICkit 2 Units Found...\n");
       ReturnCode = NO_PROGRAMMER ;
    }
    else
    {
        printf("\nPICkit 2 with Unit ID '%s' not found.\n", unitIDString);

       ReturnCode = NO_PROGRAMMER ;
    }

    Unfortunately I'm not able to test the fix, because pk2cmd.vcproj is missing in the ZIP file. Is it possible to post that file ?

    Best regards
    Matthias
    #7
    mluerkens
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2010/07/05 03:59:58
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/06/08 04:43:40 (permalink)
    0
    Just succeeded in building a new project from the scratch, using the source code:
    no precompiled headers,
    no UNICODE
    include HID.LIB and setupapi.lib
    and it works. My fix now returns errorlevel 10 when a pickit2 with a required unit ID is missing.

    We are using in a production system 4 PicKit2 parallel to program 4 devices simultaneously. Works fine.

    Best regards
    Matthias

    #8
    Tang
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2011/06/11 19:14:30
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2011/06/11 19:28:57 (permalink)
    0
    Hi all,
       I want to development product using PIC , whitch programmer is good for me?

     Thanks in advance!
    #9
    Stefan99
    Super Member
    • Total Posts : 234
    • Reward points : 0
    • Joined: 2010/07/19 01:50:01
    • Location: Germany
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2012/03/07 07:13:29 (permalink)
    0
    mluerkens

    Just succeeded in building a new project from the scratch, using the source code:
    no precompiled headers,
    no UNICODE
    include HID.LIB and setupapi.lib
    and it works. My fix now returns errorlevel 10 when a pickit2 with a required unit ID is missing.

    We are using in a production system 4 PicKit2 parallel to program 4 devices simultaneously. Works fine.

    Best regards
    Matthias


    can u send me more information for ur parallel working produktion system?
    i will try that, too and have no idea, how to do that

    ty
    #10
    efucer
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2016/09/06 08:18:22
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2016/09/06 14:30:24 (permalink)
    0
    Hi,
     
    How can i use this in MAC OS X El Capitan please? 
     
     
    Regards.
    #11
    elers
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2017/05/08 23:17:19
    • Location: 0
    • Status: offline
    Re:PICkit 2 "pk2cmd" update for 2.6x device files 2017/05/12 03:25:40 (permalink)
    0
    Hi,
     
    For a few days I try the "pk2cmd interface" and found out how to program my PIC device.
    Now I search for the option to write a HEX file into the PICkit 2 memory, so I can use the PICkit 2 in the same way as I can do with the "Programmer To Go" feature. But I want to use the command line interface.
     
    Is it possible?
    And, how can I do it?
     
    Thanks for anwers!
     
    Regards
    #12
    Jump to:
    © 2018 APG vNext Trial Version 4.5