Hot!PICkit2 Devicefile Editor

Page: 12345.. > >> Showing page 1 of 6
Author
dougy83
New Member
  • Total Posts : 28
  • Reward points : 0
  • Joined: 2008/06/06 02:06:39
  • Location: 0
  • Status: offline
2010/01/26 23:24:23 (permalink)
5 (3)

PICkit2 Devicefile Editor

Hi Guys,

I saw this thread yesterday as I was looking for a pk2devicefile file editor or something I can't actually remember (sad I know). I took it that none existed, so I wrote one:

Download me: PICkit2 Device File Editor -- All versions are available from this page

This is my first program in .NET, so it might leave some things needing a little work. I can read in a datafile and write it back out as an identical file, so it works OK with the structures and variable length fields.

The scripts (in fact all number values) are displayed as decimal - which might be a bit combersome - for now, I'll get around to changing it to hex for some of them; would someone like to say which ones are more useful as hex?

Also, does anyone actually write their own scripts? I was wondering if there is any point in adding a scripting tool to this devicefile editor...

Any comments & suggestions are welcome. If there's any bugs (or omissions), I guess you can send reports to me.

-Doug.
post edited by dougy83 - 2010/01/30 19:01:52

Attached Image(s)

#1

110 Replies Related Threads

    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 06:13:59 (permalink)
    0
    Sadly, install fails on my W2K system...  (Needs XP or higher?)

    Regards,
    Peter
    #2
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 18:19:06 (permalink)
    0
    That's unfortunate. By "fails to install", what exactly do you mean - is there a more verbose message than that? I'm guessing that there's some dll's missing on your W2K installation. If you're missing a required .NET framework, I'm pretty sure it complains and tells you which version to get (I've seen the message before with other software).

    I've uploaded just the exe and dll files from my project (and some of the M$ redist ones also) to EXE & DLL (EDIT: added another VC redist dll).

    You may require some VC dlls as well (or you can install the VC++ redistributable file (sorry it's starting to sound messy)).

    If you're still having trouble and don't mind, you could download Dependancy walker and open the exe file and the RawConvert.dll file to see what's missing. I would be appreciative if you could, as I might learn how to better deploy .NET SW in future. (I'll also have a look at known installation issues).
    post edited by dougy83 - 2010/01/30 19:05:04
    #3
    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 18:24:56 (permalink)
    0
    The error message:

    Prerequisite check for system component .NET Framework 3.5 failed with the following error message:
    "Installation of the .NET Framework 3.5 requires Windows XP SP2, Windows 2003 SP1, Windows Vista, or later. Contact your application vendor."

    W2K only supports .NET 1.1 and 2.0...

    Regards,
    Peter
    #4
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 18:40:15 (permalink)
    0
    Well I think that answers your question re win2k and that program. I'll see if I can rebuild it for an older .NET framework (the 1.x or 2.0 you mentioned). I'll keep you posted.
    #5
    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:13:47 (permalink)
    0
    Thanks!

    It runs and loads a .dat file... I'll test it some more...



    Regards,
    Peter
    #6
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:23:12 (permalink)
    0
    Cool. Do you mind if I ask how you installed it? Did you use the installer or just run the exe from the exe+dll package? Apparently both should be possible (according to some .NET spiel I just read)

    If you see anything that could be changed to make it [more] usable (including bugs) feel free to say so.
    post edited by dougy83 - 2010/01/27 19:24:28
    #7
    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:31:04 (permalink)
    0
    I just copied the exe and dlls into a directory and started the exe...
    One thing I noticed, but I'm not sure if it's easily changeable:
    The left treeview holds devices in the sequence they are read from the devicefile. I don't know if you can sort them so it gets a bit easier to find a particular item...
    (It seems that Microchip just added new devices to the bottom of the file regardless of family)
    I never used dotNet so I don't know what's possible...

    Regards,
    Peter
    #8
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:42:58 (permalink)
    0
    Thanks for the info.

    Sure I can sort it. But by what? Name? Some other value/property? There might even be a property to sort it automatically without me having to write any extra code; if not, it's a simple process of just sorting the items before adding them to the treeview. I'm guessing that the PK2 software doesn't care what order the entries are written back into the file in, so it should be OK.

    Note that you can add (duplicate - creates a new node above the current one & the data is duplicated also) and remove entries from the treeview by right-clicking on the entry. Maybe I should add something re this to the help screen.
    #9
    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:48:32 (permalink)
    0
    I meant that all 10F, 12F, 16F are grouped together. At the moment they are all mixed. (You can have a 24F, some 16F and so on) It's not a big deal, though.

    Regards,
    Peter
    #10
    FunnyNYPD
    Super Member
    • Total Posts : 1553
    • Reward points : 0
    • Joined: 2007/09/28 20:06:59
    • Location: USA & Canada
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:58:27 (permalink)
    0
    Very nice tool.
    #11
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/27 19:59:39 (permalink)
    0
    Sure, point taken (I opened a file and it's a bit of a mess). I update it later to sort by name for the parts list section. And maybe device family and scripts can be sorted by their respective IDs - which they are already coming out of the file (but not if you start adding your own). I could also check for duplicate IDs within the family IDs & script IDs before writing a file to reduce the chance of writing a bogus file (or the user could just be more careful I guess)
    #12
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/28 02:03:31 (permalink)
    0
    I got some time to put the sorting thing in, so that's done now. I also found a couple of bugs, which are fixed.

    Any extra notes, builds or bugs are available from here:
    PK2 Device File Editor -- All versions
    post edited by dougy83 - 2010/01/30 19:03:31
    #13
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/28 05:14:16 (permalink)
    0
    ORIGINAL: dougy83
    The scripts (in fact all number values) are displayed as decimal - which might be a bit combersome - for now, I'll get around to changing it to hex for some of them; would someone like to say which ones are more useful as hex?


    Thanks for the nice program.
    Basically many fields are more useful if displayed in hex, eg: all the address (ConfigAddr, UserIDAddr, etc); all the masks (bandgap, config, CP); DeviceID; etc.


      USB_Links and libusb
    #14
    miceduan
    Super Member
    • Total Posts : 246
    • Reward points : 0
    • Joined: 2007/09/29 15:47:37
    • Location: Canada
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/28 10:58:00 (permalink)
    0
    Or you can use a switch to control the display value in hex or decimal.
    #15
    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/29 03:27:10 (permalink)

    Regards,
    Peter
    #16
    BearlyRich
    New Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2010/01/27 13:35:49
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/29 11:01:52 (permalink)
    0
    The link isn't dead exactly, just mal-formed.

    Right now its:
    http://http//docs.google.com/leaf?id=0B-SPNJUFjfPrYjY3NjcxM2UtMzVhZS00NWM2LThhZTktNDhhYjIyZTNkZDAx&hl=en

    If you remove the extra 'http//' before the 'docs', it will work fine as:

    http://docs.google.com/leaf?id=0B-SPNJUFjfPrYjY3NjcxM2UtMzVhZS00NWM2LThhZTktNDhhYjIyZTNkZDAx&hl=en

    #17
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/01/30 04:29:18 (permalink)
    0
    Oh, sorry about the bad link. It's fixed now.

    I got some spare time to fix up the display for hex. I did have a look at allowing each item to have a configurable display format, but decided it would take more time, so all fields that look like they should be hex are displayed as 0xHEX (DEC). Values can be entered in these fields as decimal, hex (prefix "0x" or "&H" or suffix "H") or binary (prefix "0b" or "%").

    Where the numeric item is not displayed in the above format (i.e. just decimal), you can enter data in whatever format .NET allows (I think it's just decimal and hex with "0x" || "&h" prefixes).

    The ScriptLength field is now automatically updated as you change script command array. So that's available as v1.0.0.4.

    All the best.
    #18
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/03/02 22:47:50 (permalink)
    0
    I can't seem to duplicate an item. It gives me an unhandled exception:

    'PICkit2_DeviceFileEditor.PICkit2DatDecode+DataFileAccess+uint32_t'
    in Assembly 'PICkit2 Device File Editor, Version=1.0.0.4' is not marked as
    serializable.

    Using version 1.0.0.4 under xp.

    By the way has anyone added the device settings for the new PIC32MX5/6/7 series? If so can you please upload your device file?

    Thanks.
    #19
    dougy83
    New Member
    • Total Posts : 28
    • Reward points : 0
    • Joined: 2008/06/06 02:06:39
    • Location: 0
    • Status: offline
    RE: PICkit2 Devicefile Editor 2010/03/02 23:16:14 (permalink)
    0
    Sorry about that. Just use v1.0.0.3, I'll get around to fixing that problem when I get the time.
    #20
    Page: 12345.. > >> Showing page 1 of 6
    Jump to:
    © 2018 APG vNext Commercial Version 4.5