H8S, H8/300 Series Simulator/Debugger For Windows: Hitachi Microcomputer Development Environment System
H8S, H8/300 Series Simulator/Debugger For Windows: Hitachi Microcomputer Development Environment System
User’s Manual
ADE-702-037D
Rev. 1.0
6/22/99
Hitachi, Ltd.
HSS008SDIW3SE
Cautions
1. Hitachi neither warrants nor grants licenses of any rights of Hitachi’s or any third party’s
patent, copyright, trademark, or other intellectual property rights for information contained in
this document. Hitachi bears no responsibility for problems that may arise with third party’s
rights, including intellectual property rights, in connection with use of the information
contained in this document.
2. Products and product specifications may be subject to change without notice. Confirm that you
have received the latest product standards or specifications before final design, purchase or
use.
3. Hitachi makes every attempt to ensure that its products are of high quality and reliability.
However, contact Hitachi’s sales office before using the product in an application that
demands especially high quality and reliability or where its failure or malfunction may directly
threaten human life or cause risk of bodily injury, such as aerospace, aeronautics, nuclear
power, combustion control, transportation, traffic, safety equipment or medical equipment for
life support.
4. Design your application so that the product is used within the ranges guaranteed by Hitachi
particularly for maximum rating, operating supply voltage range, heat radiation characteristics,
installation conditions and other characteristics. Hitachi bears no responsibility for failure or
damage when used beyond the guaranteed ranges. Even within the guaranteed ranges,
consider normally foreseeable failure rates or failure modes in semiconductor devices and
employ systemic measures such as fail-safes, so that the equipment incorporating Hitachi
product does not cause bodily injury, fire or other consequential damage due to operation of
the Hitachi product.
5. This product is not designed to be radiation resistant.
6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document
without written approval from Hitachi.
7. Contact Hitachi’s sales office for any questions regarding this document or Hitachi
semiconductor products.
Preface
The H8S, H8/300 Series Simulator/Debugger (referred to in this manual as the
simulator/debugger) is a software tool that simulates programs for the H8S, H8/300 series of
microprocessors to support program development and debugging on a host computer.
This user's manual describes the simulator/debugger functions and its usage. Read this manual
and the following manuals, and understand their contents before using the simulator/debugger.
For details on each H8S, H8/300 series microprocessor, refer to the appropriate hardware and
programming manuals.
Notes: 1. This manual assumes the operating environment to be the English version of
® ®
Microsoft Windows 95 operating system.
® ® ®
2. Microsoft , Windows , and WindowsNT are registered trademarks of Microsoft
Corporation in the United States and/or in other countries.
3. IBM PC is a personal computer administered by International Business Machines
Corporation.
4. ELF/DWARF is the name of an object format developed by the Tool Interface
Standard Committee.
5. All other products or brand names are trademarks or registered trademarks of their
respective holders.
Section 7 Messages.......................................................................................... 92
7.1 Information Messages....................................................................................................... 92
7.2 Error Messages ................................................................................................................. 93
When used with the following software, the simulator/debugger reduces the time required for
software development.
1.1 Features
The simulator/debugger has the following features:
• Since the simulator/debugger runs on a host computer, software debugging can start without
using an actual user system, thus reducing overall system development time.
• The simulator/debugger performs a simulation to calculate the number of instruction execution
cycles for a program, thus enabling performance evaluation without using an actual H8S or
H8/300 series user system.
• The simulator/debugger offers the following features and functions that enable efficient
program testing and debugging.
Handling all of the H8S and H8/300 series CPUs
Tracing instructions or subroutines
Stopping or continuing execution when an error occurs during user program execution
Measuring function-unit performance
A comprehensive set of break functions
Setting or editing memory maps
Displaying function call history
• The breakpoint, memory map, performance measurement, and trace can be set in the dialog
®
box under Windows . Environments corresponding to each memory map of the H8S and
H8/300 microprocessors can also be set in the dialog box.
Figure 1.1 shows the creation of SYSROF and S-type-format user program. Figure 1.2 shows the
creation of ELF/DWARF-format user program.
Library file
Inter-module
optimizer
S-type object
converter Load module
(SYSROF)
S-type
load module
Librarian
Library file
Inter-module
optimizer
The simulator/debugger does not support the following H8S and H8/300 series MCU functions.
Programs that use these functions must be debugged with the H8S and H8/300 series emulator.
A platform can be selected from the Select Session dialog box. For details, refer to section 4.3,
Selecting the Target Platform.
A memory map is specified to calculate the number of memory access cycles during simulation.
The simulator/debugger supports the memory types shown in table 2.2.
• Memory type
• Start and end addresses of the memory area
• Number of memory access cycles
• Memory data bus width
The memory resource, including the following items, can be specified in the System Memory
Resource Modify dialog box.
• Start address
• End address
• Access type
The access type can be read/write, read-only, or write-only. Since an error occurs if the user
program attempts an illegal access (for example, trying to write to a read-only memory), such an
illegal access in the user program can be easily detected. However, unlike the other memory areas,
a read-only EEPROM can be written to with the EEPMOV instruction and a writable EEPROM
can be written to only with the EEPMOV instruction.
• The program counter (PC) is modified after the instruction simulation stops and before it
restarts.
• The RUN command to which the execution start address has been specified is executed.
• Initialization is performed, or a program is loaded.
The SYSCR register address can be specified using [SYSCR Address] in the System
Configuration dialog box.
Note: The SYSCR register address must be within the internal I/O; otherwise the
simulator/debugger assumes the MACS bit as 0 (non-saturation operation) and EXR
bit as 0 (EXR disabled).
Rev. 1.0, 06/99, page 7 of 93
2.6 Control Registers
In the H8S/2600 series, the simulator/debugger supports the system control register (SYSCR) as a
memory-mapped control register. Therefore, a user program using multiply and accumulate
operation and EXR access can be simulated and debugged.
The SYSCR address can be specified using [SYSCR Address] in the System Configuration
dialog box. To modify or display a SYSCR value, use the Control Registers window and the
SYSCR dialog box.
For details, refer to section 5.4, System Configuration Dialog Box, section 5.13, Control Registers
Window, and section 5.14, SYSCR Dialog Box.
2.7 Trace
The simulator/debugger writes the results of each instruction execution into the trace buffer. The
trace buffer can hold the results for up to 1024 instruction executions. The conditions for the trace
information acquisition can be specified in the Trace Acquisition dialog box. Click the right
mouse button and choose [Acquisition] from the pop-up menu to display the Trace Acquisition
dialog box. The acquired trace information is displayed in the Trace window.
The trace information can be searched for. The search conditions can be specified in the Trace
Search dialog box. Click the right mouse button and choose [Find] from the pop-up menu to
display the Trace Search dialog box.
For details, refer to section 5.10, Trace Window through section 5.12, Trace Search Dialog Box.
Table 2.3 lists the I/O processing functions supported by the simulator/debugger. Each function
has three types of function codes: those for the16-bit address, for the 24-bit address, and for the
32-bit address. Select one according to the target CPU.
Function Code
16-Bit 24-Bit 32-Bit Function
No. Address Address Address Name Description
1 H'01 H'11 H'21 GETC Inputs one byte from the standard input device
2 H'02 H'12 H'22 PUTC Outputs one byte to the standard output device
3 H'03 H'13 H'23 GETS Inputs one line from the standard input device
4 H'04 H'14 H'24 PUTS Outputs one line to the standard output device
5 H'05 H'15 H'25 FOPEN Opens a file
6 H'06 H'06 H'06 FCLOSE Closes a file
7 H'07 H'17 H'27 FGETC Inputs one byte from a file
8 H'08 H'18 H'28 FPUTC Outputs one byte to a file
9 H'09 H'19 H'29 FGETS Inputs a line from a file
10 H'0A H'1A H'2A FPUTS Outputs a line to a file
11 H'0B H'0B H'0B FEOF Checks for end of file
12 H'0C H'0C H'0C FSEEK Moves the file pointer
13 H'0D H'0D H'0D FTELL Returns the current position of the file pointer
To perform I/O processing, use the [System Call Address] in the System Configuration dialog
box in the following procedure.
1. Set the address specialized for I/O processing in the [System Call Address], select [Enable]
and execute the program.
2. When detecting a subroutine call instruction (BSR or JSR) jumping to the specialized address
during user program execution, the simulator/debugger performs I/O processing with the R0
and R1 values (H8/300 and H8/300L series) or the ER1 value (H8/300H and H8S series) as
parameters.
• Set the parameter block address to the R1 register (H8/300 and H8/300L series) or ER1
register (H8/300H and H8S series). For the parameter block, refer to each function description.
MSB LSB
Parameter block address
Each parameter of the parameter block must be accessed in the parameter size.
After the I/O processing, the simulator/debugger resumes simulation from the instruction that
follows the system call instruction.
Parameter Block
(5)
Parameters
(6)
Parameter Block
• Function code: H'11 (for the 24-bit address) or H'21 (for the 32-bit address)
One byte One byte
+0
Input buffer start address
+2
Parameters
Parameter Block
• • Function code: H'12 (for the 24-bit address) or H'22 (for the 32-bit address)
One byte One byte
+0
Output buffer start address
+2
Parameters
• Function code: H'13 (for the 24-bit address) or H'23 (for the 32-bit address)
One byte One byte
+0
Input buffer start address
+2
Parameters
Parameter Block
• Function code: H'14 (for the 24-bit address) or H'24 (for the 32-bit address)
One byte One byte
+0
Output buffer start address
+2
Parameters
The FOPEN opens a file and returns the file number. After this processing, the returned file
number must be used to input, output, or close files. A maximum of 256 files can be open at the
same time.
Parameter Block
• Function code: H'15 (for the 24-bit address) or H'25 (for the 32-bit address)
One byte One byte
+0 Return value File number
+2 Open mode Unused
+4
Start address of file name
+6
Parameters
Parameter Block
Parameters
Parameter Block
• Function code: H'17 (for the 24-bit address) or H'27 (for the 32-bit address)
One byte One byte
+0 Return value File number
+2
Input buffer start address
+4
Parameters
Parameter Block
• Function code: H'18 (for the 24-bit address) or H'28 (for the 32-bit address)
One byte One byte
+0 Return value File number
+2
Output buffer start address
+4
Parameters
Reads character string data from a file. Data is read until either a new line code or a NULL code is
read, or until the buffer is full.
Parameter Block
+2 Buffer size
• Function code: H'19 (for the 24-bit address) or H'29 (for the 32-bit address)
One byte One byte
+0 Return value File number
+2 Buffer size
+4
Input buffer start address
+6
Parameters
Writes character string data to a file. The NULL code that terminates the character string is not
written to the file.
Parameter Block
• Function code: H'1A (for the 24-bit address) or H'2A (for the 32-bit address)
One byte One byte
+0 Return value File number
+2
Output buffer start address
+4
Parameters
Parameter Block
Parameters
Parameter Block
Parameters
Parameter Block
Parameters
The following shows an example for inputting one character as a standard input (from a keyboard)
for the 16-bit address.
MOV.W #H'0101,R0
MOV.W #PARM, R1
JSR @SYS_CALL
STOP NOP
SYS_CALL NOP
PARM .DATA.W INBUF
INBUF .RES.B 2
.END
When a break condition is satisfied during user program execution, the instruction at the
breakpoint may or may not be executed before a break depending on the type of break, as listed in
table 2.4.
When a break condition is satisfied during user program execution, a break condition satisfaction
message is displayed and execution stops.
The simulator/debugger detects simulation errors, that is, program errors that cannot be detected
by the CPU exception generation functions. The System Configuration dialog box specifies
whether to stop or continue the simulation when such an error occurs. Table 2.5 shows the error
messages and causes of simulation errors, and the operation of the simulator/debugger when
simulation is to be continued.
Processing in Continue
Error Message Error Cause Mode
Address Error A PC value was an odd number. Operates in the same way
An instruction was fetched from the internal I/O as the actual device.
area.
Word data was accessed to an odd-numbered
address.
Longword data was accessed to an odd-
numbered address.
Memory Access Error A memory area that had not been allocated Write access: Nothing is
was accessed. written to memory.
Data was written to a memory area having the Read access: All bits are
write protect attribute. read as 1.
Data was read from a memory area having the
read disable attribute.
A memory area in which memory does not exist
was accessed.
Data was written to EEPROM with an
instruction other than EEPMOV.
Illegal Instruction A code other than an instruction was executed. Always stops.
MOV.B Rn, @-SP or MOV.B @SP+, Rn was Continues operation; the
executed. result is not guaranteed.
Illegal Operation In the DAA or DAS instruction, relationship Continues operation; the
between the C and H flags of CCR, and their result is not guaranteed.
relation to the value before compensation were
incorrect.
Zero-division or overflow was caused by the
DIVXU or DIVXS instruction.
Use the following procedure when debugging programs which include instructions that generate
simulation errors.
1. Execute the program in the stop mode and confirm that there are no errors except those in the
intended locations.
2. After confirming the above, execute the program in the continue mode.
Note: If an error occurs and causes simulation to stop while in the stop mode, and
simulation is restarted after changing the simulator mode to the continue mode,
simulation may not be performed correctly. When restarting simulation, always
restore the register contents and the memory contents to the state prior to the
occurrence of the error.
After the [Break] mode is specified by [Trace buffer full handling] in the Trace Acquisition
dialog box, the simulator/debugger stops execution when the trace buffer becomes full. The
following message is displayed when execution is stopped.
When the SLEEP instruction is executed during instruction execution, the simulator/debugger
stops execution. The following message is displayed when execution is stopped.
Sleep
The user can forcibly terminate execution by pressing the [STOP] button during instruction
execution. The following message is displayed when execution is terminated.
Stop
• Data in the Set Break dialog box when [Break Data] or [Break Register] is selected as the
break type
• Data in the Memory window
• Data in the Fill Memory dialog box
• Data in the Search Memory dialog box
• Input data in the Register dialog box
In the simulator/debugger, the rounding mode for floating-point decimal-to-binary conversion can
be selected in the System Configuration dialog box. One of the following two modes can be
selected:
• When simulation stops under the break conditions described in section 2.10, Break Conditions.
• When register values are modified while simulation is halted due to the above break
conditions.
• While single-step execution is performed.
Note that the functions called after an interrupt are not displayed.
4.1 Introduction
This sample program is based on a C program that first sorts ten random data items in ascending
order, then in descending order.
The sample program is file Sort.c in the installation disk. A compiled version of the tutorial is
provided in the SYSROF format in file Sort.abs.
• For this tutorial, select H8S/2600A Simulator and click the [OK] button to continue the
procedure.
Note that you can change the target platform at any time by choosing [New Session…] from the
[File] menu. If you have only one platform installed, this menu option will not be available.
When the simulator/debugger has been successfully set up, the Hitachi Debugging Interface
window will be displayed, with the message Link up in the status bar. Figure 4.3 shows the key
functions of the window:
The following key functions of Hitachi Debugging Interface are described in detail in section 5.
Menu bar: Give you access to the HDI commands for using the HDI debugger.
Toolbar: Provides convenient buttons as shortcuts for the most frequently used menu
commands. Tool buttons from the same menu are displayed in the same block.
The tool buttons can be moved within the toolbar by clicking dragging them.
Whether to display the tool buttons can be selected by using the [Toolbar]
option in the [Customize] submenu in the [Setup] menu.
Status bar: Displays the status of the simulator/debugger, and progress information about
downloading.
Help button: Activates context sensitive help about any feature of the HDI user interface.
• Choose [Configure Map...] from the [Memory] menu to display the current memory mapping
(figure 4.4).
• Click the [Add] button to display the System Memory Resource Modify dialog box (figure
4.5).
• In [File name], enter the path for the directory where file Sort.abs is stored, or click the
[Browse...] button to open the Open dialog box and select the file Sort.abs and click the
[Open] button.
• Choose [Source...] from the [View] menu to open the Open dialog box (figure 4.9).
• Select the C source file that corresponds to the object file you have loaded. Specifically, select
Sort.c and click the [Open] button to display the Source window (figure 4.10).
• If necessary, choose the [Font] option from the [Customise] submenu in the [Setup] menu to
choose a font and a font size suitable for your computer.
Initially, the Source window displays the beginning of the main program, but you can use the
scroll bar to scroll through the program to see the other statements.
• Double-click in the [BP] column on the line containing the sort function call (figure 4.11).
The word • will be displayed on the line containing the sort function to show that a PC
breakpoint is set at that address.
• Select [Enable] in [Trace start/Stop] in the Trace Acquisition dialog box and click the [OK]
button to enable the trace information acquisition.
• Set [Function Name] as sort in the Performance Option dialog box, and click the [OK]
button.
In the Performance Analysis window, sort is then set in [Function].
• Click the right mouse button on the Performance Analysis window and choose [Analysis
Enabled] from the pop-up menu to activate the performance analysis information acquisition.
• Click [X] in the title bar to close the window.
• Choose [Registers] from the [View] menu to open the Registers window.
• Double-click the [Value] column of [ER7] in the Registers window (figure 4.15) to modify
the value of the stack pointer ER7.
• Enter H'4000 for the stack pointer value in this sample program and click the [OK] button.
The program will be executed up to the breakpoint you inserted. Then a statement will be
highlighted in the Source window to show that the program has halted at the statement, with
the message Break=PC Breakpoint in the status bar (figure 4.17).
• Choose the [Status] button from the [View] menu to open the System Status window. Then
choose the [Platform] sheet in the System Status window.
• Choose [Trace] from the [View] menu to open the Trace window (figure 4.20). Scroll up the
window so that you can see the first few cycles.
• If necessary, choose the [Font] option from the [Customise] submenu in the [Setup] menu to
choose a font and a font size suitable for your computer.
You can see that execution started at address 0, the start of the main function.
• Select the search item in [Item], enter the search contents in [Value], and click the [OK]
button to execute a trace search. When the corresponding trace information is found, the first
line of the information is highlighted (figure 4.22). When continuing trace search with the
same contents, click the right mouse button on the Trace window and choose [Find Next]
from the pop-up menu. The next corresponding line is highlighted.
The Breakpoints window also allows you to enable or disable breakpoints, define new
breakpoints, and delete breakpoints.
• Choose [Memory…] from the [View] menu to display the Open Memory Window dialog
box (figure 4.24), enter main in the [Address] field, and select Word for [Format].
• Click the [OK] button to open the Word Memory window showing the specified area of
memory (figure 4.25).
• Click [Add Watch] to add a variable to the Watch window (figure 4.27).
• Click the right mouse button on the Watch window to display a pop-up menu and choose
[Add Watch...].
The Add Watch dialog box appears (figure 4.28).
• You can double-click the + symbol to the left of array “a” in the Watch window to expand the
variable and show the individual elements in the array.
• To demonstrate program stepping, confirm that the sort function statement at address
H’00000066 has been executed (figure 4.31).
Clicking the [◊] button in the title bar of the Watch window automatically places the Watch
window next to the Source window as shown in figure 4.31.
Rev. 1.0, 06/99, page 54 of 93
4.17.1 Executing [Step In]
The [Step In] command steps into the called function and stops at the first statement of the called
function.
• To step into the sort function, choose [Step In] command from the [Run] menu, or click the
[Step In] button in the toolbar (figure 4.32).
The highlighted line moves to the first statement of the sort function in the Source window
(figure 4.33).
The [Step Out] command exits the called function and stops at the next statement in the calling
program.
• To step out of the sort function, choose [Step Out] command from the [Run] menu, or click
the [Step Out] button in the toolbar (figure 4.34).
The data of variable a displayed in the Watch window is sorted in ascending order (figure
4.35).
• The data of variable “a” displayed in the Watch window is sorted in ascending order. In the
Watch window, the values of the modified variables are shown in red.
• To execute two steps, use [Step In].
• The value of max displayed in the Watch window is modified to the maximum data value
(figure 4.36).
The [Step Over] command executes a function call as a single step and stops at the next statement
in the main program.
• To demonstrate [Step Over] command, execute two steps to reach the change function
statement (figure 4.37).
• To step through all statements in the change function at a single step, choose [Step Over]
command from the [Run] menu, or click the [Step Over] button in the toolbar (figure 4.38).
When the last statement of the change function is executed, the data of variable a, which is
displayed in the Watch window, is sorted in descending order (figure 4.39).
When the last statement of the change function is executed, the data of variable “a”, which is
displayed in the Watch window, is sorted in descending order.
• Open the Locals window by choosing [Locals] from the [View] menu.
Initially, the Locals window displays nothing because local variables have not yet been
declared.
• Choose [Step In] from the [Run] menu to execute a single step.
The Locals window will display the local variables and their values (figure 4.40).
• Double-click the + symbol in front of array a in the Locals window to display the separate
elements of array a.
• Refer to the elements of array a before and after executing the sort function, and confirm
that random data is sorted in ascending or descending order.
In this window, [Cycle] shows the total number of execution cycles required for the
sortfunction, and [%] shows the ratio of execution cycle count required for the function to the
execution cycle count required for the whole program.
The Performance Analysis window allows you to enable or disable the performance analysis,
define new functions for performance analysis, or delete functions.
This section describes windows and dialog boxes displayed by the simulator/debugger of H8S and
H8/300 series microprocessors.
[Enable] Displays whether the breakpoint is enabled or disabled. Breakpoints with • are
enabled.
[File/Line] Displays file names and line numbers where breakpoints are specified.
Clicking anywhere in the Breakpoints window with the right mouse button displays the following
pop-up menu:
[Add...] Sets breakpoints. Clicking this button will open the Set Break dialog box and
break conditions can be specified.
[Edit...] Edits breakpoints. Select breakpoints to be edited and click this button. The Set
Break dialog box will open and break conditions can be changed.
Note that if a break sequence is selected for editing, the Break Sequence dialog
box will open.
[Delete] Deletes specified breakpoints. Select breakpoints to be deleted and click this
button.
[Go to Source] Displays source code. After selecting the breakpoint to display in the
Breakpoints window, click the menu to open the Source window or
Disassembly window.
The line with the selected breakpoint will then be indicated by the cursor.
A break type is specified using the radio buttons in the [Type] box. Items that can be specified for
each break type are listed below.
[Break Access] [Start address] Start address of memory where a break occurs if the memory
is accessed
[End address] End address of memory where a break occurs if the memory is
accessed (If no data is input, only the start address is
specified.)
[Access type] Read, Write, or Read/Write (Default is Read/Write)
[Break Register] [Register] Register name where break conditions are specified
[Data] Data value that causes a break (If no data is input, a break
occurs whenever data is written to the register.)
[Size] Data size (Default is byte)
[Option] Match or unmatch of data (Default is match)
Note that when [Break Sequence] is selected under [Type], the Break Sequence dialog box
opens.
When [PC Breakpoint] is selected, if an overloaded function or class name including a member
function is specified in [Start Address], the Select Function dialog box opens. In the dialog box,
select a function. For details, refer to the Hitachi Debugging Interface User's Manual.
After specifying each item, click the [OK] button. Break conditions will be specified. Clicking the
[Cancel] button closes this dialog box.
Specify addresses in [Address1] to [Address8]. Not all eight addresses need to be specified.
When an overloaded function or a class name including a member function is specified as a pass
address, the Select Function dialog box will open; select the function name in the dialog box. For
details, refer to the HDI User's Manual.
Clicking the [OK] button sets the pass addresses. Clicking the [Cancel] button closes this dialog
box without adding a new pass address.
This dialog box specifies the address space bit size, program area bit size, SYSCR address, system
call start address, execution mode, floating-point rounding mode, and memory map of the
simulator/debugger.
[CPU] Displays the CPU name. The CPU must be specified in the Select Session dialog box.
[Execution Mode]
Specifies whether the simulator/debugger stops or continues operating when a
simulation error occurs.
[Stop] Stops the simulation when an error occurs.
[Continue] Continues the simulation when an error occurs.
[Round Mode]
Specifies the rounding mode for floating-point decimal-to-binary conversion.
[Round to nearest] Rounds to the nearest value.
[Round to zero] Rounds toward zero.
In the [Memory Map], the start address, end address, memory type, data bus width, and access
cycles are displayed. [Memory Map] can be specified, modified, or deleted by using the
following buttons:
[Add] Specifies [Memory Map] items. Clicking this button opens the Memory Map
Modify dialog box, and memory map items can be specified.
[Modify] Modifies [Memory Map] items. Select an item to be modified in the list box and
click this button. The Memory Map Modify dialog box will open and memory map
items can be modified.
[Delete] Deletes [Memory Map] items. Select an item to be deleted in the list box and click
this button.
For the H8S/2600 series, the address of the system control register (SYSCR) can be specified in
[SYSCR Address]. Specify an address within the internal I/O.
Clicking the [OK] button stores the modified settings. Clicking the [Cancel] button closes this
dialog box without modifying the settings.
This dialog box specifies the memory map of the target CPU of the simulator/debugger.
The contents displayed in this dialog box depend on the target CPU. The specified data is used to
calculate the number of cycles for memory access.
After specifying each item, click the [OK] button to make the setting effective. Clicking the
[Cancel] button closes this dialog box.
This dialog box displays a memory map and information on the target CPU.
[System Configuration] Displays the target CPU, address space bit size, program area bit
size, and execution mode of the simulator/debugger.
[System memory resource] Displays the access type, start address, and end address of the
current memory.
[Memory map] Displays the start address, end address, memory type, data bus
width, and access cycles.
[System memory resource] can be specified, modified, and deleted using the following buttons:
[Add] Specifies [System memory resource] items. Clicking this button opens the System
Memory Resource Modify dialog box, and [System memory resource] items can be
specified.
[Modify] Modifies [System memory resource] items. Select an item to be modified in the list
box and click the Modify button. The System Memory Resource Modify dialog box
opens and [System memory resource] items can be modified.
Note that the [Reset] button can reset the [Memory map] and [System memory resource] to the
default value. Clicking the [Close] button closes this dialog box.
Click the [OK] button after specifying the [Start address], [End address], and [Access type].
Clicking the [Cancel] button closes this dialog box without modifying the setting.
This window displays the number of execution cycles required for the specified functions.
The number of execution cycles can be obtained from the difference between the total number of
execution cycles when the target function is called and that when execution returns from the
function.
[%] Ratio of execution cycle count required for the function to the execution cycle count
required for the whole program
Click the right mouse button on the Performance Analysis window to display the pop-up menu.
Here, functions to be evaluated can be added, modified, deleted, or reset using the following
buttons. Up to 255 functions can be specified.
[Add Range...] Adds functions to be evaluated. Clicking this button opens the
Performance Option dialog box, and functions can be added.
[Analysis Enabled] Reverses the stop/restart status of the performance analysis. When
evaluation starts, a check mark will appear to the left of this menu item.
Double-clicking a function to be evaluated displays the Performance Option dialog box. In this
dialog box, functions can be modified.
This dialog box specifies functions (including labels) to be evaluated. Evaluation results will be
displayed in the Performance Analysis window.
Note that when an overloaded function or a class name including a member function is specified,
the Select Function dialog box will open. In the dialog box, select a function. For details, refer to
the Hitachi Debugging Interface User's Manual.
Clicking the [OK] button stores the setting. Clicking the [Cancel] button closes this dialog box
without setting the function to be evaluated.
[PTR] Pointer in the trace buffer (The last executed instruction will be 0)
[CYCLE] Total number of instruction execution cycles (cleared when the PC value
changes)
[MULT] Flags of internal multiplier (mnemonic display, only for H8S/2600 series)
[INSTRUCTION] Instruction mnemonic and data access (displayed in the form of [Transfer
destination <− Transfer data])
The pop-up menus can be displayed by clicking the Trace window with the right mouse button.
The window has the following pop-up menus.
[Find...] Searches trace information. Clicking this button opens the Trace Search dialog
box, and search conditions can be specified.
[Find Next] Searches trace information for the next occurrence of the item specified by
[Find...].
[View Source] Displays source code. After selecting the line to display in the Trace window,
click the menu to open the Source window or Disassembly window.
The line with the selected breakpoint will then be indicated by the cursor.
[Trim Source] Selects whether to left-justify the [Source] items. If the [Source] items are left-
justified, a check mark will appear to the left of this menu item.
Double-clicking a line in the Trace window opens the Source window or Disassembly window.
In the window, the source code is displayed and the selected line is indicated by the cursor.
This dialog box specifies the conditions for acquiring trace information.
[Trace start/Stop]
[Disable] Stops trace information acquisition.
[Enable] Starts trace information acquisition.
[Instruction type]
[Instruction] Acquires trace information for all instructions.
[Subroutine] Acquires trace information for the subroutine instructions only.
Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box
without modifying the settings.
This dialog box specifies the conditions for searching trace information. Specify a search item in
[Item], and the contents in [Value] will be searched for.
[PTR] Pointer in the trace buffer (The last executed instruction will be 0. Specify in the
form of -nnn.)
Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box
without searching.
This window displays the following control register value. Note that this window is available only
for the H8S/2600 series.
The control register value can be directly modified in the window. Double-clicking the register
opens the SYSCR dialog box. In this dialog box, the register value can be modified in bit units.
This dialog box sets the value of the SYSCR register (system control register). Note that this
dialog box is available only for the H8S/2600 series.
[MACS bit] Selects saturation operation or non-saturation operation for the multiply and
accumulate operation (MAC instruction). Checking this item selects the saturation
operation.
[EXR bit] Enables or disables the EXR register. Checking this item enables the EXR register.
Clicking the [OK] button sets modified values in the memory. Clicking the [Cancel] button closes
this dialog box.
This window is for standard I/O and file I/O system calls from the user program.
Clicking the right mouse button on the Simulated I/O window displays the following pop-up
menus.
®
[Copy] Copies the highlighted text to the Windows clipboard so that the text can be
pasted to another application.
®
[Paste] Pastes the text from the Windows clipboard to the Simulated I/O window.
For the I/O processing, refer to section 2.8, Standard I/O and File I/O Processing.
This window displays the function call history except the functions called after an interrupt.
Selecting a displayed function and clicking the [Go To] button, or double-clicking a displayed
function displays the corresponding source program in the Source window.
Details of each command are provided in the format shown in figure 6.1.
Syntax: (4)
Parameters: (5)
Examples: (6)
Syntax: BREAKPOINT∆address[∆count]
Parameters: start address The start address of the break memory range, to which access stops
program execution
end address The end address of the break memory range, to which access stops
program execution. If omitted, the end address is assumed to be the
same as the start address.
Parameters: index Index of the breakpoint to be canceled. If the index is omitted, all
breakpoints are canceled.
Syntax: BREAK_DISPLAY
end address End address of a memory area. If omitted, the end address
is assumed to be the same as the start address.
Message Contents
Break Access The break access condition was satisfied and execution has stopped.
Break Data The break data condition was satisfied and execution has stopped.
PC Breakpoint The breakpoint condition was satisfied and execution has stopped.
Break Register The break register condition was satisfied and execution has stopped.
Break Sequence The break sequence condition was satisfied and execution has stopped.
Stop Execution has been stopped by the [STOP] button.
Sleep Execution has been stopped by the SLEEP instruction.
Step Normal End The step execution was normally completed.
Trace Buffer Full The Break mode was selected by Trace buffer full handling in the Trace
Acquisition dialog box and the trace buffer became full. As a result,
execution has stopped.