Renesas M16C PC4701 User Manual

REJ10J1608-0100
M16C PC4701 Emulator Debugger V.1.03
User's Manual
Renesas Microcomputer Development Environment System
Rev.1.00 Jul. 01, 2007
Notes regarding these materials
2. Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples.
3. You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. When exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations.
4. All information included in this document such as product data, diagrams, charts, programs, algorithms, and application circuit examples, 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 products listed in this document, please confirm the latest product information with a Renesas sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website. (http://www.renesas.com )
5. Renesas has used reasonable care in compiling the information included in this document, but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document.
6. When using or otherwise relying on the information in this document, you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application. Renesas makes no representations, warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products.
7. With the exception of products specified by Renesas as suitable for automobile applications, Renesas products are not designed, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication transmission. If you are considering the use of our products for such purposes, please contact a Renesas sales office beforehand. Renesas shall have no liability for damages arising out of the uses set forth above.
8. Notwithstanding the preceding paragraph, you should not use Renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp., its affiliated companies and their officers, directors, and employees against any and all damages arising out of such applications.
9. You should use the products described herein within the range specified by Renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges.
10. Although Renesas endeavors to improve the quality and reliability of its products, IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas 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 applicable measures. Among others, since the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you.
11. In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. You should implement safety measures so that Renesas products may not be easily detached from your products. Renesas shall have no liability for damages arising out of such detachment.
12. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from Renesas.
13. Please contact a Renesas sales office if you have any questions regarding the information contained in this document, Renesas semiconductor products, or if you have any other inquiries.
Overview
The High-performance Embedded Workshop is a Graphical User Interface intended to ease the development and debugging of applications written in C/C++ programming language and assembly language for Renesas microcomputers. Its aim is to provide a powerful yet intuitive way of accessing, observing and modifying the debugging platform in which the application is running.
This help explains the function as a "debugger" of High-performance Embedded Workshop.
Target System
The Debugger operates on the emulator PC4701 system.
Supported CPU
This help explains the debugging function corresponding to the following CPUs.
M32C/80, M16C/80 Series Note: In this help, the information which depends on this CPU is described as "for M32C". M16C/60, M16C/30, M16C/Tiny, M16C/20, M16C/10 Series
Note: In this help, the information which depends on this CPU is described as "for M16C/R8C". 740 Family
Note: In this help, the information which depends on this CPU is described as "for 740".
Active X, Microsoft, MS-DOS, Visual Basic, Visual C++, Windows and Windows NT are either registered trademarks or
trademarks of Microsoft Corporation in the United States and other countries.
IBM and AT are registered trademarks of International Business Machines Corporation.
Intel and Pentium are registered trademarks of Intel Corporation.
Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated.
All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
For inquiries about the contents of this document or product, fill in the text file the installer generates in the following
directory and email to your local distributor.
¥SUPPORT¥Product-name¥SUPPORT.TXT
Renesas Tools Homepage http://www.renesas.com/en/tools
Setup of Debugger 1
1. Features 1
1.1 Real-Time RAM Monitor Function...............................................................................................1
1.1.1 RAM Monitor Area ............................................................................................................1
1.1.2 Sampling Period ................................................................................................................2
1.1.3 Related Windows ...............................................................................................................2
1.2 Break Functions............................................................................................................................3
1.2.1 Software Breaks Function.................................................................................................3
1.2.2 Hardware Break ................................................................................................................4
1.2.3 Protect Break .....................................................................................................................5
1.3 Real-Time Trace Function ............................................................................................................6
1.3.1 Trace Area..........................................................................................................................6
1.3.2 Trace Condition Setting ....................................................................................................7
1.3.3 Trace Data Write Condition..............................................................................................7
1.4 Time Measurement Function .......................................................................................................8
1.4.1 The Measurement Condition ............................................................................................8
1.5 Coverage Function ........................................................................................................................9
1.5.1 Coverage Measurement Area............................................................................................9
1.5.2 Related Windows ...............................................................................................................9
1.6 Real-Time OS Debugging Function............................................................................................10
1.7 GUI Input/Output Function .......................................................................................................10
2. About the Emulator PC4701 11
2.1 Communication methods ............................................................................................................11
2.2 Function table .............................................................................................................................11
3. Before starting the debugger 12
3.1 Communication method by emulator.........................................................................................12
3.1.1 USB Interface ..................................................................................................................12
3.1.2 LAN Interface ..................................................................................................................12
3.1.3 LPT Interface...................................................................................................................12
3.1.4 Proprietary Parallel Interface.........................................................................................13
3.2 Download of Firmware................................................................................................................14
3.3 Setting before emulator starts....................................................................................................15
3.3.1 USB communication........................................................................................................15
3.3.2 LAN communication 1.....................................................................................................16
3.3.3 LAN communication 2.....................................................................................................18
3.3.4 Proprietary parallel communication...............................................................................19
4. Preparation before Use 20
4.1 Workspaces, Projects, and Files .................................................................................................20
4.2 Starting the High-performance Embedded Workshop..............................................................21
4.2.1 Creating a New Workspace (Toolchain Used)................................................................22
4.2.2 Creating a New Workspace (Toolchain Not Used).........................................................27
4.3 Starting the Debugger ................................................................................................................32
4.3.1 Connecting the Emulator ................................................................................................32
4.3.2 Ending the Emulator.......................................................................................................32
5. Setup the Debugger 33
5.1 Init Dialog....................................................................................................................................33
5.1.1 MCU Tab..........................................................................................................................34
5.1.2 Debugging Information Tab............................................................................................37
5.1.3 F/W and Work Area Tab..................................................................................................39
5.1.4 Memory Extension Mode Tab .........................................................................................40
i
5.1.5 Clock Tab .........................................................................................................................43
5.1.6 Script Tab.........................................................................................................................44
5.2 Setting of the Communication Interface.................................................................................... 45
5.2.1 Setting of the USB Interface...........................................................................................45
5.2.2 Setting of the LPT Interface ...........................................................................................46
5.2.3 Setting of the LAN Interface........................................................................................... 47
5.2.4 Setting of the Parallel Interface......................................................................................49
5.2.5 Setting of the Serial Interface.........................................................................................49
5.3 Setup the Debugger for M32C....................................................................................................50
5.3.1 Emem Dialog....................................................................................................................50
5.4 Setup the Debugger for M16C/R8C............................................................................................54
5.4.1 Map Command.................................................................................................................54
5.5 Setup the Debugger for 740........................................................................................................55
5.5.1 Map Command.................................................................................................................55
5.6 Method of making MCU file .......................................................................................................56
5.6.1 Method of making MCU file (the M16C/R8C Debugger) ...............................................56
5.6.2 Method of making MCU file (the 740 Debugger) ...........................................................57
Tutorial 59
6. Tutorial 61
6.1 Introduction.................................................................................................................................61
6.2 Usage ...........................................................................................................................................62
6.2.1 Step1 : Starting the Debugger ........................................................................................62
6.2.2 Step2 : Checking the Operation of RAM.........................................................................63
6.2.3 Step3 : Downloading the Tutorial Program ...................................................................64
6.2.4 Step4 : Setting a Breakpoint...........................................................................................66
6.2.5 Step5 : Executing the Program .......................................................................................67
6.2.6 Step6 : Reviewing Breakpoints .......................................................................................69
6.2.7 Step7 : Viewing Register .................................................................................................70
6.2.8 Step8 : Viewing Memory .................................................................................................71
6.2.9 Step9 : Watching Variables.............................................................................................72
6.2.10 Step10 : Stepping Through a Program .........................................................................74
6.2.11 Step11 : Forced Breaking of Program Executions........................................................77
6.2.12 Step12 : Displaying Local Variables .............................................................................78
6.2.13 Step13 : Stack Trace Function ......................................................................................79
6.2.14 What Next? ....................................................................................................................80
Reference 81
7. Windows/Dialogs 83
7.1 RAM Monitor Window ................................................................................................................84
7.1.1 Extended Menus ..............................................................................................................86
7.1.2 Setting the RAM monitor area........................................................................................87
7.2 ASM Watch Window ...................................................................................................................88
7.2.1 Extended Menus ..............................................................................................................89
7.3 C Watch Window.........................................................................................................................90
7.3.1 Extended Menus ..............................................................................................................92
7.4 Coverage Window........................................................................................................................93
7.4.1 Extended Menus ..............................................................................................................94
7.4.2 Refer to the Source Line/the Executed Address.............................................................95
7.5 Script Window.............................................................................................................................96
ii
7.5.1 Extended Menus ..............................................................................................................97
7.6 S/W Break Point Setting Window ..............................................................................................98
7.6.1 Command Button.............................................................................................................99
7.6.2 Setting and Deleting a Break Points from Editor(Source) Window............................ 100
7.7 H/W Break Point Setting Window............................................................................................101
7.7.2 Specify the Combinatorial Condition............................................................................106
7.7.3 Specify the Process ID...................................................................................................107
7.7.4 Command Button...........................................................................................................107
7.7.5 Specify the Events (Instruction Fetch).........................................................................108
7.7.6 Specify the Events (Memory Access) ............................................................................ 112
7.7.7 Specify the Events (Bit Access).....................................................................................136
7.7.8 Specify the Events (Interrupt) ......................................................................................138
7.7.9 Specify the Events (External Trigger Signal) ..............................................................140
7.7.10 Specify the Event Combination Condition .................................................................142
7.7.11 Specify the Process ID .................................................................................................145
7.8 Protect Window .........................................................................................................................146
7.8.1 Extended Menus ............................................................................................................146
7.9 Trace Point Setting Window.....................................................................................................147
7.9.1 Specify the Trace Event.................................................................................................148
7.9.2 Specify the Combinatorial Condition............................................................................151
7.9.3 Specify the Process ID...................................................................................................152
7.9.4 Specify the Trace Range................................................................................................152
7.9.5 Specify the Trace Write Condition................................................................................153
7.9.6 Command Button...........................................................................................................153
7.9.7 Specify the Events (Instruction Fetch).........................................................................154
7.9.8 Specify the Events (Memory Access) ............................................................................ 154
7.9.9 Specify the Events (Bit Access).....................................................................................154
7.9.10 Specify the Events (Interrupt) ....................................................................................154
7.9.11 Specify the Events (External Trigger Signal) ............................................................154
7.9.12 Specify the Event Combination Condition .................................................................154
7.9.13 Specify the Process ID .................................................................................................154
7.9.14 Specify the write condition..........................................................................................155
7.10 Time Measurement Window...................................................................................................159
7.10.1 Specify the Time Measurement Event........................................................................160
7.10.2 Time Measurement Condition ....................................................................................164
7.10.3 Command Button.........................................................................................................164
7.10.4 Specify the Events (Instruction Fetch).......................................................................165
7.10.5 Specify the Events (Memory Access) ..........................................................................165
7.10.6 Specify the Events (Bit Access)...................................................................................165
7.10.7 Specify the Events (Interrupt) ....................................................................................165
7.10.8 Specify the Events (External Trigger Signal) ............................................................165
7.10.9 Set the Measurement Condition .................................................................................166
7.11 Trace Window..........................................................................................................................170
7.11.1 Configuration of Bus Mode..........................................................................................170
7.11.2 Configuration of Disassemble Mode ...........................................................................172
7.11.3 Configuration of Data Access Mode............................................................................173
7.11.4 Configuration of Source Mode..................................................................................... 174
7.11.5 Extended Menus ..........................................................................................................175
7.11.6 Display of bus information on the M32C Debugger................................................... 176
7.11.7 Display of bus information on the M16C/R8C Debugger...........................................178
7.11.8 Display of bus information on the 740 Debugger....................................................... 180
7.12 Data Trace Window.................................................................................................................181
7.12.1 Extended Menus ..........................................................................................................182
7.13 GUI I/O Window......................................................................................................................183
7.13.1 Extended Menus ..........................................................................................................184
7.14 MR Window .............................................................................................................................185
7.14.2 Display the Task Status..............................................................................................187
iii
7.14.3 Display the Ready Queue Status ................................................................................191
7.14.4 Display the Timeout Queue Status.............................................................................192
7.14.5 Display the Event Flag Status....................................................................................194
7.14.6 Display the Semaphore Status....................................................................................196
7.14.7 Display the Mailbox Status.........................................................................................198
7.14.8 Display the Data Queue Status .................................................................................. 200
7.14.9 Display the Cycle Handler Status ..............................................................................202
7.14.10 Display the Alarm Handler Status ...........................................................................204
7.14.11 Display the Memory Pool Status ..............................................................................205
7.14.12 Display the Task Context.......................................................................................... 207
7.15 MR Trace Window...................................................................................................................209
7.15.1 Extended Menus ..........................................................................................................211
7.15.2 Refer the Execution History of Task(MRxx Window)................................................212
7.16 MR Analyze Window...............................................................................................................218
7.16.1 Configuration of CPU Occupancy Status Display Mode............................................218
7.16.2 Configuration of Ready State Duration Display Mode ..............................................219
7.16.3 Configuration of System Call History Display Mode.................................................219
7.16.4 Extended Menus ..........................................................................................................220
7.16.5 Analyze the Execution History of Task ......................................................................220
7.17 MR Task Pause Window.........................................................................................................223
7.17.1 About Task Pause Function ........................................................................................223
7.17.2 Extended Menus ..........................................................................................................224
7.17.3 Pause the Specified Task.............................................................................................225
7.18 Task Trace Window.................................................................................................................230
7.18.1 Extended Menus ..........................................................................................................231
7.18.2 Refer the Execution History of Task(Taskxx Window).............................................. 232
7.19 Task Analyze Window.............................................................................................................237
7.19.1 Extended Menus ..........................................................................................................237
7.19.2 Analyze the Execution History of Task ......................................................................238
8. Table of Script Commands 239
8.1 Table of Script Commands (classified by function) .................................................................239
8.1.1 Execution Commands....................................................................................................239
8.1.2 File Operation Commands ............................................................................................239
8.1.3 Register Operation Commands.....................................................................................240
8.1.4 Memory Operation Commands .....................................................................................240
8.1.5 Assemble/Disassemble Commands...............................................................................240
8.1.6 Software Break Setting Commands..............................................................................240
8.1.7 Hardware Break Setting Commands............................................................................241
8.1.8 Real-time Trace Commands..........................................................................................241
8.1.9 Coverage Measurement Commands .............................................................................241
8.1.10 Script/Log File Commands..........................................................................................241
8.1.11 Program Display Commands ......................................................................................241
8.1.12 Map Commands ...........................................................................................................242
8.1.13 Clock Command...........................................................................................................242
8.1.14 WatchDog Timer Commands ......................................................................................242
8.1.15 C Language Debugging Commands............................................................................242
8.1.16 Real-time OS Command..............................................................................................242
8.1.17 Utility Commands .......................................................................................................242
8.2 Table of Script Commands (alphabetical order) ......................................................................243
9. Writing Script Files 245
9.1 Structural Elements of a Script File ........................................................................................245
9.1.1 Script Command ............................................................................................................246
9.1.2 Assign Statement...........................................................................................................246
9.1.3 Conditional Statement ..................................................................................................246
9.1.4 Loop Statement(while,endw) and Break Statement....................................................247
9.1.5 Comment statements ....................................................................................................247
iv
9.2 Writing Expressions..................................................................................................................248
9.2.1 Constants .......................................................................................................................248
9.2.2 Symbols and labels ........................................................................................................249
9.2.3 Macro Variables.............................................................................................................250
9.2.4 Register variables ..........................................................................................................251
9.2.5 Memory variables ..........................................................................................................251
9.2.6 Line Nos. ........................................................................................................................251
9.2.7 Character constants ......................................................................................................252
9.2.8 Operators .......................................................................................................................252
10. C/C++ Expressions 253
10.1 Writing C/C++ Expressions ....................................................................................................253
10.1.1 Immediate Values........................................................................................................253
10.1.2 Scope Resolution..........................................................................................................254
10.1.3 Mathematical Operators ............................................................................................. 254
10.1.4 Pointers ........................................................................................................................254
10.1.5 Reference......................................................................................................................254
10.1.6 Sign Inversion..............................................................................................................255
10.1.7 Member Reference Using Dot Operator .....................................................................255
10.1.8 Member Reference Using Arrow.................................................................................255
10.1.9 Pointers to Members....................................................................................................256
10.1.10 Parentheses................................................................................................................256
10.1.11 Arrays.........................................................................................................................256
10.1.12 Casting to Basic Types .............................................................................................. 256
10.1.13 Casting to typedef Types ...........................................................................................257
10.1.14 Variable Name ...........................................................................................................257
10.1.15 Function Name ..........................................................................................................257
10.1.16 Character Constants..................................................................................................257
10.1.17 Character String Literals..........................................................................................257
10.2 Display Format of C/C++ Expressions...................................................................................258
10.2.1 Enumeration Types .....................................................................................................258
10.2.2 Basic Types ..................................................................................................................258
10.2.3 Pointer Types...............................................................................................................259
10.2.4 Array Types..................................................................................................................260
10.2.5 Function Types ............................................................................................................260
10.2.6 Reference Types...........................................................................................................260
10.2.7 Bit Field Types.............................................................................................................260
10.2.8 When No C Symbol is Found ......................................................................................261
10.2.9 Syntax Errors...............................................................................................................261
10.2.10 Structure and Union Types.......................................................................................261
11. Display the Cause of the Program Stoppage 262
12. Attention 263
12.1 Common Attention..................................................................................................................263
12.1.1 File operation on Windows..........................................................................................263
12.1.2 Area where software breakpoint can be set ...............................................................263
12.1.3 Get or set C variables ..................................................................................................264
12.1.4 Function name in C++................................................................................................. 265
12.1.5 Option settings for download modules........................................................................265
12.1.6 Debugging multi modules ...........................................................................................265
12.1.7 Synchronized debugging..............................................................................................265
12.1.8 Down-load of Firmware...............................................................................................265
12.1.9 Restriction of LPT port................................................................................................266
12.1.10 Notes for coverage function.......................................................................................267
12.1.11 Emulator reset switch ...............................................................................................267
12.1.12 Debugging Resource on Emulator ............................................................................267
12.2 Attention of the M32C Debugger ...........................................................................................268
v
12.2.1 Stack area used by the emulator ................................................................................268
12.2.2 Interrupt stack pointer when resetting the target program .....................................268
12.2.3 Option of C Compiler/Assembler/Linker ....................................................................268
12.2.4 Target MCU HOLD terminal...................................................................................... 268
12.2.5 Hardware Event ..........................................................................................................269
12.2.6 Time Measurement Resource......................................................................................269
12.2.7 CPU rewrite .................................................................................................................269
12.2.8 MR STK script command ............................................................................................269
12.3 Attention of the M16C/R8C Debugger ................................................................................... 270
12.3.1 Map of stack area used by the emulator.....................................................................270
12.3.2 Options for compiler, assembler, and linker ..............................................................270
12.3.3 TASKING C Compiler .................................................................................................270
12.3.4 Target MCU HOLD terminal...................................................................................... 270
12.3.5 Hardware Event ..........................................................................................................271
12.3.6 Operating frequency of MCU ......................................................................................271
12.3.7 The correspondence OS version of task pause function.............................................271
12.3.8 Memory Space Expansion ........................................................................................... 272
12.3.9 Watch dog timer...........................................................................................................272
12.3.10 CPU rewrite ...............................................................................................................272
12.3.11 MR STK script command .......................................................................................... 272
12.4 Attention of the 740 Debugger ...............................................................................................273
12.4.1 Setting of Memory Map...............................................................................................273
12.4.2 Emulation Pod M37515T-RPD....................................................................................273
12.4.3 Stack area used by the emulator ................................................................................273
12.4.4 Specify the Clock..........................................................................................................273
12.4.5 Watch dog timer...........................................................................................................273
12.4.6 Option of C Compiler/Assembler/Linker ....................................................................273
12.4.7 About the single-step execution and the program break function in the internal RAM
area of the mcu .......................................................................................................................274
12.4.8 Debugging in the 16-Timer functions .........................................................................274
12.4.9 Hardware Event ..........................................................................................................274
12.4.10 Operating frequency of MCU ....................................................................................274
12.5 Option of C Compiler/Assembler/Linker................................................................................275
12.5.1 When Using NCxx .......................................................................................................275
12.5.2 When Using the Assembler Package for 740 Family.................................................275
12.5.3 When Using the IAR C Compiler (EW) ......................................................................276
12.5.4 When Using the IAR C Compiler (ICC)......................................................................277
12.5.5 When Using the TASKING C Compiler (EDE)..........................................................278
12.5.6 When Using the TASKING C Compiler (CM)............................................................278
12.5.7 When Using the IAR EC++ Compiler (EW) ...............................................................279
vi
Setup of Debugger
1
(Blank Page)
2
1 Features

1. Features

1.1 Real-Time RAM Monitor Function

This function allows you to inspect changes of memory contents without impairing the realtime capability of target program execution. The PC4701 emulator system contains a 1-Kbyte RAM monitor area (which cannot be divided into smaller areas). This debugger supports the real time RAM monitor function which allows you to reference the memory data without sacrificing real time performance during execution of the target program.

1.1.1 RAM Monitor Area

This debugger provides a 1KB of RAM monitor area, which can be placed at any continuous addresses.
1

1.1.2 Sampling Period

Sampling cycle means the display update interval. You can specify this function in any window which supports the RAM monitor. (The interval of 100 ms is set by default.) The actual sampling cycle may take longer time than the specified cycle depending on the operating environment. (Sampling cycle depends on the following environments.)
Communication interface
Number of the RAM Monitor windows displayed
Size of the RAM Monitor window displayed
Number of ASM watch points within the RAM monitor area of the ASM Watch window
Number of C watch points within the RAM monitor area of the C Watch window

1.1.3 Related Windows

The window where the function of the real time RAM monitor function can be used is shown below.
RAM Monitor Window
ASM Watch Window
C Watch Window
2
1 Features

1.2 Break Functions

1.2.1 Software Breaks Function

Software Break breaks the target program before execution of the command at the specified address. This break point is called software breakpoint. The software breakpoint is set/reset in the Editor (Source) window or in the S/W Breakpoint Setting window. You can also disable/enable a software breakpoint temporarily. You can specify up to 64 software breakpoints. When specifying two or more software breakpoints, the breakpoint combination is based on the OR logic. (Arrival to any one of breakpoints breaks the target program.)
1.2.1.1 Setting of software breakpoint
The software breakpoint can be set by the following windows.
Editor (Source) Window
S/W Break Point Setting Window
You can double-click the mouse to set/reset the software breakpoint in the Editor (Source) window. You can also switch to temporarily disable/enable the software breakpoint in the S/W Breakpoint Setting window.
1.2.1.2 Area where software breakpoint can be set
The area which can be set for software breakpoint varies depending on the product. For the areas available for software breakpoint, see the following: "
12.1.2 Area where software breakpoint can be set"
3

1.2.2 Hardware Break

This function causes the target program to stop upon detecting a data read/write to memory, instruction execution, or the rising/falling edge of the input signal fed from an external trace cable. The contents of events that can be set vary with each target MCU.
The following designations are available as break events:
Address designation
- Instruction fetch
- Memory access
- Bit access
External trigger designation
Interruption
The number of events that can be specified are six events of all. For the address designation method, instruction fetch and memory access allow the range designation and logical condition designation, in addition to the normal one-address designation. Moreover, instruction fetch allows you to specify the function name. Memory access allows you to specify the comparison data to read/write data related to the specified address in the same manner as when setting the H/W breakpoint. It also allows mask designation to the comparison data.
These break events can be combined as below:
Trace when all of the valid events are established (AND condition)
Trace when all of the valid events are established at the same time (simultaneous AND condition)
Trace when one of the valid events is established (OR condition)
Trace upon entering a break state during state transition (State Transition condition)
When transitional conditions set in an interstate pass are met, a state transition occurs, in which case the target program can be made to stop upon entering a break state. The conceptual diagram shown below depicts the relationship between state and pass.
State transition break allows you to select "specified task only" (or "other than specified task") as the break condition to meet the real time OS.
4
1 Features

1.2.3 Protect Break

This function causes the target program to stop upon detecting a data write to the ROM area or an access to an unused area (read/write or instruction execution). Protect Break is a function to detect a write of data to the ROM area and an access (read, write, command execution) to an unused area and stop the target program.
1.2.3.1 Protect Attribute
You can specify the following attributes in byte.
Access Disable
Read Only
R/W Enable
1.2.3.2 Access Protect Area
A protect area is a continuous 256-KB area starting from the 64KB boundary. Its start address is called protect base address. The protect base address immediately after starting the emulator is set to 0h.
The entire protect area is set to "R/W Enable" by default at start of the emulator.
1.2.3.3 Set Method of Protect Break
The two types of designation methods are provided:
To fetch the memory attribute from the target program section information
To specify the memory attribute of any area
5

1.3 Real-Time Trace Function

This function records a target program execution history. Up to 32K cycles of execution history can be recorded. This record allows inspecting the bus information, executed instructions, and source program execution path for each cycle. The real-time trace function records the execution history of the target program. The execution history is referred to in the tracing window. The execution history can be referred to in the following mode.
BUS mode This mode allows you to inspect cycle-by-cycle bus information. The display content depends on the MCU and emulator system used. In addition to bus information, this mode allows disassemble, source line or data access information to be displayed in combination.
Disassemble mode This mode allows you to inspect the executed instructions. In addition to disassemble information, this mode allows source line or data access information to be displayed in combination.
Data access mode This mode allows you to inspect the data read/write cycles. In addition to data access information, this mode allows source line information to be displayed in combination.
Source mode This mode allows you to inspect the program execution path in the source program.

1.3.1 Trace Area

The 32K cycles execution history can be referred to with this debugger. The trace area of the following 5 mode is being supported.
Break 32K cycles before target program stops
Before 32K cycles before trace point
About 16K cycles either side of trace point
After 32K cycles after trace point
Full Until 32K cycles are written in the trace memory
"Break" is set by default. To refer the execution history before stopping the target program, use "Break" (designation of trace event is not required). To refer the execution history at any position, or to continue execution of the target program, specify the trace event and change the trance range.
6
1 Features

1.3.2 Trace Condition Setting

The following designations are available as trace events:
Address designation
- Instruction fetch
- Memory access
- Bit access
External trigger designation (eight events)
Interruption
The number of events that can be specified are six events of all. These break events can be combined as below:
Trace when all of the valid events are established (AND condition)
Trace when all of the valid events are established at the same time (And(same time) comdition)
Trace when one of the valid events is established (OR condition)
Trace upon entering a break state during state transition (State Transition condition)
You can select "specified task only" (or "other than specified task") as the trace condition to meet the real time OS.

1.3.3 Trace Data Write Condition

Trace data write conditions can be specified. You can specify the following write conditions:
Write conditions unlimited (default)
Cycles from the start event established to the end event established
Only cycles where the start event is established
Cycles from the start event established to the start event unestablished
Other than cycles from the start event established to the end event established
Other than cycles where the start event is established
Other than cycles from the start event established to the start event unestablished
7

1.4 Time Measurement Function

The time measurement function allows you to measure the maximum, minimum, and average execution times and measurement counts of a specified zone. With this debugger, time can be measured up to four points simultaneously.

1.4.1 The Measurement Condition

The measurement condition of the zone time can specify the following in each measurement zone.
Execution time of the specified function
Time between two events
Time between event establishments
Time of event occurrence period
8
1 Features

1.5 Coverage Function

Coverage Measurement is a function to record the addresses executed (accessed) by the target program (C0 coverage). After stopping execution of the target program, you can understand which addresses are not executed yet. By using the coverage measurement function in the test process, you can check for missing test items.

1.5.1 Coverage Measurement Area

The coverage measurement area is any continuous 256 KB area starting from the 64 KB boundary. The starting address is called coverage base address. The coverage base address immediately after starting the emulator is set to 0h.

1.5.2 Related Windows

Refer to the coverage measurement result in the following windows.
Editor (Source) Window
Memory Window
Coverage Window
9

1.6 Real-Time OS Debugging Function

This function debugs the realtime OS-dependent parts of the target program that uses the realtime OS. This function helps to show the status of the realtime OS and inspect a task execution history, etc.
The debugger for 740 can't show the status of the realtime OS.

1.7 GUI Input/Output Function

This function simulates the user target system's key input panel (buttons) and output panel on a window. Buttons can be used for the input panel, and labels (strings) and LEDs can be used for the output panel.
10
2 About the Emulator PC4701

2. About the Emulator PC4701

The PC4701 emulator system is a generic term used for the 8/16-bit MCU emulators. It can be used in combination with the emulation pod for the PC4701 to debug application programs for each MCU.

2.1 Communication methods

The supported communication methods vary with the type of emulator used.
I/F
USB Support - - LAN Support - Support LPT Support Support - Proprietary parallel - Support Support Serial - Support Support
Depending on communication methods, it is necessary to set up some items before the debugger can be started. Please see "
3.3 Setting before emulator starts "
Emulator
PC4701U PC4701M PC4701HS

2.2 Function table

The supported functions vary with the type of emulator used.
PC4701U/M/HS
S/W Break 64 point s H/W Break 6 points Real-Time Tr e ac 32K Cycles RAM Monitor 1K bytes area C0 Coverage 256K bytes area Time Measurement Go to Stop / 4 points interval Protect Break Access Protect
11

3. Before starting the debugger

3.1 Communication method by emulator

The supported communication methods are as follows. (The supported communication methods vary with the type of emulator used. ) USB, LAN, LPT, Proprietary parallel, Serial

3.1.1 USB Interface

Supported only when using the PC4701U emulator.
Compliant with USB Standard 1.1.
Connections via USB hub are not supported.
By connecting the host computer and the emulator with USB cable, it is possible to install the
supported device drivers using a wizard.
The necessary cable is included with the emulator.

3.1.2 LAN Interface

Supported only when using the PC4701U/HS emulator.
The IP address, etc. must be set in the emulator before it can be connected in a LAN.
To communicate with the emulator via a LAN on Windows, Windows' registry information must
partly be modified.
The PC4701U emulator in a LAN can be connected to the PC4701Us on another network connected to the LAN via a router.
The emulators PC4701U and PC4701HS use different LAN cables. Specifically, the PC4701U uses LAN cable (10BASE-T only) generally available on the market, whereas the PC4701HS uses the LAN cable (10BASE-T/5) included with it.
The host computer and the emulator can be connected directly.

3.1.3 LPT Interface

Supported only when using the PC4701U/M emulator.
This communication uses the host computer's parallel (printer) interface.
The necessary cable is included with the emulator.
Four communication modes are supported that include ECP, EPP, Byte, and Nibble.
Communication modes that can be supported depend on the host computer's BIOS settings. (Communication modes may not always be used even when they are supported by BIOS.)
12
3 Before starting the debugger

3.1.4 Proprietary Parallel Interface

Supported only when using the PC4701HS emulator.
The host computer must have a dedicated interface board, the PCA4202G02, incorporated in it (only the ISA bus is supported). The necessary cable is included with the emulator.
A device driver must separately be set.
3.1.4.1 Serial Interface
Supported only when using the PC4701M/HS emulator.
This communication uses the host computer's serial interface.
The necessary cable is included with the emulator.
13

3.2 Download of Firmware

It is necessary to down-load the firmware which corresponds to connected Emulation Pod when the debugger is started to the emulator.
You have changed your emulation pod.
The firmware downloaded to the emulator is unknown one.
You have setup the debugger for the first time.
You have upgraded emulator debugger.
Press the system reset switch within two seconds after powering up the PC4701 to establish the maintenance mode. This debugger searches the version of the firmware downloaded to the emulator at start. Also when the firmware downloaded to the emulator is of old version, a mode which drives this debugger to download firmware is set. When this debugger gets started while the emulator is set in the mode which drives the debugger to download firmware forcedly, the following dialog is opened at start. Click the OK button to download the firmware.
ATTENTION
If the emulator being used is the PC4701HS, use other communication methods (dedicated parallel or serial) to download the firmware.
Before the firmware can be downloaded by the emulator in a LAN connection, the IP address, etc. must first be registered in the emulator.
14
3 Before starting the debugger

3.3 Setting before emulator starts

3.3.1 USB communication

Connection of USB devices is detected by Windows' Plug & Play function. The device driver needed for the connected USB device is automatically installed.
3.3.1.1 Install of USB device driver
The USB devices connected are detected by Windows' Plug & Play function. The installation wizard for USB device drivers starts after the device had been detected. The following shows the procedure for installing the USB device drivers.
1. Connect the host computer and the emulator with USB cable.
2. Set the emulator's communication interface switch to the "USB" position. Then turn on the
power to the emulator.
3. The dialog box shown below appears.
Go on following the wizard, and a dialog box for specifying the setup information file (inf file) is displayed. Specify the musbdrv.inf file stored in a location below the directory where this debugger is installed.
ATTENTION
Before the USB device drivers can be installed, the debugger you use must already be installed. Install this debugger first.
A user who install the USB device driver need administrator rights.
During installation, a message may be output indicating that the device driver proper
musbdrv.sys cannot be found. In this case, specify the musbdrv.sys which is stored in the same directory as is the musbdrv.inf file.
15

3.3.2 LAN communication 1

Before the emulator can be connected in a LAN, the IP address, etc. must first be registered in the emulator. For the emulator in default settings, the utility "setip.exe" included with the debugger may be used to set the IP address, etc. in the emulator.
3.3.2.1 Setting of the LAN Interface using the SETIP.EXE
The utility "SETIP" included with this debugger may be used to set the IP address, etc. in the emulator while in default settings. SETIP detects the Emulator's in default settings that are connected to the same network. SETIP is stored in a location below the directory where this debugger is installed . The file name is "setip.exe".
To register the IP address in the emulator, follow the procedure described below.
1. Connect the emulator with LAN cable to the same network (same subnet) as the host computer
is connected.
2. Set the emulator's communication interface switch to the "LAN" position. Then turn on the
power to the emulator.
3. Start SETIP. When SETIP has started up, the dialog box shown below appears, choose the
emulator of use, click the OK button.
4. Click the OK button, and showing information on the emulator connected to the network. (This
information consists of the MAC address followed by the serial number of the emulator.)
To register the IP address, click the Next button. To cancel registration, click the Close button. If not displayed, check whether the communication interface switch is set correctly and after temporarily turning off the power, turn it back on again. Then click the Search button.
16
3 Before starting the debugger
5. Click the Next button, and the dialog box shown below appears. Set the IP address, subnet mask,
port number, and default gateway IP address. When using the emulator on the same network's same subnet mask, the default gateway IP address may be omitted.
Use any 4-digit number to specify the port number. (Enter that number when starting the debugger.) For details about the contents of the IP address, subnet mask, and default gateway to be specified, contact your network administrator.
6. Click the Set button on the dialog box. The IP address, etc. that have been set are registered in
the emulator. When registered correctly, the dialog box shown below appears.
After checking the contents of the dialog box, click the OK button.
7. Temporarily turn off the power to the emulator and turn it back on again. The registered IP
address becomes effective after the emulator is powered up again.
ATTENTION
If multiple Emulators in default settings are connected on the same network, only the first emulator detected is displayed.
The emulators which have had an IP address already set cannot be detected by SETIP. In such a case, connect to the emulator through another communication interface and re-register the IP address from the Init dialog box that appears. For details on how to set IP addresses from the Init dialog box, see "
5.2.3Setting of the LAN Interface."
17

3.3.3 LAN communication 2

Please exexute registry setting program (Sack.exe) before starting the debugger. It is necessary for LAN communication with emulators to set the following registry.
OS
Key Data
Windows XP/2000 HKEY_LOCAL_MACHINE¥S
YSTEM¥CurrentControlSet¥ Services¥Tcpip¥Parameters¥ SackOpts
You can clear the registry with executing the program "UnSack.exe". The above programs are installed in the directory where this debugger is installed.
ATTENTION
Make sure Sack.exe and UnSack.exe is executed by one who is authorized as an Administrator. No one but the user who has the authority of an Administrator can install the device driver.
Note Windows XP/2000 TCP supports "Selective Acknowledgments (SACK)" as documented in RFC 2018. SACK gives higher performance in the network which have high bandwidth and long round-trip delays like satellite channels. SACK support is enabled by default in Windows XP/2000. It is necessary for LAN communication with emulators by Windows XP/2000 to disable SACK support. Setting the above registry can disable SACK support. Note that when you use the network which have high bandwidth and long round-trip delays like satellite channels, the performance with SACK support disabled is lower than with enabled.
0(REG_DWORD)
18
Loading...
+ 264 hidden pages