User manual
Table Of Contents
- COVER
- TABLE OF CONTENTS
- CHAPTER 1 GENERAL INFORMATION
- CHAPTER 2 DEBUG MONITOR DESCRIPTION
- CHAPTER 3 DEBUG MONITOR COMMANDS
- CHAPTER 4 ASSEMBLER/DISASSEMBLER
- CHAPTER 5 SYSTEM CALLS
- CHAPTER 6 DIAGNOSTIC FIRMWARE GUIDE
- APPENDIX A S-RECORD INFORMATION
- APPENDIX B SELF-TEST ERROR MESSAGES
- APPENDIX C USER CUSTOMIZATION
- LIST OF FIGURES
- LIST OF TABLES
- Table 2-1. Debugger Address Parameter Format
- Table 2-2. CPU32Bug Exception Vectors
- Table 3-1. Debug Monitor Commands
- Table 4-1. CPU32Bug Assembler Addressing Modes
- Table 5-1. CPU32Bug System Call Routines
- Table 6-1. MCU CPU Diagnostic Tests
- Table 6-2. Memory Diagnostic Tests
- Table B-1. Self-Test Error Messages
- Table C-1. CPU32Bug Customization Area
- Table C-2. MCU SCI Communication Formats
- Table C-3. Rev. A Chip Selection Summary
- Table C-4. Rev. B Chip Selection Summary
- Table C-5. BCC Rev. C Chip Selection Summary
- Table C-6. PFB Rev. C Compatibility
- CHAPTER 1 GENERAL INFORMATION
- CHAPTER 2 DEBUG MONITOR DESCRIPTION
- CHAPTER 3 DEBUG MONITOR COMMANDS
- 3.1 INTRODUCTION
- 3.2 BLOCK OF MEMORY COMPARE
- 3.3 BLOCK OF MEMORY FILL
- 3.4 BLOCK OF MEMORY MOVE
- 3.5 BREAKPOINT INSERT/DELETE
- 3.6 BLOCK OF MEMORY SEARCH
- 3.7 BLOCK OF MEMORY VERIFY
- 3.8 DATA CONVERSION
- 3.9 DUMP S-RECORDS
- 3.10 GO DIRECT (IGNORE BREAKPOINTS)
- 3.11 GO TO NEXT INSTRUCTION
- 3.12 GO EXECUTE USER PROGRAM
- 3.13 GO TO TEMPORARY BREAKPOINT
- 3.14 HELP
- 3.15 LOAD S-RECORDS FROM HOST
- 3.16 MACRO DEFINE/DISPLAY/DELETE
- 3.17 MACRO EDIT
- 3.18 MACRO EXPANSION LISTING ENABLE/DISABLE
- 3.19 MEMORY DISPLAY
- 3.20 MEMORY MODIFY
- 3.21 MEMORY SET
- 3.22 OFFSET REGISTERS DISPLAY/MODIFY
- 3.23 PRINTER ATTACH/DETACH
- 3.24 PORT FORMAT
- 3.25 REGISTER DISPLAY
- 3.26 COLD/WARM RESET
- 3.27 REGISTER MODIFY
- 3.28 REGISTER SET
- 3.29 SWITCH DIRECTORIES
- 3.30 TRACE
- 3.31 TRACE ON CHANGE OF CONTROL FLOW
- 3.32 TRANSPARENT MODE
- 3.33 TRACE TO TEMPORARY BREAKPOINT
- 3.34 VERIFY S-RECORDS AGAINST MEMORY
- CHAPTER 4 ASSEMBLER/DISASSEMBLER
- CHAPTER 5 SYSTEM CALLS
- 5.1 INTRODUCTION
- 5.2 SYSTEM CALL ROUTINES
- 5.2.1 Calculate BCD Equivalent Specified Binary Number
- 5.2.2 Parse Value, Assign to Variable
- 5.2.3 Check for Break
- 5.2.4 Timer Delay Function
- 5.2.5 Unsigned 32 x 32 Bit Divide
- 5.2.6 Erase Line
- 5.2.7 Input Character Routine
- 5.2.8 Input Line Routine
- 5.2.9 Input Serial Port Status
- 5.2.10 Unsigned 32 x 32 Bit Multiply
- 5.2.11 Output Character Routine
- 5.2.12 Output String Using Pointers
- 5.2.13 Print Carriage Return and Line Feed
- 5.2.14 Read Line to Fixed-Length Buffer
- 5.2.15 Read String Into Variable-Length Buffer
- 5.2.16 Return to CPU32Bug
- 5.2.17 Send Break
- 5.2.18 Compare Two Strings
- 5.2.19 Timer Initialization
- 5.2.20 Read Timer
- 5.2.21 Start Timer at T=0
- 5.2.22 Output String with Data
- 5.2.23 Output String Using Character Count
- CHAPTER 6 DIAGNOSTIC FIRMWARE GUIDE
- 6.1 INTRODUCTION
- 6.2 DIAGNOSTIC MONITOR
- 6.2.1 Monitor Start-Up
- 6.2.2 Command Entry and Directories
- 6.2.3 Help (HE)
- 6.2.4 Self Test (ST)
- 6.2.5 Switch Directories (SD)
- 6.2.6 Loop-On-Error Mode (LE)
- 6.2.7 Stop-On-Error Mode (SE)
- 6.2.8 Loop-Continue Mode (LC)
- 6.2.9 Non-Verbose Mode (NV)
- 6.2.10 Display Error Counters (DE)
- 6.2.11 Clear (Zero) Error Counters (ZE)
- 6.2.12 Display Pass Count (DP)
- 6.2.13 Zero Pass Count (ZP)
- 6.3 UTILITIES
- 6.4 CPU TESTS FOR THE MCU
- 6.5 MEMORY TESTS (MT)
- 6.6 BUS ERROR TEST
- APPENDIX A S-RECORD INFORMATION
- APPENDIX B SELF-TEST ERROR MESSAGES
- APPENDIX C USER CUSTOMIZATION
DEBUG MONITOR COMMANDS
M68CPU32BUG/D REV 1 3-10
BS Block of Memory Search BS
3.6 BLOCK OF MEMORY SEARCH
BS <range><del><text> [;B|W|L] or
BS <range><del><data>[<del><mask>] [;B|W|L|N|V]
The BS command searches the specified range of memory for a match with a user-entered data
pattern. This command has three modes:
Mode 1 LITERAL STRING SEARCH — executes a search for the ASCII equivalent of
the literal string entered by the user. Mode 1 is indicated if <RANGE> is followed
by a <text> field. The size as specified in the option field defines whether the
count field in <range> refers to bytes, words, or longwords. The option field is
available only if <range> is specified using a count. If a match is found then the
address of the first byte of the match is output.
Mode 2 DATA SEARCH — a data pattern is entered by the user as part of the command
line. The data field size is entered by the user in the option field; the default is
word (W). The size entered in the option field also dictates whether the count field
in <RANGE> refers to bytes, words, or longwords. The following occurs during a
data search:
1. The user-entered data pattern is right-justified. Leading bits are truncated
or leading zeros are added as necessary to make the data pattern the
specified size.
2. Successive bytes, words, or longwords, within the specified range, are
compared to the user-entered data. Comparison is made only on those bits
at bit positions corresponding to a 1 in the mask. If no mask is specified
then a default mask of all one's is used (all bits are compared). The size of
the mask is the same size as the data.
3. If the ''N'' (non-aligned) option has been selected then the data is searched
on a byte-by-byte basis, rather than by words or longwords regardless of
the size of <data>. This is useful if a word (or longword) pattern is being
sought, but is not expected to lie on a word (or longword) boundary.
4. If a match is found, the address of the first byte of the match is output
along with the memory contents. If a mask was in use, then the actual data
at the memory location is displayed, rather than the masked data.
Mode 3 DATA VERIFICATION — If the ''V'' (verify) option is selected and the memory
contents do not match the user-specified pattern, then addresses and data are
displayed. Otherwise this mode is identical to Mode 2.
DEBUG MONITOR COMMANDS
M68CPU32BUG/D REV 1 3-7
BM Block of Memory Move BM
3.4 BLOCK OF MEMORY MOVE
BM <range><del><addr> [;B|W|L]
options:
B – Byte
W – Word
L – Longword
The BM command copies the contents of the memory addresses, defined by <range>, to another
place in memory, beginning at <addr>. The option field is only allowed when <range> is
specified using a count. In this case the B, W, or L defines the size of data to which the count is
referring. For example, a count of four with an option of L would mean to move four longwords
(or 16 bytes) to the new location. An error results if an option field is specified without a count in
the range.
EXAMPLES Assume memory from $4000 to $402F is clear.
CPU32Bug>MD 4100:20;B<CR>
00004100 544B 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
00004110 0000 0000 0000 0000 0000 0000 0000 0000 ................
CPU32Bug>BM 4100 410F 4000<CR>
Effective address: 00004100
Effective address: 0000410F
Effective address: 00004000
CPU32Bug>MD 4000:20;B<CR>
00004000 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
00004010 0000 0000 0000 0000 0000 0000 0000 0000 ................
This utility is useful for patching assembly code in memory. Suppose the user had a short
program in memory at address $6000.
CPU32Bug>MD 6000 600A;DI<CR>
00004000 D480 ADD.L D0,D2
00004002 E2A2 ASR.L D1,D2
00004004 2602 MOVE.L D2,D3
00004006 4E4F0021 SYSCALL .OUTSTR
0000400A 4E71 NOP
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...