Release Notes for IPE Command Line Interface

MPLAB® X IDE v2.20

 

September 2, 2014

Table of Contents

1       Command Line Utility Defined

2       Operating System Support List

3       Programming Tools Supported

4       Device Support

5       PM3 Socket Support

6       Reference Documents

7       What's New in v2.20

8       Repairs and Enhancements in v2.20

9       Known Problems

10          Installation

11          Upgrading the Programming Tool Operating System

12          Command Line Options

13          Important Notes

14          Using Multiple Tools

15          List of PM3 Specific Error Codes

16          Frequently Asked Questions

17          Command Line Examples

18          Troubleshooting

19          NOTES

 

1      Command Line Utility Defined

MPLAB IPE Command Line Interface (IPECMD) is a 32/64-bit command-line interface to the MPLAB X all in one device programmer. This interface is designed for programming devices in a production environment.

The IPECMD provides:

·         a common tool for all Microchip programming tools (PICkit 3, MPLAB ICD 3, REAL ICE and PM3) support for respective features based on the programming tool selected


Possible uses for this interface include:

·         Setting up an MPLAB PM3 for stand-alone programming or a PICkit 3 for Programmer-To-Go.

·         Cross-platform programming.

·         Programming devices without using an IDE.

·         SQTP programming.

·         Environment Support

 

2      Operating System Support List

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

(Linux) Ubuntu 9.10:  

·         Processor: 2.6 GHz Intel Pentium IV or equivalent

·         Memory: 768 MB

·         Disk space: 400 MB of free disk space

Macintosh OS X 10.5 Intel:

·         Processor: Dual-Core Intel (32 or 64-bit)

·         Memory: 768 MB

·         Disk space: 400 MB of free disk space

 

3      Programming Tools Supported

The following programming tools work with the IPE:

 

·         MPLAB REAL ICE Emulator - recommended for production programming

 

4      Device Support

Device support is dependent on the firmware version installed in the device programmer. Click the link below to see device support for the programmers (RICEP, ICD3P, PK3P, PM3). Note that ICSP is only supported on UNI/O (11XXXX) devices.

Device Support List

5      PM3 Socket Support

Refer to the Development Tools Selector (DTS) located at: www.microchip.com/dts

6      Reference Documents

The following documents may be found on our website:

·         MPLAB PM3 User's Guide for MPLAB X IDE (Help Only)

·         MPLAB ICD 3 In-Circuit Debugger User's Guide for MPLAB X IDE (Help Only)

·         PICkit 3 Programmer/Debugger User's Guide for MPLAB X IDE (Help Only)

·         MPLAB REAL ICE In-Circuit Emulator User's Guide for MPLAB X IDE (Help Only)

·         Development Tools Design Advisory (DS51764)

·         Programming Specifications for devices (various DS numbers)

·         Development Tools Selector (http://www.microchip.com/dts)

 

On-line help for the tools may be found in MPLAB X IDE under Help>Help Contents.

7      What's New in v2.20

None.

8      Repairs and Enhancements in v2.20

IPECMD-129

When saving an environment to a PM3 SD Card with an SQTP file, the SQTP file doesn't take effect.

32MX220F032B

IPECMD-135

Batch Mode (-OB) causes a PM3 "Transfer Image" to occur for every repeated operation.

 

IPECMD-128

Saving environment to PM3 with SQTP filename that doesn't exists, locks up the IPECMD. It also creates an empty SQTP file with an incorrect name.

32MX220F032B

IPECMD-126

"Operation Succeeded" is displayed even for operations in which there was a failure.

 

IPECMD-140

When loading an environment from PC with an SQTP file, the SQTP file doesn't take effect.

 

IPECMD-137

Safe Mode / Restricted Mode option (-R) does not appear to have any effect on the PM3 box.

 

9      Known Problems

 

 

 

 

 

 

10   Installation

The following IPECMD files are automatically installed in the default locations when the MPLAB X IPE is installed:

·         IPECMD.jar - Command line utility classes (..\Microchip\MPLABX\mplab_ipe\)

·         IPELibs.jar - Core Library functionalities (..\Microchip\MPLABX\mplab_ipe\lib\)

11   Upgrading the Programming Tool Operating System

Upgrading the operating system of the programming tool happens automatically when the first operation using the tool is performed.

12   Command Line Options

Note: When selecting a part using the "P" option, use the following:

·         For PIC devices, drop "PIC", e.g., PIC16F877 becomes 16F877

·         For dsPIC devices, drop "dsPIC", e.g., dsPIC30F6014 becomes 30F6014

·         For rfPIC devices, drop "rfPIC" and appended letters, e.g., rfPIC12C509AG becomes 12C509

 

Note: PM3 Specific commands are highlighted.

Note: Commands are not case sensitive. Escape character can be a ‘-‘ or  ‘/’. 

The following commands are available in the command line interface.

Options

Description

Default

A

VDDAPP  (Applicable only for PM3)

Device specific

B<operation><path>

Environment Operation

Operation L: = Load environment,

All paths = full file path. All paths located on 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 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 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 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 file to be viewed. All paths located on the PM3Card must be preceded by ‘P’. All paths on the computer must be preceded by ‘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, B, A = output read of Program, EEPROM, ID,  Configuration, Boot and Auxiliary 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

I

Display Device ID (Applicable only for PM3)

Do Not Display

J

High Voltage MCLR(Not selected)

Selected

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

A = Auxiliary memory

B = Boot memory

If no region is entered, the entire device will be programmed.

Do Not Program

N

VDD Nominal (Applicable only for PM3)

Device Specific

OB

Batch Mode Operation

None

OD

VDD First(Applicable for PICKIT3 and ICD3)

VPP First

OE

Description File for Saving Environment

None

OL

Release From Reset (Not Applicable for PM3)

Hold in reset

OM

Miscellaneous File For Saving Environment.

None

OP<range>

Preserve Program Memory

Example OP0-1FF

Do Not Preserve

OG<imagename>

PICKIT3 Programmer-to-go(Applicable only for PICKIT3)

None

OH

Erase All Before Program(Not Selected)

Selected

OC<memory region>

Select Memory Regions(Applicable with Programmer-to-go)

P = Program memory

E = EEPROM

I = ID memory

C = Configuration memory

All Regions Selected

ON####,####

Program Memory Range

#### is a hexadecimal number representing Start and End Address in sequence

 

None

OI

Display Device ID Revision(Applicable only for PM3)

Do Not Display

P<part>

Part Selection. Example: 16F877

None

Q

Quiet Mode, no screen output (Applicable only for PM3)

Quiet mode off

R<on><off>

Safe/Restricted mode (Applicable only for PM3)

None

S<file>

SQTP File Selection

None

T

P = Tool Selection Eg –TPRICE for RealICE –TPPK3 for PICKIT3

S = Specific Tool Selection using Serial No, Eg TSBUR1234566

Short Name for Tools:

RealICE   –  RICE

ICD3        –  ICD3

PICKIT3   –  PK3

PM3         –  PM3

None

V

VPP (Applicable only for PM3)

Device Specific

W

Power target from tool

Externally Power Target

X

VDD Max (Applicable only for PM3)

Device Specific

Y<memory region>

Verify Device

P = Program memory

E = EEPROM

I = ID memory

C = Configuration memory

B = Boot memory

A = Auxiliary 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 Shown

13   Important Notes

Java Requirements

The IPECMD.jar is written in Java. You need JRE (Java Runtime Environment) to run your script.  In order to avoid conflict please use JRE that distributed with MPLAB X IPE installation. You can set the environment path using the MPLAB X IPE Installation directory “..\sys\java\jrex.xx\java-windows\bin” for windows and “..\sys\java\jrex.xx\bin” for linux/Mac.

Specifying Options

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:
java -jar ipecmd.jar /P16F877 /Fc:\mycode.hex /M
or
java -jar ipecmd.jar  -P16F877 -Fc:\mycode.hex -M

·         Commands and their parameters are not case sensitive (Note: For Linux/Mac file path must be 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.

Programming Speed Improvement

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.

 

14   Using Multiple Tools

The IPECMD supports the PM3, PICkit3, REAL ICE and ICD 3. Each tool can be identified with the short name of the tool or using serial number if more than one tool is connected.

Tool Name

Short Name

MPLAB PM3

PM3

PICKIT 3

PK3

MPLAB REAL ICE

RICE

MPLAB ICD 3

ICD3

Using the Short Name

To select the tool using the short name, use -TP to select programming tool. For example:

-TPPM3 to select the MPLAB PM3

-TPPK3 to select the PICKIT 3

-TPRICE to select the MPLAB REAL ICE

-TPICD3 to select the MPLAB ICD 3

Using the Serial Number

To select the tool using the serial number, use -TS to select programming tool. For example:

-TSBUR1234567 to select the tool with the serial number BUR1234567

Note: -TS switch is not applicable for PM3

Listing All Tools Connected

To show the list all tools currently connected to the system, use –T.

Following is an example of the tool list:

1) REALICE       S.No : 000000000003

2) ICD 3            S.No : JIT102832586

3) PICkit3          S.No : BUR120299953

Using Specific Tool

When more than one tool of same type connected,

Example:  >ipecmd.jar –P18F4550 –TPREALICE –GP

1) REALICE       S.No : 000000000003

2) REALICE       S.No : JIT102832586

3) REALICE       S.No : BUR120299953

More than one PK3 is connected...

Please enter your choice: 3

Serial No BUR120299953 will be used.


15   List of PM3 Specific Error Codes

Code

Error Message

Description

0

OPSUCCESS

This value is returned if all of the selected operations complete successfully.

1

SERIAL_RECEIVE_ERROR

This value is returned when an expected byte is not received before the timeout interval.

2

SERIAL_SEND_ERROR

This value is returned if the PC is unable to send a byte.

3

4

SOCKET_ERROR2

This value is returned if the installed socket is not compatible with the selected device.

5

6

COMMAND_ERROR

This value is returned if a command from the PC is not echoed properly by the programmer.

7

OPFAILURE

This value is returned if the current operation fails, and no other more specific error code exists.

8

TRANSFER_CHECKSUM_ERROR

Used when long transfers from the PC to the programmer are appended with a checksum, this value is returned when the PC's checksum does not match the programmer's checksum.

9

INVALID_PROGRAMMER

This value is returned if something other than a PM3 is detected in response to the PCCONNECT command.

10

NO_PROGRAMMER

This value is returned if no response is received for a PCCONNECT command.

11

 

12

13

RECEIVE_CHECKSUM_ERROR

Used when long transfers from the programmer to the PC are appended with a checksum, this value is returned when the PC's checksum does not match the programmer's checksum.

14

COM_OPEN_ERROR

This value is returned when the selected com port cannot be initialized.

15

FILE_OPEN_ERROR

This value is returned if a file cannot be opened.

16

ERASE_FAILURE

This value is returned when the erase flash command fails.

17

18

TRANSFER_SQTP_ERROR

This value is returned if success is not returned in response the sending an SQTP word.

19

DEVICE_CODE_PROTECTED

This value is returned when an attempt is made to only partially program a code protected or data protected device.

20

21

VDDNOMICSP_ERROR

This value is returned when trying to use low voltage programming while not in ICSP mode

22

SAFEMODEOFF_ERROR

This value is returned when success is not returned in response to a SAFEMODEOFF command.

23

SENDVOLTAGES_ERROR

This Value is returned if the PC2VOLTAGE command is not correctly received by the programmer.

24

DATABASE_CORRUPT_ERROR

This value is returned if the database on the programmer is corrupt.

25

OS_ERROR

This value is returned if the programmer indicates that an OS error has take place.

26

BIOS_ERROR

This value is returned if the programmer indicates that a bios error has taken place.

27

MISSINGDOWNLOADFILES_ERROR

This value is returned if an indicated upgrade file cannot be found.

28

UPGRADE_ERROR

This value is returned if the upgrade process is not successful.

29

30

PARITY_ERROR

This value is returned when the programmer indicates a parity error.

31

32

NOIMAGE_ERROR

This value is returned if the programmer indicates it does not have a valid image present.

33

EXTERNAL_POWER_ERROR

This value is returned if the programmer does not support external power for the target device.

34

PGMVFY_ERROR

This value is returned if either a program or verify operation was not successful.

35

36

INVALID_CMDLINE_ARG

This value is returned when any command line argument or parameter is incorrect.

37

INVALID_HEXFILE

This value is returned if the hex file transferred to the programmer is not valid for the device selected.

38

39

40

LOAD_ENVIRONMENT_ERROR

This value is returned if loading an environment failed for any reason.


16   Frequently Asked Questions

How to program a device using the PICkit 3?

>java -jar ipecmd.jar -TPPK3 -P18F4550 -M –F”c:/demo.hex”

(or)

>java -jar ipecmd.jar -TPPK3 -P18F4550 -M –F”/home/project/demo.hex”

What happens if more than one PICkit 3 is connected?

The IPECMD will prompt for tool selection, for example:

Available Tool List

1 ICD 3   S.No : JIT102832586

2 PICkit3 S.No : BUR112281031

3 PICkit3 S.No : BUR120299953

More than one PK3 is connected...

Please enter your choice: _

How to program the target with different tools?

To program using PM3

>java -jar ipecmd.jar -P24FJ256GB106 –TPPM3 -M –F”e:/pic24.hex”

To program using PICkit 3:

>java -jar ipecmd.jar -P24FJ256GB106 -TPPK3 -M –F”e:/pic24.hex”

To program using REAL ICE:

>java -jar ipecmd.jar -P24FJ256GB106 -TPRICE -M –F”e:/pic24.hex”

To program using ICD 3:

>java -jar ipecmd.jar -P24FJ256GB106 -TPICD3 -M –F”e:/pic24.hex”

How to read the target with PICkit 3?

Read using PK3 and export the file:

>java -jar ipecmd.jar -P24FJ256GB106 -TPPK3 –GF”e:/pic24.hex”

How to erase the target?

Erase using PK3:

>java -jar ipecmd.jar -P24FJ256GB106 -TPPK3 -E

How to verify the target?

Verify using PK3:

>java -jar ipecmd.jar -P24FJ256GB106 -TPPK3 -Y

Is Environment supported for all tools?

Yes, IPECMD.jar has environment support for all the tools

How to use the tool switch option?

To query all the tools currently connected to the system:  -T

To select specific programmer using short name:           -TPShortName

To select specific programmer using Serial Number:       -TSSerialNumber

Examples:

-TPPM3 to select the PM3

-TPPK3 to select the PICKIT 3

-TPRICE to select the REAL ICE

-TPICD3 to select the ICD3

-TSBUR10234534 to select the serial number of the programmer

How to enable quiet mode? (Applicable only for PM3)

>java -jar ipecmd.jar -TPPM3 -Q

No output will be displayed in the command prompt

How to select the part name?

>java -jar ipecmd.jar -P 24FJ128GB106

Use the device’s short name.

How to get the checksum?

>java -jar ipecmd.jar -TPPK3 –p24FJ256GB106 –K –Fe:/pic24.hex

 

Shows the checksum value based on the imported hex file.

Refer to MPLAB X IDE readme for more information on checksums

How to set JRE location in Windows and Linux?

For Windows JRE is available in MPLAB X IPE Installation directory “..\sys\java\jrex.xx\java-windows\bin”

·         Add this JRE location in PATH environment variable

 

For Linux JRE is available in MPLAB X IPE Installation directory  “..\sys\java\jrex.xx\bin”

·         Add this JRE location in PATH environment variable in .profile file

e.g. PATH=”$PATH:/home/microchip/mplabx/sys/java/jrex.x.x/bin”

MPLAB X Installer doesn’t work in Linux 64 bit machine?

ia32-libs need to be installed before installing MPLAB X in Linux 64 bit machine, To Install ia32-libs

go to terminal and give the below command.

 

$ sudo apt-get install ia32-libs


What is Batch Mode?

Batch Mode Operation will initialize the tool once and perform the same operations repeatedly. On each repeat operation user intervention is required.  Batch Mode will exit on following condition, Failure of operation or user request to stop.     

 

Warning: Batch Mode is suggested to use only with direct invocation of tool because it will enter into a wait state for user input.

 

Example:

> java –jar ipecmd.jar  -TPPM3  -P18F4580  -FHEXCODE.HEX  -M  -OB

PM3 Program Report

24-Jan-2014, 15:49:35

Device Type : PIC18F4580

Program Succeeded

Batch Mode Count : 1

Batch Mode : Press Enter to repeat the same operation !!!

Press the enter key to program repeatedly and press Ctrl+C to abort the operation.

How to repeatedly program the target once environment is loaded

Batch mode can be used in order to program the environment settings repeatedly

>java –jar ipecmd.jar –tppm3 –blc”E:/myenv” –M –OB

Output:

Loading Environment. . .

Environment loaded.

Description: None

PM3 Program Report

21-May-2014, 11:18:35

Device Type : PIC18F4580

Program Succeeded.

Batch Mode Count: 1

Batch Mode: Press Enter to repeat the same operation!!!

Press the enter key to program repeatedly and press Ctrl+C to abort the operation.

Is COM Port support available for PM3 in IPECMD?

No, the current version support only USB

How to generate an SQTP File?

To generate SQTP file use MPLAB IPE, Select 'Advanced' and open ‘SQTP’ Tab.

What is Environment?

Environments allow you to save specific tool settings so that all of the same settings can be reloaded again in a different programming session. Environments are supported under all tools as either .pen files or .pm3 files.  Environment can be created using –B switch.

 


17    Command Line Examples

17.1      Displaying Help

>java –jar ipecmd.jar /?  or >java –jar ipecmd.jar -?

17.2      Program with SQTP Num File

> java –jar ipecmd.jar /P12F508 /fvolts.hex /ssqtp.num /M /TPPM3

MPLAB PM3 selected and set to PIC12F508. 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.

17.3      Program the target with Hex File

> java –jar ipecmd.jar /P16F1938 /FAPPCODE.HEX /M /TPPK3

MPLAB PICKIT3 selected and set to a PIC16F1938. The file APPCODE.HEX is sent to PICKIT 3. 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.

17.4      Program the target without Hex File

> java –jar ipecmd.jar /P16F1938 /M /TPPM3

 

MPLAB PM3 is set to a PIC16F1938. The device is programmed with the current contents of the device programmer at the device’s default voltage values.

 

 

17.5      Verify Hex File against target

> java –jar ipecmd.jar /P16F887 /FHEXCODE.HEX /Y /TPPM3

 

MPLAB PM3 is set to a PIC16F887. Voltages are set to the device's default values. The device is verified against the contents of HEXCODE.HEX.

 

17.6      Verify Hex File against target after programming

> java –jar ipecmd.jar / P16F887 /FHEXCODE.HEX /M /Y /TPPM3

 

MPLAB PM3 is set to a PIC16F887. 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 with (/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.

 

17.7      How to preserve EEData

> java –jar ipecmd.jar /P18F4220 /FAPPCODE.HEX /Z /M /TPPM3

 

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.

 

17.8      How to preserve EEData after programming with blank values

> java –jar ipecmd.jar /P18F4220 /FAPPCODE.HEX /E /Z /M -TPPM3

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.

 

17.9      How to Load Environment from Computer

> java –jar ipecmd.jar -BLC”e:\environment1\environment1.pm3” -TPPM3

Load 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.

 

17.10     How to Load Environment from PM3

>java –jar ipecmd.jar -BLP”environment1\environment1.pm3” -TPPM3

Load 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.

 

17.11     How to Save Environment to Computer

> java –jar ipecmd.jar -BSC”e:\environment1” -P18F4580 -TPPM3 -F”e:/test/P18F4580.hex”

 

Save 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.

 

17.12     How to Save Environment to Computer with more details

> java –jar ipecmd.jar -BSC “e:\environment1” -P18F4580 -TPPM3 -F“e:/test/P18F4580.hex” -OE ”Env Description Demo” -OM“e:\Miscdemo.txt”

 

Save 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.  The given switch information will be saved in the environment file.

 

17.13     How to Save Environment to PM3

> java –jar ipecmd.jar -BSPenvironment1 -TPPM3 -P18F4580 -f”e:/test/P18F4580.hex”

 

Save 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.

 

17.14     How to Copy Environment from the computer to PM3

> java –jar ipecmd.jar -BCCe:\environment1\environment1.pm3*Penvironment1 -TPPM3

 

Copies the Environment1 data from the computer, to an Environment1 folder on the PM3 Card.

 

17.15     How to Copy Environment from the PM3 to Computer

> java –jar ipecmd.jar -BCPenvironment1*C”e:\environment1” -TPPM3

 

Copies the Environment1 data from the PM3, to the given folder in the computer. Provided environment1 folder should exists in the computer.

 

17.16      How to Copy Environment from the computer to computer

>java –jar ipecmd.jar -BCC”e:\environment1\environment1.pm3”*C”E:/environment2” -TPPM3

 

 

Copies the Environment1 data from the computer to the given folder in the computer,provided environment2 folder should exists in the computer.

17.17     How to View Environment from the computer

> java –jar ipecmd.jar -BVC”e:\environment1\environment1.pm3” -TPPM3

 

Shows the Environment1 data from the computer.

 

17.18     How to View Environment from the PM3

> java –jar ipecmd.jar -BVPenvironment1.pm3 -TPPM3

 

Shows the Environment1 data from the PM3.

 

17.19     How to Delete Environment from the computer

>java –jar ipecmd.jar -BDC”E:\environment1\environment1.pm3” -TPPM3

 

Deletes the Environment1 data from the computer.

 

17.20     How to Delete Environment from the PM3

>java –jar ipecmd.jar -BDP”environment1/environment1.pm3” -TPPM3

Deletes the Environment1 data from the PM3.

 

17.21     How to perform Blank Check

>java –jar ipecmd.jar -p18F4580 -TPPM3 -C

Checks if the device is blank.

 

17.22     How to manually upgrade Firmware

>java –jar ipecmd.jar -p18F4580 -D”E:\ide_2.10.rc1/mplab_ipe/lib/ext/PM3.jar/pm3022066.mjc”

Downloads the Firmware into the Hardware tool.

 

17.23     How to Erase the target

>java –jar ipecmd.jar -p18F4580 -TPPM3 -E

Target gets erased.

 

17.24     How to read entire target and export into hex file

>java –jar ipecmd.jar -p18F4580 -TPPM3 -GF”e:/pic18.hex”

Reads the entire target and exports into hex file.

 

17.25     How to Display device ID

>java –jar ipecmd.jar -p18F4580 -TPPM3 -I

Displays device ID for the device selected.

 

17.26     How to get the Checksum from the imported hex file

>java –jar ipecmd.jar -p18F4580 -TPPM3 -f”e:\test\P18F4580.hex” -K

Shows the checksum value based on imported hex file.

 

17.27     How to provide miscellaneous file and Description file while saving Environment

> java –jar ipecmd.jar -BSC “e:\environment1” -P18F4580 -TPPM3 -F“e:/test/P18F4580.hex” -OE”Env Description Demo” -OM“e:\Miscdemo.txt”

 

17.28     How to apply VDDFirst Voltage to program the target (Applicable only for PICKIT3 and ICD3)

>java –jar ipecmd.jar -p18F4580 –TPICD3 -f”e:\test\P18F4580.hex” -M -OD

Applies VDD voltage before programming the target. By default VPP voltage will be applied.

 

17.29     How to reset the target (Not Applicable for PM3)

>java –jar ipecmd.jar -p24FJ128GA010 -f”e:\blink.hex” -M -TPRICE -OL

Removes the reset and allows the code to run. By default Hold in reset is set (Prevents the code from running after programming).

 

17.30     How to Preserve Program Memory

>java –jar ipecmd.jar -p18F4580 -TPPM3 -f”e:\test\P18F4580.hex” -M -OP0-1FF

Preserves program memory from 0 to 1FF on programming.

 

17.31     How to enable Safe Mode (Applicable only for PM3)

>java –jar ipecmd.jar -p18F4580 -TPPM3 -RON

PM3 enters to safe mode. No output will be displayed on the command prompt.

 

17.32     How to disable Safe Mode (Applicable only for PM3)

>java –jar ipecmd.jar -p18F4580 -TPPM3 -ROFF

PM3 comes out of safe mode. No output will be displayed on the command prompt.

 

17.33     How to disable High Voltage MCLR

>java –jar ipecmd.jar -p16F1454 -TPPM3 -f”e:\test\P16F1454.hex” -M -J

High Voltage MCLR will be disabled for programming. By default High Voltage MCLR is enabled.

 

17.34     How to enable Low Voltage programming

>java –jar ipecmd.jar -p16F1934 -TPICD3 -f”e:\test\P16F1934.hex” -M -L

Enables Low Voltage programming for the selected device. Device selected must be capable of low voltage and programming must be performed in ICSP mode.

 

17.35     How to program target in batch mode

> java –jar ipecmd.jar  -TPPM3  -P18F4580  -FHEXCODE.HEX  -M  -OB

PM3 Program Report

24-Jan-2014, 15:49:35

Device Type : PIC18F4580

Program Succeeded

Batch Mode Count : 1

Batch Mode : Press Enter to repeat the same operation !!!

Press the enter key to program repeatedly and press Ctrl+C to abort the operation.

 

17.36     How to power target from tool

>java –jar ipecmd.jar  -TPPK3 -P18F4580 -FHEXCODE.HEX -M -W

Powers the target at default VDD voltage.

>java –jar ipecmd.jar  -TPPK3 -P18F4580 -FHEXCODE.HEX -M -W2.5

Powers the target to 2.5 volts.

>java –jar ipecmd.jar –TPPM3 –P18F4580 –FHEXCODE.HEX –M –W

Powers the target at default VDD voltage.

Note:

# PM3 provides power when sockets are used

17.37     How to get Checksum by reading a device

>java -jar ipecmd.jar -TPPM3 -p18F4580 -G -K

Reads the device and calculates the checksum from the read device content.

 

17.38     How to set VDDAPP, VDD Nominal and VDD Max

>java –jar ipecmd.jar -TPPM3 –p18F4580 –A3.8 –N4.5 –X5.5 –FHEXCODE.HEX

VDDAPP is set to 3.8v.VDD Nominal is set to 4.5V.VDD Max is set to 5.5v. VPP is set to device’s default value.

 

17.39 How to use PICKIT3 in (PTG) Programmer-To-Go mode

Example-1: Consider Target is externally powered and load the image into PK3 as image1.

>java –jar ipecmd.jar –TPPK3 –p18F4580 –OG”image1” –f”E:/p18F4580.hex”

The following settings are applied while executing the above command

Target has its own power

PICKIT 3 will auto calculate ranges to be programmed

Program memory will be erased prior to programming           

 

 

 

 

 

Example-2: Consider Target is externally powered and load the image into PK3 as image1 and program memory should not be erased before programming

>java –jar ipecmd.jar –TPPK3 –p18F4580 –OG”image1” –f”E:/p18F4580.hex” –OH

The following settings are applied while executing the above command

Target has its own power

PICKIT 3 will auto calculate ranges to be programmed

Program memory will NOT be erased prior to programming           

 

Example-3: Consider Target is externally powered and load the image into PK3 as image1 and select only program memory region

>java –jar ipecmd.jar –TPPK3 –p18F4580 –OG”image1” –f”E:/p18F4580.hex” –OCP

The following settings are applied while executing the above command

Target has its own power

Selected memory areas will be programmed (Program memory is selected in the above command)

Program memory will be erased prior to programming           

 

Example-4: Consider Target is powered by Pickit-3 and load the image into PK3 as image1

>java –jar ipecmd.jar –TPPK3 –p18F4580 –OG”image1” –f”E:/p18F4580.hex” –W

The following settings are applied while executing the above command

PICKIT3 powers the target

PICKIT 3 will auto calculate ranges to be programmed

Program memory will be erased prior to programming

 

Note:

During the programming operation the PICkit 3 “Busy” LED will remain lit continuously. The “Target”LED will light if powering from PICkit 3, but will remain off if the target has its own power supply.       

 

 

 

 

 

 

 

 

 

17.39 How to repeatedly program the target once environment is loaded

Batch mode can be used in order to program the environment settings repeatedly

>java –jar ipecmd.jar –TPPM3 –blc”E:/myenv” –M –OB

Output:

Loading Environment. . .

Environment loaded.

Description: None

PM3 Program Report

21-May-2014, 11:18:35

Device Type : PIC18F4580

Program Succeeded.

Batch Mode Count: 1

Batch Mode: Press Enter to repeat the same operation!!!

Press the enter key to program repeatedly and press Ctrl+C to abort the operation.

 

17.40 How to Program selected Program Memory Range

>java –jar ipecmd.jar –TPPM3 –F”E:/PIC18F4580.hex” –ON0, 1FF

Programs only specified range of Program Memory

Note:

Program Memory Range (ON) is applicable only for Program Memory    

 

 

17.41     How to Display device ID Revision

>java –jar ipecmd.jar -p18F4580 -TPPM3 -OI

Displays device ID Revision for the device selected.

 

 

18   Troubleshooting

Failed to communicate to ICD3/PK3/REALICE

·         Make sure only one session is communication with REALICE/ICD3/PICKIT3, if REALICE/ICD3/PICKIT3 is already loaded in MPLAB/IPE this will fail to communicate.

·         Ensure the driver is switched to MPLAB X. Drivers do not have to be switched for PICKIT 3.

·         Make sure compatible Firmware type is loaded on REALICE/ICD3/PICKIT3 for the selected Device.

To do that open MPLAB select the specific Device and select REALICE/ICD3/PICKIT3, MPLAB will detect the FW if need it will update the REALICE/ICD3/PICKIT3. (By Default REALICE/ICD3/PICKIT3 will automatically update Firmware).

 

Programming Failed

·         Make sure the Selected Hex file is compatible with the current device.

·         Check the selected Memory Region it available in the Device.

·         Check the selected device requires Erase before programming.

 

19   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 selected device programmer are programmed into the device.
  5. Any values not specified in the hex file are set to blank (erased) values.
  6. SQTP lines are marked as used in SQTP file only if programming is successful.
  7. ICD3/REALICE/PICKIT3 will automatically download the latest firmware if required, this will cause delay to the operation.
  8. Admin privileges are required to perform environment operations and to export files to systems drive on Windows 7 and Windows 8.