How to Invoke MDB
2
In some versions of MPLAB X IDE you must run mdb from inside its directory:
Platform | MDB Directory |
Windows (32-bit) | C:\Program Files\Microchip\MPLABX\mplab_ide\bin |
Windows (64-bit) | C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\bin |
Linux | /opt/microchip/mplabx/mplab_ide/bin |
Macintosh | /Applications/microchip/mplabx/mplab_ide.app/Contents/Resources/mplab_ide/bin |
cd directory_path_from_table_above
From the Windows command line, run the command:
mdb.bat
From the Linux or Mac OSX command line, run the command:
mdb.sh
3
When MDB is running, you should see its command prompt:
>_
You can enter commands at the mdb prompt, or you can use mdb to execute scripts.
If you type help and hit Enter you should be presented with a list of available commands.
>help
The list of classes of commands:
breakpoints -- Making program stop at certain points
data -- Examining/Changing data
deviceandtool -- Selecting debug tool and device
others -- Others
programming -- Programming device and its relative functions
running -- Running the program
stack -- Examining stack
Type "help" followed by a class name for a list of commands in that class.
Type "help" followed by command name for full documentation.
Add a command alias to simplify changing directories on the Windows command line
- Create a file called C:\doskey.cmd with the following content:
@echo off
DOSKEY cdm=cd "C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\bin"
- Right click on your command prompt launcher and select Properties. Change the Target to the following:
%windir%\system32\cmd.exe /K C:\doskey.cmd