News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Is there a PICkit4 command line program?

Started by top204, Jun 12, 2024, 09:06 AM

Previous topic - Next topic

top204

I've seen reference to a PICkit4 command line program, as there is for teh PICkit2 and PICkit3, but cannot find it anywhere, or any reference to it.

Any ideas on where it is?

Note.
I do not not wish to use the plus versions, because I do not have them.

I only have the PICkit4 module for the new 18FxxQ4x devices and the official MPLAB IPE programming program is an absolute disgrace for the 21st century. It is so bulky, slow, and clumsy, and badly thought out and written, it is an absolute shambles to use, but that is now what we expect from microchip, unfortunately. :-(

kcsl

According to ChatGPT, yes there is, but it's part of MPLAB IPE.

Once you've installed the IPE (which I suspect is huge), you can do this:

ipecmd -P<device> -TPPK4 -F<hex file> -M -OL


Common ipecmd Options
-P<device>: Specifies the target device.
-TPPK4: Specifies the PICkit 4 programmer.
-F<file>: Specifies the hex file to be programmed.
-M: Programs the device.
-E: Erases the device.
-V: Verifies the device.
For a complete list of commands and options, you can refer to the MPLAB IPE user manual or use the --help flag with ipecmd to get more details on available commands.
There's no room for optimism in software or hardware engineering.

top204

#2
Ahhh yes.... Many thanks kcsl.

Now I've looked at the help toolbar option in the IPE program, it is making reference to a command line mechanism to it.

It's very strange with some of the obvious things we miss. :-)

I'll see if I can get a .bat file to work with it so I can call it from the IDE, as I used to do with PICkit2 and PICkit3, but wow!, the amount of command line options is absolutely ridiculous! I thought the earlier PICkit command lines were bad enough, but the PICkit4 is bordering on ridiculous. Why does it not have something like: device name, hex file, program as normal, as other programmers do?

normnet

FineLineIDE has three preprogrammed PICkit4 programmer tabs including the command lines.  FL is a simple cut copy or delete installation.

PICkit4 3.3 volt supply 
C:\Program Files\Microchip\MPLABX\v5.50\mplab_platform\mplab_ipe\ipecmd.exe
/P$target-device$ /F"$hex-filename$" /TPPK4 /M /OL /W3.3

top204

Many thanks Norm.

I'll take a look at the Fineline IDE I have on my machine.

Wimax

Quote from: top204 on Jun 12, 2024, 09:06 AMMPLAB IPE programming program is an absolute disgrace for the 21st century. It is so bulky, slow, and clumsy, and badly thought out and written, it is an absolute shambles to use, but that is now what we expect from microchip, unfortunately. :-(

Yes, but we can say that MPLAB IPE 6.20 has a considerably faster usb management than previous versions and surely more stable.

top204

#6
I don't understand why they did not use a standard HID interface, then no drivers would have been required and it would me extremely stable and still be just as fast, and HID is a universal interface mechanism. As other programmers have used for the USB interface.

However, I actually find it rather slow when using the command line interface (many thanks kcsl and norm), because it first interrogates the PICkit4 unit to see what is it and what it needs, even when the same device is used, and this takes a long time when creating code and having to program a lot. But at least it works and I can now program from the IDE instead of that absolutely diabolically dreadful GUI program of theirs... Yeuk!

Is there a way around the constant interrogation of the PICkit4 when it is first called, on the command line interface?

JonW

QuoteI don't understand why they did not use a standard HID interface
....  One word..... Microchip

John Lawton

My MeLabs U2 programmer failed to work with my dsPIC33EP device so I bought one of the Northern Software programmers and I'm impressed. I use their GUI but they also have a command line utility available.
https://www.northernsoftware.com/nsdsp/p2x.htm

John

JonW

The chip versions look really good, shame they don't implement a VCP port rather than using the HID and SDK.  How long did it take to arrive John?

tumbleweed

QuoteIs there a way around the constant interrogation of the PICkit4 when it is first called, on the command line interface?

There is a another version of ipecmd that supposedly works a little faster by keeping the connection open after the first time you call it . It's "ipecmdboost.exe"

For mplabx 6.00 and prior, it used to be located in the folder MPLABX\<version>\mplab_platform\mplab_ipe\ipecmdboost, but in later versions the .exe is gone and you have to use the java ipecmdboost.jar syntax.

Usage is described in "Readme for IPECMD.htm" found in the mplabx docs folder.
I've seen complaints that it's subject to hanging up if it has any errors.

I haven't tried it in years, so...


John Lawton

Quote from: JonW on Jun 14, 2024, 10:31 AMThe chip versions look really good, shame they don't implement a VCP port rather than using the HID and SDK.  How long did it take to arrive John?

Don't they offer a UART interface? They say "In addition, NSDSP can provide USB connectivity through UART interface" so I don't quite follow.

I think it took less than a week to arrive.

John

evoortman

Maybe use PicKitminus command line tool with PicKit 2 or 3?
There are quite a few PIC18FxxQ4x types supported.
Have a look at:  http://kair.us/projects/pickitminus/

Erik