To our customers, Old Company Name in Catalogs and Other Documents On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding. Renesas Electronics website: http://www.renesas.
Notice 1. 2. 3. 4. 5. 6. 7. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office.
User’s Manual H8S/2628 E6000 Emulator User’s Manual H8S/2628 E6000 HS2628EPI61HE-U2 Renesas Microcomputer Development Environment System H8S Family / H8S/2600 Series Rev.1.0 2003.
Cautions Keep safety first in your circuit designs! 1. Renesas Technology Corp. puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. Trouble with semiconductors may lead to personal injury, fire or property damage.
IMPORTANT INFORMATION READ FIRST • READ this user's manual before using this emulator product. • KEEP the user's manual handy for future reference. Do not attempt to use the emulator product until you fully understand its mechanism. Emulator Product: Throughout this document, the term "emulator product" shall be defined as the following products produced only by Renesas Technology Corp. excluding all subsidiary products.
LIMITED WARRANTY Renesas warrants its emulator products to be manufactured in accordance with published specifications and free from defects in material and/or workmanship. Renesas, at its option, will repair or replace any emulator products returned intact to the factory, transportation charges prepaid, which Renesas, upon inspection, determine to be defective in material and/or workmanship. The foregoing shall constitute the sole remedy for any breach of Renesas' warranty.
State Law: Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may have other rights which may vary from state to state.
SAFETY PAGE READ FIRST • READ this user's manual before using this emulator product. • KEEP the user's manual handy for future reference. Do not attempt to use the emulator product until you fully understand its mechanism. DEFINITION OF SIGNAL WORDS This is the safety alert symbol. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.
WARNING Observe the precautions listed below. Failure to do so will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in PERSONAL INJURY. The USER PROGRAM will be LOST. 1. Do not repair or remodel the emulator product by yourself for electric shock prevention and quality assurance. 2. Always switch OFF the E6000 emulator and user system before connecting or disconnecting any CABLES or PARTS. 3.
CAUTION This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications.
Introduction The E6000 emulator is an advanced realtime in-circuit emulator, which allows programs to be developed and debugged for the H8S family microcomputers. The E6000 emulator can either be used without a user system, for developing and debugging software, or connected via a user system interface cable to a user system, for debugging user hardware.
About This Manual This manual is comprised of two parts: HEW Part and Emulator Debugger Part. HEW Part: Information on the basic “look and feel” of the HEW and customizing the HEW environment, and detail of the HEW’s build function. Emulator Debugger Part: Preparation before use, E6000 emulator functions, debugging function, tutorial, and hardware and software specifications of the E6000 emulator.
Contents HEW Part 1. 1.1 1.2 1.3 1.4 1.5 1.6 2. 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 3. Overview......................................................................................... 1 Workspaces, Projects and Files........................................................................................1 The Main Window...........................................................................................................2 1.2.1 The Title Bar.............................
3.1 The Build Process Revisited ............................................................................................ 37 3.1.1 What is a Build?.................................................................................................. 37 3.2 Creating a Custom Build Phase ....................................................................................... 39 3.3 Ordering Build Phases ..................................................................................................... 43 3.
5. 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 6. 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7. 7.1 8. 8.2 8.3 8.4 8.5 9. 9.1 Tools Administration ...................................................................... 83 Tool Locations ................................................................................................................. 84 HEW Registration Files (*.HRF).....................................................................................84 Registering Components............................
9.2 9.3 9.1.1 Selecting Visual SourceSafe ............................................................................... 129 9.1.2 Adding files to Visual SourceSafe ...................................................................... 130 Visual SourceSafe Commands......................................................................................... 131 9.2.1 Removing a File from Version Control............................................................... 131 9.2.
3.2 Complex Event System (CES).........................................................................................152 3.2.1 Event Channels ...................................................................................................152 3.2.2 Range Channels ..................................................................................................152 3.2.3 Breaks .................................................................................................................153 3.2.
5.4.4 Using Register Contents ..................................................................................... 190 Operating Memory........................................................................................................... 191 5.5.1 Viewing a Memory Area .................................................................................... 191 5.5.2 Displaying Data in Different Formats................................................................. 192 5.5.
5.13 Elf/Dwarf2 Support..........................................................................................................219 5.13.1 C/C++ Operators.................................................................................................219 5.13.2 C/C++ Expressions .............................................................................................219 5.13.3 Supporting Duplicate Labels...............................................................................220 5.13.
5.19.2 Automatically Updating the Window Contents................................................... 285 5.19.3 Updating the Window Contents .......................................................................... 285 5.19.4 Zoom-In Display................................................................................................. 285 5.19.5 Zoom-Out Display .............................................................................................. 285 5.19.6 Resetting the Zoom Display............
7.1.1 Supported MCUs and User System Interface Cables ..........................................349 7.1.2 Operating Voltage and Frequency Specifications ...............................................349 7.2 User System Interface.........................................................................................................350 7.2.1 Signal Protection.................................................................................................350 7.2.2 User System Interface Circuits..............
H.1 H.2 xii System Set-Up for Test Program Execution .................................................................... 395 Diagnostic Test Procedure Using Test Program...............................................................
HEW Part
1. Overview This chapter describes the fundamental concepts of the High-performance Embedded Workshop. It is intended to give users who are new to Windows® extra help, filling in the details that are required by later chapters. 1.1 Workspaces, Projects and Files Just as a word processor allows you to create and modify documents, the High-performance Embedded Workshop allows you to create and modify workspaces.
1.2 The Main Window The HEW main window appears as shown in figure 1.2. Figure 1.2: HEW Main Window There are three main windows; the workspace window, the editor window and the output window. The workspace window shows the projects and files which are currently in the workspace, the editor window provides file viewing and editing facilities and the output window shows the results of a various processes (e.g. build, version control commands and so on). 1.2.
1.2.3 The Toolbars The toolbars provide a shortcut to the options, which you will use the most often. There are eight default toolbars: Bookmarks, Debug, Debug Run, Editor, Search, Standard, Templates, and Version Control (as shown in figure 1.3 to 1.10). Toolbars can be created, modified and removed via the [Tools->Customize…] menu option (see chapter 5, “Customizing the Environment”, for further information). Figure 1.3: Bookmarks Toolbar Figure 1.4: Debug Toolbar Figure 1.
Figure 1.8: Standard Toolbar Figure 1.9: Templates Toolbar Figure 1.10: Version Control Toolbar When the Standard toolbar or a toolbar is docked, it has a control bar as shown in figure 1.11 (i). If you want to move the docked Standard toolbar, click and drag its control bar to the new location. Figure 1.11 (i) shows the Standard toolbar when it is docked and figure 1.11 (ii) shows the Standard toolbar when it is floating. Figure 1.
1.2.4 The Workspace Window The “Workspace” window when the HEW is launched only has a single pane. This is the “Projects” tab. If a workspace is opened then the workspace window displays two default tabs. The “Projects” tab shows the current workspace, projects and files (figure 1.12). You can quickly open any project file or dependent file by double clicking on its corresponding icon. Figure 1.
Figure 1.14: Workspace Window, Docked and Floating When the “Workspace” window or the “Output” window is docked, it has a control bar as shown in figure 1.15. If you want to move a docked window, click and drag its control bar to the new location. Figure 1.15: Control Bar of Docking Window To dock the “Workspace” window or the “Output” window: [Allow Docking] must be checked on the pop-up menu of the window to dock the “Workspace” window or the “Output” window.
To float the “Workspace” window or the “Output” window: [Allow Docking] must be checked on the pop-up menu of the window to float the “Workspace” window or the “Output” window. (The pop-up menu will be displayed when you click the right mouse button anywhere inside the window.) Then you have two ways to float the window. 1. Double-click on the control bar of a docking window. or: 2.
The editor window can be customized via the “Format Views” dialog box, which can be invoked via the [Tools>Format Views…] menu option. This dialog allows you to configure fonts, colors, tabs and so on for the editor window. It also allows the user to change the look of other views, which have been installed by HEW.
1.3 The Help System The help menu is the rightmost menu on the HEW menu bar. It contains the menu option “Contents” which, when selected, takes you to the main HEW help window. To obtain help on specific dialogs click on the context sensitive help button, which is located in the top righthand corner of each dialog box (as shown in figure 1.19). Figure 1.19: Help Button When this is clicked, the mouse pointer will change to a pointer with a question mark above it.
1.4 Launching the HEW To run the HEW, open the “Start” menu of Windows®, select “Programs”, select “High-performance Embedded Workshop” and then select the shortcut of the “High-performance Embedded Workshop 2”. By default, the “Welcome!” dialog box shown in figure 1.20 will be displayed. Figure 1.20: Welcome! Dialog To create a new workspace, select “Create a new project workspace”, and click “OK”.
2. Build Basics This chapter explains the general functions of the HEW whilst the more advanced features can be found in chapter 3, “Advanced Build Features”. 2.1 The Build Process The typical build process is outlined in figure 2.1. This may not be the exact build process, which your installation of HEW will use as it depends upon the tools that were provided with your installation of HEW (e.g. you may not have a compiler for instance).
2.2 Project Files In order for the HEW to be able to build your application, you must first tell it, which files should be in the project, and how each file should be built (figure 2.2). Add Project Files Remove Project Files Project Debug: ON Optimize: OFF List File: YES Set Compiler Options Debug: OFF Optimize: OFF List File: YES Set Assembler Options Debug: ON Silent: YES Map File: YES Set Linker options C Source Files Assembler Source Files Library Files Figure 2.
2.2.1 Adding Files to a Project Before you can build your application you must first inform the High-performance Embedded Workshop, which files it, is composed of. To add files to a project: 1. Select [Project->Add Files...], select [Add Files…] from the “Workspace” window’s pop-up menu (see figure 2.3), or press INS when the “Workspace” window is selected. Figure 2.3: Project Pop-up Menu 2. The “Add” dialog will be displayed. 3. Select the file(s), that you want to add and then click “Add”.
There are a number of other ways to add new files to the project. These are described below: • Clicking right button on an open file in the editor window displays a pop-up menu option (figure 2.4). If the file is already in the project then the “Add File to Project” menu option is disabled. Selecting the “Add File to Project” then adds the file to the current project. Figure 2.
2.2.2 Removing Files from a Project Files can be individually removed from a project, selections of files can be removed or all files can be removed. To remove files from a project: 1. Select [Project->Remove Files...], or select [Remove Files…] from the “Projects” tab’s pop-up menu in the Workspace window (see figure 2.5). The “Remove Project Files” dialog will be displayed (figure 2.6). Figure 2.5: Projects Tab Pop-up Menu Figure 2.
2. Select the file or files which you want to remove from the “Project files” list. 3. Click the “Remove” button to remove the selected files or click “Remove All” to remove all project files. 4. Click “OK” to remove the files from the project. To remove selected files from a project: 1. Select the files, which you want to remove, in the “Projects” tab of the “Workspace” window. Multiple files can be selected by holding down the SHIFT or CTRL key. 2. Press the DEL key. The files will be removed.
2.2.3 Excluding a Project File from Build A file in a project can be individually excluded from build on a configuration by configuration basis. To exclude a file in a project from build: 1. Push the right mouse button on a file, which you want to be excluded from build, in the “Projects” tab of the “Workspace” window. 2. Select [Exclude Build file ], where is the selected file, from the pop-up menu (figure 2.5).
The “File Extensions” list shown in figure 2.7 is divided into two columns. On the left are the file extensions themselves, whilst on the right are the file groups. Many file extensions can belong to the same group. For example, assembler source files may have several extensions in a single project (e.g. .src, .asm, .mar etc) as shown in figure 2.8. .SRC .ASM .MAR Assembler source files .C .LIB C source files .LPF Library files Figure 2.
To create a new file extension in a new file group: 1. Select [Project->File Extensions...] from the menu bar. The “File Extensions” dialog will be displayed (figure 2.7). 2. Click the “Add…” button. The “Add File Extension” dialog will be displayed (figure 2.9). 3. Enter the extension, which you want to define into the “File extension” field. It is not necessary to type the period ( . ) character. The drop list contains all extensions that are undefined in the current project.
If you want to create a new extension because your project uses a different extension from those accepted by the HEW. For example, a phase might by default use the extension .asm but the HEW only recognizes .src. Then you need to create a new extension and add it to an existing file group. This process is described below. To create a new file extension in an existing file group: 1. Select [Project->File Extensions...] from the menu bar. The “File Extensions” dialog will be displayed (figure 2.7). 2.
Figure 2.11: File Groups and Applications To associate an application with a file group: 1. Select the file group to be associated from the “File Extensions” dialog (figure 2.11). 2. Click the “Open with…” button. The “Modify File Extension” dialog will be displayed (figure 2.12). Figure 2.12: Modify File Extension Dialog 3.
Figure 2.13: Add Application Dialog 5. Enter the name of the tool into the “Name” field. Enter the full path to the tool in the “Command” field (do not include any parameters). Enter the parameters that are required to open a file in the “Parameters” field. Be sure to use the $(FULLFILE) placeholder to specify the location file (see appendix C, “Placeholders”, for more information on placeholders and their uses).
2.4 Specifying How to Build a File Once you have added the necessary files to the project the next step is to instruct the HEW on how to build each file. To do this, you will need to select a menu option from the “Options” menu. The contents of this menu depend upon which tools you are using. For example, if you are using a compiler, assembler and linker then there will be three menu options, each one referring to one of the tools. To set options for a build phase: 1.
2.5 Build Configurations The HEW allows you to store all of your build options into a build configuration (figure 2.14). This means that you can “freeze” all of the options and give them a name. Later on, you can select that configuration and all of the options for all of the build phases will be restored. These build configurations also allow the user to specify debugger settings for a build configuration. This means that each configuration can be targeted at a different end platform.
2.5.1 Selecting a Configuration The current configuration can be set in two ways: Either: 1. Select it from the drop down list box (figure 2.15) in the toolbar. Figure 2.15: Toolbar Selection or: 1. Select [Options->Build Configurations…]. This will invoke the “Build Configurations” Dialog (figure 2.16). Figure 2.16: Build Configurations Dialog 2. Select the configuration that you want to use from the “Current configuration” drop down list. 3. Click “OK” to set the configuration.
2.5.2 Adding and Deleting Configurations You can add a new configuration by copying settings from another configuration or delete a configuration. These three tasks are described below. To add a new configuration: 1. Select [Options->Build Configurations…] to display the “Build Configurations” dialog (figure 2.16). 2. Click the “Add…” button. The “Add Configuration” dialog will be invoked (figure 2.17). Figure 2.17: Add Configuration Dialog 3.
2.6 Building a Project The outline of the build process is shown in figure 2.1. 2.6.1 Building a Project The build option only compiles or assembles those files that have changed since the last build. Additionally, it will rebuild source files if they depend upon a file that has changed since the last build. For instance, if the file “test.c” #include’s the file “header.h” and the latter has changed since the last build, the file “test.c” will be recompiled.
2.6.3 Stopping a Build The High-performance Embedded Workshop allows you to halt the build process. To stop a build: 1. Select [Build->Stop Build] or click the stop build toolbar button ( ). The build will be stop after the current file has been built. 2. Wait until the message “Build Finished” appears in the “Output” window before continuing. To forcibly terminate a current tool 1. Select [Build->Terminate Current Tool]. The HEW will attempt to stop the tool immediately.
2.6.6 Controlling the Content of the Output Window It is often useful to display low-level information (such as the command line options that are being applied to a file) during a build. The HEW allows you to specify whether or not you want such options displayed in the “Output” window during a build, build all or build file operation via the “Tools Options” dialog. To view or hide extra information during a build: 1. Select [Tools->Options...]. The “Options” dialog will be displayed. 2.
2.7 File Dependencies A typical project will contain dependencies between files, for example, one C file may “#include” one or more header files. In complex projects, source files will include (or depend upon) others and this can quickly become difficult to manage. However, the HEW provides a dependency scanning mechanism whereby all files in a project are checked for dependencies. Once complete, the project window will display an up-to-date list with all the project file dependencies.
2.8.2 Show Standard Library Includes By default, any dependent files found in standard include paths will not be shown (figure 2.21.i). For example, in C code, if you write an include statement such as “#include ” then stdio.h will not be listed as a dependent file. To view such system include files, select the “Show standard library includes” option (figure 2.21.ii). Figure 2.21: Standard Library Includes 2.8.
2.9 Setting the Current Project A workspace can contain more than one project but only one of the projects can be active at any time. This active project is the one which build actions and debug operations can be performed on. It is possible to change the builder or debugger options for the project. An active project is displayed in bold. To set a project as the current project: 1. Select the project from the “Projects” tab of the “Workspace” window. 2.
To insert an existing project into a workspace: 1. Select [Project->Insert Project…]. The “Insert Project” dialog will be displayed. 2. Set the “Existing Project” option. 3. Enter the full path of the project database file (.HWP file) into the edit field or click “Browse…” to search for it graphically. 4. Click “OK” to insert the existing project into the workspace.
2.12 Removing a Project from a Workspace To remove a project from a workspace: 1. Select the project from the “Projects” tab of the “Workspace” window and click the right mouse button to invoke a pop-up menu. 2. Select the [Remove Project] option. or: 1. Select the project from the “Projects” tab of the “Workspace” window. 2. Press the DEL key. Note: You cannot remove the current project from the workspace. 2.13 Loading/Unloading a Project to/from a Workspace To load a project to a workspace: 1.
2.14 Relative Projects Paths in the Workspace In the High-performance Embedded Workshop when you add a project to the workspace you can choose to add the project to the workspace using a relative path. This allows you to position a project above the workspace directory and it will still be relocated correctly if you relocate the HEW workspace.
36
3. Advanced Build Features This chapter explains the more advanced build concepts. 3.1 The Build Process Revisited Chapter 2, “Build Basics” began by describing the build process in terms of a compiler, an assembler and a linker (figure 2.1). This will be the case for most installations of the HEW. However, if you want to begin changing the build process (e.g. adding and removing phases) then it is important to understand more about the way in which a build functions. 3.1.
The High-performance Embedded Workshop provides the ability to change this build process via its “Build Phases” dialog, which can be, accessed via the [Options->Build Phases…] (figure 3.2). On the left-hand side are the phases that are defined in the current project (Figure 3.2 shows a standard set of build phases). The remainder of this chapter details the various functions that the “Build Phases” dialog provides. Figure 3.
3.2 Creating a Custom Build Phase If you want to execute another tool before, during or after a standard build process then this can be achieved by creating your own (i.e. custom) build phase. Select [Options->Build Phases…] to invoke the “Build Phases” dialog (figure 3.2) and then click the “Add…” button. This will invoke the new build phase wizard dialog (figure 3.3a). The first step (as shown in figure 3.
The second step (figure 3.3b) asks what type of phase you would like to create. There are two choices: multiple or single. When a multiple phase is executed, the command is applied to each file in the project of a certain file group. For example, if you set the input file group to be C source files then the command will be executed once for each C source file in the project. A single phase is executed once at most during a build. Figure 3.
Once this choice has been made the input file group selection is displayed as “Multiple Groups…” This dialog allows the user to choose multiple input file groups for the custom phase being added to the project. To select a file group check the box next to the file groups name. One or more file groups can be selected in this dialog. The third step (figure 3.3d) requests the fundamental information about the new build phase. Enter the name of the phase into the “Phase name” field.
The fourth and final step (figure 3.3e) allows you to specify any environment variables, which the phase requires. Figure 3.3e: New Build Phase Dialog (Step 4) To add a new environment variable click the “Add…” button (the dialog shown in figure 3.4 will be invoked). Enter the variable name into the “Variable” field and the variable’s value into the “Value” field and then click “OK” to add the new variable to the list of the fourth step.
3.3 Ordering Build Phases In a standard build (shown in figure 3.5), you could add a phase at four different positions: before the compiler, before the assembler, before the linker or after the linker. You may place your own custom phases or move system phases to any position in the build order. It is important to remember that if the output of your custom phase can be input into another phase then the phase order must be correct if the build is to behave as intended.
3.3.1 Build Phase Order The “Build Order” tab (figure 3.6) displays the current order in which phases will be executed when the build ( ) or build all ( ) operation is selected. The check box to the left of each phase indicates whether or not it is currently enabled. By clicking this box, the phase can be toggled on or off. Figure 3.6: Build Phases Dialog Build Order Tab In addition the following operations can be performed: To remove a phase: 1. Select the phase that you would like to remove. 2.
To modify a custom phase: 1. Select the custom phase that you would like to modify. 2. Click the “Modify…” button. The modify phase dialog will be invoked with the “Command” tab selected (figure 3.7). 3. Change the contents of the fields as appropriate. 4. Set the “Don’t check for input file(s) existence before executing” check box if you don’t want the HEW to abort the execution of the phase if any of the input files don’t exist. Figure 3.7: Modify Phase Dialog Command Tab 5.
3.3.2 Build File Phase Order If you were to select a C source file from the “Workspace” window and then activate [Build->Build File] (or press ) you would expect the file to be compiled. Likewise, if you were to select an assembly source file from the workspace window and then activate [Build->Build File] you would expect the file to be assembled. The connection between file group and which phase(s) to execute is managed by the “Build File Order” tab of the “Build Phases” dialog (figure 3.9). Figure 3.
3.4 Setting Custom Build Phase Options Once you have defined a custom phase, you will want to specify the command line options that should be used when it is executed. Each defined phase has a menu option on the [Options] menu. To specify options for that phase select it. The dialog that will be invoked depends upon whether the custom phase selected was a multiple or single phase (according to the selection of phase type in figure 3.3b). Figure 3.10: Custom Options Dialog The dialog in figure 3.
3.4.1 Options Tab The “Options” tab (figure 3.11) allows you to define the command line options that will be passed to the phase. The “Command” field displays the command, which was entered when you defined the phase (figure 3.3d). Enter into the “Options” field the command line arguments that you would like to pass to the command. If you want to insert a placeholder, select the relevant placeholder from the “Placeholder” drop-down list box and then click the “Insert” button.
3.4.2 Output Files Tab The “Output Files” tab (figure 3.12) is where you can specify the output file or files that will be produced by the phase. Before each file is passed into this phase, the HEW checks that the output files are of a less recent date than the input file. If so, the phase will be executed for that file (i.e. input files have been modified since the output file or files were last produced). If the files are up to date then the phase will not be executed.
To modify an output file: 1. Select the output file that you would like to modify. 2. Click “Modify…”. The “Modify Output File” dialog, which is the same as figure 3.13 except the title, will be invoked. 3. Modify the fields as required and then click the “OK” button to add the modified entry back to the list. To remove an output file: 1. Select the output file that you would like to remove. 2. Click the “Remove” button. 3.4.3 Dependent Files Tab The “Dependent Files” tab (figure 3.
To add a dependent file: 1. Click “Add…”. The “Add Dependent File” dialog will be invoked (figure 3.15). 2. Enter the file path or browse to it using the “Browse…” button. 3. Click “OK” to add this output file to the list. Figure 3.15: Add Dependent File Dialog To modify a dependent file: 1. Select the dependent file that you would like to modify. 2. Click “Modify…”. The “Modify Dependent File” dialog, which is the same as figure 3.15 except the title, will be invoked. 3.
3.5 File Mappings By default, the files input to a phase are only taken from the project, i.e. all project files of the type specified in the “Select input file group” drop-down list on the “New Build Phase” dialog (figure 3.3b). If you would like a phase to take files output from a previous phase (i.e. intermediate files) then you must define this in the “File Mappings” tab of the “Build Phases” dialog (figure 3.16). Figure 3.
A file mapping states that you would like the HEW to pass output files of a certain type produced by one phase (referred to as the source phase) to another phase (referred to as the destination phase). Such intermediate files are passed in addition to the project files. To add a file mapping: 1. Click “Add…”. The “Define File Mapping” dialog will be invoked (figure 3.17). 2. Select the file group, which you want to pass between the phases from the “File group” drop-down list box. 3.
3.6 Controlling the Build By default, the High-performance Embedded Workshop will execute all of the phases in a build and only stop if a fatal error is encountered. You can change this behavior by setting the controls on the “Build” tab of the “Options” dialog (figure 3.18). Figure 3.18: Options Dialog Build Tab Select [Tools->Options…] to invoke the dialog. If you want to stop the build when a certain number of errors are exceeded then set the “Stop build if the no.
3.7 Logging Build Output If you would like to write the results of each build to file then invoke the “Customize” dialog by selecting [Tools->Customize…] and select the “Log” tab (figure 3.19). Set the “Generate log file” check box and then enter the full path of the log file into the “Path” field or browse to it graphically by clicking the “Browse…” button. Figure 3.
3.8 Changing Toolchain Version If two or more versions of the same toolchain are registered in the HEW, you can choose a version of the toolchain on the “Change Toolchain Version” dialog shown in Figure . To invoke the dialog, select [Tools>Change Toolchain Version…]. Choose one of the versions from the “Available versions” drop-down list and click the “OK” button to enforce your choice. Figure 3.
3.9 Using an External Debugger The High-performance Embedded Workshop can launch an external debugger tool. If you want to use another debugger then you must add it to the Tools menu (as described in chapter 6, “Customizing the Environment”. The “Debugger” tab of the “Customize” dialog (figure 3.22) is where the HDI-related information is configured. You may wish to use an older version of the debugger if certain targets are not currently supported in the new environment.
3.10 Generating a Makefile The HEW allows you to generate a makefile, which can be used to build parts of your workspace without HEW. This is particularly useful of you want to send a project to a user who does not have the HEW or if you want to version control an entire build, including the make components. To generate a makefile: 1. Ensure that the project, which you want to generate a makefile for, is the current project. 2.
4. Using the Editor This chapter describes how to use the editor that is provided with the High-performance Embedded Workshop. 4.1 The Editor Window The editor window (figure 4.1) contains the file windows that are being viewed or edited. Only one window is active at anytime. This window is called the active window (or current window) and its title bar will appear a different color from that of the others (“dbsct.c” is the active window in figure 4.1).
4.2 Working with Multiple Files The file area is where you will work with the files of your project. The editor allows you to have many files open at one time, to switch between them, to arrange them in different configurations and to edit them in whichever order you want to.
4.2.2 Editor Toolbar Buttons New File The new file button creates a new source file window with a default name. When you save the file, you can specify your own filename. Open File Click this button if you want to open a file. It invokes a standard file chooser - select the file which you want to open and then click “Open”. Save File Saves the active source file. Save All Files Saves all of the files in the editor. Print File To print the contents of the current window, click this button.
Insert Template To insert a pre-defined template at the current cursor position, click this toolbar button. The “Insert Template” dialog box will be invoked. Select a template name and then click OK. For further information on templates, refer to the “Templates” section later in this chapter. Toggle Bookmark The High-performance Embedded Workshop editor provides standard bookmark capabilities.
4.2.5 Templates Toolbar Buttons Define Template Specify template text for subsequent insertion. Insert Template Insert the template selected in the drop-down list at the current cursor position. 4.3 Standard File Operations 4.3.1 Creating a New File To create a new editing window: Select [File->New] or click the new file toolbar button ( ) or press CTRL+N. The window will be given an arbitrary name by default. You can provide a new name when you save the file. 4.3.
4.3.4 Opening a File To open a file: 1. Select [File->Open...] or click the open file toolbar button ( ) or press CTRL+O. 2. An open file dialog box will be displayed. Use the directory browser (on the right) to navigate to the directory in which the file you want to open is located. Use the “Files of type” combo box to select the type of file you want to open (or set it to “All Files (*.*)” to see every file in a directory). 3. Once you have located the file select it and click “Open”.
4.4 Editing a File The High-performance Embedded Workshop editor supports standard editing functionality. This is available through the usual methods (i.e. the menu, toolbar and keyboard shortcuts) and is additionally supported via a pop-up menu (or local menu) that is local to each editor window. To invoke it, place the pointer in an open window and click the right mouse button. Table 4.1 outlines the basic operations that are provided by the editor. Table 4.
4.5 Searching and Navigating through Files The High-performance Embedded Workshop editor provides find, replace and file navigation functionality. The following three sections detail how to use these features. 4.5.1 Finding Text To search for text in the current file: 1. Ensure that the window, whose contents you want to search, is the active window. 2. Position the insertion cursor at the point from which you want to start your search. 3. Select [Edit->Find...], press CTRL+F, select [Find...
4.5.2 Finding Text in Multiple Files To search for text in many files: 1. Select [Edit->Find in Files...], select [Find in Files...] from the editor window’s local menu or click the find in files toolbar button ( ). The “Find in Files” dialog box will be displayed (figure 4.3). Figure 4.3: Find in Files Dialog 2. Enter the text that you want to search for into the “Find” field, or select a previous search string from the drop-down list box.
4.5.3 Replacing Text Replacing text is similar to finding text, as discussed in the previous section. The difference is that when the text is found you have the option to replace it with other text. To replace text in a file: 1. Ensure that the window, whose contents you want to replace, is the active window. 2. Position the insertion cursor at the point from which you want to start your search. 3. Select [Edit->Replace...], press CTRL+H or select [Replace...] from the editor window’s local menu.
4.5.4 Jumping to a Specified Line To jump to a line in a file: 1. Ensure that the window, whose contents you want to replace, is the active window. 2. Select [Edit->Goto Line...], press CTRL+G. or select [Goto Line...] from the editor window’s local menu. A goto line dialog box will be displayed (figure 4.5). 3. Enter into the dialog box the number of the line that you want to go to, and then click “OK”. 4. The insertion cursor will be placed at the start of the line number specified. Figure 4.
4.6 Bookmarks When working with many large files at a time, it can become difficult to locate specific lines or areas of interest. Bookmarks enable you to specify lines that you want to jump back to at a subsequent time. One example of its use is in a large C file where you may want to set a bookmark on each function definition. Once a bookmark has been set, it exists until it is removed or the file is closed. To set a bookmark: 1. Place the insertion cursor on the line to mark. 2.
4.8 Configuring Text Layout The following sections detail how to set-up the layout of the text within the editor windows. 4.8.1 Page Set-up When you print a file from the High-performance Embedded Workshop editor, the settings in the print dialog box affect the way in which the file is printed (e.g. double or single sided). Control over how the text is formatted on the page can also be controlled via the page set-up option.
4.8.2 Changing Tabs To change tab size: 1. Select [Tools->Options...]. The “Options” dialog will be displayed. Select the “Editor” tab (figure 4.7)). 2. Enter into the “Tab size” field the number of desired tabs. 3. Click “OK” for the tab setting specified to take effect. Figure 4.7: Options Dialog Editor Tab When a TAB key is pressed in the editor a tab character is usually stored in the file. However, sometimes it is preferable to store spaces instead.
4.8.3 Auto Indentation When you press return in a standard editor the insertion cursor will move to the next line down, at the first column (i.e. against the left hand side of a window). Auto Indentation is a feature which, when return is pressed, places the insertion cursor on the next line (as before) but under the first non-white space character of the previous line. This enables you to type neat C/C++ or assembler code faster as you don’t have to type leading spaces or tabs yourself. Figure 4.
4.9 Splitting a Window The High-performance Embedded Workshop editor allows you to split a text window into two. Figure 4.9 shows the split bar button which is located just underneath the maximize button at the top right hand corner of any text window. Figure 4.
4.10 Configuring Text The following sections detail how to change the appearance of the text displayed in the editor windows. 4.10.1 Changing the Editor Font The High-performance Embedded Workshop allows you to specify the font to be used in its internal editor. All editor windows, regardless of the file type, use the same font. To change the editor font: 1. Select [Tools->Format Views...]. The “Format Views” dialog will be displayed. Select the Source icon in the tree (figure 4.10). 2.
4.11 Syntax Coloring To enhance code readability, the HEW editor can display specific strings (i.e. keywords) in different colors. For instance, C source code comments could be shown in green and C types (e.g. int) could be shown in blue. The coloring method used can be specified on a file group by file group basis. For example, you can define different color schemes for a C source files, text files, map files or even your own files. To change existing colors: 1. Select [Tools->Format Views...].
Figure 4.12: Format Views Dialog Keywords Tab 4. Click the “Add…” button to add a keyword. Then the “Add Keyword” dialog (figure 4.13) will be launched. Specify a keyword in the “Keyword” field and click “OK” to close the dialog. To remove a keyword, select the keyword and click the “Remove” button. Figure 4.
4.12 Templates When developing software it is often necessary to enter the same text repeatedly, for instance, when typing a function definition, for loop or a comment block for a function. The HEW editor allows you to specify a block of text (or template) which can be inserted into the currently active editor window. Thus, once a template has been defined, it can be automatically inserted without the need to re-enter it manually. 4.12.1 Defining a Template To define a template: 1.
Figure 4.14: Define Template Dialog 4.12.2 Deleting a Template To delete a template: 1. Select [Edit->Templates->Define Templates...], select [Templates->Define Templates...] from the local menu, press CTRL+T or click on the define template bookmark toolbar button ( ). The dialog shown in figure 4.14 will be displayed. 2. Use the Template name drop down list to select the name of the template you wish to remove and then click the “Remove” button. 3.
4.13 Editor Column Management The editor in HEW has the ability to manage columns apart from the main editor column. These can be added and used by debugger feature. You can choose the column to display/undisplay. Figure 4.15: Editor Columns To switch off a column in all source files: 1. Right click on the editor window. 2. Click the “Define Column Format…” menu item. 3. The “Global Editor Column States” dialog is displayed. 4. The “Check status” shows whether the column is enabled or not.
Figure 4.
82
5. Tools Administration You control the components, which can be used by the High-performance Embedded Workshop via the “Tools Administration” dialog (figure 5.1), which is invoked via [Tools->Administration…]. Modification of the “Tools Administration” dialog box is only possible when no workspace is open, while only reference is possible when a workspace is open. Figure 5.1: Tools Administration Dialog (Example) There are five standard types of component: • Toolchain - a set of build phases (e.g.
5.1 Tool Locations The HEW maintains the locations of HEW compatible components automatically as each new tool is installed. After installation, the HEW stores information about the component (including its location) – this is referred to as registration. Although initial registration is automatic, during the course of development or if you want to manage the tools being used in your projects more effectively, you may need to register components yourself.
5.3 Registering Components The HEW will automatically attempt to register any new components installed since the last time it was invoked. However, in some circumstances you may need to register components yourself. 5.3.1 Searching Drives for Components In some cases it is useful to search a drive for HEW compatible components. This is especially useful if the HEW installation was deleted or corrupted as it can recreate your tool information instantly. To search for components: 1.
5.3.2 Registering a Single Component The HEW allows you to navigate directly to a single component in order to register it. The HEW Registration File (*.HRF) is located in the root directory of a component’s installation. To register a component: 1. Click the “Register…” button on the “Tools Administration” dialog. A standard file open dialog will be launched with its file filter set to “HEW Registration Files (*.hrf)”. 2. Navigate to the .
5.5 Viewing and Editing Component Properties To view information regarding a component, select it from the “Registered components” list and then click the “Properties” button. The properties dialog will be displayed with the “General” tab selected (figure 5.4). This tab displays the name, version and location of the selected component. None of the information on this tab is editable. Figure 5.
Select the “Environment” tab, if it exists, to view and edit a component’s environment settings (figure 5.6). This dialog is most commonly used to modify the environment of a toolchain. Figure 5.6: Properties Dialog Environment Tab To add a new environment variable, click the “Add…” button (the dialog shown in figure 5.7 will be invoked). Enter the variable name into the “Variable” field, the variable’s value into the “Value” field and then click “OK” to add the new variable to the “Environment” tab.
5.6 Uninstalling Components The HEW provides a built in uninstaller method, which can remove unregistered components. To uninstall a component: 1. Select [Tools->Administration…]. 2. Click on the uninstaller button. The “Uninstall HEW Tool” dialog is invoked (figure 5.8). Figure 5.8: Uninstall HEW Tool 3. Enter the directory in which you would like to search into the top field or browse to it graphically by clicking the “Browse…” button. 4.
Figure 5.9: Unable to Uninstall Tool If a tool is not registered with the HEW then the dialog shown in figure 5.10 will be displayed when the “Unregister” button is clicked. This confirmation dialog displays all of the files and folders that will be deleted. If you are certain that these files and folders can be deleted then click the “Yes” button. To abort the uninstall click the “No” or “Cancel” buttons. Figure 5.
5.7 Technical Support Issues The “Tools Administration” dialog is also capable of displaying information regarding “hidden” system components. These are part of the HEW itself that cannot be unregistered/registered manually. If you check the “Show all components” check box on the tools administration dialog, extra component folders are displayed (see figure 5.11). Figure 5.11: All Components Shown When seeking technical support, you may be asked to give details about some or all of these components.
5.8 Custom Project Types The [Project->Create Project Type…] menu item in HEW allows you to create a template for your project. This menu item takes the settings of the current project and then creates a project type for you. The user can specify the name of the new type and style of the project generation wizard. Once created these project types appear in the “Tools Administration” dialog and are initially hidden in the system components part of the tools administration tree.
6. 6.1 Customizing the Environment Customizing the Toolbar The High-performance Embedded Workshop provides 2 standard toolbars as detailed in chapter 1, “Overview”. In addition to these, you may also construct your own toolbars via the “Customize” dialog (figure 6.1). Figure 6.1: Customize Dialog Toolbars Tab To create a new toolbar: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed. 2. Click the “New...” button. The dialog shown in figure 6.2 will be displayed. 3.
When a new toolbar is created it will appear undocked (i.e. “floating”) and empty. To add buttons to a toolbar: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed. Select the “Commands” tab (see figure 6.3). 2. Browse the available buttons by selecting the button categories from the “Categories” list. Select a button from the “Buttons” area to display information on its operation. 3. Click and drag a button from the dialog onto the toolbar. Figure 6.
To remove buttons from a toolbar: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed. Select the “Commands” tab (see figure 6.3). 2. Click and drag a button from the toolbar onto the “Buttons” area. To remove a user defined toolbar: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed. 2. Select the user-defined toolbar from the “Toolbars” list, and the “Reset” button in figure 6.1 changes to the “Delete” button. Then click the “Delete” button.
6.2 Customizing the Tools Menu The “Tools” menu can be customized to include your own menu options. To add a new menu option: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed. Select the “Menu” tab (see figure 6.4). The first thing for you to decide is whether you are adding a global application wide tool (“Application wide tools:”), which will be available to all of your workspaces.
Figure 6.5: Add Tool Dialog New menu options are added to the bottom of the list (i.e. bottom of the tools menu) by default. The order of menu options in the “Tools” menu can also be modified. To modify a menu option: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed. Select the “Menu” tab (see figure 6.4). 2. Select the menu option that you would like to modify and then click the “Modify…” button. 3. Make the desired changes on the “Modify Tool” dialog (figure 6.
6.3 Configuring the Help System The High-performance Embedded Workshop provides context sensitive help within the editor window. In other words, if you select some text in the editor window and then press F1, the High-performance Embedded Workshop will attempt to locate help on that selected item. The help files, which will be searched, are listed in the “Help” tab of the “Customize” dialog. To add a new help file: 1. Select [Tools->Customize…]. The dialog shown in figure 6.1 will be displayed.
To make a help file the default choice, select it from the “Default help file” drop-down list or set it to “(None)” if you would like to be prompted for a help file when F1 is pressed. 6.4 Specifying Workspace Options The High-performance Embedded Workshop allows you to control several aspects of a workspace via the “Options” dialog (figure 6.9). To invoke it select [Tools->Options…], and select the “Workspace” tab. Figure 6.
6.4.3 Display workspace information dialog on opening workspace When many workspaces are being used, it is sometimes difficult to remember exactly what was contained within each workspace. To help resolve this, the High-performance Embedded Workshop allows you to enter a textual description of each workspace. To enter a workspace description: 1. Select the workspace icon from the “Projects” tab of the ”Workspace” window. 2.
6.4.6 Default directory for new workspaces When a new workspace is created the High-performance Embedded Workshop invokes the “New Workspace” dialog. One of the fields on this dialog is the directory in which the new workspace will be created. By default, this is the root directory. However, if you would like to set this default directory to another location (e.g. “C:\Workspaces”) then enter the desired directory into the field or browse to it graphically via the “Browse…” button. 6.4.
6.5 Using an External Editor The High-performance Embedded Workshop allows you to use an external editor. Once an external editor has been specified, it will be launched when the following actions are performed: • • • • • • Double clicking on a file in the “Projects” tab of the “Workspace” window. Double clicking on an entry in the “Navigation” tab of the “Workspace” window. Double clicking on an error/warning in the “Build” tab of the “Output” window.
2. Check the “Use external editor” check box. The “External Editor” dialog will be displayed (figure 6.12). Figure 6.12: External Editor Dialog 3. Enter the path of the executable (without any arguments) into the “Command” field. 4. Enter the arguments required to open a file into the “Arguments to open file” field. Use the $(FULLFILE) placeholder to represent the path of the file to be opened. 5.
6.7 Using an External Debugger The High-performance Embedded Workshop can launch an external debugger tool. If you want to use another debugger then you must add it to the “Tools” menu. The “Debugger” tab of the “Customize” dialog (figure 6.13) is where the HDI-related information is configured. You may wish to use an older version of the debugger if certain targets are not currently supported in the new environment. Invoke it by selecting [Tools->Customize…] and then selecting the “Debugger” tab.
6.8 Using Custom Placeholders Throughout the High-performance Embedded Workshop the user can use a number of pre-defined placeholders for directory definitions. For example the user can use the “$(PROJDIR)” variable to signify the current HEW project directory. This makes it much easier to relocate projects and keep all of the paths correct. The High-performance Embedded Workshop also has the ability to define custom placeholders.
Figure 6.14: New Custom Placeholder Dialog 6.9 Using Confirmation Dialog Boxes The HEW allows users to specify many items for confirmation even in a single operation. These items are usually set by default. However, it may be annoying to handle the confirmation dialog boxes if you take the same operation several times. Use the [Confirmation] page of the [Options] dialog box to control those confirmation dialog boxes. To view the content of [Display confirmation dialogs for]: 1. Select [Tools->Options…].
7. Version Control The High-performance Embedded Workshop provides facilities for connecting to a version control tool. Some of the reasons why version control tools are used with a project are: • To maintain the integrity of a project. • To store each stage of a project. • To enable different users to co-develop a project by controlling revisions to its source files. Figure 7.1 illustrates a typical project where a version control system is in use.
7.1 Selecting a Version Control System Initially, the version control sub-menu will appear as shown in figure 7.2. At this time only the [Version Control->Select…] option is available because a version control system is not yet active for the current workspace. Figure 7.2: Version Control Sub-Menu To select a version control system: 1. Select [Version Control->Select…]. The dialog shown in figure 7.3 will be displayed. This dialog lists all of the supported version control systems. 2.
Note: Only those version control systems which have been installed with the HEW will appear in the “Select Version Control System” dialog (figure 7.3). Once a version control tool is selected you will notice that the [Version Control->Configure…] option has now become available. The next chapter discusses the usage of the custom version control system.
110
8. Using the Custom Version Control System The custom version control system is a configurable addition to the High-performance Embedded Workshop, which allows you to connect to a version control system already installed on your machine. To clarify further, the High-performance Embedded Workshop does not provide a version control tool itself, only a means by which you can integrate the version control system, which you use into your workspaces and projects. 8.
Figure 8.
The “Commands” tab contains two lists of menu options. The first list, “System menu options and toolbar buttons”, represents those menu options which always appear on the version control sub-menu. These menu options also have an associated toolbar button on the version control toolbar. The second list, “User menu options”, represents those additional user defined options which are added to the bottom of the version control sub-menu. Figure 8.2 shows the structure of the version control sub-menu. Figure 8.
Figure 8.
8.1.2 User menu options You can create as many user defined menu options as you like, name them how you want and define their order in the menu. User defined menu options do not appear on the version control toolbar. To create a new version control menu option: 1. Select [Version Control->Configure…]. The dialog shown in figure 8.1 will be displayed. 2. Click the “Add..” button. The dialog shown in figure 8.4 will be displayed. 3. Enter the name of the menu option into the “Option” field. 4.
To remove an existing version control menu option: 1. Select [Version Control->Configure…]. The dialog shown in figure 8.1 will be displayed. 2. Select the menu option to be removed from the “User menu options” list and then click the “Remove” button. 3. Close the “Version Control Setup” dialog by clicking “OK”. To modify an existing version control menu option: 1. Select [Version Control->Configure…]. The dialog shown in figure 8.1 will be displayed. 2.
8.2 Defining Version Control Commands Commands are defined when the “Add…” or “Modify…” buttons are clicked on the dialogs shown in figure 8.3 and figure 8.4. In either case, the dialog shown in figure 8.5 is invoked. Figure 8.5: Add/Modify Command Dialog To define a command: 1. Enter the full path of the command into the “Version control executable” field or browse to it graphically by clicking the “Browse…” button. 2. Enter the arguments for the command into the “Arguments” field. 3.
8.3 Specifying Arguments It is obvious that arguments must be specified correctly, otherwise the version control tool executed will not function as intended. However, it is also important, when using custom version control support, to specify the arguments in a flexible way as a single version control command can be applied to more than one file.
Table 8.
Figure 8.7: Version Control Setup Dialog Projects Tab To define a new mapping: 1. Select [Version Control->Configure…]. The dialog shown in figure 8.1 will be displayed. Select the “Projects” tab, and the dialog shown in figure 8.7 will be displayed. 2. Click the “Add…” button that is next to the “Version control directory mappings” list. The dialog shown in figure 8.8 will be displayed. 3. Enter the source (i.e.
To modify an existing mapping: 1. Select [Version Control->Configure…]. The dialog shown in figure 8.1 will be displayed. Select the “Projects” tab, the dialog shown in figure 8.7 will be displayed. 2. Select the mapping to be modified from the “Version control directory mappings” list and then click the “Modify…” button. The dialog shown in figure 8.8 will be displayed. 3. Make the necessary changes to the two directories and then click “OK” to confirm the edits. To remove an existing mapping: 1.
Project File: C:\work\application\project1 \ file1.c Arguments: $(VCDIR) \ $(FILENAME) (1) (2) X:\vc\sw\app\project1 \ file1.c Command: Figure 8.10: Example of Substitution 8.3.2 Specifying Environment Select the “Projects” tab of the “Version Control Setup” dialog to view the current settings (figure 8.7). To add a new environment variable click the “Add…” button beside the “Environment” list (the dialog shown in Figure will be invoked).
8.3.3 Specifying Comments If a command contains the placeholder “$(COMMENT)” then the HEW will request that you enter the comment when the command is executed (via the dialog as shown in figure 8.12). Figure 8.12: Please Enter Comment Dialog You may specify a comment for each file or, if you would like to specify the same comment for all files, check the “Apply comment to all files” check box before clicking “OK”.
8.3.4 Specifying a User Name and Password Most version control tools will require you to pass a user name and password on the command line in order to keep files secure and to keep a record of which files were changed by which users. The custom version control support provides two placeholders “User login name”, $(USERNAME), and “User login password”, $(PASSWORD).
In order to give the $(USERNAME) and $(PASSWORD) fields a value you will first need to login. If you have not logged in before a command is executed which uses either of these placeholders then you will be prompted to do so before the command can be executed. To login (i.e. specify a user name and password): 1. Click the “Log in…” button. The dialog shown in figure 8.14 will be displayed. 2. Enter your user name into the “User name” field. 3. Enter your password into the “Password” field. 4.
8.4 Controlling Execution The “General” tab of the “Version Control Setup” dialog (figure 8.13) allows you to control the way in which the version control tool is executed. It also shows the full path to the current version control configuration file. 8.4.1 Prompt before executing command If this check box is set then, before any version control commands are executed, a dialog is displayed (figure 8.15) which lists all of the files involved in the operation.
To import a version control set-up: 1. Select [Version Control->Configure…]. The dialog shown in figure 8.1 will be displayed. 2. Click the “Import…” button. A standard file open dialog will be displayed. Browse to the *.HVC file which you would like to import. 3. Select the file and then click “OK”.
128
9. Using Visual SourceSafe The High-performance Embedded Workshop provides specific support for the Visual SourceSafe version control system. At the time of writing, the HEW can only attach to versions 5 and 6 of Visual SourceSafe. The Visual SourceSafe version control system associates a project in your workspace with a project inside a Visual SourceSafe database.
Figure 9.2: Create SourceSafe Project The HEW has now created the necessary projects within Visual SourceSafe and sets-up the version control toolbar and menu for immediate access. However, although the Visual SourceSafe projects themselves have been created, no files have been added to them. 9.1.2 Adding files to Visual SourceSafe The previous section has only established the mappings between the project directory on your hard disk (i.e.
9.2 Visual SourceSafe Commands The following 8 operations are available: • • • • • • • • Add a file to version control Remove a file from version control Get a read only copy of a file or files Check out a read/write copy of a file or files (i.e. for editing) Check in a previously checked out file or files (i.e. update Visual SourceSafe with the edits made) Undo a previously check out operation on a file or files (i.e.
9.2.4 Checking In a Writable Copy of a File into Version Control Visual SourceSafe protects your source files and ensures that only one user can have a writable copy of a controlled file at any one time. The check out operation takes a writable copy of the file from Visual SourceSafe and places it on your local drive. Once a file is checked out it is edited and then checked back in so that the edits can be made available to other users. To check in edits made to a file or files in Visual SourceSafe: 1.
9.3 Visual SourceSafe Integration Options You can control the way in which the history and status commands are displayed by selecting [Tools->Version Control->Configure…]. To display the results of a history command in a dialog box then check the “Display dialog box for history” check box or clear it if you would rather display the output in the “Version Control” tab of the “Output” window.
134
Emulator Debugger Part
Section 1 Overview 1.1 Features • The breakpoint, memory map, performance, and trace can be set through the dialog box. Intuitive user interface Online help Common display and operability • Supported host interfaces The PCI interface, PC card (PCMCIA) interface, USB interface, or LAN interface can be used for connecting to the host computer. • Realtime emulation Realtime emulation of the user system is enabled at the maximum operating frequency of the CPU.
1.2 Warnings CAUTION READ the following warnings before using the emulator product. Incorrect operation will damage the user system and the emulator product. The USER PROGRAM will be LOST. 1. Check all components against the component list after unpacking the emulator. 2. Never place heavy objects on the casing. 3. Do not place the emulator in places where: • The temperature becomes high such as in direct sunlight or near a heater. For details, refer to section 1.3, Environmental Conditions.
1.3 Environmental Conditions CAUTION Observe the conditions listed in table 1.1 when using the emulator. Failure to do so will cause illegal operation in the user system, the emulator product, and the user program. Table 1.1 Environmental Conditions Item Specifications Temperature Operating: +10°C to +35°C Storage: –10°C to +50°C Humidity Operating: 35% RH to 80% RH, no condensation Storage: 35% RH to 80% RH, no condensation Vibration Operating: 2.45 m/s2 max. 2 Storage: 4.9 m/s max.
138
Section 2 Preparation before Use 2.1 Emulator Preparation Unpack the emulator and prepare it for use as follows: WARNING READ the reference sections shaded in figure 2.1 before using the emulator product. Incorrect operation will damage the user system and the emulator product. The USER PROGRAM will be LOST.
2.3 Connecting to the User System To connect the emulator to a user system, proceed as follows: • Connect the user system interface cable head to the user system. • Plug the cable body into the emulator. • Plug the cable body into the cable head. For details of these steps, refer to the User System Interface Cable User’s Manual. Figure 2.2 gives details of the connectors provided on the emulator.
• Screw the cable head to the socket with the screws provided. Progressively tighten the screws in the sequence shown in figure 2.4 until all are ‘finger tight’. 1 3 4 2 Figure 2.4 Sequence of Screw Tightening Note: Be careful not to over-tighten the screws as this may result in contact failure on the user system or damage the cable head. Where provided, use the ‘solder lugs’ on the QFP socket to provide extra strength to the emulator/user system connection. 2.3.
2.4 Power Supply 2.4.1 AC Adapter The AC adapter supplied with the emulator must be used at all times. 2.4.2 Polarity Figure 2.6 shows the polarity of the power-supply plug. 5 V (outside) GND (inside) Figure 2.6 Polarity of Power Supply Plug 2.4.3 Power Supply Monitor Circuit The emulator incorporates a power supply monitor circuit which only lights the red LED when a voltage higher than 4.75 V is supplied. If this LED is not illuminated, you should check the emulator voltage level.
2.6 Hardware Interface All signals are directly connected to the MCU in the emulator with no buffering with the exception of those listed in section 7, Hardware Specifications Specific to This Product. 2.6.1 Signal Protection on the emulator All signals are over/under voltage protected by use of diode arrays. The only exceptions being the AVCC and Vref. All ports have pull-up resistors except for analog port.
The interface circuit for the external probe 1 is shown in figure 2.8. Vcc 10 kΩ External probe 1, 2, 3, 4 HD151015 22 Ω Figure 2.8 Interface Circuit for External Probe 1 The trigger output is controlled by event channel 8 and is an active low signal. The trigger output is available as either T5V (within the range from 2.5 V to 5 V; does not depend on the user VCC level) or TUVCC (the user VCC level). 2.6.
2.6.6 Voltage Follower Circuit CAUTION 1. Do not connect the user system interface cable to the emulator without user system connection. 2. Turn on the user system before starting up the emulator. A voltage follower circuit is implemented on the emulator which allows the user system voltage level from the user system to be monitored. This monitored voltage level is automatically supplied to the logic on the emulator and is derived from the emulator power supply unit.
2.7 System Check When the software is executed, use the procedure below to check that the emulator is connected correctly. Here, use the workspace for a tutorial provided on the product. Refer to section 2.9, Other Methods for Activating the Emulator, for the other activating method to create a new project or use a workspace for the HEW of the old version. 1. 2. 3. 4. Connect the emulator to the host computer. Connect the user system interface cable to the connector of the emulator. Turn on the emulator.
5. The [Welcome!] dialog box is displayed. Figure 2.12 [Welcome!] Dialog Box To use a workspace for the tutorial, select the [Browse to another project workspace] radio button and click the [OK] button. When the [Open Workspace] dialog box is opened, specify the following directory: HEW installation destination directory\Tools\Renesas\DebugComp\Platform\E6000\xxxx\Tutorial After the directory has been specified, select the following file and click the [Open] button. Figure 2.
When no compiler package or that of a different version is installed, the following message box will be displayed. Figure 2.14 Message Box 6. The [E6000 Driver Details] dialog box is displayed. This dialog box is only displayed at the first initiation. When only one of interface drivers is selected, this dialog box is not displayed. Figure 2.15 [E6000 Driver Details] Dialog Box • In the [Driver] combo box, select the driver to connect the emulator.
7. Set up the emulator. During this process, the following dialog box is displayed. Figure 2.16 [Connecting] Dialog Box 8. When "Connected" is displayed in the [Output] window of the HEW, the emulator initiation is completed. Figure 2.
2.8 Communication Problems The following message box will be displayed when the emulator power is turned off or the PC interface cable is not correctly connected. Figure 2.18 Error Message For information on other errors, refer to the Setup Guide for the E6000 Emulator. 2.9 Other Methods for Activating the Emulator Refer to section 4, Preparation before Use. 2.10 Uninstalling the Emulator’s Software For details on uninstallation, refer to the Setup Guide for the E6000 Emulator.
Section 3 E6000 Emulator Functions 3.1 Debugging Features 3.1.1 Breakpoints The emulator provides a comprehensive range of alternative types of breakpoints, to give you the maximum flexibility in debugging applications and user system. Hardware Break Conditions: Up to 12 break conditions can be defined using the event and range channels in the complex event system (CES). For more information about the hardware break conditions, see section 3.2, Complex Event System (CES).
3.1.5 Bus Monitoring The emulator incorporates a bus monitoring function that monitors and displays the contents of the accessed area in HEW windows without stopping the program execution. Up to eight blocks of 256 bytes can be monitored. In addition, the emulator can output trigger signals from external probe 2 (EXT2) when specified addresses (four points max.) are accessed. Note that, however, some products do not support the bus monitoring function. 3.
3.2.3 Breaks Use breaks to interrupt program execution when a specified event, or sequence of events, is activated. For example, you can set up a break to halt execution when the program reads from one address, and then writes to another address. The break can also optionally be delayed by up to 65535 bus cycles. 3.2.4 Timing You can set up two events and then measure the execution time of the program between the activation of the first event and second event. 3.3 Hardware Features 3.3.
3.3.2 Clocks The clock can be specified as emulator internal clock or target clock. The frequencies that can be specified as the emulator internal clock depend on the MCU. For details, refer to section 8, Software Specifications Specific to This Product. 3.3.3 Probes External probes 1 and 2 (EXT1 and EXT2) can be connected to the emulator, to make use of signals on the user system for break or trace.
Section 4 Preparation before Use 4.1 Workspaces, Projects, and Files Just as a word processor allows you to create and modify documents, HEW allows you to create and modify workspaces. A workspace can be thought of as a container of projects and, similarly, a project can be though of as a container of project files. Thus, each workspace contains one or more projects and each project contains one or more files. Figure 4.1 illustrates this graphically.
4.2 Method for Activating HEW To activate the HEW, follow the procedure listed below. 1. Connect the emulator to the host computer. 2. Connect the user system interface cable to the connector of the emulator if you use the user system interface cable. This is not necessary when you do not use the user system interface cable. 3. Turn on the emulator. Be sure to turn on the user system before supplying power to the emulator if you use the user system. 4. Activate the HEW from [Programs] in the [Start] menu.
4.2.1 Creating a New Workspace (Toolchain Not Used) 1. In the [Welcome!] dialog box that is displayed when the HEW is activated, select [Create a new project workspace] radio button and click the [OK] button. Figure 4.
2. Creation of a new workspace is started. The following dialog box is displayed. Figure 4.4 [New Project Workspace] Dialog Box [Workspace Name] edit box: Enter the new workspace name. [Project Name] edit box: Enter the project name. When the project name is the same as the workspace name, it needs not be entered. [Directory] edit box: Displays the directory in which the workspace will be created. Click the [Browse…] button to select a directory name or enter a directory name in the [Directory] edit box.
3. Make the required setting for the toolchain. When the setting has been completed, the following dialog box is displayed. Figure 4.5 [New Project – Step 7] Dialog Box The target for the session file used when the HEW is activated must be selected here. Check the box against the target platform and then click the [Next] button. For details on the session file, refer to section 4.4, Debugger Sessions.
4. Set the configuration file name. The configuration file saves the state of HEW except for the emulator. Figure 4.6 [New Project – Step 8] Dialog Box If multiple target platforms were selected in the [New Project – Step 7] dialog box shown in figure 4.5, set the name of a configuration file for each of them, each time pressing the [Next] button to proceed to the next target. Setting of the configuration file name is the end of the emulator settings.
4.2.2 Creating a New Workspace (Toolchain Used) 1. In the [Welcome!] dialog box that is displayed when the HEW is activated, select [Create a new project workspace] radio button and click the [OK] button. Figure 4.
2. Creation of a new workspace is started. The following dialog box is displayed. Figure 4.8 [New Project Workspace] Dialog Box [Workspace Name] edit box: Enter the new workspace name. Here, enter ‘test’. [Project Name] edit box: Enter the project name. When the project name is the same as the workspace name, it needs not be entered. [Directory] edit box: Displays the directory in which a workspace will be created.
3. Make the required setting for the toolchain. When the setting has been completed, the following dialog box is displayed. Figure 4.9 [New Project – Step 7] Dialog Box The target for the session file used when the HEW is activated must be selected here. Check the box against the target platform and then click the [Next] button. For details on the session file, refer to section 4.4, Debugger Sessions.
4. Set the configuration file name. The configuration file saves the state of HEW except for the emulator. Figure 4.10 [New Project – Step 8] Dialog Box If multiple target platforms were selected in the [New Project – Step 7] dialog box shown in figure 4.9, set the name of a configuration file for each of them, each time pressing the [Next] button to proceed to the next target. Setting of the configuration file name is the end of the emulator settings.
4.2.3 Selecting an Existing Workspace 1. In the [Welcome!] dialog box that is displayed when the HEW is activated, select [Browse to another project workspace] radio button and click the [OK] button. Figure 4.11 [Welcome!] Dialog Box 2. The [Open Workspace] dialog box is displayed. Select a directory in which you have created a workspace. After that, select the workspace file (.hws) and press the [Open] button. Figure 4.12 [Open Workspace] Dialog Box 3.
4.3 Setting at Emulator Activation When the emulator is activated, the command chain can automatically be executed. It is also possible to register multiple load modules to be downloaded. The registered load modules are displayed on the workspace window. 1. Select [Debug settings] from the [Options] menu to open the [Debug Settings] dialog box. Figure 4.13 [Debug Settings] Dialog Box ([Target] Page) 2. Select the product name to be connected in the [Target] combo box. 3.
Figure 4.14 [Debug Settings] Dialog Box ([Options] Page) The command chain that is automatically executed at the specified timing is registered. The following three timings are available: • At connecting the emulator • Immediately before downloading • Immediately after downloading Specify the timing for executing the command chain in the [Command batch file load timing] combo box.
4.4 Debugger Sessions The HEW stores all of your builder options into a configuration. In a similar way, the HEW stores your debugger options in a session. The debugging platforms, the programs to be downloaded, and each target platform’s options can be stored in a session. Sessions are not directly related to a configuration. This means that multiple sessions can share the same download module and avoid unnecessary program rebuilds.
4.4.2 Adding and Deleting Sessions A new session can be added by copying settings from another session or deleting a session. • To add a new empty session 1. Select [Options -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.16). 2. Click the [Add…] button to display the [Add new session] dialog box (figure 4.17). 3. Check the [Add new session] radio button. 4. Enter a name for the session. 5. Click the [OK] button to close the [Debug Sessions] dialog box. 6.
• To import an existing session into a new session file 1. Select [Options -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.16). 2. Click the [Add…] button to display the [Add new session] dialog box (figure 4.17). 3. Check the [Use an existing session file] radio button. 4. Enter a name for the session. 5. Browse to the existing session file location that you would like to import into the current project.
• To make a session read-only 1. Select [Options -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.16). 2. Select the session you would like to make read-only. 3. Click the [Properties] button to display the [Session Properties] dialog box (figure 4.18). 4. Check the [Read only] check box to make the link read-only. This is useful if you are sharing debuggersetting files and you do not want data to be modified accidentally. 5. Click the [OK] button.
4.5 Connecting the Emulator Select either of the following two ways to connect the emulator: (a) Connecting the emulator after the setting at emulator activation Select [Debug settings] from the [Options] menu to open the [Debug Settings] dialog box. It is possible to register the download module or the command chain that is automatically executed at activation. For details on the [Debug Settings] dialog box, refer to section 4.3, Setting at Emulator Activation.
4.6 Ending the Emulator When using the toolchain, the emulator can be exited by using the following two methods: • Canceling the connection of the emulator being activated • Exiting the HEW (a) Canceling the connection of the emulator being activated 1. Select [Debug settings] from the [Options] menu to open the [Debug Settings] dialog box (see figure 4.13). 2. Select or another product in the [Target] combo box.
174
Section 5 Debugging This section describes the debugging operations and their related windows and dialog boxes. 5.1 Setting the Environment for Emulation 5.1.1 Opening the [Configuration Properties] Dialog Box Selecting [Options -> Emulator -> System…] or clicking the [Emulator System] toolbar button ( Configuration Properties] dialog box. ) opens the Figure 5.
[General] page [Device] Selects the MCU to be emulated. To use an MCU not included in the list, select CUSTOM to specify the functions required for this MCU. See the hardware manual for details. [Mode] Selects the MCU's operating mode. [Clock] Selects the speed of the MCU’s clock and sub-clock. [Timer Resolution] Selects the resolution of the timer for use in execution time measurement. The value 20 ns, 125 ns, 250 ns, 500 ns, 1 us, 2 us, 4 us, 8 us, or 16 us can be selected.
5.1.2 Selecting an MCU Not Included in the List Selecting [Custom] in [Device] of the [Configuration Properties] dialog box adds the [Custom Device] page to the dialog box. Figure 5.2 [Configuration Properties] Dialog Box ([Custom Device] Page) Use this page to specify functions for an MCU not included in the list of MCUs. The items are adopted by the device last selected. [Custom Device] page [ROM] Specify the internal ROM area size. [RAM] Specify the internal RAM area size.
5.1.3 Selecting the Interface to be Connected Checking [Change driver in start up] on the [Configuration Properties] dialog box allows a selection of the driver next time the emulator is connected. Figure 5.3 [Driver Details] Dialog Box [Driver]: Selects the driver that connects the HEW and the emulator. [Details]: Sets the details of the driver being connected. [Interface]: The name of the interface to be connected. This should not be changed in this emulator.
5.1.4 Opening the [Memory Mapping] Dialog Box Selecting [Options -> Emulator -> Memory Resource…] or clicking the [Emulator Memory Resource] toolbar button ( ) opens the [Memory Mapping] dialog box. Figure 5.4 [Memory Mapping] Dialog Box This dialog box displays the current memory map. The E6000 H8S or H8/300 series supports four blocks of user memory. These can be 256 kbyte or 1 Mbyte each, depending on the SIMM fitted. Each block can be placed in the address space on a 256-kbyte or 1-Mbyte boundary.
5.1.5 Changing the Memory Map Setting Clicking the [Add…] button on the [Memory Mapping] dialog box or clicking the [Modify…] button after selecting the information on the memory map setting you want to change opens the [Edit Memory Mapping] dialog box. Figure 5.5 [Edit Memory Mapping] Dialog Box Use this dialog box to change the address range and attributes of a memory map. [From]: Enter the start address of the map range. [To]: Enter the end address of the map range.
5.2 Downloading a Program This section describes how to download a program and view it as source code or assembly-language mnemonics. Note: After a break has occurred, the HEW displays the location of the program counter (PC). In most cases, for example if an Elf/Dwarf2-based project is moved from its original path, the source file may not be automatically found. In this case, the HEW will open a source file browser dialog box to allow you to manually locate the file. 5.2.
5.2.2 Viewing the Source Code Select your source file and click the [Open] button to make the HEW open the file in the integrated editor. It is also possible to display your source files by double-clicking on them in the [Workspace] window. Figure 5.6 Source Window In this window, the following items are shown on the left as information on lines.
Source address column When a program is downloaded, an address for the current source file is displayed on the Source address column. These addresses are helpful when setting the PC value or a breakpoint.
To switch off a column in all source files 1. 2. 3. 4. Click the right-hand mouse button on the [Editor] window. Click the [Define Column Format…] menu item. The [Global Editor Column States] dialog box is displayed. A check box indicates whether the column is enabled or not. If it is checked, the column is enabled. If the check box is gray, the column is enabled in some files and disabled in others. 5. Click the [OK] button for the new column settings to take effect. Figure 5.
5.2.3 Viewing the Assembly-Language Code Click the right-hand mouse button on the [Source] window to open the popup menu and select [Go to Disassembly] to open the [Disassembly] window at the same address as that for the current [Source] window. If you do not have a source file, but wish to view code in the assembly-language level, either choose [View -> Disassembly…], or click on the [Disassembly] window’s toolbar button ( ).
The address, machine code, and disassembled instruction are displayed. Enter the new instruction or edit the old instruction in the [Mnemonic] field. Pressing the [Enter] key will assemble the instruction into memory and move on to the next instruction. Clicking the [OK] button will assemble the instruction into memory and close the dialog box. Clicking the [Cancel] button or pressing the [Esc] key will close the dialog box.
5.3 Debugging with the Command Line Interface Use the [Command Line] window to enter text-based commands instead of window menus and commands. 5.3.1 Opening the [Command Line] Window Choose [View -> Command Line] or click the [Command Line] toolbar button ( Line] window. ) to open the [Command Figure 5.11 [Command Line] Window This window allows the user to control the debugging platform by sending text-based commands.
5.3.3 Executing a Command File Click the [Play] button in the [Set Batch File] dialog box or choose [Play] from the popup menu to execute the command file. The [Play] menu is displayed in gray while the file is running and can be used when the command file execution stops and control returns to the user. 5.3.4 Stopping Command Execution Choose [Stop] from the popup menu to stop command execution. The [Stop] menu becomes valid during command execution. 5.3.5 Specifying a Log File Choose [Set Log File..
5.4 Viewing the Registers If you are debugging at assembly-language level, then you will probably find it useful to see the contents of the CPU's general registers. You can do this by using the [Register] window. 5.4.1 Opening the [Register] Window To open the [Register] window, choose [View->CPU->Registers] or click the [Register] toolbar button ( The [Register] window opens showing all of the CPU's general registers and the values, displayed in hexadecimal. ). Figure 5.14 [Register] Window 5.4.
5.4.3 Modifying Register Contents To change a register's content, open the [Edit Register] dialog box in one of the following methods: • Double-click the register you want to change. • Select the register you want to change, and choose [Edit…] from the popup menu. Figure 5.16 [Edit Register] Dialog Box You can enter a number or C/C++ expression in the [Value] field.
5.5 Operating Memory This section describes how to look at memory areas in the CPU's address space. How to look at a memory area in different formats, how to fill and move a memory block, and how to load and verify a memory area with a disk file are described. 5.5.1 Viewing a Memory Area ) To look at a memory area, choose [View -> CPU ->Memory…] or click the [View Memory] toolbar button ( to open the [Memory] window. This will open the [Set Address] dialog box shown in figure 5.17. Figure 5.
5.5.2 Displaying Data in Different Formats If you want to change the display format of the [Memory] window, select [Format] from the popup menu. The dialog box shown in figure 5.19 is displayed. Figure 5.19 [Format Memory Display] Dialog Box To display and edit memory in different widths, use the [Display Data As] combo box. For example, choose the [Byte] option and the display will be updated to show the memory area as individual bytes.
5.5.5 Modifying the Memory Contents The memory contents can be modified via the [Edit Memory] dialog box. Move the cursor on the memory unit (according to the [Memory] window display choice) that you wish to change. Either double-click on the memory unit or press the [Enter] key. The dialog box shown in figure 5.20 is displayed. Figure 5.20 [Edit Memory] Dialog Box A number or C/C++ expression can be entered in the [New Value] field.
5.5.7 Finding a Value in Memory To find a value in memory, open the [Memory] window and select [Search] from the popup menu. The [Search Memory] dialog box shown in figure 5.21 is displayed. Figure 5.21 [Search Memory] Dialog Box Enter the start and end addresses of the range in which to search (if a memory area was selected in the [Memory] window, the start and end address values will be automatically filled in) and the data value to search for, and select the search format.
5.5.8 Filling a Memory Area with a Value A value can be set as the contents of a memory address range using the memory fill function. To fill a memory range with the same value, choose [Fill] from the popup menu of the [Memory] window or choose [Fill] from the [Memory] drop-down menu. The [Fill Memory] dialog box is shown in figure 5.22. Figure 5.22 [Fill Memory] Dialog Box If an address range has been selected in the [Memory] window, the specified start and end addresses will be displayed.
The source start address and end address selected in the [Memory] window will be displayed in the [Begin] and [End] fields. Checking the [Verify] check box enables copying while comparing the copy source and copy destination. The copy unit can be selected in the [Format] combo box. Enter the destination start address in the [Destination] field and click the [OK] button or press the [Enter] key. This will close the dialog box and copy the memory block to the new address. 5.5.
5.5.11 Disabling Update of the Window Contents Automatic update of the [Memory] window contents, which is performed when user program execution stops and in other cases, can be disabled. This is done by checking [Lock Refresh] in the popup menu. 5.5.12 Updating the Window Contents The [Memory] window contents can be forcibly updated. This is done by checking [Refresh] in the popup menu. 5.5.13 Comparing the Memory Contents The contents of two memory blocks can be compared.
5.5.14 Loading a Memory Area from a File A file can be loaded to the debugging platform’s memory. Select [Load…] from the popup menu of the [Memory] window to open the [Load Program] dialog box. Figure 5.27 [Load Program] Dialog Box Enter the file format ([Format]) and the file name ([File name]). If the load address value is to be changed, enter the offset value in the offset field ([Offset address]), otherwise enter zero.
5.6 Viewing the I/O Memory A microcomputer contains on-chip peripheral modules. The exact number and type of peripheral modules differ between devices but the typical modules are a DMA controller, serial communications interface, A/D converter, integrated timer unit, bus state controller, and watchdog timer. Registers that are mapped to the microcomputer’s address space controls the on-chip peripheral modules.
5.6.3 Modifying the I/O Register Contents To edit the value in an I/O register, double-click or press the [Enter] key on the register to open a dialog box to modify the register contents. When you have entered the new number or expression, click the [OK] button or press the [Enter] key; the dialog box closes and the new value is written into the register. 5.
5.8 Reading and Displaying the Emulator Information Regularly Use the [Extended Monitor] window to know the changing information on the emulator no matter the user program is running or halted. Note: 5.8.1 The Extended Monitor function does not affect the execution of the user program since it monitors the user system or the signal output from the MCU in the emulator by using the emulator’s hardware circuit.
5.8.2 Selecting Items to be Displayed Selecting [Properties…] from the popup menu displays the [Extended Monitor Configuration] dialog box. Figure 5.31 [Extended Monitor Configuration] Dialog Box This dialog box allows the user to set the items to be displayed in the [Extended Monitor] window. Note: The items that can be set in this dialog box vary according to the emulator in use. For details, refer to section 8, Software Specifications Specific to This Product, or the online help.
5.9 Displaying Memory Contents in Realtime Use the [Monitor] window to monitor the memory contents during user program execution. In the Monitor function, the realtime operation is retained since the bus monitoring circuit of the emulator sets the read/write signal of the MCU as a trigger and holds the address bus and data bus values to update the displayed contents of the memory. Up to eight points can be set by using the eight monitoring channels on the bus monitoring circuit.
[Name]: Decides the name of the monitor window. [Options]: Sets monitor conditions. [Address]: Sets the start address for monitoring. [Size]: Sets the range for monitoring. [Access]: Sets the access size to be displayed in the monitor window. [Auto-Refresh at rate (ms)]: Sets the interval for acquisition by monitoring (500 ms at minimum). [Reading the Initial Value]: Selects reading of the values in the monitored area when the monitor window is opened.
Figure 5.33 [Monitor] Window During user program execution, the display is updated according to the setting value of the auto-update interval. Note: Select [Refresh] from the popup menu when data is not displayed correctly after changing the address or content of memory. 5.9.2 Changing the Monitor Settings Selecting [Monitor Setting…] from the popup menu of the [Monitor] window displays the [Monitor Setting] dialog box, which allows the settings to be changed.
5.9.6 Hiding the [Monitor] Window When using the Monitor function to monitor the value of a variable from the [Watch] window, hide the [Monitor] window for the effective use of the screen. The current monitoring information is listed as the submenu when selecting [Display -> CPU -> Monitor]. The list consists of the [Monitor] window name and the address to start monitoring. When the left of the list is checked, the [Monitor] window is being displayed.
[Add]: Adds a new monitoring condition. [Edit]: Changes the settings of the selected [Monitor] window (disabled when selecting multiple items). [Lock Refresh/Unlock Refresh]: Automatically updates or stops updating the display of the selected [Monitor] window. [Hide/UnHide]: Displays or hides the selected [Monitor] window. [Remove]: Removes the selected monitoring conditions. [Close]: Closes this dialog box.
5.10 Viewing the Labels Symbol information is included in the debugging information, which is used when the HEW links the user program source code to the actual code in the memory. Symbol information is also included in the debug object file. This information is a list of names that indicate addresses in the program. These names are called labels in the HEW.
5.10.2 Adding a Label Choose [Add..] from the popup menu and open the [Add Label] dialog box to add a label: Figure 5.37 [Add Label] Dialog Box Enter the new label name into the [Name] field and the corresponding value into the [Address] field and press [OK]. The [Add Label] dialog box closes and the label list is updated to show the new label. When an overloaded function or a class name is entered in the [Address] field, the [Select Function] dialog box opens for you to select a function.
5.10.4 Deleting a Label To delete a label, select the label and choose [Delete] from the popup menu. A confirmation message box appears: Figure 5.39 Message Box for Confirming Label Deletion If you click [OK], the label is removed from the list and the window display is updated. If the message box is not required then do not select the [Delete Label] option of the [Confirmation] sheet in the HEW [Options] dialog box. 5.10.
5.10.6 Loading Labels from a File A symbol file can be loaded and merged into the HEW's current symbol table. Choose [Load...] from the popup menu to open the [Load Symbols] dialog box: Figure 5.41 [Load Symbols] Dialog Box The dialog box operates like a standard Windows® [open file] dialog box; select the file and click [Open] to start loading. The standard file extension for symbol files is “.sym”.
Enter all or part of the label name that you wish to find into the edit box and click [OK] or press the [Enter] key. The HEW searches the label list for a label name containing the text that you entered. Note: Only the label is stored by 1024 characters of the start, therefore the label name must not overlap mutually in 1024 characters or less. Labels are case sensitive. 5.10.
5.11 Executing Your Program This section describes how you can execute your program's code. You will learn how to do this by either running your program continuously or stepping single or multiple instructions at a time. 5.11.1 Running from Reset To reset your user system and run your program from the reset vector address, choose [Debug->Reset Go], or click the [Go Reset] toolbar button ( ). The program will run until it hits a breakpoint or a break condition is met.
5.11.4 Running from a Specified Address The [Run Program] dialog box allows the user to run the program from any address. Choose [Debug -> Run...] to open the [Run Program] dialog box. Figure 5.43 [Run Program] Dialog Box The following execution conditions can be specified in this dialog box: [Program Counter]: Instruction address to start execution. The initial value is the current PC value. [Temporary PC Breakpoints]: A temporary PC breakpoint.
5.11.5 Single Step To debug your code it is very useful to be able to step a single line or instruction at a time and examine the effect of that instruction on the system. In the [Source] window, then a step operation will step a single source line. In the [Disassembly] window, a step operation will step a single assembly-language instruction. If the instruction calls another function or subroutine, you have the option to either step into or step over the function.
5.11.6 Multiple Steps You can step several instructions at a time by using the [Step Program] dialog box. The dialog box also provides an automated step with a selectable delay between steps. Open it by choosing [Debug-> Step...]. The [Step Program] dialog box is displayed: Figure 5.44 [Step Program] Dialog Box [Steps]: Number of steps to be executed. [Delay (seconds)]: Delay between steps when the program is automatically stepped.
5.12 Stopping Your Program This section describes how you can halt execution of your application's code. This section describes how to do this directly by using the [Stop] button and by setting breakpoints at specific locations in your code. 5.12.1 Stopping the Program by the [Stop] Toolbar Button When your program is running, the [Stop] toolbar button is enabled ( ) (a red STOP sign), and when the program has stopped it is disabled ( ) (the STOP sign is grayed out).
• To set a PC breakpoint by using the [Breakpoints] dialog box Selecting [Edit -> Source Breakpoint…] displays the [Breakpoints] dialog box. Figure 5.45 [Breakpoints] Dialog Box The [Breakpoints] dialog box allows the user to view the current breakpoints set. Clicking the [Edit Code] button displays the source where each breakpoint is set. The [Remove] or [Remove All] button deletes one or all breakpoints, respectively. The check box of each breakpoint enables or disables the breakpoint.
5.13 Elf/Dwarf2 Support The HEW supports the Elf/Dwarf2 object file format for debugging applications written in C/C++ and assembly language for Renesas microcomputers. It provides a powerful way of accessing, observing and modifying the symbolic level debugging information about the user application that is running. Key Features • • • • • • • Source level debugging C/C++ operators C/C++ expression (casting, pointers, references, etc.
5.13.3 Supporting Duplicate Labels In some languages, for example C++ overloaded functions, a label may represent more than one address. When such a label name is entered in a dialog box, the HEW will display the [Select Function] dialog box to display overloaded functions and member functions. Figure 5.46 [Select Function] Dialog Box Select overloaded functions or member functions in the [Select Function] dialog box.
Setting a Function Click the [OK] button to set the functions displayed in the [Set Function Name] list box. The functions are set and the [Select Function] dialog box closes. Clicking the [Cancel] button closes the dialog box without setting the functions. 5.13.4 Debugging an Overlay Program This section explains the settings for using the overlay functions.
 Setting section group When using the overlay function, the highest-priority section group must be selected in the [Overlay] dialog box; otherwise the HEW will operate incorrectly. First click one of the address ranges displayed in the [Address] list box. The section groups assigned to the selected address range will then be displayed in the [Section Name] list box. Click to select the section group with the highest-priority among the displayed section groups. Figure 5.
5.14 Viewing the Variables This section describes how you can look at variables in the source program. 5.14.1 Tooltip Watch The quickest way to look at a variable in your program is to use the Tooltip Watch feature. Â To use Tooltip Watch: Open the [Source] window showing the variable that you want to examine. Rest the mouse cursor over the variable name that you want to examine - a tooltip will appear near the variable containing basic watch information for that variable. Figure 5.50 Tooltip Watch 5.
5.14.3 [Watch] Window You can view any value in the [Watch] window. Opening a [Watch] Window To open a [Watch] window, choose [View->Symbol->Watch] or click on the [Watch] toolbar button ( visible. A [Watch] window opens. Initially the contents of the window will be blank. ) if it is Figure 5.52 [Watch] Window This window allows the user to view and modify C/C++-source level variables. The contents of this window are displayed only when the debugging information available in the absolute file (*.
The [R] mark shows that the value of the variable can be updated during user program execution. For updating of the content of the variable that has been registered in the [Watch] window, there are the following three methods: 1. Use the Monitor function without halting the user program The read/write signal of the MCU is set as a trigger and holds the address bus and data bus values to update the value of the variable.
Adding a Watch Item Use the [Add Watch] dialog box in the [Watch] window to add Watch items to the [Watch] window. Â To use Add Watch from a [Watch] window: Open the [Watch] window. Choose [Add Watch] from the popup menu. The [Add Watch] dialog box opens: Figure 5.53 [Add Watch] Dialog Box Enter the name of the variable that you wish to watch and click [OK]. The variable is added to the [Watch] window. A variable can be dragged from the [Source] window and dropped into the [Watch] window.
Editing a Watch Item's Value You may wish to change the value of a watch variable, e.g. for testing purposes or if the value is incorrect due to a bug in your program. To change a watch item's value use the Edit Value function. Â Editing a watch item's value: Enter a value directly in the window. In another way, select the item to edit by clicking on it, you will see a flashing cursor on the item. Choose [Edit Value] from the popup menu. The [Edit Value] dialog box opens: Figure 5.
Deleting a Watch Item To delete a watch item, select it and choose [Delete] from the popup menu. The item is deleted and the [Watch] window is updated. To delete all watch items, choose [Delete All] from the popup menu. All items are deleted and the [Watch] window is updated. Specifying Realtime Update The R mark shown to the left of each variable indicates whether the variable is updated in real time.
5.14.4 [Locals] Window The local variables and their values can be displayed in the [Locals] window. Opening the [Locals] Window To open the [Locals] window, choose [View->Symbol->Locals] or click the [Locals] toolbar button ( ). Figure 5.56 [Locals] Window If a local variable is not initialized when defined, then the value of the local variable will be incorrect until another value is assigned to the local variable.
5.15 Using the Event Points The emulator has the event point function that performs breaking, tracing, and execution time measurement by specifying higher-level conditions along with the PC breakpoints standard for the HEW. 5.15.1 PC Breakpoints When the instruction of the specified address is fetched, the user program is stopped. Up to 256 points can be set. Note that, however, only one PC breakpoint can be set in the ROM area of the user system.
Range Channels (Ch9 to Ch12): The emulator has 4 range channels. The range channel can be defined as a combination of one or more of the followings: • An address or an address range • Outside of an address range • A read, a write, or either • Data with a mask specification • Bus state • Area • The value of four external probe signals • The number of delay cycles after the event has occurred 5.15.
Table 5.2 Area Signals Acquired by the Emulator Area Trace Display (Status) Description On-chip ROM ROM ROM On-chip RAM RAM RAM On-chip I/O 16bit I/O-16 16-bit I/O On-chip I/O 8bit I/O-8 8-bit I/O External I/O 16bit EXT-16 16-bit EXT (external) External I/O 8bit EXT-8 8-bit EXT (external) DTC RAM RAM/DTC DTCRAM Note: The signals to indicate the bus states and areas vary according to the emulator in use.
Select [Add...] or the PC breakpoint displayed in this window and then select [Edit...] from the popup menu to display the [Breakpoint/Event Properties] dialog box. Figure 5.58 [Breakpoint/Event Properties] Dialog Box (Setting a PC Break) In this dialog box, select the address condition to set PC breakpoints. [Type]: Select the type of a breakpoint. Note that the [Breakpoint/Event Properties] dialog box is used for setting PC breakpoints and event points.
5.15.7 Setting Event Points On the [Event] sheet, the settings for event points are displayed, modified, and added. Figure 5.59 [Event] Window ([Event] Sheet) Select [Add...] or the event point displayed in this window and then select [Edit...] from the popup menu to display the [Breakpoint/Event Properties] dialog box. The conditions for the event point are set on the [General], [Bus/Area], [Signals], and [Action] pages.
(1) [General] page The address and data conditions are set. Figure 5.60 [Breakpoint/Event Properties] Dialog Box ([General] Page) [Type]: Select the type of a breakpoint. Note that the [Breakpoint/Event Properties] dialog box is used for setting PC breakpoints and event points. Selecting a particular type of breakpoint enables or disables other pages and parts of the dialog according to the options available to that type of breakpoint.
[Data Compare]: Sets the data condition. [Compare]: Checking this box compares data. [Use Mask]: Sets a mask condition (available when [Compare] has been selected). [Value]: Specifies the data bus value as numerics. The size of data for access can also be selected (available when [Compare] has been selected). [Byte]: Sets access in bytes as the condition (available when [Compare] has been selected). [Word]: Sets access in words as the condition (available when [Compare] has been selected).
(2) [Bus/Area] page Use this page to set the bus status and the memory area being accessed. Figure 5.61 [Breakpoint/Event Properties] Dialog Box ([Bus/Area] Page) [Bus State]: Sets the bus status as the condition. When the [Don't care] check box is checked, the event will be satisfied with any bus status. [Area]: Specifies the area for searching. When the [Don't care] check box is checked, the event will be satisfied in any area.
(3) [Signals] page Use this page to set external signals. Figure 5.
[Probe1]: Detects the status of the input probe signal 1 [High]: Detects the high level of the input probe signal [Low]: Detects the low level of the input probe signal [Don’t care]: The status of the input probe signal is not detected (4) [Action] page Use this page to decide what action the emulator takes when the defined event occurs. Figure 5.63 [Breakpoint/Event Properties] Dialog Box ([Action] Page) [Action]: Selects an action that occurs when the event is satisfied.
[Required number of event occurrences]: Allows a 16-bit pass count to be set. The event must occur the specified number of times before the action is taken. The range of values is D’0 to D’65,535. [Enable Sequencing]: Allows the event to take part in a sequence of events (setting this requires the event to use an event detector). [Configure Sequence…]: Displays the [Event Sequencing] dialog box to allow the event sequencing to be configured (only available when [Enable Sequencing] has been selected).
The state where the condition is satisfied is retained until the user program is stopped or the event point is reset. When the condition on the event point is satisfied, no action will be taken even if the condition is satisfied again. If you want the action to be taken again, reset the event point so that the state transits to that where no condition is satisfied. When the user program is stopped, the states of all the event points transit to that where no condition is satisfied.
5.15.8 Setting Trigger Points The trigger point is an event to output a trigger when the specified address has been accessed. Up to four trigger points can be set by using the trigger outputs (four channels) on the bus monitoring circuit of the emulator. The settings of the trigger point are displayed and modified on the [Trigger] sheet. Figure 5.65 [Event] Window ([Trigger] Sheet) Selecting [Add...] or the event point and [Edit...
Notes: 1. When the condition set for the trigger output (1 to 4) is satisfied, the high-level signal will be output from the corresponding pin (1 to 4) of the external probe 2 (EXT2) during reading or writing. 2. Some emulators may not support the trigger point. For details, refer to section 8, Software Specifications Specific to This Product, or the online help. 5.15.9 Editing Event Points Handlings for settings other than PC breakpoints, event points, and trigger points are common.
5.16 Viewing the Trace Information The emulator acquires the results of each instruction execution into the trace buffer as trace information and displays it in the [Trace] window. The conditions for the trace information acquisition can be specified in the [Trace Acquisition] dialog box. Since trace information in bus-cycles is acquired by the hardware circuit and stored in the trace buffer, the realtime operation is retained.
[Status]: Bus status during this cycle; DTC operation, PROG (prefetch), Data (CPU data access cycle), Refresh (refresh cycle), or DMAC (DMAC cycle) (not available when a time stamp is acquired) [Clock]: Number of clock cycles in bus cycle as 1 to 8. To indicate more clock cycles, “OVR” is displayed (not available when a time stamp is acquired).
5.16.3 Specifying Trace Acquisition Conditions The capacity of the trace buffer is limited. When the buffer becomes full, the oldest trace information is overwritten. Setting the trace acquisition condition allows acquisition of useful trace information and effective use of the trace buffer. The condition is enabled by the event point to control starting, stopping, and ending the trace acquisition. For event points, refer to section 5.15, Using the Event Points.
[Suppress]: Acquires no trace information of the specified types of bus cycle. [Time Stamp]: Sets a condition for time stamping. [Clock]: [Free Trace]: Select either from Disabled, 125 ns, 250 ns, 500 ns, 1 us, 2 us, 4 us, 8 us, 16 us, or 100 us as the resolution for time stamping. A time stamp has a 32-bit counter. At 125 ns the maximum time that can be measured is about 9 minutes, and at 100 µs the maximum time is about 5 days.
(2) [Stop] page Sets trace stop conditions. It is possible to set trace stop conditions with and without delay, with both allowed simultaneously. Figure 5.69 [Trace Acquisition] Dialog Box ([Stop] Page) [Stop Without Delay]: 248 Defines a trace stop condition. [Enable]: Checking this box enables a trace stop. [Events]: Lists the event points where trace acquisition conditions have been set.
(3) [Delayed Stop] page Sets trace stop conditions. It is possible to set trace stop conditions with and without delay, with both allowed simultaneously. Figure 5.70 [Trace Acquisition] Dialog Box ([Delayed Stop] Page) [Stop With Delay]: Defines a trace stop condition. [Enable]: Checking this box enables a trace stop. [Delay Count]: Sets the delay count (in bus cycles, range 1 to 65535). This function allows you to acquire a number of trace records after any of the specified events occur.
(4) [1] to [4] pages Sets a range trace. This is only available when the free trace mode is disabled. Select either of the following four modes: [Disabled], [Point to Point], [Range], and [Event]. • Disabled Disables a range trace. Figure 5.
• Point to Point Acquires trace information in the specified range. Figure 5.72 Range Trace Setting (Point to Point) [Start Address]: Address where trace acquisition starts [Stop Address]: Address where trace acquisition stops [Cyclic]: When this box is checked, the event sequencing is configured so that the events reset themselves which causes tracing to be restarted when the start event occurs after the stop event.
• Range Only acquires the trace information that satisfies the specified condition. Figure 5.73 Range Trace Setting (Range) [Range Event]: Selects an event point for which a trace acquisition condition has been set. [Edit…]: Changes the setting for the selected event point. Only acquires trace information from all bus cycles that matches the condition set in the selected event. This mode uses one event channel or range channel.
• Event Acquires trace information, controlling the start and end of trace acquisition with the specified condition. Figure 5.74 Range Trace Setting (Event) [Start Event]: Selects the event point for which the condition to start trace acquisition has been set. [Stop Event]: Selects the event point for which the condition to stop trace acquisition has been set. [Edit…]: Changes the setting for the selected event point.
5.16.4 Searching for a Trace Record Use the [Trace Find] dialog box to search for a trace record. To open this dialog box, choose [Find...] from the popup menu. The [Trace Find] dialog box has the following options: Table 5.5 [Trace Find] Dialog Box Pages Page Description [General] Sets the range for searching. [Address] Sets an address condition. [Data] Sets a data condition. [R/W] Selects the type of access cycles.
(1) [General] page Set the range for searching. Figure 5.75 [Trace Find] Dialog Box ([General] Page) [Trace search range]: Sets the range for searching. [Not designation]: Searches for information that does not match the conditions set in other pages when this box is checked. [Upward search]: Searches upwards when this box is checked. [Start PTR]: Enters a PTR value to start a search. [End PTR]: Enters a PTR value to end a search.
(2) [Address] page Set an address condition. Figure 5.76 [Trace Find] Dialog Box ([Address] Page) [Don't care]: Detects no address when this box is checked. [Setting]: Detects the specified address. [Value]: 256 Enter the address value (not available when [Don’t care] has been checked).
(3) [Data] page Set a data condition. Figure 5.77 [Trace Find] Dialog Box ([Data] Page) [Don't care]: Detects no data when this box is checked. [Setting]: Detects the specified data. [Value]: Enter the data value (not available when [Don’t care] has been checked).
(4) [R/W] page Select the type of access cycles. Figure 5.78 [Trace Find] Dialog Box ([R/W] Page) [Don't care]: Detects no read/write condition when this box is checked. [Setting]: Detects the specified read/write condition. [String]: Select a read/write condition (not available when [Don’t care] has been checked).
(5) [Area] page Select the area being accessed. The selection is not available when a time stamp is acquired. Figure 5.79 [Trace Find] Dialog Box ([Area] Page) [Don't care]: Detects no area condition when this box is checked. [Setting]: Detects the specified area condition. [String]: Select an area condition (not available when [Don’t care] has been checked). Note: Available areas vary according to the emulator in use. For details, refer to section 5.15.4, Signals to Indicate Bus States and Areas.
(6) [Status] page Select the status of a bus. The selection is not available when a time stamp is acquired. Figure 5.80 [Trace Find] Dialog Box ([Status] Page) [Don't care]: Detects no bus condition when this box is checked. [Setting]: Detects the specified bus condition. [String]: Select a bus condition (not available when [Don’t care] has been checked). Note: Available bus conditions vary according to the emulator in use. For details, refer to section 5.15.
(7) [Probes] page Select the status of four probe signals. The selection is not available when a time stamp is acquired. Figure 5.81 [Trace Find] Dialog Box ([Probes] Page) [Don't care]: Detects no probe signal condition when this box is checked. [Setting]: Detects the specified probe signal condition. [Probe4] to [Probe1]: Select probe conditions (not available when [Don’t care] has been checked). Don't care: Detects no selected probe condition. High: The status of the probe signal is high.
(8) [IRQ7-0] page Select the status of IRQ signals. The selection is not available when a time stamp is acquired. Figure 5.82 [Trace Find] Dialog Box ([IRQ7-0] Page) [Don't care]: Detects no IRQ input condition when this box is checked. [Setting]: Detects the specified IRQ input condition. [IRQ7] to [IRQ0]: Select IRQ input conditions (not available when [Don’t care] has been checked). Don't care: Detects no selected IRQ input condition. High: The status of the IRQ input is high.
(9) [Timestamp] page Specify the time stamp value for bus cycles. The specification is not available when a time stamp is acquired. Figure 5.83 [Trace Find] Dialog Box ([Timestamp] Page) [Don't care]: Detects no time stamp value when this box is checked. [Setting]: Detects the specified time stamp value. (Every field must be filled in.) [Value]: Enter the time stamp value.
5.16.7 Viewing the [Source] Window The [Source] window corresponding to the selected trace record can be displayed in the following two ways: • Select a trace record and choose [View Source] from the popup menu. • Double-click a trace record The [Source] or [Disassembly] window opens and the selected line is marked with a cursor. 5.16.8 Trimming the Source Choose [Trim Source] from the popup menu to remove the white space from the left side of the source.
5.16.12 Extracting Records from the Acquired Information Use the filtering function to extract the records you need from the acquired trace information. The filtering function allows the trace information acquired by hardware to be filtered by software.
(1) [General] page Set the range for filtering. Figure 5.84 [Trace Filter] Dialog Box ([General] Page) [Don't care other pages]: Only selects the cycle number when this box is checked. Other options become invalid. [Enable Filter]: Enables the filter when this box is checked. [No]: Filters information that does not match the conditions set in those pages when this box is checked. [Trace display range]: Sets the range for filtering. [Start PTR]: Enters a PTR value to start filtering.
(2) [Address] page Set address conditions. Figure 5.85 [Trace Filter] Dialog Box ([Address] Page) [Don't care]: Detects no address when this box is checked. [Setting]: Detects the specified address. [Point]: Specifies a single address (not available when [Don’t care] has been checked). [Range]: Specifies an address range (not available when [Don’t care] has been checked). [From]: Enter a single address or the start of the address range (not available when [Don’t care] has been checked).
(3) [Data] page Set a data condition. Figure 5.86 [Trace Filter] Dialog Box ([Data] Page) [Don't care]: Detects no data when this box is checked. [Setting]: Detects the specified data. [Point]: Specifies single data (not available when [Don’t care] has been checked). [Range]: Specifies a data range (not available when [Don’t care] has been checked). [From]: Enter single data or the minimum value of the data range (not available when [Don’t care] has been checked).
(4) [R/W] page Select the type of access cycles. Figure 5.87 [Trace Filter] Dialog Box ([R/W] Page) [Don't care]: Detects no read/write condition when this box is checked. [Setting]: Detects the specified read/write condition. RD: Detects read cycles when this box is checked (not available when [Don’t care] has been checked). WR: Detects write cycles when this box is checked (not available when [Don’t care] has been checked).
(5) [Area] page Select the area being accessed. The selection is not available when a time stamp is acquired. Figure 5.88 [Trace Filter] Dialog Box ([Area] Page) [Don't care]: Detects no area condition when this box is checked. [Setting]: Detects the specified area condition (not available when [Don’t care] has been checked). Note: Available area conditions vary according to the emulator in use. For details, refer to section 5.15.4, Signals to Indicate Bus States and Areas.
(6) [Status] page Select the status of a bus. The selection is not available when a time stamp is acquired. Figure 5.89 [Trace Filter] Dialog Box ([Status] Page) [Don't care]: Detects no bus condition when this box is checked. [Setting]: Detects the specified bus condition (not available when [Don’t care] has been checked). Note: Available bus conditions vary according to the emulator in use. For details, refer to section 5.15.4, Signals to Indicate Bus States and Areas.
(7) [Probes] page Select the status of four probe signals. The selection is not available when a time stamp is acquired. Figure 5.90 [Trace Filter] Dialog Box ([Probes] Page) [Don't care]: Detects no probe signal condition when this box is checked. [Setting]: Detects the specified probe signal condition. [Probe4] to [Probe1]: Select probe conditions (not available when [Don’t care] has been checked). Don't care: Detects no selected probe condition. High: The status of the probe signal is high.
(8) [IRQ7-0] page Select the status of IRQ signals. The selection is not available when a time stamp is acquired. Figure 5.91 [Trace Filter] Dialog Box ([IRQ7-0] Page) [Don't care]: Detects no IRQ input condition when this box is checked. [Setting]: Detects the specified IRQ input condition. [IRQ7] to [IRQ0]: Select IRQ input conditions (not available when [Don’t care] has been checked). Don't care: Detects no selected IRQ input condition. High: The status of the IRQ input is high.
(9) [Timestamp] page Specify the time stamp value for bus cycles. The specification is not available when a time stamp is acquired. Figure 5.92 [Trace Filter] Dialog Box ([Timestamp] Page) [Don't care]: Detects no time stamp value when this box is checked. [Setting]: Detects the specified time stamp value. [Point]: Specifies a single time stamp (not available when [Don’t care] has been checked). [Range]: Specifies a time stamp range (not available when [Don’t care] has been checked).
5.16.13 Calculating the Difference in Time Stamping Select [Timestamp Difference…] from the popup menu to calculate the time difference between the two points selected by the result of tracing in acquisition of time stamp information. Figure 5.93 [Timestamp Difference] Dialog Box [Select 2 line]: Select trace records to calculate the time stamp difference. [First PTR]: Specifies the first pointer to measure the difference. The pointer of the line selected on the Trace window is displayed by default.
5.16.14 Analyzing Statistical Information Choose [Statistic] from the popup menu to open the [Statistic] dialog box and analyze statistical information under the specified conditions. Figure 5.94 [Statistic] Dialog Box [Statistic Analysis]: 276 Setting required for analysis of statistical information. [Default]: Sets a single input value or character string. [Range]: Sets the input value or character string as a range. [Item]: Sets the item for analysis.
This dialog box allows the user to analyze statistical information concerning the trace information. Set the target of analysis in [Item] and the input value or character string by [Start] and [End]. Click the [Result] button after setting a condition by pressing the [New] or [Add] button to analyze the statistical information and display its result in the [Result] list. Note: In this emulator, only [PTR] can be set as a range. Each of other items must be specified as a character string.
5.17 Viewing the Function Call History The [Stack Trace] window shows the function call history. 5.17.1 Opening the [Stack Trace] Window To open the [Stack Trace] window, choose [View -> Code -> Stack Trace] or click the [Stack Trace] toolbar button ( ). Figure 5.96 [Stack Trace] Window The following items are displayed. [Kind]: Indicates the type of the symbol. F: Function P: Function parameter L: Local variable [Name]: Indicates the symbol name.
5.17.3 Specifying the View Choose [View Setting...] from the popup menu to open the [Stack Trace Setting] dialog box, which allows the user to specify the [Stack Trace] window settings. Figure 5.97 [Stack Trace Setting] Dialog Box [Nest level]: Specifies the level of function call nesting to be displayed in the [Stack Trace] window. [Display symbol]: Specifies the symbol types to be displayed in addition to functions. [Display Radix]: Specifies the radix for displays in the [Stack Trace] window.
5.18 Displaying Memory Contents as an Image The memory contents can be displayed as an image in the [Image View] window. 5.18.1 Opening the [Image View] Window Choose [View -> Graphic -> Image…] or click the [Image] toolbar button ( dialog box shown in figure 5.98. ) to open the [Image Properties] Figure 5.98 [Image Properties] Dialog Box The [Image Properties] dialog box is used to specify the display method of the [Image View] window.
The following items are to be specified: [Color Information]: Specifies the color information of the image to be displayed. [Mode]: Specifies the format. [MONOCHROME]: Displays in black and white. [RGB]: Displayed in R (red), G (green), and B (blue) [BGR]: Displayed in B (blue), G (green), and R (red) [YCbCr]: Displayed by Y (brightness), Cb (color difference in blue), and Cr (color difference in red) [Bit/Pixel]: Specifies Bit/Pixel according to the selected [Mode].
[Position]: Specifies the start position of the image where part of the image is to be displayed. (Valid when [Part Size] is selected) [X Position]: Specifies the X axis of the start location. (When a prefix is omitted, the values are input and displayed in decimal.) [Y Position]: Specifies the Y axis of the start location. (When a prefix is omitted, the values are input and displayed in decimal.) [Width/Height Size]: Specifies the height and width of the image to be displayed partly.
5.18.3 Updating the Window Contents Selecting [Refresh Now] from the popup menu immediately updates the window contents. 5.18.4 Displaying the Pixel Information Double-clicking within the window displays information on the pixel on which the mouse pointer is located in the [Pixel Information] dialog box. Figure 5.100 [Pixel Information] Dialog Box This dialog box displays pixel information on the cursor location. [Color Mode]: Displays the format of the image.
5.19 Displaying Memory Contents as Waveforms Memory contents can be displayed as waveforms in the [Waveform View] window. 5.19.1 Opening the Waveform View Window Choose [View -> Graphic -> Waveform…] or click the [Waveform] toolbar button ( Properties] dialog box shown in figure 5.101. ) to open the [Waveform Figure 5.101 [Waveform Properties] Dialog Box Specifies the waveform format. The following items can be specified.
Figure 5.102 [Waveform View] Window Displays the memory contents as waveforms. The X axis shows the number of sampling data and the Y axis shows the sampling value. 5.19.2 Automatically Updating the Window Contents Checking [Auto Refresh] in the popup menu will allow the window contents to be automatically updated when user program execution stops. 5.19.3 Updating the Window Contents Selecting [Refresh Now] from the popup menu immediately updates the window contents. 5.19.
5.19.9 Non-Display of Cursor Selecting [Clear Cursor] from the popup menu hides the cursor display. 5.19.10 Displaying the Sampling Information Selecting [Sample Information…] from the popup menu displays the [Sample Information] dialog box. Figure 5.103 [Sample Information] Dialog Box Displays the sampling information of the cursor location in the [Waveform View] window. The following information is displayed. [Data Size]: Displays 8bit or 16bit. [Channel]: Displays the data channel.
5.20 Analyzing Performance Use the performance analysis function to measure the rate of execution time. The performance analysis function does not affect the realtime operation because it measures the rate of execution time in the specified range by using the circuit for measurement of hardware performance included in the emulator. Select either of the following five modes according to the purpose of measurement. Table 5.
Table 5.
5.20.1 Opening the [Performance Analysis] Window Choose [View -> Performance -> Performance Analysis] or click the [PA] toolbar button ( [Select Performance Analysis Type] dialog box. ) to open the Figure 5.104 [Select Performance Analysis Type] Window Select [E6000 Performance Analysis] and then click the [OK] button to open the [Performance Analysis] window. Figure 5.
5.20.2 Setting Conditions for Measurement Conditions for measurement can be displayed and changed in the [Performance Analysis] window. Select a point where a condition is to be set, and then select [Set…] from the popup menu to display the [Performance Analysis Properties] dialog box. Select either from the following five modes as the condition by the [Measurement Method] option: Table 5.
(1) Time Of Specified Range Measurement Figure 5.107 Time Of Specified Range Settings [Range Name]: The name of the range to be measured [Range]: The range for the Time Of Specified Range Measurement [Start Address]: Address to start measurement [End Address]: Address to end measurement Measures the execution time and the execution count in the range between the start address and end address.
(2) Start Point To End Point Measurement Figure 5.108 Start Point To End Point Measurement Settings [Range Name]: The name of the range to be measured [Point]: The range for the Start Point To End Point Measurement [Start Address]: Address to start measurement [End Address]: Address to end measurement [Time Out]: The timeout value to finish measurement. When the minimum time for measurement is 160 ns, 40 ns, or 20 ns, enter the value as follows.
Notes: 1. When [Time Out] is selected in the Start Point To End Point Measurement mode, the execution time will not be measured correctly. 2. When [Time Out] and [Count] are selected, satisfaction of either of these options stops execution of the user program (performance break). 3. Only channel 1 can be used for [Time Out] and [Count]. Use other channels if you do not want to select [Time Out] or [Count] in the Start Point To End Point Measurement mode.
(3) Start Range To End Range Measurement Figure 5.
(4) Access Count Of Specified Range Measurement Figure 5.
(5) Called Count Of Specified Range Measurement Figure 5.111 Called Count Of Specified Range Measurement Settings [Range Name]: The name of the range to be measured [Range]: The range for the Called Count Of Specified Range Measurement [Start Address]: Start address [End Address]: End address [Call Range]: The range for the Called Count Of Specified Range Measurement. As the call range, specify the start and end addresses of the selected subroutine.
5.20.3 Selecting the Address Detection Mode and Resolution In measurement of hardware performance, there are two types of address detection modes: prefetch address detection mode and PC address detection mode. Select the appropriate address detection mode according to the measurement mode in use. The resolution can also be selected here. To select an address detection mode and resolution, click the [Settings…] button on the [Performance Analysis Properties] dialog box.
298
Section 6 Tutorial 6.1 Introduction The following describes the main functions of the emulator by using a tutorial program. The tutorial program is based on the C++ program that sorts ten random data items in ascending or descending order. The tutorial program performs the following actions: • The main function repeatedly calls the tutorial function to repeat sorting. • The tutorial function generates random data to be sorted and calls the sort and tutorial functions in order.
6.2 Running the HEW Open a workspace by following the procedure listed in section 4.2.3, Selecting an Existing Workspace. Select the following directory: HEW installation destination directory\Tools\Renesas\DebugComp\Platform\E6000\2633\Tutorial Note: The file path differs depending on the product. Refer to section 8.2.1, Environment for Execution of the Tutorial Program. Then select the file indicated below. Figure 6.1 [Open Workspace] Dialog Box Opening this workspace automatically connects the emulator.
6.3 Downloading the Tutorial Program 6.3.1 Downloading the Tutorial Program Download the object program to be debugged. • Select [Download module] from the popupmenu opened by clicking the right-hand mouse button on [Tutorial.abs] of [Download modules]. Figure 6.
6.3.2 Displaying the Source Program The HEW allows the user to debug a user program at the source level. • Double-click [Tutorial.cpp] under [C++ source file]. Figure 6.3 [Source] Window (Displaying the Source Program) • Select a font and size that are legible if necessary. For details, refer to section 4, Using the Editor in the HEW part.
6.4 Setting a PC Breakpoint A PC breakpoint is a simple debugging function. The [Source] window provides a very simple way of setting a PC breakpoint at any point in a program. For example, to set a PC breakpoint at the sort function call: • Select by double-clicking the [Editor] column on the line containing the sort function call. Figure 6.4 [Source] Window (Setting a PC Breakpoint) The symbol • will appear on the line containing the sort function. This shows that a PC breakpoint has been set.
6.5 Setting Registers Set a value of the program counter before executing the program. • Select [Registers] from the [CPU] submenu of the [View] menu. The [Register] window is displayed. Figure 6.5 [Register] Window • To change the value of the program counter (PC), double-click the value area in the [Register] window with the mouse. The following dialog box is then displayed, and the value can be changed. Set the program counter to H’00000400 in this tutorial program, and click the [OK] button. Figure 6.
6.6 Executing the Program Execute the program as described in the following: • To execute the program, select [Go] from the [Debug] menu, or click the [Go] button on the toolbar. Figure 6.7 [Go] Button While the program is executing, the current address bus value and the operating state of the MCU are displayed on the status bar.
The user can see the cause of the break that occurred last time in the [Status] window. • Select [Status] from the [CPU] submenu of the [View] menu. After the [Status] window is displayed, open the [Platform] sheet, and check the Status of Cause of last break. Figure 6.9 [Status] Window Note: The items that can be displayed in this window differ depending on the product. For the items that can be displayed, refer to section 8, Software Specifications Specific to This Product, or the online help.
6.7 Reviewing Breakpoints The user can see all the breakpoints set in the program in the [Event] window. • Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed. Select the [Breakpoint] sheet. Figure 6.10 [Event] Window The popup menu, opened by clicking the [Event] window with the right-hand mouse button, allows the user to set or change breakpoints, define new breakpoints, and delete, enable, or disable breakpoints.
6.8 Referring to Symbols The [Label] window can be used to display the information on symbols in modules. Select [Label] from the [Symbol] submenu of the [View] menu. The [Label] window is displayed so that the user can refer to the addresses of symbols in modules. Figure 6.
6.9 Viewing Memory When the label name is specified, the user can view the memory contents that the label has been registered in the [Memory] window. For example, to view the memory contents corresponding to _main in byte size: • Select [Memory …] from the [CPU] submenu of the [View] menu to enter _main in the [Start address] edit box and +ff in the [End address] edit box, respectively, and to select Byte in the [Format] combo box. Figure 6.12 [Set Address] Dialog Box • Click the [OK] button.
6.10 Watching Variables As the user steps through a program, it is possible to watch that the values of variables used in the user program are changed. For example, set a watch on the long-type array a declared at the beginning of the program, by using the following procedure: • Click the left of displayed array a in the [Source] window to position the cursor. • Select [Instant Watch...] with the right-hand mouse button. The following dialog box will be displayed. Figure 6.
The user can also add a variable to the [Watch] window by specifying its name. • Click the [Watch] window with the right-hand mouse button and select [Add Watch…] from the popup menu. The following dialog box will be displayed. Figure 6.16 [Add Watch] Dialog Box • Input variable i to [Variable or expression] edit box and click the [OK] button. The [Watch] window will now also show the int-type variable i. Figure 6.
The user can click mark ‘+’ at the left side of array a in the [Watch] window to watch all the elements. Figure 6.
6.11 Displaying Local Variables The user can display local variables in a function using the [Locals] window. For example, we will examine the local variables in the tutorial function, which declares four local variables: a, j, i, and p_sam. • Select [Locals] from the [Symbol] submenu of the [View] menu. The [Locals] window is displayed. The [Locals] window shows the local variables in the function currently pointed to by the program counter, along with their values.
6.12 Stepping Through a Program The HEW provides a range of step menu commands that allow efficient program debugging. Table 6.1 Step Option Menu Command Description Step In Executes each statement, including statements within functions. Step Over Executes a function call in a single step. Step Out Steps out of a function, and stops at the statement following the statement in the program that called the function. Step… Steps the specified times repeatedly at a specified rate. 6.12.
Figure 6.21 [Source] Window (Step In) • The highlighted line moves to the first statement of the sort function in the [Source] window.
6.12.2 Executing the [Step Out] Command The [Step Out] command steps out of the called function and stops at the next statement of the calling statement in the main function. • To step out of the sort function, select [Step Out] from the [Debug] menu, or click the [Step Out] button in the toolbar. Figure 6.22 [Step Out] Button Figure 6.23 [HEW] Window (Step Out) The data of variable a displayed in the [Watch] window is sorted in ascending order.
6.12.3 Executing the [Step Over] Command The [Step Over] executes a function call as a single step and stops at the next statement of the main program. • To step through all statements in the change function at a single step, select [Step Over] from the [Debug] menu, or click the [Step Over] button in the toolbar. Figure 6.24 [Step Over] Button Figure 6.
6.13 Forced Breaking of Program Executions The HEW can force a break in the execution of a program. • Cancel all the breaks. • To execute the remaining sections of the tutorial function, select [Go] from the [Debug] menu or the [Go] button on the toolbar. Figure 6.26 [Go] Button • The program goes into an endless loop. To force a break in execution, select [Halt] from the [Debug] menu or the [Stop] button on the toolbar. Figure 6.27 [Stop] Button 6.
6.15 Break Function The emulator’s break functions are of two types: PC breaks and breaks at event points. PC breakpoints and event points are set in the HEW’s [Event] window. An overview and setting of the break function are described below. 6.15.1 PC Break Function The emulator can set up to 256 PC breakpoints. • Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed. • Select the [Breakpoint] sheet. Figure 6.
Figure 6.31 [Breakpoint/Event Properties] Dialog Box • Check the [PC Break] radio button in the [Type] group box. • Use the [Source] window to refer to the address on the line that has ‘p_sam->s0=a[0];’ within the tutorial function and enter this address in the [Address Lo] edit box of the [Address] group box. In this example, enter H’00001082. Note: This dialog box differs according to the product.
• Close the [Event] window. • To stop the tutorial program at the breakpoint, select [Reset Go] from the [Debug] menu. The program runs until it stops at the breakpoint that has been set. Figure 6.33 [Source] Window at Execution Stop (PC Break) The [Status] window displays the following contents: Figure 6.34 Displayed Contents of the [Status] Window (PC Break) Note: The items that can be displayed in this window differ depending on the product.
6.15.2 Breaking Execution at Event Points Setting up of an event point on event channel 1 (Ch1) such that a break is triggered when the event point’s conditions have been satisfied five times is explained as an example of the use of event points. • Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed. • The breakpoint that has been previously set must be deleted.
Figure 6.36 [General] Page ([Breakpoint/Event Properties] Dialog Box) • Click the [OK] button. The [Event] window is displayed, as shown below. Figure 6.37 [Event] Window (Setting Completed) Note: The items that can be displayed in this window differ depending on the product. For the items that can be displayed, refer to section 8, Software Specifications Specific to This Product, or the online help. Select [Reset Go] from the [Debug] menu to stop the tutorial program at breakpoints.
Figure 6.38 [Source] Window at Execution Stop The [Status] window displays the following contents. Figure 6.39 Displayed Contents of the [Status] Window Refer to the [Watch] window for the value of variable i. The value is 4, indicating that the break occurred after the condition had been satisfied five times. Note: The items that can be displayed in this window differ depending on the product.
6.16 Trace Functions The trace functions of the emulator use the realtime trace buffer, which is able to store the information on up to 32,768 bus cycles. The content of this buffer, which is constantly updated during execution, is displayed in the [Trace] window. Select [Trace] from the [Code] submenu of the [View] menu to display the [Trace] window. Figure 6.
6.16.1 Displaying a Trace (when Time Stamping is not Available) The method used to specify an address as an event condition for the tracing of read/write cycles and display the trace is described below. (1) Clicking the right-hand mouse button on the [Trace] window displays a popup menu. Select [Acquisition…] from this menu to display the [Trace Acquisition] dialog box. Figure 6.
(2) Register an address as an event condition for trace acquisition. Click the [Add…] button in the [Trace Events] group box on the [General] page to display the [Breakpoint/Event Properties] dialog box. Figure 6.
(4) The event that has been set is now displayed in the [Event] combo box of the [Trace Events] group box on the [General] page of the [Trace Acquisition] dialog box. Figure 6.
(5) To enable the event condition that has been set, uncheck the [Free Trace] check box on the [General] page. This will add pages [1] to [4] to the [Trace Acquisition] dialog box. Figure 6.
(6) Select page [1] and click the [Range] radio button in the [Conditions] group box. This will display the [Range Event] combo box and the [Edit…] button. Figure 6.
(7) Select the event you have registered from the [Range Event] combo box. The event is now enabled. Click the [OK] button to complete the trace setting. Figure 6.47 [Trace Acquisition] Dialog Box (Setting Completed) (8) Make the setting such that the break occurs after the instruction at the address on the line that has ‘a[i]=j;’ within the tutorial function (H’0000105C in this example) has been executed five times (for details on this, refer to section 6.15.2, Breaking Execution at Event Points).
6.16.2 Displaying a Trace (when Time Stamping is Available) The following procedure is for obtaining and displaying, with time stamps, trace information on cycles of writing to memory locations in the specified address range. (1) Clicking the right-hand mouse button on the [Trace] window displays a popup menu. Select [Acquisition…] from this menu to display the [Trace Acquisition] dialog box (see figure 6.41, [Trace Acquisition] dialog box).
(5) The event that has been set in the [Event] combo box of the [Trace Events] group box on the [General] page of the [Trace Acquisition] dialog box is displayed. Figure 6.50 [Trace Acquisition] Dialog Box (Adding an Event) (6) To enable time stamping, select 125ns from the [Clock] combo box of the [Time Stamp] group box. Figure 6.
(7) To enable the event condition that has been set, uncheck the [Free Trace] check box on the [General] page. This will add pages [1] to [4] (see figure 6.45, [Trace Acquisition] dialog box). (8) Select page [1] and click the [Range] radio button in the [Conditions] group box. This will display the [Range Event] combo box and the [Edit…] button (see figure 6.46, [Trace Acquisition] dialog box). (9) Click the [Range Event] combo box to select the event you have registered. The event is now enabled.
(12) Remove the event points that have been set and clear the trace information. Clicking the right-hand mouse button on the [Breakpoints] window displays a popup menu. Select [Delete All] from this menu to remove all the event points that have been set. Clicking the right-hand mouse button on the [Trace] window displays a further popup menu. Select [Clear] from this menu to clear the trace information.
(4) Select R/W in the [Item] combo box and enter WR in the [Start] edit box. After that, click the [New] button. “R/W=WR” is now displayed in the [Condition] column of the [Result] list box. Figure 6.
(5) Then, select Area from the [Item] combo box and enter RAM in the [Start] edit box. After that, click the [Add] button; the new condition is now added to the “R/W=WR” display in the [Condition] column of the [Result] list box, so that it now shows “R/W=WR & Area=RAM”. This completes setting of the condition. Figure 6.
(6) To start statistical analysis of the specified condition, press the [Result] button. The number of write operations that satisfy the condition and the PTR values will be displayed. Figure 6.57 [Statistic] Dialog Box (Result of Analysis) (7) Click the [Close] button to close the [Statistic] dialog box. (8) Remove the event points that have been set and clear the trace information. Clicking the right-hand mouse button on the [Event] window displays a popup menu.
6.16.4 Function Calls This mechanism is used to only collect trace information on the function calls. (1) Make the setting such that a break occurs at the address on the line that has ‘p_sam->s0=a[0];’ within the tutorial function (H’00001082 in this example) (for details on this, refer to section 6.15.1, PC Break Function). (2) Select [Reset Go] from the [Debug] menu. Processing stops when the break condition is satisfied, and the [Trace] window then displays trace information.
6.17 Stack Trace Function The emulator uses the stack’s information to display the function call history. Notes: 1. This function can be used only when the load module that has the Dwarf2-type debugging information is loaded. Such load module is supported in H8S, H8/300 C/C++ compiler V4.0 or later. 2. For details on the stack trace function, refer to the online help. • Double-click the [Editor] column in the sort function and set a PC breakpoint. Figure 6.
6.18 Performance Measurement Function Performance measurement by the emulator is in the following modes: • • • • • Time Of Specified Range Measurement Start Point To End Point Measurement Start Range To End Range Measurement Access Count Of Specified Range Measurement Called Count Of Specified Range Measurement In this tutorial, we describe the Time Of Specified Range Measurement. 6.18.
(3) Select the line of the [Performance Analysis] window that has 1 in its [No] column and click the right-hand mouse button to display a popup menu. Select [Set…] from this popup menu to display the [Performance Analysis Properties] dialog box. Figure 6.64 [Performance Analysis Properties] Dialog Box (4) Select Time Of Specified Range Measurement from the [Measurement Method PA1] combo box. (5) The parameter settings are as follows. • Enter “sort” in the [Range Name] edit box.
(6) Click the [Settings…] button in the [Common Settings of Performance(PA1-8)] group box to display the [Common Settings of Performance(PA1-8)] dialog box. Select [PC] from the [Address Control Mode] combo box and then click the [OK] button. PC is now displayed in the [Address Control Mode] text field of the [Common Setting of Performance(PA1-8)] dialog box. Figure 6.
6.19 Monitor Function The emulator allows monitoring of the content of specified addresses in memory during execution of the user program. In this example, we monitor the content of the address range where variable a of the tutorial function is stored. (1) Select the [CPU] submenu from the [View] menu. Then selecting [Monitor Setting…] from the [Monitor] submenu displays the [Monitor Setting] dialog box. Figure 6.
(2) Set the items in the [Monitor Setting] dialog box as follows: • Enter monitor1 in the [Name] edit box. • Set the parameters in the [Options] group box as follows: (a) Use the [Locals] window to refer to the address on the line where variable a, which is defined within the tutorial function, is allocated and enter this address in the [Address] edit box. In this example, enter H’00FFEF80. (b) Enter H’50 in the [Size] edit box. (c) Select BYTE (HEX) from the [Access] combo box.
(3) Click the [OK] button to open the [Monitor] window. Figure 6.
(4) Select [Reset Go] from the [Debug] menu. When the content of the address range changes with execution, the updated values are red (i.e. the color that was selected in the [Foreground] and [Background] combo boxes). Values will be displayed in black if they have not been updated or a certain period of time has elapsed since the last update. Figure 6.
6.20 What Next? This tutorial has described the major features of the emulator and the use of the HEW. Sophisticated debugging can be carried out by using the emulation functions that the emulator offers. This provides for effective investigation of hardware and software problems by accurately isolating and identifying the conditions under which such problems arise.
Section 7 Hardware Specifications Specific to This Product This section describes the hardware specifications on the H8S/2628 E6000 emulator. 7.1 H8S/2628 E6000 Emulator Specifications The H8S/2628 E6000 emulator supports the system development using the following microcomputers: • H8S/2628 group • H8S/2615 group 7.1.
7.2 User System Interface All user system interface signals are directly connected to the MCU in the emulator with no buffering except for those listed below which are connected to the MCU through control circuits: • • • • • • • NMI RESET MD2, MD1, MD0 XTAL EXTAL STBY WAIT 7.2.1 Signal Protection All user system interface signals are protected from over- or under-voltage by use of diode arrays except for the AVcc and Vref.
PF0: Vcc CBTS3306 47 k Ω 47 Ω PF0 MCU User system interface cable Figure 7.3 User System Interface Circuit for PF0 PC0-PC7: CBTS3306 Vcc 47 k Ω PC0-PC7 MCU User system interface cable Figure 7.4 User System Interface Circuit for PC0-PC7 AN0-AN15, AVcc, AVss and Vref: AVcc User system AN0-AN15 interface cable MCU AVss 0.022 µF H8S/2628 group AVcc Vref MCU 27 kΩ 0.022 µF MCU AVss 0.022 µF 0.
7.3 Differences between MCU and Emulator When the emulator is turned on or initialized, or the system is reset, there are some differences in the initial values in some of the general registers between the MCU and the emulator as shown in table 7.2. Table 7.2 Initial Value Differences between MCU and Emulator Status Register Power-on/ initialized PC Reset vector value Reset vector value ER0 to ER6 Undefined Undefined Reset command 7.3.
Section 8 Software Specifications Specific to This Product This section describes the software specifications of the H8S/2628 E6000 emulator. 8.1 Software Specifications of the H8S/2628 E6000 Emulator Information specific to this emulator is given below. 8.1.1 Target Hardware This emulator software conforms to the H8S/2628 E6000 emulator (HS2628EPI61H). 8.1.2 Selectable Platform The debugging platform selectable in this emulator is as follows. Table 8.
8.1.3 [Configuration Properties] Dialog Box ([General] Page) Items that can be set in this dialog box are listed below. Figure 8.
[General] page [Device] Selects the MCU to be emulated. To use an MCU not included in the list, select [Custom] to specify the functions required for this MCU. See the hardware manual for details. [Mode] Selects the MCU's operating mode. [Clock] Selects the speed of the MCU’s clock. [SubClock] Selects the speed of the MCU’s sub-clock. [Timer Resolution] Selects the resolution of the timer for use in execution time measurement.
[General] page (cont) [Enable internal ROM area write] When this box is checked, writing to the internal ROM area is enabled. For the result of writing, see the [Extended Monitor] window. [User VCC Threshold] Sets the voltage level for the user system. [Down] will be displayed in [User System Voltage] of the [Extended Monitor] window when the actual user VCC of the target system is lower than the specified value.
8.1.4 [Configuration Properties] Dialog Box ([Custom] Page) Items that can be set in this dialog box are listed below. Figure 8.
[Custom Device] page [ROM] Specify the internal ROM area size. None: 48kB: Sets the internal ROM area to be 48 kbytes (H’000000 to H’00BFFF). 64kB: Sets the internal ROM area to be 64 kbytes (H’000000 to H’00FFFF). 96kB: Sets the internal ROM area to be 96 kbytes (H’000000 to H’017FFF). 128kB: Sets the internal ROM area to be 128 kbytes (H’000000 to H’01FFFF). 192kB: Sets the internal ROM area to be 192 kbytes (H’000000 to H’02FFFF).
[Custom Device] page (cont) [Modules] Check this box to validate on-chip peripherals. Enable DTC: Uses a part of the internal RAM as DTCRAM. Enable D/A Converter: Displays registers of the D/A converter in the [IO] window. The D/A converter is always available. Enable Refresh Controller: Enables the refresh controller. Enable DMAC: Enables DMAC. Enable TPU3-5: Enables TPU3 to TPU5. TPU0 to TPU2 are always available. Enable PWM14: Enables the 14-bit PWM.
8.1.5 Memory Mapping Function This emulator supports four blocks of user memory. These can be 256 kbyte or 1 Mbyte each, depending on the SIMM fitted. Each block can be placed in the address space on a 256-kbyte or 1-Mbyte boundary. The memory mapping has a granularity of H'40 (D'64) bytes. Each 64-byte block can be set to the emulation memory or external memory and can be access-prohibited, write-protected or read-write. Note: The minimum unit available for mapping is a block (64 bytes). 8.1.
(2) [Platform] Sheet Selecting the [Platform] tab on the [Status] window displays this sheet. Table 8.4 [Platform] Sheet Items [Item] Column [Status] Column Connected To: Displays emulator name (driver used). CPU Displays the target MCU name. Mode Displays the selected mode. Clock source Displays the selected clock. Subclock source Displays the selected sub-clock. Run status Displays the execution status.
8.1.7 Extended Monitor Function Selecting [View -> CPU -> Extended Monitor] or clicking the [Extended Monitor] toolbar button displays the [Extended Monitor] window. This emulator displays the following items. Table 8.6 [Extended Monitor] Window Items [Item] Column [Value] Column User Standby Displays the status of the standby pin. User NMI Displays the status of the NMI pin. User Reset Displays the status of the reset pin.
8.1.8 Signals to Indicate Bus States and Areas The following tables show examples of signals to indicate the bus states and areas that can be acquired by the emulator. Table 8.7 Bus State Signals Acquired by the Emulator Bus State Trace Display (Status) Description CPU Prefetch PROG CPU prefetch cycles CPU Data DATA CPU data access cycles Refresh REFRESH Refresh cycles DMAC DMAC DMAC cycles DTC DTC DTC cycles Other OTHER Others Table 8.
8.1.11 Trace Information Selecting [View -> Code -> Trace] or clicking the [Trace] toolbar button displays the [Trace] window. Trace information that can be acquired by the emulator and trace information items to be displayed are as listed below. [PTR] Cycle number in the trace buffer. When the most recent record is record 0, earlier record numbers go backwards (-1, -2, ...). If a delay count has been set, the cycle number where the trace stop condition has been satisfied is record 0.
8.1.12 Searching for a Trace Record While using the emulator, the [Trace Find] dialog box has the following pages: Table 8.9 [Trace Find] Dialog Box Pages Page Description [General] Sets the range for searching. [Address] Sets an address condition. [Data] Sets a data condition. [R/W] Selects the type of access cycles. [Area] Selects the area being accessed (not available when a time stamp is acquired). [Status] Selects the status of a bus (not available when a time stamp is acquired).
[Don't care]: Detects no IRQ input condition when this box is checked. [Setting]: Detects the specified IRQ input condition. [IRQ5] to [IRQ0]: 8.1.13 Select IRQ input conditions (not available when [Don’t care] has been checked). Don't care: Detects no selected IRQ input condition. High: The status of the IRQ input is high. Low: The status of the IRQ input is low. Trace Filtering Function While using the emulator, the [Trace Filter] dialog box has the following pages: Table 8.
• [IRQ5-0] page Select the status of IRQ signals. The selection is not available when a time stamp is acquired. Figure 8.4 [Trace Filter] Dialog Box ([IRQ5-0] Page) [Don't care]: Detects no IRQ input condition when this box is checked. [Setting]: Detects the specified IRQ input condition. [IRQ5] to [IRQ0]: Select IRQ input conditions (not available when [Don’t care] has been checked). Don't care: Detects no selected IRQ input condition. High: The status of the IRQ input is high.
8.2 Notes on Usage of the H8S/2628 E6000 Emulator There are the following notes on usage of the emulator. 8.2.1 Environment for Execution of the Tutorial Program To execute the tutorial program, specify “Tutorial.hws” stored in the following directory: HEW installation destination directory\Tools\Renesas\DebugComp\Platform\E6000\2628\Tutorial 8.2.2 I/O Register Differences between the Actual MCU and the Emulator In the E6000 emulator, one evaluation chip emulates several types of MCU.
8.2.6 HCAN When the CPU accesses the HCAN register and the operating frequency is 20 MHz or lower, the access counts are the same as those of the MCU. However, when the operating frequency is higher than 20 MHz, one more clock cycle is required for the CPU’s access counts. 8.2.7 Procedure for Applying the Power When the user system is connected to the emulator, apply the power of the user system and then start the emulator.
370
Appendix A Troubleshooting • I have a text file in the editor but it does not show any syntax coloring. Ensure that you have named the file (i.e. saved it) and that the [Enable syntax coloring] check box is set on the [Editor] tab of the [Options] dialog, which is launched via [Tools->Options...]. HEW checks a file group to which the file’s extension belongs and decides whether the file is colored.
372
Appendix B Regular Expressions The HEW editor allows you to include special characters in search strings when performing a find or replace operation. These characters are listed in table B.1 and are detailed in the following pages. Table B.
• Symbol: \t Meaning: This character matches the tab character. Example 1: \t8 Finds every occurrence of a tab character followed by an 8. Example 2: init\t Finds every occurrence of a tab character following “init”. • Symbol: Meaning: Example 1: Example 2: Example 3: Example 4: Example 5: Example 6: • Symbol: Meaning: [] This matches any one character or a range of single characters listed within the brackets. Brackets cannot be nested. [-] specifies a range of characters e.g. [a-z] or [0-9].
Appendix C Placeholders This appendix describes how to use the placeholders, a feature provided by several of the HEW components. C.1 What is a Placeholder? A placeholder is a special string, inserted into text, which is replaced at some subsequent time for the actual value. For example, one of the HEW placeholders is $(FULLFILE) which represents a file with a full path. Suppose that you have an editor in c:\myedit\myeditor.exe, which can take the file to edit as a parameter.
Figure C.3 Placeholder Combo Box In the fourth example, type the placeholder into the field directly. Ensure that you type the placeholder name in uppercase and that it is preceded by $( and followed by ), i.e.
C.3 Available Placeholders Table C.1 lists the placeholders and their meanings. Table C.
For example, the placeholders will be expanded as shown in table C.2. Table C.2 Placeholder Expansions (Example) Placeholder Expanded placeholder (example) $(FULLFILE) c:\hew\workspace\project\file.src $(FILEDIR) c:\hew\workspace\project $(FILENAME) file.
Note: Not all of the placeholders are relevant in every field. For example, the $(LINE) placeholder has no meaning when specifying a dependent files location. $(USERNAME), $(PASSWORD), $(VCDIR), and $(COMMENT) placeholders are acceptable only in version control. If you enter a placeholder into an edit field where it is not acceptable you might be informed. C.4 Placeholder Tips Placeholders are there to allow you to create flexible paths to the various files used by the system.
380
Appendix D I/O File Format HEW formats the [IO] window based on information it finds in an I/O Register definition file. When you select a debugging platform, HEW will look for a “.IO” file corresponding to the selected device and load it if it exists. This file is a formatted text file that describes the I/O modules and the address and size of their registers.
Comment Module definition Example: ; H8S/2655 Series I/O Register Definitions File [Modules] BaseAddress=0 Module1=Power_Down_Mode_Registers Module2=DMA_Channel_Common Module3=DMA_Channel_0 ... Module42=Bus_Controller Module43=System_Control Module44=Interrupt_Controller ... Register definition [DMA_Channel_Common] DMAWER=0xffff00 B A DMATCR=0xffff01 B A DMACR0A=0xffff02 B A DMACR0B=0xffff03 B A DMACR1A=0xffff04 B A DMACR1B=0xffff05 B A DMABCRH=0xffff06 B A DMABCRL=0Xffff07 B A ...
D.2 File format (Bit Field Supported) Each module name must be defined in the [Modules] definition section and the numbering of each module must be sequential. Each module corresponds to a register definition section and within the section each entry defines an I/O register. The user must define “FileVersion=2” at the start of the section. It means that this I/O register file is described with the version that supports the bit field.
Comment Module Example: ; H8S/2655 Series I/O Register Definitions File [Modules] FileVersion=2 BaseAddress=0 Module1=Power_Down_Mode_Registers Module2=DMA_Channel_Common Module3=DMA_Channel_0 ... Module42=Bus_Controller Module43=System_Control Module44=Interrupt_Controller ... Module definition [DMA_Channel_Common] reg0=regDMAWER reg1=regDMATCR reg2=regDMACR0A reg3=regDMACR0B reg4=regDMACR1A reg5=regDMACR1B reg6=regDMABCRH reg7=regDMABCRL dep= regMSTPCRH 7 0 Register name Bit Value ...
Appendix E Symbol File Format In order for HEW to be able to understand and decode the symbol file correctly, the file must be formatted as a Pentica-B file: 1. The file must be a plain ASCII text file. 2. The file must start with the word “BEGIN”. 3. Each symbol must be on a separate line with the value first, in hexadecimal terminated by an “H”, followed by a space then the symbol text. 4. The file must end with the word “END”.
386
Appendix F Menus Table F.1 shows GUI menus. Table F.1 GUI Menus Toolbar Button Menu Option Shortcut View Disassembly Ctrl + D Opens the [Disassembly] window. Command Line Ctrl + L Opens the [Command Line] window. Workspace Alt + K Opens the [Workspace] window. Output Alt + U Opens the [Output] window. Registers Ctrl + R Opens the [Registers] window. Memory… Ctrl + M Opens the [Memory] window. IO Ctrl + I Opens the [IO] window. Status Ctrl + U Opens the [Status] window.
Table F.1 GUI Menus (cont) Menu Option View (cont) Graphic Performance Options Toolbar Button Remarks Image… Shift + Ctrl + G Opens the [Image] window. Waveform… Shift + Ctrl + V Opens the [Waveform] window. Performance Analysis Shift + Ctrl + P Opens the [Performance Analysis] window. Debug Sessions… Opens the [Debug Sessions] dialog box to list, add, or remove the debug session. Debug Settings… Opens the [Debug Settings] dialog box to set the debugging conditions or download modules.
Table F.1 GUI Menus (cont) Menu Option Shortcut Debug Reset CPU Toolbar Button Remarks Resets the target hardware and sets the PC to the reset vector address. Go F5 Starts executing the user program at the current PC. Reset Go Shift + F5 Resets the target hardware and executes the user program from the reset vector address. Go To Cursor Starts executing the user program at the current PC until the PC reaches the address indicated by the current text cursor position.
Table F.1 GUI Menus (cont) Menu Option Shortcut Debug (cont) Halt Program Esc Memory 390 Toolbar Button Remarks Stops the execution of the user program. Initialize Disconnects the debugging platform and connects it again. Disconnect Disconnects the debugging platform. Download Modules Downloads the object program. Unload Modules Unloads the object program. Search… Searches for the specified value from the specified memory area.
Appendix G Command Lines Table G.1 lists the HEW commands. Table G.1 HEW Commands No.
Table G.1 HEW Commands (cont) No.
Table G.1 HEW Commands (cont) No.
394
Appendix H Diagnostic Test Procedure This section describes the diagnostic test procedure using the E6000 test program. H.1 System Set-Up for Test Program Execution To execute the test program, use the following hardware; do not connect the user system interface cable and user system. • E6000 emulator (HS2628EPI61H) • Host computer • The E6000 PC interface board (Select one interface board or card from the following depending on the PC interface specifications.
H.2 Diagnostic Test Procedure Using Test Program Insert the CD-R (HS2628EPI61SR supplied with the emulator) into the CD-ROM drive of the host computer, move the current directory to :\Diag with a command prompt, and enter one of the following commands according to the PC interface board used to initiate the test program: 1. PCI bus interface board (HS6000EIC01H or HS6000EIC02H) > TM2628 –PCI (RET) 2. PCMCIA interface card (HS6000EIP01H) > TM2628 –PCCD (RET) 3.
The following messages are displayed during test. This test consists of steps 1 to 19. Message Description E6000 H8S/2628 Emulator Tests Vx.x Test program start message. x.x shows the version number. Option memory board fitted? ( 1. None 2. 1MB 3. 4MB ): 1 Enter 1 because the SIMM memory module is not installed in this example. Loading driver .................................OK (Use PCI) Shows that driver software has been correctly loaded. Initializing driver ............................
3) Test Firmware RAM A) Decode Test page[H'700 - H'71f] ...............OK B) Marching test page[H'700 - H'71f] ...............OK 4) Test Trace memory Shows the results of marching test for the firmware RAM in the E6000 (normal completion). Shows the results of decoding test for the trace RAM (first half) in the E6000 (normal completion). A) Decode Test page[H'000 - H'04f](Lower 32K) ....OK B) Marching test page[H'000 - H'04f](Lower 32K) ....
8) Test Emulation RAM STEP Operation A) Step Operation ...................................OK 9) Test Keybreak A) Key Break ........................................OK 10) Test Emulation RAM Hardware Break A) GRD Break ........................................OK B) WPT Break ........................................OK C) WPT(ROM) Break ...................................OK 11) Test Internal ROM Write-Protect A) Write-Protect ....................................
16) Test PERFM G/A A) B) C) D) E) Time Measurement RESERVED Subroutine Count Timeout Function Timeout Function .................................OK Measurement .....................OK (TIMOT Bit) .....................OK (TIMOP Bit) .....................OK 17) Test Bus Monitor A) B) C) D) Register .........................................OK Parallel RAM .....................................OK SPRSEL2 ..........................................OK RAM Monitor ......................................
H8S/2628 E6000 Emulator User's Manual Publication Date: Rev.1.00, December 19, 2003 Published by: Sales Strategic Planning Div. Renesas Technology Corp. Edited by: Technical Documentation & Information Department Renesas Kodaira Semiconductor Co., Ltd. 2003 Renesas Technology Corp. All rights reserved. Printed in Japan.
H8S/2628 E6000 Emulator User’s Manual 1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 Japan REJ10B0100-0100H