Debugging a Device You can use the following commands to debug a device. • Reset - Refer to the device data sheet for Reset information. If a Reset is needed for debugging purposes, enter the command: Reset • Set Breakpoint - There are two ways to set a breakpoint for debugging: - Set a breakpoint by source-line-number using the command: Break filename: linenumberFor example: Break main.c:53 - Set a breakpoint at an absolute address using command: Break *addressFor example: Break *0x108 • Set Watchpoint - To set a watchpoint for debugging: - Set a watchpoint by specifying an address and the type of watch using the command: Watch address breakontypeFor example: Watch 0xa0007ff0 R or Watch address breakontype[:value] [passcount]For example: Watch 0xa0007ff0 R:0xf 1 • Delete Breakpoint - To delete a breakpoint, use the command: Delete [breakpoint number] If no argument is specified in this command, it will delete all breakpoints. • Run Program - The Run command can be used to run the program until it reaches a breakpoint. • Step Through - To step through the program, use the Step command or Next command. • See Variable Value - A Print [variable] command can be used to see the value of a variable or an SFR. • Exit - Use the Quit command to exit the MDB.