Part Number Hot Search : 
116160 BL15A LBS12204 KOE1007 10185 LM3940D CAT28 AD7827
Product Description
Full Text Search
 

To Download HD6433723 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 To all our customers
Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.
The semiconductor operations of Mitsubishi Electric and Hitachi were transferred to Renesas Technology Corporation on April 1st 2003. These operations include microcomputer, logic, analog and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.) Accordingly, although Hitachi, Hitachi, Ltd., Hitachi Semiconductors, and other Hitachi brand names are mentioned in the document, these names have in fact all been changed to Renesas Technology Corp. Thank you for your understanding. Except for our corporate trademark, logo and corporate statement, no changes whatsoever have been made to the contents of the document, and these changes do not constitute any alteration to the contents of the document itself. Renesas Technology Home Page: http://www.renesas.com
Renesas Technology Corp. Customer Support Dept. April 1, 2003
Cautions
Keep safety first in your circuit designs! 1. Renesas Technology Corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. Trouble with semiconductors may lead to personal injury, fire or property damage. Remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or (iii) prevention against any malfunction or mishap. Notes regarding these materials 1. These materials are intended as a reference to assist our customers in the selection of the Renesas Technology Corporation product best suited to the customer's application; they do not convey any license under any intellectual property rights, or any other rights, belonging to Renesas Technology Corporation or a third party. 2. Renesas Technology Corporation assumes no responsibility for any damage, or infringement of any third-party's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or circuit application examples contained in these materials. 3. All information contained in these materials, including product data, diagrams, charts, programs and algorithms represents information on products at the time of publication of these materials, and are subject to change by Renesas Technology Corporation without notice due to product improvements or other reasons. It is therefore recommended that customers contact Renesas Technology Corporation or an authorized Renesas Technology Corporation product distributor for the latest product information before purchasing a product listed herein. The information described here may contain technical inaccuracies or typographical errors. Renesas Technology Corporation assumes no responsibility for any damage, liability, or other loss rising from these inaccuracies or errors. Please also pay attention to information published by Renesas Technology Corporation by various means, including the Renesas Technology Corporation Semiconductor home page (http://www.renesas.com). 4. When using any or all of the information contained in these materials, including product data, diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products. Renesas Technology Corporation assumes no responsibility for any damage, liability or other loss resulting from the information contained herein. 5. Renesas Technology Corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. Please contact Renesas Technology Corporation or an authorized Renesas Technology Corporation product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. 6. The prior written approval of Renesas Technology Corporation is necessary to reprint or reproduce in whole or in part these materials. 7. If these products or technologies are subject to the Japanese export control restrictions, they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination. Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the country of destination is prohibited. 8. Please contact Renesas Technology Corporation for further details on these materials or the products contained therein.
Hitachi Microcomputer Development Environment System
H8S, H8/300 Series Simulator/Debugger
User's Manual
ADE-702-037E Rev. 6.0 3/3/03 Hitachi, Ltd HSS008SDIW3SE
Cautions
1. Hitachi neither warrants nor grants licenses of any rights of Hitachi's or any third party's patent, copyright, trademark, or other intellectual property rights for information contained in this document. Hitachi bears no responsibility for problems that may arise with third party's rights, including intellectual property rights, in connection with use of the information contained in this document. 2. Products and product specifications may be subject to change without notice. Confirm that you have received the latest product standards or specifications before final design, purchase or use. 3. Hitachi makes every attempt to ensure that its products are of high quality and reliability. However, contact Hitachi's sales office before using the product in an application that demands especially high quality and reliability or where its failure or malfunction may directly threaten human life or cause risk of bodily injury, such as aerospace, aeronautics, nuclear power, combustion control, transportation, traffic, safety equipment or medical equipment for life support. 4. Design your application so that the product is used within the ranges guaranteed by Hitachi particularly for maximum rating, operating supply voltage range, heat radiation characteristics, installation conditions and other characteristics. Hitachi bears no responsibility for failure or damage when used beyond the guaranteed ranges. Even within the guaranteed ranges, consider normally foreseeable failure rates or failure modes in semiconductor devices and employ systemic measures such as fail-safes, so that the equipment incorporating Hitachi product does not cause bodily injury, fire or other consequential damage due to operation of the Hitachi product. 5. This product is not designed to be radiation resistant. 6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document without written approval from Hitachi. 7. Contact Hitachi's sales office for any questions regarding this document or Hitachi semiconductor products.
Trademarks:
Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and/or other countries. IBM PC is the name of a computer administered by International Business Machines Corporation. ELF/DWARF is the name of an object format developed by the Tool Interface Standards Committee. All products or brand names used in the manual are trademarks or registered trademarks of their respective companies.
(R) (R)
Read First:
1. Hitachi, Ltd. (including its subsidiaries, hereafter collectively referred to as Hitachi) pursues a policy of continuing improvement in design, performance, and safety of the system. Hitachi reserves the right to change, wholly or partially, the specifications, design, user's manual, and other documentation at any time without notice. 2. This user's manual and this system are copyrighted and all rights are reserved by Hitachi. No part of this user's manual, all or part, may be reproduced or duplicated in any form, in hardcopy or machine-readable form, by any means available without Hitachi's prior written consent. 3. Hitachi assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein.
Preface
Read First
READ this user's manual before using the Hitachi Debugging Interface (hereinafter, referred to as the HDI). KEEP the user's manual handy for future reference. Do not attempt to use the system until you fully understand its mechanism.
About this Manual
This manual explains the use of the simulator debugger and the HDI and for Hitachi microcomputer development tools. The following section will provide a brief Introduction to the debugging interface and simulator/debugger, and list its key features. The following sections, System Overview, Simulator/Debugger Functions, Menus, Windows and Dialog Boxes, Command Lines, and Messages, give reference information about the operation and facilities available from these respective areas. The following sections, Looking at Your Program, Working with Memory, Executing Your Program, Stopping Your Program, Looking at Variables, Overlay Function, Selecting Functions, and Configuring the User Interface, provide a "how to" guide to using HDI for debugging. This manual assumes that the HDI is used on the English version of Microsoft Windows 95 operating system running on the IBM PC.
(R) (R)
Assumptions
It is assumed that the reader has a competent knowledge of the C/C++ programming language, assembly-language mnemonics for the processor being debugged and is experienced in using (R) (R) Microsoft Windows applications.
Rev. 6.0, 09/00, page i of xv
Document Conventions
This manual uses the following typographic conventions: Table 1 Typographic Conventions
MEANING Bold text with `->' is used to indicate menu options (for example, [File->Save As...] ). Uppercase names are used to indicate file names. Used to indicate text that must be entered (excluding the " " quotes). Used to indicate required key presses. For example, Ctrl+N means press the Ctrl key and then, while holding the Ctrl key down, press the N key. When this symbol is used, it is always located in the left-hand margin. It indicates that the text to its immediate right is describing "how to" do something.
CONVENTION [Menu->Menu Option] FILENAME.C "enter this string" Key+Key
(The "how to" symbol)
Rev. 6.0, 09/00, page ii of xv
Contents
Section 1 Overview ...........................................................................................1
1.1 1.2 1.3 Features .............................................................................................................................1 Target User Program .........................................................................................................2 Simulation Range ..............................................................................................................4
Section 2 System Overview...............................................................................5
2.1 2.2 User Interface ....................................................................................................................5 Data Entry .........................................................................................................................5 2.2.1 Operators ..............................................................................................................5 2.2.2 Data Formats ........................................................................................................5 2.2.3 Precision...............................................................................................................6 2.2.4 Expression Examples ...........................................................................................6 2.2.5 Symbol Format.....................................................................................................6 2.2.6 Symbol Examples.................................................................................................6 Help ..................................................................................................................................7 2.3.1 Context Sensitive Help.........................................................................................7
2.3
Section 3 Simulator/Debugger Functions..........................................................9
Simulator/Debugger Platforms and CPU Types................................................................9 Simulator/Debugger Memory Management......................................................................9 3.2.1 Memory Map Specification..................................................................................9 3.1.2 Memory Resource Specification ..........................................................................10 3.3 Instruction Execution Reset Processing ............................................................................10 3.4 Exception Processing ........................................................................................................11 3.5 Features Specific to H8S/2600 CPU .................................................................................11 3.6 Control Registers...............................................................................................................12 3.7 Trace..................................................................................................................................12 3.8 Standard I/O and File I/O Processing ................................................................................13 3.9 Calculation of Instruction Execution Cycles .....................................................................25 3.10 Break Conditions...............................................................................................................25 3.10.1 Break Due to the Satisfaction of a Break Command Condition ...........................26 3.10.2 Break Due to the Detection of an Error During Execution of the User Program .26 3.10.3 Break Due to a Trace Buffer Overflow ................................................................28 3.10.4 Break Due to Execution of the SLEEP Instruction ..............................................28 3.10.5 Break Due to the [STOP] Button .........................................................................29 3.11 Floating-Point Data ...........................................................................................................29 3.12 Display of Function Call History ......................................................................................29 3.1 3.2
Section 4 Menus ................................................................................................31
Rev. 6.0, 09/00, page iii of xv
4.1
4.2
4.3
4.4
File ..................................................................................................................................31 4.1.1 New Session... ......................................................................................................31 4.1.2 Load Session... .....................................................................................................31 4.1.3 Save Session.........................................................................................................32 4.1.4 Save Session As... ................................................................................................32 4.1.5 Load Program.......................................................................................................32 4.1.6 Initialize................................................................................................................32 4.1.7 Exit .......................................................................................................................32 Edit ..................................................................................................................................32 4.2.1 Cut........................................................................................................................32 4.2.2 Copy .....................................................................................................................33 4.2.3 Paste .....................................................................................................................33 4.2.4 Find... ...................................................................................................................33 4.2.5 Evaluate................................................................................................................33 View ..................................................................................................................................33 4.3.1 Breakpoints ..........................................................................................................33 4.3.2 Command Line.....................................................................................................34 4.3.3 Disassembly... ......................................................................................................34 4.3.4 Labels ...................................................................................................................34 4.3.5 Locals ...................................................................................................................34 4.3.6 Memory................................................................................................................34 4.3.7 Performance Analysis ..........................................................................................34 4.3.8 Profile-List ...........................................................................................................34 4.3.9 Profile-Tree ..........................................................................................................35 4.3.10 Registers...............................................................................................................35 4.3.11 Source...................................................................................................................35 4.3.12 Status ....................................................................................................................35 4.3.13 Trace.....................................................................................................................35 4.3.14 Watch ...................................................................................................................35 4.3.15 Simulated I/O .......................................................................................................35 4.3.16 Stack Trace...........................................................................................................35 4.3.17 External Tool........................................................................................................36 Run ..................................................................................................................................36 4.4.1 Reset CPU ............................................................................................................36 4.4.2 Go.........................................................................................................................36 4.4.3 Reset Go ...............................................................................................................36 4.4.4 Go To Cursor........................................................................................................36 4.4.5 Set PC To Cursor..................................................................................................36 4.4.6 Run... ....................................................................................................................36 4.4.7 Step In ..................................................................................................................36 4.4.8 Step Over..............................................................................................................37 4.4.9 Step Out................................................................................................................37 4.4.10 Step.......................................................................................................................37
Rev. 6.0, 09/00, page iv of xv
4.5
4.6
4.7
4.8
4.4.11 Halt.......................................................................................................................37 Memory .............................................................................................................................37 4.5.1 Refresh .................................................................................................................37 4.5.2 Load... ..................................................................................................................37 4.5.3 Save......................................................................................................................38 4.5.4 Verify... ................................................................................................................38 4.5.5 Test.......................................................................................................................38 4.5.6 Fill... .....................................................................................................................38 4.5.7 Copy... ..................................................................................................................38 4.5.8 Compare... ............................................................................................................38 4.5.9 Configure Map... ..................................................................................................39 4.5.10 Configure Overlay................................................................................................39 Setup..................................................................................................................................39 4.6.1 Status Bar .............................................................................................................39 4.6.2 Options... ..............................................................................................................39 4.6.3 Radix ....................................................................................................................39 4.6.4 Customize.............................................................................................................39 4.6.5 Configure Platform...............................................................................................40 Window .............................................................................................................................40 4.7.1 Cascade ................................................................................................................40 4.7.2 Tile .......................................................................................................................40 4.7.3 Arrange Icons .......................................................................................................40 4.7.4 Close All...............................................................................................................40 Help ..................................................................................................................................41 4.8.1 Index.....................................................................................................................41 4.8.2 Using Help ...........................................................................................................41 4.8.3 Search for Help on ...............................................................................................41 4.8.4 About HDI............................................................................................................41
Section 5 Windows and Dialog Boxes ..............................................................43
5.1 Breakpoints Window.........................................................................................................43 5.1.1 Add.......................................................................................................................44 5.1.2 Edit... ....................................................................................................................44 5.1.3 Delete ...................................................................................................................44 5.1.4 Delete All .............................................................................................................44 5.1.5 Disable/Enable .....................................................................................................44 5.1.6 Go To Source .......................................................................................................44 Set Break Dialog Box........................................................................................................45 Break Sequence Dialog Box..............................................................................................46 Command Line Window ...................................................................................................47 5.4.1 Set Batch File... ....................................................................................................48 5.4.2 Play.......................................................................................................................48 5.4.3 Set Log File... .......................................................................................................48
Rev. 6.0, 09/00, page v of xv
5.2 5.3 5.4
5.5
5.6
5.7
5.8
5.9
5.4.4 Logging ................................................................................................................48 5.4.5 Select All..............................................................................................................48 5.4.6 Copy .....................................................................................................................48 Disassembly Window........................................................................................................48 5.5.1 Copy .....................................................................................................................50 5.5.2 Set Address...........................................................................................................50 5.5.3 Go To Cursor........................................................................................................50 5.5.4 Set PC Here ..........................................................................................................50 5.5.5 Instant Watch... ....................................................................................................50 5.5.6 Add Watch ...........................................................................................................50 5.5.7 Go to Source.........................................................................................................50 Labels Window .................................................................................................................51 5.6.1 Add......................................................................................................................52 5.6.2 Edit... ...................................................................................................................52 5.6.3 Find... ..................................................................................................................53 5.6.4 Find Next..............................................................................................................53 5.6.5 View Source .........................................................................................................53 5.6.6 Copy .....................................................................................................................53 5.6.7 Delete ...................................................................................................................53 5.6.8 Delete All .............................................................................................................54 5.6.9 Load... .................................................................................................................54 5.6.10 Save......................................................................................................................55 5.6.11 Save As................................................................................................................55 Locals Window .................................................................................................................56 5.7.1 Copy .....................................................................................................................56 5.7.2 Edit Value.............................................................................................................56 5.7.3 Radix ....................................................................................................................57 Memory Window ..............................................................................................................57 5.8.1 Refresh .................................................................................................................57 5.8.2 Load... .................................................................................................................57 5.8.3 Save... ..................................................................................................................58 5.8.4 Test......................................................................................................................58 5.8.5 Fill... ....................................................................................................................58 5.8.6 Copy... .................................................................................................................58 5.8.7 Compare... ............................................................................................................58 5.8.8 Search..................................................................................................................59 5.8.9 Set Address...........................................................................................................59 5.8.10 ASCII/Byte/Word/Long/Single Float/Double Float.............................................59 Performance Analysis Window.........................................................................................59 5.9.1 Add Range............................................................................................................60 5.9.2 Edit Range............................................................................................................60 5.9.3 Delete Range ........................................................................................................60 5.9.4 Reset Counts/Times..............................................................................................60
Rev. 6.0, 09/00, page vi of xv
5.10 5.11
5.12
5.13
5.14
5.15 5.16 5.17
5.18 5.19
5.9.5 Delete All Ranges.................................................................................................60 5.9.6 Enable Analysis....................................................................................................60 Performance Option Dialog Box .......................................................................................61 Registers Window .............................................................................................................62 5.11.1 Copy .....................................................................................................................62 5.11.2 Edit... ...................................................................................................................62 5.11.3 Toggle Bit.............................................................................................................63 Source Window .................................................................................................................63 5.12.1 Copy .....................................................................................................................64 5.12.2 Find... ...................................................................................................................64 5.12.3 Set Address...........................................................................................................64 5.12.4 Set Line... .............................................................................................................64 5.12.5 Go To Cursor........................................................................................................64 5.12.6 Set PC Here ..........................................................................................................65 5.12.7 Instant Watch... ....................................................................................................65 5.12.8 Add Watch ...........................................................................................................65 5.12.9 Go To Disassembly ..............................................................................................65 System Status Window......................................................................................................65 5.13.1 Update ..................................................................................................................66 5.13.2 Copy .....................................................................................................................66 Trace Window ...................................................................................................................66 5.14.1 Find... ...................................................................................................................67 5.14.2 Find Next..............................................................................................................67 5.14.3 Filter... ..................................................................................................................67 5.14.4 Acquisition... ........................................................................................................67 5.14.5 Halt.......................................................................................................................68 5.14.6 Restart ..................................................................................................................68 5.14.7 Snapshot ...............................................................................................................68 5.14.8 Clear .....................................................................................................................68 5.14.9 Save......................................................................................................................68 5.14.10 View Source .........................................................................................................68 5.14.11 Trim Source..........................................................................................................68 Trace Acquisition Dialog Box...........................................................................................69 Trace Search Dialog Box ..................................................................................................70 Watch Window..................................................................................................................71 5.17.1 Copy .....................................................................................................................71 5.17.2 Delete ...................................................................................................................71 5.17.3 Delete All .............................................................................................................72 5.17.4 Add Watch... .......................................................................................................72 5.17.5 Edit Value............................................................................................................72 5.17.6 Radix ....................................................................................................................72 System Configuration Dialog Box ....................................................................................72 Memory Map Modify Dialog Box ....................................................................................74
Rev. 6.0, 09/00, page vii of xv
Memory Map Dialog Box .................................................................................................75 System Memory Resource Modify Dialog Box ................................................................76 Control Registers Window ................................................................................................77 SYSCR Dialog Box...........................................................................................................78 Simulated I/O Window......................................................................................................79 Stack Trace Window .........................................................................................................80 5.25.1 Copy .....................................................................................................................80 5.25.2 Go to Source.........................................................................................................80 5.25.3 View Setting.........................................................................................................81 5.26 Profile-List Window..........................................................................................................82 5.26.1 View Source .........................................................................................................82 5.26.2 View Profile-Tree.................................................................................................82 5.26.3 View Profile-Chart ...............................................................................................83 5.26.4 Enable Profiler .....................................................................................................83 5.26.5 Find... ..................................................................................................................83 5.26.6 Clear Data.............................................................................................................83 5.26.7 Output Profile Information File...........................................................................83 5.26.8 Output Text File... ...............................................................................................84 5.26.9 Select Data...........................................................................................................84 5.26.10 Setting... ..............................................................................................................84 5.27 Profile-Tree Window.........................................................................................................85 5.27.1 View Source .........................................................................................................86 5.27.2 View Profile-List..................................................................................................86 5.27.3 View Profile-Chart ...............................................................................................86 5.27.4 Enable Profiler .....................................................................................................86 5.27.5 Find... ..................................................................................................................87 5.27.6 Find Data.............................................................................................................87 5.27.7 Clear Data.............................................................................................................87 5.27.8 Profile Information File.......................................................................................87 5.27.9 Output Text File... ...............................................................................................87 5.27.10 Select Data...........................................................................................................88 5.27.11 Setting... ..............................................................................................................88 5.28 Profile-Chart Window .......................................................................................................89 5.28.1 Expands Size ........................................................................................................89 5.28.2 Reduces Size ........................................................................................................89 5.28.3 View Source .........................................................................................................90 5.28.4 View Profile-List..................................................................................................90 5.28.5 View Profile-Tree.................................................................................................90 5.28.6 View Profile-Chart ...............................................................................................90 5.28.7 Enable Profiler .....................................................................................................90 5.28.8 Clear Data.............................................................................................................91 5.28.9 Multiple View ......................................................................................................91 5.28.10 Output Profile Information File...........................................................................91
Rev. 6.0, 09/00, page viii of xv
5.20 5.21 5.22 5.23 5.24 5.25
Section 6 Command Lines.................................................................................93
!(COMMENT) .............................................................................................................................95 ANALYSIS..................................................................................................................................95 ANALYSIS_RANGE ..................................................................................................................96 ANALYSIS_RANGE_DELETE .................................................................................................96 ASSEMBLE.................................................................................................................................97 ASSERT.......................................................................................................................................97 BREAKPOINT ............................................................................................................................98 BREAK_ACCESS .......................................................................................................................98 BREAK_CLEAR .........................................................................................................................99 BREAK_DATA ...........................................................................................................................100 BREAK_DISPLAY .....................................................................................................................100 BREAK_ENABLE ......................................................................................................................101 BREAK_REGISTER ...................................................................................................................102 BREAK_SEQUENCE .................................................................................................................103 DISASSEMBLE ..........................................................................................................................103 ERASE.........................................................................................................................................104 EVALUATE ................................................................................................................................104 FILE_LOAD ................................................................................................................................105 FILE_SAVE.................................................................................................................................106 FILE_VERIFY.............................................................................................................................106 GO ...........................................................................................................................................107 GO_RESET..................................................................................................................................108 GO_TILL .....................................................................................................................................109 HALT...........................................................................................................................................109 HELP ...........................................................................................................................................110 INITIALISE.................................................................................................................................110 LOG ...........................................................................................................................................111 MAP_DISPLAY ..........................................................................................................................112 MAP_SET....................................................................................................................................112 MEMORY_DISPLAY.................................................................................................................113 MEMORY_EDIT.........................................................................................................................114 MEMORY_FILL .........................................................................................................................115 MEMORY_MOVE ......................................................................................................................116 MEMORY_TEST ........................................................................................................................116 QUIT ...........................................................................................................................................117 RADIX.........................................................................................................................................117 REGISTER_DISPLAY................................................................................................................118 REGISTER_SET .........................................................................................................................119 RESET .........................................................................................................................................120 SLEEP..........................................................................................................................................120 STEP ...........................................................................................................................................121 STEP_OUT ..................................................................................................................................121
Rev. 6.0, 09/00, page ix of xv
STEP_OVER ...............................................................................................................................122 STEP_RATE................................................................................................................................122 SUBMIT ......................................................................................................................................123 SYMBOL_ADD ..........................................................................................................................123 SYMBOL_CLEAR ......................................................................................................................124 SYMBOL_LOAD ........................................................................................................................124 SYMBOL_SAVE.........................................................................................................................125 SYMBOL_VIEW.........................................................................................................................125 TRACE ........................................................................................................................................126 TRACE_ACQUISITION.............................................................................................................126
Section 7 Messages ........................................................................................... 129
7.1 7.2 Information Messages .......................................................................................................129 Error Messages..................................................................................................................130
Section 8 Looking at Your Program ................................................................. 131
8.1 8.2 Compiling for Debugging .................................................................................................131 Viewing the Code..............................................................................................................131 8.2.1 Viewing Source Code...........................................................................................131 8.2.2 Viewing Assembly-Language Code.....................................................................132 8.2.3 Modifying Assembly-Language Code .................................................................132 Looking at Labels..............................................................................................................133 8.3.1 Listing Labels.......................................................................................................133 8.3.2 Adding a Label from a Source or Disassembly Window .....................................134 Looking at a Specific Address...........................................................................................135 8.4.1 Looking at the Current Program Counter Address...............................................135 Finding Text ......................................................................................................................136
8.3
8.4 8.5
Section 9 Working with Memory...................................................................... 137
9.1 Looking at an Area of Memory .........................................................................................137 9.1.1 Displaying Memory as ASCII ..............................................................................138 9.1.2 Displaying Memory as Bytes ...............................................................................138 9.1.3 Displaying Memory as Words..............................................................................138 9.1.4 Displaying Memory as Longwords ......................................................................138 9.1.5 Displaying Memory as Single-Precision Floating Point ......................................138 9.1.6 Displaying Memory as Double-Precision Floating Point.....................................138 9.1.7 Looking at a Different Area of Memory ..............................................................138 Modifying Memory Contents ............................................................................................139 9.2.1 Quick Edit ............................................................................................................139 9.2.2 Full Edit................................................................................................................139 9.2.3 Selecting a Memory Range ..................................................................................140 Finding a Value in Memory ..............................................................................................140 Filling an Area of Memory with a Value ..........................................................................141
9.2
9.3 9.4
Rev. 6.0, 09/00, page x of xv
9.5 9.6 9.7 9.8
9.4.1 Filling a Range .....................................................................................................141 Copying an Area of Memory.............................................................................................142 Saving an Area of Memory ...............................................................................................142 Loading an Area of Memory .............................................................................................143 Verifying an Area of Memory...........................................................................................143
Section 10 Executing Your Program .................................................................145
Running from Reset...........................................................................................................145 Continuously Running Your Program...............................................................................145 Running to the Cursor .......................................................................................................146 Running to Several Points .................................................................................................146 Single Step.........................................................................................................................146 10.5.1 Stepping Into a Function ......................................................................................147 10.5.2 Stepping Over a Function Call .............................................................................147 10.6 Stepping Out of a Function ...............................................................................................147 10.7 Multiple Steps ...................................................................................................................147 10.1 10.2 10.3 10.4 10.5
Section 11 Stopping Your Program...................................................................149
11.1 Halting Execution..............................................................................................................149 11.2 Standard Breakpoints (PC Breakpoints)............................................................................149 11.3 The Breakpoints Window..................................................................................................150 11.3.1 Adding a Breakpoint ............................................................................................151 11.3.2 Modifying a Breakpoint .......................................................................................151 11.3.3 Deleting a Breakpoint...........................................................................................151 11.3.4 Deleting All Breakpoints......................................................................................152 11.4 Disabling Breakpoints .......................................................................................................152 11.4.1 Disabling a Breakpoint.........................................................................................152 11.4.2 Enabling a Breakpoint..........................................................................................152 11.5 Temporary Breakpoints.....................................................................................................152
Section 12 Looking at Variables .......................................................................155
12.1 Tooltip Watch....................................................................................................................155 12.2 Instant Watch.....................................................................................................................155 12.3 Using Watch Items ............................................................................................................156 12.3.1 Adding a Watch....................................................................................................156 12.3.2 Expanding a Watch ..............................................................................................157 12.3.3 Modifying Radix for Watch Item Display............................................................158 12.3.4 Changing a Watch Item's Value ..........................................................................158 12.3.5 Deleting a Watch..................................................................................................159 12.4 Looking at Local Variables ...............................................................................................159 12.5 Looking at Registers..........................................................................................................160 12.5.1 Expanding a Bit Register......................................................................................160 12.5.2 Modifying Register Contents ...............................................................................161
Rev. 6.0, 09/00, page xi of xv
12.5.3 Using Register Contents.......................................................................................162
Section 13 Overlay Function............................................................................... 163
13.1 Displaying Section Group .................................................................................................163 13.2 Setting Section Group .......................................................................................................164
Section 14 Selecting Functions ......................................................................... 165
14.1 Displaying Functions.........................................................................................................165 14.2 Specifying Functions.........................................................................................................166 14.2.1 Selecting a Function .............................................................................................166 14.2.2 Deleting a Function ..............................................................................................166 14.2.3 Setting a Function ................................................................................................166
Section 15 Configuring the User Interface........................................................ 167
15.1 Arranging Windows ..........................................................................................................167 15.1.1 Minimizing Windows...........................................................................................167 15.1.2 Arranging Icons....................................................................................................168 15.1.3 Tiling Windows....................................................................................................169 15.1.4 Cascading Windows.............................................................................................169 15.2 Locating Currently Open Windows...................................................................................169 15.2.1 Locating the Next Window ..................................................................................170 15.2.2 Locating a Specific Window ................................................................................170 15.3 Enabling/Disabling the Status Bar.....................................................................................170 15.4 Customizing the Toolbar ...................................................................................................171 15.4.1 Overall Appearance..............................................................................................171 15.4.2 Customizing Individual Toolbars.........................................................................172 15.4.3 Button Categories.................................................................................................173 15.4.4 Adding a Button to a Toolbar...............................................................................173 15.4.5 Positioning a Button in a Toolbar.........................................................................173 15.4.6 Removing a Button from a Toolbar .....................................................................173 15.5 Customizing the Fonts.......................................................................................................174 15.6 Customizing the File Filters ..............................................................................................174 15.7 Saving a Session................................................................................................................176 15.8 Loading a Session..............................................................................................................176 15.9 Setting HDI Options..........................................................................................................177 15.10 Setting the Default Input Radix.........................................................................................178
Appendix A - System Modules ........................................................................... 181 Appendix B - GUI Command Summary............................................................. 183 Appendix C - Symbol File Format...................................................................... 187
Rev. 6.0, 09/00, page xii of xv
Figures
Figure 1.1 Creation of Target User Programs ...........................................................................3 Figure 4.1 Menus.....................................................................................................................31 Figure 5.1 Breakpoints Window..............................................................................................43 Figure 5.2 Set Break Dialog Box.............................................................................................45 Figure 5.3 Break Sequence Dialog Box ..................................................................................46 Figure 5.4 Command Line Window ........................................................................................47 Figure 5.5 Disassembly Window.............................................................................................49 Figure 5.6 Labels Window ......................................................................................................51 Figure 5.7 Add Label Dialog Box ...........................................................................................52 Figure 5.8 Edit Label Dialog Box ...........................................................................................52 Figure 5.9 Find Label Containing Dialog Box ........................................................................53 Figure 5.10 Message Box for Confirming Label Deletion ......................................................54 Figure 5.11 Message Box for Confirming All Label Deletion ................................................54 Figure 5.12 Load Symbols Dialog Box ...................................................................................55 Figure 5.13 Locals Window ....................................................................................................56 Figure 5.14 Memory Window .................................................................................................57 Figure 5.15 Performance Analysis Window............................................................................59 Figure 5.16 Performance Option Dialog Box..........................................................................61 Figure 5.17 Registers Window ................................................................................................62 Figure 5.18 Source View.........................................................................................................63 Figure 5.19 System Status Window ........................................................................................65 Figure 5.20 Trace Window......................................................................................................66 Figure 5.21 Trace Acquisition Dialog Box..............................................................................69 Figure 5.22 Trace Search Dialog Box .....................................................................................70 Figure 5.23 Watch Window ....................................................................................................71 Figure 5.24 System Configuration Dialog Box .......................................................................72 Figure 5.25 Memory Map Modify Dialog Box .......................................................................74 Figure 5.26 Memory Map Dialog Box ....................................................................................75 Figure 5.27 System Memory Resource Modify Dialog Box ...................................................76 Figure 5.28 Control Registers Window ...................................................................................77 Figure 5.29 SYSCR Dialog Box..............................................................................................78 Figure 5.30 Simulated I/O Window ........................................................................................79 Figure 5.31 Stack Trace Window ............................................................................................80 Figure 5.32 Stack Trace Setting Dialog Box ...........................................................................81 Figure 5.33 Profile-List Window.............................................................................................82 Figure 5.34 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time .....83 Figure 5.35 Setting Profile-List Dialog Box............................................................................84 Figure 5.36 Profile-Tree Window ...........................................................................................85 Figure 5.37 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time .....86 Figure 5-38 Find Data Dialog Box ..........................................................................................87 Figure 5.39 Setting Profile-Tree Dialog Box ..........................................................................88
Rev. 6.0, 09/00, page xiii of xv
Figure 5.40 Profile-Chart Window..........................................................................................89 Figure 5.41 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time .....90 Figure 8.1 Source Window....................................................................................................131 Figure 8.2 Disassembly Window...........................................................................................132 Figure 8.3 Assembler Dialog Box .........................................................................................133 Figure 8.4 Labels Window ....................................................................................................134 Figure 8.5 Label Dialog Box .................................................................................................134 Figure 8.6 Set Address Dialog Box .......................................................................................135 Figure 8.7 Find Dialog Box...................................................................................................136 Figure 9.1 Open Memory Window Dialog Box ....................................................................137 Figure 9.2 Memory Window (Bytes) ....................................................................................137 Figure 9.3 Set Address Dialog Box .......................................................................................139 Figure 9.4 Edit Dialog Box ...................................................................................................140 Figure 9.5 Search Memory Dialog Box.................................................................................140 Figure 9.6 Fill Memory Dialog Box ......................................................................................141 Figure 9.7 Copy Memory Dialog Box...................................................................................142 Figure 9.8 Save Memory As Dialog Box ..............................................................................142 Figure 9.9 Load Memory Dialog Box ...................................................................................143 Figure 9.10 Verify S-Record File with Memory Dialog Box................................................144 Figure 10.1 Highlighted Line Corresponding to PC Address................................................145 Figure 10.2 Step Program Dialog Box ..................................................................................148 Figure 11.1 Setting a Program Breakpoint ............................................................................150 Figure 11.2 Breakpoints Window..........................................................................................151 Figure 11.3 Run Program Dialog Box...................................................................................153 Figure 12.1 Tooltip Watch ....................................................................................................155 Figure 12.2 Instant Watch Dialog Box ..................................................................................156 Figure 12.3 Add Watch Dialog Box ......................................................................................157 Figure 12.4 Watch Window ..................................................................................................157 Figure 12.5 Expanding a Watch ............................................................................................158 Figure 12.6 Edit Value Dialog Box .......................................................................................159 Figure 12.7 Locals Window ..................................................................................................159 Figure 12.8 Registers Window ..............................................................................................160 Figure 12.9 Expanding a Bit Register....................................................................................161 Figure 12.10 Register Dialog Box .........................................................................................162 Figure 13.1 Overlay Dialog Box (at Opening) ......................................................................163 Figure 13.2 Overlay Dialog Box (Address Range Selected) .................................................163 Figure 13.3 Overlay Dialog Box (Highest-Priority Section Group Selected) .......................164 Figure 14.1 Select Function Dialog Box ...............................................................................165 Figure 15.1 Minimizing a Window .......................................................................................167 Figure 15.2 Disassembly Window Icon ................................................................................168 Figure 15.3 Icons Before Arrangement .................................................................................168 Figure 15.4 Icons After Arrangement....................................................................................169 Figure 15.5 Selecting a Window ...........................................................................................170
Rev. 6.0, 09/00, page xiv of xv
Figure 15.6 Customize Toolbar (Toolbars) Dialog Box........................................................171 Figure 15.7 Customize Toolbar (Commands) Dialog Box....................................................172 Figure 15.8 Font Dialog Box.................................................................................................174 Figure 15.9 Customize File Filter Dialog Box ......................................................................175 Figure 15.10 Session Name Display......................................................................................176 Figure 15.11 HDI Options (Session) Dialog Box..................................................................177 Figure 15.12 HDI Options (Confirmation) Dialog Box ........................................................178 Figure 15.13 HDI Options (Viewing) Dialog Box ................................................................178 Figure 15.14 Setting Radix....................................................................................................179 Figure A.1 HDI System Modules ..........................................................................................181
Tables
Table 3.1 Table 3.2 Table 3.3 Table 3.4 Table 3.5 Table 3.6 Table 6.1 Table 7.1 Table 7.2 Simulator/Debugger Platforms and CPU Types ...................................................9 Memory Types......................................................................................................9 I/O Functions ......................................................................................................13 Processing When a Break Condition is Satisfied ................................................26 Simulation Errors................................................................................................27 Register States at Simulation Error Stop.............................................................28 Simulator/Debugger Commands.........................................................................93 Information Messages.......................................................................................129 Error Messages .................................................................................................130
Rev. 6.0, 09/00, page xv of xv
Section 1 Overview
The Hitachi Debugging Interface (HDI) is a Graphical User Interface intended to ease the development and debugging of applications written in C/C++ programming language and assembly language for Hitachi microcomputers. Its aim is to provide a powerful yet intuitive way of accessing, observing and modifying the debugging platform in which the application is running. Key Features * Windows GUI for debugging
(R)
* Intuitive interface * On-line help * Common "Look & Feel" Note: The HDI does not run on Windows version 3.1. The simulator/debugger provides simulation functions for H8S and H8/300 series microcomputers (H8/300, H8/300L, H8/300H, H8S/2600, and H8S/2000 series) and provides debugging functions for programs written in C, C++, or assembly language. Therefore, the simulator/debugger promotes efficient debugging of programs. When used with the following software, the simulator/debugger reduces the time required for software development. * Hitachi Embedded Workshop (HEW) * H8S and H8/300 series C/C++ compiler * H8S and H8/300 series cross assembler * Optimizing linkage editor
(R)
1.1
Features
* Since the simulator/debugger runs on a host computer, software debugging can start without using an actual user system, thus reducing overall system development time. * The simulator/debugger performs a simulation to calculate the number of instruction execution cycles for a program, thus enabling performance evaluation without using an actual user system. * The simulator/debugger offers the following features and functions that enable efficient program testing and debugging. The ability to handle all of the H8S and H8/300 series CPUs Functions to trace instructions or subroutines
Rev. 6.0, 09/00, page 1 of 187
Functions to stop or continue execution when an error occurs during user program execution Profile data acquisition and function-unit performance measurement A comprehensive set of break functions Functions to set or edit memory maps Functions to display function call history * The breakpoint, memory map, performance, and trace can be set through the dialog box (R) under Windows . Environments corresponding to each memory map of the H8S and H8/300 microcomputers can be set through the dialog box.
1.2
Target User Program
Load modules in ELF/DWARF format and S-type format can be debugged with the simulator/debugger. These load modules are called user programs in this manual. Figure 1.1 shows the creation of target user programs to be debugged.
Rev. 6.0, 09/00, page 2 of 187
Assembly source program
C source program
C++ source program
H8S and H8/300 series cross assembler
H8S and H8/300 series C/C++ compiler
Instance information file
Prelinker Object load module
Library file
Optimizing linkage editor
Load module (ELF/S type)
Stack information/ profile information
H8S and H8/300 series simulator/debugger
Figure 1.1 Creation of Target User Programs
Rev. 6.0, 09/00, page 3 of 187
1.3
Simulation Range
The simulator/debugger supports the following H8S and H8/300 series microcomputer functions: * All CPU instructions * Exception processing * Registers * All address areas The simulator/debugger does not support the following H8S and H8/300 series MCU functions. Programs that use these functions must be debugged with the H8S and H8/300 series emulator. * Dual port RAM * Timers * Pulse width modulator (PWM) * Serial communication interface (SCI) * A/D converter * I/O ports * Interrupt controller
Rev. 6.0, 09/00, page 4 of 187
Section 2 System Overview
HDI is a modular software system, utilizing self-contained modules for specific tasks. These modules are linked to a general purpose Graphical User Interface, which provides a common look & feel independent of the particular modules with which the system is configured.
2.1
User Interface
(R)
The HDI Graphical User Interface is a Windows application that presents the debugging (R) platform to you and allows you to set up and modify the system. Refer to a standard Windows (R) user manual for details on how to operate within a Windows application.
2.2
Data Entry
When entering numbers in any dialog box or field you can always enter an expression instead of a simple number. This expression can contain symbols and can use the operators in the C/C++ programming languages. Use of C/C++ programming language features such as arrays and structures is only available if an object DLL that supports C/C++ programming language debugging is in use. In some dialogs, where there is a control expecting an end address, it is possible to enter a range by prefixing the value with a + sign. This will set the actual end address to be equal to the start address plus the entered the value. 2.2.1 Operators
The C/C++ programming language operators are available: +, -, *, /, &, |, ^, ~, !, >>, <<, %, (, ), <, >, <=, >=, ==, !=, &&, || 2.2.2 Data Formats
Unprefixed data values will be taken as being in the default radix set by the [Setup->Radix] menu option. The exception is count field which use decimal values by default (independent of the current default system radix). Symbols may be used by name and ASCII character strings can be entered if surrounded by single quote characters, e.g. `demo'. The following prefixes can be used to identify radices: O' B' Octal Binary
Rev. 6.0, 09/00, page 5 of 187
D' H' 0x
Decimal Hexadecimal Hexadecimal
The contents of a register may be used by specifying the register name, prefixed by the # character, e.g.: #R1, #ER3, #R4L 2.2.3 Precision
All mathematics in expression evaluation is done using 32 bits (signed). Any values exceeding 32 bits are truncated. 2.2.4 Expression Examples
Buffer_start + 0x1000 #R1 | B'10001101 ((pointer + (2 * increment_size)) & H'FFFF0000) >> D'15 !(flag ^ #ER4)
2.2.5
Symbol Format
You can specify and reference symbols in the same format as in C/C++ programming language. Cast operators may be used together with symbols, and you can reference data after its type has been converted. Note the following limitations. * Pointers can be specified up to four levels. * Arrays can be specified up to three dimensions. * No typedef name can be used. 2.2.6 Symbol Examples : Specifies direct reference of a member (C/C++) : Specifies indirect reference of a member (C/C++) : Specifies reference of a member with class (C++) : Specifies a pointer (C/C++) : Specifies an array (C/C++) : Specifies reference of a pointer to member (C++) : Specifies reference of a global variable (C/C++) : Specifies a member function (C++) : Specifies cast operation (C/C++)
Object.value p_Object->value Class::value *value array[0] Object.*value ::g_value Class::function(short) (struct STR) *value
Rev. 6.0, 09/00, page 6 of 187
2.3
Help
(R)
HDI has a standard Windows context sensitive help system. This provides on-line information about using the debugging system. Help can be invoked by pressing the F1 key or via the Help menu. Additionally, some windows and dialog boxes have a dedicated help button to launch the help file at the appropriate content. 2.3.1 Context Sensitive Help
To get help on a specific item in the HDI help cursor can be used. To enable the help cursor, press SHIFT+F1 or click the button on tool bar. Your cursor then changes to include a question mark. You can then click on the item for which you require help and the help system will be opened at the appropriate content.
Rev. 6.0, 09/00, page 7 of 187
Rev. 6.0, 09/00, page 8 of 187
Section 3 Simulator/Debugger Functions
This section describes the H8S and H8/300 series simulator/debugger functions.
3.1
Simulator/Debugger Platforms and CPU Types
Each simulator/debugger platform corresponds to a specific type of CPU as listed in table 3.1. Select a correct platform from the Select Session dialog box. Table 3.1 Simulator/Debugger Platforms and CPU Types
CPU Type H8/300 H8/300L H8/300H advanced mode H8/300H normal mode H8S/2600 advanced mode H8S/2600 normal mode H8S/2000 advanced mode H8S/2000 normal mode
Simulator/Debugger Platform H8/300 simulator H8/300L simulator H8/300HA simulator H8/300HN simulator H8S/2600A simulator H8S/2600N simulator H8S/2000A simulator H8S/2000N simulator
3.2
3.2.1
Simulator/Debugger Memory Management
Memory Map Specification
A memory map is specified to calculate the number of memory access cycles during simulation. The simulator/debugger supports the memory types shown in table 3.2. Table 3.2 Memory Types
User Program Execution Enabled Enabled Enabled Disabled Enabled
Memory Type Internal ROM Internal RAM External memory Internal I/O EEPROM
A memory map can be specified in the System Configuration dialog box to calculate the number of memory access cycles during simulation.
Rev. 6.0, 09/00, page 9 of 187
The following items can be specified: * Memory type * Start and end addresses of the memory area * Number of memory access cycles * Memory data bus width The memory types that can be specified depend on the CPU. For details, refer to section 5.18, System Configuration Dialog Box. The user program can be executed in all areas except for the internal I/O area. 3.2.2 Memory Resource Specification
A memory resource must be specified to load and execute a user program. The memory resource, including the following items, can be specified in the System Memory Resource Modify dialog box. * Start address * End address * Access type The access type can be read/write, read-only, or write-only. Since an error occurs if the user program attempts an illegal access (for example, trying to write to a read-only memory), such an illegal access in the user program can be easily detected. However, unlike the other memory areas, a read-only EEPROM can be written to with the EEPMOV instruction and a writable EEPROM can be written to only with the EEPMOV instruction.
3.3
Instruction Execution Reset Processing
The simulator/debugger resets the instruction execution count and instruction execution cycles when: * The program counter (PC) is modified after the instruction simulation stops and before it restarts. * The RUN command to which the execution start address has been specified is executed. * Initialization is performed, or a program is loaded.
Rev. 6.0, 09/00, page 10 of 187
3.4
Exception Processing
The simulator/debugger detects the exceptions corresponding to TRAPA instructions (only for the H8/300H and H8S series) and traces (only for the H8S series) and then simulates exception processing. The simulator/debugger simulates exception processing with the following procedures. 1. Detects an exception during instruction execution. 2. Saves the PC and CCR register in the stack area. If the validity bit in EXR is set to 1, the simulator/debugger also saves the EXR register. If an error occurs while saving registers, the simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state. 3. Sets the I bit in the CCR register as 1. 4. Reads the start address from the vector address corresponding to the vector number. If an error occurs while reading the address, the simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state. 5. Starts instruction execution from the start address. If the start address is 0, the simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state.
3.5
Features Specific to H8S/2600 CPU
MAC Instruction: The H8S/2600 CPU performs multiply and accumulate operation (MAC instruction). Either saturation or non-saturation multiply and accumulate operation can be executed depending on the state of bit 7 (the MACS bit) in the SYSCR register in the internal I/O: MACS bit = 0: Non-saturation operation MACS bit = 1: Saturation operation EXR Register: The H8S/2600 CPU has the EXR register, which can be enabled or disabled by the state of bit 5 (the EXR bit) in the SYSCR register in the internal I/O: EXR bit = 0: EXR disabled EXR bit = 1: EXR enabled The SYSCR register address can be specified using [SYSCR Address] in the System Configuration dialog box. Note: The SYSCR register address must be within the internal I/O; otherwise the simulator/debugger assumes the MACS bit as 0 (non-saturation operation) and EXR bit as 0 (EXR disabled).
Rev. 6.0, 09/00, page 11 of 187
For details, refer to section 5.18, System Configuration Dialog Box, section 5.22, Control Registers Window, and section 5.23, SYSCR Dialog Box.
3.6
Control Registers
For the H8S/2600 series, the simulator/debugger supports the system control register (SYSCR) as a memory-mapped control register. Therefore, a user program using multiply and accumulate operation and EXR access can be simulated and debugged. The SYSCR address can be specified using [SYSCR Address] in the System Configuration dialog box. To modify or display the control register value, use the Control Registers window and the SYSCR dialog box. For details, refer to section 5.18, System Configuration Dialog Box, section 5.22, Control Registers Window, and section 5.23, SYSCR Dialog Box.
3.7
Trace
The simulator/debugger writes the results of each instruction execution into the trace buffer. The trace buffer can hold the results for up to 1024 instruction executions. The conditions for the trace information acquisition can be specified in the Trace Acquisition dialog box. Click the right mouse button in the Trace window and choose [Acquisition] from the popup menu to display the Trace Acquisition dialog box. The acquired trace information is displayed in the Trace window. The trace information displayed in the Trace window is as follows. * Total number of instruction execution cycles * Instruction address * CCR * Multiplier internal flag (only for the H8S/2600 series) * Instruction mnemonic * Data access information (destination and accessed data) * C/C++ or assembly-language source programs The trace information can be searched. The search conditions can be specified in the Trace Search dialog box. Click the right mouse button in the Trace window and choose [Find] from the popup menu to display the Trace Search dialog box. For details, refer to section 5.14, Trace Window through section 5.16, Trace Search Dialog Box.
Rev. 6.0, 09/00, page 12 of 187
3.8
Standard I/O and File I/O Processing
The simulator/debugger provides the Simulated I/O window to enable the standard I/O and file I/O processing listed in table 3.3 to be executed by the user program. When the I/O processing is executed, the Simulated I/O window must be open. Table 3.3 lists the I/O processing functions supported by the simulator/debugger. Each function has three types of function codes: those for the 16-bit address, for the 24-bit address, and for the 32-bit address. Select one according to the target CPU. Table 3.3 I/O Functions
Function Code No. 1 2 3 4 5 6 7 8 9 10 11 12 13 16-Bit 24-Bit 32-Bit Function Address Address Address Name Description H'01 H'02 H'03 H'04 H'05 H'06 H'07 H'08 H'09 H'0A H'0B H'0C H'0D H'11 H'12 H'13 H'14 H'15 H'06 H'17 H'18 H'19 H'1A H'0B H'0C H'0D H'21 H'22 H'23 H'24 H'25 H'06 H'27 H'28 H'29 H'2A H'0B H'0C H'0D GETC PUTC GETS PUTS FOPEN FCLOSE FGETC FPUTC FGETS FPUTS FEOF FSEEK FTELL Inputs one byte from the standard input device Outputs one byte to the standard output device Inputs one line from the standard input device Outputs one line to the standard output device Opens a file Closes a file Inputs one byte from a file Outputs one byte to a file Inputs one line from a file Outputs one line to a file Checks for end of file Moves the file pointer Returns the current position of the file pointer
To perform I/O processing, use the [System Call Address] in the System Configuration dialog box in the following procedure. 1. Set the address specialized for I/O processing in the [System Call Address], select [Enable] and execute the program. 2. When detecting a subroutine call instruction (BSR or JSR), that is, a system call to the specialized address during user program execution, the simulator/debugger performs I/O processing by using the R0 and R1 values (H8/300 and H8/300L series) or the ER1 value (H8/300H and H8S series) as the parameters. Therefore, before issuing a system call, set as follows in the user program:
Rev. 6.0, 09/00, page 13 of 187
* Set the function code (table 3.3) to the R0 register
MSB 1 byte H'01 1 byte Function code LSB
* Set the parameter block address to the R1 register (for the parameter block, refer to each function description)
MSB Parameter block address LSB
* Reserve the parameter block and input/output buffer areas Each parameter of the parameter block must be accessed in the parameter size. After the I/O processing, the simulator/debugger resumes simulation from the instruction that follows the system call instruction. Each I/O function is described in the following format:
(1)
(2) (3)
(4)
Parameter Block (5) Parameters (6)
(1) Number corresponding to table 3.3 (2) Function name (3) Function code (4) I/O overview (5) I/O parameter block (6) I/O parameters
Rev. 6.0, 09/00, page 14 of 187
1
GETC H'01, H'11, H'21
Inputs one byte from the standard input device
Parameter Block * Function code: H'01 (for the 16-bit address)
One byte +0 One byte
Input buffer start address
* Function code: H'11 (for the 24-bit address) or H'21 (for the 32-bit address)
One byte +0 Input buffer start address +2 One byte
Parameters * Input buffer start address (input) Start address of the buffer to which the input data is written to.
2 PUTC H'02, H'12, H'22 Outputs one byte to the standard output device
Parameter Block * Function code: H'02 (for the 16-bit address)
One byte +0 One byte
Output buffer start address
* Function code: H'12 (for the 24-bit address) or H'22 (for the 32-bit address)
One byte +0 Output buffer start address +2 One byte
Parameters * Output buffer start address (input) Start address of the buffer in which the output data is stored.
Rev. 6.0, 09/00, page 15 of 187
3
GETS H'03, H'13, H'23
Inputs one line from the standard input device
Parameter Block * Function code: H'03 (for the 16-bit address)
One byte +0 One byte
Input buffer start address
* Function code: H'13 (for the 24-bit address) or H'23 (for the 32-bit address)
One byte +0 Input buffer start address +2 One byte
Parameters * Input buffer start address (input) Start address of the buffer to which the input data is written to.
4 PUTS H'04, H'14, H'24 Outputs one line to the standard output device
Parameter Block * Function code: H'04 (for the 16-bit address)
One byte +0 One byte
Output buffer start address
* Function code: H'14 (for the 24-bit address) or H'24 (for the 32-bit address)
One byte +0 Output buffer start address +2 One byte
Parameters * Output buffer start address (input) Start address of the buffer in which the output data is stored.
Rev. 6.0, 09/00, page 16 of 187
5
FOPEN H'05, H'15, H'25
Opens a file
The FOPEN opens a file and returns the file number. After this processing, the returned file number must be used to input, output, or close files. A maximum of 256 files can be open at the same time. Parameter Block * Function code: H'05 (for the 16-bit address)
One byte +0 +2 +4 Return value Open mode One byte File number Unused
Start address of file name
* Function code: H'15 (for the 24-bit address) or H'25 (for the 32-bit address)
One byte +0 +2 +4 +6 Return value Open mode One byte File number Unused
Start address of file name
Parameters * Return value (output) 0: Normal completion -1: Error * File number (output) The number to be used in all file accesses after opening. * Open mode (input) H'00: "r" H'01: "w" H'02: "a" H'03: "r+" H'04: "w+" H'05: "a+" H'10: "rb" H'11: "wb" H'12: "ab"
Rev. 6.0, 09/00, page 17 of 187
H'13: "r+b" H'14: "w+b" H'15: "a+b" These modes are interpreted as follows. "r": Open for reading. "w": Open an empty file for writing. "a": Open for appending (write starting at the end of the file). "r+": Open for reading and writing. "w+": Open an empty file for reading and writing. "a+" : Open for reading and appending. "b" : Open in binary mode. * Start address of file name (input) The start address of the area for storing the file name.
6 FCLOSE H'06 Closes a file
Parameter Block
One byte +0 Return value One byte File number
Parameters * Return value (output) 0: Normal completion -1: Error * File number (input) The number returned when the file was opened.
Rev. 6.0, 09/00, page 18 of 187
7
FGETC H'07, H'17, H'27
Inputs one byte from a file
Parameter Block * Function code: H'07 (for the 16-bit address)
One byte +0 +2 Return value One byte File number
Input buffer start address
* Function code: H'17 (for the 24-bit address) or H'27 (for the 32-bit address)
One byte +0 +2 +4 Return value One byte File number
Input buffer start address
Parameters * Return value (output) 0: Normal completion -1: EOF detected * File number (input) The number returned when the file was opened. * Start address of input buffer (input) The start address of the buffer for storing input data.
Rev. 6.0, 09/00, page 19 of 187
8
FPUTC H'08, H'18, H'28
Outputs one byte to a file
Parameter Block * Function code: H'08 (for the 16-bit address)
One byte +0 +2 Return value One byte File number
Output buffer start address
* Function code: H'18 (for the 24-bit address) or H'28 (for the 32-bit address)
One byte +0 +2 +4 Return value One byte File number
Output buffer start address
Parameters * Return value (output) 0: Normal completion -1: Error * File number (input) The number returned when the file was opened. * Start address of output buffer (input) The start address of the buffer used for storing the output data.
Rev. 6.0, 09/00, page 20 of 187
9
FGETS H'09, H'19, H'29
Reads character string data from a file
Reads character string data from a file. Data is read until either a new line code or a NULL code is read, or until the buffer is full. Parameter Block * Function code: H'09 (for the 16-bit address)
One byte +0 +2 +4 Return value One byte File number
Buffer size Input buffer start address
* Function code: H'19 (for the 24-bit address) or H'29 (for the 32-bit address)
One byte +0 +2 +4 +6 Return value One byte File number
Buffer size Input buffer start address
Parameters * Return value (output) 0: Normal completion -1: EOF detected * File number (input) The number returned when the file was opened. * Buffer size (input) The size of the area for storing the read data. A maximum of 256 bytes can be stored. * Start address of input buffer (input) The start address of the buffer for storing input data.
Rev. 6.0, 09/00, page 21 of 187
10
FPUTS H'0A, H'1A, H'2A
Writes character string data to a file
Writes character string data to a file. The NULL code that terminates the character string is not written to the file. Parameter Block * Function code: H'0A (for the 16-bit address)
One byte +0 +2 Return value One byte File number
Output buffer start address
* Function code: H'1A (for the 24-bit address) or H'2A (for the 32-bit address)
One byte +0 +2 +4 Return value One byte File number
Output buffer start address
Parameters * Return value (output) 0: Normal completion -1: Error * File number (input) The number returned when the file was opened. * Start address of output buffer (input) The start address of the buffer used for storing the output data.
Rev. 6.0, 09/00, page 22 of 187
11
FEOF H'0B
Checks for end of file
Parameter Block
One byte +0 Return value One byte File number
Parameters * Return value (output) 0: File pointer is not at EOF -1: EOF detected * File number (input) The number returned when the file was opened.
12 FSEEK H'0C Moves the file pointer to the specified position
Parameter Block
One byte +0 +2 +4 +6 Return value Direction One byte File number Unused
Offset (high-order word) Offset (low-order word)
Parameters * Return value (output) 0: Normal completion -1: Error * File number (input) The number returned when the file was opened. * Direction (input) 0: The offset specifies the position as a byte count from the start of the file. 1: The offset specifies the position as a byte count from the current file pointer. 2: The offset specifies the position as a byte count from the end of the file.
Rev. 6.0, 09/00, page 23 of 187
* Offset (input) The byte count from the location specified by the direction parameter.
13 FTELL H'0D Returns the current position of the file pointer
Parameter Block
One byte +0 +2 +4 Return value One byte File number
Offset (high-order word) Offset (low-order word)
Parameters * Return value (output) 0: Normal completion -1: Error * File number (input) The number returned when the file was opened. * Offset (output) The current position of the file pointer, as a byte count from the start of the file. The following shows an example for inputting one character as a standard input (from a keyboard). As the system call address, label SYS_CALL is specified:
MOV.W MOV.W JSR STOP SYS_CALL PARM INBUF NOP NOP .DATA.W .RES.B .END .INBUF 2 #H'0101,R0 #PARM, R1 @SYS_CALL
Rev. 6.0, 09/00, page 24 of 187
3.9
Calculation of Instruction Execution Cycles
The simulator/debugger calculates the number of instruction execution cycles using the expression described in the H8S series or H8/300 series programming manual, and the data bus width and the number of access cycles specified in the System Configuration dialog box. However, the calculated number of execution cycles may differ from that for the actual user system because the number of instruction execution cycles for some instructions and processing are treated as follows. * MOVFPE and MOVTPE instructions The number of data transfer cycles of an E-clock-synchronous instruction ranges from 9 to 16. The simulator/debugger calculates the total number of instruction execution cycles by assuming the number of data transfer cycles as 11, and adding the number of operand access cycles to it. The number of operand access cycles is determined by the memory data bus width and the number of memory access cycles. * EEPMOV instruction The number of execution cycles for an EEPROM write instruction is the sum of the instruction read cycles and data transfer cycles. * SLEEP instruction The simulator/debugger does not count the number of execution cycles of the SLEEP instruction because the instruction is usually used to stop program execution. * Standard I/O and file I/O processing The simulator/debugger does not count the number of execution cycles of standard I/O and file I/O processing because the processing is specific to the simulator/debugger. Here, standard I/O and file I/O processing begins when execution has jumped, due to the BSR or JSR instruction, to an address specified in [System Call Address] and ends when execution has returned to the calling address.
3.10
Break Conditions
The simulator/debugger provides the following conditions for interrupting the simulation of a user program during execution. * Break due to the satisfaction of a break command condition * Break due to the detection of an error during execution of the user program * Break due to a trace buffer overflow * Break due to execution of the SLEEP instruction * Break due to the [STOP] button
Rev. 6.0, 09/00, page 25 of 187
3.10.1
Break Due to the Satisfaction of a Break Command Condition
There are five break commands as follows: * BREAKPOINT: * BREAK_ACCESS: * BREAK_DATA: * BREAK_REGISTER: * BREAK_SEQUENCE: Break based on the address of the instruction executed Break based on access to a range of memory Break based on the value of data written to memory Break based on the value of data written to a register Break based on a specified execution sequence
When a break condition is satisfied during user program execution, the instruction at the breakpoint may or may not be executed before a break depending on the type of break, as listed in table 3.4. Table 3.4
Command BREAKPOINT BREAK_ACCESS BREAK_DATA BREAK_REGISTER BREAK_SEQUENCE
Processing When a Break Condition is Satisfied
Instruction When a Break Condition is Satisfied Not executed Executed Executed Executed Not executed
For BREAKPOINT and BREAK_SEQUENCE, if a breakpoint is specified at an address other than the beginning of the instruction, the break condition will not be detected. When a break condition is satisfied during user program execution, a break condition satisfaction message is displayed on the status bar and execution stops. 3.10.2 Break Due to the Detection of an Error During Execution of the User Program
The simulator/debugger detects simulation errors, that is, program errors that cannot be detected by the CPU exception generation functions. The System Configuration dialog box specifies whether to stop or continue the simulation when such an error occurs. Table 3.5 lists the error messages, error causes, and the action of the simulator/debugger in the continuation mode.
Rev. 6.0, 09/00, page 26 of 187
Table 3.5
Simulation Errors
Error Cause A PC value was an odd number. An instruction was fetched from the internal I/O area. Word data was accessed to an oddnumbered address. Longword data was accessed to an oddnumbered address. Processing in Continuation Mode Operates in the same way as the actual device.
Error Message Address Error
Memory Access Error
Access to a memory area that has not been allocated
On memory write, nothing is written; on memory read, all bits Write to a memory area having the write are read as 1. protect attribute Read from a memory area having the read disable attribute Access to an area where memory does not exist Data was written to EEPROM with an instruction other than EEPMOV.
Illegal Instruction
A code other than an instruction was executed.
Always stops.
MOV.B Rn, @-SP or MOV.B @SP+, Rn Continues operation; the result is was executed. not guaranteed. Illegal Operation In the DAA or DAS instruction, relationship between the C and H flags of CCR, and their relation to the value before compensation were incorrect. Zero-division or overflow was caused by the DIVXU or DIVXS instruction. Continues operation; the result is not guaranteed.
When a simulation error occurs in the stop mode, the simulator/debugger returns to the command wait state after stopping instruction execution and displaying the error message. Table 3.6 lists the states of the program counter (PC) at simulation error stop. The status register (SR) value does not change at simulation error stop.
Rev. 6.0, 09/00, page 27 of 187
Table 3.6
Register States at Simulation Error Stop
PC Value * * When an instruction is read: The start address of the instruction that caused the error. When an instruction is executed: The instruction address following the instruction that caused the error.
Error Message Address Error, Memory Access Error
Illegal Instruction Illegal Operation
The start address of the instruction that caused the error. The instruction address following the instruction that caused the error.
Use the following procedure when debugging programs which include instructions that generate simulation errors. a. First execute the program in the stop mode and confirm that there are no errors except those in the intended locations. b. After confirming the above, execute the program in the continuation mode. Note: If an error occurs in the stop mode and simulation is continued after changing the simulator mode to the continuation mode, simulation may not be performed correctly. When restarting a simulation, always restore the register contents and the memory contents to the state prior to the occurrence of the error. 3.10.3 Break Due to a Trace Buffer Overflow
After the [Break] mode is specified with [Trace buffer full handling] in the Trace Acquisition dialog box, the simulator/debugger stops execution when the trace buffer becomes full. The following message is displayed when execution is stopped.
Trace Buffer Full
3.10.4
Break Due to Execution of the SLEEP Instruction
When the SLEEP instruction is executed during instruction execution, the simulator/debugger stops execution. The following message is displayed when execution is stopped.
Sleep
Note: When restarting execution, change the PC value to the instruction address at the restart location.
Rev. 6.0, 09/00, page 28 of 187
3.10.5
Break Due to the [STOP] Button
Users can forcibly terminate execution by clicking the [STOP] button during instruction execution. The following message is displayed when execution is terminated.
Stop
Execution can be resumed with the GO or STEP command.
3.11
Floating-Point Data
Floating-point numbers can be displayed and input for the following real-number data, which makes floating-point data processing easier. * Data in the Set Break dialog box when the break type is set to [Break Data] or [Break Register] * Data in the Memory window * Data in the Fill Memory dialog box * Data in the Search Memory dialog box The floating-point data format conforms to the ANSI C standard. In the simulator/debugger, the rounding mode for floating-point decimal-to-binary conversion can be selected in the System Configuration dialog box. One of the following two modes can be selected: * Round to nearest (RN) * Round to zero (RZ) If a denormalized number is specified for binary-to-decimal or decimal-to-binary conversion, it is converted to zero in RZ mode, and it is left as a denormalized number in RN mode. If an overflow occurs during decimal-to-binary conversion, the maximum floating-point value is returned in RZ mode, and the infinity is returned in RN mode.
3.12
Display of Function Call History
The simulator/debugger displays the function call history in the Stack Trace window when simulation stops, which enables program execution flow to be checked easily. Selecting a function name in the Stack Trace window displays the corresponding source program in the Source window; the function that has called the current function can also be checked. The displayed function call history is updated in the following cases:
Rev. 6.0, 09/00, page 29 of 187
* When simulation stops under the break conditions described in section 3.10, Break Conditions. * When register values are modified while simulation stops due to the above break conditions. * While single-step execution is performed. For details, refer to section 5.25, Stack Trace Window.
Rev. 6.0, 09/00, page 30 of 187
Section 4 Menus
This document uses the standard Microsoft menu naming convention.
Menu title Menu bar Dropdown menu Menu option Ellipsis Cascading menu
(R)
Check mark
Figure 4.1 Menus Check marks indicate that the feature provided by the menu option is selected. Ellipsis indicates that selecting the menu option will open a dialog box that requires extra information to be entered. Refer to your Windows user manual for details on how to use the Windows menu system.
(R) (R)
4.1
File
The File menu is used for aspects of the program that access program files. 4.1.1 New Session...
Launches the Select Session dialog box allowing the user to select a new debugging platform. 4.1.2 Load Session...
Launches the Select Session dialog box allowing the user to load a session from a selected session file (*.hds extension). A session file contains the debugging platform's settings, and the current program and the position of open child windows (views) - it contains symbols, breakpoints, or current register values.
Rev. 6.0, 09/00, page 31 of 187
4.1.3
Save Session
Updates the session file for the current session file. If there is no current session file defined, this acts in a similar manner to the [Save Session As...] menu option. 4.1.4 Save Session As...
Launches the Save As dialog box allowing the user to save the current session details under a new file name. A session file contains the debugging platform's settings, and the current program and the position of open child windows (views) - it contains symbols, breakpoints, or current register values. 4.1.5 Load Program...
Launches the Load Program dialog box, allowing the user to select an object file in either S-Record (*.mot; *.s20; and *.obj extensions) or ELF/DWARF (*.abs extension) format and download it to the debugging platform's memory. This will also load the symbols if they are available in the selected file. 4.1.6 Initialize
This will attempt to re-initialize the debugging system. It will close down any open child windows and shut down the link to the debugging platform. If this is successful, an attempt to re-establish the link to the debugging platform will be made. The message 'Link up' will appear in the left-most box of the status bar if this is successful. (See also section 4.4.1, Reset CPU) 4.1.7 Exit
This will close down the HDI. The actions that are carried out by the HDI can be defined by the user in the 'On Exit' section of the HDI Options dialog box. (See also section 4.6.2, Options...)
4.2
Edit
The Edit menu is used for aspects of the program that access or modify data in the child windows and debugging platform. 4.2.1 Cut
Only available if a block is highlighted in a child window whose contents can be modified.
Rev. 6.0, 09/00, page 32 of 187
This will remove the contents of the highlighted block from the window and place it on the (R) clipboard in the standard Windows manner. 4.2.2 Copy
Only available if a block is highlighted in a child window whose contents can be modified. This will copy the contents of the highlighted block to the clipboard in the standard (R) Windows manner. 4.2.3 Paste
Only available if the contents of the child window can be modified. This will copy the (R) contents of the Windows clipboard into the child window at the current cursor position. 4.2.4 Find...
Only available if the window contains text. This will launch the Find dialog box allowing the user to enter a word and locate occurrences within the text. If a match is found, the cursor will move to the start of the word. 4.2.5 Evaluate...
Launches the Evaluate dialog box allowing the user to enter a numeric expression, e.g. "(#pc + 205)*2", and display the result in all currently supported radices.
4.3
View
The View menu is used to select and open new child windows. If the menu option is grayed, then the features provided by the window are not available with the current debugging platform. 4.3.1 Breakpoints Opens the Breakpoints window allowing the user to view and edit current breakpoints.
Rev. 6.0, 09/00, page 33 of 187
4.3.2
Command Line
Opens the Command Line window allowing the user to enter text-based commands to control the debugging platform. These commands can be piped in from a batch file, and the results piped out to a log file, allowing automatic tests to be performed. 4.3.3 Disassembly...
Launches the Set Address dialog box allowing the user to enter the address that you wish to view. 4.3.4 Labels
Launches the Labels window allowing the user to manipulate the current program's symbols (labels). 4.3.5 Locals
Opens the Locals window allowing the user to view and edit the values of the variables defined in the current function. The contents are blank unless the PC is within a C/C++ sourcelevel function. 4.3.6 Memory...
Launches the Open Memory Window dialog box allowing the user to specify a memory block and view format to display within a Memory window. 4.3.7 Performance Analysis
Launches the Performance Analysis window allowing the user to set up and view the number of times that particular sections of the user program have been called. 4.3.8 Profile-List
Opens the Profile-List window allowing the user to view the address and size of a function or a global variable, the number of times the function is called, and profile data.
Rev. 6.0, 09/00, page 34 of 187
4.3.9
Profile-Tree
Opens the Profile-Tree window allowing the user to view the relation of function calls in a tree structure. The Profile-Tree window also displays the address, size, and stack size of each function, number of function calls, and profile data. The stack size, number of function calls, and profile data are values when the function is called. 4.3.10 Registers
Opens the Registers window allowing the user to view all the current CPU registers and their contents. 4.3.11 Source...
Launches the Open dialog box allowing the user to enter a file name of the source file (in either C/C++ or assembly language format) to view. If the source file is not included within the current program or there is no debugging information for the file within the 'absolute' (*.abs) file, then the message "Cannot load program. No Source level debugging available" is displayed. 4.3.12 Status
Opens the System Status window allowing the user to view the debugging platform's current status and the current session and program names. 4.3.13 Trace Opens the Trace window allowing the user to see the current trace information. 4.3.14 Watch
Opens the Watch window allowing the user to enter C/C++-source level variables and view and modify their contents. 4.3.15 Simulated I/O
Opens the Simulated I/O window enabling the standard I/O and file I/O. 4.3.16 Stack Trace
Opens the Stack Trace window displaying the current stack trace information.
Rev. 6.0, 09/00, page 35 of 187
4.3.17
External Tool
Opens the External Tools window allowing the user to use the co-verification tool.
4.4
Run
The Run menu controls the execution of the user program in the debugging platform. 4.4.1 Reset CPU
Resets the user system hardware and sets the PC to the reset vector address. (See also section 4.1.6, Initialize). 4.4.2 Go Starts executing the user program at the current PC. 4.4.3 Reset Go Executes the user program from the reset vector address. 4.4.4 Go To Cursor
Starts executing the user program at the current PC and continues until the PC equals the address indicated by the current text cursor (not mouse cursor) position. 4.4.5 Set PC To Cursor
Changes the value of the Program Counter (PC) to the address at the row of the text cursor (not mouse cursor). Disabled if no address is available for the current row. 4.4.6 Run...
Launches the Run Program dialog box allowing the user to enter temporary breakpoints before executing the user program. 4.4.7 Step In
Executes a block of user program before breaking. The size of this block is normally a single instruction but may be set by the user to more than one instruction or a C/C++-source line
Rev. 6.0, 09/00, page 36 of 187
(see also section 4.4.10, Step...). If a subroutine call is reached, then the subroutine will be entered and the view is updated to include its code. 4.4.8 Step Over
Executes a block of user program before breaking. The size of this block is normally a single instruction but can be set by the user to more than one instruction or a C/C++-source line (see also section 4.4.10, Step...). If a subroutine call is reached, then the subroutine will not be entered and sufficient user program will be executed to set the current PC position to the next line in the current view. 4.4.9 Step Out
Executes sufficient user program to reach the end of the current function and set the PC to the next line in the calling function before breaking. 4.4.10 Step...
Launches the Step Program dialog box allowing the user to modify the settings for stepping. 4.4.11 Halt Stops the execution of the user program.
4.5
Memory
The Memory menu is used for aspects of the user program that access memory. 4.5.1 Refresh
Forces a manual update of the contents of all open Memory windows. 4.5.2 Load...
Launches the Load Memory dialog box, allowing the user to select an offset address in the memory area, and file name to load from an S-Record format file on disk.
Rev. 6.0, 09/00, page 37 of 187
4.5.3
Save...
Launches the Save Memory As dialog box, allowing the user to select a start and an end address in the memory area, to save to an S-Record format file on disk. If a block of memory is highlighted in a Memory window, these will be automatically entered as the start and end addresses when the dialog box is displayed. 4.5.4 Verify...
Launches the Verify S-Record File with Memory dialog box, allowing the user to select a start and an end address in the memory area to check against the contents of an S-Record file on disk. 4.5.5 Test...
Launches the Test Memory dialog box allowing the user to specify a block of memory to test for correct read/write operation. The exact test is target dependent. However, in all cases the current contents of the memory will be overwritten - YOUR PROGRAM AND DATA WILL BE ERASED. This simulator/debugger does not support this function. 4.5.6 Fill...
Launches the Fill Memory dialog box allowing the user to fill a block of the debugging platform's memory with a value. The start and end fields can be specified in the same way as that with the Save option (refer to section 4.5.3, Save...). 4.5.7 Copy...
Launches the Copy Memory dialog box allowing the user to copy a block of the debugging platform's memory to an address within the same memory area. The blocks may overlap, in which case any data within the overlapped region of the source block will be overwritten. The start and end fields can be specified in the same way as that with the Save option (refer to section 4.5.3, Save...). 4.5.8 Compare...
Launches the Compare Memory dialog box, allowing the user to select a start and an end address in the memory area, to check against another area in memory. The start and end fields can be specified in the same way as that with the Save option (refer to section 4.5.3, Save...).
Rev. 6.0, 09/00, page 38 of 187
4.5.9
Configure Map...
Opens the Memory Mapping window allowing the user to view and edit the debugging platform's current memory map. In some debugging platforms, the Memory Map dialog box will open. 4.5.10 Configure Overlay...
Launches the Overlay... dialog box. When the overlay function is used, the target section group can be selected in the dialog box.
4.6
Setup
The Setup menu is used to modify the settings of the HDI user interface, and the configuration of the debugging platform. 4.6.1 Status Bar
Toggles the status bar feature on and off. If the feature is enabled then a check mark will be displayed to the left of the menu text. 4.6.2 Options...
Launches the HDI Options dialog box allowing the user to modify the settings that are specific to the HDI (not debugging platform dependent settings). 4.6.3 Radix
Cascades a menu displaying a list of radix in which the numeric values will be displayed and entered by default (without entering the radix prefix). The current radix has a check mark to its left and the associated toolbar button is locked down. For example, if the current radix is decimal then the number ten will be displayed as "10" and may be entered as "10", "H'A", "0x0a", etc.; if the current radix is hexadecimal then the number ten will be displayed as "0A" and entered as "A", "D'10", etc. 4.6.4 Customize Cascades a menu displaying a list of options that can be customized by the user. Toolbar :When this cascade menu option is selected, the Customize dialog box is launched.
Rev. 6.0, 09/00, page 39 of 187
Font :When this cascade menu option is selected, the Font dialog box is launched, allowing a fixed width font to be selected. File Filter : When this cascade menu option is selected, the Customize File Filter dialog box is launched, allowing the browser file filters for object, source and memory files to be changed to match the user's requirements. 4.6.5 Configure Platform...
Launches a set-up dialog box allowing the user to modify the debugging platform settings. Refer to section 5.18, System Configuration Dialog Box for more details.
4.7
Window
The Window menu modifies the display of currently open child windows. The following menu options are always displayed, and a numbered list of current child windows will be appended the topmost child window will have a check mark. 4.7.1 Cascade
Arranges the child windows in the standard cascade manner, i.e. from the top left such that the title bar of each child window is visible. 4.7.2 Tile
Arranges the child windows in the standard tile manner, i.e. sizes each window such that all are displayed without overlapping. 4.7.3 Arrange Icons
Lines up any iconized windows neatly along the bottom of the parent frame in the standard manner. 4.7.4 Close All
Closes all the child windows.
Rev. 6.0, 09/00, page 40 of 187
4.8
Help
The Help menu accesses additional information on how to use the functionality provided by HDI. 4.8.1 Index Opens the main help file at the index. 4.8.2 Using Help
(R)
Opens a help file allowing the user to find out how to use Windows hypertext help system. 4.8.3 Search for Help on
Opens the main help file and launches the Search dialog box allowing the user to enter and browse through the file's keywords. 4.8.4 About HDI
Launches the About HDI dialog box allowing the user to view the version of HDI and the currently loaded DLLs.
Rev. 6.0, 09/00, page 41 of 187
Rev. 6.0, 09/00, page 42 of 187
Section 5 Windows and Dialog Boxes
This section describes types of windows and dialog boxes, the features that they support and the options available through their associated popup menu.
5.1
Breakpoints Window
Figure 5.1 Breakpoints Window This window displays all of the specified breakpoints. Items that can be displayed are listed below. [Enable]
are enabled.
Displays whether the breakpoint is enabled or disabled. Breakpoints with mark
* or
[File/Line] [Symbol]
Displays file names and line numbers where breakpoints are specified. Displays symbols that correspond to breakpoint setting addresses. When no symbol exists, nothing is displayed. Displays addresses where breakpoints are specified. Displays break types. BP: PC break BA: Break access BD: Break data BR: Break register (Register name) BS: Break sequence
[Address] [Type]
When a breakpoint is double clicked in this window, the Set Break dialog box is opened and break conditions can be modified. If a break sequence is double clicked, the Break Sequence dialog box is opened. A popup menu containing the following options is available by right clicking within the window.
Rev. 6.0, 09/00, page 43 of 187
5.1.1
Add...
Sets a breakpoint. Launches the Set Break dialog box allowing the user to set a break condition. 5.1.2 Edit...
Only enabled if a breakpoint is selected. Launches the Set Break dialog box allowing the user to modify the properties of an existing breakpoint. When [Break Sequence] is selected, the Break Sequence dialog box opens. 5.1.3 Delete
Only enabled if a breakpoint is selected. Removes the selected breakpoint. To retain the details of the breakpoint but not have it cause a break when its conditions are met, use the Disable option (see section 5.1.5, Disable/Enable). 5.1.4 Delete All
Removes all breakpoints from the list. 5.1.5 Disable/Enable
Only enabled if a breakpoint is selected. Toggles the selected breakpoint between enabled and disabled (when disabled, a breakpoint remains in the list, but does not cause a break when the specified conditions are satisfied). When a breakpoint is enabled, a check mark is shown to the left of the menu text (and a circle is shown in the Enable column for the breakpoint). 5.1.6 Go To Source
Opens Source or Disassembly window at address of breakpoint.
Rev. 6.0, 09/00, page 44 of 187
5.2
Set Break Dialog Box
Figure 5.2 Set Break Dialog Box This dialog box specifies break conditions. A break type to be set is specified using the radio buttons in the [Type] box. Items that can be specified are listed below. [PC Breakpoint] [Start address] [Count] Address where a break occurs Number of times that a specified instruction is fetched (default: 1) Start address of memory where a break occurs if the memory is accessed End address of memory where a break occurs if the memory is accessed (If no data is input, only the start address is break range) Read, Write, or Read/Write
Rev. 6.0, 09/00, page 45 of 187
[Break Access]
[Start address] [End address]
[Access type]
[Break Data]
[Start Address] [Data] [Size] [Option]
Address of memory where a break occurs Data value that causes a break Data size Data match/mismatch Register name where break conditions are specified Data value that causes a break (If no data is input, a break occurs whenever data is written to the register) Data size Data match/mismatch
[Break Register] [Register] [Data] [Size] [Option]
Note that when [Break Sequence] is selected under [Type], the Break Sequence dialog box opens. When [PC Breakpoint] is selected, if an overloaded function or class name including a member function is specified in [Start Address], the Select Function dialog box opens. In the dialog box, select a function. For details, refer to section 14, Selecting Functions. Clicking the [OK] button sets the break conditions. Clicking the [Cancel] button closes this dialog box without setting the break conditions.
5.3
Break Sequence Dialog Box
Figure 5.3 Break Sequence Dialog Box This dialog box specifies the pass addresses as break conditions.
Rev. 6.0, 09/00, page 46 of 187
Specify addresses in [Address1] to [Address8]. Not all eight addresses need to be specified. When an overloaded function or a class name including a member function is specified as a pass address, the Select Function dialog box will open; select the function name in the dialog box. For details, refer to section 14, Selecting Functions. Clicking the [OK] button sets the pass addresses. Clicking the [Cancel] button closes this dialog box without adding a new pass address.
5.4
Command Line Window
Figure 5.4 Command Line Window Allows the user to control the debugging platform by sending text-based commands instead of the window menus and commands. It is useful if a series of predefined commands need to be sent to the debugging platform by calling them from a batch file and, optionally, recording the output in a log file. The command can be executed by pressing 'Enter' after the command is input to the text box (Or, the Enter button in the right of the text box is clicked). For information about the available commands, refer to the on-line help. If available, the window title displays the current batch and log file names separated by colons. The functionality of the toolbar buttons is identical to the popup menu options shown below.
Rev. 6.0, 09/00, page 47 of 187
5.4.1
Set Batch File...
Launches the Set Batch File dialog box, allowing the user to enter the name of an HDI command file (*.hdc). The batch file is then run automatically. The name of the file is shown on the window title bar. 5.4.2 Play
Runs the last executed HDI command file (*.hdc). It is displayed in gray while the batch file is running and the display is enabled when the command file execution is terminated and the control is returned to the user. 5.4.3 Set Log File...
Launches the Open Log File dialog box, allowing the user to enter the name of an HDI log file (*.log). The logging option is automatically set and the name of the file is shown on the window title bar. Opening a previous log file will ask the user if they wish to append or over-write the current log. 5.4.4 Logging
Toggles logging to file on and off. When logging is active, the button becomes effective. Note that the contents of the log file cannot be viewed until logging is completed, or temporarily disabled by clearing the check box. Re-enabling logging will append to the log file. 5.4.5 Select All
Selects all the output from the Command Line window. 5.4.6 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications.
5.5
Disassembly Window
This window is used to display code at the assembly-language level. This window layout has a different layout from the Source window, with an additional column Label which displays the symbol/label name (if available) for that address. Assembler
Rev. 6.0, 09/00, page 48 of 187
information is obtained by disassembling the memory contents, and may be edited or viewed directly from memory without requiring debug information from the object file.
Figure 5.5 Disassembly Window Each column supports column-specific double-click actions: * BP - Toggles standard breakpoint at that address. * Address - Launches the Set Address dialog box, allowing the user to enter a new address. If the address is in a source file, then that file will be opened in a new window (a current source view will be brought into focus) with the cursor set to the specified address. Finally, if the address does not correspond to a source file, then this window will scroll to that location. When an overloaded function or a class name is entered in the Set Address edit field, the Select Function dialog box opens for you to select a function. * Code and Assembler - Launches the Assembler dialog box allowing the user to modify the instruction at that address. Note that changes to the machine code do not modify the source file, and any changes will be lost at the end of the session. * Label - Launches the Label dialog box, allowing the user to enter a new label, or to clear or edit the name of an existing label. * Source - Launches editor at location in source (set by optional startup parameters in (R) Windows Start menu HDI shortcut). Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking. The currently selected standard breakpoint is shown by a check mark to the left of the menu text.
Rev. 6.0, 09/00, page 49 of 187
A popup menu containing the following options is available by right clicking within the window, but outside the BP column: 5.5.1 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications. 5.5.2 Set Address...
Launches the Set Address dialog box, allowing the user to enter a new start address. The window will be updated so that this is the first address displayed in the top-left corner. When an overloaded function or a class name including a member function is entered, the Select Function dialog box opens for you to select a function. 5.5.3 Go To Cursor
Commences to execute the user program starting from the current PC address. The program will continue to run until the PC reaches the address indicated by the text cursor (not the mouse cursor) or another break condition is satisfied. 5.5.4 Set PC Here
Changes the value of the PC to the address indicated by the text cursor (not the mouse cursor). 5.5.5 Instant Watch...
Launches the Instant Watch dialog box with the name extracted from the view at the current text cursor (not mouse cursor) position. Only valid in the selected source column. 5.5.6 Add Watch
Adds the name extracted from the view at the current text cursor (not mouse cursor) position to the list of watched variables. If a Watch window is not open, then it is opened and brought to the top of the child windows. Only valid in the source column. 5.5.7 Go to Source
Opens the Source window corresponding to the current text cursor (not mouse cursor) position. Only valid in the source column.
Rev. 6.0, 09/00, page 50 of 187
5.6
Labels Window
Figure 5.6 Labels Window You can view symbols sorted either alphabetically (by ASCII code) or by address value by clicking on the respective column heading. It supports column-specific double-click actions: * BP - Sets or cancels a standard breakpoint at that address. * Address - Opens a Source window at the start of the function. * Name - Launches the Edit Label dialog box. Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking. The currently selected standard breakpoint is shown by a check mark to the left of the menu text. A popup menu containing the following options is available by right clicking within the window, but outside the BP column:
Rev. 6.0, 09/00, page 51 of 187
5.6.1
Add...
Launches the Add Label dialog box:
Figure 5.7 Add Label Dialog Box Enter the new label name into the Name field and the corresponding value into the Value field and press [OK]. The Add Label dialog box closes and the label list is updated to show the new label. When an overloaded function or a class name is entered in the Name field, the Select Function dialog box opens for you to select a function. For details, refer to section 14, Selecting Functions. 5.6.2 Edit...
Launches the Edit Label dialog box:
Figure 5.8 Edit Label Dialog Box Edit the label name and value as required and then press [OK] to save the modified version in the label list. The list display is updated to show the new label details. When an overloaded function or a class name is entered in the Name field, the Select Function dialog box opens for you to select a function. For details, refer to section 14, Selecting Functions.
Rev. 6.0, 09/00, page 52 of 187
5.6.3
Find...
Launches the Find Label Containing dialog box:
Figure 5.9 Find Label Containing Dialog Box Enter all or part of the label name that you wish to find into the edit box and click [OK] or press ENTER. The dialog box closes and HDI searches the label list for a label name containing the text that you entered. Note: Only the label is stored by 1024 characters of the start, therefore the label name must not overlap mutually in 1024 characters or less. Labels are case sensitive. 5.6.4 Find Next
After a label has been searched, searches for the next label that matches the search condition. 5.6.5 View Source
Opens the Source or the Disassembly window that matches the address of the label. 5.6.6 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications. 5.6.7 Delete
Deletes the currently selected label from the symbol list. Alternatively use the Delete accelerator key. A confirmation message box appears:
Rev. 6.0, 09/00, page 53 of 187
Figure 5.10 Message Box for Confirming Label Deletion If you click on the [Yes] button the label is removed from label list and the window display is updated. If the message box is not required then do not select the Delete Label option of the Confirmation tab in the HDI Options dialog box. 5.6.8 Delete All
Deletes all the labels from the list. A confirmation message box appears:
Figure 5.11 Message Box for Confirming All Label Deletion If you click on the [Yes] button all the labels are removed from the HDI system's symbol table and the list display will be cleared. If the message box is not required then do not select the Delete All Labels option of the Confirmation tab in the HDI Options dialog box. 5.6.9 Load...
Merges a symbol file into HDI's current symbol table. The Load Symbols dialog box opens:
Rev. 6.0, 09/00, page 54 of 187
Figure 5.12 Load Symbols Dialog Box The dialog box operates like a standard Windows open file dialog box; select the file and click [Open] to start loading. The standard file extension for symbol files is ".sym". When the symbol loading is complete a confirmation message box will be displayed showing how many symbols have been loaded (this can be switched off in the Confirmations tab on the HDI Options dialog). 5.6.10 Save
(R)
Saves HDI's current symbol table to a symbol file. 5.6.11 Save As...
(R)
The Save Symbols dialog box operates like a standard Windows Save File As dialog box. Enter the name for the file in the File name field and click [Open] to save HDI's current label list to a symbol file. The standard file extension for symbol files is ".sym". See appendix C for symbol file format.
Rev. 6.0, 09/00, page 55 of 187
5.7
Locals Window
Figure 5.13 Locals Window Allows the user to view and modify the values of all the local variables. The contents of this window are blank unless the current PC can be associated to a function containing local variables in the source files via the debugging information available in the object file. The following items are displayed: [Name] [Value] Variable name Value, allocated position, and variable type. The allocated position is enclosed in { }, and the type is enclosed in ( ).
The variables are listed with a plus indicating that the information may be expanded by doubleclicking on the variable name, and a minus indicating that the information may be reduced. Alternatively, the plus and minus keys may be used. For more information on the display of information, refer to section 12.3.2, Expanding a Watch. A popup menu containing the following options is available by right clicking within the window: 5.7.1 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications. 5.7.2 Edit Value...
Launches a dialog box to modify the selected variable's value.
Rev. 6.0, 09/00, page 56 of 187
5.7.3
Radix
Changes the radix for the selected local variable display.
5.8
Memory Window
Figure 5.14 Memory Window Allows the user to view and modify the contents of the debugging platform's memory. Memory may be viewed in ASCII, byte, word, long word, single-precision floating-point, and doubleprecision floating-point formats, and the title bar indicates the current view style and the address shown as the offset from the previous label (symbol). The contents of memory may be edited by either typing at the current cursor position, or by double-clicking on a data item. The latter will launch the Edit dialog box, allowing the user to enter a new value using a complex expression. If the data at that address cannot be modified (i.e. within ROM or guarded memory) then the message "Invalid address value" is displayed. Double-clicking within the Address column will launch the Set Address dialog box, allowing the user to enter an address. Clicking the [OK] button will update the window so that the address entered in the Set Address dialog box is the first address displayed in the top-left corner. A popup menu containing the following options is available by right clicking within the window: 5.8.1 Refresh
Updates the contents in the Memory window. 5.8.2 Load...
Launches the Load Memory dialog box, allowing the user to load to the debugging platform's memory from an S-Record file (*.mot) without deleting the current debug information. The
Rev. 6.0, 09/00, page 57 of 187
offset field may be used to move the address values specified in the file to a different set of addresses. The optional verify flag can be used to check that the information has been downloaded correctly. 5.8.3 Save...
Launches the Save Memory As dialog box, allowing the user to save a block of the debugging platform's memory to an S-Record file (*.mot). The start and end fields may be set similarly to the Search option (see section 5.8.8, Search...). 5.8.4 Test...
This function is not supported by this simulator/debugger version. Launches the Test Memory dialog box, allowing the user to test a block of memory within the debugging platform. The details of the test depend on the debugging platform. The start and end fields may be set similarly to the Search option(see section 5.8.8, Search...). 5.8.5 Fill...
Launches the Fill Memory dialog box, allowing the user to fill a block of the debugging platform's memory with a specified value. The start and end fields may be set similarly to the Search option(see section 5.8.8, Search...). 5.8.6 Copy...
Launches the Copy Memory dialog box, allowing the user to copy a block of memory within the debugging platform to another location within the same memory space. The blocks may overlap. The start and end fields may be set similarly to the Search option(see section 5.8.8, Search...). 5.8.7 Compare...
Launches the Compare Memory dialog box, allowing the user to select a start and an end address in the memory area, to check against another area in memory. If a block of memory is highlighted in a Memory window, these will be automatically set as the start and end addresses when the dialog box is displayed. Similar to Verify memory, but compares two blocks in memory.
Rev. 6.0, 09/00, page 58 of 187
5.8.8
Search...
Launches the Search Memory dialog box, allowing the user to search a block of the debugging platform's memory for a specified data value. If a block of memory is highlighted, the start and end fields in the dialog box will be set automatically with the start and end addresses corresponding to the highlighted block, respectively. 5.8.9 Set Address...
Displays the Set Address dialog box. When a new start address is entered, the window is updated, and the address entered by the user is shown in the upper left corner. When an overloaded function or a class name including a member function is entered for the address, the Select Function dialog box is displayed. In this dialog box, select the functions to be set. 5.8.10 ASCII/Byte/Word/Long/Single Float/Double Float
A check mark next to these six options indicates the current view format. The user may select a different option to change to that format.
5.9
Performance Analysis Window
Figure 5.15 Performance Analysis Window This window displays the number of execution cycles required for the specified functions. The number of execution cycles can be obtained from the difference between the total number of execution when the target function is called and that when execution returns from the function. The following items are displayed: [Index] Index number of the set condition
Rev. 6.0, 09/00, page 59 of 187
[Function] [Cycle] [Count] [%]
Name of the function to be measured (or the start address of the function) Total number of execution cycles required for the function Total number of calls for the function Ratio of execution cycle count required for the function to the execution cycle count required for the whole program
[Histogram] Histogram display of the above ratio Double-clicking a function to be evaluated displays the Performance Option dialog box. In this dialog box, functions can be modified. Up to 255 functions can be specified. A popup menu containing the following options is available by right clicking within the view area: 5.9.1 Add Range...
Launches the Performance Option dialog box, allowing the user to add a new function to be evaluated. 5.9.2 Edit Range...
Only enabled when the highlighting bar is on a user-defined range. Launches the Performance Option dialog box, allowing the user to modify the range's settings. 5.9.3 Delete Range
Only enabled when the highlighting bar is on a user-defined range. Deletes the range and immediately recalculates the data for the other ranges. 5.9.4 Reset Counts/Times
Clears the current performance analysis data. 5.9.5 Delete All Ranges
Deletes all the current user-defined ranges, and clears the performance analysis data. 5.9.6 Enable Analysis
Toggles the collection of performance analysis data. When performance analysis is active, a check mark is shown to the left of the text.
Rev. 6.0, 09/00, page 60 of 187
5.10
Performance Option Dialog Box
Figure 5.16 Performance Option Dialog Box This dialog box specifies functions (including labels) to be evaluated. Evaluation results are displayed in the Performance Analysis window. Note that when an overloaded function or a class name including a member function is specified, the Select Function dialog box opens. In the dialog box, select a function. For details, refer to section 14, Selecting Functions. Clicking the [OK] button stores the setting. Clicking the [Cancel] button closes this dialog box without setting the function to be evaluated.
Rev. 6.0, 09/00, page 61 of 187
5.11
Registers Window
Figure 5.17 Registers Window Allows the user to view and modify the current register values. A popup menu containing the following options is available by right clicking within the window: 5.11.1 Copy
Only available if a block of text is highlighted. This copies the selected text into the (R) Windows clipboard, allowing it to be pasted into other applications. 5.11.2 Edit...
Launches the Register dialog box, allowing the user to set the value of the register indicated by the text cursor (not mouse cursor).
Rev. 6.0, 09/00, page 62 of 187
5.11.3
Toggle Bit
Only available if the text cursor is placed on a bit-field, e.g. a flag within a status register. Changes the current state of the bit to its other state, e.g. a set overflow flag can be cleared.
5.12
Source Window
The Source window can be used to view any source file that was included within the object file's debug information - this may be C/C++ and assembly language.
Figure 5.18 Source View It supports column-specific double-click actions: * BP - Sets/clears a program (PC) breakpoint at that address. * Address - Launches the Set Address dialog box, allowing the user to enter a new address. If the address is within the range of this file, then the view will scroll such that the cursor can be positioned correctly. If the address is in a different source file, then that file will be opened in a new window with the cursor set to the specified address. Finally, if the address does not correspond to a source file, then a new Disassembly window will be opened. When an overloaded function or a class name is entered, the Select Function dialog box opens for you to select a function. * Label - Launches the Label dialog box, allowing the user to enter a new label and edit the name of an existing label.
Rev. 6.0, 09/00, page 63 of 187
* Line - Launches the Set Line dialog box, allowing the user to go directly to a line in the source file. * Source - Opens the source file in the editor (specified in the Startup menu HDI shortcut) at this source line. Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking. The currently selected standard breakpoint is shown by a check mark to the left of the menu text. A popup menu containing the following options is available by right clicking in any of the other columns within the window: 5.12.1 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications. 5.12.2 Find... Launches the Find dialog box, allowing the user to search the source file for a string. 5.12.3 Set Address...
Launches the Set Address dialog box, allowing the user to enter a new start address. The window will be updated so that this is the first address displayed in the top-left corner. When an overloaded function or a class name including a member name is entered, the Select Function dialog box opens for you to select a function. 5.12.4 Set Line...
Launches the Set Line dialog box, allowing the user to display and move the text cursor (not the mouse cursor) to a specific line. 5.12.5 Go To Cursor
Commences to execute the user program starting from the current PC address. The program will continue to run until the PC reaches the address indicated by the text cursor (not the mouse cursor) or another break condition is satisfied. Grayed if not supported by the debugging platform.
Rev. 6.0, 09/00, page 64 of 187
5.12.6
Set PC Here
Changes the value of the PC to the address indicated by the text cursor (not the mouse cursor). 5.12.7 Instant Watch...
Launches the Instant Watch dialog box with the name extracted from the view at the current text cursor (not mouse cursor) position. Only valid in the source column. 5.12.8 Add Watch
Adds the name extracted from the view at the current text cursor (not mouse cursor) position to the list of watched variables. If the Watch window is not open, then it is opened and brought to the top of the child windows. Only valid in the source column. 5.12.9 Go To Disassembly
Opens a Disassembly view at the address matching the current source line.
5.13
System Status Window
Figure 5.19 System Status Window Allows the user to view the current status of the debugging platform.
Rev. 6.0, 09/00, page 65 of 187
The System Status window is split into four tabs: * Session - contains information about the current session including the connected debugging platform and the names of loaded files. * Platform - contains information about the current status of the debugging platform, typically including CPU type and mode; run status; and timing information. * Memory - contains information about the current memory status including the memory mapping resources and the areas used by the currently loaded object file. * Events - contains information about the current event (breakpoint) status, including resource information. A popup menu containing the following options is available by right clicking within the window: 5.13.1 Update
Updates the displayed data. 5.13.2 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications.
5.14
Trace Window
This window displays trace information. The displayed information items depend on the target CPU. The trace acquisition conditions can be specified in the Trace Acquisition dialog box.
Figure 5.20 Trace Window
Rev. 6.0, 09/00, page 66 of 187
This window displays the following trace information items. The trace acquisition conditions can be specified in the Trace Acquisition dialog box. [PTR] [CYCLE] [ADDR] [CCR] [MULT] Pointer in the trace buffer (0 for the last executed instruction) Total number of instruction execution cycles (cleared by pipeline reset) Instruction address Contents of the condition code register (CCR) are displayed in mnemonics Internal flags in the multiplier are displayed in mnemonics (only for the H8S/2600 series) Instruction mnemonic and data access (displayed in the form of [Transfer destination <- Transferred data]) C/C++ or assembly-language source programs
[INSTRUCTION]
[Source]
Double-clicking a line in the Trace window opens the Source window or Disassembly window. In the window, the source code is displayed and the selected line is indicated by the cursor. A popup menu containing the following options is available by right clicking within the window: 5.14.1 Find...
Launches the Trace Search dialog box, allowing the user to search the current trace buffer for a specific trace record. 5.14.2 Find Next
If a find operation is successful, and the item found is non-unique, then this will move to the next similar item. 5.14.3 Filter...
This function is not supported by this simulator/debugger version. Launches the Filter Trace dialog box, allowing the user to mask out all unnecessary trace entries. 5.14.4 Acquisition...
Launches the Trace Acquisition dialog box, allowing the user to define the area of user program to be traced. This is useful to focus tracing on problem areas.
Rev. 6.0, 09/00, page 67 of 187
5.14.5
Halt
This function is not supported by this simulator/debugger version. Stops tracing data and updates the trace information without stopping execution of the user program. 5.14.6 Restart
This function is not supported by this simulator/debugger version. Starts tracing data. 5.14.7 Snapshot
This function is not supported by this simulator/debugger version. Updates the trace information to show the debugging platform's current status without stopping user program execution. 5.14.8 Clear
Empties the trace buffer in the debugging platform. If more than one trace window is open, all Trace windows will be cleared as they all access the same buffer. 5.14.9 Save...
Launches the Save As file dialog box, allowing the user to save the contents of the trace buffer as a text file. It is possible to define a numeric range based on the Cycle number or to save the complete buffer (saving the complete buffer may take several minutes). Note that this file cannot be reloaded into the trace buffer. 5.14.10 View Source Opens a Source or Disassembly window for the address. 5.14.11 Trim Source Removes white space from the left side of the source.
Rev. 6.0, 09/00, page 68 of 187
5.15
Trace Acquisition Dialog Box
Figure 5.21 Trace Acquisition Dialog Box This dialog box specifies the conditions for trace information acquisition. [Trace start/Stop] [Disable] [Enable] [Instruction type] [Instruction] [Subroutine]
Disables trace information acquisition. Enables trace information acquisition.
Acquires trace information for all instructions. Acquires trace information for the subroutine instructions only.
[Trace buffer full handling] [Continue] Continues acquiring trace information even if the trace information acquisition buffer becomes full. [Break] Stops execution when the trace information acquisition buffer becomes full. Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box without modifying the settings.
Rev. 6.0, 09/00, page 69 of 187
5.16
Trace Search Dialog Box
Figure 5.22 Trace Search Dialog Box This dialog box specifies the conditions for searching trace information. Specify a search item in [Item] and search for the specified contents in [Value]. [PTR] Pointer in the trace buffer (0 for the last executed instruction, specify in the form of -nnn) Total number of instruction execution cycles Instruction address Instruction mnemonic
[Cycle] [Address] [Instruction]
Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box without searching.
Rev. 6.0, 09/00, page 70 of 187
5.17
Watch Window
Figure 5.23 Watch Window Allows the user to view and modify C/C++-source level variables. The contents of this window are blank unless the current user program can be associated to a C/C++-source file via the debugging information available in the absolute file (*.abs). [Name] [Value] Variable name Value, allocated position, and type of the variable
The variables are listed with a plus indicating that the information may be expanded by doubleclicking on the variable name, and a minus indicating that the information may be reduced. Alternatively, the plus and minus keys may be used. A popup menu containing the following options is available by right clicking within the windows: 5.17.1 Copy
Only available if a block of text is highlighted. This copies the highlighted text into the (R) Windows clipboard, allowing it to be pasted into other applications. 5.17.2 Delete
Removes the variable indicated by the text cursor (not the mouse cursor) from the Watch window.
Rev. 6.0, 09/00, page 71 of 187
5.17.3
Delete All
Removes all the variables from the Watch window. 5.17.4 Add Watch...
Launches the Add Watch dialog box, allowing the user to enter a variable or expression to be watched. 5.17.5 Edit Value...
Launches the Edit Value dialog box, allowing the user to change the variable's value. Particular care should be taken when the value of a pointer is changed as it may no longer point to valid data. 5.17.6 Radix
Modifies the radix for the selected watch item display.
5.18
System Configuration Dialog Box
Figure 5.24 System Configuration Dialog Box This dialog box sets the address space bit size, program area bit size, SYSCR address, system call start address, execution mode, floating-point rounding mode, and memory map.
Rev. 6.0, 09/00, page 72 of 187
[CPU]
Displays the current CPU. (The CPU must be specified in the Select Session dialog box.)
[Address Space Bit Size] Specifies the bit size of the address space. Available bit size depends on the CPU as follows: H8/300, H8/300L, H8/300HN, H8S/2600N, H8S/2000N: 16 bits H8/300HA: 17 to 24 bits H8S/2600A, H8S/2000A: 17 to 32 bits [Program Area Bit Size] Specifies the bit size of the program area. Available bit size depends on the CPU as follows: H8/300, H8/300L, H8/300HN, H8S/2600N, H8S/2000N: 16 bits H8/300HA: 17 to 24 bits (same as the address space bit size) H8S/2600A, H8S/2000A: 17 to 24 bits [System Call Address] Specifies the start address of a system call that performs standard input/output or file input/output processing from the user system. [Enable] Specifies whether the system call is enabled or disabled.
[Execution Mode]
Specifies whether the simulator/debugger stops or continues operating when a simulation error occurs. [Stop] Stops the simulation. [Continue] Continues the simulation. Specifies the rounding mode for floating-point decimal-to-binary conversion. [Round to nearest] Rounds to the nearest value. [Round to zero] Rounds toward zero.
[Round Mode]
In the [Memory Map], the start address, end address, memory type, data bus width, and access cycles are displayed in that order. The memory types are as follows: [Add] Specifies [Memory Map] items. Clicking this button opens the Memory Map Modify dialog box, and [Memory Map] items can be specified. Modifies [Memory Map] items. Select an item to be modified in the list box and click the Modify button. The Memory Map dialog box opens and [Memory Map] items can be modified. Deletes [Memory Map] items. Select an item to be deleted in the list box and click this button.
[Modify]
[Delete]
Rev. 6.0, 09/00, page 73 of 187
Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box without modifying the settings.
5.19
Memory Map Modify Dialog Box
Figure 5.25 Memory Map Modify Dialog Box This dialog box specifies the memory map of the target CPU of the simulator/debugger. The contents displayed in this dialog box depend on the target CPU. The specified data is used to calculate the number of cycles for memory access. [Memory type] [Start address] [End address] [State count] [Data bus size] Memory type Start address of the memory corresponding to a memory type End address of the memory corresponding to a memory type Number of memory access cycles Memory data bus width
Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box without modifying the settings. Note: The memory map setting for the area allocated to a system memory resource cannot be deleted or modified. First delete the system memory resource allocation with the Memory Map dialog box, then delete or modify the memory map setting.
Rev. 6.0, 09/00, page 74 of 187
5.20
Memory Map Dialog Box
Figure 5.26 Memory Map Dialog Box This dialog box displays a memory map and information on the target CPU. [System Configuration] Displays the target CPU, address space size, program area size, and execution mode of the simulator/debugger. Displays the access type, start address, and end address of the current memory. Displays the start address, end address, memory type, data bus width, and access cycles.
[System memory resource]
[Memory map]
[System memory resource] can be specified, modified, and deleted using the following buttons: [Add] Specifies [System memory resource] items. Clicking this button opens the System Memory Resource Modify dialog box, and [System memory resource] items can be specified. Modifies [System memory resource] items. Select an item to be modified in the list box and click the Modify button. The System Memory Resource Modify dialog box opens and [System memory resource] items can be modified. Deletes [System memory resource] items. Select an item to be deleted in the list box and click this button.
Rev. 6.0, 09/00, page 75 of 187
[Modify]
[Delete]
Note that the [Reset] button can reset the [Memory map] and [System memory resource] to the default value. Clicking the [Close] button closes this dialog box.
5.21
System Memory Resource Modify Dialog Box
Figure 5.27 System Memory Resource Modify Dialog Box This dialog box specifies or modifies system memory settings. [Start address] [End address] [Access type] Start address of the memory area to be allocated End address of the memory area to be allocated Access type Read: Write: Read/Write:
Read only Write only Read and write
Click the [OK] button after specifying the [Start address], [End address], and [Access type]. Clicking the [Cancel] button closes this dialog box without modifying the setting.
Rev. 6.0, 09/00, page 76 of 187
5.22
Control Registers Window
Figure 5.28 Control Registers Window This window displays the following control register value. Note that this window is available only for the H8S/2600 series. [SYSCR] System control register
The control register value can be directly modified in the window. Double-clicking the register opens the SYSCR dialog box. In this dialog box, the register value can be modified in bit units.
Rev. 6.0, 09/00, page 77 of 187
5.23
SYSCR Dialog Box
Figure 5.29 SYSCR Dialog Box This dialog box sets the value of the SYSCR register (system control register). Note that this dialog box is available only for the H8S/2600 series. The following items are set: [MACS bit] Selects saturation operation or non-saturation operation for the multiply and accumulate operation (MAC instruction). Checking this item selects the saturation operation. Enables or disables the EXR register. Checking this item enables the EXR register.
[EXR bit]
Clicking the [OK] button sets modified values in the memory. Clicking the [Cancel] button closes this dialog box.
Rev. 6.0, 09/00, page 78 of 187
5.24
Simulated I/O Window
Figure 5.30 Simulated I/O Window This window is for standard I/O and file I/O system calls from the user program. Clicking the right mouse button on the Simulated I/O window displays the following popup menus. [Copy] Copies the highlighted text to the Windows clipboard so that the text can be pasted to another application. Pastes the text from the Windows clipboard to the Simulated I/O window. Clears the contents of the Simulated I/O window.
(R) (R)
[Paste] [Clear Window]
For the I/O processing, refer to section 3.12, Standard I/O and File I/O Processing.
Rev. 6.0, 09/00, page 79 of 187
5.25
Stack Trace Window
Figure 5.31 Stack Trace Window This window displays the function call history except for the functions called after an interrupt. The following items are displayed. [Kind] Symbol type F: Function P: Parameter of a function L: Local variable Symbol name Symbol value, address, and type
[Name] [Value]
Right-clicking on the mouse within the window displays a popup menu. Supported menu options are described in the following sections: 5.25.1 Copy
(R)
This copies the highlighted text into the Windows clipboard, allowing it to be pasted into other applications. 5.25.2 Go to Source
Displays the source program corresponding to the selected function in the Source window.
Rev. 6.0, 09/00, page 80 of 187
5.25.3
View Setting...
Launches the Stack Trace Setting... dialog box allowing the user to specify the display format of the Stack Trace window.
Figure 5.32 Stack Trace Setting Dialog Box [Nest level] specifies the nesting level of a function call to be displayed in the Stack Trace window. The display symbol group check box specifies the symbol (excluding the functions) to be displayed. Display Radix group check box specifies the display radix in the Stack Trace window. [Display symbol] group check boxes specify the symbol types to be displayed in addition to functions. [Display Radix] group radio buttons specify the radix for displays in the Stack Trace window.
Rev. 6.0, 09/00, page 81 of 187
5.26
Profile-List Window
Figure 5.33 Profile-List Window This window displays the address and size of a function or a global variable, the number of times the function is called or the global variable is accessed, and profile data. Displayed profile data is as follows: * Called (the number of times a global variable is accessed) * Cycle (the number of execution cycles) The number of execution cycles are calculated by subtracting the total execution cycles at a specific function call instruction execution from the total execution cycles at a return instruction execution of a specific function. When the column header is clicked, data are sorted in alphabetic or ascending/descending order. Double-clicking the Function/Variable or Address column displays the source program or disassembled memory contents corresponding to the address in the line. Right-clicking on the mouse within the window displays a popup menu. Supported menu options are described in the following sections: 5.26.1 View Source
Displays the source program or disassembled memory contents for the address in the selected line. If a line of a global variable is selected, this menu option is displayed in gray characters. 5.26.2 View Profile-Tree
Displays the Profile-Tree window.
Rev. 6.0, 09/00, page 82 of 187
5.26.3
View Profile-Chart
Displays the Profile-Chart window focused on the function in the specified line. 5.26.4 Enable Profiler
Toggles the collection of profile data. When profile data acquisition is active, a check mark is shown to the left of the menu text. Profile data and performance analysis data cannot be acquired at the same time. If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active (when the "Enable Analysis" in the Performance Analysis window is checked), a warning message box is displayed.
Figure 5.34 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When [OK] is clicked, the performance analysis data acquisition is disabled and the profile data acquisition is enabled. 5.26.5 Find...
Displays the Find Text dialog box to find a character string specified in the Function/Variable column. Search is started by inputting a character string to be found in the edit box and clicking [Find Next] or pressing the ENTER key. 5.26.6 Clear Data
Clears the number of times functions are called and profile data. Data in the Profile-Tree window and the Profile-Chart window are also cleared. 5.26.7 Output Profile Information File...
Displays the Save Profile Information File dialog box. Profiling results are saved in a profile information file (.pro extension). The optimizing linkage editor optimizes user programs
Rev. 6.0, 09/00, page 83 of 187
according to the profile information in this file. For details of the optimization using the profile information, refer to the optimizing linkage editor's manual supplied in a separate volume. 5.26.8 Output Text File...
Displays the Save Text of Profile Data dialog box. Displayed contents are saved in a text file. 5.26.9 Select Data...
Selects profile data types. The types of profile data differ according to the debug platform. If this menu option is not supported by the debug platform, it is displayed in gray characters. 5.26.10 Setting... Displays the Setting Profile-List dialog box to set displayed contents.
Figure 5.35 Setting Profile-List Dialog Box The Column group check boxes set the display of a specific column. Functions/Variables group radio buttons are set to display either both of the functions and the global variables displayed in the Function/Variable column or only one of them.
Rev. 6.0, 09/00, page 84 of 187
Checking in the Show Only Executed Function(s) check box disables the display of unexecuted functions. If a stack usage information file (.sni extension) output from the optimizing linkage editor does not exist, unexecuted functions are not displayed even if this check box is not checked. The Include Data of Child Function(s) check box sets whether to display information for a child function which is called in the function as profile data.
5.27
Profile-Tree Window
Figure 5.36 Profile-Tree Window This window displays the relation of function calls in a tree structure. Displayed contents are the address, size, stack size, number of function calls, and profile data. The stack size, number of function calls, and profile data are displayed each time a function call occurs. Displayed profile data is as follows: * Cycle (the number of execution cycles) The number of execution cycles and cache misses are calculated by subtracting the total execution cycles or cache misses at a specific function call instruction execution from the total execution cycles or cache misses at a return instruction execution of a specific function. Note: Displayed stack size does not represent the actual size. Use it as a reference value when the function is called. If there is no stack usage information file (.sni extension) output from the optimizing linkage editor, the stack size is not displayed. For details of the stack usage information file, refer to the optimizing linkage editor's manual. Double-clicking a function in the Function column expands or reduces the tree structure display. The expansion or reduction is also provided by the plus and minus keys. Double-clicking the
Rev. 6.0, 09/00, page 85 of 187
Address column displays the source program or disassembled memory contents corresponding to the specific address. Right-clicking on the mouse within the window displays a popup menu. Supported menu options are described in the following sections: 5.27.1 View Source
Displays the source program or disassembled memory contents for the address on the selected line. 5.27.2 View Profile-List
Displays the Profile-List window. 5.27.3 View Profile-Chart
Displays the Profile-Chart window focused on the function in the specified line. 5.27.4 Enable Profiler
Toggles the collection of profile data. When profile data acquisition is active, a check mark is shown to the left of the text. Profile data and performance analysis data cannot be acquired at the same time. If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active (when the "Enable Analysis" in the Performance Analysis window is checked), a warning message box is displayed.
Figure 5.37 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When [OK] is clicked, the performance analysis data acquisition is disabled and the profile data acquisition is enabled.
Rev. 6.0, 09/00, page 86 of 187
5.27.5
Find...
Displays the Find Text dialog box to find a character string specified in the Function/Variable column. Search is started by inputting a character string to be found in the edit box and clicking [Find Next] or pressing ENTER. 5.27.6 Find Data...
Displays the Find Data dialog box. When the cursor is in the Function column, this menu option is displayed in gray characters.
Figure 5-38 Find Data Dialog Box By selecting the search type from the Find Data group and entering [Find Next] button or ENTER key, search is started. If the [Find Next] button or the ENTER key is input repeatedly, the second larger data (the second smaller data when the Minimum is specified) is searched for. 5.27.7 Clear Data
Clears the number of times functions are called and profile data. Data in the Profile-Tree window and the Profile-Chart window are also cleared. 5.27.8 Profile Information File...
Displays the Save Profile Information File dialog box. Profiling results are saved in a profile information file (.pro extension). The optimizing linkage editor optimizes user programs according to the profile information in this file. For details of the optimization using the profile information, refer to the optimizing linkage editor's manual. 5.27.9 Output Text File...
Displays the Save Text Profile Data dialog box. Displayed contents are saved in a text file.
Rev. 6.0, 09/00, page 87 of 187
5.27.10 Select Data... Selects profile data types. The types of profile data differ according to the debug platform. If this menu option is not supported by the debug platform, it is displayed in gray characters. 5.27.11 Setting... Displays the Setting Profile-Tree dialog box to set displayed contents.
Figure 5.39 Setting Profile-Tree Dialog Box The Column group check boxes set whether or not to display a specific column. Checking in the Show Only Executed Function(s) check box disables displaying unexecuted functions. If a stack usage information file (.sni extension) output from the optimizing linkage editor does not exist, unexecuted functions are not displayed even if this check box is not checked. The Include Data of Child Function(s) check box sets whether to display information for a child function called in a function as profile data.
Rev. 6.0, 09/00, page 88 of 187
5.28
Profile-Chart Window
Figure 5.40 Profile-Chart Window This window displays the relation of calls for a specific function. This window displays the calling relation for the function specified in the Profile-List window or Profile Tree window. The specified function is displayed in the middle, the calling function on the left side, and the called function on the right side. Values beside the calling and called functions show the number of times the function has been called. The Profile-Chart window includes the following tool buttons: * Expands Size * Reduces Size Right-clicking on the mouse within the window displays a popup menu. Supported menu options are described in the section 5.28.3, View Source and in the subsequent sections. 5.28.1 Expands Size Expands spaces between each function. The plus key can also be used to expand spaces. 5.28.2 Reduces Size Reduces spaces between each function. The minus key can also be used to reduce spaces.
Rev. 6.0, 09/00, page 89 of 187
5.28.3
View Source
Displays the source program or disassembled memory contents for the address of the function on which the cursor is placed when the right side button of the mouse is clicked. If the cursor is not placed on a function when the right side button is clicked, this menu option is displayed in gray characters. 5.28.4 View Profile-List
Displays the Profile-List window. 5.28.5 View Profile-Tree
Displays the Profile-Tree window. 5.28.6 View Profile-Chart
Displays the Profile-Chart window for the specific function on which the cursor is placed when the right side button of the mouse is clicked. If the cursor is not placed on a function when the right side button is clicked, this menu option is displayed in gray characters. 5.28.7 Enable Profiler
Toggles the collection of profile data. When profile data acquisition is active, a check mark is shown to the left of the text. Profile data and performance analysis data cannot be acquired at the same time. If the profile data acquisition is enabled when the performance analysis data acquisition is active (when the Enable Analysis check box in the Performance Analysis window is checked), a warning message box is displayed.
Figure 5.41 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time
Rev. 6.0, 09/00, page 90 of 187
When [OK] is clicked, the performance analysis data acquisition is disabled and the profile data acquisition is enabled. 5.28.8 Clear Data
Clears the number of times functions are called and profile data. Data in the Profile-List window and the Profile-Tree window are also cleared. 5.28.9 Multiple View
If the Profile-Chart window is going to be opened when it has already been opened, selects whether another window is to be opened or the same window is to be used to display data. When a check mark is shown to the left side of the menu text, another window is opened. 5.28.10 Output Profile Information File... Displays the Save Profile Information File dialog box. Profiling results are saved in a profile information file (.pro extension). The optimizing linkage editor optimizes user programs according to the profile information in this file. For details of the optimization using the profile information, refer to the optimizing linkage editor's manual.
Rev. 6.0, 09/00, page 91 of 187
Rev. 6.0, 09/00, page 92 of 187
Section 6 Command Lines
Table 6.1 lists the commands. Table 6.1 Simulator/Debugger Commands
Abbreviation AN AR AD AS BP BA BC BD BI BE BR BS DA ER EV FL FS FV GO GR GT HA HE IN Function Comment Enables or disables performance analysis Sets or displays performance analysis functions Deletes a performance analysis range Assembles instructions into memory Checks if an expression is true or false Sets a breakpoint at an instruction address Specifies a memory range access as a break condition Deletes breakpoints Specifies a memory data value as a break condition Displays a list of breakpoints Enables or disables a breakpoint Specifies a register data as a break condition Sets sequential breakpoints Disassembles memory contents Clears the Command Line window Evaluates an expression Loads an object (program) file Saves memory to a file Verifies file contents against memory Executes user program Executes user program from reset Executes user program until temporary breakpoint Halts user program Gets help for command line or help on a command Initializes HDI
Command Name ! ANALYSIS ANALYSIS_RANGE ANALYSIS_RANGE_ DELETE ASSEMBLE ASSERT BREAKPOINT BREAK_ACCESS BREAK_CLEAR BREAK_DATA BREAK_DISPLAY BREAK_ENABLE BREAK_REGISTER BREAK_SEQUENCE DISASSEMBLE ERASE EVALUATE FILE_LOAD FILE_SAVE FILE_VERIFY GO GO_RESET GO_TILL HALT HELP INITIALISE
Rev. 6.0, 09/00, page 93 of 187
Table 6.1
Simulator/Debugger Commands (cont)
Abbreviation LO MA MS MD ME MF MV MT QU RA RD RS RE ST SP SO SR SU SA SC SL SS SV TR TA Function Controls command output logging Displays memory mapping Allocates a memory area Displays memory contents Modifies memory contents Fills a memory area Moves a block of memory Tests a block of memory Exits HDI Sets default input radix Displays CPU register values Changes CPU register contents Resets CPU Delays command execution Steps program (by instructions or source lines) Steps out of the current function Steps program, not stepping into functions Sets rate of stepping Executes a command file Defines a symbol Deletes a symbol Loads a symbol information file Saves a symbol information file Displays symbols Displays trace buffer contents Enables or disables trace information acquisition
Command Name LOG MAP_DISPLAY MAP_SET MEMORY_DISPLAY MEMORY_EDIT MEMORY_FILL MEMORY_MOVE MEMORY_TEST QUIT RADIX REGISTER_DISPLAY REGISTER_SET RESET SLEEP STEP STEP_OUT STEP_OVER STEP_RATE SUBMIT SYMBOL_ADD SYMBOL_CLEAR SYMBOL_LOAD SYMBOL_SAVE SYMBOL_VIEW TRACE TRACE_ACQUISITION
The following describes each command syntax.
Rev. 6.0, 09/00, page 94 of 187
!(COMMENT)
Abbreviation: none Description: Allows a comment to be entered, useful for documenting log files. Syntax: !
Parameter Type Text Description Output text
Example: ! Start of test routine Outputs comment 'Start of test routine' into the Command Line window (and to the log file, if logging is active).
ANALYSIS
Abbreviation: AN Description: Enables/disables performance analysis. Counts are not automatically reset before running. Syntax: an []
Parameter None Keyword enable disable reset Type Description Displays the performance analysis state Enables/disables performance analysis Enables performance analysis Disables performance analysis Resets performance analysis counts
Rev. 6.0, 09/00, page 95 of 187
Examples: ANALYSIS AN enable AN disable AN reset Displays performance analysis state. Enables performance analysis. Disables performance analysis. Resets performance analysis counts.
ANALYSIS_RANGE
Abbreviation: AR Description: Sets a function for which the performance analysis is provided, or displays a function for which the performance analysis is provided without parameters. Syntax: ar []
Parameter none String Type Description Displays all functions for which the performance analysis is provided Name of function for which the performance analysis is provided
Examples: ANALYSIS_RANGE sort AR Provides the performance analysis for the function sort. Displays the function for which the performance analysis is provided.
ANALYSIS_RANGE_DELETE
Abbreviation: AD Description: Deletes the specified function, or all functions if no parameters are specified (it does not ask for confirmation).
Rev. 6.0, 09/00, page 96 of 187
Syntax: ad []
Parameter none Numeric Type Description Deletes all functions Index number of function to delete
Examples: ANALYSIS_RANGE_DELETE 6 AD Deletes the function with index number 6. Deletes all functions.
ASSEMBLE
Abbreviation: AS Description: Assembles mnemonics and writes them into memory. In assembly mode, '.' exits, '^' steps back a byte, the ENTER key steps forward a byte. Syntax: as

Parameter
Type Numeric Description Address at which to start assembling
Example: AS H'1000 Starts assembling from H'1000.
ASSERT
Abbreviation: none Description: Checks if an expression is true or false. It can be used to terminate the batch file when the expression is false. If the expression is false, an error is returned. This command can be used to write test harnesses for subroutines.
Rev. 6.0, 09/00, page 97 of 187
Syntax: assert
Parameter Type Expression Description Expression to be checked
Example: ASSERT #R0 == 0x100 Returns an error if R0 does not contain 0x100.
BREAKPOINT
Abbreviation: BP Description: Specifies a breakpoint at the address where the instruction is written. Syntax: bp
[]
Parameter
Type Numeric Numeric Description The address of a breakpoint The number of times the instruction at the specified address is to be fetched (optional, default = 1).
Examples: BREAKPOINT 0 2 A break occurs when an attempt is made to execute the instruction at address H'0 for the second time. A break occurs when an attempt is made to execute the instruction at address H'C0.
BP C0
BREAK_ACCESS
Abbreviation: BA Description: Specifies a memory range as a break condition
Rev. 6.0, 09/00, page 98 of 187
Syntax: ba [] []
Parameter Type Numeric Numeric Keyword R W RW Description The start address of a breakpoint The end address of a breakpoint (optional, default = ) Access type (optional, default = RW). A break occurs when the specified range is read. A break occurs when the specified range is written to. A break occurs when the specified range is read or written to.
Examples: BREAK_ACCESS 0 1000 W A break occurs when the specified range from address H'0 to address H'1000 is written to. A break occurs when address H'FFFF is accessed.
BA FFFF
BREAK_CLEAR
Abbreviation: BC Description: Deletes breakpoints. Syntax: bc
Parameter Type Numeric Description Index of the breakpoint to be canceled. If the index is omitted, all breakpoints are deleted.
Examples: BREAK_CLEAR 0 BC The first breakpoint is deleted. All breakpoints are deleted.
Rev. 6.0, 09/00, page 99 of 187
BREAK_DATA
Abbreviation: BD Description: Specifies a memory data value as a break condition. Syntax: bd
[] [


▲Up To Search▲   

 
Price & Availability of HD6433723

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X