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

SYSTEM CALLS
M68CPU32BUG/D REV 1 5-2
It is necessary to create an equate file with the routine names equated to their respective codes, or
download the archive file C32SCALL.ARC from the Motorola FREEWARE Bulletin Board
(BBS). For more information on the FREEWARE BBS, reference customer letter
M68xxxEVx/L2.
When using the CPU32Bug one-line assembler/disassembler, the SYSCALL macro and the
equates are pre-defined. Input: SYSCALL, space, function, carriage return.
EXAMPLE
CPU32Bug>M 3000;DI<CR>
0000 3000 00000000 ORI.B #$0,D0? SYSCALL .OUTLN <CR>
0000 3000 4E3F0022 SYSCALL .OUTLN
0000 3004 00000000 ORI.B #$0,D0? . <CR>
CPU32Bug>
5.1.2 Input/Output String Formats
Within the context of the TRAP #15 handler are three string formats:
Pointer/Pointer Format The string is defined by a pointer to the first character and a
pointer to the last character + 1.
Pointer/Count Format The string is defined by a pointer to a count byte which
contains the count of the characters in the string followed by
the string itself.
Line Format A line is defined as a string followed by a carriage return and a
line feed.
5.2 SYSTEM CALL ROUTINES
Table 5-1 summarizes the TRAP #15 functions. Refer to the appropriate paragraph for a
description of the available system calls.
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-11
4.3.1 Executing the Assembler/Disassembler
The assembler/disassembler is actuated using the ;DI option of the MM (Memory Modify) and
MD (Memory Display) commands:
MM <ADDR >;DI
where
<CR> sequences to next instruction
.<CR> exits command
and
MD[S] <ADDR>[:<count>I<ADDR>];DI
Use the MM (;DI option) to enter and modify the program. When this command is used, the
memory contents at the specified location are disassembled and displayed. A new or modified
line can be entered if desired.
The disassembled line is either an M68300 Family instruction, a SYSCALL, or a DC.W
directive. If the disassembler recognizes a valid form of an instruction, the instruction is returned.
If the disassembler does not recognizes a valid form of an instruction, random data occurs, the
DC.W $XXXX (always hex) is returned. Because the disassembler gives precedence to
instructions, a word of data interpreted as a valid instruction is returned as the instruction.
4.3.2 Entering a Source Line
Enter a new source line immediately following the disassembled line. Use the format discussed
in paragraph 4.2.1.
CPU32Bug>MM 6000;DI <CR>
00006000 2600 MOVE.L D0,D3 ? ADDQ.L #1,A3 <CR>
When a line is terminated with a carriage return, the old source line is erased from the terminal
screen, the new line is assembled and displayed, and the next instruction in memory is
disassembled and displayed:
CPU32Bug>MM 6000;DI<CR>
00006000 528B ADDQ.L #1,A3
00006002 4282 CLR.L D2 ?
Another program line can now be entered. Program entry continues in like manner until all lines
have been entered. A period (.) is used to exit the MM command. If an error occurs during line
assembly, the assembler displays the line unassembled with an error message. The location being
accessed is redisplayed:
CPU32Bug>MM 6000;di <CR>
00006000 528B ADDQ.L #$1,A3? LEA.L 5(A0,D8),A4<CR>
LEA.L 5(A0,D8),A4
BAD COMBINATION OF COMMAND, OPERANDS
00006000 528B ADDQ.L #$1,A3?
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...