Several buttons on the toolbar can be used to debug programs using
Working with Flash Monitor
Flash Monitor helps debugging target programs in real-time. It
allows viewing program symbols, watch program variables, examine
memory contents, and more!
There are only a few things to consider when using FlashMon51.
Breakpoints are set by replacing instructions in the program
with an ACALL instruction. This operation, while completely
transparent, can have side effects that affect the operation of the
On hardware configurations where the Flash Monitor CODE is
located at address 0, the developer has to relocate the startup code, program code
segments, and interrupt vector table.
Some devices (like Atmel parts) share the same xdata address
regions for on-chip XRAM and on-chip EEPROM. In this case, it is
not possible to set breakpoints or single step into routines that
disable the xdata RAM area, which is used by Flash Monitor-51.
Enable or disable the HALT command on the toolbar in µVision
Debugger. When enabled with the check box Stop Program Execution
with Serial Interrupt in the dialog Options — Debug — Keil
Monitor-51 Driver Settings, Monitor-51 uses the 8051 serial
interrupt vector to signal that the target program should stop
running. Therefore, you may need to reserve the serial interrupt
vector in the application. To do this, modify the application as
The application may not write to the serial interface
vector. The easiest way to reserve this vector is to locate an
array of 3 bytes at a fixed address at the beginning of your C
program. Just reserve the serial interrupt of the on-chip
interface that the monitor configuration uses.