|ARM Technical Support Knowledge Articles|
Applies to: MON51 Target Monitor
Information in this article applies to:
How do I configure the MON51 target monitor for my hardware?
The monitor is provided with the DK51 Developer's Kit and PK51 Professional Developer's Kit. The installation software is located in the C51MON51 directory. The configuration process is as follows:
Note that you MUST have von Neumann mapped RAM at the location you specify for the monitor's xdatastart and the area where you program resides. This is because the monitor downloads your program to the RAM and modifies it to set breakpoints. The monitor's RAM is used to execute instructions as well as store temporary results.
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
INT_ADR_OFF specifies the offset for the reset and interrupt vectors. This is the address where your program starts. If INT_ADR_OFF is set to 8000h, this indicates that your programs 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 that 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 enabled 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 your monitor is stored 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.
INSTALL.BAT assembles INSTALL.A51 and links it with the monitor library files to create an Intel HEX file you can program into EPROM.
On the command line for INSTALL.BAT, you specify:
The INSTALL.BAT command line appears as follows:
INSTALL serialtype [xdatastart [codestart [PROMCHECK][BANK]]]
Where serialtype selects the serial communication parameters for the monitor and may be one of the following:
SerialType Timer Oscillator Baud Notes =============================================================================== 0 1 11.0952 MHz 9600 All Devices 1 DNA 12 MHz 9600 Siemens/Infineon 80515/80517 Only 2 2 12 MHz 9600 8052-compatible Devices Only 3 DNA 12 MHz 9600 Serial Interface 1 80515/80517 Only 4 2 12 MHz 9600 Dallas 320/520/530 Only 5 1 12 MHz 9600 Serial Interface 2 320/520/530 Only 6 DNA DNA 9600 External 16450/16550 12 MHz 7 1 DNA AUTO All Devices Except 320/520/530 8 2 DNA AUTO All Devices Except 320/520/530 9 DNA DNA AUTO Siemens/Infineon 80515/80517 Only 10 DNA DNA AUTO Serial Interface 1 80515/80517 Only 11 2 DNA AUTO Dallas 320/520/530 Only 12 1 DNA AUTO Serial Interface 2 320/520/530 Only ===============================================================================
xdatastart is the upper address byte (or page) where the monitor's scratch memory resides. This memory must be mapped as von Neumann memory (accessible as XDATA and CODE memory). A value of 7E places this memory at 7E00 - 7EFF in CODE and XDATA memory. The monitor stores its variables there. The monitor also dynamically writes short code sequences there that get executed. 256 bytes of memory are required for this area.
codestart is the upper address byte (or page) where the moitor program starts. It may be a value between 00 and 0ECh inclusive. Typically, this is set to 00 and the monitor is burned into a 16K or 32K EPROM.
PROMCHECK specifies that the monitor should check to see if there is ROM or RAM at address 0000h. Do not use this option when the codestart is set to 00.
BANK specifies that the generated monitor support code banking.
The following command creates a monitor that uses timer 1 with an 11.0592 MHz oscillator to communicate at 9600 baud. The monitor program resides at address 0000h and uses 3F00h-3FFFh for scratch memory.
INSTALL 0 3F 00
Article last edited on: 2005-07-09 11:20:23
Did you find this article helpful? Yes No
How can we improve this article?