Part Number Hot Search : 
BCR320U LL5248B 2701A 55PT16A 74476401 1755529 KM150J ISL6627
Product Description
Full Text Search
 

To Download HD6433064B Datasheet File

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


  Datasheet File OCR Text:
  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 to all our customers
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 n ecessary 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 users manual ade-702-282a rev. 2.0 05/14/02 hitachi, ltd.
cautions 1. hitachi neither warrants nor grants licenses of any rights of hitachis or any third partys 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 partys 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 hitachis 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 hitachis 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/dwarf2 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. 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 hard- copy 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.
i preface read first read this user's manual before using the simulator debugger. 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 hitachi embedded workshop (hew) 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. this manual assumes that the hew is used on the english version of microsoft ? windows ? me operating system running on the ibm pc. 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 microsoft ? windows ? applications.
ii document conventions this manual uses the following typographic conventions: table 1 typographic conventions convention meaning [menu->menu option] bold text with -> is used to indicate menu options (for example, [file->save as...] ). filename.c uppercase names are used to indicate file names. enter this string used to indicate text that must be entered (excluding the quotes). key+key 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. (the how to symbol) 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.
iii contents read first..................................................................................................................... ................i about this manual .............................................................................................................. .........i assumptions .................................................................................................................... ............i document conventions........................................................................................................... .....ii section 1 overview........................................................................................... 1 1.1 features .............................................................................................................................2 1.2 t arget user program.........................................................................................................3 1.3 simulation range..............................................................................................................4 section 2 system overview .............................................................................. 5 2.1 user interface....................................................................................................................5 2.2 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 ................................................................................................7 section 3 simulator/debugger functions ......................................................... 9 3.1 simulator/debugger memory management......................................................................9 3.1.1 memory map specification .................................................................................9 3.1.2 memory resource specification ..........................................................................10 3.2 instruction execution reset processing ............................................................................10 3.3 e xception processing ........................................................................................................ 11 3.4 features specific to the h8s/2600 cpu ...........................................................................11 3.5 control registers........................................................................................................... ....12 3.6 t race .................................................................................................................................12 3.7 standard i/o and file i/o processing................................................................................13 3.8 calculating instruction execution cycles .........................................................................26 3.9 break conditions............................................................................................................ ...26 3.9.1 break due to the satisfaction of a break command condition...........................27 3.9.2 break due to the detection of an error during execution of the user program.28 3.9.3 break due to a trace buffer overflow................................................................29 3.9.4 break due to execution of the sleep instruction ..............................................30 3.9.5 break due to the [stop] button .........................................................................30 3.10 floating-point data ........................................................................................................ ...30 3.11 display of function call history ......................................................................................31 3.12 profiler ..............................................................................................................................31
iv 3.13 pseudo-interrupts .......................................................................................................... .... 31 3.14 coverage ................................................................................................................... ........ 32 section 4 menus ................................................................................................33 4.1 view ................................................................................................................................. 33 4.1.1 workspace ........................................................................................................... 33 4.1.2 output .................................................................................................................. 33 4.1.3 breakpoints .......................................................................................................... 34 4.1.4 command line .................................................................................................... 34 4.1.5 disassembly... ...................................................................................................... 34 4.1.6 io ........................................................................................................................ .34 4.1.7 labels................................................................................................................... 34 4.1.8 locals................................................................................................................... 34 4.1.9 memory................................................................................................................ 34 4.1.10 performance analysis .......................................................................................... 34 4.1.11 profile .................................................................................................................. 35 4.1.12 registers............................................................................................................... 35 4.1.13 status................................................................................................................... .35 4.1.14 trace .................................................................................................................... 35 4.1.15 watch ................................................................................................................... 35 4.1.16 simulated i/o....................................................................................................... 35 4.1.17 stack trace .......................................................................................................... 35 4.1.18 coverage .......................................................................................................... 35 4.1.19 image... ................................................................................................................ 36 4.1.20 waveform... ......................................................................................................... 36 4.1.21 trigger ................................................................................................................. 36 4.2 options..................................................................................................................... ......... 36 4.2.1 debug settings................................................................................................. 36 4.2.2 radix.................................................................................................................... 36 4.2.3 simulator.............................................................................................................. 36 4.3 debug....................................................................................................................... ......... 37 4.3.1 reset cpu............................................................................................................ 37 4.3.2 go ........................................................................................................................ 37 4.3.3 reset go............................................................................................................... 37 4.3.4 go to cursor ....................................................................................................... 37 4.3.5 set pc to cursor ................................................................................................. 37 4.3.6 run....................................................................................................................... 37 4.3.7 step in.................................................................................................................. 37 4.3.8 step over ............................................................................................................. 38 4.3.9 step out ............................................................................................................... 38 4.3.10 step... .................................................................................................................. .38 4.3.11 step mode............................................................................................................ 38 4.3.12 halt program........................................................................................................ 38
v 4.3.13 initialize ............................................................................................................... 38 4.3.14 disconnect ...........................................................................................................38 4.3.15 download modules..............................................................................................38 4.3.16 unload modules...................................................................................................39 4.4 memory...................................................................................................................... .......39 4.4.1 search...............................................................................................................39 4.4.2 copy.....................................................................................................................39 4.4.3 compare...............................................................................................................39 4.4.4 fill...................................................................................................................... ..39 4.4.5 refresh .................................................................................................................39 4.4.6 configure overlay... ............................................................................................40 section 5 windows and dialog boxes.............................................................. 41 5.1 break window ................................................................................................................ ..41 5.1.1 add... ...................................................................................................................42 5.1.2 edit...................................................................................................................... .42 5.1.3 enable ..................................................................................................................42 5.1.4 disable .................................................................................................................42 5.1.5 delete ...................................................................................................................42 5.1.6 delete all .............................................................................................................42 5.1.7 go to source ........................................................................................................42 5.1.8 close file .............................................................................................................42 5.1.9 close all files......................................................................................................43 5.2 set break dialog box (condition sheet) ..........................................................................43 5.3 set break dialog box (action sheet) ...............................................................................45 5.4 command line window...................................................................................................47 5.4.1 set batch file.......................................................................................................47 5.4.2 play ...................................................................................................................... 48 5.4.3 stop ...................................................................................................................... 48 5.4.4 set log file..........................................................................................................48 5.4.5 logging................................................................................................................48 5.4.6 browse .............................................................................................................49 5.4.7 placeholder...........................................................................................................49 5.4.8 select all..............................................................................................................49 5.4.9 copy.....................................................................................................................49 5.4.10 paste .................................................................................................................... .49 5.5 disassembly window .......................................................................................................50 5.5.1 view source.........................................................................................................51 5.5.2 go to cursor .........................................................................................................51 5.5.3 set address... .......................................................................................................51 5.5.4 set pc here..........................................................................................................51 5.5.5 edit...................................................................................................................... .51 5.5.6 code bytes ...........................................................................................................51
vi 5.5.7 toggle breakpoint ............................................................................................... 51 5.6 io window ................................................................................................................... .... 52 5.7 l abel window................................................................................................................ ... 53 5.7.1 add .................................................................................................................. 54 5.7.2 edit................................................................................................................... 54 5.7.3 delete................................................................................................................... 55 5.7.4 delete all............................................................................................................. 55 5.7.5 load ................................................................................................................. 56 5.7.6 save...................................................................................................................... 56 5.7.7 save as ............................................................................................................ 56 5.7.8 find .................................................................................................................. 57 5.7.9 find next ............................................................................................................. 57 5.7.10 view source......................................................................................................... 57 5.8 l ocals window ............................................................................................................... .. 58 5.8.1 edit value... ......................................................................................................... 58 5.8.2 radix.................................................................................................................... 58 5.8.3 copy..................................................................................................................... 59 5.9 memory window .............................................................................................................. 59 5.9.1 lock refresh........................................................................................................ 59 5.9.2 refresh ................................................................................................................. 60 5.9.3 start address.................................................................................................... 60 5.9.4 format.............................................................................................................. 60 5.9.5 search .............................................................................................................. 60 5.9.6 search next.......................................................................................................... 60 5.9.7 copy................................................................................................................. 60 5.9.8 compare............................................................................................................... 60 5.9.9 fill.................................................................................................................... 61 5.9.10 save.................................................................................................................. 61 5.9.11 load ................................................................................................................. 61 5.10 performance analysis window......................................................................................... 62 5.10.1 add range... ........................................................................................................ 62 5.10.2 edit range ........................................................................................................... 63 5.10.3 reset counts/times ............................................................................................. 63 5.10.4 enable analysis ................................................................................................... 63 5.10.5 delete range........................................................................................................ 63 5.10.6 delete all ranges ................................................................................................ 63 5.11 performance option dialog box....................................................................................... 63 5.12 register window ............................................................................................................ .. 64 5.12.1 edit................................................................................................................... 64 5.13 source window.............................................................................................................. ... 65 5.13.1 toggle breakpoint ............................................................................................... 65 5.13.2 enable/disable breakpoint .................................................................................. 65 5.13.3 instant watch... .................................................................................................... 66
vii 5.13.4 go to cursor .......................................................................................................66 5.13.5 set pc here..........................................................................................................66 5.13.6 go to disassembly..............................................................................................66 5.14 source address column....................................................................................................66 5.15 debugger column ............................................................................................................ .68 5.16 status window .............................................................................................................. ....69 5.17 trace window............................................................................................................... ....69 5.17.1 find... .................................................................................................................. .70 5.17.2 find next .............................................................................................................71 5.17.3 acquisition.......................................................................................................71 5.17.4 clear.................................................................................................................... .71 5.17.5 save..................................................................................................................... .71 5.17.6 view source.........................................................................................................71 5.17.7 trim source .........................................................................................................71 5.17.8 statistic................................................................................................................ .71 5.18 trace acquisition dialog box ..........................................................................................72 5.19 trace search dialog box ..................................................................................................73 5.20 trace statistic dialog box ................................................................................................74 5.21 trigger window............................................................................................................. ...75 5.21.1 setting... ............................................................................................................... 75 5.21.2 size..................................................................................................................... ..75 5.22 trigger setting dialog box...............................................................................................76 5.23 watch window ............................................................................................................... ..77 5.23.1 auto update.........................................................................................................78 5.23.2 auto update all...................................................................................................78 5.23.3 delete auto update..............................................................................................78 5.23.4 delete auto update all........................................................................................78 5.23.5 add watch... ........................................................................................................78 5.23.6 edit value... .........................................................................................................78 5.23.7 delete ................................................................................................................... 78 5.23.8 delete all .............................................................................................................78 5.23.9 radix.................................................................................................................... 78 5.23.10 copy.................................................................................................................... .79 5.23.11 save as... .............................................................................................................79 5.23.12 go to memory... .................................................................................................79 5.24 simulator system dialog box...........................................................................................79 5.25 memory map modify dialog box ....................................................................................81 5.26 simulator memory resource dialog box .........................................................................82 5.27 system memory resource modify dialog box ................................................................83 5.28 simulated i/o window .....................................................................................................84 5.29 stack trace window......................................................................................................... 85 5.29.1 go to source ........................................................................................................85 5.29.2 view setting.........................................................................................................86
viii 5.29.3 copy..................................................................................................................... 86 5.30 profile window (list sheet) ............................................................................................. 87 5.31 profile window (tree sheet) ............................................................................................ 88 5.31.1 view source......................................................................................................... 89 5.31.2 view profile-chart............................................................................................... 89 5.31.3 enable profiler ..................................................................................................... 89 5.31.4 not trace the function call.................................................................................... 89 5.31.5 find .................................................................................................................. 89 5.31.6 find data.......................................................................................................... 90 5.31.7 clear data ............................................................................................................ 90 5.31.8 output profile information files...................................................................... 90 5.31.9 output text file............................................................................................... 90 5.31.10 setting ................................................................................................................. .90 5.31.11 properties... .......................................................................................................... 91 5.32 profile chart.............................................................................................................. ........ 92 5.32.1 view source......................................................................................................... 92 5.32.2 view profile-chart............................................................................................... 92 5.32.3 enable profiler ..................................................................................................... 93 5.32.4 clear data ............................................................................................................ 93 5.32.5 multiple view ...................................................................................................... 93 5.32.6 output profile information file ....................................................................... 93 5.32.7 expands size........................................................................................................ 93 5.32.8 reduces size ........................................................................................................ 93 5.33 image view................................................................................................................. ...... 94 5.33.1 auto refresh ........................................................................................................ 94 5.33.2 refresh now ........................................................................................................ 94 5.33.3 property............................................................................................................ 94 5.34 image properties dialog box ............................................................................................ 95 5.35 pixel information .......................................................................................................... .... 97 5.36 waveform window........................................................................................................... 98 5.36.1 auto refresh ........................................................................................................ 98 5.36.2 refresh now ........................................................................................................ 98 5.36.3 zoom in ............................................................................................................... 98 5.36.4 zoom out............................................................................................................. 99 5.36.5 reset zoom .......................................................................................................... 99 5.36.6 zoom magnification ............................................................................................ 99 5.36.7 scale.................................................................................................................... .99 5.36.8 clear cursor......................................................................................................... 99 5.36.9 sample information ......................................................................................... 99 5.36.10 property............................................................................................................ 99 5.37 waveform properties dialog box..................................................................................... 100 5.38 sample information dialog box ....................................................................................... 101 5.39 coverage ................................................................................................................... ........ 102
ix 5.39.1 view source.........................................................................................................103 5.39.2 go to address ..................................................................................................103 5.39.3 set range .........................................................................................................103 5.39.4 enable coverage ..................................................................................................103 5.39.5 clear data... .........................................................................................................103 5.39.6 save data... ..........................................................................................................103 5.39.7 load data.............................................................................................................103 5.39.8 refresh .................................................................................................................1 03 5.39.9 lock refresh........................................................................................................103 5.40 open coverage dialog box ..............................................................................................104 5.41 go to address dialog box...............................................................................................105 5.42 coverage range dialog box.............................................................................................105 5.43 save data dialog box....................................................................................................... 106 5.44 load data dialog box ......................................................................................................1 06 5.45 confirmation request dialog box....................................................................................107 5.46 save coverage data dialog box.......................................................................................107 section 6 command lines ................................................................................ 109 6.1 !(comment) .................................................................................................................. 112 6.2 analysis.................................................................................................................... ...112 6.3 analysis_range .......................................................................................................113 6.4 analysis_range_delete ......................................................................................114 6.5 assemble.................................................................................................................... ..114 6.6 assert...................................................................................................................... ......115 6.7 breakpoint .................................................................................................................1 15 6.8 break_access ............................................................................................................117 6.9 break_clear ..............................................................................................................119 6.10 break_cycle ..............................................................................................................119 6.11 break_data ................................................................................................................1 21 6.12 break_display ..........................................................................................................123 6.13 break_enable ...........................................................................................................124 6.14 break_register ........................................................................................................125 6.15 break_sequence ......................................................................................................127 6.16 change_configuration .......................................................................................128 6.17 change_project .......................................................................................................129 6.18 coverage................................................................................................................... ..129 6.19 coverage_display ..................................................................................................130 6.20 coverage_load........................................................................................................131 6.21 coverage_range .....................................................................................................131 6.22 coverage_save.........................................................................................................132 6.23 default_object_format .....................................................................................133 6.24 disassemble ...............................................................................................................1 33 6.25 erase...................................................................................................................... ........134
x 6.26 evaluate ................................................................................................................... .. 134 6.27 file_load .................................................................................................................. ... 135 6.28 file_save.................................................................................................................. .... 136 6.29 file_verify................................................................................................................ .. 137 6.30 go ......................................................................................................................... ........ 138 6.31 go_reset................................................................................................................... .... 139 6.32 go_till .................................................................................................................... ...... 139 6.33 halt....................................................................................................................... ......... 140 6.34 initialize................................................................................................................. ..... 141 6.35 log ........................................................................................................................ ......... 141 6.36 map_display ............................................................................................................... 1 42 6.37 map_set.................................................................................................................... ..... 142 6.38 memory_display...................................................................................................... 143 6.39 memory_edit ............................................................................................................. 144 6.40 memory_fill .............................................................................................................. 145 6.41 memory_move........................................................................................................... 146 6.42 memory_test ............................................................................................................. 147 6.43 open_workspace...................................................................................................... 148 6.44 profile .................................................................................................................... ...... 148 6.45 profile_display........................................................................................................ 149 6.46 profile_save .............................................................................................................. 1 51 6.47 quit....................................................................................................................... .......... 151 6.48 radix...................................................................................................................... ........ 152 6.49 register_display..................................................................................................... 152 6.50 register_set .............................................................................................................. 1 53 6.51 reset ...................................................................................................................... ........ 154 6.52 response................................................................................................................... .... 154 6.53 sleep...................................................................................................................... ......... 155 6.54 step ....................................................................................................................... .......... 155 6.55 step_mode .................................................................................................................. . 156 6.56 step_out ................................................................................................................... .... 156 6.57 step_over .................................................................................................................. .. 157 6.58 step_rate.................................................................................................................. ... 157 6.59 submit ..................................................................................................................... ...... 158 6.60 symbol_add ............................................................................................................... 159 6.61 symbol_clear........................................................................................................... 160 6.62 symbol_load............................................................................................................. 160 6.63 symbol_save ............................................................................................................. 161 6.64 symbol_view.............................................................................................................. 161 6.65 tcl ........................................................................................................................ ......... 162 6.66 trace ...................................................................................................................... ....... 163 6.67 trace_acquisition.................................................................................................. 164 6.68 trace_save ................................................................................................................. 164
xi 6.69 trace_statistic........................................................................................................165 section 7 messages ........................................................................................... 167 7.1 information messages .......................................................................................................1 67 7.2 e rror messages.............................................................................................................. ....168 appendix a - gui command summary ............................................................ 171
xii figures figure 1.1 creation of target user programs................................................................................. 3 figure 4.1 menus.......................................................................................................................... 33 figure 5.1 break window...................................................................................................... ....... 41 figure 5.2 set break dialog box (condition sheet) .................................................................... 43 figure 5.3 set break dialog box (action sheet).......................................................................... 45 figure 5.4 command line window ............................................................................................. 47 figure 5.5 set batch file dialog box......................................................................................... .. 48 figure 5.6 open log file dialog box .......................................................................................... 48 figure 5.7 disassembly window................................................................................................ .. 50 figure 5.8 io window......................................................................................................... ......... 52 figure 5.9 label window ...................................................................................................... ....... 53 figure 5.10 add label dialog box ............................................................................................. .54 figure 5.11 edit label dialog box............................................................................................ ... 54 figure 5.12 message box for confirming label deletion ........................................................... 55 figure 5.13 message box for confirming all label deletion ..................................................... 55 figure 5.14 load symbols dialog box ........................................................................................ 56 figure 5.15 find label containing dialog box ........................................................................... 57 figure 5.16 locals window.................................................................................................... ...... 58 figure 5.17 memory window .................................................................................................... .. 59 figure 5.18 performance analysis window ................................................................................. 62 figure 5.19 performance option dialog box ............................................................................... 63 figure 5.20 register window.................................................................................................. ..... 64 figure 5.21 source window .................................................................................................... ..... 65 figure 5.22 instant watch dialog box ......................................................................................... 66 figure 5.23 source window and address column....................................................................... 67 figure 5.24 global column state dialog box.............................................................................. 68 figure 5.25 status window .................................................................................................... ...... 69 figure 5.26 trace window ..................................................................................................... ...... 70 figure 5.27 trace acquisition dialog box................................................................................... 72 figure 5.28 trace search dialog box.......................................................................................... .73 figure 5.29 trace statistic dialog box....................................................................................... .. 74 figure 5.30 trigger window ................................................................................................... ..... 75 figure 5.31 trigger setting dialog box ....................................................................................... 76 figure 5.32 watch window..................................................................................................... ..... 77 figure 5.33 simulator system dialog box ................................................................................... 79 figure 5.34 memory map modify dialog box ............................................................................ 81 figure 5.35 simulator memory resource dialog box ................................................................. 82 figure 5.36 system memory resource modify dialog box ........................................................ 83 figure 5.37 simulated i/o window............................................................................................. .84 figure 5.38 stack trace window ............................................................................................... .. 85
xiii figure 5.39 stack trace setting dialog box ................................................................................86 figure 5.40 profile window (list sheet)...................................................................................... 87 figure 5.41 profile window (tree sheet).....................................................................................88 figure 5.42 find data dialog box............................................................................................. ...90 figure 5.43 profile-chart window ............................................................................................. ..92 figure 5.44 image view window................................................................................................ .94 figure 5.45 image properties dialog box .....................................................................................95 figure 5.46 pixel information window ........................................................................................97 figure 5.47 waveform window .................................................................................................. .98 figure 5.48 waveform properties dialog box ...........................................................................100 figure 5.49 sample information dialog box..............................................................................101 figure 5.50 coverage window .................................................................................................. .102 figure 5.51 open coverage dialog box.....................................................................................104 figure 5.52 go to address dialog box .....................................................................................105 figure 5.53 coverage range dialog box ...................................................................................105 figure 5.54 save data dialog box ............................................................................................. 106 figure 5.55 load data dialog box............................................................................................. 106 figure 5.56 confirmation request dialog box ..........................................................................107 figure 5.57 save coverage data dialog box .............................................................................107
xiv tables table 1.1 platforms and the corresponding cpu modes ................................................. 4 table 3.1 memory types.................................................................................................. 9 table 3.2 i/o functions .................................................................................................. 13 table 3.3 processing when a break condition is satisfied ............................................ 27 table 3.4 simulation errors............................................................................................ 28 table 3.5 register states at simulation error stop......................................................... 29 table 6.1 simulator/debugger commands................................................................... 109 table 7.1 information messages................................................................................... 167 table 7.2 error messages ............................................................................................. 168
1 section 1 overview the hitachi embedded workshop (hew) 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 intuitive interface on-line help common look & feel note: the hew does not run on windows ? version 3.1. the simulator/debugger provides simulation functions for h8s, h8/300 series microprocessors 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, h8/300 series c/c++ compiler h8s, h8/300 series cross assembler optimizing linkage editor
2 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 calculates the number of instruction execution cycles for a program during simulation, 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, h8/300 series cpus ? 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 (pseudo interrupts are also possible) ? functions to set or edit memory maps ? functions to display function call history ? coverage information is displayed at the c/c++ or assembly-source level ? visual debugging functions provide the display of data as images or waveforms the breakpoint, memory map, performance, and trace can be set through the dialog box under windows ? . environments corresponding to each memory map of the h8s, h8/300 microprocessors can be set through the dialog box.
3 1.2 target user program load modules in elf/dwarf2 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. assembly source program h8s, h8/300 series cross assembler c++ source program h8s, h8/300 series c/c++ compiler h8s, h8/300 series simulator/debugger optimizing linkage editor prelinker c source program object load module instance information file load module (elf/s type) stack information/ profile information library file figure 1.1 creation of target user programs
4 1.3 simulation range simulation of the h8/300, h8/300l, h8s/2600, and h8s/2000 series microcomputers is supported. the simulator/debugger supports the following h8s, h8/300 series microcomputer functions: all cpu instructions exception processing registers all address areas cpu modes shown in table 1.1 table 1.1 platforms and the corresponding cpu modes names of debugging platforms corresponding cpu modes h8/300 simulator h8/300 h8/300l simulator h8/300l h8/300ha simulator h8/300h advanced mode h8/300hn simulator h8/300h normal mode h8s/2600a simulator h8s/2600 advanced mode h8s/2600n simulator h8s/2600 normal mode h8s/2000a simulator h8s/2000 advanced mode h8s/2000n simulator h8s/2000 normal mode the simulator/debugger does not support the following h8s, h8/300 series mcu functions. programs that use these functions must be debugged with the h8s, h8/300 series emulator. dual-port ram timer pulse-width modulator (pwm) serial communication interface (sci) a/d converter i/o ports interrupt controller
5 section 2 system overview hew 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 the hew graphical user interface is a windows ? application that presents the debugging platform to you and allows you to set up and modify the system. refer to a standard windows ? 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 the elf/dwarf2 format 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 [options->r adix] 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:
6 b binary o octal d decimal h hexadecimal 0x hexadecimal the contents of a register may be used by specifying the register name, prefixed by the # character, e.g.: #r1, #e1 2.2.3 precision all mathematics in expression evaluation is done using 64 bits (signed). any values exceeding 64 bits are truncated. 2.2.4 expression examples buffer_start + 0x1000 #r1 | b10001101 ((pointer + (2 * increment_size)) & hffff0000) >> d15 !(flag ^ #r4) 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.
7 2.2.6 symbol examples object.value : specifies direct reference of a member (c/c++) p_object->value : specifies indirect reference of a member (c/c++) class::value : specifies reference of a member with class (c++) *value : specifies a pointer (c/c++) array[0] : specifies an array (c/c++) object.*value : specifies reference of a pointer to member (c++) ::g_value : specifies reference of a global variable (c/c++) class::function(short) : specifies a member function (c++) (struct str) *value : specifies cast operation (c/c++)
8
9 section 3 simulator/debugger functions this section describes the functions of the h8, h8/300 series simulator/debugger. 3.1 simulator/debugger memory management the setting for the memory map is used to calculate the number of memory access cycles during simulation. the simulator/debugger supports the memory types listed in table 3.1. table 3.1 memory types memory types execution of programs for debugging internal rom enabled internal ram enabled external memory enabled internal i/o disabled eeprom enabled 3.1.1 memory map specification a memory map can be specified in the simulator system dialog box to calculate the number of memory access cycles during simulation. 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.24, simulation system dialog box. the user program can be executed in all areas except for the internal i/o area.
10 3.1.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 simulator memory resource 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. unlike other types of memory, an eeprom can be written to by an eepmov instruction even when the access type is read-only. if writing is allowed, the eeprom cannot be written to by instructions other than eepmov. 3.2 instruction execution reset processing the simulator/debugger resets the number of instruction executions and number of cycles that instructions are executed 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.
11 3.3 exception processing the simulator/debugger detects the generation of exceptions corresponding to trapa instructions (only for the h8/300h and h8s series) and trace exceptions (only for the h8s series). in addition, the simulator/debugger 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 in the stack area. also saves exr when the valid bit of exr is on. when an error occurs, simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state. 3. sets bit 1 in the ccr to 1. 4. reads the start address from the vector address corresponding to the vector number. when an error occurs, 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.4 features specific to the h8s/2600 cpu the h8s/2600 cpu offers the following specific features. execution of a multiply and accumulate (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 area: macs bit = 0: non-saturation operation macs bit = 1: saturation operation enabling or disabling the exr register the exr register can be enabled or disabled depending on the state of bit 5 (the exr bit) in the syscr register in the internal i/o area: exr bit = 0: exr disabled exr bit = 1: exr enabled the syscr register address can be specified using [syscr address] in the simulator system dialog box. note: the syscr register address must be within the internal i/o area; otherwise the simulator/debugger assumes the macs bit as 0 (non-saturation operation) and exr bit as 0 (exr disabled). for details, refer to section 5.24, simulator system dialog box.
12 3.5 control registers the simulator/debugger supports syscr (system control register) as a memory-mapped control register for the h8s/2600 cpu. therefore, a user program using a multiply and accumulate operation and exr access can be simulated and debugged. the syscr address can be specified in [syscr address] of the simulator system dialog box. to modify or display a control register value, use the io window. for details, refer to section 5.24, simulator system dialog box and section 5.6, io. 3.6 trace the simulator/debugger writes the results of each instruction execution into the trace buffer. 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 depends on the target cpu as follows. total number of instruction execution cycles instruction address ccr multiplier internal flag (valid 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.17, trace window, through section 5.19, trace search dialog box.
13 3.7 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.6 to be executed by the user program. when the i/o processing is executed, the simulated i/o window must be open. there are three types of function codes: a 16- bit address version, a 24-bit address version, and a 32-bit address version. select the type according to the cpu to be used. table 3.2 i/o functions no. function code function name description 1 h01 (16-bit address) h11 (24-bit address) h21 (32-bit address) getc inputs one byte from the standard input device 2 h02 (16-bit address) h12 (24-bit address) h22 (32-bit address) putc outputs one byte to the standard output device 3 h03 (16-bit address) h13 (24-bit address) h23 (32-bit address) gets inputs one line from the standard input device 4 h04 (16-bit address) h14 (24-bit address) h24 (32-bit address) puts outputs one line to the standard output device 5 h05 (16-bit address) h15 (24-bit address) h25 (32-bit address) fopen opens a file 6 h'06 fclose closes a file 7 h07 (16-bit address) h17 (24-bit address) h27 (32-bit address) fgetc inputs one byte from a file 8 h08 (16-bit address) h18 (24-bit address) h28 (32-bit address) fputc outputs one byte to a file 9 h09 (16-bit address) h19 (24-bit address) h29 (32-bit address) fgets inputs one line from a file 10 h0a (16-bit address) h1a (24-bit address) h2a (32-bit address) fputs outputs one line to a file 11 h'0b feof checks for end of file 12 h'0c fseek moves the file pointer 13 h'0d ftell returns the current position of the file pointer
14 to perform i/o processing, use the [system call address] in the simulator system 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 (h8/300, h8/300l series) or er1 (h8/300h, h8s series) values as the parameters. therefore, before issuing a system call, set as follows in the user program: set the function code (table 3.2) to the r0 register msb 1 byte 1 byte lsb h'01 function code set the parameter block address to the r1 register (for the parameter block, refer to each function description) msb lsb parameter block address 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.
15 each i/o function is described in the following format: (2) (1) (3) (4) parameter block (5) parameters (6) (1) number corresponding to table 3.2 (2) function name (3) function code (4) i/o overview (5) i/o parameter block (6) i/o parameters
16 getc 1 h01, h11, and h'21 inputs one byte from the standard input device parameter block +0 input buffer start address one byte one byte +0 +2 input buffer start address one byte one byte function code: h'01 (16-bit address version) function code: h'11 (24-bit address version), h'21 (32-bit address version) parameters input buffer start address (input) start address of the buffer to which the input data is written. putc 2 h02, h12, and h'22 outputs one byte to the standard output device parameter block +0 output buffer start address one byte one byte +0 +2 output buffer start address one byte one byte function code: h'02 (16-bit address version) function code: h'12 (24-bit address version), h'22 (32-bit address version) parameters output buffer start address (input) start address of the buffer in which the output data is stored.
17 gets 3 h03, h13, and h'23 inputs one line from the standard input device parameter block +0 input buffer start address one byte one byte +0 +2 input buffer start address one byte one byte function code: h'03 (16-bit address version) function code: h'13 (24-bit address version), h'23 (32-bit address version) parameters input buffer start address (input) start address of the buffer to which the input data is written. puts 4 h04, h14, and h'24 outputs one line to the standard output device parameter block +0 output buffer start address one byte one byte +0 +2 output buffer start address one byte one byte function code: h'04 (16-bit address version) function code: h'14 (24-bit address version), h'24 (32-bit address version) parameters output buffer start address (input) start address of the buffer in which the output data is stored.
18 fopen 5 h05, h15, and 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 start address of file name one byte +0 +2 +4 one byte return value open mode file number unused function code: h'05 (16-bit address version) start address of file name one byte +0 +2 +4 +6 one byte return value open mode file number unused function code: h'15 (24-bit address version), h'25 (32-bit address version) parameters return value (output) 0: normal completion C1: 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"
19 h'12: "ab" 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. fclose 6 h'06 closes a file parameter block +0 return value file number one byte one byte parameters return value (output) 0: normal completion C1: error file number (input) the number returned when the file was opened.
20 fgetc 7 h07, h17, and h'27 inputs one byte from a file parameter block start address of input buffer +0 +2 return value file number one byte one byte start address of input buffer +0 +2 +4 return value file number one byte one byte function code: h'07 (16-bit address version) function code: h'17 (24-bit address version), h'27 (32-bit address version) parameters return value (output) 0: normal completion C1: 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.
21 fputc 8 h08, h18, and h'28 outputs one byte to a file parameter block start address of output buffer +0 +2 return value file number one byte one byte start address of output buffer +0 +2 +4 return value file number one byte one byte function code: h'08 (16-bit address version) function code: h'18 (24-bit address version), h'28 (32-bit address version) parameters return value (output) 0: normal completion C1: 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.
22 fgets 9 h09, h19, and 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 start address of input buffer +0 +2 return value file number one byte one byte start address of input buffer +0 +2 +4 +6 return value file number one byte one byte function code: h'09 (16-bit address version) function code: h'19 (24-bit address version), h'29 (32-bit address version) parameters return value (output) 0: normal completion C1: 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.
23 fputs 10 h'0a h'1a, and 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 start address of output buffer +0 +2 return value file number one byte one byte start address of output buffer +0 +2 +4 return value file number one byte one byte function code: h'0a (16-bit address version) function code: h'1a (24-bit address version), h'2a (32-bit address version) parameters return value (output) 0: normal completion C1: 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.
24 feof 11 h'0b checks for end of file parameter block +0 return value file number one byte one byte parameters return value (output) 0: file pointer is not at eof C1: eof detected file number (input) the number returned when the file was opened. fseek 12 h'0c moves the file pointer to the specified position parameter block offset (upper word) +0 +2 +4 +6 return value direction file number unused one byte one byte offset (lower word) parameters return value (output) 0: normal completion C1: 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. offset (input) the byte count from the location specified by the direction parameter.
25 ftell 13 h'0d returns the current position of the file pointer parameter block +0 +2 +4 return value file number offset (upper word) offset (lower word) one byte one byte parameters return value (output) 0: normal completion C1: 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). here the label sys call is specified as a system call address. mov.w #h0101,r0 mov.w #parm,r1 jsr @sys call stop nop sys_call nop parm .data.w inbuf inbuf .res.b 2 .end
26 3.8 calculating instruction execution cycles the simulator/debugger calculates the number of instruction execution cycles using the expression defined in the h8s and h8/300 series programming manual and the data bus width and the number of access cycles specified in the simulator system dialog box. however, the resulting 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 add the number of these cycles because this function is specific to the simulator/debugger. note that the standard i/o and file i/o processing is performed during the time interval between the completion of a branch to the location specified by a system call address of bsr and jsr instructions and the return to the caller after file i/o processing. 3.9 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
27 3.9.1 break due to the satisfaction of a break command condition there are five break commands as follows: breakpoint: break based on the address of the instruction executed break_access: break based on access to a range of memory break_data: break based on the value of data written to memory break_register: break based on the value of data written to a register break_sequence: break based on a specified execution sequence if [stop] is specified as the action for a break condition, user program execution stops when the break condition is satisfied. for details, refer to section 5.1, break window. when a break condition is satisfied and user program execution stops, 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.3. table 3.3 processing when a break condition is satisfied command instruction when a break condition is satisfied breakpoint not executed break_access executed break_data executed break_register executed break_sequence 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.
28 3.9.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 simulator system dialog box specifies whether to stop or continue the simulation when such an error occurs. table 3.4 lists the error messages, error causes, and the action of the simulator/debugger in the continuation mode. table 3.4 simulation errors error message error cause processing in continuation mode odd pc value instruction was fetched from the internal i/o area access in words from odd-number addresses address error access in longwords from odd-number addresses operates in the same way as the actual device operation. access to a memory area that has not been allocated write to a memory area having the write protect attribute read from a memory area having the read disable attribute access to an area where memory does not exist memory access error write to the eeprom by instructions other than eepmov on memory write, nothing is written; on memory read, all bits are read as 1. execution of a code that is not an instruction always stops illegal instruction execution of mov.b rn, @-sp or mov.b @sp + rn continues simulation but the result is not guaranteed incorrect relation between the values in the c flag or h flag of the ccr in the daa or das instruction and the values before adjustment illegal operation zero division executed by the divxu or divxs instruction, or overflow continues simulation but the result is not guaranteed
29 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.5 lists the states of the program counter (pc) at simulation error stop. the status register (sr) value does not change at simulation error stop. table 3.5 register states at simulation error stop error message pc value address error, memory access error 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. illegal instruction the start address of the instruction that caused the error. illegal operation 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.9.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 in the status bar when execution is stopped. trace buffer full
30 3.9.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 in the status bar when execution is stopped. sleep note: when restarting execution, change the pc value to the instruction address at the restart location. 3.9.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 in the status bar when execution is terminated. stop execution can be resumed with the go or step command. 3.10 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 simulator system 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.
31 3.11 display of function call history the simulator/debugger displays the function call history in the stack trace window when simulation stops, which enable 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: when simulation stops under the break conditions described in section 3.9, 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.29, stack trace window. 3.12 profiler the simulator/debugger displays the memory address and size allocated to functions and global variables, the number of function calls and the profile data. the displayed contents are as follows. ? times (the number of times a function was called or a global variable was accessed) ? cycle (the number of execution cycles) ? ext_mem (the number of times the external memory was accessed) ? i/o_area (the number of times the internal input/output area was accessed) ? int_mem (the number of times the internal memory was accessed) profile information is displayed in list, tree and chart formats. using profile information it is possible to optimize user programs by reducing the size and putting the most frequently called functions in-line. further, using the profile information saved to a file, it is possible to optimize user programs based on operational information using the optimizing linkage editor. for details, refer to section 5.30, profile window (list sheet), through section 5.32, profile chart, and section 4.2.3, optimize option profile in the optimizing linkage editor manual. 3.13 pseudo-interrupts the simulator/debugger can generate pseudo-interrupts during simulation in two ways: 1. pseudo-interrupts generated by break conditions a pseudo-interrupt can be generated by using a break command to specify [interrupt] as the action when a break condition is satisfied. for details, refer to section 5.1, break window.
32 2. pseudo-interrupts generated from the trigger window a pseudo-interrupt can be generated by clicking a trigger button in the trigger window. for details, refer to section 5.21, trigger window. if another pseudo-interrupt occurs between a pseudo-interrupt occurrence and its acceptance, only the interrupt that has a higher priority can be processed. note: whether a pseudo-interrupt is accepted is determined by [priority] setting rather than the vector number. note, however, that when h'8 or a larger value is specified as the priority, that interrupt is always accepted. the simulator/debugger does not simulate the operation of the interrupt controller. 3.14 coverage the simulator/debugger acquires instruction coverage information during instruction execution within the address range specified by the user. the coverage window displays the following items of the acquired instruction coverage information: times (instruction execution count) pass (result of a conditional branch instruction) t: execution has branched in all cases. f: execution has not branched in any cases. t/f: execution has branched in some cases, but not in others. -: the target instruction is not a branch instruction or the instruction has not been executed. address (instruction address) assembler (disassembled display) source (c/c++ or assembly-language source program) the instruction coverage information can also be displayed in the editor window by highlighting the column corresponding to the source line of the executed instruction. the instruction coverage information can be saved in or loaded from a file. the status of each instruction execution can be monitored through the instruction coverage information. in addition, this information can be used to determine which part of a program has not been executed. for details, refer to section 5.39, coverage window, through section 5.46, save coverage data dialog box.
33 section 4 menus this document uses the standard microsoft ? menu naming convention. 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. the menu for debugging is described here. for other menus, refer to the hew user manual. 4.1 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.1.1 workspace opens the workspace window displaying a list of source files. 4.1.2 output opens the output window displaying a message when using the debugger.
34 4.1.3 breakpoints opens the breakpoints window allowing the user to view and edit current breakpoints. 4.1.4 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.1.5 disassembly launches the set address dialog box allowing the user to enter the address that you wish to view. 4.1.6 io opens the io window allowing the user to view and modify the control register. 4.1.7 labels launches the labels window allowing the user to manipulate the current program's symbols (labels). 4.1.8 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++ source- level function. 4.1.9 memory... launches the set address dialog box allowing the user to specify a memory block and view format to display within a memory window. 4.1.10 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.
35 4.1.11 profile opens the profile 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. 4.1.12 registers opens the register window allowing the user to view all the current cpu registers and their contents. 4.1.13 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.1.14 trace opens the trace window allowing the user to see the current trace information. 4.1.15 watch opens the watch window allowing the user to enter c/c++-source level variables and view and modify their contents. 4.1.16 simulated i/o opens the simulated i/o window enabling the standard i/o and file i/o. 4.1.17 stack trace opens the stack trace window displaying the current stack trace information. 4.1.18 coverage... opens the coverage window allowing the user to view the coverage information.
36 4.1.19 image... opens the image window displaying the memory contents as images. 4.1.20 waveform... opens the waveform window displaying the memory contents as waveforms. 4.1.21 trigger opens the trigger window displaying trigger buttons to generate manual interrupts during simulation. 4.2 options the options menu is used to change the settings for the debugging interface of the hew and make the settings for the debugging platform. 4.2.1 debug settings... launches the debug settings dialog box allowing the user to modify the settings for the debugging interface of the hew (not debugging platform dependent settings). 4.2.2 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 toolbar button to its left 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 ", " ha ", " 0x0a ", etc.; if the current radix is hexadecimal then the number ten will be displayed as " 0a " and entered as " a ", " d10 ", etc. 4.2.3 simulator system... : launches a simulator system dialog box allowing the user to modify the debugging platform settings. refer to section 5.24, simulator system dialog box for more details.
37 memory resource... : opens the simulator memory resource window allowing the user to view and edit the debugging platform's current memory map. 4.3 debug the run menu controls the execution of the user program in the debugging platform. 4.3.1 reset cpu resets the user system hardware and sets the pc to the reset vector address. 4.3.2 go starts executing the user program at the current pc. 4.3.3 reset go executes the user program from the reset vector address. 4.3.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.3.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.3.6 run... launches the run program dialog box allowing the user to enter temporary breakpoints before executing the user program.
38 4.3.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 (see also section 4.3.10, step...). if a subroutine call is reached, then the subroutine will be entered and the view is updated to include its code. 4.3.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.3.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.3.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.3.10 step... launches the step program dialog box allowing the user to modify the settings for stepping. 4.3.11 step mode specifies the step mode allowing the user to select a unit of stepping from auto (automatic selection), assembly (assembly instruction units), or source (c/c ++ source level). 4.3.12 halt program stops the execution of the user program. 4.3.13 initialize disconnects the debugging platform and connects it again. 4.3.14 disconnect disconnects the debugging platform.
39 4.3.15 download modules downloads the object program. 4.3.16 unload modules unloads the object program. 4.4 memory the memory menu is used for aspects of the user program that access memory. 4.4.1 search... launches the search memory dialog box allowing the user to specify the start and end addresses and the data value to be searched and perform the search. search conditions (match/unmatch and search direction) can also be specified. 4.4.2 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. 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. data in the source block can be compared with that in the destination while being copied. 4.4.3 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 entered as the start and end addresses when the dialog box is displayed. 4.4.4 fill... launches the fill memory dialog box allowing the user to fill a block of the debugging platform's memory with a value. 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.
40 4.4.5 refresh forces a manual update of the contents of all open memory windows. 4.4.6 configure overlay... launches the overlay dialog box. when the overlay function is used, the target section group can be selected in the dialog box.
41 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 break window figure 5.1 break window this window displays all of the specified breakpoints. items that can be displayed are listed below. [enable] displays whether the breakpoint is enabled or disabled. enable: valid disable: invalid [type] displays break types bp: pc break ba: break access bd: break data br: break register (register name) bs: break sequence bcy: break cycle [condition] displays the conditions that satisfies a break condition. the contents displayed differ from the type of the break. when the type of the break is br, the register name is displayed, and when the type of the break is bcy, the number of cycles is displayed. bp: pc = program counter (corresponding file name, line, and symbol name) ba: address = address (symbol name) bd: address = address (symbol name) br: register = register name bs: pc = program counter (corresponding file name, line, and symbol name) bcy: cycle = number of cycles (displayed in hexadecimal) [action] displays the operation of the simulator/debugger when a break condition is satisfied. stop: execution halts file input (file name) [file state: memory data is read from file] file output (file name) [file state: memory data is written to file]
42 when a breakpoint is double clicked in this window, the set break dialog box is opened and break conditions can be modified. a popup menu containing the following options is available by right clicking within the window. 5.1.1 add... sets breakpoints. clicking this item will open the set break dialog box and break conditions can be specified. 5.1.2 edit... only enabled when one breakpoint is selected. select a breakpoint to be edited and click this item. the set break dialog box will open and break conditions can be changed. 5.1.3 enable enables the selected breakpoint(s). 5.1.4 disable disables the selected breakpoint(s). when a breakpoint is disabled, the breakpoint will remain in the list, but a break will not occur when specified conditions have been satisfied. 5.1.5 delete 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.4, disable). 5.1.6 delete all removes all breakpoints. 5.1.7 go to source only enabled when one breakpoint is selected. opens source or disassembly window at address of breakpoint. 5.1.8 close file closes the selected file input or file output data file and resets the address to read the file.
43 5.1.9 close all files closes all the selected file input and file output files and resets the address to read the file. 5.2 set break dialog box (condition sheet) figure 5.2 set break dialog box (condition sheet) this dialog box specifies break conditions. a break type to be set is specified using the radio buttons in the [break type] box. items that can be specified are listed below. [pc breakpoint] up to 255 breakpoints can be specified [address] address where a break occurs
44 [count] number of times that a specified instruction is fetched (when the prefix is omitted, values must be input and are displayed in decimal) (1 to 16383, default: 1) [break access] up to two addresses can be specified [start address] start address of memory where a break occurs if the memory is accessed [end address] 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) [access type] read, write, or read/write [break data] up to eight values of data can be specified [start address] address of memory where a break occurs [data] data value that causes a break [size] data size [option] data match/mismatch [break register] up to eight register names can be specified [register] register name where break conditions are specified [size] data size [data] data value that causes a break (if no data is input, a break occurs whenever data is written to the register) [option] data match/mismatch [break sequence]only one address can be specified [address1] to pass addresses that are the conditions to generate a break. [address8] (all eight breakpoints do not have to be set.) [break cycle] up to 255 cycles can be specified [cycle] number of cycles to determine a break (h1 to hffffffff). a condition will be satisfied by a number of cycles of [cycle] x n. however, the specified number of cycles and the number of cycles that satisfied the condition may be different. [count] number of times breaks will occur [all] a break will occur whenever a condition is satisfied. [times] (when the prefix is omitted, values must be input and are displayed in decimal) (1 to 65535) a break will occur only when the number of times the conditions is satisfied is equal to or below the value specified for [times] .
45 when [pc breakpoint] and [break sequence] is selected, if an overloaded function or class name including a member function is specified in address, the select function dialog box opens. in the dialog box, select a function. for details, refer to the hew debugger users manual. clicking the [ok] button sets the break conditions. clicking the [cancel] button closes this dialog box without setting the break conditions. 5.3 set break dialog box (action sheet) figure 5.3 set break dialog box (action sheet) this dialog box specifies the operation when a break condition is satisfied. first set the operation in [action type] . the following show the items that can be set in each operation. [stop] stops the operation of user program when a condition is satisfied. there is no item to be set.
46 [file input] the data of a specified file is referred to and its contents are written to the specified memory when a condition has been satisfied [input file] data file to refer to. when the simulator/debugger has reached referring to the end of a file, it will repeat referring to the beginning of the same file. [address] memory address where data should be written to. [data size] data size to be written to (1/2/4/8). [count] number of data to be written to (when the prefix is omitted, values must be input and are displayed in decimal) (h1 to hffffffff). [file output] the contents of a specified memory is written to the specified file when a condition has been satisfied. [output file] d ata file to be written to. [append] when a existing file is specified for the [output file] , [address] memory address to read data to. [data size] size of one data to refer to (1/2/4/8). [count] number of data to refer to(when the prefix is omitted, values must be input and are displayed in decimal) (h1 to hffffffff). [option] data match/mismatch [interrupt] interrupts the program when a condition has been satisfied. for details, refer to section 3.13, pseudo-interrupts. [interrupt type1] specifies the interrupt vector number (when the prefix is omitted, values must be input and are displayed in hexadecimal) (h0 to hff) [priority] interrupt priority (when the prefix is omitted, values must be input and are displayed in hexadecimal) (h0 to h11) whether an interrupt is accepted depends on the specifications of the cpu for the selected debugging platform. when h'8 or a larger value is specified, the interrupt is always accepted. note: w hen the same file is specified for multiple file inputs, the simulator/debugger will read data from the file in the order conditions are satisfied. when the same file is specified for multiple file inputs, the simulator/debugger will write data to the file in the order conditions are satisfied. however, when file input and file output specify the same file, only the operation for the first condition satisfied is valid.
47 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 last line (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. pressing the ctrl + - or ctrl + keys on the last line displays the previously executed command line. clicking the right mouse button on the command line window displays the popup menus. the menus include the following options. 5.4.1 set batch file... launches the set batch file dialog box, allowing the user to enter the name of a command file (*.hdc). clicking the [play] button closes the dialog box and the specified command file runs. clicking the [ok] button displays the specified command file name as the window title. clicking the [cancel] button closes the dialog box without modifying the setting.
48 figure 5.5 set batch file dialog box 5.4.2 play runs the command file selected in the set batch file dialog box. it is displayed in a recessed state while the batch file is running and can be used to stop an executing batch file and return control to the user. 5.4.3 stop stops the execution of a command. the button becomes valid during the execution of the command. 5.4.4 set log file... launches the open log file dialog box, allowing the user to enter the name of a log file (*.log). the logging option is automatically set and the name of the file 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. figure 5.6 open log file dialog box 5.4.5 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.
49 5.4.6 browse... displays the browse dialog box. this dialog box pastes the full path of the selected file to the cursor location. this option can only be used when the cursor is at the last line. 5.4.7 placeholder pastes the selected placeholder to the cursor location. this function is only available when the cursor is located on the last line. 5.4.8 select all selects all contents output in the command line window. 5.4.9 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.4.10 paste this option pastes the contents of the windows? clipboard to the current cursor location. this option can only be used when the cursor is at the last line.
50 5.5 disassembly window this window is used to display code at the assembly-language level. assembler 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.7 disassembly window this window displays address information, addresses, instruction code, and instruction mnemonic. the following are the address information items: : a bookmark is set. : a pc break is set. : pc location a popup menu containing the following options is available by right clicking within the window:
51 5.5.1 view source opens the source window including the source program corresponding to the text cursor (not the mouse cursor) position. only available when the selected source line is valid. 5.5.2 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. pc breakpoint is used for this function. the function is not available when 255 pc breakpoints have already been specified. 5.5.3 set address... displays the set address dialog box. specify the address from which the display should start. 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 edit... 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 no changes will be saved when the simulator is terminated. 5.5.6 code bytes selects whether or not the instruction code is displayed. 5.5.7 toggle breakpoint enables or disables pc breakpoints.
52 5.6 io window figure 5.8 io window refers to and sets the values of control registers. double-clicking the plus mark (+) or minus mark (-), or entering the plus key (+) or minus key (-) will expand or compress the information of control registers, and then display it. double-clicking the name column displays the edit register dialog box. the value of the control registers can be modified.
53 5.7 label window figure 5.9 label 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 pc breakpoint at that address. a popup menu containing the following options is available by right-clicking within the window:
54 5.7.1 add... launches the add label dialog box: figure 5.10 add label dialog box enter the new label name into the name field and the corresponding value into the address 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 address field, the select function dialog box opens for you to select a function. for details, refer to the hew debugger users manual. 5.7.2 edit... launches the edit label dialog box: figure 5.11 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 address field, the select function dialog box opens for you to select a function. for details, refer to the hew debugger users manual.
55 5.7.3 delete deletes the currently selected label from the symbol list. alternatively use the delete accelerator key. a confirmation message box appears: figure 5.12 message box for confirming label deletion if you click on the [ok] 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 sheet in the hew options dialog box. 5.7.4 delete all deletes all the labels from the list. a confirmation message box appears: figure 5.13 message box for confirming all label deletion if you click on the [ok] button all the labels are removed from the hew systems 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 sheet in the hew options dialog box.
56 5.7.5 load... merges a symbol file into hew's current symbol table. the load symbols dialog box opens: figure 5.14 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 may be displayed showing how many symbols have been loaded (this can be switched off in the confirmation sheet on the hew options dialog). 5.7.6 save saves hews current symbol table to a symbol file. 5.7.7 save as... 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 hew's current label list to a symbol file. the standard file extension for symbol files is .sym. see appendix b of the hew debugger users manual for symbol file format.
57 5.7.8 find... launches the find label containing dialog box: figure 5.15 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 hew 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.7.9 find next finds the next occurrence of the label containing the text that you entered. 5.7.10 view source opens the source or disassembly window containing the address corresponding to the label.
58 5.8 locals window figure 5.16 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 absolute file (*.abs). the following items are displayed. [name] name of the variable [value] value, assigned location. the assigned location is enclosed by { }. [type] displays the type of variable the variables are listed with a plus indicating that the information may be expanded by double- clicking on the variable name, and a minus indicating that the information may be collapsed. alternatively, the plus and minus keys may be used. for more information on the display of information, refer to the hew debugger users manual. a popup menu containing the following options is available by right clicking within the window: 5.8.1 edit value... launches a dialog box to modify the selected variables value. 5.8.2 radix changes the radix for the selected local variable display.
59 5.8.3 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.9 memory window figure 5.17 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, longword, single-precision floating-point, and double- precision 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 can be edited 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.9.1 lock refresh controls the memory window so that it is not automatically updated when user program execution stops.
60 5.9.2 refresh forcibly updates the memory window contents. 5.9.3 start address... launches the set address dialog box, allowing the user to enter new start and end addresses. 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. for details, refer to section 7.3, supporting duplicate labels in the hew debugger user's manual. the size to display data can be specified. 5.9.4 format... displays the format memory display dialog box. the size to display data, the format to display data, and the font used to display data can be specified. 5.9.5 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. search conditions (match/unmatch and search direction) can also be specified. the memory window is displayed to start with the address which holds the data that satisfies the search conditions. 5.9.6 search next only available when data has been found with the search... option. this option starts search from the address following the one found with the last search operation. 5.9.7 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.9.5, search...). data in the source block can be compared with that in the destination while being copied. 5.9.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. if a block of memory is highlighted
61 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. 5.9.9 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.9.5, search...). 5.9.10 save... launches the save memory as dialog box, allowing the user to save a block of the debugging platform's memory in an s-record file (*.mot). the start and end fields may be set similarly to the search... option (see section 5.9.5, search ... ). 5.9.11 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 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.
62 5.10 performance analysis window figure 5.18 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 [function] name of the function to be measured (or the start address of the function) [cycle] total number of execution cycles for the function [count] 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. a popup menu containing the following options is available by right clicking within the view area: 5.10.1 add range... adds a new function to be evaluated. clicking this option launches the performance option dialog box, allowing the user to add a function. the performance option dialog box can also be opened by the insert key.
63 5.10.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. the performance option dialog box can also be opened by the enter key. 5.10.3 reset counts/times clears the current performance analysis data. 5.10.4 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. 5.10.5 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. the range can also be deleted by the delete key. 5.10.6 delete all ranges deletes all the current user-defined ranges, and clears the performance analysis data. 5.11 performance option dialog box figure 5.19 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 7.3, supporting duplicate labels of the hew debugger users manual.
64 clicking the [ok] button stores the setting. clicking the [cancel] button closes this dialog box without setting the function to be evaluated. 5.12 register window figure 5.20 register 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.12.1 edit... launches the edit register dialog box, allowing the user to set the value of the register indicated by the text cursor (not mouse cursor).
65 5.13 source window the source window can be used to view any source file that was included within the object files debug information - this may be c/c++ and assembly language. this window also displays the coverage information. figure 5.21 source window in this window, the following items are shown on the left as line information. : a bookmark is set. : a pc break is set. : pc location a popup menu containing the following options is available by right clicking within the window: 5.13.1 toggle breakpoint sets or removes pc breakpoints. 5.13.2 enable/disable breakpoint enables or disables pc breakpoints.
66 5.13.3 instant watch... opens the instant watch dialog box and displays the variable at the cursor location. figure 5.22 instant watch dialog box + shown to the left of the variable name indicates that the information may be expanded by clicking on the variable name, and - indicates that the information may be collapsed. clicking [add] registers the variable in the watch window and closes the dialog box. clicking [close] closes the dialog box without registering the variable in the watch window. 5.13.4 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. pc breakpoint is used for this function. the function is not available when 255 pc breakpoints have already been specified. 5.13.5 set pc here changes the value of the pc to the address indicated by the text cursor (not the mouse cursor). 5.13.6 go to disassembly opens a disassembly window showing code disassembled from the address that corresponds to the current line of source code. 5.14 source address column when a program is downloaded, the source window display is updated to the current source file addresses. the source file addresses are displayed in the left part of the source window. these
67 addresses are helpful when setting the pc value or a breakpoint. figure 5.23 shows the source window and the address column. figure 5.23 source window and address column use the following procedure to display or close the address column for all files: 1. right-click the mouse in the editor window. 2. click the [define column format...] menu item. 3. the global editor column states dialog box will appear. 4. each check box specifies whether the corresponding column is displayed. if the check box is selected, the column is displayed. if the check box is shaded, the column is displayed for some files and not displayed in the other files. 5. click the [ok] button to update the display with the new settings. for a single file, use the following procedure to display or close the address column: 1. right-click the mouse in the editor window of the column that needs to be changed, and an editor popup menu will appear. 2. click the [column] menu item to display a list of the column names. when a check mark is shown to the left of the column name, the column is displayed. clicking on a column name can display or close the column.
68 figure 5.24 global editor column states dialog box 5.15 debugger column each component can add a specific column in the disassembly and source windows. a typical example of a debugger column is the coverage column that displays the code coverage in a graphical form during debugging. another example is the target component column that shows the hardware breakpoints set in the user system. right-clicking on a column displays a popup menu specifically for that column. the menu items differ between columns. the operation when a column is double-clicked depends on the column. for example, double-clicking on the target column will specify a hardware breakpoint.
69 5.16 status window figure 5.25 status window allows the user to view the current status of the debugging platform. the status window has three panes: 1. memory - contains information about the current memory status including the memory mapping resources and the areas used by the currently loaded object file. 2. platform - contains information about the current status of the debugging platform, typically including cpu type and mode; and run status. 3. events - contains information about the current event (breakpoint) status, including resource information. 5.17 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.
70 figure 5.26 trace window this window displays the following trace information items: [ptr] pointer in the trace buffer (0 for the last executed instruction) [cycle] total number of instruction execution cycles (cleared by pipeline reset) [address] instruction address [ccr] the contents of the condition code register (ccr) are displayed in a mnemonic form. [mult] the flags in the multiplier are displayed in a mnemonic form (only for the h8s/2600 series). [instruction] instruction mnemonic [access data] data access (displayed in the form of [transfer destination <- transfer data]) [source] c/c++ or assembly-language source programs 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.17.1 find... launches the trace search dialog box, allowing the user to search the current trace buffer for a specific trace record.
71 5.17.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.17.3 acquisition... launches the trace acquisition dialog box, allowing the user to define the area of user program to be traced. 5.17.4 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.17.5 save... launches the save as file dialog box, allowing the user to save the contents of the trace buffer as a text file. a range can be defined based on the ptr number (saving the complete buffer may take several minutes). note that this file cannot be reloaded into the trace buffer. 5.17.6 view source displays the source program corresponding to the address. 5.17.7 trim source removes white space from the left side of the source. 5.17.8 statistic analyzes statistical information under the specified conditions.
72 5.18 trace acquisition dialog box figure 5.27 trace acquisition dialog box this dialog box specifies the conditions for trace information acquisition. [trace start/stop] [disable] d isables trace information acquisition. [enable] enables trace information acquisition. [instruction type] [instruction] acquires trace information for all instructions. [subroutine] 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. the trace buffer capacity can be selected from 1024 records, 4096 records, 16384 records, and 32768 records in the [trace capacity] . clicking the [ok] button stores the settings. clicking the [cancel] button closes this dialog box without modifying the settings.
73 5.19 trace search dialog box figure 5.28 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) [cycle] total number of instruction execution cycles [address] instruction address [instruction] instruction mnemonic clicking the [ok] button stores the settings. clicking the [cancel] button closes this dialog box without searching.
74 5.20 trace statistic dialog box figure 5.29 trace statistic dialog box allows the user to analyze statistical information concerning the trace data. the target of analysis is specified in [item] and the input value or character string is specified by [start] and [end] . when [default] is selected, the input value or character string cannot be specified as a range. to specify a range, select [range] . [set] adds a new condition to the current one [new] creates a new condition [result] obtains the result of statistical information analysis [clear] clears all condition and results of statistical information analysis clicking the [close] button closes this dialog box.
75 5.21 trigger window displays trigger buttons to manually generate interrupts. the details of the interrupt to be generated by pressing each trigger button can be specified in the trigger setting dialog box. up to 16 trigger buttons can be used. for details on the interrupt processing in the simulator/debugger, refer to section 3.13, pseudo- interrupts. figure 5.30 trigger window a popup menu containing the following options is available by right-clicking the mouse within the window: 5.21.1 setting... launches the trigger setting dialog box, allowing the user to specify the details of the interrupt to be generated by pressing each trigger button. 5.21.2 size specifies the size of trigger buttons displayed in the trigger window. large , normal , or small can be selected from the submenu.
76 5.22 trigger setting dialog box figure 5.31 trigger setting dialog box allows the user to specify the details of the interrupt to be generated by pressing each trigger button. [trigger no.] selects a trigger button to specify details [name] specifies the name of the selected trigger button, which will be displayed in the trigger window [enable] enables the trigger button when this box is checked. [interrupt type1] specifies an interrupt vector number (h'0 to h'ff) [priority] interrupt priority (when the prefix is omitted, values must be input and are displayed in hexadecimal) (h0 to h11) whether an interrupt is accepted depends on the specifications of the cpu for the selected debugging platform. when h'8 is specified, the interrupt is always accepted. clicking the [ok] button stores the setting. clicking the [cancel] button closes this dialog box without setting the details of the interrupt. note: if the [cancel] button is clicked after multiple trigger button settings are modified, the modifications of all those buttons are canceled.
77 5.23 watch window figure 5.32 watch window allows the user to view and modify c/c++-source level variables. the contents of this window are displayed only when the debugging information available in the absolute file (*.abs) includes the information on the c/c++ source program. the variable information is not displayed if the source program information is excluded from the debugging information during optimization by the compiler. in addition, the variables that are declared as macro cannot be displayed. the following items are displayed. [name] name of the variable [value] value, assigned location, and type. the assigned location is enclosed by { }. [type] displays the type of variable + shown to the left of the variable name indicates that the information may be expanded by double-clicking on the variable name, and - indicates that the information may be collapsed. alternatively, the + and - keys may be used. r specifies whether the corresponding variable is updated in real time. when a r is bold, the value of the corresponding variable will be updated in real time during user program execution. a popup menu containing the following options is available by right-clicking within the window:
78 5.23.1 auto update r mark of the selected variable becomes bold-faced type and updates the variable in real time. 5.23.2 auto update all all r marks become bold-faced type and update all the displayed variables in real time. 5.23.3 delete auto update r mark of the selected variable becomes not bold-typed face and cancels real time update. 5.23.4 delete auto update all all r marks become not bold-faced type and cancel real time update. 5.23.5 add watch... launches the add watch dialog box, allowing the user to enter a variable to be watched. 5.23.6 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.23.7 delete removes the selected variable from the watch window. 5.23.8 delete all removes all the variables from the watch window. 5.23.9 radix modifies the radix for the selected variable display.
79 5.23.10 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.23.11 save as... launches the save as dialog box, allowing the user to specify the name of a file and saves the contents of the watch window in the file. if the append check box is selected, the window contents are appended to the existing file, and if it is not selected, the existing file is overwritten. 5.23.12 go to memory... displays the memory contents to which the selected variable is assigned in the memory window. 5.24 simulator system dialog box figure 5.33 simulator system dialog box this dialog box specifies the width, in bits, of the address space and program area, system call start location, execution mode, floating-point rounding mode, and memory map. [cpu] displays the current cpu. (the cpu must be specified in the debug setting dialog box.) [address space bit size] specifies the width, in bits, of the address space for the selected cpu: h8/300, h8/300l, h8/300hn, h8s/2600n, h8s/2000n: 16 h8/300ha : 17, 24 h8s/2600a, h8s/2000a : 17, 32 [program area bit size] specifies the width, in bits, of the program area for each cpu: h8/300, h8/300l, h8/300hn, h8s/2600n, h8s/2000n: 16
80 h8/300ha : same as the width of the address space h8s/2600a, h8s/2000a : 17, 24 [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. [round mode] 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. in the [memory map] , the start address, end address, memory type, data bus width, and access cycles are displayed in that order. [memory map] can be specified, modified, or deleted using the following buttons: [add] specifies [memory map] items. clicking this button opens the memory map modify dialog box, and memory map items can be specified. [modify] modifies [memory map] items. select an item to be modified in the list box and click the [modify] button. the memory map modify dialog box opens and memory map items can be modified. [delete] deletes [memory map] items. select an item to be deleted in the list box and click the delete button. clicking the [ok] button stores the modified settings. clicking the [cancel] button closes this dialog box without modifying the settings.
81 5.25 memory map modify dialog box figure 5.34 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] memory type [start address] start address of the memory corresponding to a memory type [end address] end address of the memory corresponding to a memory type [state count] number of memory access cycles [data bus size] 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 simulator memory resource dialog box, then delete or modify the memory map setting.
82 5.26 simulator memory resource dialog box figure 5.35 simulator memory resource dialog box this dialog box sets and modifies a memory map and information on the target cpu. [system configuration] displays the target cpu, address bus width, and execution mode of the simulator/debugger. [system memory resource] displays the access type, start address, and end address of the current memory resources. [memory map] displays the start address, end address, memory type, data bus width, and access cycles. [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. [modify] modifies [system memory resource] items. select an item to be modified in the list box and click this button. the system memory resource modify dialog box opens and [system memory resource] items can be modified. [delete] deletes [system memory resource] items. select an item to be deleted in the list box and click this button. 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. [system memory resource] contains the same setting information as [memory resource] on the simulator sheet in the h8s, h8/300 standard toolchain dialog box. when information about either of the items [system memory resource] or [memory resource] is modified, the other item is modified as well.
83 for details on the hitachi h8s, h8/300 standard toolchain dialog box, refer to section 2.3.1, memory mapping in the hew debugger users manual. 5.27 system memory resource modify dialog box figure 5.36 system memory resource modify dialog box this dialog box specifies or modifies system memory settings. [start address] start address of the memory area to be allocated [end address] end address of the memory area to be allocated [access type] a ccess type read: read only write: write only read/write: 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.
84 5.28 simulated i/o window figure 5.37 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. [paste] pastes the text from the windows ? clipboard to the simulated i/o window. [clear window] clears the contents of the simulated i/o window. for the i/o processing, refer to section 3.7, standard i/o and file i/o processing.
85 5.29 stack trace window figure 5.38 stack trace window this window displays the function call history. the following items are displayed. [kind] indicates the type of the symbol. f: function p: function parameter l: local variable [name] indicates the symbol name. [value] indicates the value, address, and type of the symbol. right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the following sections: 5.29.1 go to source displays, in the source window, the source program corresponding to the selected function.
86 5.29.2 view setting... launches the stack trace setting dialog box, allowing the user to specify the stack trace window settings. figure 5.39 stack trace setting dialog box the following items are displayed. [nest level] specifies the level of function call nesting to be displayed in the stack trace window. [display symbol] specifies the symbol types to be displayed in addition to functions. [display radix] specifies the radix for displays in the stack trace window. 5.29.3 copy copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications.
87 5.30 profile window (list sheet) figure 5.40 profile window (list sheet) 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. the following profile data is displayed: times (the number of times a function is called or a global variable is accessed) cycle (the number of execution cycles) ext_mem (the number of external memory accesses) i/o_area (the number of internal i/o accesses) int_mem (the number of internal memory accesses) 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. when the column header is clicked, data are sorted in alphabetic or numeric ascending/descending order. double-clicking the function/variable or address column displays the source program contents corresponding to the address in the line. right-clicking on the mouse within the window displays a popup menu. for details on this popup menu, refer to section 5.31, profile window (tree sheet).
88 5.31 profile window (tree sheet) figure 5.41 profile window (tree sheet) 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 values when the function is called. the following profile data is displayed: times (the number of times a function is called) cycle (the number of execution cycles) ext_mem (the number of external memory accesses) i/o_area (the number of input/output area accesses) int_mem (the number of internal memory accesses) 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 information file (.sni extension) output from the optimizing linkage editor, the stack size is not displayed. for details of the stack information file, refer to the manual of the optimizing linkage editor.
89 double-clicking a function in the function column expands or reduces the tree structure display. the expansion or reduction is also provided by the + or - key. double-clicking the address column displays the source program 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.31.1 view source displays the source program or disassembled memory contents for the address in the selected line. 5.31.2 view profile-chart displays the profile-chart window focused on the function in the specified line. 5.31.3 enable profiler toggles acquisition profile data. when profile data acquisition is active, a check mark is shown to the left of the menu text. 5.31.4 not trace the function call stops tracing function calls while profile data is acquired. this menu is used when acquiring profile data of the program in which functions are called in a special way, such as task switching in the os. to display the relation of function calls in the tree sheet of the profile window, acquire profile data without selecting this menu. in addition, do not select this menu when optimizing the program by the optimizing linkage editor using the acquired profile information file. 5.31.5 find... displays the find text dialog box to find a character string in the function column. search is started by inputting a character string to be found in the edit box and clicking [find next] or pressing enter.
90 5.31.6 find data... displays the find data dialog box. figure 5.42 find data dialog box by selecting the column to be searched in the column combo box and the search type in 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.31.7 clear data clears the number of times functions are called and profile data. data in the profile window list sheet and the profile-chart window are also cleared. 5.31.8 output profile information files... displays the save profile information files 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 manual of the optimizing linkage editor. note: if profile information has been acquired by selecting the not trace the function call menu, the program cannot be optimized by the optimizing linkage editor. 5.31.9 output text file... displays the save text of profile data dialog box. displayed contents are saved in a text file. 5.31.10 setting this menu has the following submenus (the menus available only in the list sheet are also included).
91 1. show functions/variables displays both functions and global variables in the function/variable column. 2. show functions displays only functions in the function/variable column. 3. show variables displays only global variables in the function/variable column. 4. only executed functions only displays the executed functions. if a stack information file (.sni extension) output from the optimizing linkage editor does not exist in the directory where the load module is located, only the executed functions are displayed even if this check box is not checked. 5. include data of child functions sets whether or not to display information for a child function called in the function as profile data. 5.31.11 properties... this menu cannot be used in this simulator/debugger.
92 5.32 profile chart figure 5.43 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 list sheet or tree sheet in the profile 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. right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the following. 5.32.1 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.32.2 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.
93 5.32.3 enable profiler toggles acquisition of profile data. when profile data acquisition is active, a check mark is shown to the left of the menu text. 5.32.4 clear data clears the number of times functions are called and profile data. data in the list sheet and tree sheet in the profile window are also cleared. 5.32.5 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.32.6 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 manual of the optimizing linkage editor. 5.32.7 expands size expands spaces between each function. the + key can also be used to expand spaces. 5.32.8 reduces size reduces spaces between each function. the - key can also be used to reduce spaces.
94 5.33 image view figure 5.44 image view window displays the contents of memory in an image. the method used to display the image can be specified in the image properties dialog box. double-clicking within the window displays information, in the pixel information dialog box, on the pixel on which the mouse pointer is located. right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the subsequent sections. 5.33.1 auto refresh when this menu is checked, the contents of the window is automatically updated when the user program is executed. 5.33.2 refresh now updates the contents of the window. 5.33.3 property... displays the image properties dialog box and specifies the format of the displayed image.
95 5.34 image properties dialog box figure 5.45 image properties dialog box specifies the method to display the image window. [color information] specifies the color information of the image to be displayed. [mode] specifies the format. [monochrome] displays in black and white. [rgb] displayed in r (red), g (green), and b (blue)
96 [bgr] displayed in b (blue), g (green), and r (red) [ycbcr] displayed by y (brightness), cb (color difference in blue), and cr (color difference in red) [bit/pixel] specifies bit/pixel according to the selected [mode] . (valid when rgb/bgr is selected) [sampling] specifies the format of sampling. (valid when ycbcr is selected) [format] specifies chunky/planar. (valid when ycbcr is selected) [buffer information] specifies the area to store data, size, and the address of the palette. [data address] specifies the start address of memory where image data is to be displayed. (displayed in hexadecimal) [palette address] specifies the start address of memory of the color palette data. (displayed in hexadecimal) (valid when 8bit is selected for rgb/bgr) [width/height size] specifies the width and height of the image. [width (pixel)] specifies the width of the image. (when a prefix is omitted, the values are input and displayed in decimal.) [height (pixel)] specifies the height of the image. (when a prefix is omitted, the values are input and displayed in decimal.) [buffer size] displays the buffer size of the image from the width and height (displayed in hexadecimal) [view information] specifies the location, size, and the data start location of the part displayed among the entire image. [view mode] specifies the entire/part to be displayed in the image. [full size] displays the entire image. [part size] displays part of the image. [start position] [top] displays data from the upper left. [bottom] displays data from the lower left. [position] specifies the start position of the image where part of the image is to be displayed. this is valid when [part size] is selected. [x position] specifies the x axis of the start location. (when a prefix is omitted, the values are input and displayed in decimal.) [y position] specifies the y axis of the start location. (when a prefix is omitted, the values are input and displayed in decimal.)
97 [width/height size] specifies the height and width of the image to be displayed partly. [width(pixel)] displays the width of display. (when a prefix is omitted, the values are input and displayed in decimal.) [height(pixel)] displays the height of display. (when a prefix is omitted, the values are input and displayed in decimal.) 5.35 pixel information figure 5.46 pixel information window the cursor location displays pixel information. [color mode] displays the format of the image. [pixel] displays color information of the cursor location. (displayed in decimal) [position] displays the cursor location in x and y axis. (displayed in decimal) [x] displays the x axis of the cursor location. [y] displays the y axis of the cursor location. [buffer size] displays the buffer size. (displayed in decimal) [width] displays the buffer width. [height] displays the buffer height. [image size] displays the width and height of the display. (displayed in decimal) [width] displays the width. [height] displays the height.
98 5.36 waveform window figure 5.47 waveform window displays memory view in waveform. the x axis shows the number of sampling data and the y axis shows the sampling value. clicking the right mouse button on the waveform view window displays the popup menus. the menus include the following options. 5.36.1 auto refresh updates the display when instruction execution has stopped. 5.36.2 refresh now updates the display. 5.36.3 zoom in the horizontal axis is enlarged and displayed.
99 5.36.4 zoom out the horizontal axis is reduced and displayed. 5.36.5 reset zoom the size is returned to its original size. 5.36.6 zoom magnification the zoom magnification can be selected from 2, 4, or 8 in the submenu. 5.36.7 scale the size of the x axis can be selected from 128, 256, or 512 pixel from the submenu. 5.36.8 clear cursor the cursor display is cleared. 5.36.9 sample information... displays the sample information dialog box. the sampling information is displayed. 5.36.10 property... displays the waveform property dialog box. the waveform data format can be specified.
100 5.37 waveform properties dialog box figure 5.48 waveform properties dialog box specifies the waveform format. the following items can be specified. [data address] specifies the start address of data in memory. (displayed in hexadecimal) [data size] selects 8bit or 16bit. [channel] specifies mono or stereo. [buffer size] specifies the buffer size of data. (displayed in hexadecimal)
101 5.38 sample information dialog box figure 5.49 sample information dialog box displays the sampling information of the cursor location in the waveform view window. the following information is displayed. [data size] displays 8bit or 16bit. [channel] displays the data channel. [value] [x] displays the x axis of cursor location. [y] displays the y axis of cursor location (displays y axes for both the upper and lower plots when stereo is selected).
102 5.39 coverage figure 5.50 coverage window displays the instruction execution information in c/c++ and assembly-language level. note that the conditions to acquire instruction execution information can be set through the open coverage dialog box or the coverage range dialog box. when the coverage window is closed, the settings of the acquired instruction execution information and the conditions to acquire information will be cleared. the items to be displayed are as follows: [times] n umber of times instruction was executed [pass] conditions to execute condition branch instructions true: branches because the condition is satisfied false: does not branch because the condition is not satisfied [address] instruction address [assembler] disassembled and then displayed. [source] c/c++ or assembler source clicking the right mouse button on the coverage window displays the popup menus. the menus include the following options.
103 5.39.1 view source displays the source window corresponding to the cursor location on the coverage window. 5.39.2 go to address... modifies the address displayed in the coverage window. 5.39.3 set range... displays the coverage range dialog box, allowing the user to specify the conditions to acquire instruction execution information. 5.39.4 enable coverage sets whether to enable or disable the acquisition of instruction execution information. 5.39.5 clear data... clears the acquired instruction execution information. 5.39.6 save data... launches the save data dialog box, allowing the user to save the coverage information in a file. 5.39.7 load data... launches the load data dialog box, allowing the user to load the coverage information from a file. 5.39.8 refresh displays the latest instruction execution information. 5.39.9 lock refresh lock or unlock the refresh of coverage information. note that when [lock refresh] is [on], window updates only the times and pass column after program execution.
104 5.40 open coverage dialog box figure 5.51 open coverage dialog box clicking the coverage icon opens the open coverage dialog box. [new window] , [open a recent coverage file] , or [browse to another coverage file] can be selected. when [new window] is selected, the start and end addresses of the coverage information range to be displayed must be specified as follows: [start address] start address of coverage information display (when a prefix is omitted, the values is input in hexadecimal.) [end address] end address of coverage information display (when a prefix is omitted, the value is input in hexadecimal.) when [open a recent coverage file] is selected, up to four recent files that have been saved are displayed. when [browse to another coverage file] is selected, a file open dialog box will appear to prompt the user to select a coverage information file.
105 5.41 go to address dialog box figure 5.52 go to address dialog box modifies the address displayed in the coverage window. 5.42 coverage range dialog box figure 5.53 coverage range dialog box specifies the condition to acquire instruction execution information. the following items can be specified. [start address] start address (when a prefix is omitted, the values are input in hexadecimal.) [end address] end address (when a prefix is omitted, the values are input in hexadecimal.)
106 5.43 save data dialog box figure 5.54 save data dialog box specifies the location and name of a coverage information file to be saved. the placeholder or the browse button can be used. if a file name extension is omitted, .cov is automatically added. if a file name extension other than .cov or .txt is specified, an error message will be displayed. 5.44 load data dialog box figure 5.55 load data dialog box specifies the location and name of a coverage information file to be loaded. the placeholder or the browse button can be used. only .cov files can be loaded. if a file name extension other than .cov is specified, an error message will be displayed.
107 5.45 confirmation request dialog box figure 5.56 confirmation request dialog box when [clear data] or [set range...] is clicked or when an attempt is made to close coverage window, the confirmation request dialog box will appear. 5.46 save coverage data dialog box figure 5.57 save coverage data dialog box when [save session] is selected from the [file] menu, the save coverage data dialog box will appear, allowing the user to save the coverage window data in separate files or a single file. when multiple coverage windows are open, the save coverage data dialog box will appear for each open coverage window. clicking the [not to all] button close the dialog box without saves the data. clicking the [yes to all] button saves the data of all coverage windows in a single file.
108
109 section 6 command lines table 6.1 lists the commands. table 6.1 simulator/debugger commands no. command name abbreviation function 1 ! - comment 2 analysis an enables or disables performance analysis 3 analysis_range ar sets or displays performance analysis functions 4 a nalysis_range_ delete ad deletes a performance analysis range 5 assemble as assembles instructions into memory 6 assert - checks if an expression is true or false 7 breakpoint bp sets a breakpoint at an instruction address 8 break_access ba specifies a memory range access as a break condition 9 break_clear bc deletes breakpoints 10 break_cycle bcy specifies a cycle as a break condition 11 break_data bd specifies a memory data value as a break condition 12 break_display bi displays a list of breakpoints 13 break_enable be enables or disables a breakpoint 14 break_register br specifies a register data as a break condition 15 break_sequence bs sets sequential breakpoints 16 change_configura tion cc sets the current configuration 17 change_project cp sets the current project 18 coverage cv enables or disables coverage measurement 19 coverage_display cvd displays coverage information 20 coverage_load cvl loads coverage information 21 coverage_range cvr sets a coverage range 22 coverage_save cvs saves coverage information 23 default_object_ format do sets the default object (program) format 24 disassemble da disassembles memory contents 25 erase er clears the command line window 26 evaluate ev evaluates an expression 27 file_load fl loads an object (program) file
110 table 6.1 simulator/debugger commands (cont) no. command name abbreviation function 28 file_save fs saves memory to a file 29 file_verify fv verifies file contents against memory 30 go go executes user program 31 go_reset gr executes user program from reset vector 32 go_till gt executes user program until temporary breakpoint 33 halt ha halts the user program 34 initialize in initializes the debugging platform 35 log l o controls command output logging 36 map_display ma displays memory mapping 37 map_set ms allocates a memory area 38 memory_display md displays memory contents 39 memory_edit me modifies memory contents 40 memory_fill mf fills a memory area 41 memory_move mv moves a block of memory 42 memory_test mt tests a block of memory 43 open_workspace ow opens a workspace 44 profile pr enables or disables profile 45 profile_display pd displays profile information 46 profile_save ps saves the profile information to file 47 quit qu exits hew 48 radix ra sets default input radix 49 register_display rd displays cpu register values 50 register_set rs changes cpu register contents 51 reset re resets cpu 52 response rs sets a window refresh area 53 sleep - delays command execution 54 step st steps program (by instructions or source lines) 55 step_mode sm selects the step mode 56 step_out sp steps out of the current function 57 step_over so steps program, not stepping into functions 58 step_rate sr sets or displays rate of stepping 59 submit su executes a command file 60 symbol_add sa defines a symbol
111 table 6.1 simulator/debugger commands (cont) no. command name abbreviation function 61 symbol_clear sc deletes a symbol 62 symbol_load sl loads a symbol information file 63 symbol_save ss saves a symbol information file 64 symbol_view sv displays symbols 65 tcl - enables or disables the tcl 66 trace tr displays trace information 67 trace_acquisition ta enables or disables trace information acquisition 68 trace_save tv outputs trace information into a file 69 trace_statistic tst analyzes statistic information the following describes the syntax of each command.
112 6.1 !(comment) abbreviation: none description: allows a comment to be entered, useful for documenting log files. syntax: ! parameter type description text 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). 6.2 analysis abbreviation: an description: enables/disables performance analysis. counts are not automatically reset before running. syntax: an [] parameter type description none displays the performance analysis state keyword enables/disables performance analysis enable enables performance analysis disable disables performance analysis reset resets performance analysis counts
113 examples: analysis displays performance analysis state. an enable enables performance analysis. an disable disables performance analysis. an reset resets performance analysis counts. 6.3 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 type description none displays all functions for which the performance analysis is provided character string name of function for which the performance analysis is provided examples: analysis_range sort provides the performance analysis for the function sort. ar displays the function for which the performance analysis is provided.
114 6.4 analysis_range_delete abbreviation: ad description: deletes the specified function, or all functions if no parameters are specified (it does not ask for confirmation). syntax: ad [] parameter type description none deletes all functions numeric index number of function to delete examples: analysis_range_delete 6 deletes the function with index number 6. ad deletes all functions. 6.5 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 description
numeric address at which to start assembling example: as h1000 starts assembling from h1000.
115 6.6 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. syntax: assert parameter type description expression expression to be checked example: assert #r0 == 0x100 returns an error if r0 does not contain 0x100. 6.7 breakpoint abbreviation: bp description: specifies a breakpoint at the address where the instruction is written. syntax: bp < address> [ < count>] [ < action>] parameter type description
numeric the address of a breakpoint numeric the number of times the instruction at the specified address is to be fetched (1 to 16383, default = 1). keyword action taken when the conditions are satisfied (optional, default = stop) stop (p) halts the execution of the user program input (i) inputs (saves) data to a file output (o) outputs (reads) data from a file interrupt (t) initiates a pseudo-interrupt
116 format: the method of defining each action are as follows. stop input parameter type description character string the name of the file from which data is input numeric address to which the data is read. numeric size per data packet (1/2/4/8) numeric number of data packets (h01 to hffffffff) output [


▲Up To Search▲   

 
Price & Availability of HD6433064B

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