MPLAB X IDE User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
MPLAB X IDE User’s Guide MPLAB® X IDE User’s Guide Notice to Customers Important: 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 website (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the alphabetic revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE online help. Select the Help menu, and then Help Content to open a list of available online help files. © 2019 Microchip Technology Inc. User Guide DS-50002027E-page 1 MPLAB X IDE User’s Guide Table of Contents Notice to Customers.......................................................................................................................................1 1. What is MPLAB X IDE?...........................................................................................................................7 1.1. An Overview of Embedded Systems............................................................................................7 1.2. The Development Cycle.............................................................................................................19 1.3. Project Manager.........................................................................................................................19 1.4. Language Tools..........................................................................................................................20 1.5. Target Debugging.......................................................................................................................21 1.6. Device Programming..................................................................................................................22 1.7. Components of MPLAB X IDE................................................................................................... 22 1.8. MPLAB X IDE Help.................................................................................................................... 23 1.9. Other MPLAB X IDE Documentation..........................................................................................23 1.10. Microchip Website...................................................................................................................... 24 1.11. Microchip Store.......................................................................................................................... 24 1.12. Programming Center..................................................................................................................24 1.13. MPLAB X IDE Updates.............................................................................................................. 25 1.14. Working Outside the IDE............................................................................................................25 2. Before You Begin.................................................................................................................................. 26 2.1. Review Installation Requirements..............................................................................................26 2.2. Install JRE and MPLAB X IDE....................................................................................................26 2.3. Install the USB Device Drivers (for Hardware Tools)..................................................................26 2.4. Connect to a Target (for Hardware Tools).................................................................................. 29 2.5. Install the Language Tools..........................................................................................................30 2.6. Launch the IDE and View the Desktop.......................................................................................30 2.7. Shop the MPLAB X Store...........................................................................................................31 2.8. Launch Multiple Instances of the IDE.........................................................................................32 2.9. Launch Multiple Versions of the IDE.......................................................................................... 33 2.10. Launch using Startup Parameters..............................................................................................33 3. Tutorial.................................................................................................................................................. 35 3.1. Installing and Setting Up the Software....................................................................................... 35 3.2. Connecting the Hardware...........................................................................................................35 3.3. Downloading the Example Code................................................................................................36 3.4. Opening the Example Project in MPLAB X IDE......................................................................... 36 3.5. Setting Project Properties...........................................................................................................38 3.6. Running the Code...................................................................................................................... 39 3.7. Debugging the Code.................................................................................................................. 40 3.8. Setting Breakpoints.................................................................................................................... 40 3.9. Stepping Through Code............................................................................................................. 42 3.10. Viewing Variable Values............................................................................................................. 43 3.11. Watching Symbol Values Change.............................................................................................. 44 3.12. Viewing I/O Registers.................................................................................................................45 3.13. Viewing Device Memory (including Configuration Bits)..............................................................46 3.14. Programming a Device...............................................................................................................47 4. Basic Tasks........................................................................................................................................... 49 © 2019 Microchip Technology Inc. User Guide DS-50002027E-page 2 MPLAB X IDE User’s Guide 4.1. Create a New Project................................................................................................................. 49 4.2. View Changes to Desktop.......................................................................................................... 59 4.3. Open Project Properties.............................................................................................................60 4.4. View or Make Changes to Project Properties.............................................................................61 4.5. Set Up or Change Debugger/Programmer Tool Options............................................................62 4.6. Set Up or Change Language Tool Options.................................................................................63 4.7. Set Language Tool Locations.....................................................................................................64 4.8. Set Other Tool Options...............................................................................................................66 4.9. Add Files to a Project................................................................................................................. 67 4.10. Set Build Properties....................................................................................................................75 4.11. Build a Project............................................................................................................................ 79 4.12. Run Code................................................................................................................................... 79 4.13. Debug Code............................................................................................................................... 80 4.14. Control Program Execution with Breakpoints.............................................................................82 4.15. Step Through Code....................................................................................................................87 4.16. Watch Symbol Values Change...................................................................................................87 4.17. Watch Local Variable Values Change........................................................................................ 89 4.18. View or Change Device Memory................................................................................................89 4.19. Set Configuration Values in the Configuration Bits Window.......................................................91