Debug Startup Options
Step-by-Step Instructions:
Setting the Debug Startup options
Upon entering a debug session, MPLAB® X IDE's default condition is to go through the PIC® microcontroller start-up code then begin executing your application code. Under this default condition, the program will continue to run until either a breakpoint is reached or until you manually pause the execution.
Having the application program begin and continue to execute without any action from you may not be suitable for all debugging needs. There are two other possible modes of operation when entering a debug session. MPLAB X IDE can be configured to pause at either the RESET vector or at the first line of source code within the main routine. When either of these alternate modes is set, MPLAB X IDE will not execute your application code until you instruct it to.
If you wish to change the debug startup option, you will need to configure MPLAB X IDE. Configuration of the startup option is done on MPLAB X IDE's Options window.
- If you are using PC or Linux®, you can access the Options window by selecting Tool>Options.
- If you are using Mac OS®, can access the Options window by selecting mplab_ide>preferences
Once the Options window is opened, select the Embedded menu then the 'Generic Settings' tab. Near the bottom of the page, you will see a pulldown allowing you to modify the debug startup options.
When MPLAB X IDE's debug startup option has been set, it applies to all projects. Once set, there is no need to reconfigure the debug startup option for each new project.
Debug Tool Selection
You have the responsibility of informing MPLAB X IDE which debug tools to use for a particular project. Upon installation, MPLAB X IDE provides the ability to debug using either the MPLAB X software simulator or one of Microchip's programmer/debuggers. Currently, Microchip offers three programmer/debuggers: PICKit™ 3, MPLAB ICD 3, and the MPLAB REAL ICE™. Each of these offers different levels of performance and features.
Step-by-Step Instructions:
Opening an MPLAB X IDE project
Selecting a debug tool is done on a project by project basis. The project to be debugged must be opened before the debug tool can be selected.
Step-by-Step Instructions:
Selecting the Debug Tool
To select which tool to use during debugging, open the Project Properties window by right-clicking on the project name in the Project Window. Select 'Properties' at the very bottom of the displayed menu. When the dialog box appears, select your desired debug tool within the Hardware Tools box.
MPLAB X IDE allows you to simultaneously plug in several programmer/debuggers. To differentiate the installed devices, MPLAB X IDE displays the serial number for each programmer/debugger. Please note that MPLAB X IDE's software simulator is listed in the box called 'Hardware Tools' even though this simulator exists only in software.