Melabs U2 Programmer Command Line Options


Closed Thread
Results 1 to 6 of 6
  1. #1

    Red face Melabs U2 Programmer Command Line Options

    Hello Ladies and gents,

    I have a Melabs U2 programmer that I am trying to get working with the MPLAB IDE v8.33 or the HI-TECH HI-TIDE 3 IDE. I am doing so to try out the HI-Tech C18 compiler. My OS is XP sp3. I have the latest U2 programmer beta software and firmware installed but MPLAB IDE does not have the Melabs U2 USB programmer in the programmer selection list. I guess that means I have to use the Post Build option? I tried various commands including the following:

    "C:\Program Files\melabs Programmer Beta\meProg.exe" -P$(ProjectDir)bobby.hex but it kept reporting the device file was not found

    So from the dos command prompt I tried:

    "C:\Program Files\melabs Programmer Beta\meProg.exe" -PC:\PICC_Projects\bobby\bobby.hex

    A dialog box from MeProg (I presume) came up and read:

    Unable to open device file C:\Program Files\melabs Programmer Beta \C:\PICC_Projects\bobby\bobby.hex.epc.


    I guess my question is how do I get this working and why is "epc" always being appended on the filename? Any help would be greatly appreciated.

    Thank You,
    Bob

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I use command line options with the U2 every day, and they work fine, but you may need
    the non beta version of the software for command line options to work properly.

    If you have a pre-compiled blink.hex, compiled for a 16F627a, in C:\PBP, then create a batch
    file with this in it to test.

    meProg -n -dPIC16F627a -e -p -v c:\pbp\blink.hex

    Say its name is prog.bat, and it's in the U2 software directory. When you click on prog.bat
    it will launch the U2 software, select the 16F627a, erase, program, then verify blink.hex in
    the target.

    Edit: .epc files tell the U2 software programming info, config options, and a few more things
    about each PIC target. If you don't have a .epc file for a PIC the U2 supports, it won't
    show in the drop-down menu.

    I copied meProg.exe, the target .epc file, and meprog.ini into C:\PBP, then setup MPLAB
    post build option like this; meProg -n -dPIC16F627a -e -p -v c:\pbp\blink.hex

    It compiles, launches & programs from within MPLAB when you click the compile button.

    MPLAB seems to consider it part of the language toolsuite, so it works if all required files
    are in the PBP directory.

    HTH
    Last edited by Bruce; - 3rd July 2009 at 01:37. Reason: Inside MPLAB
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    The command lines still work with the beta version, even though the melabs page says they don't.

    I think Bob's line would work if there was a space after the -P.

    I'm getting tired of the splash screen in the beta version though.
    Do you sell the upgrade to meProg Bruce?

    The beta solved several problems I had with the version that came with the U2, so I can't go back to the old one.
    If I could just get rid of the nag screen.
    <br>
    DT

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,

    Yep. We have it.

    I've never tried setting up the U2 for 1-click compile/program in MPLAB
    until just now. Couldn't get it work at all without dropping a few files in
    my PBP directory.

    If there's an easier way, I would love to know about it. Pretty handy.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    This command line works with MicroCode Studio for 1-click. Well ... 2-clicks including the nag screen.

    /DPIC"$target-device$" -P $long-hex-filename$

    I have no idea what it would take for MPLAB.

    Great, glad you have the upgrade.
    I'll email you.
    DT

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I think that's specific to the MCS IDE?

    For command line options in batch files I just use the ones
    shown in the meLabs help file.

    DT - I already sent you an email.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Melabs U2 USB programmer
    By Ron Marcus in forum General
    Replies: 2
    Last Post: - 24th April 2008, 19:03
  2. U2 Programmer Interface for Ethernet MINI
    By edtp in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st July 2007, 22:29
  3. melabs usb programmer problem
    By bigbear in forum General
    Replies: 4
    Last Post: - 28th December 2006, 12:50
  4. Replies: 2
    Last Post: - 25th February 2006, 02:53
  5. Melabs USB Programmer
    By tmurph in forum General
    Replies: 1
    Last Post: - 25th December 2005, 03:25

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts