Keil Logo Arm Logo

MON51 User's Guide

INSTALL.A51

There are very few configuration changes you must make to get MON51 working on your target system. The MON51 program is configured via the INSTALL.A51 source file.

Near the top of INSTALL.A51, you will find the following code:

INT_ADR_OFF EQU 8000H   ; INTERRUPT VECTOR OFFSET IF MONITOR
                        ; IS INSTALLED AT ADDRESS 0000H
DEF_PC_VAL  EQU 8000H   ; DEFAULT PC VALUE AFTER START UP

These two equates are typically all that is required to make MON51 work with your target system

  • INT_ADR_OFF specifies the offset for the reset and interrupt vectors. This is the address where your target program starts.
    • If INT_ADR_OFF is set to 8000h, this indicates your program's reset vector has been relocated to 8000h. Interrupt 0 will be at 8003h, interrupt 1 at 800Bh, interrupt 2 at 8013h, and so on. If you install the monitor at 0000h, INT_ADR_OFF must be specified with a value other than 0000h.
    • When INT_ADR_OFF is set to a non-zero value, a jump table is added to the monitor so that interrupts are redirected to the corresponding interrupt address at the specified offset.
  • DEF_PC_VAL is the default program counter value that should be set after the debugger connects to the monitor software. Usually, you would set this to the same value as the interrupt vector. If this is not set to the same starting address as your target program, you will have to manually set the address using $=xxxx in the debugger.

Note

  • These areas are where your program resides. They must be mapped as von Neumann memory (where both /PSEN and /RD enable the RD line on your RAM and where /WR enables the WR line). Since they are both XDATA and CODE space simultaneously, any attempts by your program to write to the XDATA memory will overwrite your program space. Be sure that you setup the XDATA memory correctly in the linker options.
  • If you store MON51 in EPROM (starting at 0) and your von Neumann memory starts at 4000h, your XDATA memory (in your target program) may occupy 0000h to 3FFFh. If you have a system that is 100% von Neumann memory (like the Cypress EZ-USB or other boards) be very careful that your XDATA memory doesn't overlap the monitor or your target program's CODE memory.

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.