Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

BUFFALO Monitor Program: Command Reference and Operation Guide, Study notes of Engineering

A comprehensive guide to the buffalo monitor program, outlining its command structure, operation, and key features. It details the command syntax, including special characters and field separators, and explains the functionality of various commands such as trace, verify, asm, and help. The document also covers the use of breakpoints, memory manipulation commands, and the interaction with external host computers. It is a valuable resource for understanding the buffalo monitor program's capabilities and effectively utilizing its features.

Typology: Study notes

2024/2025

Uploaded on 02/13/2025

single-abdou-2
single-abdou-2 🇨🇦

19 documents

1 / 31

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BUFFALO MONITOR
for HC11 Development Boards
START-UP ...................................................................................................................................................................2
PROGRAM DESCRIPTION .........................................................................................................................................2
OPERATING PROCEDURES ......................................................................................................................................2
COMMAND LINE FORMAT...................................................................................................................................3
MONITOR COMMANDS ............................................................................................................................................4
ASM......................................................................................................................................................................6
BF - Block Fill.......................................................................................................................................................8
Breakpoint Set - BR...............................................................................................................................................9
BULK ERASE EEPROM - BULK.......................................................................................................................11
BULK ERASE EEPROM AND CONFIG REGISTER - BULKALL ....................................................................12
CALL..................................................................................................................................................................13
GO ......................................................................................................................................................................14
HELP ..................................................................................................................................................................14
LOAD .................................................................................................................................................................14
MEMORY DISPLAY - MD.................................................................................................................................15
MEMORY MODIFY - MM.................................................................................................................................16
MOVE.................................................................................................................................................................17
PROCEED...........................................................................................................................................................18
REGISTER MODIFY - RM.................................................................................................................................19
TRACE - T..........................................................................................................................................................20
TRANSPARENT MODE - TM............................................................................................................................21
VERIFY..............................................................................................................................................................22
ASSEMBLY / DISASSEMBLY PROCEDURES.........................................................................................................23
DOWNLOADING PROCEDURES.............................................................................................................................24
INTERRUPT VECTORS ............................................................................................................................................25
UTILITY SUBROUTINES..........................................................................................................................................26
S-RECORD INFORMATION .....................................................................................................................................28
S-RECORD CONTENT..........................................................................................................................................28
S-RECORD TYPES ................................................................................................................................................29
S-RECORD CREATION.........................................................................................................................................29
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f

Partial preview of the text

Download BUFFALO Monitor Program: Command Reference and Operation Guide and more Study notes Engineering in PDF only on Docsity!

BUFFALO MONITOR

  • START-UP ................................................................................................................................................................... for HC11 Development Boards
  • PROGRAM DESCRIPTION .........................................................................................................................................
  • OPERATING PROCEDURES ......................................................................................................................................
    • COMMAND LINE FORMAT ...................................................................................................................................
  • MONITOR COMMANDS ............................................................................................................................................ - ASM...................................................................................................................................................................... - BF - Block Fill....................................................................................................................................................... - Breakpoint Set - BR............................................................................................................................................... - BULK ERASE EEPROM - BULK....................................................................................................................... - BULK ERASE EEPROM AND CONFIG REGISTER - BULKALL .................................................................... - CALL .................................................................................................................................................................. - GO ...................................................................................................................................................................... - HELP .................................................................................................................................................................. - LOAD ................................................................................................................................................................. - MEMORY DISPLAY - MD................................................................................................................................. - MEMORY MODIFY - MM................................................................................................................................. - MOVE................................................................................................................................................................. - PROCEED........................................................................................................................................................... - REGISTER MODIFY - RM................................................................................................................................. - TRACE - T.......................................................................................................................................................... - TRANSPARENT MODE - TM............................................................................................................................ - VERIFY ..............................................................................................................................................................
  • ASSEMBLY / DISASSEMBLY PROCEDURES.........................................................................................................
  • DOWNLOADING PROCEDURES .............................................................................................................................
  • INTERRUPT VECTORS ............................................................................................................................................
  • UTILITY SUBROUTINES..........................................................................................................................................
  • S-RECORD INFORMATION .....................................................................................................................................
    • S-RECORD CONTENT ..........................................................................................................................................
    • S-RECORD TYPES ................................................................................................................................................
    • S-RECORD CREATION.........................................................................................................................................

START-UP

Applying power to the board causes a Power On Reset (POR) to occur. This POR condition causes the MCU and user I/O port circuitry to be reset, and the monitor invoked.

Both COM ports will display the following monitor prompt:

BUFFALO 3.4AX - CMD11 User Fast Friendly Aid to Logical Operation

If the monitor prompt is not displayed (as shown above), press the user reset switch. If the monitor prompt still cannot be displayed, the following steps are to be performed.

a. Disconnect power source. b. Check all cabling and power connections. c. Check hardware options and preparation procedures. d. Check all components for proper PCB placement. e. Check PC baud rate and terminal software setup for 9600 baud, 8 bits, 1 stop, no parity.

PROGRAM DESCRIPTION

The monitor program is contained in EPROM (external to the MCU) at locations $EOOO-$FFFF. It is a useful tool to help debug software written for the MCU. It uses a command driven interface which allows users type commands at a prompt. The monitor executes entered commands and the prompt reappears upon completion. However, if a command is entered which causes execution of user target code (i.e., GO) then control may or may not return to the monitor.

The monitor program uses the MCU internal RAM located at $0036-$00FF. The control registers are located at $1000-$103F. The monitor program also uses Output Compare 5 (OC5) and XIRQ for the TRACE instruction, therefore OC5 and XIRQ should not be used in user routines being traced. Jumper JP13 should be installed to enable this operation.

It should be noted (when designing code) that the BUFFALO uses the MCU on-chip RAM locations $0036-$00FF leaving only 54 bytes for the user (i.e., $0000-$0035). However, external ram is normally available from address $100 to $7FFF depending on the size of ram installed.

OPERATING PROCEDURES

The BUFFALO monitor program is the resident firmware on the development board, which provides a self contained operating environment. The monitor interacts with the user through predefined commands that are entered from a terminal. The user can use any of the commands supported by the monitor.

A standard input routine controls the MONITOR operation while the user types a command line. Command processing begins only after the command line has been terminated by depressing the keyboard carriage return (Return) key.

MONITOR COMMANDS

The monitor BUFFALO program commands are listed alphabetically by mnemonic in Table 1. Each of the commands are described in detail following the tabular command listing.

TABLE 1. Monitor Program Commands

ASM [

] Assembler/disassembler BF Block fill memory with data BR [-] [
]... Breakpoint set BULK Bulk erase EEPROM BULKALL Bulk erase EEPROM + CONFIG register CALL [
] Execute subroutine G [
] Execute program HELP Display monitor commands LOAD Download (S-records) via host port LOAD Download (S-records) via terminal port MD [ []] Dump memory to terminal MM [
] Memory modify MOVE [,dest>] Move memory to new location P Proceed/continue from breakpoint RM[p,y,x,a,b,c,s,] Register modify T [] Trace $1-$FF instructions TM Enter transparent mode VERIFY Compare memory to download data via host port VERIFY Compare memory to download data via terminal

Table 2 lists the compatible commands that are applicable to all revisions of the BUFFALO monitor program. In most cases the initial single letter of the command mnemonic or a specific symbol (shown below) can be used. A minimum number of characters must be entered to at least guarantee uniqueness from other commands (i.e., MD = MOVE, ME = MEMORY).

TABLE 2, Monitor Program Compatible Commands

ASM [
] ASSEM

BF FILL BR [-] [

]... BREAK BULK BULK BULKALL BULKA CALL [
] CALL G [
] GO HELP HELP,? LOAD LOAD LOAD LOAD MD [ []] DUMP MM [
] MEMORY, / MOVE [] MOVE P PROCEED RM [P,X,Y,A,B,C,S,] REGISTER T [] TRACE TM HOST VERIFY VERIFY VERIFY VERIFY ASM Assembler/Disassembler ASM

Additional terminal keyboard functions are as follows:

(CTRL)A Exit transparent mode or assembler (CTRL)B Send break command to host in transparent mode (CTRL)H Backspace (CTRL)J Line feed <1f> (CTRL)W Wait/freeze screen (Note 1) (DELETE) Abort/cancel command (RETURN) Enter command/repeat last command NOTES:

(1) Execution is restarted by any terminal keyboard key. (2) When using the control key with a specialized command such as (CTRL)A, the (CTRL) key is depressed and held, then the A key is depressed. Both keys are then released.

Command line input examples in this chapter are amplified with the following:

(1) Underscore entries are user-entered on the terminal keyboard. (2) Command line input is entered when the keyboard (RETURN) key is depressed.

Typical example of this explanation is as follows:

MD F000 F

(RETURN) Assemble the current line and then disassemble the next opcode address.

(CTRL)J Assemble the current line. If there isn't a new line to assemble, then disassemble the next sequential address location. Otherwise, disassemble the next opcode address.

(CTRL)A Exit the assembler mode of operation.

EXAMPLES DESCRIPTION

ASM 0200 Immediate mode addressing, requires, # before 0200 STOP $FFFF operand. LDAA # 86 55 0202 STOP $FFFF Direct mode addressing. STAA C 97 C 0204 STOP $FFFF Index mode, if offset = 0 (,X) will not be LDS 0,X accepted. AE 00 0206 STOP $FFFF Branch out of range message. BRA 0230

Branch out of range

0206 STOP $FFFF Branch offsets calculated automatically,

BRA 0230 address required as conditional branch operand. 20 28 0208 STOP $FFFF (CTRL)A Assembler operation terminated.

Refer to the end of this chapter for additional operational information pertaining to the use of the assembler/disassembler.

BF - Block Fill

Block Fill

BF

where: Lower limit for fill operation.

Upper limit for fill operation.

Fill pattern hexadecimal value.

The BF command allows the user to repeat a specific byte throughout a determined user memory range. If an invalid address is specified, an invalid address is specified, an invalid address message "rom-xxxx" is displayed on the terminal CRT (xxxx = invalid address).

EXAMPLES DESCRIPTION

BF 0200 0230 FF Fill each byte of memory from 0200 through 0230 with data pattern FF.

BF 0200 0200 0 Set location 0200 to 0.

BR 0203 0205 0207 0209 Sets four breakpoints. Breakpoints at same address will result in only one 0203 0205 0207 0209 breakpoint being set.

BR Display all current breakpoints.

0203 0205 0207 0209

BR - 0209 Remove breakpoint at address location 0209. 0203 0205 0207 0000

BR 0209 - Clear breakpoint table and add C009.

0209 0000 0000 0000

BR - Remove all breakpoints.

0000 0000 0000 0000

BR E000 Only RAM locations can be breakpointed.

rom-E000 Invalid Address message. 0000 0000 0000 0000

BR 0205 0207 0209 0211 0213 Maximum of four breakpoints cam be set.

Full Buffer full message. 0205 0207 0209 0211

BULK ERASE EEPROM - BULK

BULK

The bulk command allows the user to erase all MCU EEprom locations ($B600-$B7FF). A delay loop is built in such that the erase time is about 5ms when running at 2 MHz E clock. This command is only applicable for A38P and A95J mask sets, and all future mask sets.

NOTE No erase verification message will be displayed upon completion of the bulk EEPROM erase operation. User must verify erase operation by examining one or two EEPROM locations using the MM or MD command.

EXAMPLE DESCRIPTION

BULK Bulk erase all MCU EEPROM locations ($B600-$B7FF). Prompt indicates erase sequence completed.

CALL

CALL [

]

where:

is the starting address where user program subroutine execution begins.

The CALL command allows the user to execute a user program subroutine. Execution starts at the current program counter (PC) address location , unless a starting address is specified. Two extra bytes are placed onto the stack before the return from interrupt (RTI) is issued so that the first unmatched return from subroutine (RTS) encountered will return control back to the monitor program. Thus any user program subroutine can be called and executed via the monitor program. Program execution continues until a breakpoint encountered, or the MONITOR reset switch S1 is activated (pressed).

EXAMPLE PROGRAM CALL, G, AND P COMMAND EXAMPLES

ASM 0200 0206 STX $FFFF NOP 0200 STX $FFF 01 LDAA #44 0207 STX $FFFF 86 44 >NOP 0202 STX $FFFF 01 STAA 07FC 0208 STX $FFFF B7 07 FC >RTS 0205 STX $FFFF 39 NOP 0209 STX $FFFF 01 >(CTRL)A

EXAMPLE DESCRIPTION

CALL 0200 Execute program subroutine.

P-0200 Y-DEFE X-F4FF A-44 B-FE C-D0 S-004A Displays status of registers at time RTS encountered (except P register contents).

GO

G [

]

where:

is the starting address where user program execution (free run in real time). The user may optionally specify a starting address where execution is to begin. Execution starts at the current program counter (PC) address location, unless a starting address is specified. Program execution continues until a breakpoint us encountered, or the MONITOR reset switch S1 is activated (pressed).

NOTE

Refer to example program shown and insert breakpoints at locations $0205 and $0207 for the following G command example.

EXAMPLE DESCRIPTION

$0200 Begin program execution at PC address location 0200.

P-0205 Y-0000-X-00CD A-44 B-FB C-DO S-004A Breakpoint encountered at

HELP

The HELP command enables the user available MONITOR command information to be displayed on the terminal CRT for quick reference purposes.

LOAD

LOAD

LOAD

where: download S-records to MONITOR via host port.

download S-records to MONITOR via terminal port.

The LOAD command moves (downloads) object data in S-record format from an external host computer to MONITOR. As the MONITOR monitor processes only valid S-record data, it is possible for the monitor to hang up during a load operation. If an S-record starting address points to and invalid memory location, the invalid address message "error addr xxxx" is displayed on the Terminal CRT (xxxx = invalid address).

EXAMPLES DESCRIPTION

LOAD T MONITOR download command (via terminal port)

You can now us your PC Terminal program to send a file to the board.

MEMORY MODIFY - MM

MM [

]

CAUTION - Caution should be observed when modifying EEPROM locations. MONITOR MCU CONFIG register ROMON bit is cleared to disable MCU internal ROM.

where:

is the memory location at which to start display/modify.

The MM command allows the user to examine/modify contents in user memory at specified locations in an interactive manner. Once entered, the MM command has several submodes of operation that allow modification and verification of data. The following subcommands are recognized.

CTRL J or (Space Bar) Examine/modify next location.

CTRL H or A Examine/modify previous location.

/ Examine/modify same location.

RETURN Terminate MM operation.

O Compute branch instruction relative offset.

If an invalid address is specified, the invalid address message "rom" is displayed on the terminal CRT>

EXAMPLES DESCRIPTION

MM 0700 Display memory location 0700.

0700 44 66/ Change data at 0700 and re-examine location. 0700 66 55A Change data at 0700 and backup one location. 06FF FF AA(RETURN) Change data at 06FF and terminate MM operation.

MM 013C Display memory location.

013C F7 C18E0 51 Compute offset, result = $51. 013C F

MM 0200 Examine location $0200.

0200 55 80 C2 00 CE C4 Examine next location(s) using (Space Bar).

MOVE

MOVE []

where: Memory starting address.

Memory ending address.

[] Destination starting address (optional).

The MOVE command allows the user to copy/move memory to new memory location. If the destination is not specified, the block of data residing from address1 to address2 will be moved up one byte. Using the MOVE command on EEPROM locations will program EPROM cells.

The MOVE command is useful when programming EEPROM. As an example, a program is created in user RAM using the assemble, debugged using the monitor, and then programmed into EEPROM with the MOVE command.

No messages will be displayed on the terminal CRT upon completion of the copy/move operation, only the prompt is displayed.

CAUTION

Caution should be observed when moving data into EEPROM locations. MONITOR MCU CONFIG register ROMON bit is cleared to disable MCU internal ROM.

Example Description

MOVE E000 E7FF 0200 Move data from locations $E000-$E7FF to locations $0200-$09FF.

REGISTER MODIFY - RM

RM [p,,x,a,b,c,s]

The RM command is used to modify the MCU program counter (P), Y index (Y), X index (X), A acculmulator (A), B accumulator (B), C accumulator (C), and stack pointer (S) register contents.

EXAMPLE DESCRIPTION

RM Display P register contents. P-0200 Y-798 X-FF00 A-44 B-70 C-C0 S- P-0207 0220 Modify P register contents.

RM X Display X register contents. P-C007 Y-7982 X-FF00 A-44 B-70 C-C0 S- X-FF00 0220 Modify X register contents.

RM Display P register contents. P-0220 Y0DEFE X-0220 A-DF B-DE C-D0 S- P-0220 (SPACE BAR) Display remaining registers. Y-DEFE (SPACE BAR) X-0220 (SPACE BAR) A-DF (SPACE BAR) B-DE (SPACE BAR) C-DO (SPACE BAR) S-0054 SPACE BAR) (SPACE BAR) entered following stack pointer display will terminate RM command.

TRACE - T

T []

where: is the number (in hexadecimal, $1-FF max.) of instructions to execute.

The T command allows the user to monitor program execution on an instruction-by-instruction basis. The user may optionally execute several instructions at a time by entering a count value (up to $FF). Execution starts at the current program counter (PC). The PC display with the event message is of the next instruction to be executed. The trace command operates by setting the OC5 interrupt to time out after the first cycle of the first opcode fetched.

(Install JP13 on CMD11A Board to connect OC5 to XIRQ for Trace to operate)

EXAMPLES DESCRIPTION

T SINGLE TRACE

Op- 86 P-0202 Y-DEFE X-FFFF A-44 B-00 C-00 S-004B

T 2 MULTIPLE TRACE (2)

Op-B P-0205 Y-DEFE X-FFFF A-44 B-00 C-00 S-004B

Op- P-0206 Y-DEFE X-FFFF A-44 B-00 C-00 S-004B