MPLAB® PICkit™ 4 In-Circuit Debugger User’s Guide 2018 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature.
MPLAB® PICkit™ 4 USER’S GUIDE Table of Contents Preface ........................................................................................................................... 5 Chapter 1. About the In-Circuit Debugger 1.1 Introduction ................................................................................................... 11 1.2 MPLAB PICkit 4 In-Circuit Debugger Description ........................................ 11 1.3 MPLAB PICkit 4 In-Circuit Debugger Advantages ........................
MPLAB® PICkit™ 4 User’s Guide Chapter 6. Error Messages 6.1 Introduction ................................................................................................... 39 6.2 Types of Error Messages ............................................................................. 39 6.3 General Corrective Actions .......................................................................... 48 Appendix A. Debugger Function Summary A.1 Introduction ..............................................................
MPLAB® PICkit™ 4 USER’S GUIDE Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number.
MPLAB® PICkit™ 4 User’s Guide Part 3 – Reference • Appendix A. Debugger Function Summary – A summary of debugger functions available in MPLAB® X IDE when the MPLAB® ICD 4 debugger is chosen as the debug or program tool. • Appendix B. Hardware Specification – The hardware and electrical specifications of the debugger system. • Appendix C.
Preface RECOMMENDED SUPPLEMENTAL REFERENCE This user's guide describes how to use MPLAB® PICkit™ 4 in-circuit debugger. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. Multi-Tool Design Advisory (DS51764) Please read this first! This document contains important information about operational issues that should be considered when using the MPLAB PICkit 4 with your target design.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 8 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Part 1 – Getting Started Chapter 1. About the In-Circuit Debugger ................................................................. 11 Chapter 2. Operation.................................................................................................... 15 Chapter 3. Debugger Usage ........................................................................................ 25 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 10 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Chapter 1. About the In-Circuit Debugger 1.1 INTRODUCTION An overview of the MPLAB® PICkit™ 4 in-circuit debugger system is provided here. • • • • 1.
MPLAB® PICkit™ 4 User’s Guide The MPLAB PICkit 4 debugger was developed for debugging embedded processors with rich debug facilities which differ from conventional system processors in the following aspects: • • • • • • 1.
About the In-Circuit Debugger 1.4 MPLAB PICKIT 4 IN-CIRCUIT DEBUGGER COMPONENTS The components of the MPLAB PICkit 4 In-Circuit Debugger system are: • A rectangular-shaped MPLAB PICkit 4 unit housed in a durable, black plastic case with a brushed metal top which is accented with an indicator light strip, button area. • A Micro-B USB connector. • Micro SD card slot. • Emergency recovery button. • Lanyard connector.
MPLAB® PICkit™ 4 User’s Guide 1.5 MPLAB PICKIT 4 BLOCK DIAGRAM USB HS (SIE) (SPI) LOGIC BUFFER SAME70 MICRO VDD MONITOR SCALERS VPP MONITOR VPP ON VPP AN0 VPP GEN ICSP SIP OVERCURRENT (SPI) VOLTAGE REFERENCE VREF VDD GEN SYSTEM (I2C) IDENTIFIERS PGM uSD CARD VDD ON VDD AN1 (HSMCI) OVERCURRENT +5.5v +5.5v VUSB PWR DIST DS50002751C-page 14 +5v +3.3V SWITCHER BOOST TVDD RGB LED 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Chapter 2. Operation 2.1 INTRODUCTION A simplified theory of operation of the MPLAB® PICkit™ 4 in-circuit debugger system works is provided here. It is intended to provide enough information so a target board can be designed that is compatible with the debugger for both debugging and programming operations. The basic theory of in-circuit debugging and programming is described so that problems, if encountered, are quickly resolved. • • • • • • 2.
MPLAB® PICkit™ 4 User’s Guide 2.2.1 Standard ICSP™ Device Communication The debugger system can be configured to use standard ICSP communication for both programming and debugging functions. Make sure to align the Pin 1 on the debugger to Pin 1 on the target. The programming connector can be inserted into either: • A matching connector at the target, where the target device is on the target board (Figure 2-1).
Operation 2.3 TARGET COMMUNICATION CONNECTIONS Note: Refer to the data sheet for the device you are using as well as the application notes for the specific interface for additional information and diagrams. 2.3.1 Standard Communication Target Connections 2.3.1.1 USING SINGLE IN-LINE CONNECTOR Use the single in-line connector between the MPLAB PICkit 4 In-Circuit Debugger and the target board connector (see Figure 2-1 and Section B.3 “Communication Hardware”). 2.3.1.
MPLAB® PICkit™ 4 User’s Guide 2.3.3 Target Powered In the following descriptions, only three lines are active to core debugger operation: pins 1 (VPP/MCLR), 5 (PGC) and 4 (PGD). Pins 2 (VDD) and 3 (VSS) are shown on Figure 2-4 for completeness. MPLAB PICkit 4 has two configurations for powering the target device: internal debugger and external target power. The recommended source of power is external and derived from the target application (see Figure 2-5).
Operation 2.3.5 Circuits That Will Prevent the Debugger From Functioning Figure 2-7 shows the active debugger lines with some components that will prevent the MPLAB PICkit 4 debugger system from functioning.
MPLAB® PICkit™ 4 User’s Guide A simplified diagram of some of the internal interface circuitry of the MPLAB PICkit 4 In-Circuit Debugger is shown. FIGURE 2-8: PROPER CONNECTIONS FOR PROGRAMMING +5V VDD Programming Voltage 1 Internal Circuits 5 4 VPP/MCLR PGC PGD VSS For programming, no clock is needed on the target device, but power must be supplied. When programming, the debugger puts programming levels on VPP/MCLR, sends clock pulses on PGC and serial data via PGD.
Operation 2.5.1 Sequence of Operations Leading to Debugging Given that the Requirements for Debugging are met, set the MPLAB PICkit 4 In-Circuit Debugger as the current tool in MPLAB X IDE. Go to File>Project Properties to open the dialog, then under “Hardware Tool,” click PICkit 4. The following actions can now be performed. • When Debug>Debug Main Project is selected, the application code is programmed into the device’s memory via the ICSP protocol as described at the beginning of this section.
MPLAB® PICkit™ 4 User’s Guide After the instruction at the breakpoint address is executed, the in-circuit debug mechanism of the target device “fires” and transfers the device’s Program Counter to the debug executive (much like an interrupt) and the user’s application is effectively halted. The debugger communicates with the debug executive via PGC and PGD, gets the breakpoint status information and sends it back to MPLAB X IDE.
Operation 2.7 RESOURCES USED BY THE DEBUGGER For a complete list of resources used by the debugger for your device, see the online Help file in MPLAB X IDE for the MPLAB PICkit 4 In-Circuit Debugger. From the MPLAB X IDE “Learn & Discover” page, click on Users Guide & Release Notes, then click on link for the “Reserved Resources for MPLAB PICkit 4.” 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 24 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Chapter 3. Debugger Usage 3.1 INTRODUCTION How to install and setup the MPLAB PICkit 4 In-Circuit Debugger system is discussed in this section. For instructions on using MPLAB X IDE with the debugger, refer to the online Help accessible from the MPLAB X IDE main menu bar Help>Tool Help Contents>MPLAB X IDE Help. • • • • • • • • • • • 3.
MPLAB® PICkit™ 4 User’s Guide Items of note are: 1. Each debugger contains a unique identifier which, when first installed, will be recognized by the operating system, regardless of which computer USB port is used. 2. MPLAB X IDE operation connects to the hardware tool at runtime (Run or Debug Run). To always be connected to the hardware tool, see Tools>Options, Embedded button, Generic Settings tab, “Maintain active connection to hardware tool” check box. 3.
Debugger Usage 3.5 DEBUGGER LIMITATIONS For a complete list of debugger limitations for your device, see the online Help file in MPLAB X IDE (Help> Tool Contents>Hardware Tool Reference>Limitations). 3.6 COMMON DEBUG FEATURES Refer to the Help file “Getting Started with MPLAB X IDE,” Running and Debugging Code section, for details on debug features. This section includes: 1. Debug Running the project (build, program and run) from Debug>Debug Main Project. 2. Using breakpoints 3. Stepping through code 4.
MPLAB® PICkit™ 4 User’s Guide For ICE devices, an ICE header board is required. The header board contains the hardware necessary to emulate a specific device or family of devices. For more information on ICE headers, see the “Processor Extension Pak and Header Specification” (DS50001292). A transition socket is used with the ICE header to connect the header to the target board.
Debugger Usage 3.10 STARTING AND STOPPING DEBUGGING Note: Refer to the MPLAB X IDE Help for information on menu option icons. To debug an application in MPLAB X IDE, you must create a project that contains your source code so that the code may be built, programmed into your device, and executed as specified below: • To run your code, select either Debug>Debug Main Project or from the Run toolbar. • To halt your code, select either Debug>Pause or from the Debug toolbar.
MPLAB® PICkit™ 4 User’s Guide In 32-bit devices, breakpoints use different resources than data captures and runtime watches. Therefore, the available number of breakpoints is independent of the available number of triggers. The number of hardware and software breakpoints available and/or used is displayed in the Dashboard window (Window>Dashboard). See the MPLAB X IDE online help for more on this feature. Not all devices have software breakpoints.
MPLAB® PICkit™ 4 USER’S GUIDE Part 2 – Troubleshooting Chapter 4. Troubleshooting First Steps ..................................................................... 33 Chapter 5. Frequently Asked Questions (FAQs) ....................................................... 37 Chapter 6. Error Messages.......................................................................................... 39 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 32 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Chapter 4. Troubleshooting First Steps 4.1 INTRODUCTION If you are having problems with MPLAB PICkit 4 In-Circuit Debugger operation, start here. • Some Questions to Answer First • Top Reasons Why You Can’t Debug • Other Things to Consider - General - How to Invoke the Bootloader Mode - How to Use the Hardware Tool Emergency Boot Firmware Recovery Utility 4.2 SOME QUESTIONS TO ANSWER FIRST 1.
MPLAB® PICkit™ 4 User’s Guide 6. Device not seated. The device is not properly seated on the target board. If the debugger is properly connected and the target board is powered, but the device is absent or not plugged in completely, you may get the following message: Target Device ID (0x0) does not match expected Device ID (0x%x) where %x is the expected device ID. 7. Device is code-protected. Check your Configuration bits settings for code protection. 8. No device debug circuitry.
Troubleshooting First Steps FIGURE 4-1: PROGRAM SPEED OPTION 7. There may be certain situations where the debugger is not operating properly and firmware may need to be downloaded or the debugger needs to be reprogrammed. See the following sections to determine additional actions. 4.4.2 How to Invoke the Bootloader Mode If the MPLAB X IDE or MPLAB IPE cannot communicate with the debugger, the debugger may need to be forced into bootload mode (download new firmware).
MPLAB® PICkit™ 4 User’s Guide 4.4.3 How to Use the Hardware Tool Emergency Boot Firmware Recovery Utility WARNING Only use this utility to restore hardware tool boot firmware to its factory state. Use only if your hardware tool no longer functions on any machine. The debugger may need to be forced into recovery boot mode (reprogrammed) in rare situations. For example, if any of the following occurs when the debugger is connected to the computer: • If the debugger has no LED lit.
MPLAB® PICkit™ 4 USER’S GUIDE Chapter 5. Frequently Asked Questions (FAQs) 5.1 INTRODUCTION Look here for answers to frequently asked questions about the MPLAB PICkit 4 In-Circuit Debugger system. • How Does It Work • What’s Wrong 5.2 HOW DOES IT WORK • What's in the silicon that allows it to communicate with the MPLAB PICkit 4 In-Circuit Debugger? MPLAB PICkit 4 In-Circuit Debugger can communicate with Flash silicon via the ICSP™ interface.
MPLAB® PICkit™ 4 User’s Guide • My computer went into power-down/hibernate mode, and now my debugger won’t work. What happened? When using the debugger for prolonged periods of time, and especially as a debugger, be sure to disable the Hibernate mode in the Power Options Dialog window of your computer’s operating system. Go to the Hibernate tab and clear or uncheck the “Enable hibernation” check box. This will ensure that all communication is maintained across all the USB subsystem components.
MPLAB® PICkit™ 4 USER’S GUIDE Chapter 6. Error Messages 6.1 INTRODUCTION The MPLAB PICkit 4 In-Circuit Debugger produces many different error messages; some are specific and others can be resolved with general corrective actions. In general, read any instructions under your error message. If these fail to fix the problem or if there are no instructions, refer to the following sections. • Types of Error Messages • General Corrective Actions 6.2 TYPES OF ERROR MESSAGES 6.2.
MPLAB® PICkit™ 4 User’s Guide Unable to download program executive If you receive this error while attempting to program: 1. 2. 3. 4. Deselect the debugger as the programmer. Close your project and then close MPLAB X IDE. Restart MPLAB X IDE and re-open your project. Reselect the debugger as your programmer and attempt to program your target device again. If these fail to fix the problem or if there are no instructions, see Section 6.3.4 “Corrupted Installation Actions”. 6.2.
Error Messages 6.2.5 List of Error Messages TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES AP_VER=Algorithm Plugin Version AREAS_TO_PROGRAM=The following memory area(s) will be programmed: AREAS_TO_READ=The following memory area(s) will be read: AREAS_TO_VERIFY=The following memory area(s) will be verified: BLANK_CHECK_COMPLETE=Blank check complete, device is blank. BLANK_CHECK_FAILED=Blank check failed. The device is not blank BLANK_CHECKING=Blank Checking...
MPLAB® PICkit™ 4 User’s Guide TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES (CONTINUED) DEBUG_READ_INFO=Reading the device while in debug mode may take a long time due to the target oscillator speed. Reducing the range that you'd like to read (under the PICKit 4 project properties) can mitigate the situation. The abort operation can be used to terminate the read operation if necessary.
Error Messages TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES (CONTINUED) FAILED_SETTING_SHADOWS=Failed to properly set shadow registers. FAILED_SETTING_XMIT_EVENTS=Unable to synchronize run time data semiphores. FAILED_STEPPING=Failed while stepping the target. FAILED_TO_GET_DEVID=Failed to get Device ID. Please make sure the target device is attached and try the operation again.
MPLAB® PICkit™ 4 User’s Guide TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES (CONTINUED) JTAG_NEEDS_JTAGEN=The JTAG Adapter requires the JTAG enable configuration bit to be turned on. Please enable this configuration bit before continuing. MCLR_HOLD_RESET_NO_MAINTAIN_POWER=WARNING: You are powering the target device from PICkit 4 and have not selected the, "Maintain active power" option on the PICkit 4's Power property page.
Error Messages TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES (CONTINUED) OPERATION_INFO_MEMBERS=OperationInfo: Type = %s, Mask = %08x, Erase = %s, Production Mode = %s OPERATION_INFO_TRANSFER_INFO_MEMBERS=OperationInfo: Start = %x, End = %x, Buffer Length = %d, Type = %s, Mask = %08x OPERATION_INFO=OperationInfo: Values: OPERATION_NOT_SUPPORTED=This operation is not supported for the selected device OUTPUTWIN_TITLE=PICKit 4 PERIPHERAL=Peripheral POWER_ERROR_NO_9V=The configuration is set for the tool to
MPLAB® PICkit™ 4 User’s Guide TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES (CONTINUED) PRESERVE_MEM_RANGE_WONT_BE_PROGRAMMED_AUTO_SELECT=Some or all of the preserve memory ranges (%s) entered on the, "Memories to Program" property page, do not fall under the indicated program range(s) (%s) for the memory selected.
Error Messages TABLE 6-1: ALPHABETIZED LIST OF ERROR MESSAGES (CONTINUED) TOOL_VPP=VPP: UNABLE_TO_OBTAIN_RESET_VECTOR=PICKit 4 was unable to retrieve the reset vector address. This indicates that no _reset symbol has been defined and may prevent the device from starting up properly. UNKNOWN_MEMTYPE=Unknown memory type UNLOAD_WHILE_BUSY=PICKit 4 was unloaded while still busy. Please unplug and reconnect the USB cable before using PICKit 4 again. UPDATING_APP=Updating firmware application...
MPLAB® PICkit™ 4 User’s Guide 6.3 GENERAL CORRECTIVE ACTIONS These general corrective actions may solve your problem: • • • • • • • Read/Write Error Actions Debugger-to-Target Communication Error Actions Debugger-to-computer Communication Error Actions Corrupted Installation Actions USB Port Communication Error Actions Debug Failure Actions Internal Error Actions 6.3.1 Read/Write Error Actions If you receive a read or write error: 1. Did you hit Debug>Reset? This may produce read/write errors. 2.
Error Messages 6.3.5 USB Port Communication Error Actions The problem is most likely caused by a faulty or non-existent communications port. 1. Reconnect to the MPLAB PICkit 4 In-Circuit Debugger 2. Make sure the appropriate USB port has been selected in the debugger options (see Section A.3 “Debugger Options Selection”). 3. Make sure the appropriate USB port has been selected in the debugger Settings. 4. Make sure the USB port is not in use by another device. 5.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 50 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Part 3 – Reference Appendix A. Debugger Function Summary............................................................... 53 Appendix B. Hardware Specification.......................................................................... 59 Appendix C. Revision History..................................................................................... 67 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 52 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Appendix A. Debugger Function Summary A.1 INTRODUCTION A summary of the MPLAB PICkit 4 in-circuit debugger functions is listed here. • Debugger Selection and Switching • Debugger Options Selection A.2 DEBUGGER SELECTION AND SWITCHING Use the Project Properties dialog to select or switch debuggers for a project. To switch you must have more than one debugger connected to your computer. MPLAB X IDE will differentiate between the two by displaying two different serial numbers.
MPLAB® PICkit™ 4 User’s Guide FIGURE A-1: OPTIONS FOR MPLAB PICKIT 4 After setting the options, click Apply or OK. Also click the Refresh Debug Tool status icon in the MPLAB X IDE dashboard display to update any changes made. The possible option categories are: • • • • • • • • • • Memories to Program Debug Program Freeze Peripherals Power Programmer To Go (coming soon) Secure Segment Firmware Clock Communication A.3.1 Memories to Program Select the memories to be programmed into the target.
Debugger Function Summary TABLE A-1: MEMORIES TO PROGRAM OPTION CATEGORY (CONTINUED) Program Memory Range(s) (hex) The range(s) of program memory to be programmed. Each range must be two hex numbers, representing the start and end addresses of the range, separated by a dash. Ranges must be separated by a comma (e.g. 0-ff, 200-2ff). Ranges must be aligned on a 0x800 address boundary Note: The address range does not apply to the Erase function. The Erase function will erase all data on the device.
MPLAB® PICkit™ 4 User’s Guide TABLE A-3: PROGRAM OPTION CATEGORY (CONTINUED) PGC Configuration This option determines the type of resistance that will be applied to the PGC line (pull down, pull up or none). The default is pull down. The value of the resistance is determined by the PGC resistor value option below. PGC resistor value (kOhms) Type in a resistor value from 0-50.The default value is 4.7 kOhms. If the PGC configuration is set to none, this value is ignored.
Debugger Function Summary A.3.7 Secure Segment Select and load debugger firmware. TABLE A-5: SECURE SEGMENT OPTION CATEGORY Segments to be Programmed A.3.8 Select one of the following: Full Chip Programming (default); Boot, Secure and General Segments; Secure and General Segments; or General Segment Only. Firmware Select and load debugger firmware. MPLAB X IDE automatically downloads the correct firmware for your project. Only change this setting if you are having issues.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 58 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Appendix B. Hardware Specification The hardware and electrical specifications of the MPLAB PICkit 4 In-Circuit Debugger system are detailed. These topics are covered: • • • • B.1 USB Connector MPLAB PICkit™ 4 In-Circuit Debugger Communication Hardware Target Board Considerations USB CONNECTOR The MPLAB PICkit 4 In-Circuit Debugger is connected to the host computer via a Micro-B USB connector, version 2.0 compliant.
MPLAB® PICkit™ 4 User’s Guide B.2 MPLAB PICKIT™ 4 IN-CIRCUIT DEBUGGER The debugger consists of an internal main board and an external Micro-B USB connector and an 8-pin SIL connector. On the face of the debugger enclosure is an indicator light strip and a push button located under the logo. FIGURE B-1: MPLAB PICkit 4 IN-CIRCUIT DEBUGGER 1. Lanyard Connection - An opening through the top and side for a lanyard (not included) to be attached. 2.
Hardware Specification 6. Pin 1 Marker - This designates the pin 1 location for proper connector alignment. 7. Programming Connector - The connector is an 8-pin SIL header (0.100" spacing) that connects to the target device. See Table B-6 for the pinout specifications. 8. Micro SD Card Slot1 - The micro SD card slot supports a large variety of microSD cards with various speed requirements. B.2.
MPLAB® PICkit™ 4 User’s Guide TABLE B-3: BOOTLOADER ERROR DESCRIPTIONS Bootloader Errors B.3 Description Red, slow blink Problem accessing the debugger’s serial EEPROM Red, fast blink Bootloader API commands cannot be processed White, fast blink A runtime exception occurred in the tool firmware COMMUNICATION HARDWARE For standard debugger communication with a target (see Section 2.
Hardware Specification FIGURE B-2: MPLAB PICkit 4 DEBUGGER CONNECTOR PINOUT Pin 1 Indicator MPLAB PICkit 4 MPLAB PICkit 4 Pin Description* B.3.2 1 = MCLR 2 = VDD 1 2 3 4 5 6 7 8 3 = Ground 4 = PGD 5 = PGC 6 = Do not connect 7 = Unused for ICSP 8 = Unused for ICSP Pinouts for Interfaces The programming connector pin functions are different for various devices and interfaces. Refer to the following pinout tables for debug and data stream interfaces.
MPLAB® PICkit™ 4 User’s Guide TABLE B-6: PINOUTS FOR DATA STREAM INTERFACES MPLAB PICkit 4 Pin # DATA STREAM DMCI / DGI U(S)ART / CDC DGI SPI 1 FIGURE B-3: DS50002751C-page 64 2 VTG 3 GND 4 MISO 5 SCK 6 (SCK) 7 TX MOSI 8 RX SS DEBUGGER TARGET ADAPTER BOARD PINOUTS 2018 Microchip Technology Inc.
Hardware Specification B.4 TARGET BOARD CONSIDERATIONS The target board should be powered according to the requirements of the selected device and the application. Note: Stresses above those listed under “Absolute Maximum Ratings” in the device’s data sheet may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions, above those indicated in the operation listings of this specification, is not implied.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 66 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Appendix C. Revision History Revision A (May 2018) This is the initial release of this document. Revision B (August 2018) • Added information on the Debug Adapter Board in Section 1.4 “MPLAB PICkit 4 In-Circuit Debugger Components”. • Expanded Table B-5 to include pinouts for additional interfaces. • Added a note to refer to device data sheets and application notes for debug interfaces in Section B.3.2 “Pinouts for Interfaces” and Section 2.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 68 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Support INTRODUCTION Please refer to the items discussed here for support issues. • • • • Warranty Registration The Microchip Web Site myMicrochip Personalized Notification Service Customer Support WARRANTY REGISTRATION If your development tool package includes a Warranty Registration Card, please complete the card and mail it in promptly. Sending in your Warranty Registration Card entitles you to receive new product updates.
MPLAB® PICkit™ 4 User’s Guide When you are selecting your preferences, choosing “Development Systems” will populate the list with available development tools. The main categories of tools are listed below: • Compilers – The latest information on Microchip C compilers, assemblers, linkers and other language tools.
MPLAB® PICkit™ 4 USER’S GUIDE Glossary A Absolute Section A GCC compiler section with a fixed (absolute) address that cannot be changed by the linker. Absolute Variable/Function A variable or function placed at an absolute address using the OCG compiler’s @ address syntax. Access Memory PIC18 Only – Special registers on PIC18 devices that allow access regardless of the setting of the Bank Select Register (BSR).
MPLAB® PICkit™ 4 User’s Guide ANSI American National Standards Institute is an organization responsible for formulating and approving standards in the United States. Application A set of software and hardware that may be controlled by a PIC® microcontroller. Archive/Archiver An archive/library is a collection of relocatable object modules. It is created by assembling multiple source files to object files, and then using the archiver/librarian to combine the object files into one archive/library file.
Glossary Build Compile and link all the source files for an application. C C/C++ C is a general-purpose programming language which features economy of expression, modern control flow and data structures, and a rich set of operators. C++ is the object-oriented version of C. Calibration Memory A special function register or registers used to hold values for calibration of a PIC microcontroller on-board RC oscillator or other device peripherals.
MPLAB® PICkit™ 4 User’s Guide Cross Reference File A file that references a table of symbols and a list of files that references the symbol. If the symbol is defined, the first file listed is the location of the definition. The remaining files contain references to the symbol. D Data Directives Data directives are those that control the assembler’s allocation of program or data memory and provide a way to refer to data items symbolically; that is, by meaningful names.
Glossary E EEPROM Electrically Erasable Programmable Read Only Memory. A special type of PROM that can be erased electrically. Data is written or erased one byte at a time. EEPROM retains its contents even when power is turned off. ELF Executable and Linking Format. An object file of this format contains machine code. Debugging and other information is specified in with DWARF. ELF/DWARF provide better debugging of optimized code than COFF. Emulation/Emulator See ICE/ICD.
MPLAB® PICkit™ 4 User’s Guide Extended Mode (PIC18 MCUs) In Extended mode, the compiler will utilize the extended instructions (i.e., ADDFSR, ADDULNK, CALLW, MOVSF, MOVSS, PUSHL, SUBFSR and SUBULNK) and the indexed with literal offset addressing. External Label A label that has external linkage. External Linkage A function or variable has external linkage if it can be referenced from outside the module in which it is defined. External Symbol A symbol for an identifier which has external linkage.
Glossary Free-Standing An implementation that accepts any strictly conforming program that does not use complex types and in which the use of the features specified in the library clause (ANSI ‘89 standard clause 7) is confined to the contents of the standard headers , , , , , and . G GPR General Purpose Register. The portion of device data memory (RAM) available for general use. H Halt A stop of program execution.
MPLAB® PICkit™ 4 User’s Guide Import Bring data into the MPLAB IDE/MPLAB X IDE from an outside source, such as from a hex file. Initialized Data Data which is defined with an initial value. In C, int myVar=5; defines a variable which will reside in an initialized data section. Instruction Set The collection of machine language instructions that a particular processor understands.
Glossary Linker A language tool that combines object files and libraries to create executable code, resolving references from one module to another. Linker Script Files Linker script files are the command files of a linker. They define linker options and describe available memory on the target platform. Listing Directives Listing directives are those directives that control the assembler listing file format. They allow the specification of titles, pagination and other listing control.
MPLAB® PICkit™ 4 User’s Guide Macro Macro instruction. An instruction that represents a sequence of instructions in abbreviated form. Macro Directives Directives that control the execution and data allocation within macro body definitions. Makefile Export to a file the instructions to Make the project. Use this file to Make your project outside of MPLAB IDE/MPLAB X IDE, i.e., with a make.
Glossary MPLAB ICD Microchip in-circuit debugger that works with MPLAB IDE/MPLAB X IDE. See ICE/ICD. MPLAB X IDE Microchip’s Integrated Development Environment. MPLAB X IDE comes with an editor, project manager and simulator. MPLAB PICkit™ 4 In-Circuit Debugger Microchip’s next-generation in-circuit debugger that can program devices with or without the MPLAB X IDE. See the Readme files for each tool to see which devices are supported. MPLAB PM4 A device programmer from Microchip.
MPLAB® PICkit™ 4 User’s Guide Non Real Time Refers to the processor at a breakpoint or executing single-step instructions or MPLAB IDE/MPLAB X IDE being run in simulator mode. Non-Volatile Storage A storage device whose contents are preserved when its power is off. NOP No Operation. An instruction that has no effect when executed except to advance the program counter. O Object Code/Object File Object code is the machine code generated by an assembler or compiler.
Glossary Persistent Data Data that is never cleared or initialized. Its intended use is so that an application can preserve data across a device Reset. Phantom Byte An unimplemented byte in dsPIC architecture used when treating the 24-bit instruction word as if it were a 32-bit instruction word. Phantom bytes appear in dsPIC hex files. PIC MCUs PIC microcontrollers (MCUs) refers to all Microchip microcontroller families.
MPLAB® PICkit™ 4 User’s Guide Project A project contains the files needed to build an application (source code, linker script files, etc.) along with their associations to various build tools and build options. Prologue A portion of compiler-generated code that is responsible for allocating stack space, preserving registers and performing any other machine-specific requirement specified in the runtime model. This code executes before any user code for a given function.
Glossary Reentrant A function that may have multiple, simultaneously active instances. This may happen due to either direct or indirect recursion or through execution during interrupt processing. Relaxation The process of converting an instruction to an identical, but smaller instruction. This is useful for saving on code size. MPLAB XC16 currently knows how to relax a CALL instruction into an RCALL instruction.
MPLAB® PICkit™ 4 User’s Guide Shell The MPASM assembler shell is a prompted input interface to the macro assembler. There are two MPASM assembler shells: one for the DOS version and one for the Windows operating system version. Simulator A software program that models the operation of devices. Single Step This command steps through code, one instruction at a time.
Glossary Stack, Compiled A region of memory managed and allocated by the compiler in which variables are statically assigned space. It replaces a software stack when such mechanisms cannot be efficiently implemented on the target device. It precludes reentrancy. Static RAM or SRAM Static Random Access Memory. Program memory you can read/write on the target board that does not need refreshing frequently.
MPLAB® PICkit™ 4 User’s Guide T Target Refers to user hardware. Target Application Software residing on the target board. Target Board The circuitry and programmable device that makes up the target application. Target Processor The microcontroller device on the target application board. Template Lines of text that you build for inserting into your files at a later time. The MPLAB Editor stores templates in template files.
Glossary USB Universal Serial Bus. An external peripheral interface standard for communication between a computer and external peripherals over a cable using bi-serial transmission. USB 1.0/1.1 supports data transfer rates of 12 Mbps. Also referred to as high-speed USB, USB 2.0 supports data rates up to 480 Mbps. V Vector The memory locations that an application will jump to when either a Reset or interrupt occurs.
MPLAB® PICkit™ 4 User’s Guide NOTES: DS50002751C-page 90 2018 Microchip Technology Inc.
MPLAB® PICkit™ 4 USER’S GUIDE Index B G Bootloader Mode...................................................... 35 How to Invoke ................................................... 35 Breakpoints Hardware .......................................................... 29 Setup ................................................................ 29 Software............................................................ 29 Button Area ..............................................................
MPLAB® PICkit™ 4 User’s Guide Q Quick Reference Debug/Program................................................. 26 R Reading, Recommended............................................ 7 Readme...................................................................... 7 Reserved Resources by Device ............................... 23 Resistors .................................................................. 19 S SIL Single In-Line ....................................................
Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.