Hitachi Microcomputer Development Environment H8/3048-Series, H8/3048F Emulator E7000 HS3048EPD70H User's Manual HITACHI HS3048EPD70HE Preface Thank you for purchasing the emulator for Hitachi's H8/3048-series and H8/3048F original microcomputers. The H8/3048-series and H8/3048F emulator (hereafter abbreviated to the H8/3048 emulator) is an efficient software and hardware development tool for systems based on Hitachi's H8/3048, H8/3047, H8/3044, and H8/3048F original microcomputers (hereafter abbreviated to MCU). By exchanging the emulator pod, this emulator can also be used for other H-series microcomputers. The H8/3048 series includes three types of microcomputers: H8/3048, H8/3047, and H8/3044. The H8/3048F has the same functions as the H8/3048 except that it has flash memory instead of internal ROM. The descriptions in this manual apply to all MCUs unless otherwise specified. There are two types of H8/3048 emulator: the E7000 and the E7000PC, which is used only with the IBM PC. This manual describes the functions and operating procedures of the E7000 and E7000PC for the MCU. To use the E7000, please read Part I, E7000 Guide, and Part III, Emulator Function Guide. To use the E7000PC, please read Part II, E7000PC Guide, and Part III, Emulator Function Guide. Please read this manual carefully in order to gain a full understanding of the emulator's performance. In particular, be sure to read section 1.1, Warnings, in Part I, E7000 Guide, or in Part II, E7000PC Guide before use. Two 3.5-inch floppy disks are provided together with the emulator pod. The E7000 system disk is marked with "E7000" below the HITACHI mark on the label, and the E7000PC disk is marked with "E7000PC". H8/3048 E7000PC SYSTEM H8/3048 E7000 SYSTEM 1. SYSTEM (HS3048EPD70SF) Vn.m 1. SYSTEM (HS3048EPD70SF) Vn.m 2. PC I/F 2. DIAGNOSTIC TEST (HS7000EII01SF) 3. DIAGNOSTIC TEST XX.XX.XX Vn.m Vn.m Vn.m HITACHI E7000PC (1) E7000PC system disk XX.XX.XX HITACHI E7000 (2) E7000 system disk The E7000 system floppy disk must be backed up to another floppy disk using the E7000. For details, refer to section 3.6, Floppy Disk Backup, in Part I, E7000 Guide. The contents of the E7000PC system floppy disk must be installed (copied) to the personal computer connected to the emulator. For details, refer to section 3.4, System Software Installation, in Part II, E7000PC Guide. Related Manuals: H8/300 Series Cross Assembler User's Manual H Series Linkage Editor User's Manual H Series Librarian User's Manual H8/300H E7000 Graphical User Interface Software User's Manual H8/300H E7000PC Graphical User Interface Software User's Manual H8/300 Series C Compiler User's Manual HS7000EST01H Manual HS7000ESTP1H Manual LAN Board Manual Description Notes on Using the IBM PC Interface Board (HS7000EII01H) Memory Board Manual Bus Monitor Manual Bus Monitor Interface Board Manual When the E7000 is configured in remote mode, as described in section 2.3.2, RS-232C Interface System Configuration in Part I, E7000 Guide, refer to the following manual: H-Series Interface Software User's Manual Notes: 1. Ethernet is a registered trademark of Xerox Corporation. 2. IBM PC is a registered trademark of International Business Machines Corporation. 3. MS-DOS is a registered trademark and Windows is a trademark of Microsoft Corporation. 4. SPARC is a registered trademark of SPARC International, Inc. Contents Part I E7000 Guide Section 1 1.1 1.2 1.3 Overview ..................................................................................................... Warnings ........................................................................................................................ Environmental Conditions .............................................................................................. Components .................................................................................................................... 1.3.1 E7000 Emulator Station.................................................................................. 1.3.2 E7000 Emulator Pod....................................................................................... 1.3.3 Options............................................................................................................ 1-1 1-4 1-5 1-6 1-6 1-7 1-8 Section 2 2.1 2.2 2.3 Components ................................................................................................ 2-1 E7000 Hardware Components........................................................................................ 2-1 2.1.1 Emulator Station Components........................................................................ 2-2 2.1.2 Emulator Pod Components ............................................................................. 2-5 E7000 Software Components ......................................................................................... 2-7 System Configuration ..................................................................................................... 2-9 2.3.1 System Configuration Using LAN Interface .................................................. 2-9 2.3.2 System Configuration Using RS-232C Interface ........................................... 2-10 Section 3 3.1 3.2 3.3 3.4 3.5 Preparation before Use ............................................................................ E7000 Preparation .......................................................................................................... E7000 Connection .......................................................................................................... 3.2.1 Connecting Emulator Pod............................................................................... 3.2.2 External Probe Connector............................................................................... 3.2.3 Clock Selection............................................................................................... 3.2.4 Connecting System Ground............................................................................ System Connection ......................................................................................................... 3.3.1 Connecting to a Console................................................................................. 3.3.2 Setting up Console Interface........................................................................... 3.3.3 Connecting to a Host System ......................................................................... 3.3.4 Connecting to a Printer ................................................................................... 3.3.5 Connecting to a LAN Interface....................................................................... 3.3.6 System Connection Examples ........................................................................ Power-On Procedure for the E7000................................................................................ 3.4.1 Power-On Procedure for LAN Interface......................................................... 3.4.2 Power-On Procedure for RS-232C Interface.................................................. E7000 Monitor Commands............................................................................................. 3.5.1 E7000 Monitor Initiation ................................................................................ 3.5.2 S ...................................................................................................................... 3.5.3 R...................................................................................................................... 3-1 3-1 3-2 3-2 3-4 3-5 3-7 3-8 3-8 3-9 3-11 3-12 3-12 3-14 3-19 3-19 3-23 3-24 3-24 3-26 3-27 3.6 3.7 3.5.4 B...................................................................................................................... 3.5.5 F ...................................................................................................................... 3.5.6 L...................................................................................................................... 3.5.7 T...................................................................................................................... Floppy Disk Backup ....................................................................................................... 3.6.1 Floppy Disk Formatting.................................................................................. 3.6.2 Floppy Disk Backup and Verification ............................................................ E7000 System Program Initiation................................................................................... 3.7.1 Initiation on E7000 Monitor ........................................................................... 3.7.2 Automatic Initiation of E7000 System Program ............................................ Section 4 Operating Examples ................................................................................. 3-28 3-31 3-32 3-34 3-35 3-35 3-36 3-39 3-39 3-42 Basic Examples............................................................................................................... 4.1.1 Preparing for Connection of LAN Host System............................................. 4.1.2 Specifying the MCU Operating Mode............................................................ 4.1.3 Allocating Standard Emulation Memory and Specifying Attributes.............. 4.1.4 Loading the User Program.............................................................................. 4.1.5 Executing Program ......................................................................................... 4.1.6 PC Break......................................................................................................... 4.1.7 Single-Step Execution .................................................................................... 4.1.8 Setting Hardware Break Conditions ............................................................... 4.1.9 Displaying Trace Information......................................................................... Application Examples..................................................................................................... 4.2.1 Break with Pass Count Condition................................................................... 4.2.2 Conditional Trace ........................................................................................... 4.2.3 Parallel Mode.................................................................................................. 4.2.4 Searching Trace Information .......................................................................... 4.2.5 Sequential PC Break ....................................................................................... 4-1 4-3 4-3 4-5 4-6 4-7 4-9 4-10 4-11 4-12 4-13 4-14 4-14 4-15 4-16 4-17 4-18 Appendix A Floppy Disk Drive Specifications ........................................................ A-1 Appendix B Connector Specifications ........................................................................ B-1 B-1 B-2 B-3 B-5 B-6 B-7 B-8 4.1 4.2 B.1 B.2 B.3 B.4 B.5 B.6 B.7 Console Connector.......................................................................................................... Host System Connector .................................................................................................. Printer Connector............................................................................................................ LAN Connector ............................................................................................................. E7000 to Console Connection ........................................................................................ E7000 to Host System Connection ................................................................................. Printer Cable Connection................................................................................................ Part II E7000PC Guide Section 1 1.1 1.2 1.3 Overview ..................................................................................................... Warnings ........................................................................................................................ Environmental Conditions .............................................................................................. Components .................................................................................................................... 1.3.1 E7000PC Emulator Station............................................................................. 1.3.2 E7000PC Emulator Pod.................................................................................. 1.3.3 IBM PC Interface Board................................................................................. 1.3.4 Options............................................................................................................ Section 2 2.1 2.2 2.3 E7000PC Hardware Components ................................................................................... 2.1.1 E7000PC Emulator Station Components........................................................ 2.1.2 E7000PC Emulator Pod Components............................................................. E7000PC Software Components .................................................................................... System Configuration ..................................................................................................... Section 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Components ................................................................................................ Preparation before Use ............................................................................ E7000PC Preparation...................................................................................................... E7000PC Connection...................................................................................................... 3.2.1 Connecting Emulator Pod............................................................................... 3.2.2 External Probe Connector............................................................................... 3.2.3 Clock Selection............................................................................................... 3.2.4 Connecting System Ground............................................................................ System Connection ......................................................................................................... 3.3.1 IBM PC Interface Board Specifications ......................................................... 3.3.2 Setting the Switches on the IBM PC Interface Board .................................... 3.3.3 Installing the IBM PC Interface Board........................................................... 3.3.4 Connecting the IBM PC Interface Board to the E7000PC Emulator Station . System Software Installation .......................................................................................... 3.4.1 E7000PC System Disk.................................................................................... 3.4.2 Installation ...................................................................................................... Power-On Procedure for the E7000PC........................................................................... E7000PC Monitor Commands........................................................................................ 3.6.1 E7000PC Monitor Initiation ........................................................................... 3.6.2 E7000PC System Program Initiation.............................................................. Interface Software Operations ........................................................................................ 3.7.1 Initiating Interface Software ........................................................................... 3.7.2 Initiating from Windows................................................................................. 3.7.3 Emulation Support Function........................................................................... 3.7.4 Notes ............................................................................................................... 1-1 1-4 1-5 1-6 1-6 1-7 1-7 1-8 2-1 2-1 2-2 2-5 2-7 2-9 3-1 3-1 3-2 3-2 3-4 3-5 3-7 3-8 3-8 3-9 3-12 3-13 3-14 3-14 3-15 3-16 3-17 3-17 3-19 3-23 3-23 3-24 3-24 3-27 Section 4 4.1 4.2 Operating Examples ................................................................................. Basic Examples............................................................................................................... 4.1.1 Preparing for Connection of IBM PC............................................................. 4.1.2 Specifying the MCU Operating Mode............................................................ 4.1.3 Allocating Standard Emulation Memory and Specifying Attributes.............. 4.1.4 Executing Program ......................................................................................... 4.1.5 PC Break......................................................................................................... 4.1.6 Single-Step Execution .................................................................................... 4.1.7 Setting Hardware Break Conditions ............................................................... 4.1.8 Displaying Trace Information......................................................................... Application Examples..................................................................................................... 4.2.1 Break with Pass Count Condition................................................................... 4.2.2 Conditional Trace ........................................................................................... 4.2.3 Parallel Mode.................................................................................................. 4.2.4 Searching Trace Information .......................................................................... 4.2.5 Sequential PC Break ....................................................................................... Part III Section 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 4-1 4-3 4-3 4-5 4-6 4-7 4-8 4-9 4-10 4-11 4-12 4-12 4-13 4-14 4-15 4-16 Emulator Function Guide Emulator Functions ................................................................................. Overview ........................................................................................................................ Specification ................................................................................................................... Realtime Emulation ........................................................................................................ 1.3.1 Normal Mode.................................................................................................. 1.3.2 Cycle Reset Mode........................................................................................... 1.3.3 Parallel Mode.................................................................................................. Break Function................................................................................................................ 1.4.1 Hardware Break .............................................................................................. 1.4.2 PC Break ........................................................................................................ 1.4.3 Forced Break................................................................................................... 1.4.4 Write Protect/Guarded Break ......................................................................... Realtime Trace Function................................................................................................. 1.5.1 Trace Timing .................................................................................................. 1.5.2 Trace Condition Setting ................................................................................. 1.5.3 Trace Display.................................................................................................. Single-Step Function ...................................................................................................... 1.6.1 Single-Step Execution .................................................................................... 1.6.2 Setting Display Information ........................................................................... 1.6.3 Termination of Single-Step Function ............................................................. Execution Time Measurement........................................................................................ Trigger Output ................................................................................................................ Memory Access Function ............................................................................................... 1-1 1-1 1-2 1-9 1-9 1-10 1-12 1-15 1-15 1-24 1-27 1-27 1-28 1-28 1-30 1-33 1-34 1-34 1-35 1-35 1-35 1-38 1-40 1.10 1.11 1.12 1.13 1.14 1.15 MCU Control and Status Check .................................................................................... Emulation Monitoring Function ..................................................................................... Operating Voltage and Frequency .................................................................................. Flash Memory Usage...................................................................................................... 1.13.1 On-Board Programming ................................................................................. 1.13.2 Flash Memory Operation................................................................................ Symbolic Debugging ...................................................................................................... 1.14.1 Defining Symbols .......................................................................................... 1.14.2 Symbol Reference........................................................................................... 1.14.3 Symbol Deletion ............................................................................................ 1.14.4 Symbol Display .............................................................................................. Assembly Function ......................................................................................................... 1.15.1 Overview......................................................................................................... 1.15.2 Instruction Format .......................................................................................... 1.15.3 Definition of Label Names as Symbols .......................................................... 1.15.4 Label Name Reference ................................................................................... 1.15.5 Disassembly.................................................................................................... Section 2 2.1 2.2 2.3 2.4 2.5 Differences between the MCU and the Emulator ........................... Flash Memory (H8/3048F) ............................................................................................. 2.1.1 On-Board Programming Modes ..................................................................... 2.1.2 Flash Memory Operating Modes .................................................................... Register Values at Reset ................................................................................................. User Interface.................................................................................................................. Crystal Oscillator ............................................................................................................ Load Capacitance............................................................................................................ Section 3 3.1 3.2 3.3 3.4 3.5 3.6 MCU Function Support ........................................................................... Setting the MCU Operating Mode.................................................................................. Memory Space ................................................................................................................ 3.2.1 Internal ROM Area ........................................................................................ 3.2.2 Internal RAM Area ......................................................................................... 3.2.3 Internal I/O Area............................................................................................. 3.2.4 Unusable Area ................................................................................................ 3.2.5 External Memory Area ................................................................................... 3.2.6 Reserved Areas ............................................................................................... 3.2.7 Flash Memory Area ........................................................................................ Low-Power Mode (Sleep, Hardware Standby, and Software Standby) ......................... 3.3.1 Hardware Standby Mode ................................................................................ 3.3.2 Sleep and Software Standby Modes ............................................................... Interrupts ........................................................................................................................ Control Input Signals (RES, WAIT, BREQ).................................................................. Watchdog Timer (WDT) ................................................................................................ 1-41 1-43 1-45 1-46 1-46 1-47 1-49 1-49 1-50 1-50 1-51 1-51 1-51 1-52 1-55 1-55 1-56 2-1 2-1 2-1 2-1 2-3 2-3 2-3 2-3 3-1 3-1 3-2 3-2 3-3 3-3 3-3 3-3 3-4 3-4 3-5 3-5 3-5 3-5 3-5 3-6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Integrated Timer Pulse Unit (ITU) and Programmable Timing Pattern Controller (TPC)............................................................................................................. Serial Communications Interface ................................................................................... DMAC ........................................................................................................................ Wait State Controller ...................................................................................................... I/O Port ........................................................................................................................ A/D and D/A Converter.................................................................................................. Refresh Controller .......................................................................................................... Clock Pulse Generator .................................................................................................... Section 4 User System Interface Circuit ............................................................... 4-1 Troubleshooting ......................................................................................... Internal System Test Using the E7000 ........................................................................... Internal system Test Using the E7000PC ....................................................................... Troubleshooting Procedure............................................................................................. 5-1 5-1 5-5 5-8 Section 5 5.1 5.2 5.3 Section 6 6.1 6.2 Command Input and Display ................................................................. Command Syntax............................................................................................................ 6.1.1 Command Input Format.................................................................................. 6.1.2 Help Function ................................................................................................. 6.1.3 Word Definition.............................................................................................. Special Key Input ........................................................................................................... 6.2.1 Command Execution and Termination .......................................................... 6.2.2 Display Control............................................................................................... 6.2.3 Command Re-entry......................................................................................... 6.2.4 Cursor Control and Character Editing ............................................................ Section 7 7.1 7.2 3-6 3-6 3-6 3-6 3-6 3-7 3-7 3-7 Emulation Commands ............................................................................. Overview ........................................................................................................................ Emulation Commands .................................................................................................... 7.2.1 ........................................................................................................ 7.2.2 ! or & .............................................................................. 7.2.3 ABORT........................................................................................................... 7.2.4 ASSEMBLE ................................................................................................... 7.2.5 BREAK........................................................................................................... 7.2.6 BREAK_CONDITION1,2,3,4 ....................................................................... 7.2.7 BREAK_SEQUENCE ................................................................................... 7.2.8 CHECK........................................................................................................... 7.2.9 CLOCK........................................................................................................... 7.2.10 COMMAND_CHAIN .................................................................................... 7.2.11 CONVERT ..................................................................................................... 7.2.12 DATA_CHANGE........................................................................................... 6-1 6-1 6-1 6-1 6-2 6-4 6-4 6-5 6-5 6-6 7-1 7-1 7-3 7-4 7-7 7-9 7-10 7-13 7-17 7-26 7-29 7-31 7-33 7-35 7-37 7.2.13 7.2.14 7.2.15 7.2.16 7.2.17 7.2.18 7.2.19 7.2.20 7.2.21 7.2.22 7.2.23 7.2.24 7.2.25 7.2.26 7.2.27 7.2.28 7.2.29 7.2.30 7.2.31 7.2.32 7.2.33 7.2.34 7.2.35 7.2.36 7.2.37 7.2.38 7.2.39 7.2.40 7.2.41 7.2.42 7.2.43 7.2.44 7.2.45 7.2.46 7.2.47 7.2.48 7.2.49 DATA_SEARCH ........................................................................................... DISASSEMBLE ............................................................................................. DISPLAY_COVERAGE................................................................................ DUMP............................................................................................................. END ................................................................................................................ EXECUTION_MODE.................................................................................... FILL................................................................................................................ GO................................................................................................................... HELP .............................................................................................................. HISTORY ....................................................................................................... ID .................................................................................................................... LED1,2,3,4 ..................................................................................................... LED_OUT1,2 ................................................................................................ MAP................................................................................................................ MEMORY ...................................................................................................... MODE............................................................................................................. MOVE............................................................................................................. MOVE_TO_RAM .......................................................................................... PERFORMANCE_ANALYSIS ..................................................................... PRINT............................................................................................................. QUIT............................................................................................................... RADIX............................................................................................................ REGISTER ..................................................................................................... RESET ............................................................................................................ RESULT ......................................................................................................... SET_COVERAGE ......................................................................................... SHORT_SYMBOL......................................................................................... STATUS ......................................................................................................... STEP ............................................................................................................... STEP_INFORMATION ................................................................................. STEP_OVER .................................................................................................. SYMBOL........................................................................................................ TRACE ........................................................................................................... TRACE_CONDITION ................................................................................... TRACE_MEMORY ....................................................................................... TRACE_MODE ............................................................................................. TRACE_SEARCH ......................................................................................... 7-39 7-41 7-44 7-47 7-50 7-51 7-58 7-60 7-69 7-72 7-73 7-74 7-77 7-79 7-83 7-86 7-89 7-91 7-92 7-96 7-98 7-101 7-103 7-104 7-105 7-107 7-108 7-110 7-113 7-119 7-122 7-126 7-130 7-138 7-146 7-148 7-150 Floppy Disk Utility ................................................................................... Overview ........................................................................................................................ Floppy Disk Format........................................................................................................ Files ........................................................................................................................ 8.3.1 File Names ...................................................................................................... 8-1 8-1 8-2 8-2 8-2 Section 8 8.1 8.2 8.3 8.4 8.3.2 File Configuration........................................................................................... Floppy Disk Utility Commands...................................................................................... 8.4.1 FILE_COPY ................................................................................................... 8.4.2 FILE_DIRECTORY ....................................................................................... 8.4.3 FILE_DUMP .................................................................................................. 8.4.4 FILE_ERASE ................................................................................................ 8.4.5 FILE_LOAD................................................................................................... 8.4.6 FILE_RENAME ............................................................................................ 8.4.7 FILE_SAVE ................................................................................................... 8.4.8 FILE_TYPE.................................................................................................... 8.4.9 FILE_VERIFY ............................................................................................... 8.4.10 FLOPPY_CHECK.......................................................................................... 8.4.11 FLOPPY_FORMAT....................................................................................... Section 9 9.1 9.2 9.3 9.4 Overview ........................................................................................................................ Host System Interface Modes and Operating Procedures .............................................. 9.2.1 Transparent Mode........................................................................................... 9.2.2 Local Mode..................................................................................................... 9.2.3 Remote Mode.................................................................................................. Data Transfer Control ..................................................................................................... 9.3.1 Control Methods ............................................................................................. 9.3.2 Timeouts ......................................................................................................... Host-System Related Commands ................................................................................... 9.4.1 HOST.............................................................................................................. 9.4.2 LOAD ............................................................................................................. 9.4.3 SAVE.............................................................................................................. 9.4.4 TERMINAL.................................................................................................... 9.4.5 TRANSFER.................................................................................................... 9.4.6 VERIFY.......................................................................................................... 9.4.7 INTFC_LOAD................................................................................................ 9.4.8 INTFC_SAVE ................................................................................................ 9.4.9 INTFC_TRANSFER ...................................................................................... 9.4.10 INTFC_VERIFY ............................................................................................ Section 10 10.1 10.2 Data Transfer from Host System Connected by RS-232C Interface .............................................................................. 8-3 8-4 8-5 8-8 8-10 8-13 8-15 8-17 8-18 8-20 8-21 8-23 8-24 9-1 9-1 9-2 9-2 9-3 9-5 9-7 9-7 9-7 9-8 9-9 9-12 9-16 9-19 9-21 9-25 9-28 9-31 9-33 9-35 Data Transfer from Host System Connected by LAN Interface ...................................................................................... 10-1 Overview ........................................................................................................................ LAN Data Transfer ......................................................................................................... 10.2.1 Setting the Data Transfer Environment .......................................................... 10.2.2 Data Transfer .................................................................................................. 10.2.3 Notes on FTP Interface .................................................................................. 10-1 10-3 10-3 10-4 10-4 10.3 LAN Commands............................................................................................................. 10.3.1 ASC................................................................................................................. 10.3.2 BIN ................................................................................................................. 10.3.3 BYE ................................................................................................................ 10.3.4 CD................................................................................................................... 10.3.5 CLOSE............................................................................................................ 10.3.6 FTP ................................................................................................................. 10.3.7 LAN ................................................................................................................ 10.3.8 LAN_HOST.................................................................................................... 10.3.9 LAN_LOAD ................................................................................................... 10.3.10 LAN_SAVE.................................................................................................... 10.3.11 LAN_TRANSFER.......................................................................................... 10.3.12 LAN_VERIFY................................................................................................ 10.3.13 LS.................................................................................................................... 10.3.14 OPEN.............................................................................................................. 10.3.15 PWD ............................................................................................................... 10.3.16 STA................................................................................................................. 10.3.17 LOGOUT........................................................................................................ Section 11 11.1 11.2 11.3 Data Transfer between E7000PC and IBM PC ................................ Overview ........................................................................................................................ E7000PC and IBM PC System Connection.................................................................... E7000PC-Related Data Transfer Commands ................................................................. 11.3.1 LOAD ............................................................................................................. 11.3.2 SAVE.............................................................................................................. 11.3.3 VERIFY.......................................................................................................... 10-5 10-6 10-7 10-8 10-9 10-10 10-11 10-13 10-14 10-18 10-22 10-23 10-25 10-27 10-28 10-30 10-31 10-32 11-1 11-1 11-1 11-3 11-4 11-7 11-9 Section 12 12.1 12.2 Error Messages .......................................................................................... 12-1 E7000 Error Messages.................................................................................................... 12-1 IBM PC Interface Software Error Messages .................................................................. 12-12 Appendix A Emulator External Dimensions and Weight ...................................... A-1 Appendix B Memory Map .............................................................................................. B-1 Appendix C ASCII Codes............................................................................................... C-1 Figures Part I E7000 Guide 1-1 2-1 2-2 2-3 2-4 2-5 2-6 2-7 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 3-10 3-11 3-12 3-13 3-14 3-15 3-16 3-17 4-1 B-1 B-2 B-3 B-4 B-5 B-6 B-7 B-8 H8/3048-Series, H8/3048F E7000 Emulator.................................................................. E7000 Emulator Hardware Components ....................................................................... E7000 Emulator Station Front Panel ............................................................................. E7000 Emulator Station Rear Panel .............................................................................. E7000 Emulator Pod ...................................................................................................... E7000 Emulator Software Components ........................................................................ System Configuration Using LAN Interface ................................................................. System Configuration Using RS-232C Interface .......................................................... E7000 Preparation Flow Chart ...................................................................................... Connecting Station-Pod Interface Cables to Emulator Station ...................................... Connecting Station-Pod Interface Cables to Emulator Pod ........................................... Connecting External Probe ............................................................................................ Installing Crystal Oscillator............................................................................................ Connecting System Ground ........................................................................................... Connecting Frame Ground ............................................................................................ Console Interface Switches ............................................................................................ Ethernet Interface ........................................................................................................... Cheapernet Interface ...................................................................................................... Connection in Stand-Alone Mode ................................................................................. Connection in Transparent Mode .................................................................................. Connection in Local Mode ............................................................................................ Connection in Remote Mode ......................................................................................... Printer Connection ......................................................................................................... Power-On Procedure for LAN Interface ........................................................................ Power-On Procedure for RS-232C Interface ................................................................. Program Execution Flow ............................................................................................... Console Connector Pin Locations ................................................................................. Host System Connector Pin Locations .......................................................................... Printer Cable Connector Pin Layouts ............................................................................ Data Output Timing ....................................................................................................... LAN Connector Pin Locations ...................................................................................... Console to E7000 Wiring .............................................................................................. Host System to E7000 Wiring ....................................................................................... Host System Wiring (Using Other Cable) ..................................................................... 1-2 2-1 2-2 2-3 2-5 2-8 2-9 2-10 3-1 3-2 3-3 3-4 3-5 3-7 3-7 3-9 3-14 3-15 3-16 3-16 3-17 3-18 3-18 3-19 3-23 4-18 B-1 B-2 B-3 B-4 B-5 B-6 B-7 B-7 Part II E7000PC Guide 1-1 2-1 2-2 2-3 2-4 2-5 2-6 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 3-10 3-11 3-12 3-13 4-1 H8/3048-Series, H8/3048F E7000PC Emulator............................................................. E7000PC Emulator Hardware Components .................................................................. E7000PC Emulator Station Front Panel ........................................................................ E7000PC Emulator Station Rear Panel ......................................................................... E7000PC Emulator Pod ................................................................................................. E7000PC Emulator Software Components ................................................................... E7000PC Emulator System Configuration .................................................................... E7000PC Preparation Flow Chart ................................................................................. Connecting Station-Pod Interface Cables to Emulator Station ...................................... Connecting Station-Pod Interface Cables to Emulator Pod ........................................... Connecting External Probe ............................................................................................ Installing Crystal Oscillator............................................................................................ Connecting System Ground ........................................................................................... Connecting Frame Ground ............................................................................................ Memory Areas Allocatable for the IBM PC Interface Board ........................................ Switches on the IBM PC Interface Board ...................................................................... Installing IBM PC Interface Board ................................................................................ Connecting IBM PC Interface Board to E7000PC Emulator Station ............................ E7000PC System Disk ................................................................................................... Power-On Procedure for the E7000PC .......................................................................... Program Execution Flow ............................................................................................... 1-2 2-1 2-2 2-3 2-5 2-8 2-9 3-1 3-2 3-3 3-4 3-5 3-7 3-7 3-9 3-10 3-12 3-13 3-14 3-16 4-16 Part III Emulator Function Guide 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 1-11 1-12 1-13 1-14 1-15 1-16 1-17 Cycle Reset Mode .......................................................................................................... Trigger Signal Output Timing ....................................................................................... Transition to Parallel Mode ........................................................................................... Parallel Mode ................................................................................................................. Break with Address Bus Value ...................................................................................... Break with Data Bus Value ........................................................................................... Break with Read/Write .................................................................................................. Multibreak Function ...................................................................................................... Break with External Interrupt ........................................................................................ Break with NOT Condition ........................................................................................... Break with the Number of Times Break Condition is Satisfied .................................... Break with Delay Count Specification .......................................................................... Break with Sequential Specification .............................................................................. Break Timing ................................................................................................................. Normal Break (PC Break) ............................................................................................. Sequential Break ............................................................................................................ Sequential Break (with Reset Point Specification) ........................................................ 1-10 1-11 1-12 1-13 1-16 1-16 1-17 1-18 1-19 1-20 1-21 1-21 1-22 1-23 1-24 1-25 1-26 1-18 1-19 1-20 1-21 1-22 1-23 1-24 1-25 1-26 1-27 1-28 1-29 1-30 1-31 1-32 4-1 4-2 4-3 4-4 4-5 5-1 7-1 7-2 8-1 8-2 9-1 9-2 9-3 9-4 9-5 10-1 11-1 11-2 A-1 A-2 B-1 B-2 B-3 B-4 External Probe Trace Signal Example ........................................................................... Free Trace Execution ..................................................................................................... Subroutine Trace Specification ...................................................................................... Trace Acquisition Condition Specification ................................................................... Trace Stop Condition Specification ............................................................................... Subroutine Display ........................................................................................................ Normal Mode Time Measurement Range ..................................................................... Time Interval Measurement Mode 1 ............................................................................. Time Interval Measurement Mode 2 ............................................................................. Pulse Output Timing ...................................................................................................... Allowable Operating Range of Emulator ....................................................................... Boot-Mode Flowchart .................................................................................................... User Program Mode Flowchart ..................................................................................... Assembly Function ........................................................................................................ Label Name Definition .................................................................................................. Basic Bus Cycle Timing in Expanded Mode ................................................................. 1-Wait Inserted Bus Cycle Timing ................................................................................ DRAM Read/Write Cycle Timing (2WE Mode)............................................................ DRAM Refresh Cycle Timing (2WE Mode).................................................................. User Interface Circuit .................................................................................................... Troubleshooting PAD .................................................................................................... Emulation Command Description Format...................................................................... Display Range Specified by Instruction Pointers .......................................................... Record Format ............................................................................................................... Format of Floppy Disk Utility Command Description .................................................. Configuration and Data Transfer in Transparent Mode ................................................ Configuration and Data Transfer in Local Mode .......................................................... Configuration and Data Transfer in Remote Mode ....................................................... Format of Host-System Related Command Description ............................................... TERMINAL Command Processing ............................................................................... Format of LAN Command Description ......................................................................... Flow of Data Transfer .................................................................................................... Format of E7000PC-Related Data Transfer Command Description ............................. E7000 External Dimensions and Weight ....................................................................... E7000PC External Dimensions and Weight .................................................................. H8/3048 Memory Map After Reset................................................................................ H8/3047 Memory Map After Reset ............................................................................... H8/3044 Memory Map After Reset................................................................................ H8/3048F Memory Map After Reset ............................................................................. 1-29 1-30 1-31 1-32 1-33 1-34 1-36 1-36 1-37 1-39 1-45 1-46 1-47 1-51 1-55 4-2 4-2 4-3 4-4 4-5 5-9 7-3 7-131 8-3 8-4 9-2 9-3 9-5 9-8 9-19 10-5 11-1 11-3 A-1 A-1 B-2 B-4 B-6 B-8 Tables Part I E7000 Guide 1-1 1-2 1-3 1-4 2-1 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 A-1 B-1 B-2 B-3 B-4 B-5 Environmental Conditions ............................................................................................. E7000 Emulator Station Components ........................................................................... E7000 Emulator Pod Components ................................................................................. Optional Component Specifications .............................................................................. Contents of E7000 System Disk .................................................................................... Console Interface Specifications ................................................................................... Console Interface Switch Settings ................................................................................. Host System Interface Specifications ............................................................................ Ethernet and Cheapernet Specifications ........................................................................ Recommended Transceiver and Transceiver Cable ...................................................... Recommended BNC T-Type Connector and Thin-Wire Cable .................................... E7000 Monitor Commands ............................................................................................ E7000 System Program Initiation Commands .............................................................. 3.5-Inch Floppy Disk Drive Specifications ................................................................... Signal Names and Usage of Console Connector ........................................................... Signal Names and Usage of Host System Connector .................................................... Printer Cable Connector Pin Assignment ...................................................................... Pin Numbers and Signal Names in LAN Connector ..................................................... Pin Numbers and Signal Names in Printer and E7000 .................................................. 1-5 1-6 1-7 1-8 2-7 3-8 3-10 3-11 3-12 3-14 3-15 3-25 3-39 A-1 B-1 B-2 B-3 B-5 B-8 Part II E7000PC Guide 1-1 1-2 1-3 1-4 1-5 2-1 3-1 3-2 3-3 3-4 3-5 3-6 Environmental Conditions ............................................................................................. E7000PC Emulator Station Components ....................................................................... E7000PC Emulator Pod Components ............................................................................ IBM PC Interface Board................................................................................................. Optional Component Specifications .............................................................................. Contents of E7000PC System Disk ............................................................................... IBM PC Interface Board Specifications ........................................................................ Available Interrupts ....................................................................................................... Memory Allocation and Switch Settings ....................................................................... Interrupts and Switch Settings ....................................................................................... E7000PC Monitor Commands ....................................................................................... E7000PC System Program Initiation Commands........................................................... 1-5 1-6 1-7 1-7 1-8 2-7 3-8 3-10 3-11 3-11 3-18 3-19 Part III Emulator Function Guide 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 2-1 3-1 4-1 4-2 7-1 7-2 7-3 7-4 7-5 7-6 7-7 7-8 7-9 7-10 7-11 7-12 7-13 7-14 7-15 7-16 7-17 7-18 7-19 7-20 7-21 7-22 7-23 7-24 7-25 7-26 Differences between the H8/3048 Series and H8/3048F Functions............................... Emulation Functions ...................................................................................................... Floppy Disk Utility Functions ....................................................................................... Host System Interface Functions ................................................................................... Execution Status Display ............................................................................................... Execution Status Display ............................................................................................... User System Power and Clock Status ............................................................................ List of Symbol Attributes .............................................................................................. Assembler Directives ..................................................................................................... Operand Description ...................................................................................................... Differences between the MCU and the Emulator .......................................................... H8/3048-Series, and H8/3048F MCU Operating Modes .............................................. Bus Timing (Reference Value at 5-V and 18-MHz Operation) .................................... Refresh Controller Bus Timing (Reference Value at 5-V and 18-MHz Operation) ...... Emulation Commands ................................................................................................... Display Formats of Symbol Contents ............................................................................ Subcommands for Line Assembly ................................................................................. Relationship between GO Command Option and BREAK_CONDITION1,2,3,4 Command ..................................................... Specifiable Conditions (BREAK_CONDITION1) ....................................................... Specifiable Conditions (BREAK_CONDITION2,3,4) ................................................. Mask Specifications (BREAK_CONDITION1,2,3,4) .................................................. MCU Pin Test ................................................................................................................ Cycle Reset Times ......................................................................................................... Restrictions for Realtime Emulation Modes .................................................................. Causes of GO Command Emulation Termination ......................................................... Execution Status Display ............................................................................................... MEMORY Command Options ...................................................................................... Operating Mode Selection Pin Status and Display ........................................................ Emulation Information Saved with the QUIT Command .............................................. Radix and Input Examples ............................................................................................. Causes of STEP Command Emulation Termination ..................................................... Causes of STEP_OVER Command Emulation Termination ........................................ Symbol Attributes and Related Display Start Columns ................................................ Symbol Attribute Display .............................................................................................. MA Display ................................................................................................................... R/W Display .................................................................................................................. ST Display ..................................................................................................................... VCC Voltage Display ..................................................................................................... Specifiable Conditions (TRACE_CONDITION) .......................................................... Mask Specifications (TRACE_CONDITION) .............................................................. 1-1 1-2 1-7 1-8 1-42 1-43 1-44 1-49 1-53 1-54 2-3 3-1 4-1 4-1 7-1 7-7 7-11 7-17 7-18 7-20 7-23 7-29 7-61 7-62 7-64 7-65 7-84 7-87 7-99 7-101 7-115 7-123 7-127 7-127 7-133 7-133 7-133 7-134 7-140 7-144 7-27 7-28 8-1 8-2 8-3 8-4 8-5 8-6 8-7 9-1 10-1 11-1 12-1 12-2 12-3 12-4 12-5 12-6 12-7 Specifiable Conditions (TRACE_SEARCH) ................................................................ Mask Specifications (TRACE_SEARCH) .................................................................... Floppy Disk Utility Commands ..................................................................................... Floppy Disk Format ....................................................................................................... File Name Specifications ............................................................................................... Wild Card Characters .................................................................................................... Target File Name Short Formats ................................................................................... FILE_DUMP Subcommands ......................................................................................... Rename Short Formats .................................................................................................. E7000 Commands for Host System ............................................................................... LAN Commands ............................................................................................................ E7000PC-Related Data Transfer Commands ................................................................ Emulator Error Messages .............................................................................................. Host I/O Error Codes ..................................................................................................... Floppy Disk I/O Error Codes ......................................................................................... Floppy Disk Error Messages ......................................................................................... LAN I/O Error Messages ............................................................................................... Process Code for LAN I/O Error Messages .................................................................. Interface Software Error Messages ................................................................................ 7-151 7-154 8-1 8-2 8-2 8-3 8-5 8-11 8-17 9-1 10-2 11-1 12-1 12-7 12-8 12-9 12-9 12-11 12-12 Part I E7000 Guide Section 1 Overview This system is an efficient software and hardware development support tool for application systems using the H8/3048 series or H8/3048F microcomputer (abbreviated to MCU) developed by Hitachi, Ltd. The H8/3048 series includes three types of MCUs: H8/3048, H8/3047, and H8/3044. They contain the following components on a single chip: * * * * * * * * * High-speed CPU Internal RAM Internal ROM Timers Serial communication interface (including one channel for smart card interface) Refresh controller DMAC I/O ports A/D and D/A converters The H8/3048F has the same functions as the H8/3048 except that it has flash memory instead of internal ROM. When the E7000 is connected to a user system, it operates in place of the MCU and performs realtime emulation of the user system. Additionally, the E7000 provides functions for efficient software and hardware debugging. The E7000 consists of an emulator station, emulator pod, and user system interface cable, as shown in figure 1-1. The emulator pod should be connected to the user system via the user system interface cable. 1-1 E7000 Station-pod interface cables User system interface cable Emulator pod HITACHI Emulator station Figure 1-1 H8/3048-Series, H8/3048F E7000 Emulator 1-2 The E7000 provides the following features: * Realtime emulation of MCU * A wide selection of emulation commands, promoting efficient system development * Help functions to facilitate command usage without a manual * Efficient debugging enabled by variable break functions and mass-storage trace memory (32 kcycles) * Command execution during emulation, for example: -- Trace data display -- Emulation memory display and modification * Measurement of subroutine execution time and frequency for evaluating the execution efficiency of user programs * An optional LAN board for interfacing with workstations, enabling high-speed downloading (1 Mbyte/min) of user programs The LAN board contains Ethernet* (10BASE5) and Cheapernet (10BASE2) interfaces. Ethernet is a registered trademark of the Xerox Corporation in the United States. Note: Ethernet is a registered trademark of Xerox Corporation. * E7000 graphical user interface software (E7000 GUI: option) can be loaded into the workstation to enable: -- Graphic display operations in a multi-window environment -- Source level debugging -- Graphic display of trace information * Operation as a stand-alone system when connected to a console * An RS-232C host system interface * A Centronics printer interface * A 3.5-inch floppy disk drive, which facilitates: -- Loading, saving, and verifying user programs -- Saving emulation results -- Input and execution of commands using a floppy disk for external storage 1-3 * 512 kbytes of emulation memory as substitute user system memory. An optional 1-Mbyte or 4-Mbyte emulation memory board can also be installed in the emulator station. * By connecting the user system interface and providing a low-voltage power supply of 2.7 to 5.5 V, emulation can be performed in user systems with any supply voltage in the range 2.7 to 5.5 V. 1.1 Warnings Before using the E7000, carefully read the following warnings. If the E7000 is not used correctly, breakdowns may occur. Before System Initiation: 1. Check all components with the component list after unpacking the E7000. 2. Never place heavy objects on the casing. 3. Observe the following conditions in the area where the E7000 is to be used: * Make sure that the internal cooling fans on the sides of the emulator station are at least 20 cm (8") away from walls or other equipment. * Keep out of direct sunlight or heat. Refer to section 1.2, Environmental Conditions. * Use in an environment with constant temperature and humidity. * Protect the E7000 from dust. * Avoid subjecting the E7000 to excessive vibration. Refer to section 1.2, Environmental Conditions. 4. Protect the E7000 from excessive impacts and stresses. 5. Before using the E7000's power supply, check its specifications such as power output, voltage, and frequency. For details on power supply, refer to section 1.2, Environmental Conditions. 6. When moving the E7000, take care not to vibrate or otherwise damage it. Pay special attention to exposed parts such as the power switch and I/O connectors. 7. After connecting the cable, check that it is connected correctly. For details, refer to section 3, Preparation before Use. 8. Supply power to the E7000 and connected parts after connecting all cables. Cables should not be connected or removed when the power is on. 9. For details on differences between the MCU and the E7000, refer to section 2, Differences between the MCU and the Emulator in Part III, Emulator Function Guide. 1-4 Floppy Disk: If the floppy disk is removed when a file is being accessed, the file may be damaged and processing may fail. 1.2 Environmental Conditions Observe the conditions listed in table 1-1 when using the E7000. Table 1-1 Environmental Conditions Item Specifications Temperature Operating: +10 to +35C Storage: -10 to +50C Humidity Operating: 35 to 80% RH (no condensation) Storage: 35 to 80% RH (no condensation) Vibration Operating: 2.45 m/s2 max Storage: 4.9 m/s2 max Transportation: 14.7 m/s2 max AC input power Voltage: 100/200 VAC 10% Frequency: 50/60 Hz Power consumption: 200 VA Ambient gases Must be no corrosive gases 1-5 1.3 Components The E7000 consists of the emulator station and emulator pod. Check all the components after unpacking. 1.3.1 E7000 Emulator Station Table 1-2 E7000 Emulator Station Components Item Configuration Quantity Remarks Hardware Emulator station 1 Power supply, 3.5-inch floppy disk drive, control board, and trace board Station-pod interface cables 2 50 cm Console interface cable 1 3m RS-232C AC power cable 1 E7000 HITACHI Fuse 1 Spare 1 HS7000EST01HE (3 A) Documentation HS7000EST01H Description Notes 1-6 1.3.2 E7000 Emulator Pod Table 1-3 E7000 Emulator Pod Components Item Configuration Quantity Remarks Hardware Emulator pod 1 Fitted with two boards External probe set 1 Signal input: 8 GND: 1 Trigger output: 1 Floppy disks 1 E7000 system program 1 E7000PC system program (cannot be used with the E7000) 1 HS3048EPD70HE Software E7000 E7000PC Documentation H8/3048-series, H8/3048F E7000 Emulator User's Manual 1-7 1.3.3 Options In addition to the emulator station and pod components, the options listed in table 1-4 are also available. Refer to each option manual for details on these optional components. Table 1-4 Optional Component Specifications Item Model Name Specifications LAN board HS7000ELN01H * TCP/IP communications protocol * Ethernet (10BASE5) * Cheapernet (10BASE2) 1-Mbyte emulation memory board HS7000EMS11H 1-Mbyte SRAM is used 4-Mbyte emulation memory board HS7000EMS12H 4-Mbyte SRAM is used QFP-100 user system interface cable HS3042ECH71H For H8/3002, H8/3042 series, H8/3048 series, and H8/3048F (FP-100B) Host system interface cable HS7000EHT71H RS-232C interface Printer cable HS7000EPR71H Centronics interface Bus monitor interface board for E7000 HS7000EXR10H For connecting the E7000 bus monitor board E7000 bus monitor board HS7000EBR01H For installing the D/A converter 1-8 Section 2 Components 2.1 E7000 Hardware Components As shown in figure 2-1, the E7000 consists of an emulator station (including two RS-232C interface cables and a printer cable), an emulator pod, and a user system interface cable. By installing a LAN board (option), the emulator station can be connected to a workstation. To provide additional memory, optional 1-Mbyte and 4-Mbyte SRAM boards are available. The E7000 contains another slot into which you can insert either one of these boards or a bus monitor interface board. Optional 1-Mbyte or 4-Mbyte emulation memory board, or bus monitor interface board LAN board (optional) Centronics printer cable (optional) RS-232C host system interface cable (optional) E7000 RS-232C console interface cable 3.5-inch floppy disk drive Station-pod interface cables HITACHI Emulator pod E7000 emulator station User system interface cable (optioanl) External probe User system Figure 2-1 E7000 Emulator Hardware Components 2-1 2.1.1 Emulator Station Components Front Panel: E7000 2 3 POWER 1 HITACHI Figure 2-2 E7000 Emulator Station Front Panel 1. Power lamp: Lights when the E7000 power is on. 2. 3.5-inch floppy disk drive: For loading the E7000 system program, as well as loading, saving, and verifying the contents of the user system memory. 3. Station-pod interface cable connectors: For connecting the emulator pod to the emulator station. 2-2 Rear Panel: S W I LAN 4 P R I N T E R POWER 8 CRT 5 1 BNC 9 250V 3A 6 2 AC INPUT 3 7 TRACE AC100-120V/ AC200-240V HOST 2A 50/60Hz 13 12 11 10 Figure 2-3 E7000 Emulator Station Rear Panel 1. Power switch: Turning this switch to I (input) supplies power to the E7000 (emulator station and pod). 2. Fuse box: Contains a 3-A 250 VAC fuse. 3. AC power connector: For an 100/200 VAC power supply. 4. Console interface switch: For changing the transfer speed, data bit length, stop-bit length, parity specifications, and LAN interface settings when interfacing with a console. Marked SW1. 5. Printer connector: For a printer conforming to Centronics specifications. Marked PRINTER. 2-3 6. Console connector: For an RS-232C console. Marked CRT. 7. Host system connector: For RS-232C communication with a host system. Marked HOST. 8. Ethernet connector: 9. Cheapernet connector: For a Cheapernet cable. Marked BNC. For an Ethernet cable. Marked LAN. 10. Control board slot: For installing the control board. 11. LAN board slot: For installing the optional LAN board. 12. Emulation memory/bus monitor interface board slot: For installing the optional emulation memory board or bus monitor interface board. 13. Trace board slot: For installing the trace board. 2-4 2.1.2 Emulator Pod Components 2 1 s H S 3 0 4 8 E P D 7 0 H 4 5 (Top view) 3 7 6 (Bottom view) Figure 2-4 E7000 Emulator Pod 1. External probes: Can be used for the following during user system emulation -- Hardware break condition input -- Realtime trace input -- Multibreak detection 2. Trigger output pin: Outputs a low-level pulse in the following states: -- When a hardware break condition is satisfied (whether to break or not can be selected) -- When cycle reset mode is specified with the GO command and an RES signal is input to the MCU 2-5 -- When trigger output is specified with the TRACE_CONDITION command, and the set conditions are satisfied, this pin can be used as the trigger signal of the oscilloscope or the logic analyzer 3. Crystal oscillator installation socket: For installing the crystal oscillator which provides a clock to the MCU. 4. User system interface cable: For connection to the MCU socket on the user system, to enable the E7000 to operate in place of the MCU. 5. Station-pod interface cables: For connecting the emulator station to the emulator pod. 6. User system interface cable connector: For connection of the user system. 7. External probe connector: For connection of the external probe. Note: When a user system interface cable is connected, power supply voltage must be provided from the VCC pin on the user system interface cable to operate the E7000. Therefore, when using the E7000 on its own, be sure to disconnect the user system interface cable. 2-6 2.2 E7000 Software Components The E7000's software components are illustrated in figure 2-5. The emulator pod contains two 3.5inch floppy disks: the E7000 emulator system disk has "E7000" written under "HITACHI" on its label. The system disk files are described in table 2-1. To display the file names, use the FILE_DIRECTORY command. Take care not to erase the following files with the FILE_ERASE command. Table 2-1 Contents of E7000 System Disk File Name Contents Description E7000.SYS E7000 system program Controls the emulator pod and processes commands, such as emulation commands. Loaded into the E7000 memory after the E7000 system program is activated. H8POD348.SYS MCU control program Controls the MCU within the emulator pod. Loaded into the E7000 memory after the E7000 system program is activated. H8CNF348.SYS Configuration file Contains MCU operating mode and MAP information. Loaded with the E7000 system program. LANCNF.SYS LAN configuration file Stores the host system name and IP address information when the E7000 is connected to a workstation by a LAN interface. DIAG.TM Diagnostic program Loaded into the emulator station memory for testing and maintenance. 2-7 E7000 E7000 system program (Provided with the emulator pod) Loadable file types: * S-type files * HEX-type files * SYSROF-type files * Text files HITACHI E7000 graphical user system interface software H-series interface software C compiler Cross assembler Linkage editor Personal computer Workstation (SPARCstation)* 1 Notes: 1. 2. C compiler Cross assembler Linkage editor PC-9801/VM (NEC)* 2 SPARC is a registered trademark of SPARC International, INC. (United States). SPARCstation is a registered trademark of SPARC International, INC. (United States) and has permission of monopolistic use granted by Sun Microsystems Corporation (United States). PC-9801/VM is a registered trademark of NEC Corporation. Figure 2-5 E7000 Emulator Software Components 2-8 2.3 System Configuration The E7000 can be connected with the host system via a LAN or an RS-232C interface. 2.3.1 System Configuration Using LAN Interface By installing an optional LAN board in the emulator station, the E7000 can be connected to a workstation through a LAN interface. The LAN interface employs the TCP/IP protocol and the LAN board contains connectors for both Cheapernet (10BASE2) and Ethernet (10BASE5). The system configuration using a LAN interface is shown in figure 2-6. Cheapernet Interface Ethernet Interface E7000 emulator E7000 emulator BNC BNC LAN LAN Workstation Workstation Figure 2-6 System Configuration Using LAN Interface Cheapernet Interface: This is achieved by connecting a coaxial cable (referred to as the Cheapernet thin-wire cable) between the BNC connector in the LAN board and the workstation. Ethernet Interface: This is achieved by connecting transceivers and transceiver cables between the D-SUB connector in the LAN board and the workstation. 2-9 2.3.2 System Configuration Using RS-232C Interface Using an RS-232C interface, the E7000 system can be configured in any of the ways shown in figure 2-7. Stand-Alone Mode Transparent Mode Console Console E7000 E7000 CRT CRT HOST HOST PRINTER PRINTER Host system Printer Printer Local Mode Remote Mode Personal computer Console E7000 Interface software E7000 CRT CRT HOST HOST PRINTER Personal computer, EPROM programmer, etc. PRINTER Printer Printer Figure 2-7 System Configuration Using RS-232C Interface 2-10 Stand-Alone Mode: Configuration in which the E7000 is connected to the console and operates alone. Transparent Mode: Configuration in which the console connected to the E7000 can also serve as a console for the host system. The console allocation is switched using the TERMINAL command. Local Mode: Configuration which allows data transfer between the E7000 and a personal computer. In this mode, data can be sent using the standard commands of the personal computer. This configuration can also be used to connect to an EPROM programmer. Remote Mode: Configuration in which a personal computer can be used as the console or the host machine for data transfer. Interface software must be loaded in the personal computer. 2-11 Section 3 Preparation before Use 3.1 E7000 Preparation Unpack the E7000 and prepare it for use as follows: Reference Unpack the E7000 Check the components against the component list Component list Install the optional LAN board, Each board's user's manual emulation memory board, or bus monitor interface board Connect the emulator pod to the emulator station Section 3.2.1 Connect the external probe Section 3.2.2 Connect the user system interface cable Each user system interface cable manual Install the crystal oscillator Section 3.2.3 Connect the system ground Section 3.2.4 LAN interface Transparent or local mode Stand-alone or remote mode Connect the console interface cable Section 3.3.1 Connect the console interface cable Section 3.3.1 Connect the console interface cable Section 3.3.1 Set the console interface switches Section 3.3.2 Set the console interface switches Section 3.3.2 Set the console interface switches Section 3.3.2 Connect with the LAN interface Section 3.3.5 Connect the host Section system interface cable 3.3.3 Connect the printer cable Section 3.3.4 Connect the printer cable Section 3.3.4 Power-on Section 3.4 Figure 3-1 E7000 Preparation Flow Chart 3-1 3.2 E7000 Connection 3.2.1 Connecting Emulator Pod The emulator pod and the emulator station are packed separately. Use the following procedure to connect the emulator pod to the emulator station, or to disconnect it when moving the E7000: (1) Check that the E7000 power is off by ensuring that the power lamp on the left side of the emulator station front panel is extinguished. (2) Remove the AC power cable for the emulator station from the outlet. (3) Connect station-pod interface cables P1 and P2 to station-pod interface connectors J1 and J2 on the right side of the emulator station, respectively. Insert the longer screw of each cable to the connector screw hole without a spacer, and the shorter screw to the hole with a spacer. Tighten the longer screw first until the shorter screw reaches the spacer, then alternately tighten the longer and shorter screws. Figure 3-2 shows how to connect the station-pod interface cables to the emulator station. Note: When connecting the cables, prevent the upper or lower side of the cables from lifting off the connector. Tighten the screws and push the cables gradually toward the connector. Station-pod interface connector J2 J2 Spacers J1 Station-pod interface connector J1 Emulator station right side Longer screws Station-pod interface cable P1 Station-pod interface cable P2 Figure 3-2 Connecting Station-Pod Interface Cables to Emulator Station 3-2 (4) Connect station-pod interface cables P1 and P2 to station-pod interface connectors J1 and J2, respectively, in the same way as connection to the emulator station. Tighten the screws in the same way as in step (3). See figure 3-3 for details. Pod Station-pod interface connector J1 J1 Station-pod interface connector J2 J2 Spacers Station-pod interface cable P1 Station-pod interface cable P2 Longer screws Figure 3-3 Connecting Station-Pod Interface Cables to Emulator Pod 3-3 3.2.2 External Probe Connector When an external probe is connected to the emulator pod, it enables external signal trace, break using an external signal, and multibreak detection. Figure 3-4 shows the external probe connection. External probe connector Cover External probe Bottom of emulator pod Figure 3-4 Connecting External Probe 1. Slide back the cover on the bottom of the emulator pod. 2. Insert the external probe into the external probe connector, making sure they are aligned correctly. For connecting a user system interface cable, refer to the user system interface cable manual. 3-4 3.2.3 Clock Selection Three types of clocks are supported; a crystal oscillator signal from the emulator pod, an external clock from the user system, and the E7000 emulator internal clock. Each clock type is specified with the CLOCK command. X (crystal oscillator) U (user system clock) E7000 emulator internal clock CLOCK command 13 (13 MHz) 18 (18 MHz) Crystal Oscillator: Using this function, a user program can be executed with user system operating frequency without connecting the user system. A crystal oscillator is not provided with the E7000. Use one with the same frequency as the user system (o clock). The frequency of the crystal oscillator used as the MCU input clock is 8 to 18 MHz. To use a frequency outside this range, supply an external clock from the user system. Install the crystal oscillator using the following procedure: 1. Check that the E7000 power is turned off. 2. Install the crystal oscillator into the crystal oscillator socket on the side of the emulator pod (figure 3-5). 3. After turning on the E7000, specify X with the CLOCK command. Cover XTAL Bottom of emulator pod Figure 3-5 Installing Crystal Oscillator 3-5 User System Clock: Specify a user system clock using the following procedure. 1. Check that the E7000 power is off. 2. Supply a TTL-level clock through the EXTAL pin at the end of the user system interface cable. 3. After turning on the E7000 power, specify U with the CLOCK command. E7000 Emulator Internal Clock: Specify 13 (13 MHz) or 18 (18 MHz) with the CLOCK command. Note: When the emulator system program is initiated, the emulator automatically selects the MCU clock source according to the following priority. 1. U (user system clock) when supplied from the user system. 2. X (crystal oscillator) when installed in the emulator pod. 3. 13-MHz E7000 emulator internal clock. 3-6 3.2.4 Connecting System Ground The E7000's signal ground is connected to the user system's signal ground via the emulator pod. In the emulator station, the signal ground and frame ground are connected (figure 3-6). At the user system, connect the frame ground only; do not connect the signal ground to the frame ground. If it is difficult to separate the signal ground from the 100-V frame ground, ground the user system at the same outlet as the E7000's power supply (figure 3-7). Signal line Emulator station Emulator pod Signal line User system Logic Power Signal ground Signal ground Frame ground Figure 3-6 Connecting System Ground E7000 power cable User system power cable Outlet Ground AC power supply Figure 3-7 Connecting Frame Ground The user system must be connected to an appropriate ground so as to minimize noise, ground loops, and other adverse effects. Confirm that the ground pins of the user system interface cable are firmly connected to the user system's ground. 3-7 3.3 System Connection This section describes how to connect the E7000 to a workstation, personal computer, console, and printer. Connectors for each of these are located on the emulator station as shown in figure 2-3. 3.3.1 Connecting to a Console The console connector (marked CRT) located on the emulator station rear panel conforms to the RS-232C specifications (table 3-1). A console can be connected to this by the console interface cable supplied with the E7000, making it possible to input commands and check their results on the console. This connection is also used to specify the IP address before connecting a workstation via the LAN interface. Table 3-1 Console Interface Specifications Item Specification Signal level RS-232C High: +5 to +15 V Low: -5 to -15 V Transfer rate 2400/4800/9600/19200 bps Synchronization method Asynchronous method Start bits 1 bit Data bits 7/8 bits Stop bits 1/2 bits Parity Even/odd or none Control method X-ON/X-OFF control (Refer to 9.3.1, Control Methods, in Part III, Emulator Function Guide.) bps: Bits per second For the console connector pin assignment and signal names, refer to section B.1, Console Connector. For console interface cable connection, refer to section B.5, Console Interface Cable Connection. 3-8 3.3.2 Setting up Console Interface The transfer rate, number of data bits, number of stop bits, and parity can be changed using the console interface switches (SW1) on the emulator station rear panel. One of these switches selects either the console interface or LAN interface. Eight console interface switches (S1 to S8) are arranged as shown in figure 3-8. When a switch is pushed to the right, it turns on, and when it is pushed to the left, it turns off. 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7 8 S8 (a) On (b) Off SW1 Figure 3-8 Console Interface Switches The console interface settings are changed by turning these switches on or off as shown in table 3-2. 3-9 Table 3-2 Console Interface Switch Settings Transfer rate Transfer Rate S1 S2 S3 19200 bps On On Off 9600 bps Off On Off* 4800 bps On Off Off 2400 bps Off Off Off Number of stop bits Stop Bits S4 1 bit Off* 2 bits On Number of data bits Data Bits S5 7 bits Off 8 bits On* Parity Parity S6 None Off* Even/odd On Even/odd parity (only valid if parity switch is on) Parity S7 Even Off* Odd On Console/LAN interface selection Interface S8 Console Off* LAN On Note: * indicates setting at shipment. 3-10 3.3.3 Connecting to a Host System This section describes how to set the host system interface when the E7000 is connected to a host system such as a personal computer or EPROM programmer. The host system connector (marked HOST) located on the emulator station rear panel conforms to the RS-232C specifications (table 3-3). Connecting a host system to this connector enables data transfer between the E7000 and the host system. Table 3-3 Host System Interface Specifications Item Specifications Signal level RS-232C High: +5 to +15 V Low: -5 to -15 V Transfer rate 2400/4800/9600/19200/38400 bps Synchronization method Asynchronous method Start bits 1 bit Data bits 7/8 bits Stop bits 1/2 bits Parity Even/odd or none Control method X-ON/X-OFF control, RTS/CTS control bps: Bits per second Host System Interface Settings at E7000 Start-Up: When the E7000 is turned on, or when the E7000 system program is initiated, the host system interface settings are determined by the console interface switches in the same way as the console interface (control method will be X-ON/X-OFF control). For details, refer to section 9.3.1, Control Methods, in Part III, Emulator Function Guide. Changing Host System Interface Settings: The transfer rate, number of data bits, number of stop bits, parity, and control method can be changed with the HOST command. For details, refer to section 9.4.1, HOST, in Part III, Emulator Function Guide. For the host system connector pin assignments and signal names, refer to section B.2, Host System Connector. For connection of optional host system interface cable, refer to section B.6, Host System Interface Cable Connection. 3-11 3.3.4 Connecting to a Printer The printer connector (marked PRINTER) is located on the emulator station rear panel. Connecting a printer to this connector enables the command execution results to be printed. The printer interface conforms to the Centronics specifications. For the printer connector pin assignments and signal names, refer to section B.3, Printer Connector. For connection of the optional printer cable, refer to section B.7, Printer Cable Connection. 3.3.5 Connecting to a LAN Interface The LAN board for the E7000 supports Ethernet (10BASE5) and Cheapernet (10BASE2) interfaces conforming to Ethernet specifications V.2.0. The LAN board communicates with a workstation according to the TCP/IP protocol, and the workstation transfers files and commands according to the FTP/TELNET protocol. The LAN board specifications at each layer of the OSI model are as follows. Physical and Data Link Layers: The LAN board communicates with Ethernet and Cheapernet. Table 3-4 shows the Ethernet and Cheapernet specifications. Table 3-4 Ethernet and Cheapernet Specifications Item Ethernet Cheapernet Transfer rate 10 Mbits/second 10 Mbits/second Maximum distance between segments 500 m 185 m Maximum network length 2500 m 925 m Maximum nodes in one segment 100 30 Minimum distance between nodes 2.5 m 0.5 m Network cable Diameter: 0.4 inch (1.02 cm) 50- shielded coaxial cable Diameter: 0.25 inch (0.64 cm) 50- coaxial cable (RG-58A/U) Network connector N-type connector BNC connector Transceiver cable Diameter: 0.38 inch (0.97 cm) Ethernet cable to be connected to 15-pin D-SUB connector 3-12 Network Layer: * IP (Internet Protocol) -- Transmits and receives data in datagram format. -- Does not support IP options. -- Does not have subnet mask functions. -- Does not support broadcast communications. * ICMP (Internet Control Message Protocol) Supports only echo reply functions. * ARP (Address Resolution Protocol) Calculates Ethernet addresses from IP addresses by using broadcast communications. Transport Layer: * TCP (Transmission Control Protocol) Logically connects the E7000 to the workstation. * UDP (User Diagram Protocol) Not supported. Session, Presentation, and Application Layers: * FTP (File Transfer Protocol) The E7000 operates as a client. * TELNET (Teletype Network) The E7000 operates as a server. Note: The E7000 does not communicate through routers or gateways. 3-13 3.3.6 System Connection Examples Some examples of system configuration are shown below. Ethernet Interface: The LAN board has a 15-pin D-SUB connector for the Ethernet transceiver cable. Figure 3-9 shows an example of Ethernet system configuration. Use commercially available Ethernet transceivers and transceiver cables. Table 3-5 shows a recommended transceiver and transceiver cable. Ethernet transceivers LAN board Ethernet S W I LAN P R I N T E R POWER CRT 250V 3A BNC Ethernet transceiver cable AC INPUT TRACE AC100-120V/ AC200-240V HOST 2A 50/60Hz Workstation Emulator station rear panel Figure 3-9 Ethernet Interface Table 3-5 Recommended Transceiver and Transceiver Cable Item Product Type Manufacturer Transceiver HBN-200 series Hitachi Cable, Ltd. Transceiver cable HBN-TC-100 Hitachi Cable, Ltd. For setting up Ethernet, refer to the LAN board user's manual. 3-14 Cheapernet Interface: The LAN board of the E7000 has a transceiver and a BNC connector for Cheapernet interface. Figure 3-10 shows an example of Cheapernet system configuration. Use a commercially available Cheapernet BNC T-type connector with a characteristic impedance of 50 and an RG-58A/U thin-wire cable or its equivalent. Table 3-6 shows a recommended BNC T-type connector and thin-wire cable. LAN board Cheapernet thin-wire cable Cheapernet BNC T-type connentor S W I LAN P R I N T E R POWER CRT 250V 3A BNC AC INPUT TRACE AC100-120V/ AC200-240V HOST 2A 50/60Hz Workstation Emulator station rear panel Figure 3-10 Cheapernet Interface Table 3-6 Recommended BNC T-Type Connector and Thin-Wire Cable Item Product Type Manufacturer BNC T-type connector HBN-TA-JPJ Hitachi Cable, Ltd. Thin-wire cable HBN-3D2V-LAN Hitachi Cable, Ltd. For setting up Cheapernet, refer to the LAN board user's manual. 3-15 Stand-Alone Mode: A console is connected to the E7000 as shown in figure 3-11. Console P R I N T E R LAN Console connector POWER CRT 250V 3A BNC AC INPUT Console interface cable (supplied) TRACE AC100-120V/ AC200-240V HOST 2A 50/60Hz Emulator station rear panel Figure 3-11 Connection in Stand-Alone Mode Transparent Mode: A console and host system are connected to the E7000 as shown in figure 3-12. Console LAN P R I N T E R Console connector POWER CRT 250V 3A BNC Host system connector AC INPUT Console interface cable (supplied) TRACE Host system AC100-120V/ AC200-240V HOST 2A 50/60Hz Emulator station rear panel Host system interface cable (option) Figure 3-12 Connection in Transparent Mode 3-16 Local Mode: A console and host system are connected to the E7000 as shown in figure 3-13. Console LAN P R I N T E R Console connector POWER CRT 250V 3A BNC Host system connector AC INPUT Console interface cable (supplied) TRACE AC100-120V/ AC200-240V HOST 2A 50/60Hz Emulator station rear panel Host system interface cable (option) Host system (Personal computer, EPROM programmer) Figure 3-13 Connection in Local Mode 3-17 Remote Mode: A host system is connected to the E7000 as shown in figure 3-14. The control method in remote mode is X-ON/X-OFF. Interface software S W I Host system (Personal computer) LAN P R I N T E R Console connector POWER CRT 250V 3A BNC AC INPUT Console interface cable (supplied) AC100-120V/ AC200-240V TRACE HOST 2A 50/60Hz Emulator station rear panel Figure 3-14 Connection in Remote Mode Printer: A printer is connected to the E7000 as shown in figure 3-15. Printer connector S W I LAN Printer P R I N T E R POWER CRT 250V 3A Printer cable (option) BNC AC INPUT TRACE AC100-120V/ AC200-240V HOST 2A 50/60Hz Emulator station rear panel Figure 3-15 Printer Connection 3-18 3.4 Power-On Procedure for the E7000 The E7000 power-on procedure differs in each system configuration. Power on the E7000 in the appropriate way for the system configuration, as shown below. 3.4.1 Power-On Procedure for LAN Interface Figure 3-16 shows the power-on procedure when the LAN interface is used. (1) Check that no floppy disk is inserted. (2) Turn off (to the left) S8 in SW1 on the emulator station rear panel. (3) Power on the console connected to the E7000. (4) Power on the emulator station. Internal system test is executed. (5) Console messages are displayed. Test result OK? No Yes (6) E7000 monitor command input wait state (6) Error message is displayed. (7) Specify L to set the IP address of the emulator station. (8) Insert the system floppy disk into the floppy disk drive of the emulator station. See section 5, Troubleshooting in Part III, Emulator Function Guide. (9) Select S or R. When the E7000 enters command wait state and displays a colon (:), enter the LAN_HOST command. (10) Specify host names and IP addresses. (11) After storing the host names and IP addresses to the LANCNF.SYS file, terminate the system software execution. (12) Turn off the emulator station. Host system connection mode? Only workstation used Console also connected (13) Turn on (to the right) S8 in SW1 on the emulator station rear panel. (13) Turn off (to the left) S8 in SW1 on the emulator rear panel. (14) Power on the emulator station. Figure 3-16 Power-On Procedure for LAN Interface 3-19 The following describes the power-on procedure shown in figure 3-16. Steps (1) to (7): The optional LAN board supports the TCP/IP protocol. When the host system is connected to the E7000 with the LAN interface, the IP address (internet address) of the E7000 must be specified. To specify the address, turn off console interface switch S8 in switch set SW1 on the emulator station rear panel, and connect the E7000 to a console with the console interface cable supplied with the E7000. Check that no floppy disk is in the floppy disk drive. Turn on the power at the emulator station rear panel. The console displays the following messages and the E7000 waits for command input. E7000 MONITOR Vn.m Copyright (C) 19xx Hitachi, Ltd. Licensed Material of Hitachi, Ltd. TESTING RAM 0123 ** E7000 SYSTEM LOADING ** *** FD NOT READY START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T) ? _ After the above messages are displayed, press L and then the (RET) key. The E7000 prompts IP address input. The 32-bit IP address, which is generally expressed in hexadecimal, is displayed in four bytes in decimal. For example, when the IP address has been specified as H'80000001 (H' represents hexadecimal), the E7000 will display the address as follows: : IP ADDRESS = 128.0.0.1 _ Enter the IP address. For example, to specify H'80000002, enter as follows: : IP ADDRESS = 128.0.0.1 128.0.0.2 (RET) After entering the IP address, press the (RET) key. The console will display a message, which shows that IP address specification has been completed. 3-20 The host system name and IP address of the E7000 must be specified in the network database for the host system. When the host system uses UNIX*, the host name and IP address should generally be specified in the /etc/hosts file. For details, refer to the host system user's manual. Note: UNIX is a registered trademark of UNIX System Laboratories, Inc. Steps (8) to (12): To transfer data between the host system and the E7000, initiate the FTP server to connect the host system to the E7000. Before the FTP server is initiated, the host name and the IP address of the host system must be stored in the LANCNF.SYS file in the E7000 system disk. The following describes how to specify the host name and IP address. Insert the E7000 system disk into the floppy disk drive of the emulator station and enter S or R to initiate the system program while messages are displayed on the console. The system disk must be write-enabled. When the E7000 prompts for input with a colon (:), enter the LAN_HOST command. : LAN_HOST; S (RET) When the LAN_HOST command is entered, the following message is displayed on the console. NO 01 xxxxxx 03 xxxxxx 05 xxxxxx 07 xxxxxx 09 xxxxxx PLEASE SELECT NO ? _ xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx NO 02 04 06 08 xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx Up to nine pairs of host names and IP addresses can be specified. Input a number from 1 to 9. PLEASE SELECT NO ? 1 (RET) The E7000 prompts for the host name. Enter a name with six characters. 01 HOST NAME xxxxxx (RET) After that, the E7000 prompts for the IP address. Enter the IP address in decimal. 01 IP ADDRESS xxxxxx (RET) 3-21 After the IP address has been specified, the E7000 will prompt for another selection number. When connecting more than one host system, continue specifying the host names and IP addresses. To terminate input, enter as follows: PLEASE SELECT NO ? . (RET) After (RET) is entered, the E7000 enters overwrite confirmation wait state. To store the host names and IP addresses, enter as follows: OVER WRITE(Y/N) ? Y (RET) The specified host names and IP addresses are stored in the LANCNF.SYS file in the E7000 system disk. Once they have been stored, remove the system disk from the floppy disk drive, set write protection to the disk, and then turn off the E7000. Steps (13) and (14): The host system can be connected to the E7000 in the following two modes. * Only workstation is used The TELNET server is used. -- Turn on (to the right) SW1-S8 on the emulator station rear panel. -- Power on the E7000. -- Execute the TELNET command on the workstation. Note: After initiating the E7000, enter as follows to cancel local echo on the workstation: (CTRL) +] telnet>mode character (RET) Some workstations sometimes do not accept (CTRL) + S or (CTRL) + Q key input. In this case, when the TELNET supports a toggle localflow function, specify it. * Console connected in addition to workstation The console is connected to the RS-232C connector on the emulator station. -- Turn off (to the left) SW1-S8 on the emulator station rear panel. -- Power on the console. -- Power on the E7000. After the system program is initiated, the FTP server can be initiated from the console. For operations after power-on, refer to section 3.5.1, E7000 Monitor Initiation, section 3.6, Floppy Disk Backup, and section 3.7, E7000 System Program Initiation. 3-22 3.4.2 Power-On Procedure for RS-232C Interface Figure 3-17 shows the power-on procedure when the RS-232C interface is used. Stand-alone, transparent, or local mode Remote mode (1) Check that no floppy disk is inserted. (1) Check that no floppy disk is inserted. (2) Turn off (to the left) S8 in SW1 on the emulator station rear panel. (2) Turn off (to the left) S8 in SW1 on the emulator station rear panel. (3) Initiate the interface software on the host system. (3) Power on the console connected to the E7000. Refer to the interface software manual. (4) Power on the emulator station. Internal system test is executed. (5) Console messages are displayed. Test result OK? No Yes (6) E7000 monitor command input wait state (6) Error message is displayed. See section 5, Troubleshooting in Part III, Emulator Function Guide. Figure 3-17 Power-On Procedure for RS-232C Interface For operations after power-on, refer to section 3.5.1, E7000 Monitor Initiation, section 3.6, Floppy Disk Backup, and section 3.7, E7000 System Program Initiation. 3-23 3.5 E7000 Monitor Commands 3.5.1 E7000 Monitor Initiation The E7000 supports the six monitor commands listed in table 3-7. These commands load the E7000 system program or diagnostic program, format or back up floppy disks, and set an IP address. When the E7000 is turned on, it displays the following message and waits for the monitor command input. Enter a command to be executed (table 3-7). If the system disk is inserted when the E7000 is turned on, the E7000 automatically loads the system program without entering the command input wait state. When the E7000 is turned on without the system floppy disk, the following messages are displayed. Console Messages: E7000 MONITOR Vn.m Copyright (C) 19xx Hitachi, Ltd. (a) Licensed Material of Hitachi, Ltd. TESTING RAM 0123 ** E7000 SYSTEM LOADING *** FD NOT READY (b) ** (c) START E7000 S:START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T) ? _ (d) Descriptions: (a) E7000 monitor start message. Vn.m is the E7000 monitor's version number. If this message is not displayed, determine what is wrong by reading section 5, Troubleshooting, in Part III, Emulator Function Guide. (b) The E7000 internal system is being tested. A number from 0 to 3 is displayed when each of the four MCU internal RAM blocks has been tested. If an error occurs, the following messages are displayed: *** RAM ERROR ADDR = xxxxxxxx W-DATA = xxxxxxxx R-DATA = xxxxxxxx *** xxxxx REGISTER ERROR W-DATA = xxxx R-DATA = xxxx 3-24 If these messages are displayed, refer to section 5, Troubleshooting, in Part III, Emulator Function Guide. (c) E7000 system program load message. Because the system floppy disk is not inserted, *** FD NOT READY is displayed. (d) List of E7000 monitor commands. Enter the required command at the cursor position. These commands are described in table 3-7. When a B, F, or L command is specified, the E7000 will prompt for another command after execution is completed. The QUIT command ends the system program execution and returns the E7000 monitor to command input wait state. Table 3-7 E7000 Monitor Commands Command Function Reference Section S E7000 system program initiation Initiates the system program. When the system program has not been loaded, loads it from the floppy disk and then initiates the system. Section 3.7, E7000 System Program Initiation R E7000 system program reload Loads and initiates a different system program from the loaded system program. Section 3.7, E7000 System Program Initiation B Floppy disk backup and verification Backs up or verifies a floppy disk. Section 3.6.2, Floppy Disk Backup and Verification F Floppy disk format Formats a floppy disk. Section 3.6.1, Floppy Disk Formatting L IP address specification Specifies the IP address. Section 3.4.1, Power-On Procedure for LAN Interface T Diagnostic Program Initiation Loads and initiates the diagnostic program in the E7000 system floppy disk. If a problem occurs, use this command to initiate the diagnostic program. Attached diagnostic program manual Each monitor command is described in the following pages. The input format for monitor commands is generally as follows: (RET) (RET): (RET) key input 3-25 S 3.5.2 S Initiates the E7000 system program Command Format * Initiation : S (RET) Description * Initiation Loads the E7000 system program from the system disk. If the system program has already been loaded, it initiates the E7000 system program. Use this command to re-initiate the E7000 system program after modifying the operating environment with the LAN_HOST or MODE command. Also use this command to load and initiate the E7000 system program in normal cases, with the following exceptions. -- An illegal system program is loaded by mistake. -- A system program is reloaded due to system error. Refer to section 3.5.3, R, for details on system program initiation for the above two exceptions. Example To initiate the E7000 system program: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? S (RET) ** E7000 SYSTEM LOADING ** 3-26 3.5.3 R Reloads and initiates the E7000 system program R Command Format * Initiation : R (RET) Description * Initiation Loads the E7000 system program from the system disk and initiates it even if the system program has already been loaded. Use this command to reload the E7000 system program due to system program error or to initiate another E7000 system program whose parameters are different from those in the program that has been loaded. Example To reload and initiate the E7000 system program: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? R (RET) ** E7000 SYSTEM LOADING ** 3-27 B 3.5.4 B Backs up and verifies the E7000 system program Command Format * Backing up : B (RET) * Verification : B; V (RET) Description * Backing up Backs up the E7000 system disk. Use the E7000 system disk backed up with this command. First, format the backup disk with the F command (section 3.5.5) before backing it up with this command. Since the E7000 has only one floppy disk drive, the user must back up the floppy disk, alternately exchanging the source disk with the target disk. Note that the original floppy disk is called the source floppy disk and the disk to be backed up or verified is called the target floppy disk. (S/R/B/F/L/T) ? B (RET) *** FD BACKUP *** SET SOURCE FD (Y/N) (a) (RET) SET TARGET FD (Y/N) (b) (RET) SET NEXT TARGET FD (Y/N) (c) (RET) (a) The source floppy insertion confirmation message. Insert the source floppy disk, and enter Y and the (RET) key to read data from the source floppy disk to the E7000 memory. Enter N to terminate this command. (b) The target floppy disk insertion message displayed after the source floppy disk has been read. Exchange the target floppy disk with the source floppy disk, and enter Y and the (RET) key to write data from the E7000 memory to the target floppy disk. Enter N to terminate this command. (c) Another target floppy disk insertion confirmation message displayed after backup. Insert another target floppy disk, and enter Y and the (RET) key to write data from the E7000 memory to another target floppy disk. Enter N to terminate this command. 3-28 B * Verification Verifies the floppy disk in a manner similar to floppy disk back-up. If a verification error occurs, the following error message is displayed. 0004 045 FF'.' 42'B' (a) (b) (c) (d) (a) (b) (c) (d) Serial number of sector containing a verification error Offset from the sector containing a verification error Source floppy disk data (hexadecimal and ASCII) Target floppy disk data (hexadecimal and ASCII) Examples 1. To back up the E7000 system program: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? B (RET) *** SET SET SET *** FD BACKUP *** SOURCE FD (Y/N) Y (RET) TARGET FD (Y/N) Y (RET) NEXT TARGET FD (Y/N) N (RET) BACKUP END *** START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T)? 3-29 B 2. To verify the E7000 system program: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? B;V (RET) *** SET SET SET *** FD VERIFY *** SOURCE FD (Y/N) Y (RET) TARGET FD (Y/N) Y (RET) NEXT TARGET FD (Y/N) N (RET) VERIFY END *** START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T)? 3-30 F 3.5.5 F Formats the floppy disk Command Format * Formatting : F (RET) Description * Formatting Formats the floppy disk. To back up the system disk, use a disk formatted with this command. Set the floppy disk to be formatted and enter this command. The following messages are displayed to confirm the volume label name and format. (S/R/B/F/L/T) ? F (RET) VOLUME LABEL : START FORMAT (Y/N) (b) (RET) (a) (a) is displayed. A space is displayed if the floppy disk has no volume label label. (b) Format confirmation message is displayed. Y: Starts formatting N: Terminates this command Example To format a floppy disk: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? F (RET) VOLUME LABEL : WORK START FORMAT (Y/N) Y (RET) 3-31 L 3.5.6 L Sets an E7000 IP address Command Format * Setting : L (RET) Description * Setting Sets an E7000 IP address. This is required to connect the E7000 to the host system through the optional LAN board. For details, refer to section 3.4.1, Power-on Procedure for LAN Interface, and the manual provided with the LAN board. If the L command is entered, the E7000 displays the current IP address and waits for a new IP address input. Note that the IP address must be entered in decimal. (S/R/B/F/L/T) ? L (RET) :IP ADDRESS = xxx.xxx.xxx.xxx (a) (RET) (a) A new IP address in decimal. To not change the IP address, enter only the (RET) key. Example: 128.1.1.101 3-32 L Example To set an E7000 IP address: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? L (RET) :IP ADDRESS = 0.0.0.0 128.1.1.9 (RET) START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? 3-33 T 3.5.7 T Initiates the diagnostic program Command Format * Initiation : T (RET) Description * Initiation Loads the diagnostic program from the system disk and initiates it. Example To initiate the diagnostic program: START E7000 S:START E7000 R:RELOAD & START E7000 B:BACKUP FD F:FORMAT FD L:SET LAN PARAMETER T:START DIAGNOSTIC TEST (S/R/B/F/L/T) ? T (RET) ** E7000 TM LOADING ** 3-34 3.6 Floppy Disk Backup Before using the E7000 system floppy disk, prepare a backup in case the original is damaged. This section describes the disk formatting and backup procedure. 3.6.1 Floppy Disk Formatting Format a backup disk for the E7000 system according to the messages displayed on the console, using the procedure shown below. Only use 2HD (double sided, high density, double track) floppy disks. Do not remove the disk while the disk drive is operating. Procedure Console Messages 1. E7000 monitor command prompt. START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T) ? _ 2. 3. 4. Insert the floppy disk to be formatted. Enter F and (RET). A volume label is displayed if there is a volume on the floppy disk. Format start confirmation message. Enter Y (RET) to format, otherwise enter N (RET). The E7000 monitor prompts for another command after formatting is completed. 5. 6. (S/R/B/F/L/T) ? F (RET) VOLUME LABEL : xx . . . . . . . . . xx START FORMAT (Y/N) ? Y (RET) If an error occurs during formatting, refer to section 12, Error Messages, in Part III, Emulator Function Guide, for details. 3-35 3.6.2 Floppy Disk Backup and Verification Use the following procedures to back up and verify a floppy disk. Backup: Procedure Console Messages 1. E7000 monitor command prompt. START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T) ? _ 2. Enter backup command B (RET). (S/R/B/F/L/T) ? B (RET) 3. Backup start message and source floppy disk insertion request message. 4. Insert the source floppy disk. 5. Enter Y (RET). Data is read from the source floppy disk into the E7000 internal RAM. SET SOURCE FD (Y/N) ? Y (RET) 6. When read is completed, the target floppy disk insertion message is displayed. Exchange the floppy disk. SET TARGET FD (Y/N) ? _ 7. Enter Y (RET). The E7000 internal RAM contents are written to the target floppy disk. SET TARGET FD (Y/N) ? Y (RET) 8. When write is completed, the E7000 asks whether to back up another target floppy disk or complete backup operation. SET NEXT TARGET FD (Y/N) ? _ 9. To make a backup on another target floppy disk, insert the new target disk and then enter Y (RET). Repeat steps 6 to 9. SET NEXT TARGET FD (Y/N) ? Y (RET) *** FD BACKUP *** SET SOURCE FD (Y/N) ? _ 10. Enter N (RET) to complete backup operation. SET NEXT TARGET FD (Y/N) ? N (RET) 11. Backup completion message. The E7000 monitor prompts for another command. *** BACKUP END *** 3-36 Verification: Procedure Console Messages 1. E7000 monitor command prompt. START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T) ? _ 2. Enter verification command B;V (RET). 3. Verification start message and source floppy disk insertion request message. 4. Insert the source floppy disk. 5. Enter Y (RET). Data is read from the source floppy disk into the E7000 internal RAM. SET SOURCE FD (Y/N) ? Y (RET) 6. When read is completed, the target floppy disk insertion message is displayed. Exchange the floppy disk. SET TARGET FD (Y/N) ? _ 7. Enter Y (RET). The contents of E7000 internal RAM are compared with the contents of the target floppy disk. SET TARGET FD (Y/N) ? Y (RET) 8. When comparison is completed, the E7000 asks whether to verify another target floppy disk or complete verification operation. SET NEXT TARGET FD (Y/N) ? _ 9. To verify another target floppy disk, insert the new target disk and then enter Y (RET). Repeat steps 6 to 9. SET NEXT TARGET FD (Y/N) ? Y (RET) (S/R/B/F/L/T) ? B;V (RET) *** FD VERIFY *** SET SOURCE FD (Y/N) ? _ 10. Enter N (RET) to complete verification operation. SET NEXT TARGET FD (Y/N) ? N (RET) 11. Verification completion message. The E7000 monitor prompts for another command. *** VERIFY END *** 3-37 Notes: 1. Any differences in the contents of the disks are displayed in the following format: xxxx (a) (a) (b) (c) (d) (e) (f) xxx (b) xx 'x' (c) (d) xx 'x' (e) (f) Serial number of sector containing the difference, beginning at 0 (hexadecimal) Offset in the sector containing the difference (hexadecimal) Source floppy disk contents (hexadecimal) Source floppy disk contents in ASCII characters Target floppy disk contents (hexadecimal) Target floppy disk contents in ASCII characters 2. During both backup and verification, entering N (RET) in response to the floppy disk insertion request message terminates command execution and returns the E7000 to command input wait state. 3. If a floppy disk error occurs during backup or verification, an error message is displayed and command execution is aborted. Refer to section 12, Error Messages, in Part III, Emulator Function Guide, for details. 3-38 3.7 E7000 System Program Initiation When the E7000 system floppy disk is not inserted after the E7000 is turned on, the E7000 monitor enters command input wait state and the E7000 system program must be loaded and initiated by monitor commands. If the system floppy disk is inserted immediately after power-on, the system program is automatically loaded and initiated. 3.7.1 Initiation on E7000 Monitor If S or R is entered, followed by (RET), when the E7000 is in monitor command input wait state, the E7000 system program is loaded from the system disk and initiated. Table 3-8 E7000 System Program Initiation Commands Command Description S Loads and initiates the system program from the E7000 system disk. If the E7000 system program is already loaded, the system program is initiated immediately.* R Reloads and initiates the E7000 system program. Note: This situation occurs when the system program is initiated and then terminated with the QUIT command. However, if the E7000 monitor F (format), or B (backup or verification) command has been executed, or when the system program has been forcibly terminated by a clock error, the system program is reloaded. Display at E7000 System Program Initiation START E7000 S: START E7000 R: RELOAD & START E7000 B: BACKUP FD F: FORMAT FD (a) L: SET LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/B/F/L/T) ? S (RET) R {} ** E7000 SYSTEM LOADING ** (b) H8/xxxx E7000 (HSxxxxEPDxxSF) Vn.m Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. 3-39 (c) CONFIGURATION FILE LOADING LAN IP ADDRESS FILE LOADING HARD WARE REGISTER READ/WRITE CHEC POD SYSTEM LOADING EMULATOR POD TEST ** RESET IN BY E7000 ! CLOCK = xx MHz MCU NAME = H8/xxxx MODE=x PIN=xxx (MD x-x=x) REMAINS EMULATION MEMORY S=xxxxx/Exxxxxx (d) (e) (f) (g) (h) (i) (j) (k) (l) WARM OR COLD START file name : WARM START return : COLD START (file name/return) ? (RET) (RET) : (m) { } (n) Description (a) E7000 command input request message. Insert the E7000 system disk and enter S. Enter R if loading another E7000 system program. (b) The E7000 system program is being loaded from the floppy disk. (c) Start message of the E7000 system program. Vn.m is the version number. (d) Configuration file is being loaded. (e) IP address file for the LAN is being loaded. (f) Emulator station hardware test start message. If there is an error in the emulator station, an error message is displayed. For details, refer to section 5, Troubleshooting, in Part III, Emulator Function Guide. (g) The program to be executed in the emulator pod is being loaded from the floppy disk. (h) Emulator pod test start message. If there is an error in the emulator pod, an error message is displayed. For details, refer to section 5, Troubleshooting, in Part III, Emulator Function Guide. (i) An RES signal has been input to the MCU. (j) Specified clock. If the user system is ready, the user system's clock (U) is used. If not, but the crystal oscillator (X) is ready, the crystal oscillator is used. If neither the user system clock or the oscillator clock is ready, the 13-MHz E7000 internal clock is used. 3-40 (k) MCU type, MCU operating mode, number of pins, and user system mode selection pin state. They are previously set with the MODE command (saved in configuration file). For details, refer to section 7.2.28, MODE, in Part III, Emulator Function Guide. (l) Remaining emulation memory size. (m) Specify either WARM START*1 or COLD START*2 as follows: WARM START: Specify the file name containing recovery information. COLD START: Press the (RET) key. (n) E7000 system program prompt. An E7000 system program command can now be entered. Notes: 1. WARM START recovers the information saved in a file when the E7000 system program was terminated by a QUIT command. (For details, refer to section 7.2.33 QUIT, in Part III, Emulator Function Guide.) The recovery information is listed below. * * * * * PC breakpoints Hardware break conditions, and trace stop and acquisition conditions Memory map information Configuration information Performance analysis information 2. COLD START initializes the above emulation information. 3-41 3.7.2 Automatic Initiation of E7000 System Program If the E7000 system disk is inserted after E7000 internal system test at power-on has been completed, the E7000 system program is automatically loaded. Console Display Procedure E7000 MONITOR Vn.m Copyright (C) 19xx Hitachi, Ltd. Licensed Material of Hitachi, Ltd. After E7000 power-on, insert the system disk when this message is displayed. TESTING RAM 0123 ** E7000 SYSTEM LOADING E7000 system program is being loaded. ** H8/xxxx E7000 (HSxxxxEPDxxSF) Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. Vn.m System program is initiated. (Refer to section 3.5.1, E7000 Monitor Initiation.) CONFIGURATION FILE LOADING LAN IP ADDRESS FILE LOADING HARD WARE REGISTER READ/WRITE CHECK POD SYSTEM LOADING EMULATOR POD TEST ** RESET IN BY E7000 ! CLOCK = xx MHz M C U NAME = H8/xxxx MODE=x PIN=xxx (MD x-x=x) REMAINS EMULATION MEMORY S = xxxxx/Exxxxxx WARM OR COLD START file name : WARM START return : COLD START (file name/return) ? (RET) (RET) { } : 3-42 Section 4 Operating Examples Section 4.1, Basic Examples, and section 4.2, Application Examples, include explanations based on the following user program. ADDR 000100 000106 000108 00010A 00010C 00010E 000110 000112 000116 CODE 7A0700FF FF0E F800 F900 8802 8901 A90A 46F8 6A881000 40FE LABEL MNEMONIC MOV.L OPERAND #00FFFF0E:32,ER7 MOV.B MOV.B ADD.B ADD.B CMP.B BNE MOV.B BRA #00:8,R0L #00:8,R1L #02:8,R0L #01:8,R1L #0A:8,R1L 00010A:8 R0L,@1000:16 000116:8 These examples assume that the emulator station is connected to the LAN host system with the Telnet and that the user program is downloaded from the host system to the E7000. Therefore, store the program in the host system before initiating the E7000. In these examples, the host name is HITACHI, and the IP address is 128.0.0.1. Initiate the E7000 by the following procedure: Operations Console Message 1. E7000 MONITOR Vn.m Copyright (C) 19xx Hitachi, Ltd. Licensed Material of Hitachi, Ltd. Insert the E7000 system disk into the floppy disk drive of the emulator station, and turn on the power. TESTING RAM 0123 4-1 2. The console displays the message shown on the right when the E7000 starts operation normally. (If the console does not display this message, take corrective action as described in section 5, Troubleshooting.) ** E7000 SYSTEM LOADING ** H8/xxxx E7000 (HSxxxxEPDxxSF) Vn.m Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. CONFIGURATION FILE LOADING LAN IP ADDRESS FILE LOADING HARD WARE REGISTER READ/WRITE CHECK POD SYSTEM LOADING EMULATOR POD TEST ** RESET IN BY E7000 ! CLOCK = xx MHz MCU NAME = H8/xxxx MODE=x PIN=xxx (MD x-x=x) REMAINS EMULATION MEMORY S=xxxxx/E=xxxxxx WARM OR COLD START file name: WARM START return 3. Enter (RET). : COLD START (file name/return) ? (RET) :_ 4-2 4.1 Basic Examples 4.1.1 Preparing for Connection of LAN Host System Before connecting the host system, specify the host name and the IP address by the following procedure: Operations Console Message 1. :LAN_HOST;S (RET) Specify the IP address of the host system to which the E7000 is to be connected by the FTP command. Enter LAN_HOST;S (RET), and the console will display the host names and IP addresses already specified and wait for the user to enter a selection number. :LAN_HOST;S (RET) NO NO 01 HOST_A 128.1.1.0 02 HOST_B 128.1.1.1 03 HOST_C 128.1.1.2 04 HOST_D 128.1.1.3 05 HOST_E 128.1.1.4 06 HOST_F 128.1.1.5 07 HOST_G 128.1.1.6 08 HOST_H 128.1.1.7 09 HOST_I 128.1.1.8 PLEASE SELECT NO? _ 2. Enter 1 (RET) as the selection number, HITACHI (RET) as the host name, and 128.0.0.1 (RET) as the IP address. After that, the console prompts the user to select another number. Enter . (RET) to exit interactive input mode. After the host name and IP address have been specified, the console asks if the specified name and address should be overwritten to the LANCNF.SYS file in the system disk. To store them, enter Y (RET). PLEASE SELECT NO? 1 (RET) 01 HOST NAME HOST_A HITACHI (RET) 01 IP ADDRESS 128.1.1.0 128.0.0.1 (RET) PLEASE SELECT NO? . (RET) OVERWRITE (Y/N)? Y (RET) 4-3 3. After the name and address have been stored in the LANCNF.SYS file, the E7000 system program automatically terminates. Therefore, restart the E7000 system. START E7000 S : START E7000 R : RELOAD & START E7000 B : BACKUP FD F : FORMAT FD L : SET LAN PARAMETER T : START DIAGNOSTIC TEST 4. Enter S (RET) to re-initiate the system. (S/R/B/F/L/T) ? S (RET) WARM OR COLD START file name: WARM START return 5. Enter (RET). Note: : COLD START (file name/return) ? (RET) The above host name and IP address are examples. Specify the actual host name and IP address according to the system. 4-4 4.1.2 Specifying the MCU Operating Mode Specify the E7000 operating mode and the MCU operating mode by the following procedure: Operations Console Message 1. Enter MODE;C (RET) to specify the E7000 operating mode. :MODE;C (RET) 2. The console displays the message. MCU NAME (1:H8/3048,2:H8/3047,3:H8/3044,4:H8/3048F) ? _ 3 Enter 1 (RET) to select the H8/3048. MCU NAME (1:H8/3048,2:H8/3047,3:H8/3044,4:H8/3048F) ? 1 (RET) 4 Enter 3 (RET) to select MCU operating mode 3. OPERATION MODE ? 5. After the above specification has been completed, the console asks if the mode settings should be stored in the configuration file. To store the mode settings, enter Y (RET). After that, the E7000 operates in the mode specified above whenever initiated with this system disk. To correct a mis-typed mode number, return to step 1 above before entering Y (RET) and repeat the procedure. Remove the write protect from the system floppy disk before storing the mode settings in the configuration file. CONFIGURATION WRITE OK ? (Y/N) ? _ OPERATION MODE ? 3 (RET) CONFIGURATION WRITE OK ? (Y/N ) ? Y(RET) START E7000 S : START E7000 R : RELOAD & START E7000 6. After the mode settings have been stored in the configuration file, the E7000 system program automatically terminates. B : BACKUP FD F : FORMAT FD L : SET LAN PARAMETER T : START DIAGNOSTIC TEST (S/R/B/F/L/T) ? _ 7. Enter S (RET) to re-initiate the system program. (S/R/B/F/L/T) ? S (RET) WARM OR COLD START file name: WARM START return : COLD START (file name/return) ? _ 8. (file name/return) ? (RET) Enter (RET). 4-5 4.1.3 Allocating Standard Emulation Memory and Specifying Attributes In order to load the user program to memory, allocate the standard emulation memory in the pods by the following procedure: Operations Console Message Enter MAP 0 1FFFF;S (RET) to allocate the standard emulation memory to addresses H'0 to H'1FFFF. The console displays the message shown on the right, which indicates that the memory allocation has been completed. Enter MAP (RET) and the console displays the attributes of all the memory areas. :MAP 0 1FFFF;S (RET) REMAINS EMULATION MEMORY S=60000/E=000000 :MAP (RET) 000000 - 01FFFF;S 020000 - FFFFFF;U INTERNAL RAM = FFEF10 - FFFF0F INTERNAL I/O = FFFF1C - FFFFFF REMAINS EMULATION MEMORY S=60000/E=000000 4-6 4.1.4 Loading the User Program Load the user program from the host system to the E7000 by the following procedure: Operations Console Message 1. Enter FTP (RET) to connect the E7000 and the host system with the FTP server. :FTP (RET) 2. The console asks for the user name. Enter (RET). Username : _ The console asks for the password. Enter (RET). Password : _ The console displays the message shown on the right, which indicates that the E7000 and the host system have been connected. login command success To load the program, enter LAN_LOAD;S: (RET). This example assumes that the load module is S type. While loading, the console displays the address to which the program is being loaded as shown on the right. FTP>LAN_LOAD;S: (RET) When the program has been loaded, the console displays the start address of the program (TOP ADDRESS), and its end address (END ADDRESS). TOP ADDRESS = xxxxxx Entering BYE (RET) terminates the FTP server connection. The console will display the message shown on the right. FTP>BYE (RET) 3. 4. 5. 6. 7. Username : (RET) Password : (RET) FTP>_ LOADING ADDRESS xxxxxx END ADDRESS = xxxxxx FTP>_ bye command success Note: The following operations can be performed even when the BYE command is not executed and the FTP prompt is displayed. In this case, be sure not to power down the E7000 before executing the BYE command. 4-7 8. The DISASSEMBLE command displays the loaded program. Enter DISASSEMBLE 100 117 (RET). :DISASSEMBLE 100 117 (RET) ADDR CODE 000100 7A0700FF LABEL MNEMONIC OPERAND MOV.L #00FFFF0E:32,ER7 #00:8,R0L FF0E 000106 F800 MOV.B 000108 F900 MOV.B #00:8,R1L 00010A 8802 ADD.B #02:8,R0L 00010C 8901 ADD.B #01:8,R1L 00010E A90A CMP.B #0A:8,R1L 000110 46F8 BNE 00010A:8 000112 6A881000 MOV.B R0L,@1000:16 000116 40FE BRA 000116:8 4-8 4.1.5 Executing Program Execute the loaded program by the following procedure: Operations Console Message 1. : .SP (RET) Enter .SP (RET) then FFFF0E (RET) as the SP value to set the stack pointer (SP) to H'FFFF0E. The console then asks for the program counter (PC) value. Enter 100 (RET) as the program counter value. The console then asks for the condition code register (CCR) value. In this example, the condition code register need not be set or changed, therefore, enter . (RET) to exit this interactive mode. ER7(SP) =00FFFF1A ? _ ER7(SP) =00FFFF1A ? FFFF0E (RET) PC = FFFFFF ? _ PC = FFFFFF ? 100 (RET) CCR = 80:I****** ? _ CCR = 80:I****** ? .(RET) :_ Note: In interactive mode, entering only (RET) makes no change to the currently displayed item, and the next item is displayed. In the above example, entering only (RET) to the condition code register prompt can complete the register modification procedure. The register value can also be directly input without using the interactive mode. For example, to set the stack pointer value directly, enter .SP FFFF0E (RET). 2. 3. Enter GO (RET) to execute the program from the address pointed by the PC. While the program is executed, the console displays the current program counter value (shown as xxxxxx on the right). :GO (RET) Enter (BREAK) key or (CTRL) + C keys to terminate program execution. The console displays the contents of the program counter, condition code register, and the general registers ER0 to ER7 at termination. RUN - TIME shows the duration of program execution from the GO command execution to (BREAK) or (CTRL) + C key input. BREAK KEY shows that the execution has been terminated because (BREAK) or (CTRL) + C was entered. (BREAK) ** PC = xxxxxx PC = 000116 CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:01S:049705US BREAK KEY : _ 4-9 4.1.6 PC Break Program execution can be stopped at a particular address by setting a breakpoint as follows: Operations Console Message 1. Enter BREAK 10C (RET) to terminate program execution when the instruction at address H'10C in the program is executed. :BREAK 10C (RET) 2. Restart program execution from address H'100. This can be done in two ways: one is to enter the start address directly, and the other is to first set the program counter to H'100, then enter GO, as described in section 4.1.5, Executing Program. :GO 100 (RET) The program execution terminates when the instruction at address H'10C is executed. The console displays the data shown on the right. The BREAK POINT 00010C shows that the program execution was terminated because of a PC breakpoint at H'10C. PC = 00010E 3. ** PC = xxxxxx CCR=80:I******* ER0 - ER3 00000002 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000014US BREAK POINT 00010C : _ 4-10 4.1.7 Single-Step Execution A single instruction can be executed using the single-step function by the following procedure: Operations Console Message 1. The program counter points to the next address to be executed when the program execution terminates in the example of section 4.1.6, PC Break. Here, entering STEP (RET) executes only one instruction, and the console displays the information as shown on the right. 00010E CMP.B #0A:8,R1L shows the executed address and mnemonic code, and STEP NORMAL END shows that the single-step execution has terminated. :STEP (RET) To repeat single-step execution, enter only (RET). This can be repeated until another command is executed. :(RET) 2. PC = 000110 CCR=A9:I*H*N**C ER0 - ER3 00000002 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E 00010E CMP.B #0A:8,R1L STEP NORMAL END :_ PC = 00010A CCR=A9:I*H*N**C ER0 - ER3 00000002 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E 000110 BNE STEP NORMAL END :_ 4-11 00010A:8 4.1.8 Setting Hardware Break Conditions Various hardware break conditions can be specified by the following procedure: Operations Console Message 1. Enter BREAK - (RET) to cancel the breakpoint set in the example in section 4.1.6, PC Break. :BREAK - (RET) 2. To confirm the cancellation, execute the BREAK command (enter BREAK (RET)). *** 45: NOT FOUND shows that no PC breakpoint is set. :BREAK (RET) 3. To specify that program execution should terminate when data is written to address H'1000, enter BREAK_ CONDITION1 A = 1000 W (RET). :BREAK_CONDITION1 A = 1000 W (RET) 4. Enter GO 100 (RET) to start executing the program from address H'100. When the break condition is satisfied, the console displays the information shown on the right. BREAK CONDITION1 shows that the program execution has terminated because the break condition was satisfied. :GO 100 (RET) *** 45: NOT FOUND ** PC = xxxxxx PC = 000116 CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000093US BREAK CONDITION1 :_ 4-12 4.1.9 Displaying Trace Information Trace information acquired during program execution can be displayed by the following procedure: Operations Console Message 1. :TRACE (RET) Enter TRACE (RET) to see the trace information. The console will display the instruction mnemonic information. IP ADDR LABEL 000100 MOV:L #00FFFF0E:32,ER7 *-D'00043 000106 MOV.B #00:8,R0L *-D'00042 000108 MOV.B #00:8,R1L *-D'00041 00010A ADD.B #02:8,R0L 00010C ADD.B #01:8,R1L : To display the trace information in buscycle units, enter TRACE;B (RET). BP * AB DB MA R/W 000100 : : :TRACE;B (RET) ST IRQ MOV.L NMI RES RA PROB VCC CLK #00FFFF0E:32,ER7 -D'00123 000100 79 EXT R PRG 111111 1 1 11 11111111 1 08 -D'00122 000101 07 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00121 000102 79 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00120 000103 07 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00119 000104 FF EXT R PRG 111111 1 1 11 11111111 1 06 -D'00118 000105 FE EXT R PRG 111111 1 1 11 11111111 1 06 -D'00117 000106 F8 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00116 000107 00 EXT R PRG 111111 1 1 11 11111111 1 06 * 000106 MOV.B : 3. OPERAND *-D'00044 *-D'00040 2. MNEMONIC To temporarily stop the trace information display, enter (CTRL)+S. To continue the display, enter (CTRL)+Q. (CTRL)+S and (CTRL)+Q are also effective on other information display. #00:8,R0L : : (CTRL)+S (CTRL)+Q 4-13 4.2 Application Examples 4.2.1 Break with Pass Count Condition The pass count condition can be set to a breakpoint by the following procedure: Operations Console Message 1. Enter BREAK 10A 5 (RET) to terminate program execution when address 10A is passed five times. :BREAK 10A 5 (RET) 2. To start execution from address H'100, enter GO 100 (RET). :GO 100 (RET) 3. When execution terminates after address H'10A is passed five times, the console displays the data shown on the right. ** PC = xxxxxx PC = 00010C CCR=80:I******* ER0 - ER3 0000000A 00000004 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000058US BREAK POINT 0010A :_ 4. Entering BREAK (RET) displays (a) the breakpoint address, (b) the specified count, and (c) the pass count as shown on the right. The pass count is cleared when the GO command is entered again. :BREAK (RET) ADDRESS CNT PASS 00010A 0005 0005 (a) (b) (c) 4-14 SYMBOL 4.2.2 Conditional Trace The following procedure can be used to limit the acquisition of trace information during program execution. Operations Console Message 1. To cancel the breakpoint set in the example of section 4.2.1, Break with Pass Count Condition, enter BREAK - (RET). :BREAK - (RET) 2. Enter TRACE_CONDITION A =100:106;R (RET) to get trace information only while the program counter is between addresses H'100 and H'106. :TRACE_CONDITION A= 100:106;R (RET) 3. Enter GO 100 (RET) to start executing the program, then (BREAK) key or (CTRL) + C keys to terminate the execution. :GO 100 (RET) ** PC = xxxxxx PC = 000116 (BREAK) CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:01S:049705US BREAK KEY :_ 4. Enter TRACE (RET) to display the trace information acquired under the specified condition. :TRACE (RET) IP ADDR * D'***** 000100 * D'***** 000106 LABEL : 4-15 MNEMONIC OPERAND MOV.L #00FFFF0E:32,ER7 MOV.B #00:8,R0L 4.2.3 Parallel Mode During program execution in parallel mode, the memory contents can be displayed or modified by the following procedure: Operations Console Message 1. :GO 100 (RET) After executing the GO command, enter (RET) to move to parallel mode. ** PC = xxxxxx (RET) #_ 2. Enter DUMP 1000 100F (RET) to display the memory contents from H'1000 to H'100F. #DUMP 1000 100F (RET) 001000 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3. Enter MEMORY 117 EE (RET) to modify the contents of memory address H'117 into EE. #MEMORY 117 EE (RET) 4. To exit from parallel mode, enter END (RET). #END (RET) To terminate program execution, enter (BREAK) key or (CTRL) + C keys. (BREAK) ". . . . . . . . . . . . . . . ." ** PC = xxxxxx 5. PC = 000116 CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:07M:25S:441007US BREAK KEY :_ 6. Enter DISASSEMBLE 100 117 (RET) to confirm that the program has been changed by memory modification in parallel mode. : DISASSEMBLE 100 117 (RET) 4-16 ADDR CODE 000100 7A0700FF LABEL MNEMONIC OPERAND MOV.L #00FFFF0E:32,ER7 #00:8,R0L FF0E 000106 F800 MOV.B 000108 F900 MOV.B #00:8,R1L 00010A 8802 ADD.B #02:8,R0L 00010C 8901 ADD.B #01:8,R1L 00010E A90A CMP.B #0A:8,R1L 000110 46F8 BNE 00010A:8 000112 6A881000 MOV.B R0L,@1000:16 000116 40EE BRA 000106:8 4.2.4 Searching Trace Information The TRACE_SEARCH command can be used to search for a particular part of the acquired trace information. Console Message Operations Enter TRACE_SEARCH A=116 (RET), and the console will only display those parts of the trace information in which the address bus value is H'116. BP AB :TRACE_SEARCH A=116(RET) DB MA R/W ST IRQ NMI RES RA PROB VCC CLK -D'04077 000116 40 EXT R PRG 111111 1 1 11 11111111 1 06 -D'03964 000116 40 EXT R PRG 111111 1 1 11 11111111 1 06 -D'03851 000116 40 EXT R PRG 111111 1 1 11 11111111 1 06 : : : : : : 4-17 4.2.5 Sequential PC Break A break can be generated when specified addresses are passed in a specified order, using the BREAK_SEQUENCE command as follows: Operations Console Message 1. :BREAK_SEQUENCE 110 10A (RET) Enter BREAK_SEQUENCE 110 10A (RET), which terminates program execution when the instructions at addresses H'110 and H'10A are executed consecutively in that order, as shown in figure 4-1. ADDR CODE LABEL 000100 7A0700FF FF0E 000106 F800 000108 F900 00010A 8802 00010C 8901 00010E A90A 000110 46F8 000112 6A881000 000116 40EE MNEMONIC MOV.L Program execution flow OPERAND #00FFFF0E:32,ER7 MOV.B MOV.B ADD.B ADD.B CMP.B BNE MOV.B BRA #00:8,R0L #00:8,R1L #02:8,R0L #01:8,R1L #0A:8,R1L 00010A:8 R0L,@1000:16 000106:8 Figure 4-1 Program Execution Flow 2. Enter GO 100 (RET) to execute the program. When the specified condition is satisfied, execution terminates, and the console displays the data shown on the right. The BREAK SEQUENCE shows that execution has terminated because the condition specified in the BREAK_SEQUENCE command has been satisfied. :GO 100 (RET) ** PC = xxxxxx PC = 00010C CCR=80:I******* ER0 - ER3 00000004 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000028US BREAK SEQUENCE :_ 4-18 3. Enter TRACE (RET) to confirm the executed instructions. :TRACE (RET) MNEMONIC OPERAND *-D'00007 IP ADDR 000100 MOV.L #00FFFF0E:32,ER7 *-D'00006 000106 MOV.B #00:8,R0L *-D'00005 000108 MOV.B #00:8,R1L *-D'00004 00010A ADD.B #02:8,R0L *-D'00003 00010C ADD.B #01:8,R1L *-D'00002 00010E CMP.B #0A:8,R1L *-D'00001 000110 BNE 00010A:8 * D'00000 00010A ADD.B #02:8,R0L :_ 4-19 LABEL Appendix A Floppy Disk Drive Specifications Table A-1 summarizes the specifications of the 3.5-inch floppy disk drive installed in the E7000. Table A-1 3.5-Inch Floppy Disk Drive Specifications Item Specification Storage capacity Approx. 1.2 Mbytes (512 bytes x 15 sectors x 160 tracks) Double-sided, high density, double tracks Recording method MFM type Recording format IBM format (512 bytes/sector, 15 sectors/track) Recommended disks MF2-256HD (Maxell) A-1 Appendix B Connector Specifications This section describes console connector pin locations and console connecting methods. B.1 Console Connector Figure B-1 shows pin locations in the console's connector. Table B-1 lists signal names and their usages. CRT 13 12 11 10 9 8 7 25 24 23 22 21 20 19 6 5 4 3 2 18 17 16 15 14 1 Figure B-1 Console Connector Pin Locations Table B-1 Signal Names and Usage of Console Connector Pin No. Signal Name Usage 1 Frame Ground (FG) Connected to the E7000's frame ground 2 Receive Data (RD) Data receive line 3 Transmit Data (TD) Data transmit line 4 Clear To Send (CTS) Not used 5 Request To Send (RTS) High when E7000's power is on 6 Data Terminal Ready (DTR) High when E7000's power is on 7 Signal Ground (SG) Signal ground 8 Data Carrier Detect (DCD) High when E7000's power is on 9-19 Not connected -- 20 Data Set Ready (DSR) Not used 21-25 Not connected -- B-1 B.2 Host System Connector Figure B-2 shows pin locations in the host system's connector. Table B-2 lists signal names and their usages. 13 12 11 10 9 8 7 25 24 23 22 21 20 19 6 5 4 3 2 18 17 16 15 14 1 HOST Figure B-2 Host System Connector Pin Locations Table B-2 Signal Names and Usage of Host System Connector Pin No. Signal Name Usage 1 Frame Ground (FG) Connected to E7000 frame ground 2 Transmit Data (TD) Data transmit line 3 Receive Data (RD) Data receive line 4 Request To Send (RTS) RTS control 5 Clear To Send (CTS) CTS control 6 Data Set Ready (DSR) Not used 7 Signal Ground (SG) Signal ground 8-19 Not connected -- 20 Data Terminal Ready (DTR) High when E7000 power is on 21-25 Not connected -- B-2 B.3 Printer Connector The layouts of the connector pin at the E7000 end of the provided printer cable is shown in figure B-3. Signal names and pin assignments are given in table B-3. 26 24 22 20 18 16 14 12 10 8 25 23 21 19 17 15 13 11 9 7 6 5 4 3 2 1 P R I N T E R Figure B-3 Printer Cable Connector Pin Layouts Table B-3 Printer Cable Connector Pin Assignment Pin No. Signal Name Pin No. Signal Name 1 FAULT 14 GND 2 0 V 15 ACKNLG 3 DATA STROBE 16 GND 4 GND 17 BUSY 5 DATA1 18 GND 6 DATA2 19 PE 7 DATA3 20 GND 8 DATA4 21 SELECT 9 GND 22 GND 10 DATA5 23 INPUT PRIME 11 DATA6 24 GND 12 DATA7 25 NC 13 DATA8 26 NC B-3 * Signal functions Signal functions listed in table B-3 are described below. DATA1 to DATA8: Data is output by these lines. DATA STROBE: Data is output from the data output lines when this signal goes low. BUSY: The E7000 will not send the next data as long as this signal is high. ACKNLG: This signal goes low and the E7000 outputs the next data. PE: If this signal goes high, the E7000 stops data outputs and displays the error message ***8: PAPER EMPTY. SELECT: If this signal is low, the E7000 sends no data and outputs the error message ***7: PRINTER NOT READY. FAULT: If this signal is low, the E7000 sends no data and outputs an error message. If the PE signal is high, the E7000 outputs the error message ***8: PAPER EMPTY If the PE signal is low, the E7000 outputs the error message ***7: PRINTER NOT READY INPUT PRIME: The E7000 forces this signal low when it starts up. * Data output timing Data output timing of the E7000 is shown in figure B-4. DATA1-DATA8 DATA STROBE 5 s 5 s BUSY ACKNLG Note: Since the E7000 checks the BUSY and ACKNLG signals, make sure that they are connected in the printer interface cable. Figure B-4 Data Output Timing B-4 B.4 LAN Connector Figure B-5 shows pin locations in the LAN connector. Table B-4 lists pin numbers and signal names. LAN 8 15 7 6 14 13 5 4 12 11 3 10 2 9 1 Figure B-5 LAN Connector Pin Locations Table B-4 Pin Numbers and Signal Names in LAN Connector Pin Signal Name 1 NC 2 COL+ 3 TX+ 4 -- 5 RX+ 6 GND 7 -- 8 -- 9 COL- 10 TX- 11 -- 12 RX- 13 +12 V 14 -- 15 -- B-5 B.5 E7000 to Console Connection Figure B-6 shows the wiring for the console connection. A console is connected to the console connector on the E7000 emulator station rear panel with the provided console interface cable. Console FG TD RD RTS CTS DSR SG DCD DTR E7000 (console connector) 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 DCD*2 20 20 DSR*1 FG RD Notes: 1. There is no need to connect these pins since they are not used by the E7000. TD 2. High when E7000's power is on. There is no need to connect these pins if they are not used at the console end. CTS*1 RTS*2 DTR*2 3. Pins 9-19, 21, and the following are not connected. SG (Numbers are connector pin numbers) Figure B-6 Console to E7000 Wiring B-6 B.6 E7000 to Host System Connection Figure B-7 shows the wiring for the E7000 to host system connection when the optional host system interface cable is used. Host system FG TD RD RTS CTS DSR SG DCD DTR E7000 (host system connector) 1 1 2 2 3 3 4 4 5 5 6 6 7 7 FG RD Notes: 1. There is no need to connect these pins since they are not used by the E7000. TD CTS*1 RTS*2 DTR*2 SG 8 8 DCD*2 20 20 DSR*1 2. High when E7000's power is on. There is no need to connect these pins if they are not used at the host system end. 3. Pins 9-19, 21, and the following are not connected. (Numbers are connector pin numbers) Figure B-7 Host System to E7000 Wiring Note that provided host system interface cable may not be suitable for some host systems. In that case, use the wiring shown in figure B-8. Host system FG TD RD 1 2 3 E7000 (host system connector) 1 FG 2 TD 3 RD FG TD RD RTS CTS SG SG 7 7 E7000 (host system connector) Host system 1 1 2 2 3 3 4 4 5 5 7 7 FG TD RD RTS CTS SG SG DSR (Numbers are connector pin numbers) 6 * 20 DSR (Numbers are connector pin numbers) Note: High when E7000's power is on. If this pin is not being used by the host system, there is no need to connect it at the host system end. (a) X-ON/X-OFF Control (b) RTS/CTS Control Figure B-8 Host System Wiring (Using Other Cable) B-7 B.7 Printer Cable Connection Table B-5 shows the signal names and their corresponding printer and E7000 pin numbers. Table B-5 Pin Numbers and Signal Names in Printer and E7000 Pin No. Signal Name Printer E7000 1 DATA STROBE GND 1 19 3 4 2 DATA1 GND 2 20 5 4 3 DATA2 GND 3 21 6 16 4 DATA3 GND 4 22 7 9 5 DATA4 GND 5 23 8 9 6 DATA5 GND 6 24 10 18 7 DATA6 GND 7 25 11 20 8 DATA7 GND 8 26 12 14 9 DATA8 GND 9 27 13 14 10 ACKNLG GND 10 28 15 16 11 BUSY GND 11 29 17 18 12 PE GND 12 29 19 20 13 SELECT GND 13 20 21 22 14 INPUT PRIME GND 31 30 23 24 15 FAULT 0 V 32 16 1 2 16 FG FG 17 FG FG 18 FG FG Remarks The cable shield and line pairs 16, 17, and 18 are all held to the frame ground. At the printer end, they are all connected to pin 17. B-8 Part II E7000PC Guide Section 1 Overview This system is an efficient software and hardware development support tool for application systems using the H8/3048 series or H8/3048F microcomputer (abbreviated to MCU) developed by Hitachi, Ltd. The H8/3048 series includes three types of MCUs: H8/3048, H8/3047, and H8/3044. They contain the following components on a single chip: * * * * * * * * * High-speed CPU Internal RAM Internal ROM Timers Serial communication interface (including one channel for smart card interface) Refresh controller DMAC I/O ports A/D and D/A converters The H8/3048F has the same functions as the H8/3048 except that it has flash memory instead of internal ROM. When the E7000 is connected to a user system, it operates in place of the MCU and performs realtime emulation of the user system. Additionally, the E7000 provides functions for efficient software and hardware debugging. The E7000 consists of an emulator station, emulator pod, and user system interface cable, as shown in figure 1-1. The emulator pod should be connected to the user system via the user system interface cable. 1-1 E7000 PC User system interface cables Station-pod interface cables Emulator pod HITACHI Emulator station Figure 1-1 H8/3048-Series, H8/3048F E7000PC Emulator 1-2 The E7000PC provides the following features: * Realtime emulation of MCU * A wide selection of emulation commands, promoting efficient system development * Help functions to facilitate command usage without a manual * Efficient debugging enabled by variable break functions and mass-storage trace memory (32 kcycles) * Command execution during emulation, for example: -- Trace data display -- Emulation memory display and modification * Measurement of subroutine execution time and frequency for evaluating the execution efficiency of user programs * An optional IBM PC board for interfacing with an IBM PC*, enabling high-speed downloading (1 Mbyte/min) of user programs Note: IBM PC is a registered trademark of International Business Machines Corporation. * E7000PC graphical user interface software (E7000PC GUI: option) can be loaded into the personal computer to enable: -- Graphic display operations in a window environment -- Source level debugging -- Graphic display of trace information * 512 kbytes of emulation memory as substitute user system memory. An optional 1-Mbyte or 4-Mbyte emulation memory board can also be installed in the emulator station. * By connecting the user system interface and providing a low-voltage power supply of 2.7 to 5.5 V, emulation can be performed in user systems with any supply voltage in the range 2.7 to 5.5 V. 1-3 1.1 Warnings Before using the E7000PC, carefully read the following warnings. If the E7000PC is not used correctly, breakdowns may occur. 1. Check all components with the component list after unpacking the E7000PC. 2. Never place heavy objects on the casing. 3. Observe the following conditions in the area where the E7000PC is to be used: * Make sure that the internal cooling fans on the sides of the emulator station are at least 20 cm (8") away from walls or other equipment. * Keep out of direct sunlight or heat. Refer to section 1.2, Environmental Conditions. * Use in an environment with constant temperature and humidity. * Protect the E7000PC from dust. * Avoid subjecting the E7000PC to excessive vibration. Refer to section 1.2, Environmental Conditions. 4. Protect the E7000PC from excessive impacts and stresses. 5. Before using the E7000PC's power supply, check its specifications such as power output, voltage, and frequency. For details on power supply, refer to section 1.2, Environmental Conditions. 6. When moving the E7000PC, take care not to vibrate or otherwise damage it. Pay special attention to exposed parts such as the power switch and I/O connectors. 7. After connecting the cable, check that it is connected correctly. For details, refer to section 3, Preparation before Use. 8. Supply power to the E7000PC emulator and connected parts after connecting all cables. Cables should not be connected or removed when the power is on. 9. For details on differences between the MCU and E7000PC, refer to section 2, Differences between the MCU and the Emulator, in Part III, Emulator Function Guide. 1-4 1.2 Environmental Conditions Observe the conditions listed in table 1-1 when using the E7000PC emulator. Table 1-1 Environmental Conditions Item Specifications Temperature Operating: +10 to +35C Storage: -10 to +50C Humidity Operating: 35 to 80% RH (no condensation) Storage: 35 to 80% RH (no condensation) Vibration Operating: 2.45 m/s2 max Storage: 4.9 m/s2 max Transportation: 14.7 m/s2 max AC input power Voltage: 100/200 VAC 10% Frequency: 50/60 Hz Power consumption: 200 VA Ambient gases Must be no corrosive gases 1-5 1.3 Components The E7000PC emulator consists of the emulator station and emulator pod. Check all the components after unpacking. 1.3.1 E7000PC Emulator Station Table 1-2 E7000PC Emulator Station Components Item Configuration Quantity Remarks Hardware E7000PC emulator station 1 Power supply, control board, and trace board Station-pod interface cables 2 50 cm AC power cable 1 Fuse 1 Spare (3 A) HS7000ESTP1H Description Notes 1 HS7000ESTP1HE E7000 PC HITACHI Documentation 1-6 1.3.2 E7000PC Emulator Pod Table 1-3 E7000PC Emulator Pod Components Item Configuration Quantity Remarks Hardware Emulator pod 1 Fitted with two boards External probe set 1 Signal input: 8 GND: 1 Trigger output: 1 Floppy disks 1 E7000 system program (cannot be used with E7000PC emulator) 1 E7000PC/IBM PC system program 1 HS3048EPD70HE Software E7000 E7000PC Documentation H8/3048-series, H8/3048F E7000 Emulator User's Manual 1.3.3 IBM PC Interface Board Table 1-4 shows the specifications of the interface board. Table 1-4 IBM PC Interface Board Item Model Name Specifications IBM PC interface board HS7000EII01H * AT-bus specifications * Interface cable 1-7 1.3.4 Options In addition to the emulator station and pod components, the options listed in table 1-4 are also available. Refer to the option manual for details on the optional components. Table 1-5 Optional Component Specifications Item Model Name Specifications 1-Mbyte emulation memory board HS7000EMS11H 1-Mbyte SRAM is used 4-Mbyte emulation memory board HS7000EMS12H 4-Mbyte SRAM is used QFP-100 user system interface cable HS3042ECH71H For H8/3002, H8/3042 series, H8/3048 series, and H8/3048F (FP-100B) Bus monitor interface board for E7000 HS7000EXR10H For connecting the E7000 bus monitor board E7000 bus monitor board HS7000EBR01H For installing the D/A converter 1-8 Section 2 Components 2.1 E7000PC Hardware Components As shown in figure 2-1, the E7000PC emulator consists of an emulator station (having a PC interface), an emulator pod, and an IBM PC interface board. Note: Optional LAN boards cannot be installed in the E7000PC. Optional 1-Mbyte or 4-Mbyte emulation memory board, or bus monitor interface board E7000 PC IBM PC interface board PC interface cable Station-pod interface cables HITACHI Emulator pod E7000PC emulator station Optional user system interface cable External probe User system Figure 2-1 E7000PC Emulator Hardware Components 2-1 2.1.1 E7000PC Emulator Station Components Front Panel: E7000 PC 2 POWER 1 HITACHI Figure 2-2 E7000PC Emulator Station Front Panel 1. Power lamp: Lights when the E7000PC power is on. 2. Station-pod interface cable connectors: For connecting the emulator pod to the emulator station. 2-2 Rear Panel: 4 POWER CRT 1 250V 3A 2 AC INPUT 3 5 TRACE 9 Figure 2-3 PC 8 7 AC100-120V/ AC200-240V 2A 50/60Hz 6 E7000PC Emulator Station Rear Panel 1. Power switch: Turning this switch to I (input) supplies power to the E7000PC (emulator station and pod). 2. Fuse box: Contains a 3-A 250 VAC fuse. 3. AC power connector: For an 100/200 VAC power supply. 4. Console connector: For future use. Marked CRT. 2-3 5. Personal computer connector: For connection to the IBM PC console. Marked PC. 6. Control board slot: For installing the control board. 7. Extension slot: For system extension. 8. Emulation memory/bus monitor interface board slot: For installing the optional emulation memory board or bus monitor interface board. 9. Trace board slot: For installing the trace board. 2-4 2.1.2 E7000PC Emulator Pod Components 2 1 s H S 3 0 4 8 E P D 7 0 H 4 5 (Top view) 3 7 6 (Bottom view) Figure 2-4 E7000PC Emulator Pod 1. External probes: Can be used for the following during realtime user system emulation -- Hardware break condition input -- Real-time trace input -- Multi-break detection 2. Trigger output pin: Outputs a low-level pulse in the following states: -- When a hardware break condition is satisfied (whether to break or not can be selected) -- When cycle reset mode is specified with the GO command and an RES signal is input to the MCU 2-5 -- When trigger output is specified with the TRACE_CONDITION command, and the set conditions are satisfied, this pin can be used as the trigger signal of the oscilloscope or the logic analyzer 3. Crystal oscillator installation socket: For installing the crystal oscillator which provides a clock to the MCU. 4. User system interface cable: For connection to the MCU socket on the user system, to enable the E7000PC to operate in place of the MCU. 5. Station-pod interface cables: For connecting the emulator station to the emulator pod. 6. User system interface cable connector: For connection of the user system. 7. External probe connector: For connection of the external probe. Note: When user system interface cable is connected, power supply voltage must be provided from the VCC pin on the user system interface cable to operate the E7000PC. Therefore, when using the E7000PC on its own, be sure to disconnect the user system interface cable. 2-6 2.2 E7000PC Software Components The E7000PC emulator's software components are illustrated in figure 2-5. The emulator pod contains two 3.5-inch floppy disks; the E7000PC emulator system disk has "E7000PC" written under "HITACHI" on its label. The system disk files are described in table 2-1. Table 2-1 Contents of E7000PC System Disk File Name Contents Description E7000.SYS E7000PC system program Controls the emulator pod and processes commands, such as emulation commands. Loaded into the E7000PC memory after the E7000PC system program is activated. H8POD348.SYS MCU control program Controls the MCU within the emulator pod. Loaded into the E7000PC memory after the E7000PC system program is activated. H8CNF348.SYS Configuration file Contains MCU operating mode and MAP information. Loaded with the E7000PC system program. LANCNF.SYS LAN configuration file Contains the host name and IP address information when the E7000PC is connected to a workstation via a LAN interface. DIAG.TM Diagnostic program Loaded into the emulator station memory for testing and maintenance. IPI. EXE H-series interface software Executes on an IBM PC to interface with the E7000PC. 2-7 E7000 PC E7000PC system program (Provided with the emulator pod) Loadable file types: * S-type files * HEX-type files * SYSROF-type files * Text files HITACHI H-series interface software (Provided with the emulator pod) IBM PC (IBM) C compiler Cross assembler Linkage editor Figure 2-5 E7000PC Emulator Software Components 2-8 2.3 System Configuration By installing an IBM PC interface board in the personal computer conforming to IBM PC AT-bus specifications, the E7000PC can be connected to the personal computer through the interface cable supplied with the IBM PC interface board. The system configuration is shown in figure 2-6. Install an IBM PC interface board in the personal computer E7000PC emulator PC IBM PC personal computer Figure 2-6 E7000PC Emulator System Configuration 2-9 Section 3 Preparation before Use 3.1 E7000PC Preparation Unpack the E7000PC and prepare it for use as follows: Reference Unpack the emulator Check the components against the component list Component list Install the optional emulation memory board, or bus monitor Each board's manual interface board Connect the emulator pod to Section 3.2.1 the emulator station Connect the external probe Section 3.2.2 Connect the user system interface cable Each user system interface cable manual Install the crystal oscillator Section 3.2.3 Connect the system ground Section 3.2.4 Set the IBM PC interface board switches Section 3.3.2 Install the IBM PC interface board Section 3.3.3 Connect the PC interface cable Section 3.3.4 Section 3.5 Power-on Figure 3-1 E7000PC Preparation Flow Chart 3-1 3.2 E7000PC Connection 3.2.1 Connecting Emulator Pod The emulator pod and the emulator station are packed separately. Use the following procedure to connect the emulator pod to the emulator station, or to disconnect it when moving the E7000PC: (1) Check that the E7000PC power is off by ensuring that the power lamp on the left side of the emulator station front panel is extinguished. (2) Remove the AC power cable for the emulator station from the outlet. (3) Connect station-pod interface cables P1 and P2 to station-pod interface connectors J1 and J2 on the right side of the emulator station, respectively. Insert the longer screw of each cable to the connector screw hole without a spacer, and the shorter screw to the hole with a spacer. Tighten the longer screw first until the shorter screw reaches the spacer, then alternately tighten the longer and shorter screws. Figure 3-2 shows how to connect the station-pod interface cables to the emulator station. Note: When connecting the cables, prevent the upper or lower side of the cables from lifting off the connector. Tighten the screws and push the cables gradually toward the connector. Station-pod interface connector J2 J2 Spacers J1 Station-pod interface connector J1 Emulator station right side Longer screws Station-pod interface cable P1 Station-pod interface cable P2 Figure 3-2 Connecting Station-Pod Interface Cables to Emulator Station 3-2 (4) Connect station-pod interface cables P1 and P2 to station-pod interface connectors J1 and J2, respectively, in the same way as connection to the emulator station. Tighten the screws in the same way as in step (3). See figure 3-3 for details. Pod Station-pod interface connector J1 J1 Station-pod interface connector J2 J2 Spacers Station-pod interface cable P1 Station-pod interface cable P2 Longer screws Figure 3-3 Connecting Station-Pod Interface Cables to Emulator Pod 3-3 3.2.2 External Probe Connector When an external probe is connected to the emulator pod, it enables external signal trace, break using an external signal, and multibreak detection. Figure 3-4 shows the external probe connection. External probe connector Cover External probe Bottom of emulator pod Figure 3-4 Connecting External Probe 1. Slide back the cover on the bottom of the emulator pod. 2. Insert the external probe into the external probe connector, making sure they are aligned correctly. For connecting a user system interface cable, refer to the user system interface cable manual. 3-4 3.2.3 Clock Selection Three types of clocks are supported; a crystal oscillator signal from the emulator pod, an external clock from the user system, and the E7000PC emulator internal clock. Each clock type is specified with the CLOCK command. X (crystal oscillator) U (user system clock) E7000PC emulator internal clock CLOCK command 13 (13 MHz) 18 (18 MHz) Crystal Oscillator: Using this function, a user program can be executed with user system operating frequency without connecting the user system. A crystal oscillator is not provided with the E7000PC. Use one with the same frequency as the user system (o clock). The frequency of the crystal oscillator used as the MCU input clock is 8 to 18 MHz. To use a frequency outside this range, supply an external clock from the user system. Install the crystal oscillator using the following procedure: 1. Check that the E7000PC power is turned off. 2. Install the crystal oscillator into the crystal oscillator socket on the side of the emulator pod (figure 3-5). 3. After turning on the E7000PC, specify X with the CLOCK command. Cover XTAL Bottom of emulator pod Figure 3-5 Installing Crystal Oscillator 3-5 User System Clock: Specify a user system clock using the following procedure. 1. Check that the E7000PC power is off. 2. Supply a TTL-level clock through the EXTAL pin at the end of the user system interface cable. 3. After turning on the E7000PC power, specify U with the CLOCK command. E7000PC Emulator Internal Clock: Specify 13 (13 MHz) or 18 (18 MHz) with the CLOCK command. Note: When the emulator system program is initiated, the emulator automatically selects the MCU clock source according to the following priority. 1. U (user system clock) when supplied from the user system. 2. X (crystal oscillator) when installed in the emulator pod. 3. 13-MHz E7000PC emulator internal clock. 3-6 3.2.4 Connecting System Ground The E7000PC's signal ground is connected to the user system's signal ground via the emulator pod. In the emulator station, the signal ground and the frame ground are connected (figure 3-6). At the user system, connect the frame ground only; do not connect the signal ground to the frame ground. If it is difficult to separate the signal ground from the 100-V frame ground, ground the user system at the same outlet as the E7000PC's power supply (figure 3-7). Signal line Emulator station Emulator pod Signal line User system Logic Power Signal ground Signal ground Frame ground Figure 3-6 Connecting System Ground E7000PC power cable User system power cable Outlet Ground AC power supply Figure 3-7 Connecting Frame Ground The user system must be connected to an appropriate ground so as to minimize noise, ground loops, and other adverse effects. Confirm that the ground pins of the emulator pod are firmly connected to the user system's ground. 3-7 3.3 System Connection This section describes how to connect the E7000PC to an IBM PC via an IBM PC interface board. 3.3.1 IBM PC Interface Board Specifications Table 3-1 IBM PC Interface Board Specifications Item Specification Target personal computer IBM PC conforming to an AT bus or compatible computer System bus AT bus Memory requirement 16 kbytes Memory allocation By switches Memory for the interface board can be allocated within the address range from H'A0000 to H'FFFFF at any 16-kbyte boundary. Interrupt One interrupt must be selected from IRQ03, IRQ05, IRQ11, and IRQ12; unnecessary, however, if not used by application software*2. Interrupt selection By switches I/O area No I/O area for this IBM PC interface board Note: In this manual, application software refers to software such as IBM PC interface software that uses the IBM PC interface board. 3-8 3.3.2 Setting the Switches on the IBM PC Interface Board Allocating the Memory Area: The IBM PC interface board uses 16 kbytes of memory on the IBM PC. This memory must be allocated to a memory area on the IBM PC using switches on the IBM PC interface board. Specifically, it can be allocated to any 16-kbyte block within the address range H'A0000 to H'FFFFF (figure 3-8). Note that the allocated memory area must not overlap memory already allocated to other boards. At shipment, the memory area of the IBM PC interface board is allocated to the address range from H'D0000 to H'D3FFF. H'A0000 H'A4000 H'A8000 H'AC000 H'B0000 H'B4000 H'B8000 H'BC000 H'C0000 H'C4000 H'C8000 H'CC000 H'D0000 At shipment H'D4000 H'D8000 H'DC000 H'E0000 H'E4000 H'E8000 H'EC000 H'F0000 H'F4000 H'F8000 H'FC000 H'FFFFF Figure 3-8 Memory Areas Allocatable for the IBM PC Interface Board 3-9 Selecting an Interrupt: One of four IBM PC interrupts can be selected by switches on the IBM PC interface board for application software that uses IBM PC interrupts. Make sure that application software for this board uses IBM PC interrupts before setting the switches. Available interrupts are listed in table 3-2. Select one interrupt level in table 3-2 which is not used for other boards on the IBM PC. IRQ11 is set at shipment. Table 3-2 Available Interrupts Interrupt Remarks IRQ11 At shipment IRQ12 IRQ03 IRQ05 Setting the Switches: Eight switches are provided on the IBM PC interface board to allocate memory and select an interrupt. Figure 3-9 shows how to set these switches. The switch select conditions are listed in tables 3-3 and 3-4. Switch 8 is reserved for future use and must be closed. IBM PC interface board DSW1 DSW1 1 2 3 4 5 6 7 8 OPEN O P E N O P E N (a) Open Figure 3-9 Switches on the IBM PC Interface Board 3-10 (b) Closed Table 3-3 Memory Allocation and Switch Settings Switch Settings IBM PC Address Range 1 2 3 4 5 H'A0000 to H'A3FFF Closed Closed Closed Open Closed H'A4000 to H'A7FFF Open Closed Closed Open Closed H'A8000 to H'ABFFF Closed Open Closed Open Closed H'AC000 to H'AFFFF Open Open Closed Open Closed H'B0000 to H'B3FFF Closed Closed Open Open Closed H'B4000 to H'B7FFF Open Closed Open Open Closed H'B8000 to H'BBFFF Closed Open Open Open Closed H'BC000 to H'BFFFF Open Open Open Open Closed H'C0000 to H'C3FFF Closed Closed Closed Closed Open H'C4000 to H'C7FFF Open Closed Closed Closed Open H'C8000 to H'CBFFF Closed Open Closed Closed Open H'CC000 to H'CFFFF Open Open Closed Closed Open H'D0000 to H'D3FFF Closed Closed Open Closed Open H'D4000 to H'D7FFF Open Closed Open Closed Open H'D8000 to H'DBFFF Closed Open Open Closed Open H'DC000 to H'DFFFF Open Open Open Closed Open H'E0000 to H'E3FFF Closed Closed Closed Open Open H'E4000 to H'E7FFF Open Closed Closed Open Open H'E8000 to H'EBFFF Closed Open Closed Open Open H'EC000 to H'EFFFF Open Open Closed Open Open H'F0000 to H'F3FFF Closed Closed Open Open Open H'F4000 to H'F7FFF Open Closed Open Open Open H'F8000 to H'FBFFF Closed Open Open Open Open H'FC000 to H'FFFFF Open Open Open Open Open Remarks At shipment Table 3-4 Interrupts and Switch Setting Interrupt Switch 6 Switch 7 Remarks IRQ11 Closed Closed At shipment IRQ12 Closed Open IRQ03 Open Closed IRQ05 Open Open Notes: 1. Set switches 6 and 7 closed (default at shipment) when interrupts are not used by application software that runs on the IBM PC interface board. 2. Switch 8 is reserved for future use and must be closed. 3-11 3.3.3 Installing the IBM PC Interface Board Open the IBM PC cover and install the IBM PC interface board into an expansion slot conforming to AT bus specifications. Gently push the IBM PC interface board into the connector and fasten the board with the IBM PC screw (figure 3-10). IBM PC screw PC interface cable IBM PC IBM PC interface board Slot conforming to AT-bus specifications Figure 3-10 Installing IBM PC Interface Board 3-12 3.3.4 Connecting the IBM PC Interface Board to the E7000PC Emulator Station To use the E7000PC emulator, connect the IBM PC interface board to the E7000PC emulator station via the supplied PC interface cable, as shown in figure 3-11. E7000PC emulator station (rear side) IBM PC IBM PC interface board CRT EML PC PC interface cable Figure 3-11 Connecting IBM PC Interface Board to E7000PC Emulator Station 3-13 3.4 System Software Installation 3.4.1 E7000PC System Disk The E7000PC system program must be installed in the IBM PC because the E7000PC does not have a floppy disk drive. Two system disks are provided with the H8/3048 emulator pod. Use the E7000PC system disk labelled as E7000PC under the HITACHI label; the one labeled as E7000 is for the E7000 and cannot be used for the E7000PC (figure 3-12). H8/3048 E7000PC SYSTEM H8/3048 E7000 SYSTEM 1. SYSTEM (HS3048EPD70SF) Vn.m 1. SYSTEM (HS3048EPD70SF) Vn.m 2. PC I/F 2. DIAGNOSTIC TEST (HS7000EII01SF) 3. DIAGNOSTIC TEST XX.XX.XX Vn.m Vn.m Vn.m HITACHI XX.XX.XX E7000PC HITACHI E7000 (2) E7000 system disk (1) E7000PC system disk Figure 3-12 E70000PC System Disk The E7000PC system disk is formatted as a 1.44-Mbyte disk on the IBM PC, and includes the following five files: * * * * * E7000.SYS H8POD348.SYS H8CNF348.SYS DIAG.TM IPI.EXE (IBM PC interface software) These files must be installed on the IBM PC. To use the E7000PC, interface software must be running on the IBM PC. IBM PC interface software is in the E7000PC system disk supplied with the emulator pod. 3-14 3.4.2 Installation Copying E7000PC System Program: Copy all files in the E7000PC system disk to the IBM PC. Specify the copy destination directory in an environment variable when using the interface software*1. Setting Environment Variable: Before using the interface software, specify the interface software memory address in an environment variable. The most convenient way to do this is to add the following command to the file AUTOEXEC.BAT. SET E7000SYS = [] [,[] ,[SET E7000SYS=C:\E7000\H8300H, 04, D8 (RET) Copying Interface Software: Copy the interface software (IPI.EXE) and specify the path name for the directory. Notes: 1. The E7000PC system disk contains this interface software (IPI.EXE). However, the interface software can be copied to another directory. 2. It is also possible to specify an environment variable with a name other than E7000SYS when starting up the IBM PC interface software (IPI.EXE). Example: C:\>SET E7000SYS=C:\E7000,1B,D0 ..........Specify the default environment variable C:\>SET E7000=C:\E7000\H8300H,1B,D4 ...Specify E7000 as the environment variable C:\>IPI E7000 .................................................Initiate the IPI (with E7000 as the environment variable) C:\>IPI ............................................................Initiate the IPI (with the default environment variable) 3-15 3.5 Power-On Procedure for the E7000PC Figure 3-13 shows the E7000PC power-on procedure. 1. Initiate the interface software on the IBM PC. 2. Power on the emulator station. Internal system test is executed. 3. Console messages are displayed. Test result OK? No Yes 4. E7000PC monitor command input wait state 4. Error message is displayed. Refer to section 5, Troubleshooting, in Part III, Emulator Function Guide. Figure 3-13 Power-On Procedure for the E7000PC For initiating the interface software, refer to section 3.7.1, Initiating Interface Software. For operations after power-on, refer to section 3.6.1, E7000PC Monitor Initiation, and section 3.6.2, E7000PC System Program Initiation. 3-16 3.6 E7000PC Monitor Commands 3.6.1 E7000PC Monitor Initiation When the E7000PC is turned on and the interface software is activated, the following messages are displayed. Console Messages: E7000 MONITOR Vn.m Copyright (C) 19xx Hitachi, Ltd. (a) Licensed Material of Hitachi, Ltd. TESTING RAM 0123 (b) START E7000 S:START E7000 R: RELOAD & START E7000 L: DISPLAY LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/L/T) ? _ (c) Descriptions: (a) E7000PC monitor start message. Vn.m is the E7000PC monitor's version number. If this message is not displayed, determine what is wrong by reading section 5, Troubleshooting in Part III, Emulator Function Guide. (b) The E7000PC internal system is being tested. A number from 0 to 3 is displayed when each of the four MCU internal RAM blocks has been tested. If an error occurs, the following messages are displayed: *** RAM ERROR ADDR = xxxxxxxx W-DATA = xxxxxxxx R-DATA = xxxxxxxx *** xxxxx REGISTER ERROR W-DATA = xxxx R-DATA = xxxx If these messages are displayed, refer to section 5, Troubleshooting in Part III, Emulator Function Guide. (c) List of E7000PC monitor commands. Enter the required command at the cursor position. These commands are described in table 3-5. When an L command is specified, the E7000PC will prompt for another command after execution is completed. After the system program has been loaded by an S or R command, the QUIT command ends the system program execution and returns the E7000PC monitor to command input wait state. 3-17 Table 3-5 E7000PC Monitor Commands Command Function Reference Section S E7000PC system program initiation Section 3.6.2, E7000PC Initiates the system program. When the system System Program Initiation program has not been loaded, this command loads it from the floppy disk and then initiates the system. R E7000PC system program reload Loads and initiates a different system program from the loaded system program. Section 3.6.2, E7000PC System Program Initiation L IP address display Displays the E7000PC IP address. This command is reserved for future use. T Diagnostic Program Initiation Attached diagnostic Loads and initiates the diagnostic program in the program manual E7000 system floppy disk. If a problem occurs, use this command to initiate the diagnostic program. 3-18 3.6.2 E7000PC System Program Initiation The E7000PC system program must be loaded and initiated before initiating the E7000PC. If S or R is entered, followed by (RET), when the E7000PC is in monitor command input wait state, the E7000PC system program is loaded from the IBM PC and initiated. Table 3-6 E7000PC System Program Initiation Commands Command Description S Loads and initiates the system program from the IBM PC. If the E7000PC system program is already loaded, the system program is initiated immediately.* R Reloads and initiates the E7000PC system program. Note: This situation occurs when the system program is initiated and then terminated with the QUIT command. However, when emulator monitor command T (diagnostic program initiation) has been executed or when the system program has been forcibly terminated by a clock error, the system program is reloaded. 3-19 Display at E7000PC System Program Initiation START E7000 S: START E7000 R: RELOAD & START E7000 L: DISPLAY LAN PARAMETER T: START DIAGNOSTIC TEST (S/R/L/T) ? S (RET) R { ** (a) } E7000 SYSTEM LOADING ** (b) H8/xxxx E7000 (HSxxxxEPDxxSF) Vn.m Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. (c) CONFIGURATION FILE LOADING LAN IP ADDRESS FILE LOADING HARD WARE REGISTER READ/WRITE CHECK POD SYSTEM LOADING EMULATOR POD TEST ** RESET IN BY E7000 ! CLOCK = xxxx MCU NAME=H8/xxxx MODE=x PIN=xxx (MD x-x=x) REMAINS EMULATION MEMORY S=xxxxx/xxxxxx (d) (e) (f) (g) (h) (i) (j) (k) (l) WARM OR COLD START file name: WARM START return : COLD START (RET) (file name/return) ? (RET) : (m) { } 3-20 (n) Description (a) E7000PC monitor command input request message. Enter S. Enter R if loading another E7000PC system program. (b) The E7000PC system program is being loaded from the IBM PC. (c) Start message of the E7000PC system program. Vn.m is the version number. (d) Configuration file is being loaded from the IBM PC. (e) IP address file for the LAN is being loaded from the IBM PC. (Note that the LAN cannot be used by the E7000PC.) (f) Emulator station hardware test start message. If there is an error in the emulator station, an error message is displayed. For details, refer to section 5, Troubleshooting, in Part III, Emulator Function Guide. (g) The program to be executed in the emulator pod is being loaded from the IBM PC. (h) Emulator pod test start message. If there is an error in the emulator pod, an error message is displayed. For details, refer to section 5, Troubleshooting, in Part III, Emulator Function Guide. (i) An RES signal has been input to the MCU. (j) Specified clock. If the user system is ready, the user system's clock (U) is used. If not, but the crystal oscillator (X) is ready, the crystal oscillator is used. If neither the user system clock or the oscillator clock is ready, the 13-MHz E7000PC internal clock is used. (k) MCU type, MCU operating mode, number of pins, and user system mode selection pin state. They are previously set with the MODE command (saved in configuration file). For details, refer to section 7.2.28, MODE, in Part III, Emulator Function Guide. (l) Remaining emulation memory size (m) Specify either WARM START*1 or COLD START*2 as follows: WARM START: Specify the file name containing recovery information. COLD START: Press the (RET) key. (n) E7000PC system program prompt. An E7000PC system program command can now be entered. 3-21 Notes: 1. WARM START recovers the information saved in a file when the E7000PC system program was terminated by the QUIT command. (For details, refer to section 7.2.33 QUIT, in Part III, Emulator Function Guide.) The recovery information is listed below. * * * * * * PC breakpoints Hardware break conditions, trace stop conditions, and trace acquisition conditions Memory map information Performance analysis information Configuration information Symbol information 2. COLD START initializes the above emulation information. 3-22 3.7 Interface Software Operations 3.7.1 Initiating Interface Software The IBM PC interface software is initiated by inputting the IPI command. An example is shown below. C>IPI (a) H-SERIES PC INTERFACE (HS7000EII01SF) Ver n.m Copyright(c) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. (b) INTERFACE BOARD ADDRESS=yyyy:zzzz,TERMINATE CODE=tt (c) (E7000PC commands can be entered here) (d) (e) C> Description: (a) Initiate the interface software. (b) The interface software start-up message is displayed. Ver n.m represents the interface software version number. (c) Memory address where the interface board is allocated. yyyy indicates the segment, zzzz indicates the offset, and tt indicates the interface software termination code. (d) The E7000PC operations can start here. When the E7000PC power is turned on, the E7000PC will enter the state described in section 3.6.1, E7000PC Monitor Initiation. (e) Enter the termination key to terminate the interface software and return the E7000PC to the IBM PC command input wait state. For more details on the termination key, refer to section 3.4.2, Installation. 3-23 3.7.2 Initiating from Windows*1 To initiate the interface software under Windows, initiate from MS-DOS*2 prompt in the main group of Window's program manager. Note that multiple copies of the software cannot be initiated. If virtual EMS driver (EMM386.EXE) is installed with the CONFIG.SYS file, the CONFIG.SYS file must be modified. Set the memory address range to be accessed by the IBM PC interface software outside the EMS driver management range. The following example sets the memory address range of IBM PC interface software from D000:0000 to D3FF:0000 outside the EMS driver management range. DEVICE = C:\WINDOWS\EMM386.EXE M9 /X = D000-D3FF Notes: 1. Windows is a trademark of Microsoft Corporation. 2. MS-DOS is a registered trademark of Microsoft Corporation. 3.7.3 Emulation Support Function This interface software provides two emulation support functions: automatic command input from IBM PC files, and logging acquisition of the console output to IBM PC files or a printer. These functions can only be invoked when the E7000PC is in the command input wait state, not in the data input wait state. Examples of the command input wait state and the data input wait state are shown below. * Command input wait state : # * The E7000PC is in the command input wait state when it provides either of these prompts. Data input wait state (MEMORY command) :MEMORY 100(RET) 00000100 00 ? 11(RET) 00000101 00 ? Input data in the data input wait state Data input wait state 3-24 Automatic Command Input: (1) To specify a command file (input file), input < and a file name without any space between the two as shown below. Example: : followed by a file name without any space between the two. Examples of starting and quitting logging are shown below. Examples: : >FILENAME(RET) To overwrite a file : >>FILENAME(RET) To add to a file : >-(RET) To quit logging (2) If logging acquisition is specified with this command, the subsequent command input, execution results, and error messages will be displayed on the console and output to the file with the specified file name. If PRN is specified for the file name, the output will be sent to the printer. (3) The following message will be displayed if you attempt to overwrite an existing file. INTFC ERROR - FILE ALREADY EXISTS OVERWRITE ? (Y/N) : (a) (a): Input Y to overwrite the file or N to quit. (4) The following messages will not be logged. -- The program counter during GO command execution -- Addresses during loading, saving, and verifying 3-26 3.7.4 Notes (1) The MS-DOS may display an error message during file transfer. When the error message is displayed before file transfer starts, such as when no floppy disk has been inserted to the specified drive, when an access to an unformatted floppy disk is specified, or when writing on a write-protected floppy disk is specified, remove the cause of the error and then enter R to recover. When the error message is displayed during file transfer, file transfer may not be completed successfully even after recovery from the error (R) is specified. Entering A to terminate the error processing terminates the interface software. (2) Pressing the (BREAK), (STOP), or (CTRL) +C keys during file transfer forcibly terminates the file transfer. Pressing the termination key during file transfer has no meaning. (3) If the save operation results in an error, the interface software displays the received data and waits for the E7000PC command input. (4) When a file is written to the IBM PC disk, it is first created as a temporary file with file type $$$, and will only be renamed with the specified file type when it is closed normally. At this stage, the existing file, if any, will be erased. If a forced termination occurs while writing the file, the temporary file will be erased, and the existing file will be left behind. (5) When the E7000PC is initiated before the interface software, the message issued by the E7000PC before the interface software initiation cannot be displayed. 3-27 Section 4 Operating Examples Section 4.1, Basic Examples, and section 4.2, Application Examples, include explanations based on the following user program. ADDR 000100 000106 000108 00010A 00010C 00010E 000110 000112 000116 CODE 7A0700FF FF0E F800 F900 8802 8901 A90A 46F8 6A881000 40FE LABEL MNEMONIC MOV.L OPERAND #00FFFF0E:32,ER7 MOV.B MOV.B ADD.B ADD.B CMP.B BNE MOV.B BRA #00:8,R0L #00:8,R1L #02:8,R0L #01:8,R1L #0A:8,R1L 00010A:8 R0L,@1000:16 000116:8 These examples assume that the emulator station is connected to the host system (IBM PC) via the PC interface, that the E7000PC system program has been installed in the host system, and that the user program is downloaded from the host system to the E7000PC. Therefore, store the program in the host system before initiating the E7000PC. Initiate the E7000PC by the following procedure: Operations Console Message 1. C> IPI (RET) Input the IPI command to the IBM PC. 4-1 2. Turn on the power on the E7000PC emulator station. The console displays the message shown on the right when the PC interface program operates. H-SERIES PC INTERFACE (HS7000EII01SF) Ver n. m Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. INTERFACE BOARD ADDRESS=yyyy:zzzz, TERMINATE CODE=tt E7000 MONITOR Vn. m Copyright (C) 19xx Hitachi, Ltd. Licensed Material of Hitachi, Ltd. TESTING RAM 0123 START E7000 S : START E7000 R : RELOAD & START E7000 L : DISPLAY LAN PARAMETER T : START DIAGNOSTIC TEST 3. Enter S and (RET) to start up the E7000PC system. (S/R/L/T) ? S (RET) 4-2 4.1 Basic Examples 4.1.1 Preparing for Connection of IBM PC Before connecting the host system, specify the host name and the IP address by the following procedure: Operations Console Message 1. C>IPI (RET) To start up the PC interface software, enter the IPI command at the IBM PC. The console displays the message shown on the right and the E7000PC enters the monitor command input wait state. H-SERIES PC INTERFACE (HS7000EII01SF) Ver n. m Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. INTERFACE BOARD ADDRESS=yyyy:zzzz, TERMINATE CODE=tt E7000 MONITOR Vn. m Copyright (C) 19xx Hitachi, Ltd. Licensed Material of Hitachi, Ltd. TESTING RAM 0123 START E7000 S : START E7000 R : RELOAD & START E7000 L : DISPLAY LAN PARAMETER T : START DIAGNOSTIC TEST 2. Enter S (RET) to re-initiate the system. (S/R/L/T) ? S (RET) ** E7000 SYSTEM LOADING ** H8/xxxx E7000 (HSxxxxEPDxxSF) Vn. m Copyright (C) Hitachi, Ltd. 19xx Licensed Material of Hitachi, Ltd. CONFIGURATION FILE LOADING LAN IP ADDRESS FILE LOADING HARD WARE REGISTER READ/WRITE CHECK POD SYSTEM LOADING EMULATOR POD TEST ** RESET IN BY E7000 ! CLOCK = xx MHz 4-3 MCU NAME = H8/xxxx MODE=x PIN=xxx (MD x-x=x) REMAINS EMULATION MEMORY S=xxxxx/E=xxxxxx WARM OR COLD START file name: WARM START return 3. Enter (RET). : COLD START (file name/return) ? (RET) :_ 4-4 4.1.2 Specifying the MCU Operating Mode Specify the E7000PC operating mode and the MCU operating mode by the following procedure: Operations Console Message 1. Enter MODE;C (RET) to specify the E7000 operating mode. :MODE;C (RET) 2. The console displays the message. MCU NAME (1:H8/3048,2:H8/3047,3:H8/3044,4:H8/3048F) ? _ 3 Enter 1 (RET) to select the H8/3048. MCU NAME (1:H8/3048,2:H8/3047,3:H8/3044,4:H8/3048F) ? 1 (RET) 4 5. Enter 3 (RET) to select MCU operating mode 3. OPERATION MODE ? OPERATION MODE ? 3 (RET) After the above specification has been completed, the console asks if the mode settings should be stored in the configuration file. To store the mode settings, enter Y (RET). After that, the E7000 operates in the mode specified above whenever initiated with this system disk. To correct a mis-typed mode number, return to step 1 above before entering Y (RET) and repeat the procedure. Remove the write protect from the system floppy disk before storing the mode settings in the configuration file. CONFIGURATION WRITE OK ? (Y/N) ? _ CONFIGURATION WRITE OK ? (Y/N ) ? Y(RET) START E7000 S : START E7000 6. After the mode settings have been stored in the configuration file, the E7000 system program automatically terminates. R : RELOAD & START E7000 L : DISPLAY LAN PARAMETER T : START DIAGNOSTIC TEST (S/R/L/T) ? _ 7. Enter S (RET) to re-initiate the system program. (S/R/L/T) ? S (RET) WARM OR COLD START file name: WARM START return : COLD START (file name/return) ? _ 8. Enter (RET). (file name/return) ? (RET) 4-5 4.1.3 Allocating Standard Emulation Memory and Specifying Attributes In order to load the user program to memory, allocate the standard emulation memory in the pods by the following procedure: Operations Console Message :MAP 0 1FFFF;S (RET) Enter MAP 0 1FFFF;S (RET) to allocate the standard emulation memory to addresses H'0 to H'1FFFF. The console displays the message shown on the right, which indicates that the memory allocation has been completed. Enter MAP (RET) and the console displays the attributes of all the memory areas. REMAINS EMULATION MEMORY S=60000/E=000000 :MAP (RET) 000000 - 01FFFF;S 020000 - FFFFFF;U INTERNAL RAM = FFEF10 - FFFF0F INTERNAL I/O = FFFF1C - FFFFFF REMAINS EMULATION MEMORY S=60000/E=000000 4-6 4.1.4 Executing Program Execute the loaded program by the following procedure: Operations Console Message 1. : .SP (RET) Enter .SP (RET) then FFFF0E (RET) as the SP value to set the stack pointer (SP) to H'FFFF0E. The console then asks for the program counter (PC) value. Enter 100 (RET) as the program counter value. The console then asks for the condition code register (CCR) value. In this example, the condition code register need not be set or changed, therefore, enter . (RET) to exit this interactive mode. ER7(SP) =00FFFF1A ? _ ER7(SP) =00FFFF1A ? FFFF0E (RET) PC = FFFFFF ? _ PC = FFFFFF ? 100 (RET) CCR = 80:I****** ? _ CCR = 80:I****** ? .(RET) :_ Note: In interactive mode, entering only (RET) makes no change to the currently displayed item, and the next item is displayed. In the above example, entering only (RET) to the condition code register prompt can complete the register modification procedure. The register value can also be directly input without using the interactive mode. For example, to set the stack pointer value directly, enter .SP FFFF0E (RET). 2. 3. Enter GO (RET) to execute the program from the address pointed by the PC. While the program is executed, the console displays the current program counter value (shown as xxxxxx on the right). :GO (RET) Enter (BREAK) key or (CTRL) + C keys to terminate program execution. The console displays the contents of the program counter, the condition code register, and the general registers ER0 to ER7 at termination. RUN - TIME shows the duration of program execution from the GO command execution to (BREAK) or (CTRL) + C key input. BREAK KEY shows that the execution has been terminated because (BREAK) or (CTRL) + C was entered. (BREAK) ** PC = xxxxxx PC = 000116 CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:01S:049705US BREAK KEY : _ 4-7 4.1.5 PC Break Program execution can be stopped at a particular address by setting a breakpoint as follows: Operations Console Message 1. Enter BREAK 10C (RET) to terminate program execution when the instruction at address H'10C in the program is executed. :BREAK 10C (RET) 2. Restart program execution from address H'100. This can be done in two ways: one is to enter the start address directly, and the other is to first set the program counter to H'100, then enter GO, as described in section 4.1.4, Executing Program. :GO 100 (RET) The program execution terminates when the instruction at address H'10C is executed. The console displays the data shown on the right. The BREAK POINT 00010C shows that the program execution was terminated because of a PC breakpoint at H'10C. PC = 00010E 3. ** PC = xxxxxx 4-8 CCR=80:I******* ER0 - ER3 00000002 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000014US BREAK POINT 00010C : _ 4.1.6 Single-Step Execution A single instruction can be executed using the single-step function by the following procedure: Operations Console Message 1. The program counter points to the next address to be executed when the program execution terminates in the example of section 4.1.5, PC Break. Here, entering STEP (RET) executes only one instruction, and the console displays the information as shown on the right. 00010E CMP.B #0A:8,R1L shows the executed address and mnemonic code, and STEP NORMAL END shows that the single-step execution has terminated. :STEP (RET) To repeat single-step execution, enter only (RET). This can be repeated until another command is executed. :(RET) 2. PC = 000110 CCR=A9:I*H*N**C ER0 - ER3 00000002 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E 00010E CMP.B #0A:8,R1L STEP NORMAL END :_ PC = 00010A CCR=A9:I*H*N**C ER0 - ER3 00000002 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E 000110 BNE STEP NORMAL END :_ 4-9 00010A:8 4.1.7 Setting Hardware Break Conditions Various hardware break conditions can be specified by the following procedure: Operations Console Message 1. Enter BREAK - (RET) to cancel the breakpoint set in the example in section 4.1.5, PC Break. :BREAK - (RET) 2. To confirm the cancellation, execute the BREAK command (enter BREAK (RET)). *** 45: NOT FOUND shows that no PC breakpoint is set. :BREAK (RET) 3. To specify that program execution should terminate when data is written to address H'1000, enter BREAK_CONDITION1 A = 1000 W (RET). :BREAK_CONDITION1 A = 1000 W (RET) 4. Enter GO 100 (RET) to start executing the program from address H'100. When the break condition is satisfied, the console displays the information shown on the right. BREAK CONDITION1 shows that the program execution has terminated because the break condition was satisfied. :GO 100 (RET) *** 45: NOT FOUND ** PC = xxxxxx PC = 000116 CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000093US BREAK CONDITION1 :_ 4-10 4.1.8 Displaying Trace Information Trace information acquired during program execution can be displayed by the following procedure: Operations Console Message 1. :TRACE (RET) Enter TRACE (RET) to see the trace information. The console will display the instruction mnemonic information. IP ADDR LABEL 000100 MOV:L #00FFFF0E:32,ER7 *-D'00043 000106 MOV.B #00:8,R0L *-D'00042 000108 MOV.B #00:8,R1L *-D'00041 00010A ADD.B #02:8,R0L 00010C ADD.B #01:8,R1L : To display the trace information in buscycle units, enter TRACE;B (RET). BP * AB DB MA R/W 000100 : : :TRACE;B (RET) ST IRQ MOV.L NMI RES RA PROB VCC CLK #00FFFF0E:32,ER7 -D'00123 000100 79 EXT R PRG 111111 1 1 11 11111111 1 08 -D'00122 000101 07 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00121 000102 79 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00120 000103 07 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00119 000104 FF EXT R PRG 111111 1 1 11 11111111 1 06 -D'00118 000105 FE EXT R PRG 111111 1 1 11 11111111 1 06 -D'00117 000106 F8 EXT R PRG 111111 1 1 11 11111111 1 06 -D'00116 000107 00 EXT R PRG 111111 1 1 11 11111111 1 06 * 000106 MOV.B : 3. OPERAND *-D'00044 *-D'00040 2. MNEMONIC To temporarily stop the trace information display, enter (CTRL)+S. To continue the display, enter (CTRL)+Q. (CTRL)+S and (CTRL)+Q are also effective on other information display. #00:8,R0L : : (CTRL)+S (CTRL)+Q 4-11 4.2 Application Examples 4.2.1 Break with Pass Count Condition The pass count condition can be set to a breakpoint by the following procedure: Operations Console Message 1. Enter BREAK 10A 5 (RET) to terminate program execution when address 10A is passed five times. :BREAK 10A 5 (RET) 2. To start execution from address H'100, enter GO 100 (RET). :GO 100 (RET) When execution terminates after address H'10A is passed five times, the console displays the data shown on the right. PC = 00010C 3. ** PC = xxxxxx CCR=80:I******* ER0 - ER3 0000000A 00000004 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000058US BREAK POINT 0010A :_ :BREAK (RET) 4. Entering BREAK (RET) displays (a) the breakpoint address, (b) the specified count, and (c) the pass count as shown on the right. The pass count is cleared when the GO command is entered again. ADDRESS CNT PASS 00010A 0005 0005 (a) (b) (c) 4-12 SYMBOL 4.2.2 Conditional Trace The following procedure can be used to limit the acquisition of trace information during program execution. Operations Console Message 1. To cancel the breakpoint set in the example of section 4.2.1, Break with Pass Count Condition, enter BREAK - (RET). :BREAK - (RET) 2. Enter TRACE_CONDITION A=100:106;R (RET) to get trace information only while the program counter is between addresses H'100 and H'106. :TRACE_CONDITION A= 100:106;R (RET) 3. Enter GO 100 (RET) to start executing the program, then (BREAK) key or (CTRL) + C keys to terminate the execution. :GO 100 (RET) ** PC = xxxxxx PC = 000106 (BREAK) CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:01S:049705US BREAK KEY :_ 4. Enter TRACE (RET) to display the trace information acquired under the specified condition. :TRACE (RET) IP ADDR * D'***** 000100 * D'***** 000106 LABEL : 4-13 MNEMONIC OPERAND MOV.L #00FFFF0E:32,ER7 MOV.B #00:8,R0L 4.2.3 Parallel Mode During program execution in parallel mode, the memory contents can be displayed or modified by the following procedure: Operations Console Message 1. :GO 100 (RET) After executing the GO command, enter (RET) to move to parallel mode. ** PC = xxxxxx (RET) #_ 2. Enter DUMP 1000 100F (RET) to display the memory contents from H'1000 to H'100F. #DUMP 1000 100F (RET) 001000 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3. Enter MEMORY 117 EE (RET) to modify the contents of memory address H'117 into EE. #MEMORY 117 EE (RET) 4. To exit from parallel mode, enter END (RET). #END (RET) ". . . . . . . . . . . . . . . ." ** PC = xxxxxx (BREAK) 5. To terminate program execution, enter (BREAK) key or (CTRL) + C keys. PC = 000116 CCR=80:I******* ER0 - ER3 00000014 0000000A 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:07M:25S:441007US BREAK KEY :_ 6. Enter DISASSEMBLE 100 117 (RET) to confirm that the program has been changed by memory modification in parallel mode. : DISASSEMBLE 100 117 (RET) 4-14 ADDR CODE 000100 7A0700FF LABEL MNEMONIC OPERAND MOV.L #00FFFF0E:32,ER7 #00:8,R0L FF0E 000106 F800 MOV.B 000108 F900 MOV.B #00:8,R1L 00010A 8802 ADD.B #02:8,R0L 00010C 8901 ADD.B #01:8,R1L 00010E A90A CMP.B #0A:8,R1L 000110 46F8 BNE 00010A:8 000112 6A881000 MOV.B R0L,@1000:16 000116 40EE BRA 000106:8 4.2.4 Searching Trace Information The TRACE_SEARCH command can be used to search for a particular part of the acquired trace information. Console Message Operations Enter TRACE_SEARCH A=116 (RET), and the console will only display those parts of the trace information in which the address bus value is H'116. BP AB :TRACE_SEARCH A=116(RET) DB MA R/W ST IRQ NMI RES RA PROB VCC CLK -D'04077 000116 40 EXT R PRG 111111 1 1 11 11111111 1 06 -D'03964 000116 40 EXT R PRG 111111 1 1 11 11111111 1 06 -D'03851 000116 40 EXT R PRG 111111 1 1 11 11111111 1 06 : : : : : : 4-15 4.2.5 Sequential PC Break A break can be generated when specified addresses are passed in a specified order, using the BREAK_SEQUENCE command as follows: Operations Console Message 1. :BREAK_SEQUENCE 110 10A (RET) Enter BREAK_SEQUENCE 110 10A (RET), which terminates program execution when the instructions at addresses H'110 and H'10A are executed consecutively in that order, as shown in figure 4-1. ADDR CODE LABEL 000100 7A0700FF FF0E 000106 F800 000108 F900 00010A 8802 00010C 8901 00010E A90A 000110 46F8 000112 6A881000 000116 40EE MNEMONIC MOV.L Program execution flow OPERAND #00FFFF0E:32,ER7 MOV.B MOV.B ADD.B ADD.B CMP.B BNE MOV.B BRA #00:8,R0L #00:8,R1L #02:8,R0L #01:8,R1L #0A:8,R1L 00010A:8 R0L,@1000:16 000106:8 Figure 4-1 Program Execution Flow 2. Enter GO 100 (RET) to execute the program. When the specified condition is satisfied, execution terminates, and the console displays the data shown on the right. The BREAK SEQUENCE shows that execution has terminated because the condition specified in the BREAK_SEQUENCE command has been satisfied. :GO 100 (RET) ** PC = xxxxxx PC = 00010C CCR=80:I******* ER0 - ER3 00000004 00000001 00000000 00000000 ER4 - ER7 00000000 00000000 00000000 00FFFF0E RUN - TIME = D'0000H:00M:00S:000028US BREAK SEQUENCE :_ 4-16 3. Enter TRACE (RET) to confirm the executed instructions. :TRACE (RET) MNEMONIC OPERAND *-D'00007 IP ADDR 000100 MOV.L #00FFFF0E:32,ER7 *-D'00006 000106 MOV.B #00:8,R0L *-D'00005 000108 MOV.B #00:8,R1L *-D'00004 00010A ADD.B #02:8,R0L *-D'00003 00010C ADD.B #01:8,R1L *-D'00002 00010E CMP.B #0A:8,R1L *-D'00001 000110 BNE 00010A:8 * D'00000 00010A ADD.B #02:8,R0L :_ 4-17 LABEL Part III Emulator Function Guide Section 1 Emulator Functions 1.1 Overview This system is a hardware and software support tool for the development of systems incorporating H8/300H-series microcomputer, the H8/3048 series and H8/3048F. In addition to a high-speed CPU, the H8/3048 series contains internal ROM, internal RAM, timers, serial communication interface (one channel having an extended function for smart card interface), a refresh controller, DMAC, I/O ports, and A/D and D/A converters on a single chip. The H8/3048F has the same functions as the H8/3048 series except that it has flash memory instead of the internal ROM. Table 1-1 shows the differences between the H8/3048 series and H8/3048F functions. Table 1-1 Differences between the H8/3048 Series and H8/3048F Functions H8/3048 Series Function H8/3048 H8/3047 H8/3044 H8/3048F Maximum address space 16 MB 16 MB 16 MB 16 MB Internal ROM 128 kB 96 kB 32 kB -- Internal flash memory -- -- -- 128 kB Internal RAM 4 kB 4 kB 2 kB 4 kB 16-bit integrated timer unit Contains Contains Contains Contains Programmable timing pattern controller Contains Contains Contains Contains Watchdog timer 1 ch 1 ch 1 ch 1 ch Refresh controller 1 ch 1 ch 1 ch 1 ch Serial communication interface (extended function for smart card interface) 2 ch (1 ch) 2 ch (1 ch) 2 ch (1 ch) 2 ch (1 ch) DMAC 4 ch 4 ch 4 ch 4 ch A/D converters 10 bits x 8 ch 10 bits x 8 ch 10 bits x 8 ch 10 bits x 8 ch D/A converters 8 bits x 2 ch 8 bits x 2 ch 8 bits x 2 ch 8 bits x 2 ch Interrupt controllers External interrupts Internal interrupt sources 7 30 7 30 7 30 7 30 Pins 100 100 100 100 1-1 The emulator operates in just the same way as the MCU on the user system and enables realtime emulation of the user system with functions for efficiently debugging hardware and software. The emulator consists of a station, an emulator pod, and a user system interface cable. The descriptions in this manual apply to all H8/3048-series and H8/3048F MCUs unless otherwise specified. 1.2 Specification The main features of the emulator are its emulation functions, its floppy disk utility functions, and its host system interface functions, as listed in tables 1-2 to 1-4. Table 1-2 Emulation Functions Command Type Command Realtime emulation GO Break condition setting Function Reference Section Performs realtime emulation in the following cases. The operating frequency is 18 MHz at max. * Executes until a hardware or PC break condition is satisfied, or until the (CTRL) + C keys or (BREAK) key is pressed. * Cycle-reset mode: Executes while the RES signal is sent to the MCU at fixed intervals. (Effective for waveform measurement immediately after a reset) * Measures the execution time during a specified range. * Parallel mode: Displays trace data and modifies memory contents during emulation. 7.2.20 EXECUTION_ MODE * Specifies execution mode. 7.2.18 BREAK_ CONDITION 1,2,3,4 Sets hardware break conditions * Normal break: Breaks when the following condition is satisfied (up to four points): -- Address bus and data bus value -- Read/write condition -- External probe value (eight probes) -- External interrupt condition -- NOT condition -- Delay count -- Number of times a condition is satisfied * Specification of the satisfaction sequence up to four points 7.2.6 1-2 Table 1-2 Emulation Functions (cont) Reference Section Command Type Command Function Break condition setting (cont) BREAK Sets PC break conditions. 7.2.5 * Normal break: Sets breakpoints in memory including programs in the ROM area (255 points max). * Sets pass count. BREAK_ SEQUENCE * Sequential PC break up to four points 7.2.7 TRACE * Displays executed instruction mnemonic. * Displays the following data for each bus cycle: -- Instruction mnemonic -- Address and data bus value -- Access area and status -- MCU I/O control signals -- External probe value (eight probes) -- Clock count 7.2.45 TRACE_ CONDITION Sets trace condition. * Traces data only when a condition is satisfied. -- Address bus value (address range and NOT condition can also be specified.) -- Read/write condition -- Access type * Subroutine trace * Stops trace when a trace stop condition is satisfied. -- Address and data bus value -- Read/write condition -- Access type -- External probe value (eight probes) -- System control signals -- NOT condition -- Delay count * Outputs a low pulse from the trigger output pin when a condition is satisfied. -- Address and data bus value -- Read/write condition -- Access type -- External probe value (eight probes) -- System control signals -- NOT condition -- Delay count 7.2.46 TRACE_SEARCH Searches for trace data. 7.2.49 TRACE_MEMORY Specifies memory address to trace. 7.2.47 TRACE_MODE Specifies refresh cycle display. 7.2.48 Trace data acquisition and display 1-3 Table 1-2 Emulation Functions (cont) Reference Section Command Type Command Function Single-step execution STEP * Executes one step at a time, and 7.2.41 displays the following. -- Instruction mnemonic -- Memory contents -- Register contents * Executes displaying the above data for only branch instructions. * Executes displaying the above data for only specified routines. * This operation is performed for a specified number of steps or until a specified address is reached. STEP_ INFORMATION * Specifies information to be displayed during single-step execution. 7.2.42 STEP_OVER * Executes subroutine as a single step. 7.2.43 MEMORY, DUMP Displays or modifies memory contents in 1-, 2-, or 4-byte units. 7.2.27, 7.2.16 MAP Specifies memory attributes in 128-kbyte units. * User memory * Write-protected area (128-kbyte units) * Guarded memory area (128-kbyte units) * Emulation memory -- Standard installation: 512 kbytes (SRAM with no wait state) -- Options: 1 or 4 Mbytes (memory attributes specified in 1-Mbyte units; at 12 MHz or higher frequency, accessible in 3 states) 7.2.26 FILL Writes data in specified pattern. 7.2.19 DATA_SEARCH, DATA_CHANGE Searches for and replaces data in specified pattern. 7.2.13, 7.2.12 CLOCK Selects emulator internal clock. * 13 MHz * 18 MHz Selects user system clock. * 1 to 18 MHz Selects crystal oscillator clock installed on the emulator pod. * 8 to 18 MHz 7.2.9 Memory access Clock selection 1-4 Table 1-2 Emulation Functions (cont) Command Type Command Function Reference Section Register access REGISTER, . Displays and modifies MCU register contents of the MCU. 7.2.35, 7.2.1 Line assembly ASSEMBLE Assembles instruction mnemonics and modifies memory contents. * Enables use of labels and symbol names. 7.2.4 Disassembly DISASSEMBLE Disassembles memory contents. * Displays labels and symbol names. 7.2.14 Execution time, pass count measurement GO, PERFORMANCE_ ANALYSIS Measures GO command execution time. * Measures total run-time (approx. 305 hours max). * Measures execution time and pass count of the specified range. 7.2.20, 7.2.31 TRACE Counts clocks in each bus cycle. 7.2.45 FILL Reads and writes the specified data to the memory. 7.2.19 CHECK Tests MCU I/O signals. 7.2.8 DISPLAY_ COVERAGE, SET_COVERAGE Provides C0 coverage trace. * Traces addresses executed by the MCU during user program execution. 7.2.15, 7.2.43 LOAD, INTFC_LOAD Loads symbols from host system. 9.4.2, 9.4.7 SYMBOL, SHORT_SYMBOL Defines, displays, and deletes symbols. 7.2.44, 7.2.39 ! & Displays symbol contents according to attributes associated with symbol names. * Function names, label names * Variables (simple variables, pointer variables, arrays) and structure names * Line numbers 7.2.2 COMMAND_ CHAIN * * * * Provides automatic input from file. Enables editing with cursor keys. Copies immediately preceding line. Copies operand of previous command. 7.2.10 RADIX Enables value input in binary, octal, decimal, hexadecimal, or ASCII characters. (Default can be specified) 7.2.34 Test functions Symbolic debugging Command input 1-5 Table 1-2 Emulation Functions (cont) Command Type Command Function Reference Section Results display PRINT Outputs to printer or file. 7.2.32 RESULT Displays emulation results. 7.2.27 EXECUTION_ MODE Sets pin status 7.2.18 GO Executes in boot programming mode 7.2.20 MOVE, MOVE_TO_RAM Transfers memory contents. * Memory to memory * ROM (user system memory) to emulation memory 7.2.29, 7.2.30 CONVERT Converts number display. * Displays in binary, octal, decimal, hexadecimal, or ASCII characters. 7.2.11 STATUS Displays emulator operating status. 7.2.40 GO Monitors emulation. * Monitors emulation status every 200 ms and displays abnormalities found during emulation. 7.2.20 RESET Inputs RES signal to MCU. 7.2.36 HELP Displays all commands. 7.2.21 HISTORY Displays the history of the input command. 7.2.22 Flash memory support Others 1-6 Table 1-3 Floppy Disk Utility Functions Reference Section Command Type Command Function Backup B (Monitor command) Backs up or verifies floppy disk. 3.6 in Part I File copy FILE_COPY Copies or verifies file contents. 8.4.1 Directory display FILE_ DIRECTORY Displays file directory information of the floppy disk. 8.4.2 Dump FILE_DUMP * Dumps or modifies floppy disk. * Dumps or modifies file. 8.4.3 File deletion FILE_ERASE Deletes file. 8.4.4 Data transfer to and from user memory FILE_LOAD Loads file contents into memory. 8.4.5 FILE_VERIFY Verifies file contents against memory. 8.4.9 FILE_SAVE Saves memory contents in file. 8.4.7 Format FLOPPY_FORMAT Formats and initializes floppy disk. 8.4.11 File contents display FILE_TYPE Displays file contents. 8.4.8 Rename FILE_RENAME Renames file. 8.4.6 Display free area FLOPPY_CHECK Displays free area on floppy disk. 8.4.10 1-7 Table 1-4 Host System Interface Functions Reference Section Command Type Command Function Interface condition setting HOST Sets the following for RS-232C interface: * Transfer rate (2400 to 38400 BPS) * Data length (7 or 8 bits) * Parity (even, odd, or none) * Number of stop bits (1 or 2 bits) * Busy control method (X-ON/X-OFF control or RTS/CTS control) 9.4.1 Program transfer to and from user system LOAD, INTFC_LOAD Loads contents from host system. 9.4.2, 9.4.7 VERIFY, INTFC_VERIFY Verifies file contents against memory. 9.4.6, 9.4.10 SAVE, INTFC_SAVE Saves memory contents in host system. 9.4.3, 9.4.8 Data transfer to and from floppy disk TRANSFER, INTFC_TRANSFER * Receives data from host system and writes it to file. * Transfers file contents to host system. 9.4.5, 9.4.9 Host system terminal selection TERMINAL Makes the console operate as a terminal of the host system. 9.4.4 1-8 1.3 Realtime Emulation The emulator enables realtime emulation for the MCU with no wait states. Realtime emulation consists of the following three modes: * * * Normal mode: Executes only emulation Cycle reset mode: Forcibly inputs the RES signal to the MCU at a specified period Parallel mode: Enables the user to display or modify memory and display trace information during user program execution The user can select the mode which best suits the user's debugging needs. The following describes each of these modes. 1.3.1 Normal Mode Normal Mode Function: This mode executes only user program emulation. Until a break condition is satisfied, the emulator executes the user program. When a hardware break condition or PC break condition is satisfied, the emulator stops program execution and outputs a low pulse only once from the trigger output probe. When a number of times for the PC break condition or sequential break is specified, the emulator outputs a low pulse from the trigger output probe every time the PC break condition is satisfied. Normal Mode Specification: Specifying no option with the GO command sets normal mode. 1-9 1.3.2 Cycle Reset Mode Cycle Reset Mode Function: The emulator inputs the RES signal to the MCU at a specified period during realtime emulation and repeats the execution from the reset state. The emulator outputs a low-level pulse from the trigger output probe at the same time when the RES signal is input to the MCU. This function is useful for observing waveforms from an initial state such as power-on reset to the specified time. User program Re-execution from reset address Program flow A low pulse is output from the TRIG output probe RES input to the MCU after specified time TRIG signal Figure 1-1 Cycle Reset Mode Cycle Reset Mode Specification: Set "R=n" as a GO command option to specify cycle reset mode. Emulation Stop: In cycle reset mode, hardware break conditions and PC break conditions are ignored. To stop emulation, press the (CTRL) + C keys or the (BREAK) key. Note: When the emulator displays trace information after emulation terminates, disassembly of the instruction just before input of the RES signal may not be correct. If so, the mnemonic display will be .DATA. 1-10 Trigger Signal Output Timing in Cycle Reset Mode: In cycle reset mode, the emulator inputs the RES signal to the MCU when the time specified by a command passes. Figure 1-2 shows the timing for output from the trigger output probe in cycle reset mode. Time specified by a command TRIG (RES) 16 s Figure 1-2 Trigger Signal Output Timing 1-11 1.3.3 Parallel Mode Parallel Mode Function: In parallel mode, the emulator can display or modify memory or display trace information during realtime emulation. Parallel Mode Specification: Parallel mode can be activated during GO command realtime emulation by any of the following methods as shown in figure 1-3. * * * Press the (RET) key Press the space key Satisfy a trace stop condition specified by the TRACE_CONDITION command If any of the above occurs, the emulator will display a prompt (#) and enter parallel mode command input wait state. Emulation, however, continues without interruption. Executing the ABORT command terminates parallel mode. (RET) key input or trace condition satisfaction Parallel mode (a) END (RET) input Normal mode (SPACE) key input A command execution Parallel mode (b) Figure 1-3 Transition to Parallel Mode 1-12 User program Program flow * Pressing the (RET) key * Pressing the space key * Satisfying the trace stop condition A prompt (#) is displayed and the emulator waits for command input in parallel mode Program does not stop Figure 1-4 Parallel Mode Note that debugging differs in parallel mode operation depending on the method used to activate it, as follows. * By pressing the (RET) key or satisfying a trace stop condition -- The emulator stops acquiring trace information as soon as parallel mode is entered. -- The emulator can execute multiple commands entered by the user in parallel mode. -- The END command terminates the parallel mode and returns the emulator to normal mode (displays the current PC). At this time, the emulator restarts detecting trace information acquisition conditions. * By pressing the space key -- The emulator continues trace information acquisition; however, while the emulator executes the TRACE, TRACE_SEARCH, TRACE_CONDITION, or TRACE_MEMORY command, it acquires no trace information. -- In parallel mode, the emulator returns to normal mode after one command execution and displays the current PC. At this time, if trace information acquisition has stopped, the emulator restarts acquisition. Table 7-1 lists the commands usable in parallel mode. 1-13 Notes: 1. Emulation memory can be accessed without interrupting program execution in parallel mode. 2. When memory other than internal ROM, internal RAM, internal flash memory, and emulation memory is accessed with the MEMORY command, DUMP command, DISASSEMBLE command or ! in parallel mode, the user program will pause for a while. For example, this pause lasts for about 2.0 ms when the MEMORY command is executed at 18 MHz. The emulator pauses at the following timing. * * * * MEMORY command: At each memory access DUMP command: In 16-byte units DISASSEMBLE command: In 4-byte units !: During symbol read 3. During execution of the TRACE, TRACE_SEARCH, TRACE_MEMORY or TRACE_CONDITION command, the emulator stops trace information acquisition. 4. The emulator cannot enter parallel mode when executing emulation in the following modes specified by GO command mode options. * * Cycle reset mode Time interval measurement mode 1, 2 1-14 1.4 Break Function The following four methods are useful to stop emulation. The break function can be used regardless of the MCU's operating mode. * * * * Hardware break: PC break: Forced break: Write protect/guarded break: Caused by the MCU's signal status as specified Caused by a PC (Program Counter) Caused by pressing the (CTRL) + C keys or the (BREAK) key Caused by writing to a write-protected area or accessing guarded area 1.4.1 Hardware Break Break conditions can be specified at any four points with the BREAK_CONDITION1,2,3,4 commands. (1) Break Conditions * * * * * * * * * * Address bus value Data bus value Read/write condition External probe value External interrupt condition (NMI, IRQ0 to IRQ5) NOT condition Number of times the condition is satisfied (H'1 to H'1000) Delay count (H'1 to H'7FFF bus cycles) Sequential break Access type (PRG, DAT, DMA) Note: Because the MCU prefetches instructions, a break may occur before the prefetched instruction is executed when a break condition is satisfied during a prefetch cycle. 1-15 Address Bus Value: A break occurs when the MCU address bus value matches the specified condition. To specify a break address, there are two methods. One is to specify an address range, and the other is to specify a particular address. * Break condition: When the address bus value is 1204 * Specification: A =1204 User program Break condition is satisfied 1202 1203 1204 NOP NOP MOV.B @4000, R0 Break occurs when the MOV instruction is fetched Figure 1-5 Break with Address Bus Value Data Bus Value: A break occurs when the MCU data bus value matches the specified condition. The emulator checks both program fetch and data access for the condition. When specifying the condition, the access size must be selected from word access (WD) or byte access (HD, LD, or D). * Break condition: When the data bus value is 12 * Specification: D =12 User program Break condition is satisfied 1202 1203 1204 NOP NOP MOV.B #12, R0 Break occurs when the #12 is fetched Figure 1-6 Break with Data Bus Value 1-16 Read/Write Condition: A break occurs when the MCU's RD and WR (HWR and LWR) signal levels match the specified conditions. Usually, the read/write condition is specified together with the address or data conditions. * Break condition: When writing to address FF00 User program Break condition is satisfied 1200 1201 1204 * Specification: A=FF00 W NOP MOV.B #01 , R0L MOV.B R0 , @FF00 Break occurs when address FF00 is written to Figure 1-7 Break with Read/Write External Probe Value: * A break occurs when external probe signal levels match the specified values. For example, the user can specify probe 1 and 2's levels to high and the other probes' levels to low to generate a break. * Multibreak function External probe 8 has a falling-edge detection function. By using this function, you can break other emulators of the same type simultaneously. Specify the falling-edge function or level signal input for external probe 8 using the EXECUTION_MODE command. The following explains how to perform a multibreak with external probe 8. 1-17 E7000 HITACHI Emulator pod (II) E7000 Emulator pod (I) HITACHI Figure 1-8 Multibreak Function Procedure 1. Connect external probe 8 of emulator pod (I) to the trigger output probe of emulator pod (II). 2. Set the break condition for emulator pod (II). 3. Set the break condition for external probe 8 of emulator pod (I). At this time, specify external probe 8 to break at low level: PROB=B'0xxxxxxx. 4. Execute the programs for both emulator pods (I) and (II). 5. First, when the break condition is satisfied, the emulator pod (II) program breaks. At this time, the emulator pod (I) program also stops due to pulse output from the trigger output probe. However, the break in emulator pod (I) follows that in emulator pod (II) by several bus cycles. 1-18 External Interrupt Condition (NMI, IRQ0 to IRQ5): This break is caused by an external interrupt condition (NMI, IRQ0 to IRQ5). Emulation stops when the value of the interrupt signal matches the specified value. Figure 1-9 shows an execution example. * * NMI: Can specify low or high level IRQ0 to IRQ5: Can specify low or high level * Break condition: When the IRQ0 is low level (IRQ1 to IRQ5 are high level) MCU * Specification: IRQ = H'3E Break occurs when the IRQ0 is low level and IRQ1 to IRQ5 are high level IRQ0 to IRQ5 IRQ0 to IRQ5 Figure 1-9 Break with External Interrupt Note: External interrupt signals (IRQ0 to IRQ5) can also be used for other input depending on MCU control register settings. However, the emulator monitors status of these signals as break conditions. 1-19 NOT Condition: A break occurs when the break condition of the address bus and data bus value is not satisfied. The user can specify this condition only with the BREAK_CONDITION1 command. Memory area 0000 * Break condition: When accessing outside the address 4000 to 7FFF 4000 * Specification: A=4000 : 7FFF ; NOT 8000 Break occurs when accessing outside the address range from 4000 to 7FFF FFFF Figure 1-10 Break with NOT Condition Number of Times the Break Condition is Satisfied: A break occurs after the above break condition has been satisfied for a specified number of times (4,096 max). When specifying this condition, specify in combination with any of the above conditions. The user can specify this condition only with the BREAK_CONDITION1 command. 1-20 User program When the first break condition is satified No break occurs * Specification: A=2000 Program flow When the second break condition is satisfied * Break condition: When accessing to address 2000 four times COUNT = 4 No break occurs When the third break condition is satisfied No break occurs User program stops when the fourth break condition is satisfied When the fourth break condition is satisfied Figure 1-11 Break with the Number of Times Break Condition is Satisfied Delay Count: A break occurs when the above break condition is satisfied and the emulator executes the bus cycle for a specified number of times (32,767 max). When specifying this condition, specify in combination with any of the above break conditions. The user can specify this function only with the BREAK_CONDITION1 command. User program Break condition is satisfied Program flow * Break condition: 50 bus cycles are executed after address 2000 is accessed * Specification: A=2000 DELAY=50 No break occurs 50 bus cycles Break occurs 50 bus cycles after the satisfaction of the condition Figure 1-12 Break with Delay Count Specification 1-21 Sequential Break Condition: In sequential mode, a break occurs when hardware break conditions 4 to 1 have been satisfied in that order. There are three kinds of modes, depending on the number of the specified condition. * Sequential break mode 1 When break conditions 2 and 1 are satisfied in that order, a break occurs. * Sequential break mode 2 When break conditions 3, 2, and 1 are satisfied in that order, a break occurs. * Sequential break mode 3 When break conditions 4, 3, 2, and 1 are satisfied in that order, a break occurs. Specify the break condition with the BREAK_CONDITION1,2,3,4 commands. The user can specify any of the above conditions. When executing the user program, specify the sequential break option (;S1 to S3) with the mode option of the GO command. When no option is specified, the sequential break function does not operate, and a break will occur as soon as any of the break conditions are satisfied. User program 2000 Program flow Break condition 2 is satisfied * Initiation condition: User program is executed in sequential mode 1 from address 2000 * Specification: GO=2000 ; S1 No break occurs Break condition 1 is satisfied When break condition 1 is satisfied after break condition 2, a break occurs. A break occurs even when break condition 1 is satisfied after break condition 2 has been satisfied more than twice. Figure 1-13 Break with Sequential Specification 1-22 (2) Break Timing Hardware break sampling timing synchronizes with the MCU bus cycle (AS signal). T1 T2 T3 T1 T2 T3 T1 T2 T3 T1 T2 T3 T1 Address Data AS Interrupt signal External probe Figure 1-14 Break Timing Notes: 1. Because the MCU prefetches instructions, a break may occur before the prefetched instruction is executed when a break condition is satisfied during a prefetch cycle. 2. When the AS signal is negated simultaneously with the external probe signal transition, the break condition may be undefined while a value on that external probe is specified as a break condition. 1-23 1.4.2 PC Break The program counter (PC) break stops program execution when the instruction of the specified PC address is executed. Since a PC break is caused by hardware, it can be set in the ROM area. Note that the address corresponding to the beginning of the instruction must be specified; otherwise a break does not occur. The PC break can be performed in the following two ways; * * Normal break Sequential breaks Normal Break: A break occurs after executing the breakpoint instruction specified with the BREAK command. At this time, the following can be specified: * Number of break points: 255 points (max) * Range specification : A break occurs when an instruction in the specified address range is executed. * Number of times the break condition is satisfied: A break occurs after executing the breakpoint instruction a specified number of times. The maximum number to specify is 16,383 (H'3FFF). User program Program flow 1000 Instruction * Break condition: The break condition is satisfied when instructions at addresses H'1000 to H'2000 have been executed. * Specification: BREAK 1000 : 2000 A break occurs after the instruction of the address H'1000 is executed. Figure 1-15 Normal Break (PC Break) Note: When specifying the number of times that the break condition is to be satisfied before generating a normal break, emulator firmware performs processing every time the program passes the break condition address. As a result, the program will not operate in realtime. 1-24 Sequential Break: A sequential break occurs (four points max) when certain conditions are satisfied in a specified order. A reset point can be specified in addition to these four points. If the reset point is reached, all sequential break conditions up to that point become invalid and the emulator rechecks from the first break condition. Figure 1-16 illustrates the usual sequential break and figure 1-17 describes a sequential break when a reset point is specified. * Break condition: The break condition is satisfied when instructions at addresses H'1000, H'2000, H'3000 and H'4000 have been executed in sequence. * Specification: BREAK_SEQUENCE 1000 2000 3000 4000 User program 1000 (break condition 1) 2000 (break condition 2) 3000 (break condition 3) Program flow No break occurs No break occurs No break occurs 4000 (break condition 4) The break condition is satisfied when instructions at addresses H'1000, H'2000, H'3000, and H'4000 have been executed in sequence. Figure 1-16 Sequential Break Note: When specifying the sequential break, emulator firmware performs processing every time the program passes the break condition address. As a result, the program will not operate in realtime. 1-25 * Break condition: A break occurs when the instructions at addresses H'1000, H'2000, H'3000, and H'4000 have been executed in sequence. * Specification: BREAK_SEQUENCE 1000 2000 3000 4000 BREAK_SEQUENCE 500;R User program 1000 (Break condition 1) Program flow No break occurs (wait for break condition 2) 2000 (Break condition 2) No break occurs (wait for break condition 3) 3000 (Break condition 3) No break occurs (wait for break condition 4) 500 (Reset point) No break occurs (wait for break condition 1) 4000 (Break condition 4) No break occurs (wait for break condition 1) 1000 (Break condition 1) No break occurs (wait for break condition 2) 2000 (Break condition 2) No break occurs (wait for break condition 3) 3000 (Break condition 3) No break occurs (wait for break condition 4) 4000 (Break condition 4) Ignores conditions 1, 2, 3, 4 and searches for the condition from break condition 1 A break occurs when the instructions at address H'1000, H'2000, H'3000, and H'4000 have been executed in sequence. Figure 1-17 Sequential Break (with Reset Point Specification) Note: When specifying the sequential break, emulator firmware performs processing every time the program passes the break condition address or reset point. As a result, the program will not operate in realtime. 1-26 1.4.3 Forced Break Pressing the (CTRL) + C keys or the (BREAK) key stops program execution. 1.4.4 Write Protect/Guarded Break The user can specify the MCU memory area as write-protected or guarded areas in 128-kbyte units with the MAP command. The emulator forcibly stops the program when a write access or read/write access is attempted to the specified memory. A normal break occurs, however, after the accessed instruction execution is completed. For details, refer to section 7.2.26, MAP. 1-27 1.5 Realtime Trace Function The emulator can trace bus information during realtime emulation without affecting the user system. The emulator can fetch bus information of the MCU such as address or data, and the contents of eight external probes up to 32,767 bus cycles. Trace information is displayed with the TRACE command. Display of this information enables a check on executed program. Trace information: * * * * * * Address bus: 24 bits Data bus: 16 bits External probes: 8 MCU I/O control signals: 30 Number of bus cycle clocks (o): 7 bits (127 bytes max) Memory contents tracing: 16 bits The emulator displays trace information as the following methods: * * * Fetches only instruction words from the trace information and displays them in mnemonic. Displays the trace information in bus cycle units. Searches for the specified information and displays it. Use the TRACE_SEARCH command. This trace function traces the bus information even in the MCU single chip mode. 1.5.1 Trace Timing Trace information is acquired in trace memory synchronized with rising edges of the address strobe signal (hereinafter referred to as the AS signal). However, because external probe signal input is not synchronized with the AS signal, it may not be possible to log all the changes in the external probe signal. In each bus cycle, the clock number is the number of clock (o) cycles between the end of the previous bus cycle and the end of the current bus cycle (between one rising edge of AS and the next). Figure 1-18 shows an example of the external probe trace signal. 1-28 T1 T2 T3 T1 T2 T3 T1 T2 T3 T1 T2 T1 T3 Address (A) (A) Data AS (1) (2) (3) External probe 0 1 1 X Figure 1-18 External Probe Trace Signal Example Description: * External probe signal -- Trace information sampled at rising edges of AS (figure 1-18 (1)). -- When the external probe signal changes between samplings, it cannot be reflected in the trace data (figure 1-18 (2)). -- When a sampling edge coincides with a change in the external probe signal, the trace contents are undefined.(figure 1-18 (3)). * Clock number -- Three clock cycles are traced in bus cycle (A). 1-29 1.5.2 Trace Condition Setting The user can specify the following four conditions with the TRACE_CONDITION command. * * * * Free trace Subroutine trace Range trace Trace stop Free Trace: In free trace when the user program is executed as a result of the GO, STEP, STEP_OVER command, tracing is carried out continuously for a maximum of the latest 32,767 bus cycles until a break condition is satisfied. When no parameter is given with the TRACE_CONDITION command, the default is free trace. Figure 1-19 illustrates the free trace operation. User program Program flow Trace memory Break condition is satisfied 32,767 bus cycles Figure 1-19 Free Trace Execution 1-30 Subroutine Trace: When a subroutine trace is specified, the emulator acquires operand accesses and instructions between a specified start address and end address. However, when the specified subroutine calls another subroutine, the called subroutine is not traced. Figure 1-20 illustrates the operation of the subroutine trace. Start address BSR JSR Trace information is acquired Figure 1-20 Subroutine Trace Specification Range Trace: When a range trace is specified, the emulator only traces at points where specified conditions are satisfied. The following conditions can be specified. * * * Address value (Within or outside a specified range) Read/write condition Access type Figure 1-21 illustrates the trace acquisition condition. 1-31 User program Program flow Trace memory Trace acquisition condition is satisfied When the user program stops, the trace memory stores trace information from the address at which the trace acquisition condition was satisfied Break condition is satisfied Figure 1-21 Trace Acquisition Condition Specification Trace Stop (Parallel Mode): When a trace stop condition is specified, the emulator acquires trace information until the specified condition is satisfied. At this point, trace acquisition stops and the emulator prompts for command input, although realtime emulation does not stop. This so-called parallel mode enables the user to view trace information without stopping realtime emulation. Refer to section 1.3.3, Parallel Mode, for details. Once the trace stop conditions have been satisfied and the trace information has been displayed, the user can specify the trace stop condition again. The user can specify the following conditions. * * * * * * * Address bus and data bus value Read/write condition Access type (PRG, DAT, DMA) External probe value System control signal (BREQ, BACK) NOT condition Delay count (H'1 to H'7FFF) The trace stop condition is set with the TRACE_CONDITION command. Figure 1-22 illustrates how the system operates when a trace stop condition is specified. 1-32 User program Program flow Trace memory 32,767 bus cycles Trace stop condition is satisfied No break occurs Figure 1-22 Trace Stop Condition Specification 1.5.3 Trace Display The user can display trace information using the TRACE command. There are three display formats, as follows. * Instruction display From the contents of the trace information, only the executed instructions are displayed in mnemonics. * Bus cycle display Trace information is displayed in bus cycle units. When a trace is specified in special address memory, the memory contents are also displayed. The memory address is specified with the TRACE or MEMORY command. * Search and display The emulator searches for specified trace information and displays all the appropriate bus cycles. In this case, use the TRACE_SEARCH command. 1-33 1.6 Single-Step Function In addition to realtime emulation, effective debugging is facilitated by the single-step function. This function displays the following information every time a program instruction is executed. * * * * * * MCU control registers (PC, CCR) MCU general registers (ER0 to ER7) Instruction address Instruction mnemonic Memory contents The cause of termination 1.6.1 Single-Step Execution Single-step execution has three modes: one in which all the instructions are displayed, one in which only branch instructions are displayed, and another in which instructions of a subroutine executed at first are displayed. To execute this function, use the STEP command, or to execute a subroutine in a single step, use the STEP_OVER command. * Displaying all instructions The emulator displays the information described above after every instruction. * Branch instruction display The information is only displayed at execution of branch instructions listed below. Bcc, BRA, BRN, JMP, BSR, JSR, RTS, RTE * Subroutine display The information for the subroutine executed at first is displayed. Start address BSR JSR Trace information is acquired Figure 1-23 Subroutine Display 1-34 This function interrupts the execution state display at the JSR or BSR instruction in the designated subroutine, and resumes the execution state display when the instruction placed immediately after the JSR or BSR instruction is executed. After that, if another JSR or BSR instruction is executed, the execution state display is interrupted. * Subroutine step execution: When executing a JSR or BSR instruction, the emulator treats the called subroutine as a single step. The emulator stops after executing an instruction other than JSR or BSR. This function can be used in the internal ROM, internal RAM, user RAM, or the emulation memory area. 1.6.2 Setting Display Information The user can set the information displayed at each instruction by using the STEP_INFORMATION command. 1.6.3 Termination of Single-Step Function The single-step function stops after executing a specified number of steps from the specified start address (or the current PC address). The user can stop continuous execution by specifying a stop address. However, the specified address must be at the start of an instruction. 1.7 Execution Time Measurement The user can measure the user program execution time. This function has four modes. * * * * Normal mode Time interval measurement mode 1 Time interval measurement mode 2 Subroutine time measurement and number of times measurement Specify the execution time measurement mode with the GO command. 1-35 Normal Mode: In this mode, the emulator measures the total execution time from when the user program is started with the GO command to when it is stopped by a break. Normal mode is selected as a default when no option is specified with the GO command. The maximum time period that can be measured is 305 hours. Program execution starts Time measurement The break condition is satisfied : The break condition is satisfied Figure 1-24 Normal Mode Time Measurement Range Time Interval Measurement Mode 1: The emulator measures the elapsing between the satisfaction of hardware break conditions 2 and 1, up to a maximum of 305 hours. Set the hardware break condition using BREAK_CONDITION1,2 commands. Time interval measurement mode 1 is specified using GO command option I1. Condition 2 is satisfied Condition 2 is satisfied Condition 2 is satisfied a Condition 1 is satisfied Condition 2 is satisfied b Condition 1 is satisfied Measurement time = a Measurement time = b c BREAK key Measurement time = c Figure 1-25 Time Interval Measurement Mode 1 1-36 In this mode, program execution does not stop unless break condition 1 is satisfied after break condition 2 has been satisfied. Even if break condition 2 is satisfied many times before break condition 1, the emulator measures the time from the first occasion on which break condition 2 is satisfied. When this mode is specified, the BREAK_CONDITION3,4 commands and PC break are invalid. Time Interval Measurement Mode 2: In this mode, the time intervals between the satisfaction of break conditions 2 and 1 are added together up to a maximum of 305 hours. Without stopping program execution, this mode is selected by specifying option I2 with the GO command. In time interval measurement mode 1, a break occurs after hardware break condition 2 and then break condition 1 are satisfied. However, in this mode, even if break condition 1 is satisfied, a break does not occur. Since the PC break becomes invalid, the program can only be stopped using the (BREAK) key or (Ctrl) + C keys. Condition 2 is satisfied Condition 2 is satisfied a Condition 1 is satisfied Condition 2 is satisfied Condition 2 is satisfied Condition 1 is satisfied b Condition 2 is satisfied Condition 1 is satisfied c d Break key Break key Measurement time = a + b Measurement time = c + d Figure 1-26 Time Interval Measurement Mode 2 1-37 1.8 Trigger Output During user program execution, the emulator outputs a low-level pulse from the trigger output probe under the following three conditions. When using this pulse as an oscilloscope trigger input signal, it becomes easy to adjust the user system hardware. * * * Cycle reset Trace condition satisfaction (When trigger output is specified) Hardware break condition satisfaction The emulator always outputs a low-level signal from the trigger output probe in the command input wait state. Cycle Reset: The emulator outputs a low-level pulse from the trigger output probe with the same timing as the RES input signal to the MCU. Cycle reset is specified with the GO command. Trace Condition Satisfaction: When the trigger output is specified using the TRACE_CONDITION command, a low-level pulse is output from the trigger output probe at bus cycles corresponding to the specified condition. The trigger signal is output from the end of the corresponding bus cycle until the end of the next bus cycle. If the conditions are satisfied in consecutive bus cycles, the trigger output remains low. Hardware Break Condition Satisfaction: During emulation, a low-level pulse is output from the trigger output probe at the end of the bus cycle during which the hardware break condition is satisfied. The EXECUTION_MODE command can be used here to specify whether or not a break is to occur when the hardware break condition is satisfied. When the hardware break condition is satisfied with break specification, the emulator enters the command input wait state, and begins to output a continuous low-level signal. Specify the hardware break condition with the BREAK_CONDITION1,2,3,4 commands and the emulation mode option of the GO command. Note that when a sequential break is specified with the emulation mode option of the GO command, a low-level pulse is output each time a condition is satisfied, that is, the trigger is not output only when the last condition is satisfied. Command Input Wait State: The emulator always outputs a low-level signal from the trigger output probe. 1-38 Figure 1-27 shows the output timing. T1 T2 T1 T2 T1 T2 T1 T2 Address AS 85 ns TRIG (Trace condition is satisfied) 110 ns 85 ns TRIG (Hardware break condition is satisfied; no break occurs) 110 ns 85 ns TRIG (Hardware break condition is satisfied; break occurs) 370 ns 110 ns Condition: 2-state cycle, 18 MHz Figure 1-27 Pulse Output Timing Note: A low-level pulse output timing and pulse width differ depending on each condition. 1-39 1.9 Memory Access Function Memory Management: The MCU has a maximum address space of 16 Mbytes. The emulator manages this space in 128-kbyte or 1-Mbyte units with the following memory attributes. * * * * User memory (User system memory) Emulation memory (512-kbyte standard memory, 1-Mbyte/4-Mbyte optional memory) Write-protected Access-prohibited (Guard function) For details, refer to section 3.2, Memory Space, and section 7.2.26, MAP. Memory Display, Modification, and Transfer: Memory display, modification and transfer are done, using the following commands. ASSEMBLE DISASSEMBLE MEMORY LOAD FILE_LOAD LAN_LOAD INTFC_LOAD DATA_CHANGE DUMP MOVE SAVE FILE_SAVE LAN_SAVE INTFC_SAVE 1-40 DATA_SEARCH FILL MOVE_TO_RAM 1.10 MCU Control and Status Check The emulator is capable of switching the clock signal supplied to the MCU, checking normal operation, and displaying the execution state. This function is effective for debugging the user system hardware. Clock Switching: The emulation clock can be supplied from the user system clock (hereafter referred to as the user clock), the internal clock (13 MHz, 18 MHz), or the crystal oscillator installed in the emulator pod. To switch the clock, refer to section 7.2.9, CLOCK, and note the following. * When the clock is switched, the emulator inputs a RES signal to the MCU. This initializes the registers. * When the user switches to the user clock and the user clock signal is not supplied, an error message is displayed and the internal clock is selected instead. * When initiating the emulator system program, the emulator selects the MCU clock automatically in the following order. -- When an external clock is supplied from the user system, selects the user system clock -- When a crystal oscillator is installed in the emulator pod, selects the crystal oscillator -- Selects the internal clock (13 MHz) Substitution of Internal ROM, Internal RAM, and Internal Flash Memory: The H8/3048 series has internal ROM and internal RAM, and the H8/3048F has flash memory and internal RAM. In the emulator, the MCU internal ROM/flash memory/internal RAM cannot be accessed forcibly and is substituted by off-chip RAM. Since the substitute RAM for internal ROM/internal RAM can be accessed in MCU bus cycles, it does not affect realtime emulation. Strobe Signal Output Function at Emulation Memory Access: When emulation memory is accessed, the emulator outputs the corresponding address to the user system, but does not output the strobe signals (AS, RD, HWR, LWR). When the user system needs the strobe signals (AS, RD, HWR, LWR) that accesses the memory, strobe output can be enabled with EXECUTION_MODE specification. In this case, user WAIT signal input is also valid. Check of I/O signals: The emulator checks the connection with the user system at the system initiation. By this check, abnormalities such as short of the user system interface signal can be detected. The signals for the check is as follows. The CHECK command can also check the same signals with the ones at the system initiation. RES, STBY, BREQ, WAIT, IRQ0 to IRQ5, NMI 1-41 Emulator Execution Status Display: The emulator can display the execution status information listed in table 1-5. To display the execution status, use the STATUS command. Table 1-5 Execution Status Display Operation Status MCU type MCU operating mode Number of MCU pins Radix type Number of breakpoints specified with the BREAK command BREAK_CONDITION 1 to 4 command specifications TRACE_CONDITION command setting status Host system interface conditions Number of registered symbols Number of registered line number symbols Information displayed with the STEP_INFORMATION command during single-step execution Address range displayed with the STEP command Clock type specified by the CLOCK command File name or printer that outputs the CRT displayed contents PC break specification or coverage acquisition range Remaining emulation memory 1-42 1.11 Emulation Monitoring Function The emulator monitors the emulation status such as memory accesses or user program execution. Two kinds of status are monitored. * * MCU execution status User system power and clock status MCU Execution Status: When executing the program with the GO command, the emulator monitors the execution status every 200 ms. When the status changes, the execution status display is updated. With this function, the user can observe the progress of the program. Table 1-6 shows the execution status to be displayed. The execution status cannot be output to a printer or file assigned with the PRINT command. For details, refer to the description on execution status display, in section 7.2.20, GO. Table 1-6 Execution Status Display Display Meaning **PC=xxxxxx [xxxxxx = xxxx] (a) (b) (c) (a) Program fetch address (b) Memory address (c) Memory contents Current program fetch address is displayed. When specifying TM option with GO command, the memory address and its contents are displayed. **VCC DOWN The user system power is off. The user program stops. ** RESET RES signal is low. The MCU has been reset. ** WAIT A = xxxx xxxx: Address bus value WAIT signal is low. ** HARDWARE STANDBY STBY signal is low. However, the MCU is not put in hardware standby mode because this signal is not input to the MCU. Therefore, even if STBY signal is low, this message is displayed only. ** SOFTWARE STANDBY The MCU is in software standby mode. ** SLEEP The MCU is in sleep mode. ** BREQ BREQ signal is low. ** BACK BACK signal is low. ** TOUT A = xxxx xxxx: Address bus value The address bus value is displayed. The bus cycle stops for 80 s or more. 1-43 User System Power and Clock Status: The emulator monitors the user system power and clock status. If the user system power is off or the clock stops when the MCU clock is set to USER with the CLOCK command, the emulator executes the following operation according to its current status. Table 1-7 User System Power and Clock Status Operating Status Emulator Operation At emulator initiation Waits for the user system to power on. After the user system is turned on, starts initiation with the user clock. User system power off (crystal oscillator installed, user clock installed) User system power off (crystal oscillator not installed, user clock installed) After initiation User system power off (crystal oscillator installed, user clock not installed) Waits for the user system to power on. After the user system is turned on, starts initiation with the crystal oscillator. Command input wait Displays ** VCC DOWN and enters command input wait state. After the user system powers on, displays RESET IN BY E7000 ! (the emulator is reset) and enters command input wait state. The clock type does not change at this time. Program execution and parallel mode Displays ** VCC DOWN and stops GO command execution. After the user system powers on, displays RESET IN BY E7000 ! (the emulator is reset) and enters command input wait state. The clock type does not change at this time Notes: 1. Power-off is detected as follows: * When the emulator is initiated at 13 MHz or higher frequency, power-off is detected at about 4 V * When the emulator is initiated at a frequency lower than 13 MHz, power-off is detected at about 2.5 V. 2. When a user system interface cable is connected, power supply voltage must be provided from the Vcc pin on the user system interface cable to operate the emulator. Therefore, when using the emulator on its own, be sure to disconnect the user system interface cable. 1-44 1.12 Operating Voltage and Frequency The emulator can be operated at a voltage from 2.7 V to 5.5 V as supplied by the user system through a user cable connection. Since the operating voltage is supplied to the emulator directly from the user system, the operating voltage must correspond to the operating frequency, as shown in figure 1-28. Note: The emulator monitors whether the user system interface cable is connected and whether the power is being supplied from the user system. Therefore, when using the emulator on its own (stand-alone mode), be sure to disconnect the user system interface cable from the emulator pod. (V) 5.5 4.5 Operating voltage 3.0 2.7 0 0 1 8 13 18 (MHz) Operating frequency Allowable operating range Figure 1-28 Allowable Operating Range of Emulator 1-45 1.13 Flash Memory Usage The H8/3048F has flash memory. The emulator emulates the flash memory with the substitute RAM in the same way as the internal ROM. This section describes how to use the substitute RAM for the flash memory. 1.13.1 On-Board Programming On-Board programming is classified into two modes: boot mode and user program mode. Execution flow for each mode is shown below. For details on on-board programming modes, refer to the H8/3048F Hardware Manual. Boot Mode: Start 1. Connect to the host 1. Connect the serial communication interface pins to the host while the emulator power is off. 2. Select the boot mode with the EM command 2. Apply 12 V to the Vpp pin and select the boot mode with the EXECUTION_MODE (EM) command. (The MCU assumes that 12 V is applied to the MD2 pin.) 3. Execute the GO command with ONRESET option 3. Execute the GO command with the ONRESET option to start boot-mode operation. 4. Start data transfer 4. Start data transfer. For details on the transfer procedure, refer to section 18.6.1, Boot Mode, in the H8/3048F Hardware Manual. Figure 1-29 Boot-Mode Flowchart 1-46 User Program Mode: 1. Write the application program 1. Before starting user program mode, the application program which will execute steps 3 to 5 below must be stored in the flash memory area (substitute RAM). (This can be done by using boot-mode operation.) 2. Apply 12 V to the Vpp pin or use the EM command to apply 12 V to the Vpp pin from the emulator 2. Apply 12 V to the Vpp pin from the user system, or use the EXECUTION_MODE command to apply 12 V to the Vpp pin from the emulator. 3. Transfer on-board write program to MCU RAM 3. Transfer the on-board write program to MCU RAM with the GO command. 4. Execute on-board write program on MCU RAM 4. Branch to the on-board write program in the MCU RAM to write user's application program to the flash memory area (substitute RAM). 5. Execute application program 5. After the on-board writing completes, branch to the user's application program written to the flash memory area (substitute RAM). Figure 1-30 User Program-Mode Flowchart 1.13.2 Flash Memory Operation The flash memory in the MCU can operate in program mode, program-verify mode, erase mode, erase-verify mode, or prewrite-verify mode. However, some operations differ between the emulator and the actual H8/3048F. For details on the differences, refer to section 2, Differences between the MCU and the Emulator. The emulator accesses the substitute RAM instead of the flash memory. Therefore, settings in the flash memory control register (FLMCR) and erase block registers 1 and 2 (EBR1 and EBR2) are invalid when the emulator is used. The RAM control register (RAMCR) does not exist in the emulator. Program Mode and Program-Verify Mode: Settings in the P and PV bits of the FLMCR are invalid in the emulator. To write data by user program execution, apply 12 V directly to the Vpp pin, or use the EXECUTION_MODE (EM) command to apply 12 V to the Vpp pin from the emulator. Note: If writing to the flash memory area (substitute RAM) is attempted when 12 V is not applied to the Vpp pin, the flash memory contents do not change and no error message is displayed. 1-47 Erase Mode and Erase-Verify Mode: The emulator does not support erase mode. The E bit of the FLMCR is ignored and data in the flash memory area (substitute RAM) is not changed to H'FF. To change the data to H'FF, select the erase-verify mode and perform dummy write of H'FF. At this time, apply 12 V directly to the Vpp pin, or use the EXECUTION_MODE command to apply 12 V from the emulator. Data can be erased by using the FILL command as follows: FILL FF Notes: 1. When the user program mode is not selected with the EM command or when 12 V is not applied to the Vpp pin, the memory contents do not change even if the erase mode or erase-verify mode is selected. At this time, no error message is displayed. 2. Before erase-mode execution, prewrite-verify-mode operation must be performed. In the emulator, write H'00 as prewrite: do not write inverted data. 3. Settings in EBR1 and EBR2 are invalid. Prewrite-Verify Mode: The emulator accesses the substitute RAM instead of flash memory. Therefore, write H'00 as prewrite: do not write inverted data. Flash Memory Emulation by MCU RAM: The emulator does not support this function. 1-48 1.14 Symbolic Debugging The emulator has a symbolic debugging function which uses the source program symbols (variables and line numbers). This function is explained below. 1.14.1 Defining Symbols * Definition methods There are three ways to define symbols. -- Load module with debugging information load A linkage editor can be used to create a load module containing information for debugging (SYSROF-type load module). Symbols can be defined by loading such a module with the LOAD command. -- SYMBOL command Symbols can be defined with the SYMBOL command. In this case, the symbol attributes are registered as labels. -- ASSEMBLE command Label names are defined using the ASSEMBLE command. * Symbol attributes Table 1-8 lists the attributes of the symbols which may be defined within the load module (SYSROF type) debugging information. Table 1-8 List of Symbol Attributes Item Attributes Symbol type Function name Structure name Label name Variable name (Simple variable, pointer variable, array) Line number Allocation type External static variable Internal static variable Variable type Character Integer Pointer 1-49 * Symbol Names and Abbreviations Symbols within load module debugging information are nested. Use a slash (/) to separate the different parts of a symbol in this nested structure. The basic symbol formats are shown below. -- General symbol format !// -- Line number symbol &/ To simplify the nested structure, abbreviations can be defined for symbol names up to a specific level in a nested structure. 1.14.2 Symbol Reference Using Symbols in Commands: A symbol can be used as an address or data in a command after it has been defined by the SYMBOL command. In this case, the value of the symbol is treated as the input value. Referring to Symbol Contents: If a symbol is input in the following format in command input wait state, the symbol's contents are displayed: :! If the D option is specified, it will be displayed in decimal. :! D (D: Option for symbol value in decimal) 1.14.3 Symbol Deletion The symbol deletion function of the SYMBOL command deletes all symbols at the same time. Specific symbols cannot be deleted. 1-50 1.14.4 Symbol Display Displaying Defined Symbols: The SYMBOL command can be used to display either all the symbols or a specific symbol. This command displays the symbol name, its address, and its attribute. During Disassembly: When there are symbols that correspond to labels and operands of absolute addressing modes (PC relative, absolute address), the symbols are displayed. Symbols corresponding to immediate data and displacement are not displayed. If the symbol name exceeds 50 characters, the nest is displayed without the front parts. When abbreviated forms are defined, the abbreviated symbol names appear in the display. When multiple symbols are defined at the same address, only one of them will appear in the display. 1.15 Assembly Function 1.15.1 Overview User memory Writing to memory ASSEMBLE command Assembly-language source input Figure 1-31 Assembly Function The ASSEMBLE command enables line assembly as shown in figure 1-31. * Line assembly: Assembly-language source code is input from the console and assembled one line at a time. Refer to section 7.2.4, ASSEMBLE, for command initiation instructions. 1-51 1.15.2 Instruction Format The basic instruction format is as follows. [