Renesas H8S/2378F manual

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

Go to page of

A good user manual

The rules should oblige the seller to give the purchaser an operating instrucion of Renesas H8S/2378F, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.

What is an instruction?

The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of Renesas H8S/2378F one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.

Unfortunately, only a few customers devote their time to read an instruction of Renesas H8S/2378F. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.

What should a perfect user manual contain?

First and foremost, an user manual of Renesas H8S/2378F should contain:
- informations concerning technical data of Renesas H8S/2378F
- name of the manufacturer and a year of construction of the Renesas H8S/2378F item
- rules of operation, control and maintenance of the Renesas H8S/2378F item
- safety signs and mark certificates which confirm compatibility with appropriate standards

Why don't we read the manuals?

Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of Renesas H8S/2378F alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of Renesas H8S/2378F, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the Renesas service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of Renesas H8S/2378F.

Why one should read the manuals?

It is mostly in the manuals where we will find the details concerning construction and possibility of the Renesas H8S/2378F item, and its use of respective accessory, as well as information concerning all the functions and facilities.

After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.

Table of contents for the manual

  • Page 1

    Regar ding the change of names mentioned in the document, such as Hitac hi Electric and Hitachi XX, to Renesas T ec hnology Corp. The semiconductor operations of Mitsubishi Electric and Hitachi were transferred to Renesas T echnology Corporation on April 1st 2003. These operations include microcomputer , logic, analog and discrete devices, and memo[...]

  • Page 2

    Cautions Keep safety first in your circuit designs! 1. Renes as Tec hnology Corpora tion puts the maximum effort into making s emic onductor products be tte r and mo re rel iable, but th ere i s always th e possibi lit y t h at troubl e may occur with th em. Trouble wit h semi conductors may lead t o personal inj u ry, fire or prope rty damage. Rem[...]

  • Page 3

    HS2378KCM01HE H8S/2378F E10A Emulator User’s Manual ADE-702-359 Rev. 1.0 10/18/02 Hitachi, Ltd.[...]

  • Page 4

    Cautions 1. Hitachi neither warrant s nor grants li censes of any right s of Hitachi’s or any third party’s patent, copyright, t rademark, or other intellect ual property rights for information contai ned in this document. Hitachi bears no responsibility for problems that may arise with third party’s rights, incl uding intellect ual property [...]

  • Page 5

    I IMPORTANT INFORMATION READ FIRST • READ this user's manual befo re using this emulato r product. • KEEP the user's manual handy for future reference. Do not a t t empt to use t he emula tor product unt il y ou fully understa nd its mechanism. Emulator Product: Throughout this document, the term "emulator product" shall be [...]

  • Page 6

    II LIMITED WARRANTY Hitachi warrants its emulator products to be manufactured in accordance with published specifications and free from defects in material and/or workmanship. Hitachi, at its option, will replace any emulator products returned intact to the factory, transportation charges prepaid, which Hitachi, upon inspection, shall determine to [...]

  • Page 7

    III State Law: Some states do no t allow the exclusion o r limitation of im plied warranties or liab ility for incidental or consequent ial damages, s o the above limitat ion or exclusion may not apply to you. This warranty gi ves you specifi c legal right s, and you may have other right s which may vary from state to state. The Warranty is Void in[...]

  • Page 8

    IV SAFETY PAGE READ FIRST • READ this user's manual befo re using this emulato r product. • KEEP the user's manual handy for future reference. Do not a t t empt to use t he emula tor product unt il y ou fully understa nd its mechanism. DEFINITI ON OF SIGNAL WORDS This is the safety alert symbol. It is used t o alert you to potential p[...]

  • Page 9

    V W ARNING Observe the precautions listed below. Failure t o do so will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in PERSONAL INJURY. The USER PROGRAM will be LOST. 1. Do not repair or remodel the emulator product by yourself for electric shock prevent ion and quality assurance. 2. Always switch[...]

  • Page 10

    VI Warnings on Emulator Usage Be sure to read and underst and the warnings below before us ing this emul ator. Note that t hese are the main warning s, not the complete list. W ARNING Always switch OFF the host computer and user system before connecting or dis c onnecting any CABLES or PARTS. Failure to do so will result in a FIRE HAZARD and will d[...]

  • Page 11

    VII CAUTION This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC Rules. These limits are designed to prov ide reasonable protection against harmful int erference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio[...]

  • Page 12

    VIII[...]

  • Page 13

    i Preface Thank you for purchasing the E10A emulator. CA UTION READ section 2, Preparat ion before Use, of th is User’s Manual before using the emulator product. Incorrect operation will damage the user system and t he emulator product. This emulator i s an efficient devel opment tool for software and hardware of us er systems based on Hitachi’[...]

  • Page 14

    ii Related Ma nua ls: • Supplementary Informat ions • Hitachi Debugging Interface User's Manual (HS6400DIIW 5SE) • H8S, H8/300 Seri es C/C ++ Compiler, As sembler, Opti mizing Linkage Edit or User's Manual • Hardware Manual for each MCU • Programming Manual for each MCU Notes: 1. IBM PC is a registered trademark of International[...]

  • Page 15

    iii Contents Section 1 Overview ........................................................................................... 1 1.1 Warnings ........................................................................................................................... 3 1.2 Environmental Conditions ........................................................[...]

  • Page 16

    iv 3.15 Break Function ............................................................................................................. ..... 51 3.15.1 Software Break Function ..................................................................................... 51 3.16 Hardware Break Function ...........................................................[...]

  • Page 17

    v Section 6 H8S/2378F E10A Emulator Specifications........................................ 119 6.1 Overview of the Emulator ................................................................................................. 119 6.2 Pin Arrangement of the Hitachi-UDI Port Connector ....................................................... 120 6.3 Differ[...]

  • Page 18

    vi Figures Figure 1.1 System Configuration with the Emulator (PCMC IA Card Emulator Used) ............ 1 Figure 1.2 System Configuration with the Emulator (PCI C ard Emulator Used) ..................... 2 Figure 2.1 Emulator Preparation Flow Chart............................................................................. 7 Figure 2.2 Inserting th[...]

  • Page 19

    vii Figure 3.14 [Program] Window (B reak Status) ......................................................................... 36 Figure 3.15 [System S tatus] Wi ndow ........................................................................................ 37 Figure 3.16 [Breakpoints ] Window .............................................................[...]

  • Page 20

    viii Figure 4.10 [Break condition 1] Dialog Box ............................................................................. 86 Figure 4.11 [condition] Page ................................................................................................. .... 89 Figure 4.12 [Trace] Window ...........................................................[...]

  • Page 21

    ix Tables Table 1.1 Environmental Conditions ......................................................................................... 4 Table 1.2 Operating Environments ............................................................................................ 5 Table 2.1 Recommended Connector......................................................[...]

  • Page 22

    x Table 5.17 TRACE_DISPLAY Command Parameter............................................................... 118 Table 6.1 Components of t he Emulator (HS2378KCM01H or HS 2378KCI01H) .................... 119 Table 6.2 Unavailable Pin Functions ......................................................................................... 1 24 Table 6.3 Re[...]

  • Page 23

    1 Section 1 Overview The E10A emulator (hereafter referred to as the emulator) is a software and hardware development support tool for applicat ion syst ems using t he microprocessor devel oped by Hitachi, Ltd. The PCMCIA card emulator or PCI card emulator (hereafter referred to as the card emulator), which is the mai n unit of the emulator, i s co[...]

  • Page 24

    2 User system Host computer (PC with PCI slot) User system interface cable PCI card emulator H8S/xxxx Insert into the PCI slot Figure 1.2 System Con figuration with the E mulator (PCI Card Emulator Us ed) The emulator provides t he following features: • Excellent cost-performance card emulator Compactness and low price are implemented using the P[...]

  • Page 25

    3 1.1 Warnings CA UTION READ the following warnings before using the emulator product. Incorrect operation will damage the user system and the emulator product. The USER PROGRAM will be LOST. 1. Check all components against the component list aft er unpacking the emulator. 2. Never place heavy objects on the casing. 3. Protect the emulat or from ex[...]

  • Page 26

    4 1.2 Environmental Conditions CA UTION Observe the conditions listed in tables 1.1 and 1.2 when using the emulator. Failure to do so will damage the user system and the emulator product. The USER PROGRAM will be LOST. Table 1.1 Env iro nmental Conditions Item Specifications Temperature Operating: +10°C to +35°C Storage: –10°C to +50°C Humidi[...]

  • Page 27

    5 Table 1.2 O pera t ing Environments Item Description Host computer Built-in Pentium or higher-performance CPU (200 MHz or higher recommended); IBM PC or compatible machine with the PCM CIA TYPE II slot or the PCI slot. OS Windows ® 98, Windows ® Me, Window s NT ® , or Windows ® 2000 Mini mum memo r y capacity 32 Mbytes or more (double of the [...]

  • Page 28

    6 1.3 Components Check all the components unpacking. For detail s on the E10A emulator component s, refer to section 6.1, Component s of the Emulator. If t he components are not complet e, contact a Hitachi sales agency.[...]

  • Page 29

    7 Section 2 Preparation before Use 2.1 Emulator Preparation W ARNING READ the ref erence sections shaded in figure 2.1 before using the emulator product. Incorrect operation will damage the user system and the emulator product. The USER PROGRAM will be LOST. Unpack the emulator and prepare it for use as follows: Section 2.2 Section 2.3 Section 3 Un[...]

  • Page 30

    8 2.2 HDI Installation When the CD-R is inserted in the host comp u ter ’s CD-ROM d rive, the HDI installation wizard is automatically activ ated (holdin g the Shift ke y down while th e CD-R is inserted cancels th is automatic activation ). To run the in stallation wizard when it h as not been auto m atically activated, execute Setup.exe from th[...]

  • Page 31

    9 2.2.2 Installing under Windows NT  4.0 Operating System (1) When the emulator is a PCI card: 1. Shut the operating s ystem down and turn off the power to t he host computer. 2. Insert the PC I-card emulator in a sl ot on the host comput er. Refer to secti on 2.3, Connecting the Hos t Computer wit h the Card Emulator. 3. Start the hos t compute[...]

  • Page 32

    10 2.2.3 Installing under Windows  2000 Operating System (1) When the emulator is a PCI card: 1. Log-on with an administ rator-level user name. 2. Install t he HDI. (When a component is s elected, be sure to s elect [PC I Card Driver].) 3. Shut the operating s ystem down and turn off the power to t he host computer. 4. Insert the PC I-card emula[...]

  • Page 33

    11 2.3 Connectin g the Host Compu ter with the Card E mulator Insert the card emulator into the PCMCIA TYPE II slot or the PCI slot of the host computer (figures 2.2 and 2.3). Note: Be sure to install the HDI before the card emulator is inserted. Figure 2.2 Inserting the PCMCIA Card Emulator int o the Host Co mput er Figure 2.3 Inserting the PCI Ca[...]

  • Page 34

    12 Note: When instal ling the PC I card emulator, note the foll owing: 1. Turn off the host computer. 2. Insert the emu lato r in to the PCI slot in parallel. 3. Screw in the emulator aft er confirming the connector and cabl e positions . 2.4 Connectin g the Card Emu lator with the User S ystem (1) The connector must be installe d to the user syst [...]

  • Page 35

    13 Notes: 1. To connect the signals output from the connector, refer to the MCU pin alignment. 2. To remove the user system interface cable from the user system, pull the tab on the connector upward. 3. The range of co mmunications that the emulato r operates at is different according to the MCUs used. 4. Connect the s ignals from the connector as [...]

  • Page 36

    14 2.5 System Check When the HDI program is executed, check that the emulator operates correctly according to the following procedure: 1. Check that the card emulator is inserted into the host computer. 2. Connect the user system interface cable to the connector of the card emulator. 3. Connect the user system interface cable to the Hitachi-UDI por[...]

  • Page 37

    15 5. Power on the user sys tem and select t he setting t o be used. Figure 2.6 [Select S ession ] Dialog Box[...]

  • Page 38

    16 6. The [E10A Driver Details ] dialog box is di splayed. Wi th the [Driver] combo box, sel ect the driver to connect the HDI with the emulator. [Interface] displays the interface name of the PC interface board to be connected, and [Channel] displays the interface to which the board is connected. Once the driver is s elected in the [E10A Dri ver D[...]

  • Page 39

    17 7. Supply power to the user s ystem. The subsequent procedures depend on the activation mode that was select ed in step 5. 2.5.1 H8S/xxxx E10A E mulator M o de This mode is us ed for debugging in the emulator. 1. After the [Syst em Clock] window appears , input the sys tem clock frequency. This frequency value is used when writing and erasing fl[...]

  • Page 40

    18 Notes: 1. When the HDI is not linked up even if the above procedure has been executed, the driver will not be set correctly. Insta ll drivers provided with the SETUP directory in the CD-R according to the screen instructions. 2. If the user system interface cable is disconnected to the Hitachi-UDI port connector on the user system during user p[...]

  • Page 41

    19 (b) If the foll owing dialog b ox is di splayed, ch eck that the Hi tachi-UDI port connector on the user system is correctly connected. Figure 2.13 [Check the connection] Dialog Box (c) If the following dialog box is displayed, the MCU may not correctly operate. Check if there are reasons for illega l MCU operation. Figure 2.14 [COMMUNICATION TI[...]

  • Page 42

    20 4. If the driver is not correctly connected, the fo llowing dialog bo x will be displayed. Figure 2.16 [Unable to restore the previous driver settings] Dialog Box The [E10A Driver Details] dia log box is displa yed when the [OK] butto n is clicked. Select the correct driver. For details, refer to section 6.4.1, Emulator Driver Selection. 2.5.2 W[...]

  • Page 43

    21 2. When the [Load Program] window appears , specify a user program to be downl oaded. Click the [Open] button to s tart downloadi ng. Figure 2.18 [Load Program ] Dialog Box 3. When the program has been downloaded, the memory area that the checksum value and the program co de have been written appears. Figure 2.19 Checks um Valu e after Downloadi[...]

  • Page 44

    22 4. The [Continue] window appears . When the [OK] button i s clicked, a mes sage is dis played to request that power be s upplied. Turn off the power, exchange the MC U, and supply power. Repeat operation s 1 to 3 until the [Exit] b utton is clicked . Wh en the [Exit] butto n is clicked, the HDI is terminated. Figure 2.21 [Contin ue?] Wind ow Not[...]

  • Page 45

    23 2.6 Ending the HDI Power off the emulator by usi ng the following procedure: 1. Select [Exit ] from the [File] menu t o end the HDI. When the [Exit HDI] dial og box is displayed, cli ck the [Yes] button. Figure 2.24 [Exit HDI ] Dialog Box 2. Then, the [Save sessi on] dialog box is displayed. If necessary, click the [Yes ] button to save sessi on[...]

  • Page 46

    24 2.7 Uninstalling the HDI Follow this pro ced ure to remov e th e in stalled HDI from the user ’s h o st computer. 1. Open [Add/Remove Programs Properties ] from the control panel. S elect the HDI program from the list and click the [Add/ Remove…] but ton. 2. The setup program is executed again and the inst alled applicat ion can be changed, [...]

  • Page 47

    25 Section 3 Tutorial 3.1 Introduction The following descri bes the main functions of the emulator by usi ng a tutorial program. The tutorial program is based on the C program t hat sorts te n random data items i n ascending or descending order. The tutorial program performs the following act ions: • The main function generates random data to be [...]

  • Page 48

    26 3.2 Running the HDI To run the HDI, select [HDI for E10A H8Sxxxx] -> [Hitachi Debugging Interface] from the [Start] menu. Figure 3.1 [Start] Me nu For the procedure of running the HDI, refer to sect ion 2.5, System C heck.[...]

  • Page 49

    27 3.3 [HDI] Window Figure 3.2 [HDI] Wi ndow The key functions of the HDI are des cribed in secti on 4, Descriptions of Windows. Numbers in figure 3.2 indicate the fol lowing: 1. Menu bar: Gives the user access to the HDI commands for using the HDI debugger. 2. Toolbar: Provi des convenient butt ons as s hortcuts for t he most frequentl y used menu[...]

  • Page 50

    28 3.4 Setting up t he Emulator The following MCU condi tions must be set up on the emulat or before downloading the program: • Device type • Execution mode The following descri bes how to set up t he emulator for the tutorial programs. 3.5 Setting the [Configuration] Dialog Box • Select [Configure Platform...] from the [Setup] menu to set co[...]

  • Page 51

    29 Set options as fo llo ws: Table 3.2 Setti ng the [Configu ration] Dialog B ox Option Value Mode H8S/xxxx (default) Emulation mode Normal (normal execution, default) Step option (Disables interrupt during single step execution) Disables interrupts during single step execution (default) JTAG clock 4.125 MHz (default) Operating Mode Operating mode [...]

  • Page 52

    30 3.6 Downloading the Tutorial Program 3.6.1 Downloadin g the Tutori al Program Download the object program to be debugged. • Select [Load P rogram...] from the [File] menu. The [Load P rogram] dialog box is di splayed. Enter the [Offset] edi t box and [File name] l ist box as s hown in figure 3.4 and click t he [Open] button. Figure 3.4 [Load P[...]

  • Page 53

    31 3.6.2 Displaying the Source Program The HDI allows the user to debug a program at t he source level. • Select [Source...] from the [View] menu. The [Open] di alog box is dis played. • Select t he C source file that corresponds t o the object file t he user has loaded. Figure 3.6 [Open] Di alog Box[...]

  • Page 54

    32 • Select [S ort.c] and click t he [Open] button. The [Program] window is displayed. Figure 3.7 [Program] Window (Displaying the Source Program) • If necessary, select the [Font...] option from the [C ustomize] submenu on the [Setup] menu to select a clear font and size. Initially the [Program] window shows the start of the main program, but [...]

  • Page 55

    33 3.7 Setting t he Softwar e Brea kpoint A breakpoint is one of t he easy debugging functions . The [Program] window provides a very simple way of setting a s oftware breakpoint at any point in a program. For example, to set a breakpoint at the sort functi on call: • Select by doubl e-clicking the [B P] column on the line cont aining the sort fu[...]

  • Page 56

    34 3.8 Setting Registers Set values of t he program counter and the stack point er before executing the program. • Select [R egisters ] from the [View] menu. The [Regi sters] wi ndow is displ ayed. Figure 3.9 [Registers] Window • To change the value of the program counter (PC ), double-click t he value area in the [Registe rs] window with the m[...]

  • Page 57

    35 keyboard, or double-click the value area wi th the mouse. The followi ng dialog box is t hen displayed. Figure 3.11 [Register] Di alog Box (ER7) • Set the value of th e stack pointer to H’FFFC00 in th is tutorial pro gram, and click the [OK] button.[...]

  • Page 58

    36 3.9 Executing the Program Execute the program as desc ribed in the following: • To execute the program, sel ect [Go] from the [Run] menu, or cli ck the [Go] button on the toolbar. Figure 3.12 [Go] Button • Or, select [R eset Go] from the [Run] menu or click the [Res et Go] button on the tool bar. Figure 3.13 [Reset Go] B utton The program wi[...]

  • Page 59

    37 The user can see the cause of the break that occurred last time in the [Sys tem Stat us] window. • Select [S tatus] from the [Vi ew] menu. After the [Sys tem Status ] window is dis played, open the [Platform] page, and check t he status of C ause of last break. Figure 3.15 [System Status] W indow Note: The items that can be display ed in this [...]

  • Page 60

    38 The [System Status ] window displays the following items in each page. Table 3.3 Co nt ent s of the [System Sta tus] Window Page Item Description [Session] Target System Always displays Connected. Session Name Displays the session file name. Program Name Displays the load m odule file name. [Platform] Connected To: Displays the name of the conne[...]

  • Page 61

    39 3.10 Reviewing Breakpoints The user can see all t he breakpoints se t in the program in the [Breakpoi nts] window. • Select [B reakpoints] from the [View] menu. Figure 3.16 [Breakp oints] Wi ndow The pop-up menu, opened by clicking t he [Breakpoints ] window with the ri ght mouse butt on, also allows t he user to set or change breakpoi nts, de[...]

  • Page 62

    40 3.11 Viewing Memory The user can view the contents of a memory block in the [Memory] window. F or example, to view the memory contents corres ponding to the main in word size: • Select [Memory …] from the [View] menu, enter main in the [Addr ess] edit box, and set Word in the [Format] combo box. Figure 3.17 [Open M emory Window] Dialog Box ?[...]

  • Page 63

    41 3.12 Watching Variables As the user st eps through a program, it i s possi ble to watch that t he values of variables used in the user program are changed. For example, set a watch on the long-type array a declared at the beginning of the program, by usi ng the followi ng procedure: • Clic k the left of dis played array a in the [Program] wind[...]

  • Page 64

    42 • Clic k [Add Watch] butt on to add a variable to the [W atch] window. Figure 3.20 [Watch] Wi ndow (Disp laying the Array) The user can also add a variabl e to the [Watch] wi ndow by specifying its name. • Clic k the [Watch] window wit h the right mouse but ton and select [Add W atch] from the pop- up menu. The following dialog box will be d[...]

  • Page 65

    43 The [Watch] window will now also show the long-type variable max . Figure 3.22 [Watch] Wi ndow (Disp laying the Vari able) The user can double-click t he + symbol to the left of any variable in the [W atch] window to watch the all elements in array a . Figure 3.23 [Watch] Wi ndow (Disp laying Array E lements)[...]

  • Page 66

    44 3.13 Stepping Through a Program The HDI provides a range of step menu commands that allow effici ent program debugging. Table 3.4 Step Option Menu Command Description Step In Executes each statement, including statements within functions. Step Over Executes a function call in a single step. Step Out Steps out of a function, and stops at the stat[...]

  • Page 67

    45 3.13. 1 Executing [Ste p In] Command The [Step In] steps into the called functio n and stops at the first statemen t of the called fun ctio n. • To step through the sort function, s elect [Ste p In] from the [Run] menu, or click t he [Step In] button in the t oolbar. Figure 3.24 [Step In ] Button Figure 3.25 [Program] Wi ndow (Step I n) • Th[...]

  • Page 68

    46 3.13.2 Executing [S tep Out] Comm and The [Step Out] steps ou t of the called fun ctio n and stops at th e n e x t statem en t of the calling statement in the m ain functio n . • To step out of the sort function, sel ect [Step Out ] from the [Run] menu, or click t he [Step Out] button in t he toolbar. Figure 3.26 [Step Out] B utton Figure 3.27[...]

  • Page 69

    47 • To execute two steps, use [Step In] twice. Figure 3.28 [Program] Wi ndow (Step I n −> Step In) • The value of max displayed in the [W atch] window is changed t o the maximum data value.[...]

  • Page 70

    48 3.13.3 Ex ecut ing [Step Over] Co mma nd The [Step Over] executes a function call as a single step and stops at the next statement of the main program. • Using [Step Over], execute two steps to reach the change function statement . Figure 3.29 [Program] Window (Before Step Over Execution) • To step through all statements in the change functi[...]

  • Page 71

    49 Figure 3.31 [Program] Wi ndow (Step Over) When the last statement of the change function is executed, the data of variabl e a , which is displayed in the [W atch] window, is sorted in descending order.[...]

  • Page 72

    50 3.14 Displaying Local Variables The user can display l ocal variables i n a function using t he [Locals] window. For example, we will examine the lo cal variables in th e main function, which declares five local variables : a , j , i , min , and max . • Select [Local s] from the [View] menu. The [Locals ] window is dis played. Initially, the [[...]

  • Page 73

    51 3.15 Break Function The emulator has soft ware and hardware break functions. Wi th the HDI, a software breakpoint can be set using the [Breakpoints ] window, and a hardware break condition can be set using the [Break conditi on 1] dialog box. An overview and sett ing of the break function are desc ribed below. 3.15.1 Software Break Fu nction The[...]

  • Page 74

    52 The [Break] dialog box is displayed. The [P oint] page is di splayed as a default . Figure 3.34 [Point] Page ([B reak] Dialog B ox) • Cli ck the [Add...] button t o display t he [Breakpoint] dial og box.[...]

  • Page 75

    53 • Enter H'10a4 to the [Value] edit box. Figure 3.35 [Breakp oint] Dialog B ox • Click the [OK] button.[...]

  • Page 76

    54 The [Break] dialog box is displayed. The addres s set i n the value field of [Breakpoi nt] is displayed. Figure 3.36 [Point] Page ([B reak] Dialog B ox) (After Software Breakpoi nt Setting) • Click the [Close] butto n.[...]

  • Page 77

    55 The software breakpoint that has been set i s displayed i n the [Breakpoints ] window. Figure 3.37 [Breakpoints ] Window (Software Break point Setting) To stop the tutori al program at the breakpoint, t he following procedure must be execut ed: • Clos e the [Breakpoints ] window. • Click the [Reset Go] butto n. The program runs, and stops at[...]

  • Page 78

    56 The [System S tatus] window di splays the fol lowing contents. Figure 3.39 Disp layed Contents of the [System Status] W indow (Software B reak) Note: The items that can be display ed in this window differ acco rding to the product . For the items that can be displayed, refer to the on-line help.[...]

  • Page 79

    57 3.16 Hardware Break Function A method is given below in which the address bus condition and the read cycles for the state condition are set under Break condition 1 as hardware break conditions. • Select [B reakpoint Wi ndow] from the [View] menu. The [Breakpoint s] window is di splayed. • Clic k the [Breakpoints ] window with the right mouse[...]

  • Page 80

    58 The [Break] dialog box is displayed. To set hardware break conditions , select [Condition] in the [Break] dialog box to display the [Condition] page. Figure 3.41 [Condi tion] Page ([Break ] Dialog Box) Up to two breakpoints can be set independently for the hardware break condition. In this example, set the hardware break condit ion for Break con[...]

  • Page 81

    59 • Highlight the first point in the [Break condit ion] list box. • Click the [Edit...] button. The [Break condition 1] dialog box is displayed. • Clear the [Don't care] check box in the [Address] page. • Select t he [Only program fetched address after] radio button and ent er H'108C as the value in the [Address] edit box. Figure[...]

  • Page 82

    60 Figure 3.43 [Break] Dialog Box (After Hardware Break Condition Setting) Note: Note that t he number o f hardware break condit io ns differs according t o the product. For the number that can be specified fo r ea ch pro duct , refer t o t he o n-line help. • Click the [Close] bu tto n.[...]

  • Page 83

    61 The newly set hardware breakpoint is displayed in the [Breakpoints ] window. With this setting, Break condition 1 is di splayed in [Type] in the [B reakpoints] window. This complete s the sett ing of the Break condit ion 1 hardware break condition. W hen the program is executed, a break will occur when address H'108C is accessed in a read c[...]

  • Page 84

    62 The program runs then stops at the condition specified under Break condition 1. Figure 3.45 [Program] Wi ndow at Executi on Stop (Break conditi on 1)[...]

  • Page 85

    63 The [System S tatus] window di splays the fol lowing contents. Figure 3.46 Disp layed Contents of the [System Status] W indow (Break condition 1) Note: The items that can be display ed in this window differ acco rding to the product . For the items that can be displayed, refer to the on-line help.[...]

  • Page 86

    64 3.17 Trace Function The trace function of the E10A emulator is described. The branch source addresses , mnemonics, operands, and s ource lines are dis played. Since thi s function u ses the trace b uffer built into th e MCU, a realtime trace can be acquired. Run the program as shown i n the example of secti on 3.15.1, Software Break Funct ion. T[...]

  • Page 87

    65 3.18 What Next? This tutorial has described t he major features of the emulat or and the use of the HDI. Sophisti cated debugging can be carried out by us ing the emulation funct ions that t he emulator offers. This provides for effective investigation of hardware and software problems by accurately isolat ing and identifyi ng the conditions und[...]

  • Page 88

    66[...]

  • Page 89

    67 Section 4 Descriptions of Windows 4.1 HDI Windows HDI window menu bars and the correspondi ng pull-down menus are li sted in tabl e 4.1. Where a description of a menu is included in the Hitachi Debugging Interface User's Manual or in this manual, an O mark or the relevant s ection number is s hown. Relate d commands in the E10A Emulator Use[...]

  • Page 90

    68 Table 4.1 H DI Window Menus and Relat ed Manual Entries ( cont) Menu Bar Pull-Down Menu Hitachi Debugging Interface User's Manual This Manual View Menu Breakpoints O 3.10, 3.15.1, 4.2.3, 6.4.3 Command Line O — Disassembly... O — I/O Registers O — Labels O — Locals O 3.14 Memory ... O 3.11 Performance Analysis O — Profile-List O ?[...]

  • Page 91

    69 Table 4.1 H DI Window Menus and Relat ed Manual Entries ( cont) Menu Bar Pull-Down Menu Hitachi Debugging Interface User's Manual This Manual Memory Menu Re fres h O — Load O — Save O — Verify O — Test O — Fill O — Copy O — Compare O — Setup Menu Status bar O — Options O — Radix O — Customi se O — Configure Platform?[...]

  • Page 92

    70 4.2 Descriptions of Each Window This section describes each window. F igures in this section are us ed as examples. Each E10A emulator type has expl anatory notes. Read s ection 6, H8S/ xxxx E10A Emulator Specificat ions. 4.2.1 [Configuration ] Dialog Box Function: This dialog box sets the emulation conditions of the emulator. Window: Figure 4.1[...]

  • Page 93

    71 Description: The [Configuration] di alog box consist s of the [General] page li sted in tabl e 4.2. Table 4.2 [Con figuration ] Dialog Box Page Page Name Description [General] Sets the emulator operation conditions. Clicking t he [OK] button sets the emulation condi tions. If the [C ancel] button is clicked, this dialog box is closed without set[...]

  • Page 94

    72 (1) [General] Page ([Configu ration] Dialog B ox) Function: This page set s the operational condi tions for the emul ator. The MCU name is di splayed, the emulation mode and interrupt s during st ep execution are set, t he JTAG clock (TCK) i s displa yed and set, and the driver is selected. Window: Figure 4.2 [General] Page ([Con figuration] Di [...]

  • Page 95

    73 Description: Table 4.3 [General ] Page Options Option Description [Mode] combo box Displays the MCU nam e. [Emulation mode] com bo box Selects the emulation mode at user program execution. Select Normal to perform norm al emulation. Select No Break to disable breakpoint settings. [Step option] combo box Enables or disables interrupts during step[...]

  • Page 96

    74 When a driver is t o be changed with the [Change…] butt on, the following mes sage is dis played. Figure 4.3 Warnin g Mess age Box When the [Yes] butt on is clicked, t he [E10A Driver Details ] dialog box is di splayed. When the [No] button is clicked, the dis p lay returns to the [Configurat ion] dialog box. Related Items: [Configurati on] di[...]

  • Page 97

    75 4.2.2 [E10A Driver Details ] Dialog Box When the [OK] button is clicked, the [E10A Driver Details] dialog box will appear to select the driver software used b y the interface to the emu lator. Since the emulato r is rein itialized after this dialog box is cl osed, it cannot be cancel led. Figure 4.4 [E10A Driver Detai ls] Dialog B ox Table 4.4 s[...]

  • Page 98

    76 When the PCMCIA card emulator is used, [E10A PC C ard Driver 5] is selected. When the PCI card emulator is used, [E10A PCI Card Driver 5] is selected. Note: When the HDI is not linked up even if the above procedure has been executed, the driver may not be set correctl y. Install dri vers provided with the SETUP directory i n the CD-R according[...]

  • Page 99

    77 Description: The [Breakpoints] window displays breakpoint s etting information. The items listed in the following tables are displayed. Table 4.5 [ Breakpoints] Windo w Displa y Items Item Description [Enable] Indicates whether the break condition is enabled or disabled. Symbol l or m show s that the break condition is enabled. [File/Line] Displ[...]

  • Page 100

    78 4.2.4 [Break] Dialog B ox Function: This dialog box displays the break condition settings . Window: Figure 4.6 [Break] Di alog Box[...]

  • Page 101

    79 Description: The [Break] dialog box consi sts of t he pages list ed in table 4.7. Table 4.7 [Break ] Dialog Box Pages Page Name Description [Point] Displays software breakpoint settings. [Condition] Displays Break Condition settings. The dialog boxes which set or modify break conditions can be dis played from the pages above. Clicking the [Close[...]

  • Page 102

    80 (1) [Point] Page ([Break] Di alog Box) Function: This page displays software breakpoint settings . In this page, software breakpoints can be se t, changed, and cleared. Window: Figure 4.7 [Point] Page ([B reak] Dialog B ox)[...]

  • Page 103

    81 Description: Table 4.8 [Poin t] Page Options Option Description [Breakpoint] list box Lists the softw are breakpoints currently being set. The display contents are as follows: <breakpoint address> [Add...] button Sets software breakpoints. Clicking this button displays the [Breakpoint] dialog box. [Edit...] button Changes the software brea[...]

  • Page 104

    82 (2) [Condition ] Page ([Break] Dialog B ox) Function: This page displ ays the Break C ondition set tings. Thes e conditions can al so be set or cleared i n this page . Window: Figure 4.8 [Condi tion] Page ([Break ] Dialog Box) Note: Note that t he number o f hardware break condit io ns differs according t o the product. For the number that can b[...]

  • Page 105

    83 Description: Table 4.9 [Cond ition] Page Opti ons Option Description [Break condition] list box Displays the Break condition settings. The display at system initiation is as follows: When conditions are set, Enable is displayed. When no conditions are set, Empty is displayed. 1 Empty (setting of Break condition 1) 2 Empty (setting of Break condi[...]

  • Page 106

    84 4.2.5 [Breakpoin t] Dialog Box Function: This dialog box s ets soft ware breakpoints. Window: Figure 4.9 [Breakp oint] Dialog B ox Note: The items that can b e set in this win dow differ according to th e product. For the settings for each product, refer to the on-line help.[...]

  • Page 107

    85 Description: The [Address] page options are as follows : Table 4.10 [Add ress] Page Opti ons Option Description [Value] edit box Sets a breakpoint address with a number or a symbol. Clicking t he [OK] button enables breakpoi nts to be se t. If the [Cancel] but ton is cli cked, this dialog box is closed without setting breakpoints. Related Items:[...]

  • Page 108

    86 4.2.6 [Break cond ition] Dialog B o x Function: This dialog box sets hardware break conditions. Window: Figure 4.10 [Break con dition 1] Di alog Box Note: The items that can b e set in this win dow differ according to th e product. For the settings for each product, refer to the on-line help.[...]

  • Page 109

    87 Description: The [Break condition] dialog box consists of the [condition] page. Sets the conditions for halting the program. Contents t o be set by this page are described in s ection 4.2.7, [Break condit ion] Dialog Box P ages. Clicking t he [OK] button sets the hardware break conditions . If the [Cancel] butt on is clic ked, the dialog box is [...]

  • Page 110

    88 4.2.7 [Break cond ition] Di alog Box Pages The [Break condition] dialog box page allows a number of hardware break conditions to be se t. Some functions may not be supported by some types of emulators. The setting conditions may differ from those in ta ble 4.11. For detail s, refer to secti on 6.5.2, Hardware Break Functions . Table 4.11 Set t i[...]

  • Page 111

    89 (1) [condition] Page Function: This page set s the address bus , data bus, and read/wri te cycle conditi ons. Window: Figure 4.11 [condi tion] Page Note: The items that can b e set in this win dow differ according to th e product. For the settings for each product, refer to the on-line help.[...]

  • Page 112

    90 Description: The [Address] group box sets the address bus conditions . Table 4.13 [Add ress] Group Box Option s Option Description [Don’t care] check box Does not set address conditions. [Address] radio button Sets use of the normal address bus as break conditions. [Only program fetched address after] radio button Sets a break after prefetched[...]

  • Page 113

    91 The [Read/Write] group box sets the read/write cycle conditions. Table 4.16 [Read/ Write] Group B ox Options Option Description [Read/Write] radio button Sets the read/write cycle conditions as break conditions. [Read] radio button Sets read cycles as break conditions. [Write] radio button S ets write cycles as break conditions. Related Items: [[...]

  • Page 114

    92 4.2.8 [Trace] Wind ow Function: This window displays the trace buffer contents. The contents are displayed in both C and assembly l anguages to s implify debugging. Window: Figure 4.12 [Trace] Window Note: This function differs acco rding to the product. Fo r the number that can be specified for each product, refer to the on-line help.[...]

  • Page 115

    93 Description: This window displays the trace buffer contents. The items listed in table 4.17 are displayed. Table 4.17 [Trace] Window Display Items Item Description [IP] D isplays the instruction pointer (signed decimal). [TYPE] Displays the branc h s ource. BRANCH: Branch so urce [ADDR] Displays the branch sourc e address. [MNEM ONIC] Displays t[...]

  • Page 116

    94 4.2.9 [System Sta tus] Window Function: This window lists information, such as conditions that have been set to the emulator and execution results. Window: Figure 4.13 [System Status] W indow Note: The items that can be display ed in this window differ acco rding to the prod uct . Fo r the items that can be displayed, refer to the on-line help.[...]

  • Page 117

    95 Description: The items li sted in the fol lowing table are dis played in the [Sys tem Status ] window. Table 4.18 [Sys tem Status ] Window Dis play Item s Page Item Description [Session] Target System Displays whether the emulator is connected. Session Name Displays the session file name. Program Name Displays the load m odule file name. [Platfo[...]

  • Page 118

    96[...]

  • Page 119

    97 Section 5 Command-line Functions 5.1 Table and Symbol Desc ription This secti on describes t he format used in sect ion 5.2, Command Descript ions. The descri ptions of some commands are given over two or more pages . 5.1.1 Format The input format for each command is as follows. Characters shown in bold-italics are to be input. [ ] : Parameters [...]

  • Page 120

    98 5.1.3 Examples These are actual input examples. For commands whos e execution result s in a specifi c display output, an example of the di splay is given. 5.1.4 Related Items Related E10A HDI commands (abbreviations ) and dialog boxes are shown. (R efer to section 4, Descriptions of Windows.)[...]

  • Page 121

    99 5.2 Command D escript ions The command list of t he E10A emulator is s hown below. Table 5.1 E1 0A HDI Co mma nds No Command Abb. Function 1 BREAKCONDITION_ CLEAR BCC Clears hardware breakpoints that have been set. 2 BREAKCONDITION_ DISPLAY BCD Displays hardware breakpoints that have been set. 3 BREAKCONDITION_ ENABLE BCE Enables or disables har[...]

  • Page 122

    100 5.2.1 BREAKCONDITION_CLEAR: BCC Description: Clears hardware breakpoint s that have been se t. Format: bcc [<channel>] <channel> = channel <channel_number> Table 5.2 BREAKCONDITIO N _ CLEAR Command P a ramete r Parameter Type Description None Examples: To clear all hardware breakpoints : > bcc (RET) To clear all hardware br[...]

  • Page 123

    101 5.2.2 BREAKCONDITION_DISPLAY: BCD Description: Displays hardware breakpoi nts that have been s et. The displa y contents include enabl e or disable of the sett ing, and sett ing conditi ons. Format: bcd [<channel>] <channel> = channel <channel_number> Table 5.3 BREAK CO NDITION_DISPLAY Command Pa rameter Parameter Type Descrip[...]

  • Page 124

    102 5.2.3 BREAKCONDITION_ENABLE: BCE Description: Enables or dis ables hardware breakpoints that have been set. Format: bce [<channel>] <mode> <channel> = channel <channel_number> Table 5.4 BREAKCONDITIO N _ ENABLE Command Pa ramete r Parameter Type Description <mode> Keyword Enables or disables hardware breakpoint set[...]

  • Page 125

    103 5.2.4 BREAKCONDITION_SET: BCS Description: Sets hardware breakpoint s. Note: The fu n ction will be differen t acco rd in g to the MCUs used. Fo r fu n ctions of each emulator product, refer to s ection 6.4.2, Hardware Break Funct ions. Format: bcs <channel> <option> [<option> ... ] <channel> = channel <channel_number[...]

  • Page 126

    104 Table 5.5 BREAKCONDITIO N _ SET Command Pa ramete r s Parameter Type Description <address> Numerical value, character string Numerical value or symbol representing an address bus value <addrcycle> Keyword Address bus access conditions pcafter : The address bus is targeted during instruction fetch cycles. Breaks after the instruction[...]

  • Page 127

    105 Examples: To set the foll owing conditions as a hardware breakpoint: Address condition: An address bus value of H'1000, Data condition : A d ata b us value of H'55 and lower 8-b it b yte access, Read/write cycle conditio n: Read cycle. > bcs address 1000 data 55 lbyte direction read (RET) To set the foll owing conditions as a hardw[...]

  • Page 128

    106 5.2.5 BREAKPOINT : BP Description: Sets s oftware breakpoints. Note: The fu n ction will be differen t acco rd in g to the MCUs used. Format: bp <address> Table 5.6 BREAK P O INT Co mma nd Parameter Parameter Type Description <address> Numerical value, character string Breakpoint value set by numerical value or symbol When an odd ad[...]

  • Page 129

    107 5.2.6 BREAKPOINT_CLEAR: BC Description: Clears s oftware breakpoints that have been set. Format: bc [<address>] Table 5.7 BREAK P O INT_ C LEAR Co mmand Parameter Parameter Type Description <address> Numerical value, character string Breakpoint value set by numerical value or symbol Note: When no param eters are set, all software br[...]

  • Page 130

    108 5.2.7 BREAKPOINT_DISPLAY: BD Description: Displays s oftware breakpoints t hat have been set. Format: bd Table 5.8 BREAK P O INT_ D ISPLAY Co mmand Parameter Parameter Type Description None Example: To display the s oftware breakpoints that have been set: > bd (RET) The display form at is as fo llows: >bd H'00000110 Enable H'000[...]

  • Page 131

    109 5.2. 8 BREAKPOINT_ ENABLE: BE Description: Enables or dis ables software breakpoi nts that have been s et. Format: be <address> <mode> Table 5.9 BREAKPOINT_ ENABLE Command Pa r a meters Parameter Type Description <address> Numerical value, character string Breakpoint value set by numerical value or symbol <mode> Keyword [...]

  • Page 132

    110 5.2.9 DEVICE_TYPE: DE Description: Displays MCU type currently selected. Format: de Table 5.10 DEVICE_TYPE Command Parameter Parameter Type Description None Example: To display the currently selected MCU: > de (RET) The display form at is as fo llows: >de Current device = H8S/xxxx[...]

  • Page 133

    111 5.2.10 GO_OPTION: GP Description: Sets or di splays the emulation mode duri ng user program execution. Format: gp Displays emul ation mode for user program executi on. gp <eml_opt> <eml_opt> = eml_mode <eml_mode> Sets emul ation mode for user program execut ion. Table 5.11 G O_OPTION Co mmand Parameter Parameter Type Descripti[...]

  • Page 134

    112 5.2.11 JTAG_CLOCK: JCK Description: Displays or s ets the J TAG clock (TCK) frequency. Format: JCK Displays the JTAG cl ock (TCK). JCK <jck_opt> Sets the JTAG clock (TCK). Table 5.12 J TAG_CLOCK Co mma nd Parameter Parameter Type Description <jck_opt> Numerical value Sets one of the JTAG clock (TCK) frequency. (PCMCIA used: 0.937 M [...]

  • Page 135

    113 Examples: (when PCMCIA used): To set the JTAG cl ock (TCK) frequency: > JCK 1 (RET) JTAG Clock 15MHz To display the J TAG clock (TCK) frequency: > JCK (RET) JTAG Clock 15MHz (when PCI used): To set the JTAG cl ock (TCK) frequency: > JCK 1 (RET) JTAG Clock 16.5MHz To display the J TAG clock (TCK) frequency: > JCK (RET) JTAG Clock 16.[...]

  • Page 136

    114 5.2.12 REFRESH: RF Description: Updates the HDI memo ry information to the latest contents. Format: rf Table 5.13 REFRESH Command Paramet er Parameter Type Description None Example: To update the HDI memory information: > rf (RET)[...]

  • Page 137

    115 5.2.13 RESET : RE Description: Resets the H8S/xxxx. The breakpoint settings are retained. After the reset, the registers will be in the same state as when power is supplied. Format: re Table 5.14 RESET Command Para meter Parameter Type Description None Example: To reset the H8S/ xxxx: > re (RET)[...]

  • Page 138

    116 5.2.14 STAT US: STS Description: Displays emul ator status information. Format: sts Table 5.15 STATUS Co mmand Parameter Parameter Type Description None Example: To display st atus informati on of the emulator: > sts (RET) The display form at is as fo llows: >sts Emulator Status Connected to: H8S/xxxx E10A Emulator (E10A PC Card Driver 5)[...]

  • Page 139

    117 5.2.15 STEP_INTERRUPT: SI Description: Sets or dis plays the enable or disable s tatus of inte rrupts during st ep execution. When interrupt s occur when they are disabled, execution stops at the top address of the interrupt routine. Format: si Displays t he enable or disabl e status of i nterrupts during s tep execution. si <mode> Sets t[...]

  • Page 140

    118 5.2.16 TRACE_DISPLAY: TD Description: Displays acquired trace information. Format: td Table 5.17 TRACE_DISPLAY Command Parameter Parameter Type Description None Example: To display acquired trace information: > td (RET) The display form at is as fo llows: >td IP TYPE ADDR MNEMONIC OPERAND -D’xxxx BRANCH 00001010 JSR @ER0 -D’xxxx BRANC[...]

  • Page 141

    119 Section 6 H8S/2378F E10A Emulator Specifications 6.1 Overview of the Emulator The H8S/2378F E10A emulat or supports the H8S /2377F and H8S/2367F . The MCU operating modes 4 and 7 are supported and realtime emulation can be performed. Table 6.1 lists the components of the emulator. Table 6.1 Comp onents of th e Emulator (HS 2378KCM01H or HS2378K[...]

  • Page 142

    120 6.2 Pin Arrang ement of the Hitach i-UDI Port Connector Figure 6.1 shows t he pin arrangement of the Hitachi -UDI port connector. CA UTION Note that th e pin number assignment of the Hitachi- UDI port connector differs from that of the connector manufacturer. Pin 1 mark Pin 1 mark Top view Hitachi-UDI port connector 1 pin 8 pin 7 pin 14 pin Pin[...]

  • Page 143

    121 Figure 6.2 shows an exampl e of connecting the user s ystem to the emulat or. Pulls-up at 4.7 k User system User logic Vcc E10A pin No . 14-pin connector with a 2.54-mm pitch (3M Limited: 2514-6002) · #RES of pin 4 of the Hitachi-UDI por t connector is a signal line in which the emulator outputs signals to the MCU . An AND operation must be pe[...]

  • Page 144

    122 Notes: 1. Th e emulator us es #WDTOVF, P53, an d PG4 to PG6 in the H8S /2377F and H8S/2367F. Pull up the emu lator and M CU pins an d connect th em to the us er system. Peripheral functions that are shared by these pins cannot be used. Hitachi-UDI por t connector 4.7 k H8S/2377F , H8S/2367F Pins 1, 2, 3, 5, and 6 Vcc Figure 6.3 Connecti on of E[...]

  • Page 145

    123 3. #RES of pi n 4 of the Hitachi -UDI port connector i s a sign al line i n which th e emulator outp uts si gnals to the M CU. #RES of pin 7 of the Hitachi -UDI port connector i s a signal line in which th e emulator mon itors the #RE S signal of the MCU. The #RES must be pulled up before it is co nnected to pin 7 o f the Hitachi-UDI port conne[...]

  • Page 146

    124 7. When H8S/ 2377F and H8S/ 2367F are connected to the em ulator, the foll owing pin functions canno t be used. Table 6.2 Una v ailable Pin Functions H8S/2377F H8S/2367F P53 and PG4 to PG6 P53 and PG4 to PG6 #WDTOVF #WDTOVF #IRQ3 #IRQ3 #ADTRG #ADTRG #BREQ, #BACK, and #BREQ 0 #BREQ, #BACK, and #BREQ0 − #CS4 Note: The sym bol “#” means that[...]

  • Page 147

    125 6.3 Differences between the MCUs and th e Emulator 1. When th e emulator system is initiated, it initializes th e g eneral registers and part of the co ntrol registers as shown in tabl e 6.3. Table 6.3 Regis ter Initial Values at E mulator Power-On Register When Using H8S/2377F and H8S/2367F PC Reset vector value in the vector address table ER0[...]

  • Page 148

    126 6.4 The H8S/2378F E10A Emulator Functions Notes: 1. Do not use an MC U that has been us ed for debugging. 2. If the flash memory is rewritten m any times, and th e emulator is left for a few da y s, data may be lost due t o retention problems . 3. If the flash memory is rewritten m an y tim es, th e data will not be erased. If an error message [...]

  • Page 149

    127 Table 6.6 Cond itions S et in [Break conditi on] Dialog Box Condition Dialog Box Address Bus Condition Data Condition Read or write condition [Break condition 1] OOO [Break condition 2] OOO Note: O : Can be set by checking the radio button in the dialog box. Table 6.7 lists the combinations of conditions that can be set by the BREAKCONDITION_SE[...]

  • Page 150

    128 6.4.3 Notes on Setti ng the [Break point] Dialog B ox 1. When an odd address is set, the addres s is rounded down t o an even address. 2. A software break is accomplished by replacing instructions. Accordingly, it can be set only to the flash memory or the RAM area. However, a s oftware break cannot be set to the foll owing addresses: • An ar[...]

  • Page 151

    129 6.4.4 Trace Functi on The emulator uses the branch-instruction trace and bus trace functions in the MCU, and acquires a trace by operating th e u ser pr o g ram in realtime. Th e b r an ch -in struction trace function displa ys the branch-source address , the mnemonic, and the operand. The bus t race function displays and searches the informati[...]

  • Page 152

    130 (2) Displaying a Trace in the Bus Trace Function The contents of the trace buffer in table 6.9 are displayed in the [Trace] window. Table 6.9 Items in the [Trace] Window Item Description [IP/Cycle] Instruction pointer or bus cycle pointer (signed decimal) [Address] The value of the address bus [Label] Label name [Mnemonic] Mnemonic of the execu[...]

  • Page 153

    131 (3) Searching a Trace in the Bus Trace Function The emulator supports two types of trace search function lis ted in table 6.10. Table 6.10 Tr ace Search Fun ction Function Description Trace Filter Displays all the information that matches the conditions specified by all the trace data. Trace Find Jumps to the inform ation that matches the condi[...]

  • Page 154

    132 Table 6.13 [B us s tatus] Group Box Option s Option Description [Don’t care] check box Indicates that no bus condition is set. [DMAC] check box Sets a DMAC bus cycle as a display condition. [DTC] check box Sets a DTC bus cycle as a display condition. [PROG] check box Sets a CPU instruction fetch cycle as a display condition. [DATA] check box [...]

  • Page 155

    133 (ii) Trace Find Function The emulator jum ps to the inform ation that matches th e conditions sp ecified b y all the trace data on the [Trace] window. The search function is set in the [Trace Filter] dialog box. The conditions to b e set are th e same as th ose of the Trace Filter func tio n . (4) Commands for the Trace Function The emulator su[...]

  • Page 156

    134 Example: To display the acquired trace information: td (RET) The display format of the branch trace information is as follows: >td IP TYPE ADDR MNEMONIC OPERAND -D’xxxx BRANCH 00100100 JSR @ER0 -D’xxxx BRANCH 00100200 JMP @ER1 (a) (b) (c) (d) (e) (a) Instruction poi nter (signed decimal ) (b) Type of branch source BRANCH: Branch source ([...]

  • Page 157

    135 (ii) TRACE_MODE: TM Description: Displays or sets the acquisition mode of the trace information. Format: tm Displays the acquisition mode of the trace information. tm <option1> [<option2>] [<option3>] [<option4>] Sets the acquisition mode of the trace information. <option1> = type <type> <option2> = bus[...]

  • Page 158

    136 Example: To disable acquiring the DMAC cycle in the bus trace: tm type bus cycle dmac (RET) The display format o f th e setting state of the trace acq uisition mode is as fo llo ws: >tm (RET) type = bus cycle dmac[...]

  • Page 159

    137 (iii) TRACE_SEARCH: TS Description: Searches and displays the trace information with the specified condition. Format: ts [<addropt>] [<dataopt>] [<statusopt>] [<areaopt>] [<rwopt>] [<irqopt>] [<fromopt>] <addropt> = address <addres s> <dataopt> = data <data> <size> <stat[...]

  • Page 160

    138 Table 6.20 TRACE_SEARCH Command Parameter Parameter Type Description <address> Numerical value, character string Sets the address value as a numeric or a symbol. <data> Numerical value Sets a value of the data bus. <size> Keyword Sets the access condition of the data bus. byte : Byte access word : Word access <status> Ke[...]

  • Page 161

    139 Example: To search and display the trace data of address H’00FF8000: ts address H’ff8000 (RET) When the data exis ts in the –70 cycle, t he display format i s as follows : >ts address H’ff8000 CYCLE ADDRESS LABEL MNEMONIC OPERAND DATA R/W AREA STATUS CLOCK IRQ *-D'0075 xxxxxxxx xxx xxxxx xxx xxxx xx xxxx xxxxx x x *-D'0074 [...]

  • Page 162

    140 6.4.5 Notes on HDI 1. Note on Moving Source F ile P osition aft er Creati ng Load Module When the source fil e is moved after creati ng the load module, the [Open] dial og box may be displayed to s pecify the source file duri ng the debugging of the created load modul e. Select the corresponding source fi le and click the [Open] but ton. 2. Sou[...]

  • Page 163

    141 Example: The function name is main. main =  Array display When array elements exceed 1000, elements from after 1000 will not be displayed. 6. Memory Load Function When [Load...] is selected from the [Memory] menu, the Memory Load function can be used although it ta kes time to download. It is recommended that t he File Load functi on ([Load [...]

  • Page 164

    142 Example: FILE_LOAD C:HEWHDI5E10A2378FTUTORIAL TUTORIAL.ABS 9. Note on In itiatin g HDI When the emulato r is in itiated by using an o ther card emulator after it h as been initiated by using the PC I card emulator, delete the [TARGET] line from the C :windows HDI.INI file. 10. Usage with Another HDI  Automatic load o f session [...]

  • Page 165

    143 16. [I/O Registers] window  Display and modi fication Do not change values in the [I/O Registers ] window because the emulator uses the addres s break controller.  Note that the E10A emul ator does not support the display of t he invalid module or bit information in the [I/O R egisters ] window (described in s ection 8, Displ aying Variab[...]

  • Page 166

    144 20. Number of Software Breakpoint and [Stop At] Settings in the [Run...] Menu The maximum number of software breakpoints and [Stop At] settings allowed in the [R un...] menu is 255. Therefore, when 255 software breakpoi nts are set , specification by [S top At] in the [Run...] menu becomes inval id. Use the software breakpoi nts and [Stop At ] [...]

  • Page 167

    145 28. Note on Starting or Halting Us er Program When the user program executi on is start ed or halted, the program for the H8S /2378F E10A emulator will write or read the flash memory. The write or read processing will take about a maximum of 40 seconds. 29. Processing Time for Updating the F lash Memory Cont ents When the contents of the flash [...]

  • Page 168

    146 33. Watchdog Timer When the emulator is connected to operate the wat chdog timer (WDT) during us ing the H8S/2377F and H8S /2367F, the W DT continues operat ion during a break. • When a counter value overflows during a break in the watchdog t imer mode: An internal reset signa l is g e n e rated wh en the internal LSI is reset. • When a cou[...]