• AVR Freaks

Hot!IPECMD in Batch Mode

Author
dblok1
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/03/22 14:32:19
  • Location: 0
  • Status: offline
2019/04/08 11:43:40 (permalink)
0

IPECMD in Batch Mode

I've been using PM3CMD/ICD3CMD from the old MPLAB IDE for years and have recently tried switching our production programming over to using IPECMD from the MPLAB X IDE.  I've found that there are 7-10 seconds of overhead using IPECMD unless you run it in batch mode.  Apparently this is because it was developed in java and runs on the NetBeans platform and requires loading of libraries and additional connection time.
 
Does anyone have any application written for Windows that implements IPECMD using batch mode?  My application is currently written in C using LabWindows/CVI.  I was sending the following command to a separate cmd line window and waiting for it to complete and then redirecting the output to a log file:
CMD -C PM3CMD -5 -P18F45J50 -M > pm3cmdlog.txt

Here is the same for using IPECMD in batch mode:
CMD -C IPECMD -TPPM3 -P18F45J50 -FTEMP.HEX -M -W -OB > ipecmdlog.txt

  
This method was easy and straightforward but now batch mode requires me to leave the terminal window open and send a carriage return after every device is programmed.  If there is an error while programming, batch mode terminates and I have to invoke batch mode all over again.  I wish Microchip offered a DLL that could be called from my program instead.
 
So I'm hoping someone has a simple or alternate solution to using batch mode for production programming that doesn't add the 10 seconds of programming overhead.  If so, I'd really appreciate some help.
post edited by dblok1 - 2019/04/09 09:39:05
#1

7 Replies Related Threads

    Sudheer Herle
    Super Member
    • Total Posts : 410
    • Reward points : 0
    • Joined: 2012/03/30 05:41:29
    • Location: Bangalore ,India
    • Status: offline
    Re: IPECMD in Batch Mode 2019/04/09 18:25:19 (permalink)
    0
    Two things.
    1. You can use ipecmdboost.exe from your installation directory. This will reduce the operation time by holding on to the connection from the first connect.
    2. You can use mplab SDK (it's not DLL by the way). It's easy and a little bit of java can set you to write your own software.

    Thanks,
    Sudheer
    #2
    NorthGuy
    Super Member
    • Total Posts : 5372
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: IPECMD in Batch Mode 2019/04/09 18:37:33 (permalink)
    0
    We have software which doesn't require any batch mode - you can call it from BAT/shell file or from your program:
     
    https://www.northernsoftware.com/nsdsp/soft/nsprog.htm
     
    The software is free, but it only work with our programmers. However, our programmers are much faster than ICD3, even when in batch mode (except when programming PIC32MZ).
    #3
    dblok1
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2019/03/22 14:32:19
    • Location: 0
    • Status: offline
    Re: IPECMD in Batch Mode 2019/04/10 10:45:14 (permalink)
    0
    Sudheer Herle
    Two things.
    1. You can use ipecmdboost.exe from your installation directory. This will reduce the operation time by holding on to the connection from the first connect.
    2. You can use mplab SDK (it's not DLL by the way). It's easy and a little bit of java can set you to write your own software.

    Thanks,
    Sudheer



    I have tried ipecmdboost.exe before and it is faster, but not quite as fast as batch mode.  The main problem I had with it was it would lock up whenever a part failed to program successfully.  I have to go into task manager and end the java task before I can program another part.  Anyone else had this problem?  Here are the programming times I'm seeing in different modes:
     
    ipecmd:  17 seconds
    ipecmd(batch):  7 seconds
    ipecmdboost:  10 seconds
     
    I could live with the 3 second difference if I could keep it from locking up.
     
     
    #4
    NorthGuy
    Super Member
    • Total Posts : 5372
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: IPECMD in Batch Mode 2019/04/10 11:51:36 (permalink)
    0
    dblok1
    ipecmd:  17 seconds
    ipecmd(batch):  7 seconds
    ipecmdboost:  10 seconds

     
    Would be about 2 seconds with our programmer (2.8 seconds measured for 26J50 which has 2 times more memory).
     
    #5
    dblok1
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2019/03/22 14:32:19
    • Location: 0
    • Status: offline
    Re: IPECMD in Batch Mode 2019/04/10 15:05:03 (permalink)
    0
    NorthGuy
    dblok1
    ipecmd:  17 seconds
    ipecmd(batch):  7 seconds
    ipecmdboost:  10 seconds

     
    Would be about 2 seconds with our programmer (2.8 seconds measured for 26J50 which has 2 times more memory).



    I started looking into your programmer yesterday.  I'll check to see if you support most of the PICs we use in production.  Looks like the command line utilities would be easy to use.
    #6
    dblok1
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2019/03/22 14:32:19
    • Location: 0
    • Status: offline
    Re: IPECMD in Batch Mode 2019/05/09 14:13:22 (permalink)
    0
    Sudheer Herle
    Two things.
    1. You can use ipecmdboost.exe from your installation directory. This will reduce the operation time by holding on to the connection from the first connect.
    2. You can use mplab SDK (it's not DLL by the way). It's easy and a little bit of java can set you to write your own software.

    Thanks,
    Sudheer



    Sudheer, have you been able to to get ipecmdboost.exe to work consistently?  I still can't seem to get it to recover from having a device fail programming.  I have to go into the task manager and end any java task that is running, otherwise it will just output "Programming Target Failed" everytime I try programming another device.  It works fine until I get that first programming failure which is bound to happen on the production floor.
     
    The IPECMD documentation does mention:
    If you have problems using any programming tools with MPLAB X IPE or MPLAB X IDE after using the IPECMDBoost utility, please go to the Windows Task Manager and end the java.exe process and try again.

     
    It also warns against running multiple instances, which I am not.  I only have the one instance.
    #7
    NorthGuy
    Super Member
    • Total Posts : 5372
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: IPECMD in Batch Mode 2019/05/09 14:54:19 (permalink)
    0
    dblok1
    I started looking into your programmer yesterday.  I'll check to see if you support most of the PICs we use in production.  Looks like the command line utilities would be easy to use.



    Have you encountered any difficulties, or unsupported parts? Please PM me if you have any questions.
    #8
    Jump to:
    © 2019 APG vNext Commercial Version 4.5