Renesas | PC7501 | M16C Family PC7501 Emulator Application Note

Application Note
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
Overview
The full-spec emulator PC7501 for the M16C family provides a data trace function that analyzes realtime trace
measurement results and graphically displays data access information. This document describes how to graphically
display data access information from data trace results by using the PC7501 emulator.
In the description, a user system with an M16C/60 series microcomputer is connected with the PC7501 emulator. The
contents of this document are applicable to cases there a user system with any microcomputer is used with the PC7501
emulator. Graphical display of data trace results is also available for the M16C and M32C simulator.
Contents
1.
Specifications ...................................................................................................................................... 2
2.
Functional Descriptions........................................................................................................................ 2
3.
3.1
3.2
3.3
Software Preparation............................................................................................................................ 2
Introduction......................................................................................................................................... 2
Installing the PC7501 Emulator Software............................................................................................... 2
Installing Other Necessary Software...................................................................................................... 2
4.
4.1
4.2
4.3
4.4
4.5
Operations........................................................................................................................................... 3
Activating the High-Performance Embedded Workshop.......................................................................... 3
Opening a Workspace .......................................................................................................................... 4
Acquiring and Analyzing Realtime Trace Data....................................................................................... 8
Graphically Displaying Data Trace Results .......................................................................................... 12
Optional Menus ................................................................................................................................. 16
5. Frequently Asked Questions ............................................................................................................... 20
5.1 How can I compare changes in multiple data items? ............................................................................. 20
5.2 How can I check the variable access history when the range between the maximum and minimum values is
wide? ........................................................................................................................................................ 20
6.
Related Documents ............................................................................................................................ 21
REJ06J0048-0100/Rev.1.00
2008.07
Page 1 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
1.
Specifications
The data trace function in the PC7501 emulator analyzes the results of the realtime trace measurement function,
which records the history of target program execution (up to 256-K cycles of execution) through the data trace window,
and graphically displays data access information. Through this function, the memory status in the specified cycle or the
change of data at the specified memory address can be monitored. This function can be used in connection with the
[Trace] window.
2.
Functional Descriptions
This document explains how to graphically display the data trace results by using the sample program provided in the
PC7501 emulator CD-ROM or in the package that can be downloaded from the Renesas website.
The versions of each tool are as follows:
PC7501 emulator software:
-M16C PC7501 Debugger V1.03 Release 00
M16C/60, 30, Tiny, 20, 10, R8C/Tiny series C compiler package:
-M3T-NC30WA V.5.43 Release 00
3.
3.1
Software Preparation
Introduction
Install the software provided in the CD-ROM of the PC7501 emulator to expand the sample program (tutorial
workspace) to be used with this document on your personal computer.
3.2
Installing the PC7501 Emulator Software
Execute M16cPc7501Debugger.exe from the CD-ROM of the PC7501 emulator. For details on installation, refer to
the setup guide for the PC7501 emulator on the Renesas website and follow the directions shown on the screen during
installation. The full installation procedure is not described in this document.
3.3
Installing Other Necessary Software
(1) In the description in this document, part of the sample program is modified before the program operation is
checked. For this purpose, the M16C/60, 30, Tiny, 20, 10, R8C/Tiny series C compiler package is necessary.
Install a production-version compiler package if you have one.
(2) If you do not have a production-version compiler package, a free evaluation-version compiler package is available
from the CD-ROM of the E8 emulator or from the Renesas website. The free evaluation-version M16C/60, 30,
Tiny, 20, 10, R8C/Tiny series C compiler package can be found from the top page by selecting [Support],
[Download], [Download Search], and [Select Category], in that order, then selecting [Evaluation Version]. Links
to the Renesas website are given in the last section of this document. Notes on restrictions and instructions for
installing the evaluation version are available on the download page.
(3) When the auto-update utility is selected upon installation of software, the latest versions of the tools can be found
through internet.
REJ06J0048-0100/Rev.1.00
2008.07
Page 2 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
4.
Operations
This section explains how to activate the High-performance Embedded Workshop (HEW) and how to display data
trace results graphically in the following steps.
START
Activating the HEW
Opening a workspace
Acquiring and analyzing realtime trace data
Graphically displaying data trace results
Description of optional menus
END
Figure 4.1
4.1
Procedures for Sample Program Execution
Activating the High-Performance Embedded Workshop
First, connect the PC7501 emulator with the user system to the host computer via the USB cable, and check that
debugging is enabled.
Next, activate the High-performance Embedded Workshop by opening the [Start] menu and selecting [All Programs],
[Renesas], [High-performance Embedded Workshop], and [High-performance Embedded Workshop], in that order.
REJ06J0048-0100/Rev.1.00
2008.07
Page 3 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
4.2
Opening a Workspace
(1) The [Welcome!] dialog box will appear on the High-performance Embedded Workshop screen.
Select the [Browse to another project workspace] radio button in the [Welcome!] dialog box and click on the [OK]
button.
REJ06J0048-0100/Rev.1.00
2008.07
Page 4 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(2) The [Open Workspace] dialog box will appear.
When the software from the CD-ROM of this product has been installed, workspace "Tutorial.hws" is stored in the
folder structure shown below (standard location). Specify the correct location by opening the folders in order.
Select the workspace "Tutorial.hws" and click on the [Select] button.
C:¥WorkSpace¥Tutorial¥PC7501¥M16C¥Tutorial¥Tutorial.hws
C:¥WorkSpace
└Tutorial
└PC7501
└M16C
└Tutorial
└Tutorial.hws
Note: The above directory may not be specifiable depending on the software version. In this case, select the
following directory.
<High-performance Embedded Workshop installation directory>
\Tools\Renesas\DebugComp\Platform\E8\M16C\Tutorial
Directory examples:
C:\hew3\Tools\Renesas\DebugComp\Platform\E8\M16C\Tutorial
C:\hew2\Tools\Renesas\DebugComp\Platform\E8\M16C\Tutorial
(3) If the workspace version is old, the following dialog box will appear. To update it to the new version, click on the
[OK] button.
REJ06J0048-0100/Rev.1.00
2008.07
Page 5 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(4) After the workspace has opened, operation on the High-performance Embedded Workshop screen becomes
available. Switch the session to connect the PC7501 emulator; switch from [DefaultSession] to
[SessionM16C_R8C_PC7501_Emulator] on the toolbar.
Firstly, turn the interface switch on the rear panel of the PC7501 emulator main unit to the USB side, and then turn
on the power.
If a dialog box appears asking whether to save the previous session, select [Yes].
REJ06J0048-0100/Rev.1.00
2008.07
Page 6 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(5) The [Init (M16C R8C PC7501 Emulator)] dialog box will appear. In the [MCU] tab, specify the MCU file
corresponding to the emulation probe in use by clicking on the [Refer…] button, select the [USB] radio button, and
click on [OK].
Automatically selected
- When connecting the emulator through LPT or LAN instead of USB, refer to the PC7501 user's manual on the
Renesas website.
(6) The [MCU Setting] dialog box will appear. Select "Single-Chip Mode" for [Processor Mode] in the [MCU] tab,
and click on [OK].
REJ06J0048-0100/Rev.1.00
2008.07
Page 7 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(7) After the PC7501 emulator has been successfully connected, operation on the High-performance Embedded
Workshop screen becomes available. When the connection has been completed, "Connected" is displayed in the
[Debug] tab of the [Output] window.
4.3
Acquiring and Analyzing Realtime Trace Data
First, execute the target program, and acquire and analyze realtime trace data.
(1) Add the codes shown in the red boxes in the following figure to source file "Tutorial.c".
REJ06J0048-0100/Rev.1.00
2008.07
Page 8 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(2) Build a project to reflect the modifications made in source file Tutorial.c. Click on [Build] in the [Build] menu.
When there is no error in the codes added to source file "Tutorial.c", the message (0 Errors, 0 Warnings) shown in
the following figure will be displayed in the [Output] window.
(3) When the build process has been completed, the [Confirmation Request] dialog box will appear. Select "No to all".
REJ06J0048-0100/Rev.1.00
2008.07
Page 9 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(4) Next, download the target program; double-click on [Tutorial.x30 - 00000000] under [Download modules] on
[Workspace].
When the program has been downloaded, a downward arrow will appear on the icon of the file.
(5)
Click on the [Reset Go] icon to execute the program.
[Reset Go] can also be selected from the [Debug] menu.
(6)
After execution of the target program for an appropriate period, click on the [STOP] icon at any desired point of
time to stop program execution (execution can also be stopped from the [Debug] menu).
REJ06J0048-0100/Rev.1.00
2008.07
Page 10 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(7) Next, open the data trace window; open the [View] menu and select [Trace] and [Data Trace] in that order.
(8) The data trace window will open. To display data in the data trace window, analyze the trace data; right-click on
the data trace window and select [Analyze Trace Data].
This operation can also be selected through the [Analyze] icon in the top left corner of the data trace window.
REJ06J0048-0100/Rev.1.00
2008.07
Page 11 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(9) When analysis starts, the [Analyze trace data] dialog box will appear. Wait for a while. To abort analysis, click on
[Cancel]. If an analysis in progress is cancelled, the data trace window will show data for the range analyzed up to
that point.
4.4
Graphically Displaying Data Trace Results
Next, specify target variables to monitor through the data trace window and to graphically display the access history.
(1) No symbols are registered by default; specify target variables to monitor. Right-click on the [C Watch] tab of the
data trace window and select [Add C Watch].
- Variables can also be specified by dragging and dropping from other windows (the editor window or C
watch window).
- If a local variable is specified, a correct value cannot be displayed. When specifying a file local variable,
be sure to specify it while the variable is within the scope.
REJ06J0048-0100/Rev.1.00
2008.07
Page 12 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(2) The [Add] dialog box will appear. Enter a target variable and click on [OK]. In this example, enter two variables,
"a[0]" and "b".
(3)
The specified variables will be displayed in the data reference area of the data trace window. The values shown
under [Value] are C-variable values in the specified cycle (the point at the indicator).
Data reference area
Indicator
REJ06J0048-0100/Rev.1.00
2008.07
Page 13 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(4) To delete a specified variable, select the target variable, right-click on it, and select [Remove C Watch].
(5) Then, display the history of access to the specified variables graphically; right-click on the [C Watch] tab of the
data trace window and select [Add...] or click on the [Add] icon.
REJ06J0048-0100/Rev.1.00
2008.07
Page 14 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
Watch items can also be added by dragging and dropping from other windows (the editor window or C watch
window).
Drag and drop
(6) After the items have been added, the access history reference area will display the history of access to the variables
graphically.
Access history reference area
- On each row, the maximum and minimum values of the specified variable are shown at the left end, and the y
value of the horizontal grid is shown at the right end. The x value (time) of the left end of the current graph is
shown in the bottom left corner.
- The parameters shown at the top of the data trace window indicate, from left to right, the time of the point at the
indicator (Current), the time of the point at the marker (Mark), the grid interval (Grid), and the display scale
(Scale). The green line is the indicator and the blue one is the marker.
- In the access history reference area, you can see the history of access to specified addresses in a chart.
- The indicator location can be linked with the [Trace] window, and you can check the memory values in the
cycle that you are inspecting in the [Trace] window. In addition, the cycle at the indicator can also be displayed in
the [Trace] window.
REJ06J0048-0100/Rev.1.00
2008.07
Page 15 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(7) To delete a specified variable, select the target variable, right-click on it, and select [Remove].
4.5
Optional Menus
This section describes the optional menus displayed by right-clicking on the data trace window.
REJ06J0048-0100/Rev.1.00
2008.07
Page 16 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(1) Analyze Trace Data (see (8) in section 4.3)
Analyzes the realtime trace data and acquires data access information. If data analysis in progress is canceled, the
data trace window shows information for the cycles analyzed up to the cancellation point.
(2) Set Cycle...
Changes the indicator and marker locations.
[Set Cycle...] can also be specified through an icon.
(3) Sync with Trace Window
Selects whether to synchronize the operation with the [Trace] window. When this menu is selected (a check mark
is displayed), the indicator in the data trace window moves in synchronization with the cycle displayed in the
[Trace] window.
(4) Add C Watch… (see (1) in section 4.4)
Adds a variable in the data reference area. As this menu operation is applied to the current active display area, be
sure to click on the display area where data items should be registered before selecting this menu.
(5) Remove C Watch (see (4) in section 4.4)
Removes the selected variable from the data reference area. This menu operation is applied to the current active
display area.
(6) Hide Type Name
Selects whether to display the variable types when the data reference area is displayed in C-variable form. The
following figure is a sample display when this menu is selected (a check mark is displayed).
REJ06J0048-0100/Rev.1.00
2008.07
Page 17 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(7) Add... (see (5) in section 4.4)
Adds an address or variable in the access history reference area. As this menu operation is applied to the current
active display area, be sure to click on the display area where data items should be registered before selecting this
menu.
(8) Remove (see (7) in section 4.4)
Removes the selected address or variable from the access history reference area. This menu operation is applied to
the current active display area.
(9) Zoom
Changes the scale of display in the access history reference area. [Zoom In] increases the scale by 20%, and
[Zoom Out] reduces it by 20%. In addition, any desired scale can be specified through [Set Scale].
The [Zoom In] and [Zoom Out] operations can also be selected through icons.
(10) Marker
Moves the marker and indicator to the current display in the access history reference area. Selecting [Adjust]
magnifies the display of the range between the two markers to the full width of the window.
The [Marker] operations can also be selected through icons.
(11) Change Grid Interval...
Specifies the grid interval in the access history reference area.
REJ06J0048-0100/Rev.1.00
2008.07
Page 18 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
(12) Change Row Setting...
Changes the settings for each row in the access history reference area.
The following settings can be made.
- Masking registered data
- Changing the display color for each registered data item
- Changing the display data range
- Changing the height of the row.
(13) Color...
Changes the color of the display in the window. The background color for each display area and the color for
characters can be changed.
When "Do not change colors for R/W lines" is selected, the color for the y axis is the same as that for the x axis in
the access history display (by default, the y axis color is green for read access or red for write access).
Clicking on the [Reset] button resets the display colors to the default settings.
REJ06J0048-0100/Rev.1.00
2008.07
Page 19 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
This is the end of the explanation on graphically displaying the data trace results.
5.
5.1
Frequently Asked Questions
How can I compare changes in multiple data items?
Drag and drop the multiple data items into the same row of the access history reference area, and you can see the
overlapped access histories in one row.
In this case, you can easily compare the data items by selecting "Do not change colors for R/W lines" in the [Color...]
menu and specifying different colors for the multiple data items in the [Change Row Setting...] menu.
5.2
How can I check the variable access history when the range between the maximum and
minimum values is wide?
When the displayed range of changes of the value is small with respect to the range between the maximum and
minimum values of the variable, you may not see the changes in the display in the window. In this case, change the
maximum and minimum values for display of the data in the [Change Row Setting...] menu.
203~15000
203~32516
REJ06J0048-0100/Rev.1.00
2008.07
Page 20 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
6.
Related Documents
The PC7501 emulator and High-performance Embedded Workshop provide many other useful functions not
mentioned in this document. Please refer to the following related documents for important information such as detailed
specifications, technical information, or restrictions on each product.
[Documents Related to the PC7501 Emulator]
・ M16C R8C PC7501 Emulator Debugger User's Manual (for M16C/60, M16C/30, M16C/Tiny, R8C/Tiny
Series)
・ M16C R8C PC7501 Emulator Debugger Release Notes (for M16C/60, M16C/30, M16C/Tiny, R8C/Tiny
Series)
・ PC7501 Setup Guide (Emulator for M16C Family)
・ PC7501 User's Manual (Emulator for M16C Family)
[Documents Related to High-Performance Embedded Workshop]
・ High-performance Embedded Workshop User's Manual
・ High-performance Embedded Workshop Release Note
[Documents Related to MCU]
・ M16C/62P Group(M16C/62P,M16C/62PT) Hardware Manual
・ M16C/60, M16C/20, M16C/Tiny Series Software Manual
[Documents Related to M16C/60 Series C Compiler Package]
・ M3T-NC30WA C Compiler Guidebook (C Compiler Package for R8C/Tiny, M16C/60, M16C/30,
M16C/20, M16C/10, M16C/Tiny Series)
・ M3T-NC30WA Assembler User's Manual (C Compiler Package for R8C/Tiny, M16C/60, M16C/30,
M16C/20, M16C/10, M16C/Tiny Series)
Visit the following Renesas websites for information on this product:
Global site:
http://www.renesas.com/pc7501
Japanese site:
http://japan.renesas.com/pc7501
REJ06J0048-0100/Rev.1.00
2008.07
Page 21 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
Renesas Website and Customer Support
Renesas Technology Website:
http://www.renesas.com/
Customer Support:
http://www.renesas.com/inquiry
csc@renesas.com
Revision History
Rev..
1.00
Publication Date
Jul. 15, 2008
REJ06J0048-0100/Rev.1.00
Page
—
Revisions
Description
First edition
2008.07
Page 22 of 23
M16C Family PC7501 Emulator
Graphical Display of Data Trace Results
Notes regarding these materials
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas
products for their use. Renesas neither makes warranties or representations with respect to the accuracy or
completeness of the information contained in this document nor grants any license to any intellectual property rights
or any other rights of Renesas or any third party with respect to the information in this document.
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.
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.
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 )
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.
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.
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.
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.
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.
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.
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.
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.
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.
© 2008. Renesas Technology Corp., All rights reserved.
REJ06J0048-0100/Rev.1.00
2008.07
Page 23 of 23
Download PDF