Home
SH7410 E8000 Debugging Interface User`s Manual Tutorial
Contents
1. 0000007c fori i ktgap i lt 10 i itgap 0000008c for j i gap j gt k j j gap 00000098 if alj gt aljtgap 000000b0 t alj xl Figure 32 Source Window Before Step Over Execution 26 e To step through all statements in the change function at a single step select Step Over from the Run menu or click the Step Over button in the toolbar Figure 33 Step Over Button Al Hitachi Debugging Interface Sort E8000 Emulator Source Value 0x00003fd4 00000038 sortia H 00007d60 00000040 i a 0l H 00005eb4 00000044 al9 H 00005baf 00000048 i 0 H 00005aac D000004c max 0 H 00005a19 00000050 change a H 00005010 H 00003904 D000005c max a 0 H 0000Zald 00000060 H 00001fff H 0000161d 00000068 z void sortilong a H 00000000 long t int i j k gap o000006c gap 5 00000070 while gap gt 0 00000074 fori k 0 k lt gap k 0000007c fori i k gap i lt l0 i itgap 00000080 for j i gap j gt k j j gap 00000098 ifia j gt a ljtgapl 000000b0 t alj xl fa fa fa AN AM a cn sa ie E al 16 fi 8 2 Break STOP ADDRESS Figure 34 Source Window Step Over When the last statement of the change function is executed the data of variable a which is displayed in the Watch window is sorted in descending order 27 13 Displaying Local Variables The user can display local variables in a function using the
2. Execution count measurement mode control of performance function ECNT Option l Upper default setting Cache access trace control Enable the Cache access trace Invalid default setting Multi break function Enable the multi break of External probe No 1 2 Invalid default setting UBC control Enable UBC for user program Invalid default setting Trigger output control 1 at break TRGU Option Upper default setting Trigger output control 2 at break TRGB Option Upper default setting e Click the OK button to set any changes in the configuration 4 2 Setting the Memory Map In the next step allocate the emulation memory for the developing application Select Configure Map from the Memory menu to display the current memory map The Memory Mapping dialog box is displayed Memory Mapping x From To Mapping Target Device configuration System memory resources X ROM AREA Z RAM AREA Y ROM AREA Y RAM AREA INTERNAL 1 0 08000000 REMAINING EMULATION MEMORY S O800F000 08010000 0801F000 ocoooo00 a x Map type Memory y seo Figure 5 Memory Mapping Dialog Box Note When the SH7612 E8000 HDI is used the information displayed in the Target Device Configuration is different from that shown in figure 5 The emulator can allocate the optional memory area as one of the following two types Table 3 Memory Type Memory Type Description U
3. Tutorial Renesas Electronics com www renesas Cautions Hitachi neither warrants nor grants licenses of any rights of Hitachi s or any third party s patent copyright trademark or other intellectual property rights for information contained in this document Hitachi bears no responsibility for problems that may arise with third party s rights including intellectual property rights in connection with use of the information contained in this document Products and product specifications may be subject to change without notice Confirm that you have received the latest product standards or specifications before final design purchase or use Hitachi makes every attempt to ensure that its products are of high quality and reliability However contact Hitachi s sales office before using the product in an application that demands especially high quality and reliability or where its failure or malfunction may directly threaten human life or cause risk of bodily injury such as aerospace aeronautics nuclear power combustion control transportation traffic safety equipment or medical equipment for life support Design your application so that the product is used within the ranges guaranteed by Hitachi particularly for maximum rating operating supply voltage range heat radiation characteristics installation conditions and other characteristics Hitachi bears no responsibility for failure or damage when used beyond the guara
4. 00000038 00000040 00000044 00000040 00000050 00000058 0000005c 00000060 00000068 oo000006c 00000070 00000074 0000007 00000080 00000098 000000b0 le fa a fa aN AA e Gr LN Gz Ey E a 10 8 2 gt Source Value 0x00003fd4 sortia H 0000161d min a 0l H 00001fff al9 l H 0000Zald H 00003904 max 0 H 00005010 change a H 00005a19 min a 9 H 00005aac max a 0 H 00005baf H 00005eb4 H 00007d60 void sort long a H 00007d60 long t int i j k gap gap 5 while gap gt 0 fori k 0 k lt gap k 4 fori i k gap i lt 10 i itgap for j i gap j gt k j j gap if alj gt aljtgapl t alj zl For Help press F1 Figure 31 Source Window Step Out gt Step In The value of max displayed in the Watch window is changed to the maximum data value 25 12 3 Executing Step Over Command The Step Over executes a function call as a single step and stops at the next statement of the main program e To demonstrate the Step Over command execute two steps to reach the change function statement inti Sort c of OP x Source 00000038 sortia 00000040 in a 0 00000044 al9 00000048 in 0 NNNNA D 000000583 in a 9 D000005c a 0 00000060 00000068 void sort long a 1 long t int i j k gap o000006c gap 5 00000070 while gap gt O 4 00000074 for k 0 k lt gap k
5. Locals window For example the local variables in the main function which declares five local variables a j i min and max will be examined e Select Locals from the View menu The Locals window is displayed Initially the Locals window is empty because local variables have not yet been declared e Select Step In from the Run menu to execute a single step The Locals window will now show the local variables and their values Locals IO _ OP x Value Ox00003fd4 D 8410 D 10 D O D O Figure 35 Locals Window e Double click the symbol to the left of array a in the Locals window to display the elements of array a e Refer to the elements of array a before and after the execution of the sort function and confirm that random data is sorted in ascending or descending order 28 14 Setting the Hardware Break Conditions The emulator has powerful hardware break functions In the HDI these hardware break conditions can be set by using dialog boxes The dialog boxes for setting hardware break conditions and the corresponding break conditions are described below Table 5 Dialog Boxes for Setting Hardware Break Conditions Function Address External Satis Bus Data Bus Status Probe Interrupt faction DELAY Condition Condition Condition Condition Condition Count Condition Dialog Box Address Data Status Probe Interrupt Count Delay Break Condition O O O X X O
6. Setup menu to select a font and size suitable for the host computer Initially the Source window shows the start of the main program but the user can use the scroll bar to scroll through the program to see the other statements 11 6 Setting the Software Breakpoint A breakpoint is one of the easy debugging functions The Source window provides a very simple way of setting a breakpoint For example to set a breakpoint at the sort function call e Double click the BP column on the line containing the sort function call The word e Break will be displayed on the line containing the sort function to show that a software breakpoint is set at that address Source void main void long a 10 long 3 int i min max 00000004 fori i O i lt 10 i 34 0000000 j rand 00000014 if j lt 0 4 00000018 j 3 5 oo00001c ali 3 00000038 sortia 00000040 min alO 00000044 max a 9 00000048 min 0 o000004c max 0 00000050 change a 00000058 min a 9 0000005c max 00000060 Figure 11 Source Window Setting a Software Breakpoint Note The software breakpoint cannot be set in the ROM area However in SH7410 E8000 it can be set in the internal ROM area 12 7 Setting Registers Set values of the program counter and the stack pointer before executing the program e Select Registers from the View menu The Registers window is displayed El Registers ol 101 x Register Valu
7. before downloading the program e Device type e Bus width in the CSO area e Clock mode e Operating clock e Execution operating mode e Memory map The following describes how to set up the emulator correctly for the tutorial programs 4 1 Setting the Configuration Dialog Box Select Configure Platform from the Setup menu to set configuration The following dialog box is displayed Configuration AE xj SH7410 E 32 bit External memory Clock Mode 0 Figure 4 Configuration Dialog Box 5 Set options as follows Table 2 Setting the Configuration Dialog Box Option Bus width in the CSO area CSO Area Bus Width Value 32 bits External memory Clock mode Clock Mode Clock Mode 0 Emulation clock Clock Emulator Clock using the emulator clock Emulation mode Emulation mode Normal normal execution Memory access enable disable during execution Read Write on the fly Enable no check Program counter display interval Execution status display interval About 200 ms default setting Timer resolution The minimum time to be measured by Go command execution 1 6 us default setting Bus width of the emulation memory Emulation memory bus width b 32 bit bus width default setting User wait control Enable user wait Invalid default setting BREA signal control Enable the BREA signal input Invalid default setting
8. 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
9. to display the popup menu Select Delete All to clear all the set break points e Display the popup menu and select Add The Break dialog box is displayed Breakpoints File Line Address Figure 43 Breakpoints Window Before Sequential Break Condition Setting 39 The Break dialog box appears To set sequential break conditions select Condition UBC and display the Condition UBC page Point Sequence Condition ConditionB Condition C Condition UBC Condition 1 Empt Figure 44 Break Dialog Box Break Condition UBC Page 40 Set Break Condition 2 of the sequential break conditions to Break Condition UBC2 and set Break Condition 1 to Break Condition UBCI e Highlight the second line in the Condition list box e Click the Edit button The Break Condition UBC2 dialog box will appear e Make the Don t Care check box in the Address page invalid e Select the Address radio button and enter the address H 48 as the value in the Address edit box Break Condition UBC2 x Address Bus State Address FT Don t Care Address Prefetch address break before executing Prefetch address break after executing Address E 48 Nonusermask Usermask Mest Y Cancel Figure 45 Break Condition UBC2 Dialog Box Condition 2 Address Page 41 e Select Bus State to display the Bus State page e Select the Read radio button Brea
10. 0 j rand 00000014 ifij lt 014 00000018 a Mi 1 oo00001c alil 00000040 00000044 000000483 min 0 D0000D4c max D 00000050 change a 00000058 min a 9 0000005 max a 0 00000060 al9 Figure 16 Source Window Break State 15 The user can see the cause of the last break in the System Status window Select Status from the View menu The System Status window is displayed e Select the Platform sheet from the System Status window System Status el OP x Item Status Connected To E8000 SH 410 Emulator CPU SH 7410 CSO Area Bus Width 32Bit External Memory Clock Mode Clock Mode 0 Clock source Enulator Run status Break Cause of last break BREAKPOINT Interval Time Count 2 gt 1 MAX 2 gt 1 MIN 2 gt 1 AVE 2 gt 1 Run Time Count D 0000H 00M 005 00000705 700NS 4 y Session y Platform 4 Memory A Events f 3 3 22 Figure 17 System Status Window The Cause of last break line shows that the cause of the break is the breakpoint Note When the SH7612 E8000 HDI is used the information items displayed on the Connected To and CPU lines are different from those of the SH7410 E8000 HDI 16 9 Reviewing Breakpoints The user can see all the breakpoints set in the program in the Breakpoints window e Select Breakpoints from the View menu Breakpoints O 104 x File Line sort c Z1 00000038 Program Figure 18 Breakpoints Window The Breakpoints window al
11. 1 Breakpoints Window Break Condition A Setting 36 15 Setting the Sequential Break Conditions The emulator has powerful sequential break functions In the HDI these sequential break conditions can be set by using dialog boxes The dialog boxes for setting sequential break conditions and the corresponding sequential break functions are described below Table 7 Dialog Boxes for Setting Sequential Break Conditions Function Address External Bus Data Bus Status Probe Interrupt Satisfactio DELAY Condition Condition Condition Condition Condition n Count Condition Dialog Box Address Data Status Probe Interrupt Count Delay Break Condition O O O X X O X UBC1 dialog box Break Condition O X O X X X X UBC2 dialog box Break Sequence O X X X X Xx X dialog box Note O Can be set in the dialog box X Cannot be set in the dialog box Table 8 Main Sequential Break Functions Sequential Break Function Description Break Sequence A sequential break function using software breaks Up to 7 address points and 1 reset point address can be set When all the set points are passed in sequence the program is stopped Break Condition UBC1 2 Sequential break functions by combining satisfaction conditions of hardware break conditions i e Break Condition UBC1 and 2 Program execution is halted when conditions are satisfied in the order of UBC2 and UBC1 Sequential break mode UBC 2 gt 1 After passin
12. 1 1 000011 00000122 BT H 0074 8 00000128 O0097 d0 EXT R PRG 1111 1 1 00000124 ADD H 18 R15 000010 00000126 RTS 0000012c 1f4bel00 000009 00000128 NOP 00000040 53 41 31 min a 0 000008 00000040 MOV L H 10 4 R15 R3 00000044 52f d2 22 000007 00000042 MOV L R3 H 04 4 R15 00000048 e3001 31 000006 00003 d4 0000161b 00000044 MOV L H 34 4 R15 R2 000005 00003f c8 0000161b 000004 00000046 MOV L R2 R15 0000004c e2002 22 000003 00003 8 00007e70 min 0 00000048 MOV H 00 R3 000002 00003 c4 00007e70 000001 00000050 64f37410 000000 see ES000 Figure 51 Trace Window Free Trace Results Note When the SH7612 E8000 HDI is used IRL is displayed instead of IRQ 46 16 2 Setting the Trace Filter By setting the specific search conditions it is possible to display only the trace contents that match the search conditions in the Trace window Table 9 Main Trace Search Conditions Break Condition Address bus condition Address Description Searches for an item that matches the CPU address bus value Data bus condition Data Searches for an item that matches the CPU data bus value Access data size byte word or longword can be specified Bus status condition Bus amp Area There are three bus state condition settings Read write condition Searches for an item for which the CPU R W signal level matches the specified conditions Bus state condition Searches
13. SER AREA Sets the address range of the emulation memory area EMULATION AREA Read Only Sets the emulation memory area to be write protected When the Add button is clicked the Edit Memory Mapping dialog box is displayed Edit Memory Mapping x Memory Mapping Erom H o0000000 To H 000FFFFF Setting EMULATION AREA Cancel Help Figure 6 Edit Memory Mapping Dialog Box For this tutorial allocate the memory area of addresses ranging from H 00000000 to H 000FFFFF as an emulation memory area e Set the From and To edit boxes to H 00000000 and H OOOFFFFF respectively set the Setting combo box to EMULATION AREA and click the OK button The Memory Mapping dialog box will now show the modified ranges e Click the close box X in the upper right corner of the Memory Mapping dialog box to close the window 5 Downloading the Tutorial Program 5 1 Downloading the Tutorial Program Download the object program to be debugged e Select Load Program from the File menu The Load Program dialog box is displayed e Click the Browse button The Open dialog box is displayed e Select the file Sort abs in the Tutorial directory and click the Open button Load Program Ea Offset Open f 2 IV Verity Cancel File name jc ESOO A TUTORIALS ort abs y Figure 7 Load Object File Dialog Box e Click the Open button in the Load Program dialog box When
14. 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
15. X UBC1 dialog box Break Condition O X O X X X X UBC2 dialog box Break Condition A O O O O O X X dialog box Break Condition B O O O O O O O dialog box Break Condition C O X O X X X X dialog box Notes 1 O Can be set in the dialog box X Cannot be set in the dialog box 2 Eight breakpoints can be set independently in each of the Break Condition A B C dialog boxes 3 Only Break Condition B7 can be set for the DELAY condition in the Break Condition B dialog box 29 Table 6 Main Break Conditions Break Condition Address bus condition Address Description Breaks on a match of the CPU address bus value Data bus condition Data Breaks on a match of the CPU data bus value Byte word or longword can be specified as the access data size Bus state condition Bus State There are two bus state condition settings Read write condition Breaks when the CPU R W signal level matches the specified conditions Bus state condition Breaks when the operating state in the CPU memory access cycle DMA cycle or vector fetch cycle matches the specified conditions External probe signal condition Probe Breaks when an external probe signal PRB1 to PRB4 level matches the specified conditions Interrupt signal condition Interrupt Breaks when the NMI signal or an external interrupt signal IRQO to IRQ3 level matches the specified conditions Satisfaction Count Count B
16. 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
17. automatic loading of session files Session information is loaded automatically from the specified file when the HDI session is ended Refer to the Hitachi Debugging Interface User s Manual issued separately for a detailed description of session settings and of the way to set them 60
18. e RO 00000000 Rl 00000000 RZ 00000000 R3 00000000 R4 00000000 RS 00000000 R6 00000000 R 00000000 RS 00000000 R9 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Figure 12 Registers Window e Double click PC in the Registers window to change the value of the program counter PC 13 The following dialog box enables the value to be changed Register PC Ed Value Set As Whole Register pr Cancel Figure 13 Register Dialog Box PC e Set main in this sample program and click the OK button e Double click R15 in the Registers window to change the value of the stack pointer R15 In the same way of setting the program counter the stack pointer can be changed by the Register dialog box Register R15 Ed Value 44000 Set s Whole Register Cancel Figure 14 Register Dialog Box R15 e Set H 4000 for the value of the stack pointer in this sample program and click the OK button 14 8 Executing the Program e To execute the program select Go from the Run menu or click the Go button on the toolbar Figure 15 Go Button The program will be executed up to the breakpoint that has been inserted and a statement will be highlighted in the Source window to show the position that the program has halted Label Source _nain void main void long a 10 long 3 int i min max 00000004 fori i 0 i lt 10 i 34 000000
19. e Trace Filters sssic cic cecvcsssisvecsetssiesstesscescebtecusctsseegssseees gehsve sted esvhastedsvasdenaseee 47 Setting the Trace Acquisition Conditions ooooonccnoccnccnonnconnconoconocnoco nono non nono nono nonn crac crincnnnono 52 SS sea EEEE EEEE EEPE EEE EEEE EEE SE ES 60 1 Introduction This tutorial is a modified version of Section 3 Tutorial in the SH7410 ES000 Hitachi Debugging Interface User s Manual for the SH7410 E8000 Hitachi debugging interface hereafter referred to as HDI Refer to this tutorial when using the HDI The following describes a sample program for sorting random data in order to introduce the main functions of the HDI The sample program performs the following actions e The main function generates 10 pieces of random data to be sorted e The sort function sorts the random data in ascending order e The change function changes the data in descending order Table 1 shows the configuration of the sample program Table 1 Configuration of Sample Program Item No Item Description 1 Tutorial file SORT ABS load module in the SYSROF format 2 Tutorial file source file SORT C Note In this section the SH7410 E8000 HDI is used to simplify the explanation When the SH7612 E8000 HDI is to be used refer to the notes in each description 2 Running the HDI To run the HDI select the Hitachi debugging Interface from the Start menu 38000 Emulator Software vi bers Al Hitachi Debugging I
20. e user program until the program breaks If Trace Condition A B C is not set this mode is entered Subroutine trace Performs trace acquisition of instructions or operand accesses between the start address and end address of the specific subroutine with Trace Condition B C Range trace Performs trace acquisition only for places where the conditions specified by Trace Condition A B C are satisfied Specifiable conditions are Address bus condition Data bus condition Read write condition Bus status condition DMA cycle execution cycle and vector fetch cycle System control signal BREQ External probe condition Trace stop Stops trace acquisition when the conditions specified by Trace Condition A B C are satisfied Specifiable conditions are Address bus condition Data bus condition Read write condition Bus status condition DMA cycle execution cycle vector fetch cycle System control signal BREQ External probe condition DELAY condition Subroutine range trace Performs trace acquisition only for places where a subroutine instruction and an operand that have been specified by Trace Condition B are accessed and that the conditions are satisfied 53 An example is given below in which trace stop mode in which address bus condition and read cycles for bus state condition are set is selected for Trace Condition A as the trace function Click the right mouse button on the Trace window to disp
21. for an item for which the conditions of CPU memory access cycle DMA cycle or vector fetch cycle match the specified conditions Area condition Searches for an item for which the memory space accessed in an CPU bus cycle matches the specified conditions External probe signal condition Probe Searches for an item for which an external probe signal PRB1 to PRB4 level matches the specified conditions Interrupt signal condition Interrupt Searches for an item for which the levels of the NMI signal external interrupt signals IRQO to IRQ3 and the RESET signal matches the specified conditions Time condition Time Searches for an item for which the time stamp value or range matches the specified conditions Note When the SH7612 E8000 HDI is used the operation state during a refresh cycle can be checked In addition the external interrupt signal is displayed as IRL instead of IRQ Click the right mouse button on the Trace window to display the popup menu For the trace search conditions click the Filter button The Trace Filter dialog box then appears 47 The filter conditions that limit the cycles to be displayed in the trace buffer can then be set e Select the Pattern radio button in Type Figure 52 General Page Trace Filter Dialog Box 48 e Select Address to display the Address page e Clear the Don t Care check box in the Address page e Select Address and
22. function and stops at the next statement that called the function in the program Step Steps the specified counts repeatedly at a specified rate To demonstrate program stepping confirm that the sort function statement at address H 00000038 has been executed Source void main void long a 10 long 3 int i min max 00000004 fort i 0 i lt lO i 0000000 j rand 00000014 ifij lt Of 00000018 Jj j 0000001c ali 00000040 00000044 00000048 0 D000004c max D 00000050 change a 00000058 0000005 00000060 al9 Figure 26 Source Window Step Execution 22 12 1 Executing Step In Command The Step In steps into the called function and stops at the first statement of the called function e To step through the sort function select Step In from the Run menu or click the Step In button in the toolbar Source 00000038 Break sort a 00000040 min a 0 00000044 max al9 00000048 min D oo000004c max 0 00000050 change a 000000583 min a l91 D000005c max a 0 00000060 long t int i j k gap 0000006c gap 5 00000070 while gap gt O 4 00000074 fori k 0 k lt gap k 0000007c fori i ktgap i lt 10 i itgap o000008c for j i gap j gt k j j gap 00000098 if alj gt aljt tgap 000000b0 t aljl y Figure 28 Source Window Step In The highlighted line moves to the first statement of the sort function in the Source wi
23. g the reset point addresses these functions make sequential break conditions already passed so far invalid and resume checking break conditions from the first one 37 An example is given below in which Sequential break mode UBC2 gt 1 is set as the sequential break function Before executing the program change the Configuration dialog box When not changing it the sequential break does not function e Select Configure Platform from the Setup menu and the Configuration dialog box will appear e Select Sequential break mode UBC2 gt 1 from the Emulation Mode combo box Configuration 32 bit External memory Figure 42 Configuration Dialog Box When Sequential Break is Set e Click the OK button 38 An example is given below in which Break Condition UBC1 and Break Condition UBC2 of the sequential break conditions are set Set break conditions as follows Break condition 1 A break is executed when address H 58 is accessed in a read cycle Break Condition UBC1 Break condition 2 A break is executed when address H 48 is accessed in a read cycle Break Condition UBC2 After break condition 2 is satisfied and break condition 1 is satisfied in succession a program being executed will stop Then set the sequential break conditions e Select Breakpoints from the View menu The Breakpoints window is displayed e Click the right mouse button on the Breakpoints window
24. input address H 48 as the value in the Start edit box Figure 53 Address Page Trace Filter Dialog Box 49 e Select Bus amp Area to display the Bus amp Area page e Select the Read radio button Trace Filter Figure 54 Bus amp Area Page Trace Filter Dialog Box e Click the OK button to save the trace filter Note When the SH7612 E8000 HDI is used the Ref radio button and Cache Hit button are displayed 50 Figure 55 Trace Window Trace Filter Results Note When the SH7612 E8000 HDI is used IRL is displayed instead of IRQ 51 17 Setting the Trace Acquisition Conditions The emulator has powerful realtime trace functions Trace information for up to 131 070 bus cycles can be acquired In the HDI trace acquisition conditions can be set by using dialog boxes The dialog boxes for setting trace acquisition conditions and the corresponding trace functions are described below Table 10 Dialog Boxes for Setting Trace Acquisition Conditions Function Subroutine Range Trace Subroutine Dialog Box Trace Trace Stop Range Trace Trace Condition A dialog box X O O X Trace Condition B dialog box O O O O Trace Condition C dialog box O O O X Note O Can be set in the dialog box X Cannot be set in the dialog box 52 Table 11 Main Trace Functions Trace Function Free trace Description Acquires trace information continuously from the start of execution of th
25. k Condition UBC2 Figure 46 Break Condition UBC2 Dialog Box Condition 2 Bus State Page e Click the OK button 42 e The Break dialog box is displayed and the second point display in the Condition list box changes from Empt y to Enable Point Sequence Condition 4 ConditionB Condition C Condition UBC Condition 1 Empt Edit Reset Reset All Figure 47 Break Dialog Box After Break Condition UBC2 Condition Setting This completes the setting of break condition 2 Next set break condition 1 as follows e Highlight the first point in the Condition list box e Click the Edit button The Break Condition UBC1 dialog box is displayed Break condition 1 can be set in the same way as for break condition 2 e After setting break conditions 1 and 2 click the Close button 43 Break Condition UBC1 and Break Condition UBC2 are displayed in Type in the Breakpoints window Breakpoints File Line Type sort c 27 00000058 Break Condition UBCI sort c 24 000000485 Break Condition UBC2 Figure 48 Breakpoints Window After Sequential Break Condition Setting e Set the program counter and the stack pointer set in 7 Setting Registers in the Register window and click the Go button The program is executed up to the conditions of Break Condition UBC1 and comes to a halt Source 00000038 sortia 00000040 min a 0 00000044 max a l91 00000048 min D 00000040
26. lay the popup menu e Select Acquisition to display the Trace Acquisition dialog box Trace Acquisition nl Aoo Figure 56 Trace Acquisition Dialog Box For trace acquisition conditions the Trace Acquisition dialog box pages required for the setting must be selected 54 e Select Condition A to display the Condition A page Trace Mode Condition A Condition B Condition C Condition Farce Apply Help Figure 57 Condition A Page Trace Acquisition Dialog Box e Highlight the first point in the Condition list box e Click the Edit button 55 e The Trace Condition A1 dialog box is displayed Trace Condition Al xi Address Data Bus State Probe Interupt 2 ol Figure 58 General Page Trace Condition A1 Dialog Box e Select Trace Stop radio button as Mode in the General page e Select Address to display the Address page 56 e Clear the Don t Care check box in the Address page e Select Address and input H 48 as the value in the Start edit box Trace Condition Al Figure 59 Address Page Trace Condition A1 Dialog Box 57 e Select Bus State to display the Bus State page e Select Read radio button Trace Condition Al Figure 60 Bus State Page Trace Condition A1 Dialog Box e Click the OK button 58 The Trace Acquisition dialog box is displayed and the first point displa
27. max 0 00000050 change a DODOOOSc max a 0 00000060 00000068 void sort long a long t int i j k gap oo000006c gap 5 00000070 while gap gt 0 00000074 fori k 0 k lt gap ktt 0000007c fori i k gap i lt l0 i itgap oo00008c for j i gap j gt k j j gap 00000098 if aljlralitgapl 000000b0 t alj Figure 49 Source Window at Execution Halt Sequential Break 44 The contents of the System Status window are as follows System Status gt 04 Item Status Connected To E8000 SH7410 Emulator CPU SH7410 CSO Area Bus Width 32Bit External Memory Clock Mode Clock Mode 0 Clock source Emulator Run status Break Cause of last break BREAK CONDITION SB R Session Plater e A Bes 7 Figure 50 Contents of System Status Window Sequential Break Note When the SH7612 E8000 HDI is used the information items displayed on the Connected To and CPU lines are different from those of the SH7410 E8000 HDI 45 16 Using the Trace Buffer 16 1 Displaying the Trace Buffer The contents of the trace buffer can be displayed in the Trace window e Select Trace from the View menu to open the Trace window e If necessary adjust the column width by dragging the column divider beside the label immediately below the title bar x records no filter Cycle Label Pc code lab DB areal R w status ro mm RES BRE 000012 00003fac 00000000 EXT R DAT 111 1
28. ndow 23 12 2 Executing Step Out Command The Step Out command steps out of the called function and stops at the next statement that called the function in the program e To step out of the sort function select Step Out from the Run menu or click the Step Out button in the toolbar Figure 29 Step Out Button Al Hitachi Debugging Interface Son S E8000 Emulator Ele Edt View Bun Memoy Setup Window Help Source Value Ox00003f a4 00000038 Break sortia H 0000161d H 00001fff 00000044 a 9 H 0000Zald 00000048 in 0 H 00003904 0000004c max 0 H 00005010 00000050 change a H 00005a19 00000058 min al9 l H 00005aac 0000005c max al0 H 00005baf 00000060 H 00005eb4 H 00007d60 00000068 void sort long a H 00000000 long t int i j k gap oo00006c gap 5 00000070 while gap gt 0 00000074 fori k 0 k lt gap k 4 0000007c fori i ktgap i lt l0 i itgap o0000008c for j i gap j gt k j j gap 00000098 if aljl gt aljitgap l 000000b0 t aljl xl a fa fa ay Ae i a ea du E ab a 10 8 2 dl For Help press F1 Figure 30 Source Window Step Out The data of variable a displayed in the Watch window is sorted in ascending order 24 e To execute two steps use Step In twice Al Hitachi Debugging interface Sort S E8000 Emulator Il File Edit View Run Memory Setup Window Help Line Address
29. 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
30. nocnnocononnnonn nono crac cnn cnnncnnecnnes 10 Setting the Software BreakpOiMt oooocnncnncnnonnconcconoconccononnnonnccnncnnnonnnonnncnn cnn nnnnnonn canon necnneo 12 Setting REGISELS seve 3g erora E E E E EE E see E EEE EEEO Eai 13 Executing the Program ici 15 Reviewing Break polis ects ee a AE a EE EE AE Tareahi 17 Viewing Memory acta dai ini pi 18 Watching Variables cocos cotas veeskegsdepchpasssnsnnsoeeshetsoaesbeaseeg ieabecesibedbes saesaeds 19 Stepping Through a Progr osise eisean Es nono nonn ES ESEESE Kea or E oe 22 12 1 Executing Step In Command ooooonccnccnoconoconononanconoconocnocn nono nonnnonnnrnn crono espiri tiesto ki 23 12 2 Executing Step Out CoMMANO c ooonoccnocnnoccnanconoconocononnnonononnncnnnrononnnrnn cnn oran nnnc cn nccnnes 24 12 3 Executing Step Over CommMadd oooonncnnncnnccnonnconoconccononononnnonnnonnnonn cnn conc cnn ncnnncanecnnos 26 Displaying Local Variables oononnncnonnnncnonnnonnncnnnancnnnconoco nono nonn nono nonn nono n cnn nrnn crac ona nc necanecnnos 28 Setting the Hardware Break Conditions oooooccoccnocnnocnooncnnnnonnonnconoconocn no conc nono na nonn crac cnncnnnons 29 Setting the Sequential Break Conditions oooconocnnocnccnoonconoconoconoconocn nono nonnc nono nononnnrnncrncnnnons 37 Using the Trace Buttes cuecen cocpciostao cases ver savass os pesonas iaa EE TE EEEE 46 16 1 Displaying the Trace Buffer 0 eee eeeeeeceseceecesecaecneecaeecaeeeaeseeeeaeseeeseeeeeees 46 16 2 Setting th
31. nteed ranges Even within the guaranteed ranges consider normally foreseeable failure rates or failure modes in semiconductor devices and employ systemic measures such as fail safes so that the equipment incorporating Hitachi product does not cause bodily injury fire or other consequential damage due to operation of the Hitachi product This product is not designed to be radiation resistant No one is permitted to reproduce or duplicate in any form the whole or part of this document without written approval from Hitachi Contact Hitachi s sales office for any questions regarding this document or Hitachi semiconductor products uno 13 14 15 16 17 18 Contents IntrodUCHON ini nie ici 1 Runnms the HDP iaa ide di dd 2 Selecting the Target Platform 2 c c sccsscesces sscnsseseeeasevechonssencneqes ETE EEE E a 3 Setting up the EmulatO TF siene nenien eiie eee E E Eea see ias den entro Ii E 5 4 1 Setting the Configuration Dialog BOX essssesssseesssreessrsressrsreeresreerssrerresesrenseersee 5 4 2 Setting the Memory Map ssseessseesesesesesrsreseeesesreresserresrestenresterrssertentesresteseeereseeereee 7 Downloading the Tutorial Program sesssssesssseessseeesssererssrsresresrenrssrerrsesrenresreetssreersseeeee 9 5 1 Downloading the Tutorial PrograM ooooonnnnnncnnnnnonnconnconoconocononnnonanonn nro cnn conc cn ncconoo 9 5 2 Displaying the Source PrograM ooooonnncnnonnonnnonnconcnnnconoc
32. nterface Figure 1 Start Menu 3 Selecting the Target Platform The HDI supports two target platforms the E8000 SH7410 emulator and the E8000 SH7612 emulator When the HDI is initiated the dialog box for selection of the platform for the current session appears Select the E8000 SH7410 Emulator Note When the E8000 SH7612 emulator is to be used select the E8000 SH7612 Emulator Select Session Ed E8000 SHxxxx Emulator y 2 Exit Previous session file ad E Figure 2 Select Session Dialog Box To change the target platform select New Session from the File menu When the emulator is correctly set the HDI window appears together with the Link up message in the status bar The details of the HDI window are described in the following sections PEZ htertace E8000 SHxxxx Emulator D7 File Edt View Bun Memory Setup Window Help em ETA EEI CEEE EEEREN EEEE APeas e f fa a a aS amp a a E ES e a A ee E By Figure 3 HDI Window Numbers in figure 3 indicate the following 1 Menu bar Indicates the HDI command menus for the use of the HDI debugger Toolbar Contains convenient buttons as shortcuts of menu commands most frequently used Status bar Indicates the state of the emulator and progress information about downloading Help button Activates the HDI on line help 4 Setting up the Emulator The following CPU conditions must be set up
33. ondition A hardware break conditions e Highlight the first point in the Condition list box e Click the Edit button The Break Condition A1 dialog box is displayed 32 e Clear the Don t Care check box in the Address page e Select the Address radio button and input address H 5A as the value in the Start edit box Break Condition A1 Figure 38 Address Page Break Condition A1 Dialog Box e Select Bus State to display the Bus State page e Select the Read radio button 33 Break Condition A1 Figure 39 Bus State Page Break Condition A1 Dialog Box e Click the OK button e The Break dialog box is displayed and the first point display in the Condition list box changes from Empt y to Enable 34 ConditionB Condti mC Condition UBC Point Sequence Condition 4 Condition Reset Reset All Bange Figure 40 Break Dialog Box After Hardware Break Condition Setting e Click the Close button 35 The newly set hardware breakpoint is displayed in the Breakpoints window With this setting Break Condition A1 is displayed in Type in the Breakpoints window This completes the setting of the Break Condition Al hardware break conditions When the program is executed a break will occur when address H SA is accessed in a read cycle Breakpoints OL OP x File Line sort c 21 00000038 Progran sort c 27 00000054 Break Condition Al Figure 4
34. ox e Click the Add Watch button to add a variable to the Watch window Watch Window 01 x Value Ox00003fd4 Figure 22 Watch Window Displaying the Array The user can also add a variable to the Watch window by specifying its name e Click the Watch window with the right mouse button and select Add Watch from the popup menu The following dialog box will be displayed Add Watch ES Address Er e Yerable onerpression Cancel Figure 23 Add Watch Dialog Box e Input variable max and click the OK button 20 The Watch window will now also show the long type variable max Watch Window 04 x Value Ox00003fd4 H 00000000 Figure 24 Watch Window Displaying the Variable Double click the symbol to the left of any variable in the Watch window to expand the variable and watch all the elements in the array Watch Window Al x Value Ox00003fd4 H 00005010 H 00001fff H 00005al9 H 00005baf H 00007d60 H 0000Zald H 00003904 H 00005aac H 00005eb4 H 0000161d H 00000000 Figure 25 Watch Window Displaying Array Elements 21 12 Stepping Through a Program The HDI provides a range of step menu commands that allow efficient program debugging Table 4 Step Option Menu Command Description Step In Executes each statement Step Over Executes each statement A function call is executed in a single step Step Out Steps out of a
35. reaks when all the above conditions have been satisfied the number of times specified in this condition A maximum count of 65 536 can be specified DELAY condition Delay Breaks when all the above conditions have been satisfied and the bus cycles specified in this condition have been executed A maximum of 32 767 bus cycles can be specified Note When the SH7612 E8000 HDI is used the external interrupt signal IRL is displayed instead of IRQ 30 An example is given below in which the address bus condition and read cycles for state condition are set in Break Condition A as hardware break conditions e Select Breakpoints from the View menu The Breakpoints window is displayed e Click the right mouse button on the Breakpoints window to display the popup menu e Select Add to display the Break dialog box Breakpoints Oo 01 x File Line sort c 21 00000038 Figure 36 Breakpoints Window Before Hardware Break Condition Setting For hardware break conditions the Break dialog box pages required for the setting must be selected e Select Condition A to display the Condition A page 31 ConditionB Condti mC CondiiomUBC Point Sequence Condition A Condition Reset All Figure 37 Condition A Page Break Dialog Box Up to eight breakpoints can be set independently for the Break Condition A B C hardware break conditions In the example one point is set for the Break C
36. 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 ENESAS C 7 D SL 7 lt D gt D SH7410 E8000 Debugging Interface User s Manual
37. so allows the user to set breakpoints define new breakpoints and delete breakpoints e Close the Breakpoints window 10 Viewing Memory The user can view the contents of a memory block in the Memory window For example to view the memory corresponding to the main function in word size e Select Memory from the View menu The Open Memory Window dialog box is displayed Input main in the Address edit box and set the Format combo box as Word Open Memory Window x Address main Format Word y Figure 19 Open Memory Window Dialog Box e Click the OK button The Memory window showing the specified area of memory is displayed gt Word Memory _main 32712 7424 9 12002 7939 16401 7939 21490 29200 13100 21490 29441 20978 12579 29712 20460 7985 21245 7985 7680 29712 20375 Figure 20 Word Memory Window 18 11 Watching Variables As the user steps through a program it is possible to watch the values of variables used in the program For example set a watch on the long type array a declared at the beginning of the program by using the following procedure e Click the left of displayed array a in the Source window to position the cursor e Click the Source window with the right mouse button and select Instant Watch from a popup menu The following dialog box will be displayed Instant Watch x Add Watch Figure 21 Instant Watch Dialog B
38. the file has been loaded the following dialog box displays information about the memory areas that have been filled with the program code Module name C ES000 xxxx TUTORIALS ott abs Areas loaded 00000000 000001F5 000001F8 000001FB Figure 8 HDI Dialog Box e Click the OK button to continue 5 2 Displaying the Source Program The HDI allows the user to debug a program at the source level so that the user can see a list of the C C program alongside the machine code as the user debugs To do this the C C source file that corresponds to the object file needs to be read e Select Source from the View menu The Open dialog box is displayed e Select the file Sort c and click the Open button Look in E Tutorial Ej c le E a Sort c Files of type c Files c inl y Cancel Figure 9 Open Dialog Box 10 e Select Sort c and click the OK button The Source window is displayed Source void main void long a 10 long 3 int i min max 00000004 fort i 0 i lt 10 itt oo000000c j randi 00000014 ifij lt 0 4 00000018 j j oo00001lc ali j 00000038 sort ia 00000040 min a 0 00000044 max a l9 00000048 min 0 0000004c max 0 00000050 change a 00000058 min al9 o000005c max a 0 00000060 Figure 10 Source Window Displaying the Source Program e If necessary select the Font option from the Customize submenu on the
39. 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
40. y in the Condition list box changes from Empt y to Enable Trace Mode Condition A Condition B Condition C Condition Edit Reset Reset All Barcel Apply Help Figure 61 Condition A Page Trace Acquisition Dialog Box This completes the setting of the Trace Condition A1 trace acquisition conditions When the program is executed trace acquisition will stop when address H 48 is accessed in a read cycle 59 18 Saving the Session The settings for the HDI window and dialog box at a given point can be saved as a session file By loading this session file when the HDI is started debugging can be resumed from the same point as last time Select Save Session As from the File menu to save a session file The Save Session As dialog box is displayed Input a session file name and click the Save button Select Load Session from the File menu to load a session file Automatic saving and loading of a session file can be set in the HDI Options dialog box select Options in the Setup menu Select the Save session automatically radio button on the Session page to specify the automatic saving of a session file The file to save at the end of HDI sessions is displayed in the dialog box When a file name is specified session information is automatically saved in this file after each HDI session is ended Make the Load last session on startup check box on the Session page valid for
Download Pdf Manuals
Related Search
Related Contents
StickApps Password Manager Installation Guide SUNNY CENTRAL 500-US - Maintenance Manual Samsung RS25H5000SR/AA Energy Guide ライトスタンド 取扱説明書 Valueline Toslink, 5m Samsung SGH-D800 User Manual ponta test cte-100 Emmanuel Eliot - Maison de la Géographie de Montpellier Fanimation FP8026OB Marea Fan - Owners Manual Dataflex ViewMate Style Monitor Arm 652 Copyright © All rights reserved.
Failed to retrieve file