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 |
cddirectory_path_from_table_above
From theWindows command line, run the command:
mdb.bat
From theLinux orMac OSX command line, run the command:
mdb.sh
3
When MDB is running, you should see its command prompt:
>_
You can entercommands at the mdb prompt, or you can use mdb to executescripts.
If you typehelp and hitEnter you should be presented with a list of available commands.
>helpThe list of classes of commands:breakpoints -- Making program stop at certain pointsdata -- Examining/Changing datadeviceandtool -- Selecting debug tool and deviceothers -- Othersprogramming -- Programming device and its relative functionsrunning -- Running the programstack -- Examining stackType "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 selectProperties. Change theTarget to the following:
%windir%\system32\cmd.exe /K C:\doskey.cmd


