Home
Debugging Interface HS6400DIIW5S User`s Manual
Contents
1. Menu Item Accelerator Toolbar Graphic View Source Ctrl K En Status Ctrl U be Trace Ctrl T Watch Ctrl W Ea Run Reset CPU En Go FS Reset Go Shift F5 E Go To Cursor Bi Set PC To Cursor A Run Step In F8 e Step Over F7 mi Step Out E Step H Halt Esc 3 Memory Refresh F12 Load a Save a Verify a Test EJ Fill ES Copy El Compare Ea Configure Map E Appendix D GUI Command Summary Chart 149 Menu Item Accelerator Toolbar Graphic Memory Configure Overlay Setup Status bar Options E Radix gt LL 23 Octal 8 Binary Customize gt Toolbar e le al Configure Platform Window Cascade a Tile E Arrange Icons Close All Help Index Fl 2 Using Help Search for Help on About HDI 150 Hitachi Debugging Interface User Manual Appendix E IO File Format 151 Appendix E I O Register File Format HDI formats the I O Registers window based on information it finds in an I O Register definition file When you select a debugging platform using the Setup gt Configure Platform menu option HDI will look for a lt device gt IO file corresponding to the selected device and load it if it exists This file is a formatted text file that describes the I O modules and the address and size of their registers You can edit this file with a text editor to add support for memory m
2. ii 101 13 10 8 Output Text File 101 13 10 95 SelectDat x L ib el a an 101 1910100 gt SOHO sic IA a a nici ile abi a Li 102 13 11 PROFILESTREE iL iO ARI 103 19 11 A RR ala 104 13 11 2 ViewProfile LiSt ii 104 13 11 3 View Profile Chatt i 104 13 11 4 Enable Profiler ii 104 A o AA E E ili alii Lidia ali tl E ea libido oli T 104 13 11 6 Find Data aa a a a a i E a a rE Ta E 105 EAT O IA EE EE E E AET NA ole li el ie licia io edi 105 13 11 8 Output Profile Information File iii 105 T3 TEO Opa TETEE a a a aida nda 105 19 11 10 SelectDala ko hihi delete ind 105 TBEATAT SON sn az Spell Aaa 106 viii Hitachi Debugging Interface User Manual 13 12 PROFILES CHART li id 107 13 12 7 EXpandS Size nine ana 107 19 12 2 ROQUES SIZE 0d lea area 107 19 12 38 MieW SQOUlC i zisnbi nono As cee heathen eA ll de dedo esa ei a tke 108 13 12 4 View Profile List x gt lle ea o Leal 108 13 12 5 View Frofile Tre6ts 03 11100 10 ds de hero ndo add be de libr hei i 108 1312 6 View Pro Cha te aa 108 1812 LI Enable Profiler E a Ad ea ehh 108 13128 2CIOA DAA o oi a i i Nah de clone od ei e ic ee do 109 13 129 Multiple Mi Wisin Ii 109 13 12 10 Output Profile Information File ii 109 13 13 REGISTERS lt a a dle oe te die ie dad dado e dida oil 109 19 19 15 COS e IN A e lle de ie 110 13 13 24 Edit eee on SOIN enel
3. i 22 5 1 3 Displaying Memory as WordS i 22 5 1 4 Displaying Memory as LongwordS iii 22 5 1 5 Displaying Memory as Single Precision Floating Point ii 22 5 1 6 Displaying Memory as Double Precision Floating Point ooooonininnininnncicnnmnnmmmnmmmmsmmmm 23 5 1 7 Looking at a Different Area Of MeM0OIY ii 23 5 2 MODIFYING MEMORY CONTENTS i 23 5 21 QUICK EOI naan atan ias 24 G22 PUNE GIS AAA ress fave cesT cd esis cates teach A Ani 24 5 2 3 Selecting a Memory Range i 24 53 FINDING A VALUE IN MEMORY non no nonno non REE EEEE AEAEE aSa 25 5 4 FILLING AN AREA OF MEMORY WITH A VALUE caeeseeseeseesceacsecsecsceneeeesesseeaeeneeaesaeeaes 25 5 4 1 Filling a Range iii 26 5 5 COPYING AN AREA OF MEMORY iii 26 5 6 TESTING AN AREA OF MEMORY non noncononco N KANRAN NEKEA N ENEKE Neta 27 5 7 SAVING AN AREA OF MEMORY i 28 iv Hitachi Debugging Interface User Manual 5 8 LOADING AN AREA OF MEMORY Li non noncn naco non orcnnn non narra senno rosvo nin arrancan 28 5 9 VERIFYING AN AREA OF MEMORY i 29 6 EXECUTING YOUR PROGRAM c cccsscsssscsssssssecsssecsssessssessssesscsesecssssecsssecsssacscsasecsssessssessessesseee 31 6 1 RUNNING FROM RESET trita teta 31 6 2 CONTINUING RUN vinos it in ii tad 3
4. ccococoncncnnccnnoconocnonocinncconaconoconoconaccnncconoconncconaconoconononoss 121 APPENDIX C COMMAND LINE SUMMARY CHAR T sccscccsscsssccssssssssecesccssccsscssescssscesesessessesseees 145 Figures Figure 3 1 Select Session Dialog Box iaia aa 7 Figure 3 2 Memory Mapping Window eee ceceee i e a a E o a 9 Figure 3 3 Edit Memory Mapping Dialog BOX ii 10 Figure 3 4 System Status Window ERBA agoda ii 11 Figure 3 5 Load Program Dialog BOX eececceseeesees ceceeseeeeesecseeesecseceaeeaee N R R A N 12 Figure 3 6 Open Dialog Box sui lloro tea lia lede lalla nb 13 Figures 7 FileType Selection tetitas iosa 13 Eigure 4 1 Source Window ss sess cinzia aaa aaa ala ARI NN 15 Figure 4 2 Disassembly Window alal aaa 16 Figure 4 3 Assembler Dialog Box civile des aia tte 17 Figure 44 Labels Window i stila lA alata ea 18 Figure 4 5 Label Dialog Boxster etnea ille a 18 Figure 4 6 Set Address Dialog Box e 19 Figure 4 7 Bind Dialog Box AL A LA i 20 Figure 5 1 Open Memory Window Dialog BOX ec eecceseeesees oonoonnonocononn nono nn nono conce sesseseaeseeeaeseeeaees 21 Figure 5 2 Memory Window Bytes rito aac alal 21 Figure 5 3 Set Address Dialog Box ira io iaia ei iaia a lat 23 Figure 54 Edit Dialog Box 33 iaia oe tia lie 24 Figure 5 5 Search Memory Dialog BOx eee eeeceee ceceeceseeseeesesseceseeseeesecs
5. 4 Functions 1 Functions Cancel Figure 10 1 Select Function Dialog Box 58 Hitachi Debugging Interface User Manual This dialog box has three areas e Select Function Name list box Displays the overloaded functions or member functions and their detailed information e Set Function Name list box Displays the function to be set and their detailed information e Counter group edit box All Function Displays the number of overloaded functions or member functions Select Function Displays the number of functions displayed in the Select Function Name list box Set Function Displays the number of functions displayed in the Set Function Name list box 10 2 Specifying Functions Select overloaded functions or member functions in the Select Function dialog box Generally one function can be selected at one time plural functions can be selected at only for setting breakpoints in the function setting by the Run Program dialog box and setting the function of the performance analysis 10 2 1 Selecting a Function Click the function you wish to select in the Select Function Name list box and click the gt button You will see the selected function in the Set Function Name list box To select all functions in the Select Function Name list box click the gt gt button 10 2 2 Deleting a Function Click the function you wish to delete from the Set Function Name list box and click the lt button To delete all functions
6. Section 13 Windows 93 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 13 5 7 Save Saves HDI s current symbol table to a symbol file 13 5 8 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 HDI s current label list to a symbol file 99 The standard file extension for symbol files is sym See appendix F Symbol File Format 13 6 Locals f 0x00003fd4 long 10 D 8410 oo i elong D 10 0x00003fcc D O TE y cant D 22117 0x00003fc4 int Figure 13 12 Locals Window Allows the user to view and modify the values of all the local variables The contents of this window are blank unless the current PC can be associated to a function containing local variables in the source files via the debugging information available in the object file abs 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 i
7. Machine code Disassembled instruction Note OK Cancel Figure 4 3 Assembler Dialog Box The address machine code and disassembled instruction are displayed Type the new instruction or edit the old instruction in the Mnemonic field Clicking OK or pressing Enter will assemble the instruction into memory and move on to the next instruction Clicking Cancel or pressing Esc will close the dialog box The assembly language display is disassembled from the actual machine code in the debugging platform s memory If the memory contents are changed the display will show the corresponding new assembly language code but will not match the text shown in the source display 4 2 Looking at Labels Notes 1 In addition to the debugging information that HDI uses to link your program s source code to the actual code in memory the debug object file also contains symbolic information This is a table of text names that represent an address in the program and is referred to as labels in HDI You will see symbols in the Label field on the line of the corresponding address and in the Assembler field as part of an instruction s operand An instruction s operand is replaced with a label name if the operand and label value match If two or more labels have the same value then the label that comes first alphabetically will be displayed Wherever you can enter an address or value in an HDI edit control you can use a label i
8. for example File gt 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 gt When this symbol is used it is always A x located in the left hand margin It indicates The how to symbol that the text to its immediate right is describing how to do something Contents 1 INTRODUCTION i csssvescnsecsosssessvtdccetecosocaseavtoesontenscesdondeocsasnsesoscesouesnotevtsnsevedsuctesaresessesdeadecsactcssvvenseddereissesta 1 Vt KEY FEATURES wt it Man tdi nate Ag ae een aaa 1 2 SYSTEM OVERVIEW wi ccsccccscssseacccsosscsssccocessonsotscestaceeceseossesncssocsonsessbisesgssceasveuastsstsceansesoausssateavcessvernsessesess 3 2 1 USERINTERFAGE 1 aaa A LL ELA Leal ara laica lina 3 22 IDATAENTRY insana aaa a e E teva 3 22 gt Operatore 04 e uc ld ele eden i elio 3 2 2 2 Datla FOrmats 2s scecctecicsts lalla 3 21233 PROCISION A E hav oh Rha eased edd eet eens davies 4 2 2 4 Expression Examples antarana na a Annan 4 220 SYMBOL FORMAL ol it it das eli iii 4 2 2 6 Symbol ExampleS s p cctv ria lait te aa ise Ose 4 23 HELP rai dedalo alata 5 2 31 Context Sensitive Help Ls ssi isolata 5 3 PREPARING TO DEBUG iassscssiciccccictsctessacesc
9. lt state gt Keyword Verify flag optional default V V Verify N No verify Example MEMORY FILL H C000 Fills memory from H C000 to H COFF with word H COFF H 55AA WORD data H 55AA MF H 5000 H 7FFF H 21 Fills memory from H 5000 to H 7FFF with data H 21 MEMORY_MOVE Abbreviation MV Description Moves memory Syntax mv lt start gt lt end gt lt dest gt lt state gt Parameter Type Description lt start gt Numeric Source start address lt end gt Numeric Source end address including this address lt dest gt Numeric Destination start address lt state gt Keyword Verify flag optional default V V Verify N No verify Example Appendix B Command Line Interface 135 MEMORY_MOVE F 1000 FH 1FFF Moves area H 1000 H 1 FFF to H 2000 H 2000 MV H FB80 H FF7F H 3000 Moves area H FB80 H FF7F to H 3000 MEMORY_TEST Abbreviation MT Description A full read write verify test is performed on the address range specified destroying the original contents The test will access the memory according to the map settings Syntax mt lt start gt lt end gt Parameter Type Description lt start gt Numeric Start address lt end gt Numeric End address including this address Example MEMORY_TEST H 8000 Tests from H 8000 to H BFFF H BFFF MT H 4000 H 5000 Tests integrity from H 4000 to H 5000 QUIT Abbreviation QU Description Exits HDI C
10. 1 Figure 13 2 Figure 13 3 Figure 13 4 Figure 13 5 Figure 13 6 Figure 13 7 Figure 13 8 Figure 13 9 Figure 13 10 Figure 13 11 Figure 13 12 Figure 13 13 Figure 13 14 Figure 13 15 Registers WIOdOW utente 48 Expanding a Flag Register cunda 49 Register Dialog Box cuisine 50 VO Registers Window iinsinla ita aa 52 Dialog Box for Modifying I O Register Contents eeeseceeeeceneceseeeeneecseeeseeseseseee ages 53 Overlay Dialog Box at Opening i 55 Overlay Dialog Box Address Range Selected i 55 Overlay Dialog Box Highest Priority Section Gr oup Selected conoononnnonos 56 Select Function Dialog Box siria iaia lella 57 Minimizing a WI Westerns iia 59 Disassembly Window Cm rincresce g aa ile alal 59 Icons Before Arrangement c iAc cas cideseceddasss ei rE ale aaa 60 Icons After ATM Marta tt lied ili 61 Selecting a WINdow iucrina lai e ein 62 Customize Toolbar Toolbars Dialog BOX ii 63 Customize Toolbar Commands Dialog BOX conneeeseeseneceseeeeeceaeeesee saeeeaeeeae 64 Font Dialog Box icsrr landa iaia ara 66 Customize File Filter Dialog BOX ii 66 Session Name Display s cinicniaciizaata Giga eia AG aE ES a eoi E aI aS Eia 68 HDI Options Session Dialog BOX sienna eai aa i Er Aa 69 HDI Options Confirmation Dialog BOX ii 70 HDI Options Viewing Dialog BOX
11. 73 Weeds RIDE EEEE ETA AA E E A EA EA 73 IZRI SNOW SESSI OM neule an ai dd da as 73 12122 Load Session ie irc ila iran 73 IZ TB SAVELSESSION dr aa a ex a Sous cosine a aa a a n a a i 73 TATA SAVE SESSIONAS ronnie Lana 74 122925 LOBO PIO a es a aaa O rai 74 TZ E6 Mtalii 2o E 0 le hi tilts a led cata ae 74 2h Xita a AN E oh as R aol at ini O etl aban oe Ne 74 22 EDT O 74 A OU AAE E A ad et e i re o 74 12 22 CODY n E A ci Rafa dardo anse ii ein 75 12 2 0 A pene a iaia it ne tis i aa in De ak 75 12 24 Edi Soia ia io beso ille ieri lee i 75 122657 A ile le ie ei 75 12 3 A ei ae e 75 123 1 Bieakpoints c c alal Ra IR RIU R io ita 75 12 32 COMME siriano ina ie 75 12 33 DISASSOIMIDIV a n a Ra ie 76 12 3 4 VO Alea lilla iaia 76 A E A rali ogee stig tenes 76 12 90 06 MOS ii e e alain 76 LILA Memory ll ei AEA Noel aaa ia 76 12 3 8 Performance AnalYsiS cne n 76 12 3 9 PHOPO E IST a is 76 123310 ca 19 1 gree ER cali LL nh piana 77 12 3 11 O yo iaia aaa ai 77 12 53 12 SOUCO aaa 77 12 3513 Status anne ia ei ia iaia a AS ainsi 77 1259714 IT ACC assoc cuni sil iaia 77 12 98 15 Watch iii DIA ei ninna Vl illo ai e iia 77 12 44 RUN Acoli e Ate aio Lapo ie ciaooo cinici acli dai a NAL ian MISI Il es nilo lie n 77 1241 FROSCE CRU EEEE EE n A le pie ei ie ii mr AE arl 77 AZAD SG EET A EE ceo SI E e i A AE 78 vi 13 12 12 12 13 13 13 13 Hitachi Deb
12. Code Assembler 00001012 O1006DF6 main MOV L ER6 ER7 void mai 00001016 OFF6 MOV L ER ER6 00001018 642800FF MOV B H OOFFFF3B 32 ROL if MI 0000101e E807 AND B H 07 ROL 00001020 4806 CMP B H 06 ROL 00001022 4702 BEQ H 1026 8 00001024 403E BRA H 1064 8 00001026 642800FF MOV B H OOFFFF39 32 ROL if sy D000102 lt 4801 CMP B FH 01 ROL 0000102e 4708 BEQ H 1038 8 00001030 F801 MOV B H 01 ROL 00001032 64A800FF MOV B ROL GH OOFFFF39 32 00001038 643800FF BCLR B 5 GH OOFFFEDS 32 BCRL 00001040 5528 BSR _STOP_MODE 8 STOP_ 00001042 554A BSR Q_MASK1 8 MASKI 00001044 5574 BSR DMAC RUN 8 DMAC ae ZZ Figure 13 3 Disassembly Window Column specific double click actions is supported BP Toggles standard breakpoints at that address Address Launches the Set Address dialog box allowing the user to enter a new address If the address is in a source file then that file will be opened in a new window a current source view will be brought into focus with the cursor set to the specified address Finally if the address does not correspond to a source file then this window will scroll to that location When an overloaded function or a class name is entered as an address the Select Function dialog box opens for you to select a function Assembler Launches the Assembler dialog box allowing the user to modify the instruction at that address Note that changes to the machine code do not modify t
13. Disabling Breakpoints During the course of a debugging session you may find that you tend to focus on particular areas of code for a period of time and then look at other areas but want to return to the previous ones afterwards When concentrating on these areas you will want to set breakpoints to stop your program execution at useful points If you have set these breakpoints and wish to move on to another area of investigation but know that you will want to return to the current area later it is frustrating to have to delete all the breakpoints you have set only to have to set them all again when you return Fortunately HDI eases this problem by allowing you to disable breakpoints while still leaving them in the breakpoint list 7 4 1 Disabling a Breakpoint To disable an individual breakpoint select the breakpoint in the list by clicking on the line corresponding to it and choose the Disable menu option from the popup menu Alternatively double click in the Enable column of the breakpoint you need to disable The symbol in the Enable column is cleared to show that the breakpoint is no longer enabled 7 4 2 Enabling a Breakpoint When you want to re enable a breakpoint in the Breakpoints window list select the breakpoint in the list by clicking on the line corresponding to it and choose the Enable menu option from the popup menu Alternatively double click in the Enable column of the breakpoint you need to enable The symb
14. Editing is not supported If you want to change the display format from the one you selected when you opened the window this can be done from the popup menu 5 1 1 Displaying Memory as ASCII To display and edit memory as ASCII characters choose the ASCII menu option from the popup menu and the display will be updated to show the area of memory as ASCII characters 5 1 2 Displaying Memory as Bytes To display and edit memory as bytes choose the Byte menu option from the popup menu and the display will be updated to show the area of memory as individual bytes as shown in figure 5 2 5 1 3 Displaying Memory as Words To display and edit memory as words choose the Word menu option from the popup menu and the display will be updated to show the area of memory as 16 bit words 5 1 4 Displaying Memory as Longwords To display and edit memory as longwords choose the Long menu option from the popup menu and the display will be updated to show the area of memory as 32 bit longwords 5 1 5 Displaying Memory as Single Precision Floating Point To display and edit memory as single precision floating point data choose the Single float menu option from the popup menu and the display will be updated to show the area of memory as single precision floating point data Section 5 Working with memory 23 5 1 6 Displaying Memory as Double Precision Floating Point To display and edit memory as double precision floating point data c
15. HDI user interface and the configuration of the debugging platform 12 6 1 Status Bar Toggles the status bar feature on and off If the feature is enabled then a check mark will be displayed to the left of the menu text Section 12 Menus 81 12 6 2 Options Launches the HDI Options dialog box allowing the user to modify the settings that are specific to the HDI not debugging platform dependent settings 12 6 3 Radix 16 1 8 2 Cascades a menu displaying a list of radix in which the numeric values will be displayed and entered by default without entering the radix prefix The current radix has a check mark to its left and the associated toolbar button is locked down For example if the current radix is decimal then the number ten will be displayed as 10 and may be entered as 10 H A 0x0a etc if the current radix is hexadecimal then the number ten will be displayed as 0A and entered as A D 10 etc 12 6 4 Customize OUAR Cascades a menu displaying a list of options that can be customized by the user Toolbar When this cascade menu option is selected the Customize dialog box is launched Font When this cascade menu option is selected the Font dialog box is launched allowing a fixed width font to be selected File Filter When this cascade menu option is selected the Customize File Filter dialog box is launched allowing the browser file filters for object source and memory files to be chan
16. Hitachi s semiconductor products Hitachi assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein 2 No license is granted by implication or otherwise under any patents or other rights of any third party or Hitachi All Rights Reserved 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 Trademarks Microsoft Windows and WindowsNT are registered trademarks of Microsoft Corporation in the United States and other countries IBM PC is a registered trademark of International Business Machines Corp ELF DWARF is the name of an object format developed by the Tool Interface Standards Committee All products or brand names used in the manual are trademarks or registered trademarks of their respective companies Preface About this Manual This manual explains the use of the Hitachi Debugging Interface HDI for Hitachi microcomputer development tools The following section will provide a brief Introduction to the debugging interface and list its key features The following sections Preparing to Debug Looking at Your Program Executing Your Program Stopping Your Program Looking at Variables Working with
17. Italic 16 Terminal fia Zi jis l Help Sample Use as Default Font AaBbYyZz Figure 11 8 Font Dialog Box The dialog box is based on the standard Windows font selection dialog box except that only fixed width fonts are listed in the Font list box To set default font for new window click the Use as Default Font button 11 6 Customizing the File Filters You can customize the file filters displayed in the Open dialog boxes To change the filters choose the Setup gt Customize gt File Filter menu option This will launch the Customize File Filter dialog box Customize File Filter Ed File Type SR ecord y Add Filter Edit E mot a20 a37 Delete Figure 11 9 Customize File Filter Dialog Box Note Changes are made immediately when using this dialog box There is no option to cancel changes made Section 11 Configuring the user interface 67 To edit an existing filter 1 Select the file group from the File drop list 2 Select the file type name from the Type drop combo 3 Click the Edit button to open the Edit Filter dialog box The dialog box title will display the file group that is being changed The edit controls on this dialog box are limited to accept only valid characters 4 Change the filter name and or extension If more than one extension is required then separate each extension with a semi colon For example mot a20 a37 To enter a new filt
18. M Verify Format Figure 5 6 Fill Memory Dialog Box If an address range has been selected in the Memory window the specified begin and end address will be displayed Select the format from the Format drop list and enter the data value in the Data field Click the OK button or press Enter the dialog box closes and the new value are written into the memory range 5 5 Copying an Area of Memory You can copy an area of memory using the memory copy feature Select a memory range see section 5 2 3 Selecting a Memory Range choose the Copy menu option from the popup menu The Copy Memory dialog box opens Section 5 Working with memory 27 Copy Memory Ea HFFECOO End oe Destination V Verify Format Long word v di Cancel Figure 5 7 Copy Memory Dialog Box The source begin and end address specified in the Memory window will be displayed in the Begin and End fields Enter the destination start address in the Destination field and click the OK button or press Enter the dialog box closes and the memory block will be copied to the new address 5 6 Testing an Area of Memory Note The exact test is target dependent However in all cases the current contents of the memory will be overwritten YOUR PROGRAM OR DATA WILL BE ERASED You can test an area of memory in the address space using the memory test feature Select a memory range see section 5 2 3 Selecting a Memory Range choose the Test m
19. Memory windows You can do this by specifying the register name prefixed by the character e g R1 PC R6L or AER3 8 6 Looking at I O As well as a CPU and ROM or RAM the microcomputer also contains on chip peripheral modules The exact number and type of peripheral modules differ between devices but typical modules are DMA controllers serial communications interfaces A D converters integrated timer units a bus state controller and a watchdog timer These on chip peripherals are programmed by accessing registers mapped to the microcomputer s address space Since the setting up and use of these on chip peripheral registers is usually very important in an embedded microcomputer application it is useful to be able to look clearly at the contents of these registers The Memory window only allows you to look at data in memory as byte word longword single precision floating point double precision floating point or ASCII values so HDI also provides an I O Registers window to ease inspection and setting up of these registers 8 6 1 Opening an I O Registers Window To open an I O Registers window select the View gt I O Area menu option or click the I O Register Window toolbar button E The I O register information is organized by modules that match the on chip peripherals When an I O Registers window is first opened only a list of module names is displayed 52 Hitachi Debugging Interface User Manual 120 Registe
20. Performance Analysis Performance Analysis 04 Histogram Standby mode Sleep mode Sub Sleep mode Watch mode Other modes Other Addresses Figure 13 15 Performance Analysis Window 98 Hitachi Debugging Interface User Manual Allows the user to view and control the performance analysis data The items displayed as default cannot be deleted or modified by the user The display contents and operation depend on the debugging platform See the supplied Debugging Platform User s Manual for more information A popup menu containing the following options is available by right clicking within the view area 13 9 1 Add Range Launches the Add PA Range dialog box allowing the user to add a new user range based on either source lines or an address range The name of the range can be edited 13 9 2 Edit Range Only enabled when the highlighting bar is on a user defined range Launches the Edit PA Range dialog box allowing the user to modify the range s settings 13 9 3 Delete Range Only enabled when the highlighting bar is on a user defined range Deletes the range and immediately recalculates the data for the other ranges 13 9 4 Reset Counts Times Clears the current performance analysis data 13 9 5 Delete All Ranges Deletes all the current user defined ranges and clears the performance analysis data 13 9 6 Enable Analysis Toggles the collection of performance analysis data When performance analysis is active a c
21. Step Over Calls IV Source Level Step Cancel Figure 6 2 Step Program Dialog Box Enter the number of steps in the Steps field select whether you want to step over function calls by the Step Over Calls checkbox and select whether to make one line of the source program correspond to one step by the Source Level Step checkbox If you are using the feature for automated stepping select the step rate from the list in the Rate field Click OK or press Enter to start stepping Section 7 Stopping your program 35 7 Stopping Your Program This section describes how you can halt execution of your application s code This section describes how to do this directly by using the halt command and by setting breakpoints at specific locations in your code 7 1 Halting Execution When your program is running the Halt toolbar button is enabled fj a red STOP sign and when the program has stopped it is disabled 5 the STOP sign is grayed out To stop the program click on the Halt toolbar button press the Esc key or choose the Run gt Halt menu option Your program s execution is halted with the cause of the break displayed on the status bar HDI will then update any open windows The last break cause can also be viewed in the Platform pane of the System Status window 7 2 Standard Breakpoints PC Breakpoints When you are trying to debug your program you will want to be able to stop the program running when it reaches
22. String Displays the help for the specified command Example HE Displays the contents of the help HE GO Displays help for the GO command INITIALIZE Abbreviation IN Description Initializes HDI including debugging platform and target and the user system as if you had reselected the target DLL All breakpoints memory mapping etc are reset Syntax in Parameter Type Description none Initializes HDI Example IN Initializes HDI INTERRUPTS Abbreviation IR Description Enables or disables interrupts or sets the interrupt priority level of the CPU This command operates by changing the CPU status register SR or CCR Note Some debugging platforms do not support this command Appendix B Command Line Interface 131 Syntax ir lt state gt l lt level gt Parameter Type Description none Displays the current interrupt state lt state gt Keyword Enables or disables interrupts enable Enables interrupts disable Disables interrupts lt level gt Numeric Sets the interrupt priority level Example IR Displays the CPU interrupt status IR ENABLE Enables all interrupts IR DISABLE Disables all interrupts except NMI IR 5 Sets interrupt priority level 5 LOG Abbreviation LO Description Controls logging of command output to file If no parameters are specified logging status is displayed If an existing file is specified you will be warned if you answer No data will be appended to the existing file otherw
23. a pointer array or structure then you will see a plus sign expansion indicator to left of its name this means that you can expand the watch item To expand a watch item double click on it The item expands to show the elements in the case of structures and arrays or data value in the case of pointers indented by one tab character and the plus sign changes to a minus sign If the elements of the watch item also contain pointers structures or arrays then they will also have expansion indicators next to them Watch Window iof x Value 0x00003ff8 unsigned H O1 0x00003ff8 unsi 1 H OS 0x00003ff9 unsi 2 H Oc 0x00003ffa Cunsi Hitachi Micro Systems E Hitachi Micro Systems E H 0000105e Ox00003fb4 Al Expanded watch Expansion indicator Collapsed watch Figure 8 5 Expanding a Watch To collapse an expanded watch item double click on the item again The item s elements will collapse back to the single item and the minus sign changes back to a plus sign 8 3 3 Modifying Radix for Watch Item Display To change the radix of watch item select the corresponding item by clicking it and click the right mouse button on the item Then a popup menu will be displayed Choose the Radix menu option from the popup menu Then choose the radix in which you wish the selected watch item to be displayed The value will be updated immediately 8 3 4 Changing a Watch Item
24. called and profile data Data in the Profile List window and the Profile Chart window are also cleared 13 11 8 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 User s Manual for the SuperH RISC engine C C Compiler Assembler and the Optimizing Linkage Editor 13 11 9 Output Text File Displays the Save Text Profile Data dialog box Displayed contents are saved in a text file 13 11 10 Select Data Selects profile data types The types of profile data differ according to the debugging platform If this menu option is not supported by the debugging platform it is displayed in gray characters 106 Hitachi Debugging Interface User Manual 13 11 11 Setting Displays the Setting Profile Tree dialog box to set displayed contents Settine Profiler Tree x ge V Show Address A tt y __ Gancel Y Show Size Y Show Stack Size Y Show Times F Show only executed function s TT Include data of child functions Figure 13 23 Setting Profile Tree Dialog Box The Column group checkboxes set whether or not to display a specific column Checking in the Show only Executed function s checkbox disables displaying unexec
25. cesesseeesecseseseseseaeeseenseaeeegs 25 Figure 5 6 Fill Memory Dialog Box ziale ca patada aaa rali 26 Figure 5 7 Copy Memory Dialog Box lalla 27 Figure 5 8 Test Memory Dialog Box alone ani anita alii 27 Figure 5 9 Save Memory As Dialog BOX i 28 Figure 5 10 Load Memory Dialog BOX i 29 Figure 5 11 Verify S Record File with Memory Dialog BOX ii 29 Figure 6 1 Highlighted Line Corresponding to PC Address i 31 Figure 6 2 Step Program Dialog BOX i 34 Figure 7 1 Setting a PC Breakpoint ROERO E i al 36 Figure 7 2 ES A auris aiar 37 Fistire 7 3 Run Program Dialog Box aaa ali aaa 40 Figure 8 1 Tooltip Watch ianihlloa AE ne ia ariete 43 Figure 8 2 Instant Watch Dialog BOX i 44 Figure 8 3 Add Watch Dialog BOX ed ER TAO anta IAA RADI de IRRITANTE 45 Elgure 8 4 gt Watch Window isis iiia laico a lillo Lilo Oe tarde ore aN 45 Figure 8 5 Expanding a Watch Ei ao Lire 46 Figure 8 6 Edit Valtie Dialog Box i ie alia 47 Figure 8 7 Local Window svrus rioni la it id 47 X Hitachi Debugging Interface User Manual Figure 8 8 Figure 8 9 Figure 8 10 Figure 8 11 Figure 8 12 Figure 9 1 Figure 9 2 Figure 9 3 Figure 10 1 Figure 11 1 Figure 11 2 Figure 11 3 Figure 11 4 Figure 11 5 Figure 11 6 Figure 11 7 Figure 11 8 Figure 11 9 Figure 11 10 Figure 11 11 Figure 11 12 Figure 11 13 Figure 11 14 Figure 12 1 Figure 13
26. clicking within the window 13 4 1 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 13 4 2 Edit Launches a dialog box to modify the selected register s contents 13 4 3 Expand Collapse Expands collapses the selected module Section 13 Windows 89 13 5 Labels Name H 00001000 startup boot H 00001012 main H 0000106A _STOP_MODE H O000108E _MASKI1 H O00010BA _DMAC RUN H 00001180 _MASKZ H 000011Ac _DTC REGS H 0000129E _DTC SCIO ACT H 000012E2 _DTC SCIO RUN H 00001316 _MASK3 H 00001342 _WDT RUN H 00001358 _DENDOA H 0000136C _WOVI H 0000139E _TXIO H 000013C6 _COPY MEM H 00001412 INITSCT H 0000145C __D ROM Figure 13 5 Labels Window You can view symbols sorted either alphabetically or by address value by clicking on the respective column heading Column specific double click actions is supported e BP Toggles through the standard event types at that address e Value Opens a Source window at the start of the function e Name Launches the Edit Labels dialog box Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking The currently selected standard breakpoint is shown by a check mark to the left of the menu text A popup menu containing the following options is available by right clicking within the window but outside the BP colum
27. 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 4 Hitachi Debugging Interface User Manual The following prefixes can be used to identify radices O Octal B Binary D Decimal H Hexadecimal Ox Hexadecimal The contents of a register may be used by specifying the register name prefixed by the character e g R1 ER3 R4L 2 2 3 Precision All mathematics in expression evaluation is done using 32 bits signed Any values exceeding 32 bits are truncated 2 2 4 Expression Examples Buffer_start 0x1000 R1 B 10001101 pointer 2 increment_size amp H FFFF0000 gt gt D 15 flag ER4 2 2 5 Symbol Format You can specify and reference symbols in the same format as in C C programming language Cast operators may be used together with symbols and you can reference data after its type has been converted Note the following limitations e Pointers can be specified up to four levels e Arrays can be specified up to three dimensions e No typedef name can be used 2 2 6 Symbol Examples Object value Specifies direct reference of a member C C p_Object gt 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
28. disable display of the Status bar choose the Setup gt Status Bar menu option The Status bar will be disabled and removed from the HDI application window display To re enable the Status bar display choose the Setup gt Status Bar menu option again The Status bar will be enabled and added to the HDI application window display 11 4 Customizing the Toolbar To control the selection and arrangement of buttons displayed on the toolbar choose the Setup gt Customize gt Toolbar menu option The Customize Toolbar dialog box opens and contains two panes The first pane Toolbars is used to set the overall appearance of the toolbars while the second pane Commands is used to set the individual buttons in each toolbar Section 11 Configuring the user interface 63 11 4 1 Overall Appearance Select the Toolbars pane to set the overall appearance of the toolbars Toolbars Commands Toolbars M Show Tooltips New MW Cool Look n Reset TT Large Buttons Bose AGREE licalbar name M enu bar Cancel Apply Figure 11 6 Customize Toolbar Toolbars Dialog Box The toolbars are listed in a multi selection list box to individually switch off a toolbar clear the checkbox next to the name this name is displayed in a mini title bar when the toolbar is not attached to the border of the main frame window Note The menu bar cannot be switched off If you need to conserve desktop area then clear the Coo
29. display is updated to show the label The Clear button can be used to remove the label This method can also be used for quickly modifying the text of existing labels When you double click on the label in the Label column the text is copied into the edit box of the Label dialog box You can then edit it and the modified version is saved in the label list The Source window display is updated to show the new label To use added or modified labels again in later sessions save them in a file For details see section 13 5 8 Save As 4 3 Looking at a Specific Address When you are looking at your program in a Source window you may want to look at another area of your program s code Rather than scrolling through a lot of code in the program you can go directly to a specific address Double click in the Address column the Set Address dialog box opens Set Address Ed _main Carl Figure 4 6 Set Address Dialog Box Enter the address or symbol name in the edit box and either click on OK or press Enter If the code at that address is in the same source file the Source window updates to show the code at the new address When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function For details refer to section 10 Selecting Functions If the new address is in a source file that is already being viewed in a Source window that window is brought to the front and upda
30. hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Re
31. is useful to focus tracing on problem areas 13 16 5 Halt Stops tracing data and updates the trace information without stopping execution of the user program 13 16 6 Restart Starts tracing data 13 16 7 Snapshot Updates the trace information to show the debugging platform s current status without stopping user program execution 13 16 8 Clear Empties the trace buffer in the debugging platform If more than one trace window is open all Trace windows will be cleared as they all access the same buffer 13 16 9 Save Launches the Save As dialog box allowing the user to save the contents of the trace buffer as a text file It is possible to define a numeric range based on the Cycle number or to save the complete buffer saving the complete buffer may take several minutes Note that this file cannot be reloaded into the trace buffer 13 16 10 View Source Opens a Source or Disassembly window for the address 13 16 11 Trim Source Removes white space from the left side of the source 13 17 Watch Watch Window 116 Hitachi Debugging Interface User Manual Value 0x00003fd4 long 10 0x00003fd4 H 00000000 H 00000daa H 000020da H 00002704 H 00002f5a H 00003ead H 0000421f H 00004d1d H 000053dc H 00005665 0x00003fd8 0x00003fdc 0x00003fe0 0x00003fe4 0x00003fe8 0x00003fec O0x00003ff0 Ox00003ff4 0x00003ff8 J J J E H 00005665 0x00003f
32. method accessed from the Source window and the full method using the Add Watch dialog box in the Watch window Quick Method The quickest way to add a variable to the Watch window is to use the Add Watch feature Section 8 Looking at variables 45 To use Add Watch from a Source Window 1 Open the Source window showing the variable that you want to examine 2 Click on the variable You should see a cursor on the variable 3 Choose the Add Watch menu option from the popup menu The variable is added as a watch item and the Watch window updates Full Method The full method uses a dialog box that allows you to enter more complex watch expressions for example arrays structures or pointers To use Add Watch from a Watch Window 1 Open the Watch window 2 Choose the Add Watch menu option from the popup menu The Add Watch dialog box opens Add Watch Ed Yeriable or expression Figure 8 3 Add Watch Dialog Box Enter the name of the variable that you wish to watch and click OK The variable is added to the Watch window Watch Window Oy x Value 7 H 00005665 0x00003fc4 int Figure 8 4 Watch Window 46 Hitachi Debugging Interface User Manual Note If the variable that you have added is a local variable that is not currently in scope HDI will add it to the Watch window but its value will be blank or set to a question mark 8 3 2 Expanding a Watch If a watch item is
33. s Value You may wish to change the value of a watch variable e g for testing purposes or if the value is incorrect due to a bug in your program To change a watch item s value use the Edit Value function Section 8 Looking at variables 47 Editing a watch item s value 1 Select the item to edit by clicking on it you will see a flashing cursor on the item 2 Choose the Edit Value menu option from the popup menu The Edit Value dialog box opens Edit Value Ea Expression Temp2_N ame Current Value Hitachi Micro Cancel New Value Hitachi Micro Systems Figure 8 6 Edit Value Dialog Box Enter the new value or expression in the New Value field and click OK The Watch window is updated to show the new value 8 3 5 Deleting a Watch To delete a watch item select it and choose the Delete menu option from the popup menu The item is deleted and the Watch window updated Note Watch items that you have set in the Watch window can be saved in a session file See section 11 Configuring the User Interface 8 4 Looking at Local Variables To look at local variables open the Locals window by choosing the View gt Locals menu option The Locals window opens Locals olx T 0x00003fd4 n fa 3 Cono 410 0x00003fd0 Clo D 6 bxon003 Fee int D O 0x00003fc8 int D 22117 0x00003fc4 int Figure 8 7 Locals Window 48 Hitachi Debugging Interface User Manual As you debug your
34. target DLL also includes extensions to the standard GUI to provide the user with access to these capabilities For a detailed description of the features available using your target DLL refer to the supplied Debugging Platform User s Manual Appendix B Command Line Interface 121 Appendix B Command Line Interface HDI Built In Commands The following is a list of the standard HDI built in commands COMMENT Abbreviation none Description Allows a comment to be entered useful for documenting batchand log files Syntax lt text gt Parameter Type Description lt text gt 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 ACCESS Abbreviation AC Description Sets or displays the illegal access handling Syntax access lt state gt Parameter Type Description none Displays the current setting lt state gt Keyword Action to be taken on illegal access break Break emulation default setting none No action Illegal accesses are writes to protected areas during execution writes to internal ROM or any access to an unmapped area of memory Example ACCESS break Break on guarded write protected access default setting AC Displays current illegal access handing AC none Sets no action on an illegal access 122 Hitachi Debugging Interface User Manual ANALYSIS Abbreviation AN Descripti
35. upper limit value depends on the debugging platforms Refer to the separate Debugging Platform User s Manual 6 4 Running to Several Points When you want to perform something like the Go To Cursor operation but the destination is outside the Source window or want to stop at several addresses you can use HDI s temporary breakpoint feature see section 7 5 Temporary Breakpoints Section 6 Executing your program 33 6 5 Single Step When you are debugging your code it is very useful to be able to step a single line or instruction at a time and examine the effect of that instruction on the system In the Source window then a step operation will step a single source line In the Disassembly window a step operation will step a single assembly language instruction If the instruction calls another function or subroutine you have the option to either step into or step over the function If the instruction does not perform a call then either option will cause the debugger to execute the instruction and stop at the next instruction 6 5 1 Stepping Into a Function If you choose to step into the function the debugger will execute the call and stop at the first line or instruction of the function To step into the function either click the Step In toolbar button J or choose the Run gt Step In menu option 6 5 2 Stepping Over a Function Call If you choose to step over the function the debugger will execute the call and all of
36. will initialize any hardware or data structures and provide status messages on the status bar as the initialization progresses When the debugging platform has been successfully initialized HDI will report Link up on the status bar 3 3 Configuring the Debugging Platform Before you can load a program into your debugging platform you must set it up to match your application s system The items that must be set up are typically device type operating mode clock speed and the memory map It is particularly important to set up the memory map as you must have memory in the debugging platform to which your program will be loaded 3 3 1 Setup Note To set up the debugging platform configuration choose the Setup gt Configure Platform menu option You will be presented with a set up dialog box specific to the debugging platform that you chose in the Select Session dialog box For a detailed description of the features available in your debugging platform please refer to the separate Debugging Platform User s Manual 3 3 2 Mapping For the debugger to correctly represent your user system the memory map must be set up It needs to know which areas in the device s address space are RAM ROM on chip registers or areas where there is no Memory When you select the device type and mode in the Debugging Platform Configuration dialog box HDI will automatically set up the map for that device and the mode in which the processor is o
37. with the value first in hexadecimal terminated by an H followed by a space then the symbol text 4 The file must end with the word END Example BEGIN 11FAH 11FCH 11FEH 1200H END Symbol Symbol Symbol Symbol _name_1 _name_2 _name_3 _name_4
38. 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 Section 2 System Overview 5 2 3 Help HDI has a standard Windows context sensitive help system This provides on line information about using the debugging system Help can be invoked by pressing the F1 key or via the Help menu Additionally some windows and dialog boxes have a dedicated help button to launch the help file at the appropriate content 2 3 1 Context Sensitive Help To get help on a specific item in the HDI help cursor can be used To enable the help cursor press SHIFT F1 or click the button on tool bar Your cursor then changes to include a question mark You can then click on the item for which you require help and the help system will be opened at the appropriate content 6 Hitachi Debugging Interface User Manual Section 3 Preparing to debug 7 3 Preparing to Debug This section of the manual describes all the facilities that are available in HDI for setting up the debugging platform ready to start debugging your program You will learn how to select and configure a debugging platform with which to debug and how to load your program to be debugged 3 1 Compiling for Debug Note In order to be able to debug your program at C C s
39. 024 33 return Lf SYSCR BYTE SYSCR BYTE Registers Register Value ER6 00000000 ER 00000000 PC 001018 BCRL BIT EAE STOP MODE Figure 6 1 Highlighted Line Corresponding to PC Address 32 Hitachi Debugging Interface User Manual To continue running from the current PC address click the Go toolbar button E or choose the Run gt Go menu option 6 3 Running to the Cursor The function and it by which only a part of the program is executed provides the Go To Cursor feature to execute to a specific address Using Go To Cursor Notes 1 1 Make sure that a Source or Disassembly window is open showing the address at which you wish to stop 2 Position the text cursor on the address at which you wish to stop by either clicking in the Address column or using the cursor keys 3 Choose the Go To Cursor menu option from the popup menu The debugging platform will run your program from the current PC value until it reaches the address indicated by the cursor s position If your program never executes the code at this address the program will not stop If this happens program execution can be stopped by pressing Esc choosing the Run gt Halt menu option or clicking on the Halt toolbar button SJ The Go To Cursor feature requires a temporary breakpoint if you have already used all those available then the feature will not work and the menu option will be disabled The
40. 1 6 3 RUNNING TO THE CURSOR vd dt iaia iaia denne 32 6 4 RUNNING TO SEVERAL POINTS citada terested ara dd ener iad ee ii 32 6 5 SINGLE OTE acini arenili 33 6 5 1 Stepping Into a FUNGUO siii aa diana olona 33 6 5 2 Stepping Over a Function CAll i 33 66 STEPPING OUT OFA FUNCTION cernant atarra ES EEA EEA SG 33 6 7 MULTIPLE STEPS a a AE E Gi 34 7 STOPPING YOUR PROGRAM cscccssssssssssssescsscscsessssecsssesscsesecsesecssssesecsesecsesecsesecseseceesensecsesecsoss 35 7 1 HALTINGEXECUTION ii 35 7 2 STANDARD BREAKPOINTS PC BREAKPOINTS ii 35 7 2 1 Cycling Through Standard BreakpoiNtS iiii 36 7 2 2 Clearing Standard BreakPOints cccccccccccsccssescescssscsessessescescsscsseseessscsnscsscsssstessescsscscssessesesnes 36 7 3 THE BREAKPOINTS WINDOW ii 37 73 1 Adding a Breakpoiht scossa ia pun iena ara ica aa 37 1 32 MONIVIN TA BORDO E tae ates ae oad a aes sas ina 38 7 3 3 Deleting a Breakpoint iii 38 7 3 4 Deleting All BreakpoihtS iii 38 TA DISABLINGBREAKPOINTS iaia ae aaa ine 39 7 4 1 Disabling a Breakpoint eee 39 1 4 2 Enabling a Breakpoint iraniana era 39 7 5 TEMPORARY BREAKPOINTS ica hi aa A Ri 40 7 6 HARDWARE BREAKPOINTS EVENT ie 41 8 Hole CERRAR ai 43 B 1 TOOLTIP WATCH A A 43 B 2 NI A Aaa ail 43 8 3 USING WATCH ITEMS vennerion rin
41. 110 EV R2H R2L Result H 121 D 289 0 441 B 00000000000000000000000 100100001 126 Hitachi Debugging Interface User Manual FILE LOAD Abbreviation FL Description Loads an object code file to memory with or without the specified offset Existing symbols are cleared but the new ones will override any existing ones with the same names If an offset is specified this will be added to the symbols The file extension default is MOT Syntax fl lt filename gt lt offset gt lt state gt Parameter Type Description lt filename gt String File name lt offset gt Numeric Offset to be added to load address optional default 0 lt state gt Keyword Verify flag optional default V V Verify N No verify Example FILE_LOAD Loads S Record file testfile a22 A BINARY TESTFILE A22 FL ANOTHER MOT H 200 Loads Motorola S Record file ANOTHER MOT with an offset of H200 bytes FILE SAVE Abbreviation FS Description Saves memory contents to a file The data is saved in Motorola S Record format The user is warned if about to overwrite an existing file The file extension default is MOT Symbols are not automatically saved Syntax fs lt filename gt lt start gt lt end gt Parameter Type Description lt filename gt String File name lt start gt Numeric Start address lt end gt Numeric End address Example FILE_SAVE TESTFILE MOT Saves address range H 0 H 2013 as H 0 H 2013 Motorola S Rec
42. 1234 to RO RESET Abbreviation RE Description Resets the microcomputer All register values are set to the initial state for the device Memory mapping and breakpoints are not affected Syntax re Parameter Type Description none Resets the microcomputer Example RE Resets the microcomputer 138 Hitachi Debugging Interface User Manual SLEEP Abbreviation none Description Delays command execution for a specified number of milliseconds Syntax sleep lt milliseconds gt Parameter Type Description lt milliseconds gt Numeric Delayed time millisecond Default radix it is not always decimal is used if you do not specify D Example SLEEP D 9000 Delays for 9 seconds STEP Abbreviation ST Description Single step source line or instruction execution Performs a specified number of instructions from current PC Default is stepping by lines if source debugging is available Count default is 1 Syntax st lt mode gt lt count gt Parameter Type Description lt mode gt Keyword Type of stepping optional instruction Steps by assembly instruction line Steps by source code line lt count gt Numeric Number of steps optional default 1 Example STEP 9 Steps code for 9 steps STEP_OUT Abbreviation SP Description Step the program out of the current function i e a step up This works for both assembly language and source level debugging Syntax Appendix B Command Line Interface
43. 139 Sp Parameter Type Description none Steps the program out of the current function Example SP Steps the program out of the current function STEP_OVER Abbreviation SO Description Step over function call source line or instruction execution Performs a specified number of instructions from current PC This command differs from STEP in that it does not perform single step operation in subroutines or interrupt routines These are executed at full speed Syntax so lt mode gt lt count gt Parameter Type Description lt mode gt Keyword Type of stepping optional instruction Steps by assembly instruction line Step by source code line lt count gt Numeric Number of steps optional default 1 Example SO Steps over 1 step code STEP_RATE Abbreviation SR Description Controls the speed of stepping in the STEP and STEP_OVER commands A rate of 6 causes the fastest stepping A value of 1 is the slowest Syntax sr lt rate gt Parameter Type Description none Displays the step rate lt rate gt Numeric Step rate 1 to 6 6 fastest Example SR Displays the current step rate SR6 Specifies the fastest step rate 140 Hitachi Debugging Interface User Manual SUBMIT Abbreviation SU Description Executes a file of commands Nested submit files are permitted Any error aborts the file The stop button terminates the process Syntax su lt filename gt Parameter Type Description lt filename gt S
44. 8 EI IV Verify Cancel Figure 8 12 Dialog Box for Modifying I O Register Contents When you have entered the new number or expression click the OK button or press Enter the dialog box closes and the new value is written into the register If you are using an emulator based debugging platform when it reads data from an I O register this can sometimes affect the operation of your program For example reading a data register can cancel a pending interrupt Data is only read from I O modules that have been expanded in the I O Registers window so that the register values are displayed Therefore as long as I O modules are collapsed when they no longer need to be displayed this will not cause a problem In order to check whether this is affecting your program try running it without the I O Registers window Also note that having a Memory window or Disassembly window open on the I O area can have the same effect 54 Hitachi Debugging Interface User Manual Section 9 Overlay Function 55 9 Overlay Function Programs making use of the overlay function can be debugged This section explains the settings for using the overlay function 9 1 Displaying Section Group When the overlay function is used that is when several section groups are assigned to the same address range the address ranges and section groups are displayed in the Overlay dialog box Open the Overlay dialog box by choosing the Memory gt Configure Over
45. A e TPO Or 82 128 2 USDA a ai 82 12 8 3 Search for Help 0N e 82 12 8 4 CADOUFHDI x cp cai la ei ai de elena i 82 WINDOWS RANIERO AIAR disnei INS arcada ecc 83 1 BREAKPOINTS escasas lacas ae ld or a tes Sie ci la iO e elo ei ail 83 VODA AQ tl E or IN 83 13512 0 A TN a 83 13 32 Dele e a Ad O casi dd e o e Sle Redd ea ail ei cla 83 18 19 DeloterAllo 0 O cali a ii ea dela 84 13 1 5 Disable Enablex s citcda een ae iene iena 84 13 41 00 GOTO SUI A a Et ad 84 2 COMMAND EINE atrio eci aL aio 84 13 25 Ruh Batch File s cci tn Se he cae do ed lo 85 13 2 2 Run Stop Balcanes ri 85 13 2 9 Setlogrile s castani o 85 13 2 4 gt Eogging A ea his iaia aes ae 85 3 DISASSEMBLIY aan aa i RR LI E E oe taeea Soon et 85 13 31 O Lana Li RE raga 87 13 3 2 SOLARES A pati ee doll a ee oo 87 13 9 39 GO TO GUISO 2 ita o di 87 13 3 4 SeEPG HO ii LR a 87 ERAN E AAA eil ari 87 18 3 6 ADAM A ia 87 A VO REGISTER sleale nane A bie 88 19451 A Lia I ata 88 19 42 Edita iaia iaia lea aa 88 vil 13 4 3 Expand CON apse sen itnn a a aa a i a aT 88 13 5 N E ESATEAN EEA RE aan 89 E o A ai el EEN 89 A e AA E E E E e A AE E AI india 90 E REA 43 EEEE NN 9 IRE EOT A EE E EE les Led tea E O a 91 13 5 5 A c c rizzo contro e deri Cio ail ie NA 92 IED AI A ada levi me iti mura e A 92 VIDA SAVC ey ein venta e dC oi i e leciti 93 IED SAVE Asino Lal RARI A ei a 93 SN Sarai 93 TVG COPVrn tibiale ipse Pr e ai
46. Cascade menu option All currently open windows are arranged in a cascading format Windows that are minimized to icons are not affected 11 2 Locating Currently Open Windows When you have many windows open in the HDI application window it is quite easy to lose one of them behind the others There are two methods that you can use to find the lost window 11 2 1 Locating the Next Window To bring the next window in the window list to the front of the display choose Next from the window menu or press Ctrl F6 Repeating this operation will cycle selection of all windows opened and minimized 62 Hitachi Debugging Interface User Manual 11 2 2 Locating a Specific Window To select a specific window choose from the list of windows opened and minimized at the bottom of the Window menu The currently selected window has a check mark next to it in the window list In the following example the Disassembly window is the currently selected window Window Help Cascade Tile Arrange Icons Close All 1 Disassembly 2 Byte Memory H DODODODO 3 Trace 0 records no filter 4 Registers Figure 11 5 Selecting a Window The window that you select will be brought to the front of the display If it is minimized the icon is restored to a window 11 3 Enabling Disabling the Status Bar You can select whether or not the Status bar is displayed at the bottom of the HDI application window by default it will be displayed To
47. E H 1005 Disassembles 5 lines of code starting at H 100 DA H 3E00 20 Disassembles 20 lines of code starting at H 3E00 ERASE Abbreviation ER Description Clears the Command Line window Syntax er Parameter Type Description none Clears the Command Line window Example ER Clears the Command Line window Appendix B Command Line Interface 125 EVALUATE Abbreviation EV Description Provides a calculator function evaluating simple and complex expressions with parentheses mixed radices and symbols All operators have the same precedence but parentheses may be used to change the order of evaluation The operators have the same meaning as in C C Expressions can also be used in any command where a number is required Register names may be used but must always be prefixed by the character The result is displayed in hexadecimal decimal octal and binary Syntax ev lt expression gt Parameter Type Description lt expression gt Expression Expression to be evaluated Valid operators amp amp logical Il logical OR lt lt left arithmetic gt gt right AND shift arithmetic shift multiplication modulo bitwise OR amp bitwise AND bitwise NOT bitwise logical NOT equal to unequal to exclusive R gt greater than lt less than gt greater than or lt less than or equal to equal to Example EV H 123 D731 B10 Result H 16E D 366 0 556 B 00000000000000000000000101101
48. EI i Renesas r Rev 3 0 2000 10 www renesas co IMPORTANT INFORMATION READ FIRST READ this user s manual before using the Hitachi Debugging Interface hereafter called HDI e KEEP the user s manual handy for future reference Do not attempt to use the system until you fully understand its mechanism Target User of the System This system should only be used by those who have carefully read and thoroughly understood the information and restrictions contained in the user s manual Do not attempt to use the system until you fully understand its mechanism It is highly recommended that first time users be instructed by users that are well versed in the operation of the system Purpose of HDI This system is a software and hardware development tool for systems employing the Hitachi microcomputer This system must only be used for the above purpose Improvement Policy 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 Figures Some figures in this user s manual may show items different from your actual system Other Important Things to Keep in Mind 1 Examples described herein are meant merely to indicate the characteristics and performance of
49. ER INTERFACE cccscsscsssssscssssssccescssssssssscsncsescsccsanscsecsncsescssssncsoseenss 59 1431 ARRANGINGWINDOWS crra ilaele eil 59 11 1 1 Minimizing WindowS RO 59 TEL Arranging ICONS rr IU Ra Lario ii 60 TEES _Tiling WindoWws csssinanena po hans dies da aie eae aes i 61 11 1 4 Cascading WiNd0WS cicca e 61 11 2 LOCATING CURRENTLY OPEN WINDOWS ii 61 11 2 1 Locating the Next Window i 61 11 22 Locating a Specific WindowW ii 62 11 3 ENABLING DISABLING THE STATUS BAR cossesecesscsesessesseeneeeaes 62 114 CUSTOMIZING THE TOOLBAR errre a iaia 62 11 4 1 Overall AppearanC ivi ita 63 11 4 2 Customizing Individual TOOIbAars iii 64 114 3 Bufton Gategories incitare id 64 11 4 4 Addinga Button to a Toolbar ii 64 11 4 5 Positioning a Button in a Toolbar iii 65 11 4 6 Removing a Button from a Toolbar i 65 11 5 CUSTOMIZING THEFONTS iii iaa a ra 65 11 6 CUSTOMIZING THE FILE FILTERS cscecsecsecsecsecseesecseescsscacacsacsacsecsecsecsecsscsecseseeseeaees 66 117 SAVING A SESSION ci ito alora iii aule Gre tee ee 68 11 8 LOADING A SESSION ist ia aaa ao 68 11 9 SETTING HD OPTIONS siae anale la ieri 69 11 10 SETTING THE DEFAULT INPUT RADIX coseeesecsscescesscesecsscesscsssseesscesscesesscssessenaes 70 MENUS E E A ATENTE AE AAEE EEEN A A E E A TA
50. Manual Appendix A System Modules 119 Appendix A System Modules The following section describes the architecture of the HDI debugging system HDI graphical user interface Debugging platform Ey O IO file Lutti E A Fg 7 7 X TT SE Monitor Emulator Simulator Pi se f 3 a User User code system object file hardware Figure A 1 HDI System Modules In normal operation the user program will be placed directly into the target hardware for example as an EPROM HDI uses this information to provide a Windows based debugging system To decrease the learning curve when swapping between different debugging platforms and or user system hardware HDI provides a single unified interface the GUI and a family of target specific modules Normally the user will only interact with the standard GUI once the appropriate target module has been selected the rest of the system configures itself automatically by loading the appropriate modules 120 Hitachi Debugging Interface User Manual Graphical User Interface This is the main HDLEXE program that runs under Windows It uses familiar Windows operations with menus and windows to give a user friendly view into the debugging system The GUI is the only contact between the user and the rest of the system it processes commands and provides the required information about the user program It also provides the interfa
51. Memory Overlay Function Selecting Functions and Configuring the User Interface provide a how to guide to using HDI for debugging The next two sections Menus and Windows give in depth reference information about the operation and facilities available from these respective areas This manual assumes that the HDI is used on the English version of Microsoft Windows 95 operating system running on the IBM PC The separate Debugging Platform User s Manual will typically provide A Setting up section that informs you about installing the debugging platform s hardware and software on your PC and verifying that all the components have been correctly installed A Tutorial section that takes you through the available features using some sample code A Reference section that describes the user interface that is specific to that debugging platform for example editing breakpoints configuring the trace acquisition etc 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 on PC compatible computers ii Hitachi Debugging Interface User Manual Document Conventions This manual uses the following typographic conventions Table 1 Typographic Conventions CONVENTION MEANING Menu gt Menu Option Bold text with gt is used to indicate menu options
52. Menus This document uses the standard Microsoft menu naming convention Menu title Check mark ES Hitachi Debugging Interface MANUAL E6000 H8S 2600 Emulator Ox Menu bar File Edit View Run PERU Tools Window Help ESTA JN IA a aaa Radix bE v Hexadecimal Drop down meni o n ustomise gt Decimal Octal Binary Select Platform Menu option Configure Platformee Ellipsis Cascading menu Figure 12 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 s manual for details on how to use the Windows menu system 12 1 File The File menu is used for aspects of the program that access program files 12 1 1 New Session a Launches the Select Session dialog box allowing the user to select a new debugging platform 12 1 2 Load Session Launches the Select Session dialog box allowing the user to load a session from a selected session file hds extension A session file contains the debugging platform s settings and the current program and the position of open child windows views it contains symbols breakpoints or current register values 12 1 3 Save Session Updates the session file for the current session file If there is no current session file defined this acts in a similar manner to the Sa
53. Source window If you do not have a source file but wish to view code at assembly language level either choose the View gt Disassembly menu option use the Ctrl D accelerator or click on the Disassembly Window toolbar button IE This will open a Set Address dialog box in which you can set address to start disassembling The Disassembly window shows Address BP Breakpoint Code showing the machine code values Label and Assembler showing the disassembled mnemonics with labels when available Additionally the final column contains any source line starting at that address thus providing mixed mode display SE Disassembly c hdi tutorial h8s tutorial c OO x Address Assembler Source 00001012 O1006DF6 main MOV L ER6 ER void main void 00001016 OFF6 MOV L ER7 ER6 00001018 642800FF MOV B GH OOFFFF3B 32 ROL if MDCR BIT MI Ole E807 AND B H 07 ROL 4806 CMP B H 06 ROL 4702 H 1026 8 403E H 1064 8 return 642800FF GH OOFFFF39 32 ROL Lf SYSCR BYTE A801 H 01 ROL 4708 H 1038 8 F801 H 01 ROL SYSCR BYTE 6AASOOFF ROL H OO0FFFF39 32 Si nz Figure 4 2 Disassembly Window Section 4 Looking at your program 17 4 1 3 Modifying Assembly Language Code You can modify the assembly language code by double clicking on the instruction that you wish to change The Assembler dialog box will open Assembler Ea ee Address Code Mnemonic 22500001012 01006DF6 MOVL_ ERG ER
54. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry ENESAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted
55. _SEARCH USER_SIGNALS Short name Description ST SP SO SR SU SA SC SL SS SV TE TI TR TA TC TV TS US Delays command execution Steps program by instructions or source lines Steps out of the current function Steps program not stepping into functions Sets rate of stepping Executes a file of commands Defines a symbol Deletes a symbol or all symbols Loads symbols from a file Saves symbols to a file Displays symbols Tests emulator hardware Sets or displays the timer resolution Displays trace buffer contents Sets or displays trace acquisition parameters Compares a saved trace file with the current trace data Saves the trace data to a file in binary format Searches trace data Enables or disables user signals Appendix D GUI Command Summary Chart 147 Appendix D GUI Command Summary Menu Item Accelerator Toolbar Graphic File New Session Ctrl N Load Session Ctrl O Save Session Ctrl S Save Session As Load Program Initialize 2 Exit Alt F4 Edit Cut Ctrl X S Copy Ctrl C Paste Ctrl V Find F3 8 Evaluate A View Breakpoints Ctrl B Ea Command Line Ctrl L cn Disassembly Ctrl D E I O Area Ctrl I Labels Ctrl A Locals Ctrl Shift W Memory Ctrl M Performance Analysis Ctrl P El Profile List Ctrl F Profile Tree Ctrl Shift F pra Registers Ctrl R 148 Hitachi Debugging Interface User Manual
56. a specific point or points in your code You can do this by setting a PC breakpoint on the line or instruction at which to want the execution to stop The following instructions will show you how to quickly set and clear simple PC breakpoints More complex breakpoint operation can be done via the Breakpoints window which is discussed later To set a PC breakpoint 1 Make sure that the Source window is open at the place you want to set a PC breakpoint 2 Double click in the BP column or press F9 at the line showing the address at which you want the program to stop 3 You will see a circle and the word Break appear in the column to indicate that a PC breakpoint has been set 36 Hitachi Debugging Interface User Manual Breakpoint set Note SE T utorial c Line Address BP Label Source 28 00001012 _main void main void 29 p 31 00001018 1f MDCR BIT MDS 0x6 pe printf Sele gt return 00001026 L SYSCR BYTE 0x01 00001030 SYSCR BYTE Ox1 00001038 BCRL BIT EAE 0 00001040 STOP MODE gt Figure 7 1 Setting a PC Breakpoint Now when you run your program and it reaches the address at which you set the PC breakpoint execution halts with the message Break PC Breakpoint displayed on the status bar and the Source window display is updated with the PC breakpoint line highlighted The line or instruction at which you set a PC breakpoint is not actu
57. ad an S Record file to an area of memory without removing the current debugging information use the load memory feature Open the Load Memory dialog box by choosing the Memory gt Load menu option Section 5 Working with memory 29 Load Memory HEI 0 IV Verify n Cancel File name c hdistutorialhSsStest mot ki Browse Figure 5 10 Load Memory Dialog Box You can offset the loading address from the address specified in the S Record by entering a value positive in the Offset field Click the Open button or press Enter the dialog box closes and the data is loaded into memory When the file load is complete a confirmation message box may be displayed this can be switched off in the Confirmations tab on the HDI Options dialog box 5 9 Verifying an Area of Memory You can compare an area of memory against a previously saved block of memory using the memory verify feature Open the Verify S Record File with Memory dialog box by choosing the Memory gt Verify menu option Yerify S Record File with Memory HE Offset File name c hdi tutorial h8s test mot Browse Figure 5 11 Verify S Record File with Memory Dialog Box You can offset the verification address from the address specified in the S Record by entering a value positive in the Offset field Click the Open button or press Enter the dialog box closes and the file is verified When the file verification is complete a c
58. ain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronic
59. 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 13 8 8 Search Section 13 Windows 97 13 8 6 Copy Launches the Copy Memory dialog box allowing the user to copy a block of memory within the debugging platform to another location within the same memory space The blocks may overlap The start and end fields may be set similarly to the Search option see section 13 8 8 Search 13 8 7 Compare Launches the Compare Memory dialog box allowing the user to select a start and an end address in the memory area to check against another area in memory If a block of memory is highlighted in a Memory window these will be automatically filled as the start and end addresses when the dialog box is displayed Similar to Verify memory but compares two blocks in memory 13 8 8 Search Launches the Search Memory dialog box allowing the user to search a block of the debugging platform s memory for a specified data value If a block of memory is highlighted the start and end fields in the dialog box will be automatically filled with the start and end addresses corresponding to the highlighted block respectively 13 8 9 ASCII Byte Word Long Single Float Double Float A check mark next to these six options indicates the current view format The user may select a different option to change to that format 13 9
60. ally executed the program stops just before it is about to execute it If you choose to Go or Step after stopping at the PC breakpoint then the highlighted line will be the next instruction to be executed 7 2 1 Cycling Through Standard Breakpoints By default the standard breakpoint will support the PC breakpoint type However depending on the selected platform more than one type of standard breakpoint may be provided It is possible to cycle through these by either double clicking in the BP column of the line at which the program PC breakpoint is set or placing the text cursor on the line and using the F9 key The display will cycle through the available standard breakpoint types a color coded circle and a descriptive word will be shown in the BP column 7 2 2 Clearing Standard Breakpoints Right click in the BP column to display a popup menu that lists all the standard breakpoint types for the current platform The currently selected break type will be shown with a check mark to clear the breakpoint simply click the None option Section 7 Stopping your program 37 Alternatively when all the standard types of breakpoints have been cycled through then the breakpoint is cleared 7 3 The Breakpoints Window The Breakpoints window allows you to access complex breakpoints not only a PC breakpoint if your debugging platform supports them and gives you more control over setting clearing and enabling disabling breakpoints To op
61. an HDI command file hdc The batch file is then run automatically The name of the file is shown on the window title bar 13 2 2 Run Stop Batch P Runs the last entered command file Clicking this button while the command file is being executed terminates its execution 13 2 3 Set Log File Launches the Open Log File dialog box allowing the user to enter the name of an HDI log file log The logging option is automatically set and the name of the file 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 13 2 4 Logging 9 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 checkbox Re enabling logging will append to the log file 13 3 Disassembly This window is used to display code at the assembly language level This window layout has a different layout to the Source window with an additional column Label which displays the symbol label name if available for that address Assembler information is obtained by disassembling the memory contents and may be edited or viewed directly from memory without requiring debugging information from the object file 86 Hitachi Debugging Interface User Manual e Disassembly PAUSERSALOUIS NAMYEXESA32BITAH8STUTATUTORIAL C Address
62. ancel Figure 13 25 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When OK is clicked the performance analysis data acquisition is disabled and the profile data acquisition is enabled Section 13 Windows 109 13 12 8 Clear Data Clears the number of times functions are called and profile data Data in the Profile List window and the Profile Tree window are also cleared 13 12 9 Multiple View If the Profile Chart window is going to be opened when it has already been opened selects whether another window is to be opened or the same window is to be used to display data When a check mark is shown to the left side of the menu text another window is opened 13 12 10 Output Profile Information File Displays the Save Profile Information File dialog box Profiling results are saved in a profile information file pro extension The optimizing linkage editor optimizes user programs according to the profile information in this file For details of the optimization using the profile information refer to the separate User s Manual for the SuperH RISC engine C C Compiler Assembler and the Optimizing Linkage Editor 13 13 Registers Register Value RO 0000 R1 0000 RZ 0000 R3 0000 R4 0000 RS 0000 R6 0000 R7 0000 BC 1004 CR ages I L U D H O U 0 N D Z 1 Vv 0 C O Figure 13 26 Registers Window Allows the user to view and modify the current register values 110 Hi
63. and the plus sign changes to a minus sign If the flags have sub groups for example register masks they will also have expansion indicators next to them Registers IO 101 x Register Value RO 0000 R1 0000 Standard i 0000 Register R3 0000 R4 0000 RS 0000 R6 0000 R7 0000 PC 1004 EER Tg go Expansion indicator H H Expanded bit register OQOgNZEZCIAIGO OOPO0OOO O Figure 8 9 Expanding a Flag Register To collapse an expanded flag register double click on the minus sign The flags collapse back to the single item and the minus sign changes back to a plus sign 8 5 2 Modifying Register Contents There are two ways that you can change a register s contents The quick edit method that allows you to enter values by typing directly into the window but is limited to hexadecimal values only The full edit method that requires you to enter values via a dialog box but allows you to enter values in any base and use complex expressions 50 Hitachi Debugging Interface User Manual Quick Edit The quick way to change a register s contents is to select the digit that you wish to change by clicking or dragging on it You will see the selected digit is highlighted Type the new value for the digit it must be in the range 0 9 or a f The new value is written into the digit and the cursor moves to the next digit in the register When you enter a value into the least significant digit of the reg
64. apped registers or peripherals you may have specific to your application e g registers in an ASIC device mapped into the microcomputer s address space File format Each module name must be defined in the Modules definition section and the numbering of each module must be sequential Each module corresponds to a register definition section and within the section each entry defines an I O register FileVersion 2 must be declared at the beginning of this section This indicates that the I O register file is created in a way that allows access to the values of individual bit fields If this has not been declared the registers cannot be expanded into bit fields as described below The BaseAddress definition is for devices where the location of I O registers moves in the address space depending on the CPU mode In this case the BaseAddress value is the base address of the I O registers in one specific mode and the addresses used in the register definitions are the address locations of the registers in the same mode When the I O register file is actually used the BaseAddress value is subtracted from the defined register address and the resultant offset added to the relevant base address for the selected mode Each module has a section that defines the registers forming it along with an optional dependency the dependency is checked to see if the module is enabled or not Each register name must be defined in the section and the numbering
65. asciacdusssonsooccsondnsasedeacaniasesuasnestousesooosceentadaseirteeasaeseesecosebaoeats 7 3 1 COMPILING FOR DEBUG oueienn eanan EA AEE EEEE EAT ELAI AEAEE NEATE A 7 3 2 SELECTING A DEBUGGING PLATFORM ii di 3 3 CONFIGURING THE DEBUGGING PLATFORM ii 8 3 9 1 SElUp anandia lla 8 382 Mapping rit 8 3 38 Stalin enable LE alli lied 10 3 4 DOWNLOADING A PROGRAM cesseeeaeeseeeaeceeeaeceaeeaeen ceaeenseeaeenaes 12 4 LOOKING AT YOUR PROGRAM ssssssssssssscsscscsecscsecscsesscsesecsesecesssecseseseesesecsesecsesecsesecssrseseese 15 451 VIEWING THE CODE suit 15 4 1 1 Viewing Source Gode di N 15 4 1 2 Viewing Assembly Language Code ii 16 4 1 3 Modifying Assembly Language Code i 17 42 LOOKING AT LABELS ori OR Lala ELL 17 42 11 Listing LADA Si aaa adagia 18 4 2 2 Adding a Label from a Source or Disassembly WindoW ii 18 4 3 LOOKING AT A SPECIFIC ADDRESS i 19 4 3 1 Looking at the Current Program Counter Address iii 20 44 FINDING TE Toco ia iii Lei Redes 20 5 WORKING WITH MEMORY ssersrrererreereriererieee nie sereniorenioneeneereseeeeneeee resin re nione sione nmeninsenineeneonee 21 5 1 LOOKING AT AN AREA OF MEMORY i 21 5 1 1 Displaying Memory as ASCII iii 22 5 1 2 Displaying Memory as Bytes
66. b format The symbol file extension default is SYM If the file name already exists then a prompt to overwrite the file is displayed Syntax ss lt filename gt Parameter Type Description lt filename gt String File name Example SYMBOL_SAVE TEST Saves symbol table to TEST SYM SS MY_CODE SYM Saves the symbol table to MY_CODE SYM SYMBOL_VIEW Abbreviation SV Description Displays all defined symbols or those containing the case sensitive string pattern Syntax sv lt pattern gt Parameter Type Description none Displays all symbols lt pattern gt String Displays the symbols including the specified string pattern Example SYMBOL_VIEW BUFFER Displays all symbols containing the word BUFFER SV Displays all the symbols Appendix B Command Line Interface 143 TRACE Abbreviation TR Description Displays the trace buffer contents If no trace delay is set the last most recently executed cycle in the buffer is 0 and older cycles have negative values If trace delay is set the cycle on which the level 1 breakpoint occurred will be 0 and the most recent cycle will have the trace delay value Syntax tr lt start rec gt lt count gt Parameter Type Description lt start rec gt Numeric Offset optional default most recent cycle 9 lt count gt Numeric Count optional default 10 Example TRO5 Displays five lines of trace buffer contents starting from the beginning of the buffer 144 Hitachi De
67. bali aio ce di ala ile lina 110 18 19 3 Toggle Bilbo aiii lada dat da al 110 19414 1 SOURCE da di SAIN e ee Luna Lon e na Ai ale 110 TEEN GODI oie Oi Eel Baas aid a Torrini ii Maeda hal ba ha e HU al rea iii elia 111 ERE o AAA A A CA 111 19 1473 SOLAS do e e enla E 111 ERES ET AAA A A A ait secon A 112 19 14 5 GOTOCUFSON Direi iii 112 13 14 6 SCEPC gt Lhe luna A i a dana 112 19 147 Instant Watchi gt 5 forca here 112 19 14 58 Add Wate diaconi lla 112 13 14 9 GO TO Disassembly scrote EROE Rae a 112 13 15 SYSTEM STATUS A e Ri anita 113 TSTST DOAI ia da 113 ES CODY A 114 13 16 TRACE ud terra Ol need dd ro dedos la e ad dy a a nt 114 1E Eea A SEEE A10 EAE e AE E 114 TEE A EAER 1010 AN 29 4 0 AE TI E N Fn 114 EAS A die ana 114 19 16 4 ACQUISINON o aeniea ea E aiii 115 19 10 5 Haltm at een a TEE le eg ein die 115 TITO OSA eni 115 13516 7 SNADSAOE sees SON LIRA 115 A CIO aos sete rte ets Perc tes en tea ah tech dose afta et e N e AE 115 TETONA tt ii int to ei 115 13 16 10 VICW QUIE oriali ano aa a n 115 13 16 11 Tri SOUTCO ins A ogc a wa egos ie Cart pan dated Dil eg 115 13 17 NT 116 VBA COVA AA EA da IS 116 BARA DO a ala tee neues 116 13179 Delete Alla elo e Gl E ei 116 13 17 4 AQ Mae a dt 117 13 15 EH VAIUC o 117 VIAL A ia 117 APPENDIX A SYSTEM MODULEG ccccccssssssssssssecesccsscsscscsscccsscesccesscecssscessessccescessesssecsssessecseeseees 119 APPENDIX B COMMAND LINE INTERFACE
68. bugging Interface User Manual Debugging Platform Specific Commands The following lists the debugging platform specific commands typically for breakpoints tracing memory mapping and configuration Refer to the separate Debugging Platform User s Manual for details ANALYSIS_RANGE BREAKPOINT BREAKPOINT_CLEAR BREAKPOINT_ DISPLAY BREAKPOINT_ENABLE BREAKPOINT_SEQUENCE BREAK_ACCESS BREAK_CLEAR BREAK DATA BREAK DISPLAY BREAK ENABLE BREAK_REGISTER BREAK _ SEQUENCE CLOCK DEVICE_TYPE MAP_SET MODE REFRESH TEST_EMULATOR TIMER TRACE_ACQUISITION TRACE_COMPARE TRACE_SAVE TRACE_SEARCH USER_SIGNAL Appendix C Command Line Summary Chart 145 Appendix C Command Line Summary Chart Long name ACCESS ANALYSIS ANALYSIS_RANGE ANALYSIS_RANGE_ DELETE ASSEMBLE ASSERT BREAKPOINT BREAKPOINT_CLEAR BREAKPOINT_ DISPLAY BREAKPOINT_ENABLE BREAKPOINT_SEQUENCE CLOCK DEVICE_TYPE DISASSEMBLE ERASE EVALUATE FILE_LOAD FILE_SAVE FILE_VERIFY GO GO_RESET GO_TILL HALT HELP INITIALISE INTERRUPTS LOG MAP_DISPLAY MAP_SET MEMORY_DISPLAY MEMORY_EDIT MEMORY_FILL MEMORY_MOVE MEMORY_TEST MODE QUIT RADIX REFRESH REGISTER_DISPLAY REGISTER_SET RESET AC AN AR AD AS BP BC BD BE BS CK DE DA ER EV FL FS FV GO GR GT HA HE IN IR LO MA MS MD ME MF MV MT MO QU RA RF RD RS RE Short name Description Comment Sets action on illegal access Enables or disables
69. c4 Figure 13 30 Watch Window Allows the user to view and modify C C source level variables The contents of this window are blank unless the current user program can be associated to a C C source file via the debugging information available in the absolute file abs 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 A popup menu containing the following options is available by right clicking within the windows 13 17 1 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 13 17 2 Delete Removes the variable indicated by the text cursor not the mouse cursor from the Watch window 13 17 3 Delete All Removes all the variables from the Watch window Section 13 Windows 117 13 17 4 Add Watch Launches the Add Watch dialog box allowing the user to enter a variable or expression to be watched 13 17 5 Edit Value Launches the Edit Value dialog box allowing the user to change the variable s value Particular care should be taken when the value of a pointer is changed as it may no longer point to valid data 13 17 6 Radix Modifies the radix for the selected watch item display 118 Hitachi Debugging Interface User
70. ce User Manual 13 15 2 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 13 16 Trace Index Time Addr Data RW Map IO Label Mnemonic 3 00 00 00 0000000 0000 0000 RD ROM 00 2 00 00 00 0000020 1000 7a07 IF ROM 00 startup_StartUp DATA W H 7iMOV L H FFFBFC S 1 00 00 00 0000040 1002 O0ff IF ROM 00 DATA W H Ol 0 00 00 00 0000060 1004 fbfc IF ROM 00 MOV B H Figure 13 29 Trace Window Allows the user to view the sequence of instructions leading up to the debugging platform s current status The exact view will depend on the selected debugging platform Double clicking on a row will open the Source or Disassembly view for the address When mouse s right button is clicked in the window the pop up menu is displayed The following options are included in this menu 13 16 1 Find Launches the Trace Search dialog box allowing the user to search the current trace buffer for a specific trace record 13 16 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 13 16 3 Filter Launches the Filter Trace dialog box allowing the user to mask out all unnecessary trace entries Section 13 Windows 115 13 16 4 Acquisition Launches the Trace Acquisition dialog box allowing the user to define the area of user program to be traced This
71. ce between the module DLLs and the host file system 1 e the PC Object DLL When creating the user program a compiler will generate an absolute object file This file contains the actual machine code and data that the microcomputer processes to execute the functions making up the target application In order to debug the user program as original source code the compiler must provide more information to the debugger For this reason nearly all compilers have a debug option that puts all the information necessary for debugging your source code into the absolute file which is usually called a debug object file The object DLL extracts this information from the object file for display to the user Since the format of data is compiler dependent more than one object DLL may be present in the HDI directory HDI will try each in turn until it finds one that can understand the object file s format CPU DLL The CPU DLL module contains information specific to the target microcomputer For example it contains the number and types of registers available to the microcomputer It also translates the raw machine code in the target into more familiar assembly language mnemonics displayed in the Source window and vice versa Target DLL The target DLL informs HDI about the debugging platform s capabilities and selects the correct CPU DLL Since some capabilities of the debugging platform cannot be generic for example target configuration the
72. ction can be made Directory and drive navigation is possible using the standard windows file open dialog box controls to the right of the file list Alternatively the file name can be typed into the File name field directly The OK button will return to the Load Program dialog box with the File name field set to the path and file name of the program you selected in the Browser dialog box Clicking the Open button after selecting a file will initiate the downloading During the download HDI will report progress on the status bar 14 Hitachi Debugging Interface User Manual Section 4 Looking at your program 15 4 Looking at Your Program Note This section describes how to look at your program as source code and assembly language mnemonics HDI s facilities for dealing with code and symbol information are explained and you will be shown how to look at text files in the user interface After a break occurs HDI displays the location of the program counter PC In some cases for example if a SYSROF based project is moved from its original path then the source files may not be automatically found In this case HDI will try a list of paths previously used for this session If still unable to locate the source file then you can open the source file in the View gt Source menu dialog box It allows you to manually locate the file this path will then be added to the internal source path list for future reference 4 1 Viewing t
73. cursor not the mouse cursor 13 3 5 Instant Watch Launches the Instant Watch dialog box with the name extracted from the view at the current text cursor not mouse cursor position Only valid in the selected source column 13 3 6 Add Watch Adds the name extracted from the view at the current text cursor not mouse cursor position to the list of watched variables If a Watch window is not open then it is opened and brought to the top of the child windows Only valid in the selected source column 88 Hitachi Debugging Interface User Manual 13 4 I O Registers Power Down Mode Registers DMA Channel Common DMA O Short Address Mode DMA 0 Full Address Mode DMA 1 Short Address Mode DMA 1 Full Address Mode Data Transfer Control 16 Bit Timer Pulse Unit 16 Bit Timer 0 16 Bit Timer 1 OOFFFFEO TCRI OOFFFFE1 TMDRI DOFFFFEZ2 TIORI O IOA 4 IOB OOFFFFE4 TIERI Figure 13 4 1 0 Registers Window Allows the user to view and control the user system hardware s on chip peripherals The peripherals are organized by modules and the level of displayed detail can be changed with a indicating that the information may be expanded by double clicking on the register name and a indicating that the information may be collapsed Double click on the and character or use the plus and minus keys to expand and contract the register information A popup menu containing the following options is available by right
74. d and must start with a character Example on next page Appendix E IO File Format 153 Example Comment DI Bred Sau he 4 H8S 2655 Series I O Register Definitions File Modules FilVersion 2 Modules BaseAddress 0 Modulel Power_Down_Mode_Registers Module2 DMA_ Channel Common Module3 DMA_0_Short_Address_Mode Module42 Bus_Controller Module43 System Control Module44 Interrupt_Controller Module DMA_Channel_Common definition reg0 regDMAWER regl regDMATCR reg2 regDMABCRH SAM reg3 regDMABCRL SAM reg4 regDMABCRH FAM reg5 regDMABCRL FAM dep regMSTPCRH 7 0 Register Bit Value Register s definition regDMAWER 1d DMAWER Oxffff00 B A H dmawer_bitfields Register name ne MI Address Size Absolute address flag Format Bitfields Bitfields definition dmawer_bitfields bit0O WEOA bit1 WEOB bit2 WE1A bit3 WE1B 154 Hitachi Debugging Interface User Manual Appendix F Appendix F Symbol File Format Symbol File Format 155 In order for HDI to be able to understand and decode the symbol file correctly the file must be formatted as a Pentica B file 1 The file must be a plain ASCII text file 2 The file must start with the word BEGIN 3 Each symbol must be on a separate line
75. d functions If a stack information file sni extension output from the optimizing linkage editor does not exist unexecuted functions are not displayed even if this checkbox is not checked The Include Data of Child Function s checkbox sets whether to display information for a child function which is called in the function as profile data Section 13 Windows 103 13 11 Profile Tree Notes 1 Profile Tree 1 0 x Function Address Size Stack Size Times Cycle Application H 00000000 H 00000044 H 0000003A H 0000028E H 00000000 H 00000000 H 000001E6 H 00000048 H 00000034 H 00000044 H 0000013C H D0000014 Figure 13 20 Profile Tree Window The Profile Tree window allows the user to view the relation of function calls in a tree structure The Profile Tree window also displays the address size stack size of each functions number of function calls and profile data The stack size number of function calls and profile data are values when the function is called 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 The contents of profile data depend on debugging platform For details on profile data refer to the Debugging Platform User s Manual When there is no stack information file sni extension which is outpu
76. d profile data Section 12 Menus 77 12 3 10 Profile Tree 12 3 11 12 3 12 12 3 13 12 3 14 12 3 15 Opens the Profile Tree window allowing the user to view the relation of function calls in a tree structure The Profile Tree window also displays the address size and stack size of each function number of function calls and profile data The stack size number of function calls and profile data are values when the function is called Registers Opens the Registers window allowing the user to view all the current CPU registers and their contents Source Launches the Open dialog box allowing the user to enter a file name of the source file in either C C or assembly language format to view If the source file is not included within the current program or there is no debugging information for the file within the absolute abs file then the message Cannot load program No Source level debugging available is displayed Status EJ Opens the System Status window allowing the user to view the debugging platform s current status and the current session and program names Trace Opens the Trace window allowing the user to see the current trace information Watch Opens the Watch window allowing the user to enter C C source level variables and also view and modify their contents 12 4 Run The Run menu controls the execution of the user program in the debugging platform 12 4 1 Reset CPU Bij Reset
77. dow 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 can be piped out to a log file allowing automatic tests to be performed 76 Hitachi Debugging Interface User Manual 12 3 3 Disassembly Launches the Set Address dialog box allowing the user to specify the memory block position that you wish to view in the Disassembly window 12 3 4 I O Area x Opens the I O Registers window allowing the user to control the user systems on chip input output functionality e g an interrupt controller 12 3 5 Labels Launches the Labels window allowing the user to manipulate the current program s symbols labels 12 3 6 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 12 3 7 Memory Launches the Open Memory Window dialog box allowing the user to specify a memory block and view format to display within a Memory window 12 3 8 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 12 3 9 Profile List Opens the Profile List window allowing the user to view the address and size of a function or a global variable the number of times the function is called an
78. e placed at the last position that you moved it to When you have many minimized windows as icons the display can look rather messy To tidy up the icons choose the Window gt Arrange Icons menu option The icons will be arranged in order from the bottom left of the application window ES Hitachi Debugana interface E6000 H8S 2600 Emulator Ele Edit View Fun Memory Setup Window Help ema 105607 BAr AAA wae Aglio oe o x yy aA E SE Disassembl jol x Byte CENT OA Ol x a a a A q Ri bai E E For Help press PE MN YZ Figure 11 3 Icons Before Arrangement Section 11 Configuring the user interface 61 jemmoo 008 CERO FAO RES fa a fa dh ee fa ee 3 Registers OA O xl a Byte Memo Ed Disassembl ajoj x Trace 0 0 2 0 x For Help press F1 __ NUM 4 Figure 11 4 Icons After Arrangement 11 1 3 Tiling Windows After some heavy debugging you may find that you have many windows open on the screen You can arrange all the windows in a tile format with none of them overlapping each other using the Tile function by choosing the Window gt Tile menu option All currently open windows are arranged in a tile format Windows that are minimized to icons are not affected 11 1 4 Cascading Windows Open windows can also be arranged in a cascading format with only their left and top border visible under the window in front of them by choosing the Window gt
79. e ri iii iii ariani 44 8 3 1 Adding a Watch rar nar nn rra rnn rn cenar nn rn nr rra rn arar nn rra rnnnnnnrn 44 8 3 2 Expanding a Watch i 46 8 3 3 Modifying Radix for Watch Item Display iii 46 8 3 4 Changing a Watch ltem s ValUe iii 46 8 3 5 Deleting a Watch iiiee eee eee 47 8 4 LOOKING AT LOCAL VARIABLES iii 47 8 5 LOOKINGATREGISTERS ii 48 8 5 1 Expanding a Bit Register iii 49 8 5 2 Modifying Register CONntentSs iii 49 8 5 3 Using Register Contents caida ite Ritiene 51 8 0 LOOKING AT I O cuco tiles 51 8 6 1 Opening an I O Registers WiNdoW one rna rn rnnrnonarnans 51 8 6 2 Expanding an I O Register Display ii 52 8 6 3 Modifying VO Register Contents ii 53 9 OVERLAY FUNCTION einans e Rini across iano i 55 9 1 DISPLAYING SECTION GROUP nrerin iaia 55 9 2 SETTING SECTION GROUP oiire ini OEE AREKEA EEEE AE O Eaa 56 10 SELECTING FUNCTIONS ccccossecsocscessssesssconiiovoconssenseatorsacoracesessonssersqversnsvessoniessesessaseesenossosssseoabeossons 57 10 1 DISPLAYING FUNCTIONS ccoo 57 10 2 SPECIFYING FUNCTIONS euii rir Ta A iia 58 10 2 1 Selecting 2 RUNCIION A Ai Be 58 10 2 2 Deleting a Function iii 58 1023 Seting a FUNCION oi al A AAN 58 11 12 CONFIGURING THE US
80. ebugging platform In the example shown in figure 7 2 two types of circles are used but this display also depends on the debugging platform For details on debugging platform specific breakpoints see the separate Debugging Platform User s Manual 7 3 2 Modifying a Breakpoint Note To edit an existing breakpoint in the Breakpoints window select the breakpoint in the list by double clicking or by clicking on the line corresponding to it and choose Edit menu option from the popup menu A dialog box for setting breakpoints will open in which you can change the type and parameters of the selected breakpoint A dialog box for setting breakpoints is specific to the debugging platform you have selected Its appearance and operation depend on the breakpoint features available in the debugging platform For details on debugging platform specific breakpoints see the separate Debugging Platform User s Manual 7 3 3 Deleting a Breakpoint To delete an existing breakpoint in the Breakpoints window select the breakpoint in the list by clicking on the line corresponding to it and choose the Delete menu option from the popup menu The breakpoint is deleted and the window is updated 7 3 4 Deleting All Breakpoints To delete all of the breakpoints listed in the Breakpoints window choose the Delete All menu option from the popup menu All breakpoints are deleted and the window is cleared Section 7 Stopping your program 39 7 4
81. en the Breakpoints window choose the View gt Breakpoints menu option or click the Breakpoint Window toolbar button if it visible A Breakpoints window opens Breakpoints DEE Header bar Breakpoint Enable File Line Symbol Type disabled TUTORIAL C 36 00001030 Type PC TUTORIAL C 42 00001042 Type PC _Temp Name 0000EC00 Type Read enabled ni Figure 7 2 Breakpoints Window The window displays a list of the breakpoints set in the system The breakpoint list is divided horizontally into five columns Enable File Line Symbol Address and Type The respective widths of each of the columns can be adjusted by clicking and dragging on the dividing line between each column title in the header bar The cursor will change to and a vertical line will be displayed at the dividing line of the columns Release the mouse button when you are satisfied with the column width and the display will be updated with the new column width 7 3 1 Adding a Breakpoint You can add a new breakpoint in the Breakpoints window by choosing the Add menu option from the popup menu A dialog box for setting breakpoints will open in which you can enter the type and parameters of the new breakpoint 38 Hitachi Debugging Interface User Manual Note A dialog box for setting breakpoints is specific to the debugging platform you have selected Its appearance and operation depend on the breakpoint features available in the d
82. enu option from the popup menu The Test Memory dialog box opens Test Memory Ea Begin EN H FFECOO Figure 5 8 Test Memory Dialog Box 28 Hitachi Debugging Interface User Manual The start address and end address specified in the Memory window will be displayed in the Begin and End fields Click the OK button or press Enter the dialog box closes and HDI will perform a test on the memory range 5 7 Saving an Area of Memory You can save an area of memory in the address space to a disk file using the save memory feature Open the Save Memory As dialog box by choosing the Memory gt Save menu option from the popup menu Save Memory As x Start End 5H Cancel File name c Ahdi tutorial h amp sktutorial mot Browse Figure 5 9 Save Memory As Dialog Box Enter the start and end addresses of the memory block that you wish to save and a file name The File name drop list contains the previous four file names used for saving memory or a standard Save As dialog box can be launched by clicking the Browse button Specify the directory name and the file name By clicking the Save button or pressing Enter the dialog box closes and the memory block will be saved to the disk as a Motorola S Record format file When the file save is complete a confirmation message box may be displayed this can be switched off in the Confirmations tab on the HDI Options dialog box 5 8 Loading an Area of Memory To lo
83. eparate Debugging Platform User s Manual When there is no stack information file sni extension which is output by the optimizing linkage editor and the profile data is acquired only the executed functions and accessed variables will be displayed For details on the stack information file refer to the separate User s Manual for the SuperH RISC engine C C Compiler Assembler and Optimizing Linkage Editor 100 Hitachi Debugging Interface User Manual 13 10 1 13 10 2 13 10 3 13 10 4 You can view data sorted either alphabetically or by address value by clicking on the respective column heading Double clicking a function in the Function column expands or reduces the tree structure display Double clicking the Address column displays the source program or disassembled memory contents corresponding to the specific address Right clicking on the mouse within the window displays a popup menu Supported menu options are described in the following sections View Source Displays the source program or disassembled memory contents for the address in the selected line If a line of a global variable is selected this menu option is displayed in gray characters View Profile Tree Displays the Profile Tree window View Profile Chart Displays the Profile Chart window focused on the function in the specified line Enable Profiler Toggles the collection of profile data When profile data acquisition is active a check mark
84. er 1 Select the file group from the File drop list 2 Click the Add button to open the Add Filter dialog box The dialog box title will display the file group that is being changed The edit controls on this dialog box are limited to accept only valid characters 3 Enter a name for the filter type and the extensions you want to use for the filter Note If the filter type entered matches an existing type then the filter for the existing type will be changed to the newly entered filter To remove a filter 1 Select the file group from the File drop list 2 Select the file type name from the Type drop combo 3 The file type will be removed when the Delete button is clicked 68 Hitachi Debugging Interface User Manual 11 7 Saving a Session Note If you have downloaded user program into the debugging platform have the corresponding source files displayed and a number of auxiliary windows open then it can take some time to setup this information the next time the program is loaded To help with this HDI can save the current settings to a file If you are already using a named session or want to create a session with the same name as the current object file choose the File gt Save Session menu option To save the current setting under a new name choose the File gt Save Session As menu option This will launch a common file dialog box prompting you for a file name Up to three files are saved an HDI se
85. eshed to show the latest information from the user system 11 9 Setting HDI Options There are a number of settings available to help you to use the HDI interface Choosing the Setup gt Options menu option will launch the HDI Options dialog box HDI Options Ea Session Confirmation Viewing On Exit Save session automatically Prompt for save session Quit without asking IT Load last session on startup Figure 11 11 HDI Options Session Dialog Box The On Exit group of radio buttons automates saving the current session when the program is shut down e Save session automatically this will save the session information in the current session file If there is no current session file then you will be prompted to enter an HDI session file name e Prompt for save session this will always ask you if you want to save the current session when the program shuts down If you select Yes then the session information is saved in the current session file If there is no current session file then you will be prompted to enter a session file name e Quit without asking this shuts down the program and does not prompt you nor save the current session information Check the Load last session on startup checkbox if you want to automatically load the last saved session the next time the program is started 70 Hitachi Debugging Interface User Manual HDI Options Ea Session Confirmation Viewing
86. ew 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 13 12 4 View Profile List Displays the Profile List window 13 12 5 View Profile Tree Displays the Profile Tree window 13 12 6 View Profile Chart Displays the Profile Chart window for the specific function on which the cursor is placed when the right side button of the mouse is clicked If the cursor is not placed on a function when the right side button is clicked this menu option is displayed in gray characters 13 12 7 Enable Profiler Toggles the collection of profile data When profile data acquisition is active a check mark is shown to the left of the text Profile data and performance analysis data cannot be acquired at the same time If the profile data acquisition is enabled when the performance analysis data acquisition is active when the Enable Analysis checkbox in the Performance Analysis window is checked a warning message box is displayed Performance Analysis is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If you continue and enable Profiling Performance Analysis will be disabled This will delete your current Performance Analysis data if C
87. f memory to test for correct read write operation The exact test is target dependent However in all cases the current contents of the memory will be overwritten YOUR PROGRAM AND DATA WILL BE ERASED 80 Hitachi Debugging Interface User Manual 12 5 6 Fill Launches the Fill Memory dialog box allowing the user to fill a block of the debugging platform s memory with a specified value see section 12 5 3 Save 12 5 7 Copy Launches the Copy Memory dialog box allowing the user to copy a block of the debugging platform s memory to an address within the same memory area The blocks may overlap in which case any data within the overlapped region of the source block will be overwritten The start and end fields may be set similarly to the Save option see section 12 5 3 Save 12 5 8 Compare Launches the Compare Memory dialog box allowing the user to select a start address and an end address in the memory area to check against another area in memory see section 12 5 3 Save 12 5 9 Configure Map Opens the Memory Mapping window allowing the user to view and if supported edit the debugging platform s current memory map In some debugging platforms the Memory Map dialog box will open 12 5 10 Configure Overlay Launches the Overlay dialog box When the overlay function is used the target section group can be selected in the dialog box 12 6 Setup The Setup menu is used to modify the settings of the
88. ged to match the user s requirements 12 6 5 Configure Platform 14 Launches a set up dialog box specific to the selected debugging platform Refer to the separate Debugging Platform User s Manual for more detail about the options available in the dialog box 12 7 Window The Window menu modifies the display of currently open child windows The following menu options are always displayed and a numbered list of current child windows will be appended the topmost child window will have a check mark 82 Hitachi Debugging Interface User Manual 12 7 1 Cascade Arranges the child windows in the standard cascade manner i e from the top left such that the title bar of each child window is visible 12 7 2 Tile Arranges the child windows in the standard tile manner i e sizes each window such that all are displayed without overlapping 12 7 3 Arrange Icons Lines up any iconized windows neatly along the bottom of the parent frame in the standard manner 12 7 4 Close All Closes all the child windows 12 8 Help The Help menu accesses additional information on how to use the functionality provided by HDI 12 8 1 Index la Opens the main help file at the index 12 8 2 Using Help Opens a help file allowing the user to find out how to use Windows hypertext help system 12 8 3 Search for Help on Opens the main help file and launches the Search dialog box allowing the user to enter and browse through the file s
89. gory will be displayed to the right Click on a button operation option in the list and you will see a description of the button s operation in the Description field 11 4 4 Adding a Button to a Toolbar To add a button to a toolbar 1 Select the button category from the button category list 2 Select the button item from the operation list Section 11 Configuring the user interface 65 3 Drag the button from the dialog box to the toolbar location you wish to add the new button The button is inserted into the toolbar 11 4 5 Positioning a Button in a Toolbar To move a button position in a toolbar 1 Select the button in a toolbar 2 Drag the button to the new position in the toolbar or another toolbar Note Holding down the Ctrl key while dragging will copy the button 11 4 6 Removing a Button from a Toolbar To remove a button in a toolbar 1 Select the button in a toolbar 2 Drag the button out of the toolbar anywhere into the main frame 11 5 Customizing the Fonts You can customize the display font for text style windows e g Source and Memory windows or change the default font that is used when a new window is opened 66 Hitachi Debugging Interface User Manual To change the display font choose the Setup gt Customize gt Font menu option This will launch the Font dialog box Font x Eont Font Style Size ox Regular Mi foga Cancel Italic 12 Fixedsys a Tr MS LineDraw Bold
90. he Cancel button closes the dialog box without storing the priority setting Within the address range used by the overlay function the debugging information for the section specified in the Overlay dialog box is referred to Therefore the same section of the currently loaded program must be selected in the Overlay dialog box Section 10 Selecting functions 57 10 Selecting Functions When selecting overloaded functions or member functions that can be used in C programs follow the description in this section 10 1 Displaying Functions Use the Select Function dialog box to display overloaded functions and member functions A function can be selected in the following cases e When setting a breakpoint e When specifying a function in the Run Program dialog box e In the Set Address dialog box for opening the Source window e In the Set Address dialog box for opening the Memory window e When adding or modifying a symbol e When specifying a function for performance analysis When multiple functions have the same specified function name or when a class name including a member function is specified the Select Function dialog box opens Select Function Xx Select Function Name Set Function Name Sample Func short char Func long char Sample Func long char int Differ Func short char Differ Func long char gt PEEL lt Counter All Function Select Function Set Function 5 Functions
91. he Code 4 1 1 Viewing Source Code Header bar Breakpoint Source code Address field To look at your program s source choose the View gt Source menu option use the Ctrl K accelerator or click on the Source Window toolbar button fol Select your source file and click Open HDI opens a Source window SE Tutorial c ine Address BP Label Source 00001012 _main void main void 29 E 31 00001018 1f MDCR BIT MDS 0x6 32 qe printf Sele return 1f SYSCR BYTE 0x01 36 00001030 SYSCR BYTE Ox1 00001038 BCRL BIT EAE 0 00001040 STOP _MODE y Figure 4 1 Source Window 16 Hitachi Debugging Interface User Manual The Source window is divided into two areas the header bar area and the main window area and split vertically into five columns Line Address BP Breakpoint Label and Source The respective width of each column can be adjusted by dragging the dividing line between each column title in the header bar The cursor will change to and a vertical line will be displayed where the dividing line of the columns will be Release the mouse button when you are satisfied with the column width and the display will be updated with the new column width 4 1 2 Viewing Assembly Language Code If you have a source file open right click to open the popup menu and select Go to Disassembly to open a Disassembly window at the same address as the current
92. he address matching the current source line Section 13 Windows 113 13 15 System Status status Target Device Configuration H88 2xxx Advanced mode ROM 00000000 000FFFFF RAM DOFFOODO DOFFFFFF System Memory Resources Loaded Memory Areas No information 00001412 00000000 00000064 00000120 00000148 00000444 00001000 00001492 00001490 00000003 00000067 00000123 00000148 00000445 00001411 00001445 Session A Platform Memory Events fd Figure 13 28 System Status Window Allows the user to view the current status of the debugging platform See the supplied Debugging Platform User s Manual for more information The System Status window is split into four panes 1 Session contains information about the current session including the connected debugging platform and the names of loaded files 2 Platform contains information about the current status of the debugging platform typically including CPU type and operating mode run status and timing information 3 Memory contains information about the current memory status including the memory mapping resources and the areas used by the currently loaded object file 4 Events contains information about the current event breakpoint status including resource information A popup menu containing the following options is available by right clicking within the window 13 15 1 Update Updates the displayed data 114 Hitachi Debugging Interfa
93. he source file and any changes will be lost at the end of the session Label Launches the Label dialog box allowing the user to enter a new label or to clear or edit the name of an existing label Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking The currently selected standard breakpoint is shown by a check mark to the left of the menu text A popup menu containing the following options is available by right clicking within the window but outside the BP column Section 13 Windows 87 13 3 1 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 13 3 2 Set Address Launches the Set Address dialog box allowing the user to enter a new start address The window will be updated so that this is the first address displayed in the top left corner When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function 13 3 3 De To Cursor Commences to execute the user program starting from the current PC address The program will continue to run until the PC reaches the address indicated by the text cursor not the mouse cursor or another break condition is satisfied Grayed if not supported by the debugging platform 13 3 4 Set PC Here Changes the value of the PC to the address indicated by the text
94. heck mark is shown to the left of the text Profile data and performance analysis data cannot be acquired at the same time If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active Enable Profiler is checked in the Profile List window Profile Tree window or Profile Chart window the following warning message is displayed Section 13 Windows 99 A Profiling is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If you continue and enable Performance Analysis Profiling will be disabled This will delete your current Profiling data Cancel Figure 13 16 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When OK is clicked the performance analysis data acquisition is enable and the profile data acquisition is disabled 13 10 Profile List Note Profile List OP DI x Address H 00000000 H 00000044 H 000001E6 H 0000028E H 000002C6 H 000002EC H 00000304 H 00000340 Size H 00000044 H 00000136 H 00000048 H 00000000 H 00000000 400000000 H 00000000 H 00000000 Figure 13 17 Profile List Window This window displays the address and size of functions or global variables the number of times the function is called or the global variable is accessed and profile data The types of profile data depend on the debugging platform For details on profile data refer to the s
95. hoose the Double float menu option from the popup menu and the display will be updated to show the area of memory as double precision floating point data 5 1 7 Looking at a Different Area of Memory If you want to change the area of memory that the Memory window is displaying you can use the scroll bars To quickly look at a new address you can use the Set Address dialog box This can be opened either be choosing the Set Address menu option from the popup menu or by double clicking in the Address column Set Address Ed _main a Figure 5 3 Set Address Dialog Box Enter the new address value and click OK or press Enter The dialog box closes and the Memory window display is updated with the data at the new address When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function For details refer to section 10 Selecting Functions 5 2 Modifying Memory Contents There are two ways that you can change the contents of memory at an address 1 Quick edit method allows you to enter values by typing directly into the window but is limited to ASCII when displaying ASCII format or hexadecimal values only when displaying all other formats 2 Full edit method uses a dialog box to enter values In this method floating point or evaluated expressions can be supported 24 Hitachi Debugging Interface User Manual 5 2 1 Quick Edit The quick way to change the co
96. i 70 Setting RadiX oneer seca AEREE T a IT EE ode E 71 MEUS iaia la A 73 Breakpomts Window xs regala nine ide ANI gie iii 83 Command Line Window lidia BA 84 Disassembly Window iam iii illa a 86 W O Registers Window aio label Aia aa ile 88 Labels Window A ia Re ay 89 Add Label Dialog Box ea A LORI scale 90 EditLabelDialos Box A lionel 90 Find Label Containing Dialog BOX i 91 Message Box for Confirming Label Deletion cece cecceeeeeceseseeeeseeseeeaeeneeseeseesaeens 91 Message Box for Confirming All Label Deletion ii 92 Load Symbols Dialog BOX sne heien annaa Ialia 92 Eocals Window carrai iii A E E E 93 Memory Mapping Window scenici ii 94 Memory Windowsra iena eil al ited eek aaa allea ia 95 Performance Analysis Window ii 97 Figure 13 16 Figure 13 17 Figure 13 18 Figure 13 19 Figure 13 20 Figure 13 21 Figure 13 22 Figure 13 23 Figure 13 24 Figure 13 25 Figure 13 26 Figure 13 27 Figure 13 28 Figure 13 29 Figure 13 30 Figure A 1 xi Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time 99 Profile L1st Wind Wii daa beat eee 99 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time 100 Setting Profile List Dialog BOX ee eeceeceseee ceseeeseeseeeeeeseceeeeseceeeae seseseeaecesesaesaesnseeatenss 102 Profile Tree Window iapaniela idad edi 103 Wa
97. i Debugging Interface User Manual 13 1 4 Delete All Removes all breakpoints from the list 13 1 5 Disable Enable Only enabled if a breakpoint is selected Toggles the selected breakpoint between enabled and disabled when disabled a breakpoint remains in the list but does not cause a break when the specified conditions are satisfied When a breakpoint is enabled a circle is shown in the Enable column for the breakpoint 13 1 6 Go To Source Opens Source or Disassembly window at address of breakpoint 13 2 Command Line Lal gt a a x a gt rs pc _main Figure 13 2 Command Line Window Allows the user to control the debugging platform by sending text based commands instead of the window menus and commands It is useful if a series of predefined commands need to be sent to the debugging platform by calling them from a batch file and optionally recording the output in a log file The command can be executed by pressing Enter after the command is input to the text box Or the Enter button in the right of the text box is clicked For information about the available commands refer to the on line help If available the window title displays the current batch and log file names separated by colons Section 13 Windows 85 The functionality of the toolbar buttons is identical to the popup menu options shown below 13 2 1 Run Batch File Launches the Run Batch File dialog box allowing the user to enter the name of
98. in the Set Function Name list box click the lt lt button 10 2 3 Setting a Function Click the OK button to set the functions displayed in the Set Function Name list box The functions are set and the Select Function dialog box closes Clicking the Cancel button closes the dialog box without setting the functions Section 11 Configuring the user interface 59 11 Configuring the User Interface When we designed the user interface for HDI we tried to make all the frequently used operations quickly accessible and have related operations grouped in a logical order However when you are in the middle of a heavy debugging session you may find it more useful to have a different arrangement of the user interface items or you may just have a personal preference for the way you want it arranged We realize this and so HDI allows you to customize the user interface so that you can be satisfied with the tool that you are using for debugging your program This section describes how you can arrange the user interface windows customize various aspects of the display and save the configuration 11 1 Arranging Windows 11 1 1 Minimizing Windows If you have temporarily finished using an open window but want to be able to look at it in its current state later you can reduce it to an icon This is called minimizing the window To minimize a window either click on the minimize button of the window or choose the EJ gt Minimize window me
99. in the child windows and debugging platform 12 2 1 Cut Only available if a block is highlighted in a child window whose contents can be modified This will remove the contents of the highlighted block from the window and place it on the clipboard in the standard Windows manner Section 12 Menus 75 12 2 2 Copy Only available if a block is highlighted in a child window This will copy the contents of the highlighted block to the clipboard in the standard Windows manner 12 2 3 Paste Only available if the contents of the child window can be modified This will copy the contents of the Windows clipboard into the child window at the current cursor position 12 2 4 Find Only available if the window contains text This will launch the Find dialog box allowing the user to enter a word and locate occurrences within the text If a match is found the cursor will move to the start of the word 12 2 5 Evaluate Launches the Evaluate dialog box allowing the user to enter a numeric expression e g pc 205 2 and display the result in all currently supported radices 12 3 View The View menu is used to select and open new child windows If the menu option is grayed then the features provided by the window are not available with the current debugging platform 12 3 1 Breakpoints Opens the Breakpoints window allowing the user to view and edit current breakpoints 12 3 2 Command Line a Opens the Command Line win
100. is shown to the left of the menu text Profile data and performance analysis data cannot be acquired at the same time If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active when the Enable Analysis in the Performance Analysis window is checked a warning message box is displayed Performance Analysis is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If you continue and enable Profiling Performance Analysis will be disabled This will delete your current Performance Analysis data FEE cancel Figure 13 18 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time Section 13 Windows 101 13 10 5 13 10 6 13 10 7 13 10 8 13 10 9 When OK is clicked the performance analysis data acquisition is disabled and the profile data acquisition is enabled Find Displays the Find Text dialog box to find a character string specified in the Function Variable column Search is started by inputting a character string to be found in the edit box and clicking Find Next or pressing the Enter key Clear Data Clears the number of times that functions are called and profile data Data in the Profile Tree window and the Profile Chart window are also cleared Output Profile Information File Displays the Save Profile Information File dialog box Profiling results are saved in a profile inf
101. ise the file will be truncated Logging is only supported for the command line interface Syntax lo lt state gt l lt filename gt Parameter Type Description none Displays logging status lt state gt Keyword Starts or suspends logging Starts logging Suspends logging lt filename gt Numeric Specifies the logging output file Example LOG TEST Logs the output to file TEST LO Suspends logging LOG Resumes logging LOG Displays logging status MAP_DISPLAY Abbreviation MA Description Displays memory mapping Syntax ma Parameter none Type 132 Hitachi Debugging Interface User Manual Description Displays the current memory mapping Example MA MEMORY_DISPLAY Abbreviation MD Description Displays memory contents MEMORY_DISPLAY H C000 H 100 WORD MEMORY_DISPLAY FH 1000 H FF Displays the current memory mapping Syntax md lt address gt lt length gt lt mode gt Parameter Type Description lt address gt Numeric Start address lt length gt Numeric Length optional default H 100 bytes lt mode gt Keyword Display format optional default byte byte Displays as bytes word Displays as words 2 bytes long Displays as longwords 4 bytes ascii Displays as ASCII single Displays as single precision floating point double Displays as double precision floating point Example Dumps H 100 bytes of memory starting at H C000 in the word format Dumps H FF byte
102. ister the cursor moves on to the most significant digit of the next register If the digit of the register display indicates a bit e g in the CPU condition code register CCR then you can press Space to toggle the bits value Full Edit The full way to change a register s contents is accessed via a Register dialog box Open the Register dialog box in one of three ways 1 Double click the register you want to change 2 Select the register you want to change and press Enter 3 Select the register you want to change and choose the Edit menu option from the popup menu Register CCR x Whole Register Cancel Figure 8 10 Register Dialog Box As in any other data entry field in HDI you can enter a formatted number or C C expression see section 2 2 Data Entry You can choose whether to modify the whole register contents High Word Low Word etc a masked area floating or flag bits by selecting an option from the drop list box the contents of this list depend on the CPU model and selected register When you have entered the new number or expression click the OK button or press Enter the dialog box closes and the new value is written into the register Section 8 Looking at variables 51 8 5 3 Using Register Contents It can be useful to be able to use the value contained in a CPU register when you are entering a value elsewhere in HDI for example when displaying a specified address in the Source or
103. keywords 12 8 4 About HDI Launches the About HDI dialog box allowing the user to view the version of HDI and the currently loaded DLLs Section 13 Windows 83 13 Windows This section describes each child window type the features that each window supports and the options available through their associated popup menu 13 1 Breakpoints Enable File Line startup src 24 startup VECT 00000000 Type PC 00000100 Type Access Figure 13 1 Breakpoints Window Allows the user to view and control current breakpoints and to view the hardware breakpoint resources For more information regarding supported breakpoint types and resources refer to the separate Debugging Platform User s Manual A popup menu containing the following options is available by right clicking within the window 13 1 1 Add Launches a dialog box for setting breakpoints allowing the user to enter a new breakpoint The dialog box is dependent on the debugging platform 13 1 2 Edit Only enabled if a breakpoint is selected Launches a dialog box for setting breakpoints allowing the user to modify the properties of an existing breakpoint The dialog box is dependent on the debugging platform 13 1 3 Delete Only enabled if a breakpoint is selected Removes the selected breakpoint To retain the details of the breakpoint but not have it cause a break when its conditions are met use the Disable option see section 13 1 5 Disable Enable 84 Hitach
104. l Look checkbox to revert to the classic Windows 3 1 style menu and toolbars It is possible to add user defined toolbars click on the New button and enter a name for your toolbar This can be edited later in the Toolbar Name edit box feature only available for user defined toolbars The new toolbar in this case called My Toolbar will appear floating at the top left of the main frame but will have no buttons To add buttons you will now have to customize your toolbar 64 Hitachi Debugging Interface User Manual 11 4 2 Customizing Individual Toolbars Button categories Buttons available Description of button s operation 11 4 3 B Customizing individual toolbars requires a mouse or other pointing device the feature is not available if only the keyboard is available This is because the toolbars only operate with a mouse so customizing them would be unnecessary unless you have a mouse Select the Commands pane to set the individual buttons in each toolbar Customize Ed Toolbars Commands Categories Buttons fe 0 Select a category then click a button to see its description Drag the button to any toolbar m Description Load session from a file Cancel Figure 11 7 Customize Toolbar Commands Dialog Box Apply utton Categories At the top left of the dialog box is a list of button categories For each category a list of buttons within that cate
105. lay menu option Address Section Name Figure 9 1 Overlay Dialog Box at Opening This dialog box has two areas the Address list box and the Section Name list box The Address list box displays the address ranges used by the overlay function Click to select one of the address ranges in the Address list box Address Section Name OK Cancel pineale Psect0i Psectil 002000 002005 Psect02 Psect12 Psect03 Psect13 Figure 9 2 Overlay Dialog Box Address Range Selected The Section Name list box displays the section groups assigned to the selected address range 56 Hitachi Debugging Interface User Manual 9 2 Setting Section Group Note When using the overlay function the highest priority section group must be selected in the Overlay dialog box otherwise HDI will operate incorrectly First click one of the address ranges displayed in the Address list box The section groups assigned to the selected address range will then be displayed in the Section Name list box Click to select the section group with the highest priority among the displayed section groups Address Section Name 001000 001023 Psect01 Psect11 PsectO02 Psect 12 Psect03 Psect13 Cancel 002000 002005 Figure 9 3 Overlay Dialog Box Highest Priority Section Group Selected After selecting a section group clicking the OK button stores the priority setting and closes the dialog box Clicking t
106. ll be updated so that this is the first address displayed in the top left corner When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function 112 Hitachi Debugging Interface User Manual 13 14 4 13 14 5 13 14 6 13 14 7 13 14 8 13 14 9 Set Line Launches the Set Line dialog box allowing the user to display and move the text cursor not the mouse cursor to a specific line Go To Cursor I i Commences to execute the user program starting from the current PC address The program will continue to run until the PC reaches the address indicated by the text cursor not the mouse cursor or another break condition is satisfied Grayed if not supported by the debugging platform Set PC Here Changes the value of the PC to the address indicated by the text cursor not the mouse cursor Instant Watch Launches the Instant Watch dialog box with the name extracted from the view at the current text cursor not mouse cursor position This feature works only if the source line is assigned to actual code Add Watch Adds the name extracted from the view at the current text cursor not mouse cursor position to the list of watched variables If the Watch window is not open then it is opened and brought to the top of the child windows This feature works only if the source line is assigned to actual code Go To Disassembly Opens a Disassembly view at t
107. loses log file if open Syntax qu Parameter Type Description none Exits HDI Example QU Exits HDI 136 Hitachi Debugging Interface User Manual RADIX Abbreviation RA Description Sets default input radix If no parameters are specified the current radix is displayed Radix can be changed by using B H D O before numeric data Syntax ra lt mode gt Parameter Type Description none Displays current radix lt mode gt Keyword Sets radix to specified type H Sets radix to hexadecimal D Sets radix to decimal O Sets radix to octal B Sets radix to binary Example RADIX Displays the current radix RAH Sets the radix to hexadecimal REGISTER_DISPLAY Abbreviation RD Description Displays CPU register values Syntax rd Parameter Type Description none Displays all register values Example RD Displays all register values REGISTER_SET Abbreviation RS Description Changes the contents of a register Appendix B Command Line Interface 137 Syntax rs lt register gt lt value gt lt mode gt Parameter Type Description lt register gt Keyword Register name lt value gt Numeric Register value lt mode gt Keyword Data size default register size byte Byte word Word long Longword single Single precision floating point double Double precision floating point Example RS PC _StartUp Sets the program counter to the address defined by the symbol _ StartUp RS RO H 1234 WORD Sets word data H
108. m data is not written to memory This is useful when using the emulator to debug a user program written in ROM by loading only the debugging information When the Load stack information file SNI file checkbox is checked the stack information file sni extension that is in the same directory as the load module file is loaded The stack information file need be loaded only when the profile function is used For details on profile information see sections 13 10 Profile List 13 11 Profile Tree and 13 12 Profile Chart Section 3 Preparing to debug 13 If the combo box does not include the file you require it is possible to either enter the file name directly into the edit area or to use the Browse button to search for the file you want to download Open Look in H8s 38 Tutorial abs File name utorial abs Files of type Sysrof Files abs dbg y Cancel Figure 3 6 Open Dialog Box To select a file to download from the browser dialog box first select the type of file to display in the list area by clicking in the Files of type field see also section 11 6 Customizing the File Filters and then click on the file type that you require Files of type s ysrof or ELF D WARF Files abs y Sysrof or ELF DWARE Files abs S Record Files mot a20 a37 All Files Figure 3 7 File Type Selection The file list will then be updated with the files available from which your sele
109. modules for specific tasks These modules are linked to a general purpose Graphical User Interface which provides a common look amp feel independent of the particular modules with which the system is configured 2 1 User Interface The HDI 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 s manual for details on how to operate within a Windows application 2 2 Data Entry When entering numbers in any dialog box or field you can always enter an expression instead of a simple number This expression can contain symbols and can use the operators in the C C programming languages Use of C C programming language features such as arrays and structures is only available if an object DLL that supports C C programming language debugging is in use In some dialog boxes 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 following C C programming language operators are available amp l gt gt lt lt lt gt lt gt amp amp l 2 2 2 Data Formats Unprefixed data values will be taken as being in the default radix set by the Setup gt Radix menu option The exception is count field which use decimal values by
110. n 13 5 1 Add Launches the Add Label dialog box 90 Hitachi Debugging Interface User Manual Add Label Ed Name Value Cancel Figure 13 6 Add Label Dialog Box Enter the new label name into the Name field and the corresponding value into the Value field and press OK The Add Label dialog box closes and the label list is updated to show the new label When an overloaded function or a class name is entered in the Value field the Select Function dialog box opens for you to select a function For details refer to section 10 Selecting Functions 13 5 2 Edit Launches the Edit Label dialog box Name main Value H 00001 012 Carcel Figure 13 7 Edit Label Dialog Box Edit the label name and value as required and then press OK to save the modified version in the label list The list display is updated to show the new label details When an overloaded function or a class name is entered in the Name field the Select Function dialog box opens for you to select a function For details refer to section 10 Selecting Functions Section 13 Windows 91 13 5 3 Find Launches the Find Label Containing dialog box Clear Cancel Figure 13 8 Find Label Containing Dialog Box Enter all or part of the label name that you wish to find into the edit box and click OK or press Enter The dialog box closes and HDI searches the label list for a label name containing the text that you entered Note O
111. nd start running from the reset vector address Section 7 Stopping your program 41 When the program halts at the temporary breakpoints that you specified are cleared from the current breakpoint list However when the dialog box is opened again the list is retained in the Stop At field and will be set again if you click the Go PC or Go Reset buttons 7 6 Hardware Breakpoints Event Note Hardware breakpoints are specific to the debugging platform you have selected Their operation depends on the breakpoint features available in the debugging platform For details on debugging platform specific breakpoints see the separate Debugging Platform User s Manual 42 Hitachi Debugging Interface User Manual Section 8 Looking at variables 43 8 Looking at Variables This section describes how to look at the variables and data objects that your program uses It shows you how to view variables set up watch items and look at the contents of the CPU s general FPU DSP and on chip peripheral registers 8 1 Tooltip Watch The quickest way to look at a variable in your program is to use the Tooltip Watch feature To use Tooltip Watch 1 Open the Source window showing the variable that you want to examine 2 Rest the mouse cursor over the variable name that you want to examine a tooltip will appear near the variable containing basic watch information for that variable Y MEM 221 void COPY MEM void 222 223 unsigned short
112. ndow then choose the Search menu option from the popup menu Alternatively with a Memory window in focus just press F3 This will launch the Search Memory dialog box Search Memory Ed H FFECOO ik Cancel Format Long word v Figure 5 5 Search Memory Dialog Box Enter the begin and end addresses of the range in which to search if an area of memory was selected in the Memory window then the Begin and End address values will be filled in automatically and the data value to search for The end address can also be prefixed by a which will use the entered value as a range Select the search format defaults to data display format and click OK or press Enter The dialog box closes and HDI searches the range for the specified data If the data is found it will be highlighted in the Memory window If the data cannot be found the caret position in the Memory window remains unchanged and a message informing you that the data could not be found is displayed on the message box 5 4 Filling an Area of Memory with a Value You can set the contents of a range of memory addresses to a value using the memory fill feature 26 Hitachi Debugging Interface User Manual 5 4 1 Filling a Range To fill a range of memory with the same value choose the Fill menu option on a Memory window s popup menu or Memory gt Fill menu option The Fill Memory dialog box opens pa HFFECOO End Cancel HE _ Data fi
113. ndows 95 13 7 2 Edit Launches the Edit Memory Mapping dialog box allowing the user to modify the details of the currently selected memory map Grayed if the debugging platform does not support editing of its maps 13 7 3 Reset Returns the map information to the debugging platform s default values Grayed if the debugging platform does not support editing of its maps 13 7 4 Help Launches the help file 13 8 Memory Figure 13 14 Memory Window Allows the user to view and modify the contents of the debugging platform s memory Memory may be viewed in ASCII byte word 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 may be edited by either typing at the current cursor position or by double clicking on a data item The latter will launch the Edit dialog box allowing the user to enter a new value using a complex expression If the data at that address cannot be modified i e within ROM or guarded memory then the message Invalid address value is displayed 96 Hitachi Debugging Interface User Manual 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 di
114. nesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office eq
115. nformation refer to section 8 3 2 Expanding a Watch A popup menu containing the following options is available by right clicking within the window 94 Hitachi Debugging Interface User Manual 13 6 1 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 13 6 2 Edit Value Launches a dialog box to modify the selected variable s value 13 6 3 Radix Changes the radix for the selected local variable display 13 7 Memory Mapping Memory Mapping OF x Type i que 0001FFFF Emulator 00020000 OOFFEBFF Guarded OOFFECOO OOFFFBFF Emulator Re OOFFFCOO OOFFFE3F Guarded Reset OOFFFE40 OOFFFFO Emulator Re OOFFFFO8 00FFFF2 Guarded OOFFFF28 OOFFFFFF Emulator Figure 13 13 Memory Mapping Window Allows the user to view and modify the debugging platform s memory map and to view its memory configuration and resources The exact memory map configuration available will depend on the debugging platform selected however HDI includes a default dialog box that can be used by most platforms A popup menu containing the following options is available by right clicking within the window 13 7 1 Add Launches the Edit Memory Mapping dialog box allowing the user to enter the details of a new memory area to add to the map Grayed if the debugging platform does not support editing of its maps Section 13 Wi
116. ng 128 Hitachi Debugging Interface User Manual Continue allows you to continue to enter commands but they may not work depending on the facilities of the debugging platform Example GO Runs the user program from the current PC value does not continue command processing GO CONTINUE H 1000 Runs the user program from H 1000 continues command processing GO_RESET Abbreviation GR Description Runs the user program starting at the address specified in the reset vector While the user program is running only the Performance Analysis window is updated Syntax gr lt state gt Parameter Type Description lt state gt Keyword Specifies whether or not to continue command processing during program execution optional default wait walt Causes command processing to wait until the user program stops continue Continues command processing during execution Wait is the default and this causes command processing to wait until the user program stops running Continue allows you to continue to enter commands but they may not work depending on the facilities of the debugging platform Example GR Runs the user program starting at the address specified in the reset vector does not continue command processing Appendix B Command Line Interface 129 GO_TILL Abbreviation GT Description Runs the debugging platform program from the current PC with temporary breakpoints This command takes multiple addresses as parame
117. nly 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 13 5 4 Delete Deletes the currently selected label from the symbol list Alternatively use the Delete accelerator key A confirmation message box appears 2 Please confirm Delete label Figure 13 9 Message Box for Confirming Label Deletion If you click on the Yes button the label is removed from label list and the window display is updated If the message box is not required then do not select the Delete Label option of the Confirmation pane in the HDI Options dialog box 92 Hitachi Debugging Interface User Manual 13 5 5 Delete All Deletes all the labels from the list A confirmation message box appears HDI CI Please confirm Delete ALL labels Figure 13 10 Message Box for Confirming All Label Deletion If you click on the Yes button all the labels are removed from the HDI system s symbol table and the list display will be cleared If the message box is not required then do not select the Delete All Labels option of the Confirmation pane in the HDI Options dialog box 13 5 6 Load Merges a symbol file into HDI s current symbol table The Load Symbols dialog box opens Load Symbols El E Lookin Eu Hastut Talas File name my_code sym Files of type Symbol Files sym y Cancel Figure 13 11 Load Symbols Dialog Box
118. nstead 18 Hitachi Debugging Interface User Manual 4 2 1 Listing Labels To see a list of all the labels defined in the current session open the Labels window by choosing the View gt Labels menu option Labels 01 x Name H 00001000 startup boot H 00001012 main H 0000106A _STOP_MODE H 0000108E MASK1 H DOO0010BA _DMAC RUN H 00001180 _MASKZ H 000011Ac _DTC REGS H 0000129E _DTC SCIO ACT H 000012E2 _DTC SCIO RUN H 00001316 _MASK3 H 00001342 _WDT RUN H 00001358 _DENDOA H 0000136C _WOVI H 0000139E _TXIO H 000013C6 _COPY MEM H 00001412 INITSCT H 0000145C __D ROM Figure 4 4 Labels Window You can view symbols sorted either alphabetically by ASCII code or by address value by clicking on the respective column heading You can quickly set a software break at the entry point of a function by double clicking or right clicking and selecting Break menu in the BP column 4 2 2 Adding a Label from a Source or Disassembly Window You can quickly add a label from a Source or Disassembly window by double clicking in the Label column at the address for which you want to assign the Label The Label dialog box opens for you to enter the text Clear Cancel Figure 4 5 Label Dialog Box Section 4 Looking at your program 19 Note Enter the label name text and click OK the label is added to the label list with the address value contained in the Address column of the corresponding line and the Source window
119. ntents of memory is to select the digit that you wish to change by clicking or dragging on it You will see the selected digit is highlighted Type the new value for the digit it must be in the range 0 9 a f when displaying not ASCII format or the new value for ASCII it must be ASCII when displaying ASCII format The new value is written into the digit and the cursor moves on to the next digit in memory 5 2 2 Full Edit The full way to change the contents of memory is accessed via the Edit dialog box Move the cursor on the memory unit depending on your Memory window display choice that you wish to change Either double click on the memory unit or press Enter The Edit dialog box opens Edit word at H 00001024 Ed IV Verify Cancel Figure 5 4 Edit Dialog Box Like any other data entry field in HDI you can enter a formatted number or C C expression see section 2 2 Data Entry When you have entered the new number or expression click the OK button or press Enter the dialog box closes and the new value is written into memory 5 2 3 Selecting a Memory Range If the memory address range is in the Memory window you can select the range by clicking on the first memory unit depending on your Memory window display choice and dragging the mouse to the last unit The selected range is highlighted Section 5 Working with memory 25 5 3 Finding a Value in Memory To find a value in memory you must open a Memory wi
120. nu option window menu SE Disassembly P USERS LOUIS NA EXES 32BIT H8STUTATUTORIAL C Code Assembler O1006DF6 main MOV L ER6 ER7 OFF6 MOV L ER7 ERG 6A2800FF MOV B H OO0FFFF3B 32 ROL E807 AND B H 07 ROL B H 06 ROL 4702 H 1026 8 403E BRA H 1064 8 6A2800FF MOV H O0O0FFFF39 32 ROL A801 CME H 01 ROL 4708 BEQ H 1038 8 F801 MOV H 01 ROL 6AAS00FF MOV ROL H OO0FFFF39 32 6A3800FF A806 CMP Minimize button 00001042 554A BSR MASK1 8 MASK 00001044 5574 BSR A DMAC RUN 8 pMac Y Figure 11 1 Minimizing a Window The window is minimized to an icon at the bottom left of the HDI application window for the above Disassembly window example the icon is SE Disassembl EM Ea Figure 11 2 Disassembly Window Icon 60 Hitachi Debugging Interface User Manual Note You may not be able to see the icon if you have a window open over the bottom of the screen To restore the icon back to a window either double click on the icon or choose the Restore menu option from the control menu 11 1 2 Arranging Icons Although the icons will be put at the bottom left of the HDI application window by default when you minimize a window you can move them anywhere you like in the application window by simply clicking and dragging them to a new position When you restore the icon to a window the window will be at the same position that it was in when you minimized it Similarly when you minimize it again the icon will b
121. o SER rei rione le erre nin o ele 94 13 60 20 EVA E EAE lele leo rio heel ela 94 13 03 Radisson AN ie os EN sci A as eal a as SOI LL 94 18 7 MEMORY MAPPING 0 ii Ses atv Sic ceed hav RL AS seve sce ala 94 VITA SAGGI 94 191725 Edita denis A Rel eno han mr cei 95 TOTO RPesebiazesiine ad ala Betulla aid a aa ar 95 13 4 SOND we cnc ocean A TA A lai 95 18 8 MEMORY as cic coed A Seether Ao ores RAR 95 13 01 SOUAGGIOSS a RR 96 13 0 2 LOB A Roa sch E AE ee a i i eich 96 DOOD SAVA vani i nana Be cea cn 96 TEBA MOS RA A Ee ee E A 96 LN A tal Lia RI NO E 96 138 0 COPY e italiane dle DO o e Nelo a pifi e nil lee aa 97 18 87 Compare ori A A anale dae 97 19 6 6 2Searchsos ccleaner 97 13 8 9 ASCII Byte Word Long Single Float Double Float iiii 97 13 9 PERFORMANCE ANALYSIS e 97 19 91 ATRAN ciar ai Ar 98 139 2 ENERO A A Bae ie cues teats dhs E Sie ts A a 98 13 9 3 Delete Range ac sirio Bes tts ee A th E ST Rati BL NNE 98 13 9 4 Reset Counts TiMes ii 98 13 9 5 Delete All RANGOS neare oe A Ln ara an 98 13 9 6 Enable Analysis iiai ne a E Ee E ia 98 13 10 PROFILES Tic ta a a 99 13 10 14 MICW SOUICO aa 100 13 10 22 MIEW PIOTHO Tre ua a a A dida och 100 13 10 3 View Profile Chatt ii 100 13 1 0 4 Enable Profileri gt mez a r ET aa 100 13 10 5 Finds alan 101 13 10 6 Glear Dataz iDela A el am gh eae 101 13 10 7 Output Profile Information File
122. of each register must be sequential The dependency is entered in the section as dep lt reg gt lt bit gt lt value gt 1 lt reg gt is the register id of the dependency 2 lt bit gt is the bit position within the register 152 Hitachi Debugging Interface User Manual 3 lt value gt is the value that the bit must be for the module to be enabled The Register definition entry is entered in the format id lt name gt lt address gt lt size gt lt absolute gt lt format gt lt bitfields gt L 2 6 lt name gt register name to be displayed lt address gt address of the register 3 lt size gt which may be B W or L for byte word or longword default is byte lt absolute gt which can be set to A if the register is at an absolute address This is only relevant if the I O area address range moves about on the CPU in different modes In this case if a register is defined as absolute the base address offset calculation is not performed and the specified address is used directly lt format gt Format for register output Valid values are H for Hexadecimal D for decimal and B for binary lt bitfields gt section defining the bits within the register Bitfield sections define the bits within a register each entry is of the type bit lt no gt lt name gt L Zi lt no gt is the bit number lt name gt is a symbolic name of the bit 66 99 Comment lines are allowe
123. ol in the Enable column is set to show that the breakpoint is enabled 40 Hitachi Debugging Interface User Manual 7 5 Temporary Breakpoints There are times when you may want to start running your program and want it to stop if it hits one or more addresses but do not want to set permanent breakpoints at these addresses For example you may want to perform something like the Go To Cursor operation but the destination may be outside the Source window or you may want to stop at several addresses To do this you can use HDI s temporary breakpoint feature to run as it supports up to ten temporary breakpoints that are cleared when you break Temporary breakpoints are set in the Run Program dialog box which is opened by choosing the Run gt Run menu option The Run Program dialog box opens Run Program Ed Program Counter H 00001 000 Stop At H 00001010 main COPY_MEM Go Reset Cancel Hasmtogam Figure 7 3 Run Program Dialog Box Enter the symbols or address values for the points at which you want the program to stop up to ten points in the Stop At field When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function For details refer to section 10 Selecting Functions Click the Go PC button to start running from the current program counter address as displayed in the Program Counter field Click the Go Reset button to reset the CPU a
124. on Enables disables performance analysis Counts are not automatically reset before running Syntax an lt state gt Parameter Type Description none Displays the analysis state lt state gt Keyword Enables disables analysis enable Enables analysis disable Disables analysis reset Resets analysis counts Example ANALYSIS Displays analysis state AN enable Enables analysis AN disable Disables analysis AN reset Resets analysis counts ANALYSIS_RANGE Abbreviation AR Description Sets performance analysis range or displays performance analysis ranges if no parameters are specified The syntax depends on the debugging platform See the separate Debugging Platform User s Manual Syntax ar lt start gt lt end gt lt name gt Parameter Type Description none Displays all analysis ranges lt start gt Numeric Start address of range lt end gt Numeric End address of range lt name gt String User range description Example ANALYSIS_RANGE H 0 Defines a performance analysis range from H 100 address H 0 to H 100 AR H 1000 H 3FFF Defines a performance analysis range from H 1000 to H 3FFF AR Displays the current analysis ranges set Appendix B Command Line Interface 123 ANALYSIS_RANGE_DELETE Abbreviation AD Description Deletes the specified performance analysis range or all ranges if no parameters are specified it does not ask for confirmation Syntax ad lt index gt Parameter Type Descri
125. onfirmation message box may be displayed this can be switched off in the Confirmations tab on the HDI Options dialog box 30 Hitachi Debugging Interface User Manual Section 6 Executing your program 31 6 Executing Your Program This section describes how you can execute your program s code You will learn how to do this by either running your program continuously or stepping single or multiple instructions at a time 6 1 Running from Reset To reset your user system and run your program from the Reset Vector address choose the Run gt Reset Go menu option or click the Reset Go toolbar button E The program will run until it hits a breakpoint or a break condition is met You can stop the program manually at any time by choosing the Run gt Halt menu option or by clicking the Halt toolbar button 3 Note The program will start running from whatever address is stored in the reset vector location Therefore it is important to make sure that this location contains the address of your startup code 6 2 Continuing Run When your program is stopped and the debugger is in break mode the HDI will highlight the line in the Source and Disassembly windows that correspond to the CPU s current program counter PC address value This will be the next instruction to be executed if you perform a step or continue running BP Address Label 00001012 main void mainivoid PC Location pe printf l 00001
126. ord file TESTFILE MOT FS D USER ANOTHER A22 Saves address range H 4000 H 4FFF as S H 4000 H 4FFF Record format file ANOTHER A22 Appendix B Command Line Interface 127 FILE_VERIFY Abbreviation FV Description Verifies file contents against memory The file data must be in a Motorola S Record format The file extension default is MOT Syntax fv lt filename gt lt offset gt Parameter Type Description lt filename gt String File name lt offset gt Numeric Offset to be added to file address optional default 0 Example FILE_VERIFY Verifies S Record file TEST A22 against A BINARY TEST A22 memory FV ANOTHER 200 Verifies Motorola S Record file ANOTHER MOT against memory with an offset of H 200 bytes GO Abbreviation GO Description Runs object code the user program While the user program is running only the Performance Analysis window is updated When execution stops the PC value is displayed Syntax go lt state gt lt address gt Parameter Type Description lt state gt Keyword Specifies whether or not to continue command processing during program execution optional default wait walt Causes command processing to wait until program stops continue Continues command processing during execution lt address gt Numeric Start address for PC optional default PC value Wait is the default and this causes command processing to wait until the user program stops runni
127. ormation file pro extension The optimizing linkage editor can optimizes user programs according to the profile information in this file For details of the optimization using the profile information refer to the separate User s Manual for the SuperH RISC engine C C Compiler Assembler and the Optimizing Linkage Editor Output Text File Displays the Save Text of Profile Data dialog box Displayed contents are saved in a text file Select Data Selects profile data types The types of profile data differ according to the debugging platform If this menu option is not supported by the debugging platform it is displayed in gray characters 102 Hitachi Debugging Interface User Manual 13 10 10 Setting Displays the Setting Profile List dialog box to set displayed contents Setting Profile List x gw Iv Show Address how Address gt Y Show Size ee Y Show Times Functions AVariables Show both Show only Functions Show only Variables TT Show only executed functions F Include data of child function s Figure 13 19 Setting Profile List Dialog Box The Column group checkboxes are set to display a specific column Functions Variables group radio buttons are set to display either both of the functions and the global variables displayed in the Function Variable column or only one of them Checking in the Show Only Executed Function s checkbox disables the display of unexecute
128. ound highlighted To find the next occurrence of the text click Find Next or press Enter again To close the Find dialog box click Cancel or press Esc Section 5 Working with memory 21 5 Working with Memory This section describes how to look at areas of memory in the CPU s address space It will show you how to look at an area of memory in different formats fill move and test a block of memory and save load and verify an area of memory with a disk file 5 1 Looking at an Area of Memory To look at an area of memory choose the View gt Memory menu option using the Ctrl M accelerator or clicking the Memory Window toolbar button F to open a Memory window This will launch an Open Memory Window dialog box Open Memory Window Ed Address ok OK Cancel Format e yte y Figure 5 1 Open Memory Window Dialog Box Type in the start address or equivalent symbol for the window display in the Address field and select the required display format from the Format list Click OK or press Enter and the dialog box closes and a Memory window opens Figure 5 2 Memory Window Bytes 22 Hitachi Debugging Interface User Manual There are two display columns excluding the address display column 1 Data The data read from the debugging platform Where supported it is read from physical memory at the displayed width Editing the data is supported 2 Value Data displayed in an alternative format
129. ource level your C C program must be compiled and linked with the debug option enabled When this option is enabled the compiler and linkage editor put all the information necessary for debugging your C C code into the absolute file or management information file which are then usually called debug object files Make sure you have the debug option enabled on both of your compiler and linker when you generate an object file for debugging If your debug object file does not contain any debugging information then you can still load it into the debugging platform but you will only be able to debug at assembly language level 3 2 Selecting a Debugging Platform When HDI is launched it will display a splash screen and then create its main window The splash screen will clear to display the Select Session dialog box Choose the Create a new session on option select the appropriate debugging platform from the list and click the OK button If you select the wrong platform this dialog box can be launched again by choosing the File gt New Session menu option Select Session Create a new session on E6000 H8S 2600 Emulator y E xit Previous session file c hdi tutorial h8s tutorial hds Browse Figure 3 1 Select Session Dialog Box 8 Hitachi Debugging Interface User Manual HDI will load the platform s plug in module and establish communications with the debugging platform As the module loads it
130. perating For example in a device with internal ROM and RAM the areas where these are located in the device s memory map will be set by default Section 3 Map setting Preparing to debug 9 If you are using a device that does not have internal memory or a device with external memory instead of or in addition to the internal memory then you must tell the debugging platform that you have memory there Also if you are trying to debug code with an emulator and wish to have some memory available in the address map that does not exist either internally in the device or externally in your user system then you can map some emulation memory from the emulator to the address space for your application to use To edit the memory map configuration choose the Memory gt Configure Map menu item or for some platforms via a pane on the Configure Platform dialog box The dialog box shown will be specific to the debugging platform that you chose in the Select Session dialog box But for example with a hardware in circuit emulator you will see something like Memory Mapping Al ES Type Memory Close La 00000000 0001FFFF Emulator 00020000 OOFFEBFF Guarded OOFFECOO OOFFFBFF Emulator Re OOFFFCOO OOFFFE3F Guarded Reset DOFFFE40 OOFFFFO Emulator Re OOFFFFO8S OOFFFF2 Guarded OOFFFF28 OOFFFFFF Emulator it Figure 3 2 Memory Mapping Window The Map Setting area shows how the address space is currentl
131. performance analysis Sets or displays performance analysis ranges Deletes a performance analysis range Assembles instructions into memory Checks if an expression is true or false Sets a breakpoint Clears a breakpoint or all breakpoints Displays breakpoints Enables or disables one or all breakpoints Defines the events which arm or reset an event Sets emulator CPU clock rate Selects device type to emulate Disassembles memory contents Clears the Command Line window Evaluates an expression Loads an object program file Saves memory to a file Verifies file contents against memory Runs program Runs program from reset Runs program until temporary breakpoint Halts program Gets help for command line or help on a command Initializes HDI Enables or disables debugging platform system interrupts Controls command output logging Displays memory mapping Sets up memory mapping Displays memory contents Modifies memory contents Fills a memory area Moves a block of memory Tests a block of memory Sets or displays CPU mode Exits HDI Sets default input radix Refreshes memory related window contents Displays CPU register values Changes CPU register contents Resets CPU 146 Hitachi Debugging Interface User Manual Long name SLEEP STEP STEP_OUT STEP_OVER STEP_RATE SUBMIT SYMBOL_ADD SYMBOL_CLEAR SYMBOL_LOAD SYMBOL_SAVE SYMBOL_VIEW TEST_EMULATOR TIMER TRACE TRACE ACQUISITION TRACE_COMPARE TRACE_SAVE TRACE
132. program the Locals window will be updated following a step or break from run to show current local variables and their values If a local variable is not initialized when defined then the value in the Locals window will be undefined until a value is assigned to the local variable The local variable values and the radix for local variable display can be modified in the same manner as in the Watch window 8 5 Looking at Registers If you are debugging at assembly language level using the Source window in assembly language then you will probably find it useful to see the contents of the CPU s general FPU and DSP registers You can do this using the Registers window Registers Of x Register Value 00000000 00000000 57705770 00000190 57700000 00000000 OOFFFBES OOFFFBEO 001228 00000115 TDFZB5FF Figure 8 8 Registers Window To open a Registers window choose the View gt Registers menu option or click the CPU Register Window toolbar button E A Registers window opens showing all of the CPU s general FPU and DSP registers and their values displayed in hexadecimal Section 8 Looking at variables 49 8 5 1 Expanding a Bit Register If a register is used to control or display status using flags at the bit level then you will see a plus sign expansion indicator to left of its name this means that you can expand it To do this double click on the plus sign to show the flags indented by one tab character
133. ption none Deletes all analysis ranges lt index gt Numeric Index number of range to delete Example ANALYSIS_RANGE Deletes the analysis range with index number 6 _DELETE 6 from the system AD Deletes all user defined analysis ranges ASSEMBLE Abbreviation AS Description Assembles instructions and writes them to memory In assembly mode exits steps back a byte the Enter key steps forward a byte Syntax as lt address gt Parameter Type Description lt address gt Numeric Address at which to start assembling Example AS H 1000 Starts assembling from H 1000 ASSERT Abbreviation none Description Checks if an expression is true or false It can be used to terminate the batch file when the expression is false If the expression is false an error is returned This command can be used to write test harnesses for subroutines 124 Hitachi Debugging Interface User Manual Syntax assert lt expression gt Parameter Type Description lt expression gt Expression Expression to be checked Example ASSERT RO 0x100 Returns an error if R0 does not contain 0x100 DISASSEMBLE Abbreviation DA Description Disassembles memory contents to assembly language code Disassembly display is fully symbolic Syntax da lt address gt lt length gt Parameter Type Description lt address gt Numeric Start address lt length gt Numeric Number of instructions optional default 16 Example DISASSEMBL
134. rning Message Box Showing Profiler and Analysis Cannot Be Set at a Time 104 Find Data Dialog BOX tii ti stat 105 Setting Profile Tree Dialog Box aiar 106 Profile Chatt Window ireland 107 Warning Message Box Showing Profiler and Anal ysis Cannot Be Set at a Time 108 Registers Wind Wisin oia Deia ile 109 SOURCE VIEW ii isa 110 System Status Window iiia nie za riale a a ara dye notando circle pi 113 Trace Window tirolesi rie aie edna th sala alal 114 Watch Wi dOW ni ilo lena alia 116 HDI System Modules cocidos 119 Section 1 Introduction 1 1 Introduction The Hitachi Debugging Interface HDI is a Graphical User Interface intended to ease the development and debugging of applications written in C C programming language and assembly language for Hitachi microcomputers Its aim is to provide a powerful yet intuitive way of accessing observing and modifying the debugging platform in which the application is running 1 1 Key Features Notes e Windows GUI for debugging e Intuitive user interface e On line help e Common Look amp Feel 1 For detailed information about debugging platform hardware please refer to the separate Debugging Platform User s Manual 2 The HDI does not run on Windows version 3 1 2 Hitachi Debugging Interface User Manual Section 2 System Overview 3 2 System Overview HDI is a modular software system utilizing self contained
135. rogram will be executed to move the current PC position to the next line in the current view 12 4 9 Step Out P 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 Section 12 Menus 79 12 4 10 Step H Launches the Step Program dialog box allowing the user to modify the settings for stepping 12 4 11 Halt Stops the execution of the user program 12 5 Memory The Memory menu is used for aspects of the memory accessed by program 12 5 1 Refresh Forces a manual update of the contents of all open Memory windows 12 5 2 Load Launches the Load Memory File dialog box allowing the user to select an offset address in the memory area and file name to load from an S Record format file on disk 12 5 3 Save Launches the Save Memory As dialog box allowing the user to select a start and an end address in the memory area to save to an S Record format file on disk The start and end addresses that are automatically filled when the dialog box is displayed indicate the memory block range which is highlighted in the Memory window 12 5 4 Verify a Launches the Verify S Record File with Memory dialog box allowing the user to select a start and an end address in the memory area to check against the contents of an S Record file on disk 12 5 5 Test EJ Launches the Test Memory dialog box allowing the user to specify a block o
136. rs Ol OF x Power Down Mode Registers DMA Channel Common DMA O Short Address Mode DMA O Full Address Mode DMA 1 Short Address Mode DMA 1 Full Address Mode Data Transfer Control Disabled module 16 Bit Timer Pulse Unit 16 Bit Timer 0 16 Bit Timer 1 OOFFFFEO TCRI HFF QOFFFFEl TMDR1 H 9D OOFFFFEZ TIOR 1 H FF Bit information O IOA F 4 IOB F OOFFFFE4 TIERI H FF g Register address Register name Register value Figure 8 11 I O Registers Window 8 6 2 Expanding an I O Register Display To display the names addresses and values of the I O registers double click on the module name or select the module name by clicking on it or using the cursor keys and press Enter The module display will expand to show the individual registers of that peripheral module and their names addresses and values Double clicking or pressing Enter again on the module name will close the I O register display To display to bit level expand the I O register in a similar way The bits are color coded as follows Black Normal read write Red Value changed since last update Grey Peripheral disabled by peripheral control registers Section 8 Looking at variables 53 8 6 3 Modifying I O Register Contents Note To edit the value in an I O register press Enter on the register to open the Edit dialog box to modify the register contents Edit byte at H DOFFFF3
137. s of memory starting at H 1000 in the byte format Appendix B Command Line Interface 133 MEMORY_EDIT Abbreviation ME Description Allows memory contents to be modified When editing memory the current location may be modified in a similar way to that described in the ASSEMBLE command description When editing exits edit mode goes back a unit and blank line goes forward without change Syntax me lt address gt lt mode gt lt state gt Parameter Type Description lt address gt Numeric Address to edit lt mode gt Keyword Format optional default byte byte Edits as bytes word Edits as words long Edits as longwords ascii Edits as ASCII single Edits as single precision floating point double Edits as double precision floating point lt state gt Keyword Verify flag optional default V V Verify N No verify Example ME H 1000 WORD Modifies memory contents as words starting from H 1000 with verification 134 Hitachi Debugging Interface User Manual MEMORY_FILL Abbreviation MF Description Fills an area of memory Syntax mf lt start gt lt end gt lt data gt lt mode gt lt state gt Parameter Type Description lt start gt Numeric Start address lt end gt Numeric End address lt data gt Numeric Data value lt mode gt Keyword Data size optional default byte byte Byte word Word long Longword single Single precision floating point double Double precision floating point
138. s products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics To all our customers Regarding the change of names mentioned in the document such as Hitachi Electric and Hitachi XX to Renesas Technology Corp The semiconductor operations of Mitsubishi Electric and Hitachi were transferred to Renesas Technology Corporation on April 1st 2003 These operations include microcomputer logic analog and discrete devices and memory chips other than DRAMs flash memory SRAMS etc Accordingly although Hitachi Hitachi Ltd Hitachi Semiconductors and other Hitachi brand names are mentioned in the document these names have in fact all been changed to Renesas Technology Corp Thank you for your understanding Except for our corporate trademark logo and corporate statement no changes whatsoever have been made to the contents of the document and these changes do not constitute any alteration to the contents of the document itself Renesas Technology Home Page http www renesas com Renesas Technology Corp Customer Support Dept April 1 2003 ENESAS Renesas Technology Corp RENESAS C 7 D Bo 7 lt D D Debugging Interface HS6400DIIW5S User s Manual
139. s the user system hardware and sets the PC to the reset vector address See also section 12 1 6 Initialize 78 Hitachi Debugging Interface User Manual 12 4 2 Go El Starts executing the user program from the current PC 12 4 3 Reset Go ER Resets the user system hardware and sets the PC to the reset vector address and then executing the user program 12 4 4 Go To Cursor Bi Starts executing the user program from the current PC and continues until the PC equals the address indicated by the current text cursor not mouse cursor position 12 4 5 Set PC To Cursor Changes the value of the program counter PC to the address at the row of the text cursor Disabled if no address is available for the current row 12 4 6 Run Launches the Run Program dialog box allowing the user to enter breakpoints before executing the user program 12 4 7 Step In e Executes a block of user program before breaking The size of this block is normally a single instruction but in the source window a C C source line will be executed If a subroutine call is reached then the subroutine will be entered and execution will stop the view 1s updated to include its code 12 4 8 Step Over P Executes a block of user program before breaking The size of this block is normally a single instruction but in the source window a C C source line will be executed If a subroutine call is reached then the subroutine will not be entered and sufficient user p
140. splayed in the top left corner A popup menu containing the following options is available by right clicking within the window 13 8 1 Set Address Launches the Set Address dialog box allowing the user to enter a new start address The window will be updated so that this is the first address displayed in the top left corner When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function 13 8 2 Load Launches the Load Memory dialog box allowing the user to load to the debugging platform s memory from an S Record file mot without deleting the current debugging 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 13 8 3 Save Launches the Save Memory As dialog box allowing the user to save a block of the debugging platform s memory to an S Record file mot The start and end fields may be set similarly to the Search option see section 13 8 8 Search 13 8 4 Test Launches the Test Memory dialog box allowing the user to validate a block of memory within the debugging platform The details of the test depend on the debugging platform The start and end fields may be set similarly to the Search option see section 13 8 8 Search 13 8 5 Fill Launches the Fill Memory dialog box
141. ssion file hds a target session file hdt and a watch session file hdw The first includes the HDI interface settings e g all the open windows and their positions The second includes the settings specific to the debugging platform or user system e g the name of the debugging platform and its configuration The third is only created if a Watch window is open and it includes a list of the variables currently being watched The session name is then displayed as the second entry in HDI s title bar ES Hitachi Debugging Interface MANUAL E6000 H85 2600 Emulator of E File Edit View Run Setup Tools Window Help Figure 11 10 Session Name Display The session file does not include symbol or memory information To use modified information again in later sessions save the symbol and memory information in appropriate files For details see section 5 7 Saving an Area of Memory and section 13 5 8 Save As 11 8 Loading a Session To reload a saved session choose the File gt Load Session menu option This will launch a standard Windows file dialog box prompting you for an HDI session file name hds Any currently open windows will be closed and the connection to the debugging platform initialized If user program has been downloaded to the user system then the status bar will display the percentage done Section 11 Configuring the user interface 69 When the download is complete windows will be opened and refr
142. status including the memory mapping resources and the areas used by the currently loaded object file 4 Events contains information about the current event breakpoint status including resource information To update the status in the window on demand choose the Update menu option from the popup menu 12 Hitachi Debugging Interface User Manual 3 4 Downloading a Program Once you have made sure that there is memory in your system in which to download your program you can then proceed to download a program to debug To select an object file for debugging choose the File gt Load Program menu option to open the Load Program dialog box Load Program x ah I Veri Cancel File name c hdi tutorial h s tutorial abs v Browse TT Load only debugging information TT Load stack information file SNI file Figure 3 5 Load Program Dialog Box The dialog box includes a combo box containing a list of the previous four downloaded files and controls to allow an offset address to be used suitable only for some object formats e g S Record and to enable verification of the load Verification checks that data downloaded to the platform can be correctly read back this causes slower download speeds so it is recommended that you only verify if you suspect a problem with memory or with the link file When the Load only debugging information checkbox is checked only the debugging information is loaded and the progra
143. t by the optimizing linkage editor and the profile data is acquired only the executed functions and accessed variables will be displayed For details of the stack information file refer to the separate User s Manual for the SuperH RISC engine C C Compiler Assembler and the Optimizing Linkage Editor Double clicking a function in the Function column expands or reduces the tree structure display The expansion or reduction is also provided by the plus and minus keys Double clicking the Address column displays the source program or disassembled memory contents corresponding to the specific address Right clicking on the mouse within the window displays a popup menu Supported menu options are described in the following sections 104 Hitachi Debugging Interface User Manual 13 11 1 View Source Displays the source program or disassembled memory contents for the address on the selected line 13 11 2 View Profile List Displays the Profile List window 13 11 3 View Profile Chart Displays the Profile Chart window focused on the function in the specified line 13 11 4 Enable Profiler Toggles the collection of profile data When profile data acquisition is active a check mark is shown to the left of the text Profile data and performance analysis data cannot be acquired at the same time If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active when the Enable Analysis in
144. tachi Debugging Interface User Manual 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 13 13 1 Copy Only available if a block of text is highlighted This copies the selected text into the Windows clipboard allowing it to be pasted into other applications 13 13 2 Edit Launches the Register dialog box allowing the user to set the value of the register indicated by the text cursor not mouse cursor 13 13 3 Toggle Bit Only available if the text cursor is placed on a bit field e g a flag within a status register Changes the current state of the bit to its other state e g a set overflow flag can be cleared 13 14 Source The Source window can be used to view any source file that was included within the object file s debugging information this may be C C and assembly language i Tutorial c Iof x Line Address BP Label Source 00001012 _main void main void 00001018 L MDCR BIT MDS 0x6 ER printfi Sele 00001024 return 00001026 Lf SYSCR BYTE 0x01 00001030 SYSCR BYTE 0x1 00001038 BCRL BIT EAE 0 00001040 STOP_MODE Figure 13 27 Source View It supports column specific double click actions e BP Sets clears a PC breakpoint at that address Section 13 Windows 111 e Address Launches the Set Address dialog box allowing the user to enter a new address If
145. ted to show the code at the new address 20 Hitachi Debugging Interface User Manual If the new address is in another source file a new Source window opens to show the code at that address By default the new window shows source if it is available If no source is available for the new address then a Disassembly window shows assembly language code 4 3 1 Looking at the Current Program Counter Address Wherever you can enter an address or value into HDI you can also enter an expression see section 2 2 Data Entry If you enter a register name prefixed by the character the contents of that register will be used as the value in the expression Therefore if you open the Set Address dialog box and enter the expression PC the Source or Disassembly window display will go to the current PC address It also allows that you can display from an offset of the current PC by entering an expression with the PC register plus an offset e g PC 0x100 4 4 Finding Text You can search for a particular text string in the Source window using the find option To do this choose the Find menu option from the popup menu or use the F3 accelerator key The Find dialog box is displayed Find HE Find what localint Find Nest Direction Ta Cancel C Up Down Figure 4 7 Find Dialog Box Enter the text that you wish to find and click Find Next or press Enter The Source window will display the text if f
146. ters and these are used to set temporary PC breakpoints these breakpoints only exist for the duration of the command Syntax gt lt state gt lt address gt Parameter Type Description lt state gt Keyword Specifies whether or not to continue command processing during program execution optional default wait walt Causes command processing to wait until program stops continue Continues command processing during execution lt address gt Numeric Temporary breakpoint address list Wait is the default and this causes command processing to wait until the user program stops running Continue allows you to continue to enter commands but they may not work depending on the facilities of the debugging platform Example GO_TILL H 1000 Runs emulation until the PC reaches address H 1000 HALT Abbreviation HA Description Halts the user program can be used after a go continue command Syntax ha Parameter Type Description none Halts the user program Example HA Halts the user program 130 Hitachi Debugging Interface User Manual HELP Abbreviation HE Description Opens a window displaying the help file For context sensitive help the F1 key should be pressed Help on a particular command can be retrieved by entering HELP or HE followed by the command name at the command line Syntax he lt command gt Parameter Type Description none Displays the contents of the help lt command gt
147. the Performance Analysis window is checked a warning message box is displayed Performance Analysis is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If you continue and enable Profiling Performance Analysis will be disabled This will delete your current Performance Analysis data FEE cancel Figure 13 21 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When OK is clicked the performance analysis data acquisition is disabled and the profile data acquisition is enabled 13 11 5 Find Displays the Find Text dialog box to find a character string specified 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 Section 13 Windows 105 13 11 6 Find Data Displays the Find Data dialog box When the cursor is in the Function column this menu option is displayed in gray characters Find Data x Find Data Find Next Maximum pl Li i Cancel C Minimum Figure 13 22 Find Data Dialog Box By selecting the search type from the Find Data group and entering Find Next button or Enter key search is started If the Find Next button or the Enter key is input repeatedly the second larger data the second smaller data when the Minimum is specified is searched for 13 11 7 Clear Data Clears the number of times functions are
148. the address is within the range of this file then the view will scroll such that the cursor can be positioned correctly If the address is in a different source file then that file will be opened in a new window with the cursor set to the specified address Finally if the address does not correspond to a source file then a new Disassembly window will be opened When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function e Label Launches the Label dialog box allowing the user to enter a new label and edit the name of an existing label e Line Launches the Set Line dialog box allowing the user to go directly to a line in the source file Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking The currently selected standard breakpoint is shown by a check mark to the left of the menu text A popup menu containing the following options is available by right clicking in any of the other columns within the window 13 14 1 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 13 14 2 Find Launches the Find dialog box allowing the user to search the source file for a string 13 14 3 Set Address Launches the Set Address dialog box allowing the user to enter a new start address The window wi
149. the code in the function and any function calls that function may make and stop at the next line or instruction of the calling function To step over the function either click the Step Over toolbar button or choose the Run gt Step Over menu option 6 6 Stepping Out of a Function During debugging there are occasions when you may have entered a function finished stepping through the instructions that you want to examine and would like to return to the calling function without tediously stepping through all the remaining code in the function Or alternatively and perhaps more usefully you may have stepped into a function section 6 5 1 Stepping Into a Function by accident when you meant to step over it and so want to return to the calling function without stepping all the way through the current function section 6 5 2 Stepping Over a Function Call You can do this with the Step Out feature To step out of the current function either click the Step Out toolbar button W or choose the Run gt Step Out menu option 34 Hitachi Debugging Interface User Manual 6 7 Multiple Steps Sometimes you may find it useful to step several instructions at a time You can do this by using the Step Program dialog box The dialog box also provides an automated step with a selectable delay between steps Open it by choosing the Run gt Step menu option The Step Program dialog box is displayed Steps il Rate 1 Slowes y TT
150. ton the Add Memory Mapping dialog box will open it is the same as the Edit Memory Mapping dialog box but without any default values Enter the start and end addresses of the map range and the memory type setting for the new area If the new range is next to an existing range HDI will merge them as one sequential range Note Due to page length limitations in some emulators the range addresses may not exactly match the entered addresses 3 3 3 Status To check the configuration and status of the debugging platform in the System Status window choose the View gt Status menu Section 3 Preparing to debug 11 System Status CA ES Status Target Device Configuration H8S 2xxx Advanced mode ROM 00000000 000FFFFF RAM OOFFOOOO OOFFFFFF System Memory Resources Loaded Memory Areas No information 00001412 00000000 00000064 00000120 00000148 00000444 00001000 00001492 00001490 00000003 00000067 00000123 00000148 00000445 00001411 00001445 Session A Platform A Memory 4 Events Figure 3 4 System Status Window The System Status window is split into four panes 1 Session contains information about the current session including the connected debugging platform and the names of loaded files 2 Platform contains information about the current status of the debugging platform typically including CPU type and mode run status and timing information 3 Memory contains information about the current memory
151. tring File name Example SUBMIT Processes the file COMMAND HDC COMMAND HDC SU A SETUP TXT Processes the file SETUP TXT on drive A SYMBOL_ADD Abbreviation SA Description Adds a symbol or changes an existing one Syntax sa lt symbol gt lt value gt Parameter Type Description lt symbol gt String Symbol name lt value gt Numeric Value Example SYMBOL_ADD start H1000 Defines start to be H 1000 SA END_OF_TABLE 1000 Defines END_OF_TABLE to be 1000 using current default radix Appendix B Command Line Interface 141 SYMBOL_CLEAR Abbreviation SC Description Deletes a symbol If no parameters are specified deletes all symbols after confirmation Syntax sc lt symbol gt Parameter Type Description none Deletes all symbols lt symbol gt String Symbol name Example SYMBOL_CLEAR Deletes all symbols after confirmation SC start Deletes the symbol start SYMBOL_LOAD Abbreviation SL Description Loads symbols from file File must be in XLINK Pentica b format i e XXXXH name The symbols are added to the existing symbol table The symbol file extension default is SYM Syntax sl lt filename gt Parameter Type Description lt filename gt String File name Example SYMBOL_LOAD TEST SYM Loads the file TEST SYM SL MY_CODE SYM Loads the file MY_CODE SYM 142 Hitachi Debugging Interface User Manual SYMBOL_SAVE Abbreviation SS Description Saves symbols to a file in XLINK Pentica
152. u Les Temp2 Name x NAME u 226 227 u H 7E21 Figure 8 1 Tooltip Watch 8 2 Instant Watch To look at the variable in more detail use the Instant Watch feature To use Instant Watch 1 Open the Source window showing the variable that you want to examine 2 Click on the variable You should see a cursor on the variable 3 Choose the Instant Watch menu option from the popup menu 44 Hitachi Debugging Interface User Manual The Instant Watch dialog box opens Instant Watch x Add Watch Temp2 Name Hitachi Micro 0 D 72 H 1 D 105 2 D 116 t 3 D 97 a 4 D 99 c 5 D 104 h 6 D 105 1 7 D 32 y ro ae Y O Figure 8 2 Instant Watch Dialog Box You can add this variable to the list of watch items in the Watch window by clicking on the Add Watch button 8 3 Using Watch Items When you are debugging your program you may find it useful to be able to look at variables of interest and see their values at different times during the program HDI allows you to open Watch windows which contain a list of variables and their values To open a Watch window choose the View gt Watch menu option or click on the Watch Window toolbar button E if it is visible A Watch window opens Initially the contents of the window will be blank 8 3 1 Adding a Watch There are two ways to add watch items to the Watch window the quick
153. ugging Interface User Manual 12 44 GOTO CUTS OF eects Bin T TRE Eb ae a EE RE tb IR 78 1245 Set PC TO CUOL umna tune alii Larita 78 E RUN a de ine ei ee 78 TLALPAN EAE AAIE A E EEEE EA nd dico nec A E oda e ende ad O 78 LAO gt YStep OVers rimase A A E E EA AA N AR A de lo E 78 TERI TO OU a a a a deco clear a A te Heh 0d e LINDO code io sah RL 78 OS EAA T E NIE NIAAA A EAA AEA E T EAIA T EE E BE od 79 PEA dale alto tea AEE T crei iii E N AS AE E A E i 79 bi VNS ENORET de AT AAEE AEAT A AE AAAA AETA 79 E M 2 11 1 ETENEE EEE E ETE T EEE EATA E AESA 79 125277 LO E E A IE E doch mi ie EE AAA ad dd dina Lio 79 1253 SAV a A Bl le dico lisi E el on le cn lo 79 12 54 MY O A N N Laici 79 ES E cai tendono a Paini mario A Rotts a AB ini ahi 79 12 05 05 A RO A TA 80 PA AAA A CEAPE OEE OO 80 12 50 80 COMPA ta a A Sii ae OIL da 80 1239 Configura ME a A a tie rar 80 125 10 CONTIGUIC OVEN Vat e data 80 O SETUP e Le et Dr sl ao O rai re ii i pioli ce al oO E 80 12 61 Status Bar e O E A DO i Ad 80 12 6 2 OPON Sii ili alan nda ar ti 81 EN E VRAOM A A aiiui 81 126 4 174 AAA A A us a a Nec a 81 12 6 5 Configure Platform sc dd aa ali 81 WINDOW atti de A O An i ab Dal Te der n Mine cd 81 12 1 CAS CA rn e o I PRS PORE NE n e IE PON PR ROSIE SURO BRIBE PE OTT PRR EN PAE OPE 82 Paz letta ito STO EO e i e e ei 82 12 73 AUTANGC A Bese i I ER EE 82 12 14 CloseAll o cnc hi alone a nane Ri LA 82 8 HELP io ea aa 82 JN gt
154. uipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under cert
155. uted functions If a stack information file sni extension output from the optimizing linkage editor does not exist unexecuted functions are not displayed even if this checkbox is not checked The Include data of child function s checkbox sets whether to display information for a child function called in a function as profile data Section 13 Windows 107 13 12 Profile Chart Y Profile Chart _rand _rand _main HULL 3 Figure 13 24 Profile Chart Window This window displays the relation of calls for a specific function This window displays the calling relation for the function specified in the Profile List window or Profile Tree window The specified function is displayed in the middle the calling function on the left side and the called function on the right side Values beside the calling and called functions show the number of times the function has been called The Profile Chart window includes the following tool buttons e Expands Size e Reduces Size Right clicking on the mouse within the window displays a popup menu Supported menu options are described in section 13 12 3 View Source and in the subsequent sections 13 12 1 Expands Size ta Expands spaces between each function The plus key can also be used to expand spaces 13 12 2 Reduces Size a Reduces spaces between each function The minus key can also be used to reduce spaces 108 Hitachi Debugging Interface User Manual 13 12 3 Vi
156. v Splash screen T Download complete I Load memory successful I Verify memory successful I Labels loaded IT Delete breakpoint Delete all breakpoints I Delete PA range M Delete all PA ranges y Figure 11 12 HDI Options Confirmation Dialog Box Confirmation message boxes can be switched off or on by using the appropriate confirmation checkbox HDI Options Ea Session Confirmation Viewing Tab Size i Figure 11 13 HDI Options Viewing Dialog Box The Tab Size list box can be used to set the number of spaces that a tab character will be expanded to within the views Valid values are between 2 and 8 the best value will be the same as your normal editor 11 10 Setting the Default Input Radix HDI can accept input in several numerical bases The default is hexadecimal except Count fields which are always decimal but you can also use one of the prefixes described in section 2 2 2 Data Formats To improve usability you can select one of these formats as the default i e you will not need to enter the corresponding prefix to use that radix Section 11 Configuring the user interface 71 To change the default radix choose the Setup gt Radix menu option This will display a list of possible numbering systems with a check mark to the left of the current radix Hexadecimal w Decimal Octal Binary Figure 11 14 Setting Radix 72 Hitachi Debugging Interface User Manual Section 12 Menus 73 12
157. ve Session As menu option 74 Hitachi Debugging Interface User Manual 12 1 4 Save Session As Launches the Save As dialog box allowing the user to save the current session details under a new file name A session file contains the debugging platform s settings and the current program and the position of open child windows views it contains symbols breakpoints or current register values 12 1 5 Load Program Launches the Load Program dialog box allowing the user to select an object file in either S Record mot a20 and a37 extensions SYSROF abs extension or ELF DWARF abs extension format and download it to the debugging platform s memory This will also load the symbols if they are available in the selected file 12 1 6 Initialize 2 This will attempt to re initialize the debugging system It will close down any open child windows and shut down the link to the debugging platform If this is successful an attempt to re establish the link to the debugging platform will be made The message Link up will appear in the left most box of the status bar if this is successful See also section 12 4 1 Reset CPU 12 1 7 Exit This will close down the HDI The actions that are carried out by the HDI can be defined by the user in the On Exit section of the HDI Options dialog box See also section 12 6 2 Options 12 2 Edit The Edit menu is used for aspects of the program that access or modify data
158. y mapped It lists all address ranges covering the entire address space and the type of memory to which they are set internal or external to the emulator and any access restrictions they may have e g read only or guarded no access This includes those ranges set automatically by HDI and those you have set or modified 10 Hitachi Debugging Interface User Manual Additional information about the memory mapping can be viewed in the System Status window s Memory pane The Device Configuration area shows how the memory in the device s address space is configured according to the device type and mode selected in the Configure Platform dialog box and any on chip memory control settings The System Resources area shows the status of mapping resources available to the system For example in an emulator this will show the address ranges to which emulation memory has been allocated and which are currently available Clicking on the Reset button will set the system map setting back to the default for the current device type and mode To modify a map setting select it and click on the Edit button or double click on the map setting line Edit Memory Mapping Ed Memory Mapping To H 00FFEBFF Setting User Guarded ba Cancel Help Figure 3 3 Edit Memory Mapping Dialog Box You will then be able to modify the start and end addresses of the map range and the memory type setting To add a new range click on the Add but
Download Pdf Manuals
Related Search
Related Contents
HP C5100 User's Manual système électrique de la série 780 a été conçu essentiellement Sony D-E999 CD Player User Manual Descarga - Bienvenido a Suzuma Moto Manuel d`installation Clear Dry Classic User Manual Sérologie des infections sur prothèses ostéo 穨 C101-manual Copyright © All rights reserved.
Failed to retrieve file