Release Notes for MPLAB X PM3 Command Line Interface
MPLAB® X IDE vv2.20
September 2, 2014
Table of Contents
1 Command Line Utility Defined
3 Operating System Support List
9 Upgrading the MPLAB PM3 Operating System
MPLAB PM3 Command Line Interface (PM3CMD) is a 32/64-bit command-line interface to the MPLAB PM3 device programmer.
This interface is designed for programming devices in a production environment with limited resource PCs (Pentium or better). Possible uses for this interface include:
- Setting up a MPLAB PM3 for stand-alone programming
- Updating device programmer firmware
- SQTP programming
The PM3CMD executable may be found, by default, in:
C:\Program Files\Microchip\MPLABX\mplab_ipe\
This Readme is targeted to users of the command-line interface.
Device support is dependent on the firmware version installed in the MPLAB PM3 device programmer.
When selecting a part using the "P" option (section 9), use the following:
- PICmicro devices: drop "PIC", e.g., PIC16F877 becomes 16F877
- dsPIC devices: drop "dsPIC", e.g., dsPIC30F6014 becomes 30F6014
- rfPIC devices: drop "rfPIC" and appended letters, e.g., rfPIC12C509AG becomes 12C509
Microsoft Windows XP Professional SP3/ Windows 7 Professional/ Windows 8 Professional:
- Processor: 2.6 GHz Intel Pentium IV or equivalent
- Memory: 768 MB
- Disk space: 400 MB of free disk space
None.
None.
After installing a socket module, it is good practice to do a blank check on a known blank device to verify that the socket module is seated properly. To perform a blank check in stand-alone mode on the MPLAB PM3, select the desired device type, insert a blank device, and select All Functions>Blank Check Device. If the device reads back blank, the message "Device Blank" will be displayed.
To improve speed when programming your device, after the first time it has been programmed remove the /F option from the command. Removing the file specification /f allows the tool to use the image contained within the tool’s memory.
Refer to the Development Tools Selector (DTS) located on the Microchip web site (www.microchip.com). Select "Development Tools" under "Design", then select "Development Tool Selector" under "Resources.
The following PM3CMD files are automatically installed in the default locations when the MPLAB X IDE is installed.
If MPLAB PM3 does not recognize your socket module (i.e., socket not supported), you may need to update the firmware. You can obtain the latest MPLAB PM3 firmware from our website (www.microchip.com). Once you have the firmware, you will need to download this file to the MPLAB PM3.
The following commands are available in the command line interface.
PM3 COMMAND LINE HELP
Options |
Description |
Default |
A |
VDDAPP |
Device specific |
B<Operation><path> |
Environment Operation Operation L: = Load Environment, All paths = full file path. All paths located on the PM3Card must be preceded by a 'P'. All Paths on the computer must be preceded by a 'C'. Operation S: = Save Environment, All paths = full environment path. All paths located on the PM3Card must be preceded by a 'P' All Paths on the computer must be preceded by a 'C'. Operation D: = Delete Environment, All paths = full file path. All paths located on the PM3Card must be preceded by a 'P' All Paths on the computer must be preceded by a 'C'. Operation C: = Copy Environment, path = full file path to the environment file of the environment to be copied, followed by the path to the destination directory. The two paths must be separated by an asterisk (*), and each path must be preceded by either 'C' if the path is on the computer or 'P' if the path is on the PM3. Operation V: = View Environment, path = full file path to the environment file of the environment to be viewed. All paths located on the PM3Card must be preceded by a 'P'. All Paths on the computer must be preceded by a 'C'. |
None |
C |
Blank Check Device |
Do not Blank Check |
D<file> |
OSSuite File Selection |
None |
E |
Erase Flash Device |
Do Not Erase |
F<file> |
Hex File Selection |
None |
G<Type><range/path> |
Read functions Type F: = read into hex file, path = full file path, range is not used. Types P, E, I, C: = output read of Program, EEPROM, ID and/or Configuration Memory to the screen. P and E must be followed by an address range in the form of x-y where x is the start address and y is the end address both in hex, path is not used. |
None |
H |
Read Checksum |
Do Not Read Checksum |
I |
Display Device ID |
Do Not Display |
K |
Display Hex File Checksum |
Do Not Display |
L |
Low voltage programming (for devices that support PGM pin) |
Not Selected |
M<memory region> |
Program Device memory regions: P = Program memory E = EEPROM I = ID memory C = Configuration memory If no region is entered, the entire device will be programmed. |
Do Not Program |
N |
VDD Nominal |
Device Specific |
P<part> |
Part Selection. Example: 16f877 |
None |
Q |
Quiet Mode, no screen output |
Quiet mode off |
R<on> <off> |
Safe/Restricted Mode |
None |
S<file> |
SQTP File Selection |
None |
U |
Support removed |
|
V |
VPP |
Device Specific |
W |
Externally power target |
Power from PM3 |
X |
VDD Max |
Device Specific |
Y<memory region> |
Verify Device P = Program memory E = EEPROM I = ID memory C = Configuration memory If no region is entered, the entire device will be verified. |
Do Not Verify |
Z |
Preserve EEData on Program |
Do Not Preserve |
? |
Help Screen |
Not Show |
Each option must be immediately preceded by a switch, which can be either a dash <-> or a slash </> and options must be separated by a single space.
Example: PM3CMD /5 /P16F877 /Fc:\mycode /M
or
PM3CMD -5 -P16F877 -Fc:\mycode -M
Commands and their parameters are not case sensitive. Commands will be processed according to command order of precedence, not the order in which they appear on the command line.
The program will return an exit code upon completion which will indicate either successful completion, or describe the reason for failure.
Version 2.20
COMMAND LINE |
OPERATION PERFORMED |
PM3CMD /? |
Help screen displayed. |
PM3CMD /P16F877 /N4.5 /X5.5 /FPROGRAM.HEX |
MPLAB PM3 set to a PIC16F877. VDD Min set to 4.5v. VDD Max set to 5.5v. VPP set to the device's default value. File PROGRAM.HEX sent to the MPLAB PM3. |
PM3CMD /P16F877 /N4.5 /X5.5 /FPROGRAM.HEX /MP |
MPLAB PM3 set to a PIC16F877. VDD Min set to 4.5v. VDD Max set to 5.5v. VPP set to the device's default value. File PROGRAM.HEX sent to the MPLAB PM3. The device's program memory is programmed, with blank values in the locations not specified by PROGRAM.HEX. |
PM3CMD /P12C508A /FVOLTS.HEX /SSQTP.NUM /M |
MPLAB PM3 set to a PIC12C508A. Hex file VOLTS.HEX sent to the MPLAB PM3. Voltages are set to the device's default values, and one entry from the SQTP file SQTP.NUM is sent. All of the device's memory is programmed, with blank values in the locations not specified by VOLTS.HEX and SQTP.NUM. If programming is successful, the SQTP entry is marked as used. |
PM3CMD /P17C42A /FAPPCODE.HEX /M |
MPLAB PM3 is set to a PIC17C42A. The file APPCODE.HEX is sent to PRO MATE. Voltages are set to the device's default values. All of the device's memory is programmed, with blank values in the locations not specified by APPCODE.HEX. |
PM3CMD /P17C42A /M |
MPLAB PM3 is set to a PIC17C42A. The device is programmed with the current contents of the device programmer at the default voltage values. |
PM3CMD /P17C42A /SSERIAL.NUM /M |
MPLAB PM3 is set to PIC17C42A, and one entry from the SQTP file SERIAL.NUM is sent. A device is programmed with the current contents of the device programmer and the serial number at the default voltages values. If programming is successful, the entry is marked as used. |
PM3CMD /P16F84 /FHEXCODE.HEX /Y |
MPLAB PM3 is set to a PIC16F84. Voltages are set to the device's default values. The device is verified against the contents of HEXCODE.HEX. |
PM3CMD /P16F84 /FHEXCODE.HEX /M /Y |
MPLAB PM3 is set to a PIC16F84. The file HEXCODE.HEX is sent to MPLAB PM3. Voltages are set to the device's default values and the device is programmed. After programming, the device is verified against the contents of HEXCODE.HEX. Note: The Verify (/M) operation implicitly performs a Verify when it completes the programming portion of the operation. Specifying a Verify (/Y) in the above manner effectively causes two Verify operations to be performed. |
PM3CMD /P18F4220 /FAPPCODE.HEX /Z /M |
MPLAB PM3 is set to a P18F4220. The file APPCODE.HEX is sent to MPLAB PM3. Voltages are set to the device's default values. All of the device's memory is programmed, with blank values in the locations not specified by APPCODE.HEX. The /z switch specifies PRO MATE to preserve EEData. |
PM3CMD /P18F4220 /FAPPCODE.HEX/E /Z /M |
MPLAB PM3 is set to a P18F4220. The file APPCODE.HEX is sent to MPLAB PM3. Voltages are set to the device's default values. All of the device's memory is programmed, with blank values in the locations not specified by APPCODE.HEX. Note: The Erase Flash device (/E) Erases EEData,even though /Z switch specifies MPLAB PM3 to preserve EEData, because /E switch overrides /Z switch. |
PM3CMD /P30F6014 /FDSPIC.HEX /MP0-FF |
MPLAB PM3 is set to a dsPIC30F6014. The file DSPIC.HEX is sent to MPLAB PM3. Voltages are set to the device's default values. Device memory from location 0x00 to 0xFF is programmed. |
PM3CMD -blcc:\environment1\environment1.pm3 –P18F4580 |
Loads the environment data from the PC. This option must be followed by the source of the environment, in this case 'C' for the environment which resides on the computer. The complete file path of the environment file must then follow the source. |
PM3CMD -blpenvironment1\environment1.pm3 |
Loads the environment data from the PM3 Card. This option must be followed by the source of the environment, in this case 'P' for the environment which resides on the MPLAB PM3. The complete file path of the environment file must then follow the source. |
PM3CMD -bscc:\environment1 –p18F4580 –f”E:\PIC18F4580.hex” |
Saves the environment data to PC. This option must be followed by the destination of the saved environment, in this case 'C' for the computer. The complete path of the environment, including the environment name, must follow the destination. See the help (-b?) for additional information regarding setting up the environment. |
PM3CMD -bspenvironment1 –p18F4580 –f”E:\PIC18F4580.hex” |
Saves the environment data to PM3 Card. This option must be followed by the destination of the saved environment, in this case 'P' for the PM3 Card. The complete path of the environment, including the environment name, must follow the destination. |
PM3CMD -bccc:\Environment1\Environment1.pm3*pEnvironment1 –p18F4580 |
Copies the Environment1 data from the computer, to anEnvironment1 folder on the PM3 Card. |
Notes:
1. If downloading firmware, only the communications port and the /d option can be specified.
2. If not downloading firmware, a device must be specified.
3. If a hex file is specified, only the locations specified in the hex file are programmed. If an SQTP file is also specified, then the entire device is programmed.
4. If a hex file is not specified, the entire contents of the MPLAB PM3 device programmer are programmed into the device.
5. All values not specified in the hex file are set to blank (erased) values.
6. SQTP information is only sent to the device programmer if the device is programmed.
7. SQTP lines are marked as used only if programming is successful.