Keil™, An ARM® Company

FlashMon51 User's Guide

Preliminary

Overview

FlashMon51 is a target debugger that allows you to debug programs on your target hardware using the µVision Debugger. FlashMon51 is very flexible and can be configured to work with many 8051-based devices with Flash memory and In-Application Programming (IAP).

FlashMon51 runs on unmodified user hardware and communicates using any standard serial interface (UART). Target requirements are minimal—the entire monitor can fit in the on-chip resources of most 8051 Flash devices. Following is a typical configuration.

FlashMon51 Overview

To get started with FlashMon51 you must properly configure and install the monitor firmware on your target hardware. FlashMon51 is located in the \KEIL\C51\FLASHMON\ folder. Prebuilt monitor configurations for several devices may be found in subfolders. Once it is configured, the monitor may be programmed into your Flash device using standard flash programming utilities.

Note

  • FlashMon51 is an extended version of MON51. It is available only in the PK51 Professional Developers Kit.

Working with Flash Monitor

Flash Monitor helps you easily debug your target programs in real-time. You may view program symbols, debug using your source code, watch program variables, examine memory contents, and more!

There are only a few things to consider when you are using Flash Monitor.

  1. Breakpoints are set by replacing instructions in your program with an ACALL instruction. This operation, while completely transparent, may have side effects that affect the operation of your target program.
  2. On hardware configurations where the Flash Monitor CODE is located at address 0, you need to relocate your startup code, program code segments, and interrupt vector table.
  3. Some devices (like the Atmel parts) share the same xdata address regions for on-chip XRAM and on-chip EEPROM. You cannot set breakpoints or single step into routines that disable the xdata RAM area which is use by Flash Monitor-51.
  4. You may enable or disable the HALT command on the toolbar in µVision Debugger. When enabled with the check box Stop Program Execution with Serial Interrupt under 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 your application.