Device and Tool Commands

To display information about the device and tool commands available in MDB, type help device, help hwtool or help deviceandtool. The table below provides additional information about these commands.

Table 1. Device and Tool Commands
Command Description
Device Sets the name of the target device.

Command format: Device devicename

Example:

Device PIC32MX795F512L
Hwtool Sets the debug tool or list all the available hardware tools on the system. The device must be set with the Device command before a tool can be used/set.

Command format:

Hwtool [toolType] [-p] [index]Following are the supported tool names (not case-sensitive):
  • ICD3 – MPLAB ICD 3 In-Circuit Debugger
  • ICD4 – MPLAB ICD 4 In-Circuit Debugger
  • RealICE – MPLAB REAL ICE In-Circuit Emulator
  • PICkit3 – PICkit 3 In-Circuit Debugger
  • PICkit4 – MPLAB PICkit 4 In-Circuit Debugger
  • SIM – Simulator
  • PM3 – MPLAB PM3 Programmer
  • LicensedDebugger – third party debugger
  • LicensedProgrammer – third party programmer
  • SK – Microchip Starter Kit (PICkit On Board – PKOB)
  • SNAP – MPLAB Snap In-Circuit Debugger
  • EDBG - Embedded Debugger
To set the tool for programming only, a space must precede the -p option.

Command format:

Hwtool [toolType] -p

Example:

Hwtool ICD3 -p

Use the index option to select the tool if there are more than one instance of a tool type. If you have two MPLAB ICD 3 units connected to the PC, use the Hwtool command to find the assigned index number of the tool.

Example:

>Hwtool

index Description

0 MPLAB ICD 3 tm (MRK1000000000)

1 MPLAB ICD 3 tm (MRK1000001111)

Example:

Hwtool ICD3 -p 1

Note: By default, when a hardware tool is selected, it is loaded as a debugger. This means that it always programs the device and adds the necessary debug requirements to enable the image to be debugged. To use a tool for programming only, use the -p option when setting the hardware tool.
Deviceandtool Displays both the Device and Hwtool command information.