Home
SH-2A, SH-2 E200F Emulator User`s Manual
Contents
1. Reference Unpack the emulator Component list Check the components against the component list Setting up the emulator Set up the emulator Section 2 Connect the optional board Install the HEW Turn on the user system Section 4 Starting the Turn on the emulator emulator Start the HEW Figure 2 1 Emulator Preparation Flow Chart 39 13 N SAS 2 2 Installing Debugger 2 2 1 CD R The root directory of the CD R contains a setup program for installing the emulator s software The folders contain the files and programs listed below Table 2 1 Contents of the CD R Directories Directory Name Contents Description 0115 Microsoft runtime library A runtime library for the High performance Embedded Workshop The version is checked at installation and this library is copied to the hard disk as part of the installation process Drivers E200F emulator driver USB drivers for the E200F emulator Help Online help for the E200F An online help file This is copied to the hard emulator disk as part of the installation process Manual E200F emulator manuals E200F emulator user s manuals They are provided as PDF files Execute Setup exe from the root directory of the CD R to start the installation wizard Follow the cues given by the installation wizard to install the software Note When a driver is installed in Windows XP a warning message on the Windows logo test may be displayed but it
2. esee 243 Analyzing Performance e mee NR CER MAY e E A 244 5 11 1 Opening the Onchip Performance Analysis Window sese 244 5 11 2 Opening the AUD Performance Analysis Window esee 246 5 11 3 Hiding the Column uem eee er ERREUR 249 5 11 4 Starting Performance Data Acquisition essere 249 5 11 5 Deleting a Measurement Condition eese 249 5 11 6 Deleting All Measurement Conditions sese 249 Viewing the Profile Information enne rennen 249 5 12 1 Stack Information Files nete rrr ro re pe 250 5 12 2 Profile Information Files esses nen ee eere 252 5 12 3 Loading Stack Information Files eseeeeeeeeeeneeee en 253 3 12 4 Enabling the Profile e ee dep repeti toc d egeo ees eo ced vag eae 254 5 12 5 Specifying Measuring Mode sse remet 254 5 12 6 Executing the Program and Checking the Results esses 254 25 12 7 Mist SHEE soient hm one nr HER nep THE 255 5 12 8 Tree Sheet rette treo Pt oe tei ve dc pe toe tinc Ras 256 5 12 9 Profile Chart Window esee eene enne 259 High performance Embedded Workshop User s Manual 5 12 10 Types and Purposes of Displayed Data esee 259 5 12 11 Creating Profile I
3. Channel eoo 14 FT 000 114 _ SUHTEUTE Figure 5 105 Driver Details Dialog Box 2 Information displayed in figure 5 105 is the information of the USB connector to which the emulators are connected Note The displayed character strings of the information depend on the host computer s environment The character strings will be longer in Windows 98SE and Windows Me Check which of the character strings of information show emulators Select no driver selected gt in the Driver drop down list box and disconnect one emulator from the USB connector After that select E7 E10 Emulator USB Driver in the Driver drop down list box Only information on the USB connector that the emulator is connected to is displayed in the Channel drop down list box The above procedures are used to discern which of the emulators are indicated by the displayed character strings of information in the Channel drop down list box 275 13 NE SAS When initiating the High performance Embedded Workshop in the Channel drop down list box select the information on the USB connector of the emulator that is connected to the master CPU Initiate the High performance Embedded Workshop using the normal procedures When initiating the slave High performance Embedded Workshop in the Channel drop down list box select the information on the USB connector of the emulator that is connected to t
4. 217 5 9 4 Specifying Conditions or Modes for Acquiring Trace Information 218 25 9 5 Hiding the Trace Colummn rrt teorie teer nera 220 5 9 6 Searching for a Trace Record ssssssssssseeeeeeeeneennen nennen 221 5 9 7 Clearing the Trace Information sese 228 5 9 8 Saving the Trace Information in a File esee 228 3 9 9 Viewing the Editor WindoW ies rte rep ia 228 5 9 10 5 cente a ike xe ae 228 5 9 11 Temporarily Stopping Trace Acquisition ee 229 5 9 12 Restarting Trace Acquisition eeesesseeseeeeeeeeeen nene emeret 229 5 9 13 Extracting Records from the Acquired Information esses 229 5 9 14 Analyzing Statistical Information essesseseeeseeeeeeeeereneeneeeen enne 237 5 9 15 Extracting Function Calls from the Acquired Trace Information 239 Viewing the Cache Contents etie vtri eeei 240 5 10 1 Opening the Cache Window esee eene 240 5 10 2 Modifying the Cache Contents sees 241 5 10 3 Flushing the Cache Contents 242 5 104 Searching the Cache Items tree 242 5 10 5 Continuing the Cache Search 243 5 10 6 Saving the Currently Displayed Contents
5. gt 0 0 0000107 _ gt 1 1 0000107 p_sam gt s2 a 2 00001082 p_sam gt s3 a 3 00001086 p_sam gt s4 a 4 0000108 p_sam gt s5 a 5 0000108 p_sam gt s6 a 6 00001092 p sam s za 7 00001096 p sam s8 a 8 0000109a p_sam gt s9 a 9 0000109e nes P sam i 000010b8 ve abort void 00001024 main void Figure 6 5 Editor Window Displaying the Source Program e Select a font and size that are legible from the Format option in the Setup menu if necessary Initially the Editor window shows the start of the user program but the user can use the scroll bar to scroll through the user program and look at the other statements 297 RENESAS 6 7 Setting an S W Breakpoint An S W breakpoint is a simple debugging function The Editor window provides a very simple way of setting an S W breakpoint at any point in a program For example to set an S W breakpoint at the sort function call e Select by double clicking the S W Breakpoints column on the line containing the sort function call amp tutorial tutorial B E C header file sbrkh sorth long a 10 stackscth I vecth dM 5 68 source file class Sample p_sam dbsctc 00001036 while 1 intpre c 00001034 p sam new Sample resetprec 00001038 for 150 1 lt 10 i Vf E 00001044 j rand ig sb
6. itte tette pert 148 Viewing the Source Code ertet Mee oet Hep kao e 149 Viewing the Assembly Language Code essere 154 5 4 1 Modifying the Assembly Language Code ese 155 5 4 2 Viewing a Specific 156 5 4 3 Viewing the Current Program Counter Address 156 Displaying Memory Contents in Realtime eese 157 5 5 1 Opening the Monitor Window eseeseeeeeeeeneeen nemen 157 5 5 2 Changing the Monitor Settings sss 159 5 5 3 Temporarily Stopping Update of the Monitor esee 159 5 5 4 Deleting the Monitor Settings eese tte nett neu nee leen 160 5 5 5 Monitoring Variables iiie eee tte 160 5 5 6 Hiding the Monitor Window eesseeeseesseeeeeenne nnne nennen nnne 160 5 5 7 Managing the Monitor Window eene eene 161 Viewing the Current itii testen stet beer th Exe 162 Reading and Displaying the Emulator Information Regularly sss 163 5 7 1 Opening the Extended Monitor Window sese 163 5 7 2 Selecting Items to be 1 1 164 Using the Eventpoints si nonet s o EE DEI Ee Itn ee
7. Size byte mon J Access Format BYTE 500 ej V Auto Refresh at rate ms D00500 v Reading the Initial Value Color Change Indicator Chanee Foreground m Background v Mayfly Detail DETAIL NOT SUPPORTED Detail History Figure 5 18 Monitor Setting Dialog Box 157 RENESAS 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 Reading the Initial Value Sets the interval for acquisition by monitoring Selects reading of the values in the monitored area when the monitor window is opened Color Sets the method to update monitoring and the attribute of colors Change Indicator Foreground Background Mayfly Selects how to display the values that have changed during monitoring available when Reading the Initial Value has been selected No change No color change Change Color is changed according to the Foreground and Background options Gray Those data with values that have not been changed are displayed in gray Appear A value is only displayed after changed Sets the color used for display available when Change has been selected Sets the backgroun
8. Break Breaks after conditions have been matched Trace Enables Trace option and sets the external bus trace operation Trace start Starts external bus trace after conditions have been matched Trace stop Stops external bus trace after conditions have been matched Trace get Acquires external bus trace after conditions have been matched 198 RENESAS 7 Sequential BUS Event dialog box The sequential bus event occurs when all the BUS Eventpoint conditions are satisfied in the specified order Bus event channel Chl can be specified as the reset point When the reset point is passed the satisfied eventpoint condition is disabled and checking the first eventpoint condition is started Sequential BUS Event r Channel select Channel 3 gt 2 C Channel 4 gt 3 gt 2 C Channel 5 gt 4 gt 3 gt 2 C Channel 6 gt 5 gt 4 gt 3 gt 2 Sequential reset Disable C Enable Action Break Trace stop Figure 5 48 Sequential BUS Event Dialog Box Don t care Sets no Sequential BUS Event condition Channel select Specifies the order that the Sequential BUS Event is satisfied Channel 3 gt 2 After conditions have been matched in the order of bus event channel 3 2 a Sequential BUS Event occurs Channel 4 gt 3 gt 2 After conditions have been matched in the order of bus event channel 4 gt 3 gt 2 a Sequential BUS Ev
9. End Result Figure 5 73 Statistic Dialog Box Statistic Analysis 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 Start Sets the input value or character string To set a range the start value must be specified here 237 RENESAS End Specify the end value if a range has been set only available when Range has been selected Set Adds a new condition to the current one New Creates a new condition Result button Obtains the result of statistical information analysis Clear Initializes the settings Result list box Clears all conditions and results of statistical information analysis Close Closes this dialog box All the results displayed in the Result list will be cleared 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 In analysis of statistical information character strings
10. Selects the type of trace function I Trace Selects the internal trace function AUD function Selects the AUD trace function I Trace mode Sets the mode when the internal trace function is used Type When checked the bus and branch are selected and set as the condition for acquiring trace Acquisition When those boxes are checked only the internal information that matches the checked condition are acquired When trace buffer full Selects the operation when the trace buffer becomes full Trace continue Overwrites the old trace information to acquire the latest trace information Trace stop Acquires no information Break A break occurs AUD mode Sets the mode when the AUD trace function is used Branch trace When checked the branch source and destination addresses are set as the condition Window trace Uses the window trace function When this box is checked information on memory accesses within the specified range is acquired AUD mode 1 Selects the operating mode for consecutive trace acquisition Realtime trace Some trace information are not acquired Non realtime trace The CPU stops operations until the acquisition is completed AUD mode 2 Selects the operation when the trace buffer becomes full Trace continue Overwrites the old trace information to acquire the latest trace information Trace stop Acquires no information Break A break occurs AUD mode 3 Sets the m
11. Sets the calling destination address of the write erase module It must be RAM address All erasing module address Enters the calling destination address of the erase module Writing module address Enters the calling destination address of the write module Access size Selects the access size of the RAM area that is used for loading the write erase module 143 13 N SAS 5 1 8 Opening the Memory Mapping Dialog Box Selecting Setup gt Emulator gt Memory Resource or clicking the Emulator Memory Resource toolbar button opens the Memory Mapping dialog box Memory Mapping Mapping Trace Unit Map Emulation memor Unit Map 5 18000000 1BFFFFFF USER Edit Raa Reset Reset An Figure 5 8 Memory Mapping Dialog Box 144 13 N SAS This dialog box displays the current memory map and the state of the emulation memory Edit Displays the Edit Memory Mapping dialog box allowing the user to modify the address range and attributes of a memory map Reset Resets the map memory to its default settings Reset AII Resets all the memory map to its default settings Close Closes the dialog box The memory configuration of the device being emulated is shown on the Memory sheet of the Status window Notes 1 When the external bus trace unit or emulation memory unit is not connected to the emulator this page is not displayed 2 The items
12. e Move to the change function following the procedures described in section 6 15 1 Executing Step In Command e 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 on the toolbar 315 NE SAS 316 00001036 00001034 00001038 00001044 00001048 00001050 00001058 00001068 00001070 00001076 B0000107a 0000107 00001082 00001086 0000108 0000108 00001092 00001096 0000109a 0000109 000010b Figure 6 27 Step Over Button while C11 p sam new Sample for iz0 i lt 10 i j rand Ifc 0 J ali j P sam sort a p_sam gt changela P sam s a 0 p_sam gt sl al1 P sam s2 a 2 P sam s3 a 3 P sam s a 4 P sam sb a 5 P sam sB a 5 pP sam s a 7 P sam s8 a 8 p_sam gt s9 a 9 delete p_sam i Hans abort void Figure 6 28 HEW Window Step Over RENESAS 6 16 Forced Breaking of Program Executions The High performance Embedded Workshop can force a break in the execution of a program e Cancel all breaks e To execute the remaining sections of the main function select Go from the Debug menu or the Go button on the toolbar Figure 6 29 Go Button e 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 30
13. thi23 Dontcre x a Ch45 Dontcae H wer on reset Apply Figure 5 30 Combination action Dialog Box Ch 4 5 Combo Box 172 RENESAS b Select a condition from the followings Don t care Break Ch 3 2 1 Break Ch 3 2 1 Reset point Break Ch 2 1 Break Ch 2 1 Reset point I Trace stop Ch 3 2 1 I Trace stop Ch 3 2 1 Reset point I Trace stop Ch 2 1 I Trace stop Ch 2 1 Reset point Ch 2 to Ch 1 PA Ch 1 to Ch 2 PA I Trace Ch 4 to Ch 5 PtoP I Trace Ch 4 to Ch 5 PtoP Power on reset a Indicates the channel name for setting conditions Sets no condition A break occurs when the conditions on channels 3 2 and 1 are satisfied in this order A break occurs when the conditions on channels 3 2 and 1 are satisfied in this order This condition is reset when the reset point condition is satisfied A break occurs when the conditions on channels 2 and 1 are satisfied in this order A break occurs when the conditions on channels 2 and 1 are satisfied in this order This condition is reset when the reset point condition is satisfied Trace acquisition stops when the conditions on channels 3 2 and 1 are satisfied in this order Trace acquisition stops when the conditions on channels 3 2 and 1 are satisfied in this order This condition is reset when the reset point condition is satisfied Trace acquisition stops when the conditions on channels
14. 1 2 3 4 Turn on the user system 5 Turn on the emulator 6 Select Renesas gt High performance Embedded Workshop gt High performance Embedded Workshop from Programs in the Start menu f li High performance Embedded Workshop Accessories gt A Renesas AutoUpdate High performance Embedd ks ey Documents 4 Startup gt amp Renesas Tools HomePage High performance Embedded Workshop Help Eh eum 5 internet Explorer 0 High performance Embedded Workshop Read Me seid e Outlook Express C Search Q E oae Shut Down ot A wv E a gt lt Ld i Figure 4 1 Start Menu Note The High performance Embedded Workshop gt Tools is not displayed depending on the user s environment 89 RENESAS 7 The Welcome dialog box is displayed Welcome ptions C Open a recent project workspace OK Cancel Administration z Bk Browse to another project workspace Figure 4 2 Welcome Dialog Box Create a new project workspace radio button Open a recent project workspace radio button Browse to another project workspace radio button Creates a new workspace Uses an existing workspace and displays the history of the opened workspace Uses an existing workspace this radio button is used when the history of the opened workspace does not remain To use a workspace for the tutorial select
15. 8 9 Setting the Debugger Options dialog box The setting for using the emulator has been registered in this session file After the session file name is selected the emulator will automatically be connected For details on the session file refer to section 4 4 Debug Sessions 4 6 Reconnecting the Emulator When the emulator is disconnected use the following way for reconnection Select Build gt Debug Connect or click the Connect toolbar button c The emulator is connected Note The emulator must be selected in the Target drop down list box of the Debug Settings dialog box see figure 4 32 Debug Settings Dialog Box Target Page that is opened by selecting Debug settings from the Options menu 4 7 Ending the Emulator When using the toolchain the emulator can be exited by using the following two methods e Canceling the connection of the emulator being activated e Exiting the High performance Embedded Workshop 1 Canceling the connection of the emulator being activated Select Disconnect from the Debug menu or click the Disconnect toolbar button m 2 Exiting the High performance Embedded Workshop Select Exit from the File menu A message box is displayed If necessary click the Yes button to save a session After saving a session the High performance Embedded Workshop exits If not necessary click the No button to exit the High performance Embedded Workshop 122 13 N
16. tete 30 1 3 6 Performance Measurement Function sees eene 31 1 3 7 Coverage Function 34 1 3 8 Memory Access Functions eie ie cr iie reet e Eee Fee epson 34 1 3 9 Stack Trace Function eie endete Ue de ER ede Ee ni exea 36 1 3 10 User interrupt Open Function during User Program Break 36 1 3 11 Online Helpline ttr DU aap te dots 37 1 4 Environmental Conditions iis eee ree ere eto Oe 37 Section 2 Setting Up the EFulator uae eet 39 2 1 Flow Chart before Using the Emulator eese eere 39 2 2 Installing Deb gger cete nd Cernere etit Inh CHR be apta Re Deve epe ea oca lubes 40 2 251 CIDER M 40 2 3 Connecting the Optional Units to the Emulator Main Unit Case esee 41 2 3 1 Connecting the E200F External Bus Trace Unit to the User System 41 2 3 2 Connecting the E200F Emulation Memory Unit to the Emulator Main Unit 45 2 3 3 Connecting the Emulation Memory Unit to the User 47 2 3 4 Connecting the E200F External Bus Trace Unit Emulation Memory Unit and USEL EIDIE 48 2 3 5 Connecting the
17. 00000064 00001178 00000014 00001138 0000002 000010020 00000000 00001024 00000094 00001000 00000024 _ Reset PC Sample sort long Sample Sarmple divlu 00001370 _malloc _free _rand operator newlunsigned operator delete void CALL INIT INITSCT main oooo0c 0c 0c 0c 0c cc Cc 00 F E F F F F F F F F F F F F Figure 5 89 List Sheet Clicking the column header sorts the items in an alphabetical or ascending order Double clicking the Function Variable or Address column displays the source program corresponding to the address in the line Right clicking on the mouse within the window displays a pop up menu For details on this pop up menu refer to section 5 12 8 Tree Sheet 255 RENESAS 5 12 8 Tree Sheet This sheet displays the relation of function calls along with the profile data that are values when the function is called This sheet is available when Disable Tree Not traces function call is not selected from the pop up menu in the Profile window B C Program Files Renesas Hew T a main 00001024 00000094 00000000 O PowerON Reset PC 00000800 0000002 00000000 G INITSCT 00001020 00000000 00000000 H INITSCT 00001000 00000000 H 00000000 CALL INIT 00001138 0000002 00000000 8 main 00001024 00000094 00000000 Sample Sample 00002000 0000002 H
18. Note The master High performance Embedded Workshop can initiate multiple slave High performance Embedded Workshop applications but slave High performance Embedded Workshop applications cannot be nested no slave High performance Embedded Workshop can initiate another slave High performance Embedded Workshop When selecting Renesas High performance Embedded Workshop gt High performance Embedded Workshop from Programs in the Start menu to initiate another High performance Embedded Workshop two emulators can be used separately for debugging 273 13 N SAS 5 14 1 Distinguishing Two Emulators Connect two emulators to the USB connector Then initiate the High performance Embedded Workshop using the tutorial workspace The following message is displayed CERES x Please choose driver Figure 5 103 Message for Driver Selection Click the OK button The following dialog box will appear Driver Details Driver lt no driver selected Details Interface Channel v Gontieuration SG IHEUTE Figure 5 104 Driver Details Dialog Box 1 274 13 NE SAS Select E7 E10 Emulator USB Driver from the Driver drop down list box and open the Channel drop down list box Channel information for two emulators is displayed in the Channel drop down list box as shown below Driver Details Driver E7 E10 Emulator USB Driver Details Interface USB interface
19. Software SystemBus Count Delay and Action pages The combination of the conditions set in each page is set as the detection condition of eventpoints 177 13 N SAS 1 General page Specifies AUD trace information used to set the AUD Eventpoint condition Ch2 Delay General Branch Count Delay Action AUD function data Branch trace data Window trace data Software trace data Cancel Apply 4 Figure 5 33 Chx Delay Dialog Box General Page Branch trace data Sets the eventpoint condition according to the branch trace information Window trace data Sets the eventpoint condition according to the window trace information Software trace data Sets the eventpoint condition according to the software trace information 178 RENESAS 2 Branch page Specifies the type and address conditions of the branch trace Ch2 Delay General Branch Count Delay Action Branch type Source Destination Source C Destination Address Don t care C Address Ra Start 9100000000 End 00000000 Outside E Figure 5 34 Chx Delay Dialog Box Branch Page Branch type Sets branch types Source Destination Sets no branch type Source Sets the branch source address condition Destination Sets the branch destination address condition Address Sets address conditions Don t care
20. Emulation mode Normal Endian Big Platform Events Figure 6 12 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 the online help 303 RENESAS 6 10 Reviewing Breakpoints The user can see all the breakpoints set in the program in the Event window e Select Eventpoints from the Code submenu of the View menu The Event window is displayed Select the Breakpoint sheet Breakpoint Enable Address 00001068 tutorial cpp 45 Break Figure 6 13 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 304 RENESAS 6 11 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 ppp Address name oooo00000 _RESET Vectors 00000010 INT Vectors 00000800 PowerON Reset PC o000082 Manual Reset PC 000008 44 INT Illegal code 00000848 _Dummy 00001000 _sbrk 00001024 _main 00001088 abort 000010 0 INITSCT 00001138 CALL INIT 00001164 CALL END 00001178 operator delete void 0000118 operator newlunsigned long 000011F0 _rand 0
21. H 0001 B OO00000 H O0000000 H O00000000 H 00000000 H 00000000 H O0000000 H 0002 B 000000 H O0000000 H 00000000 H 00000000 H 00000000 00000000 H 0003 B O000000 H O0000000 H 00000000 H 00000000 H 00000000 H O0000000 H 0004 000000 H O0000000 H 00000000 H O00000000 H O0000000 H O0000000 H 0005 B O00000 H O0000000 H 00000000 H 00000000 H O0000000 00000000 H 0006 B O00000 H O0000000 H 00000000 H 00000000 H O0000000 H O0000000 H 0007 B o00000 H O00000000 H 00000000 H 00000000 H O0000000 H 0008 B 000000 H O00000000 H 00000000 H 00000000 H o0000000 H 0009 B 000000 H 00000000 H 00000000 H 00000000 H O0000000 000 B O00000 H O0000000 H O00000000 H O00000000 H O0000000 00000000 H OOOB B o00000 H O0000000 H 00000000 H o0000000 H O0000000 H O0000000 H oooc B o00000 H O0000000 H oo000000 H o0000000 H O0000000 H O0000000 H oooD B o00000 H O0000000 H 00000000 H o0000000 H O0000000 H O0000000 H OOOE B OO00000 H O0000000 H o0000000 H 00000000 H o0000000 H O0000000 H Oo0000000 H oo0000000 3X H O0000000 3X H O0000000 Figure 5 75 Cache Window Choose View CPU Cache or click the Cache toolbar button to open the Select Cache dialog box figure 5 76 for selecting the cache window type to be displayed Gache Type Instruction Cache Figure 5 76 Select Cache Dialog Box 240 RENESAS This dialog box selects t
22. Profile window Choose Enable Profiler from the pop up menu of the Profile window The item on the menu will be checked 5 12 5 Specifying Measuring Mode You can specify whether to trace functions calls while profile data is acquired When function calls are traced the relations of function calls during user program execution are displayed as a tree diagram When not traced the relations of function calls cannot be displayed but the time for acquiring profile data can be reduced To stop tracing function calls choose Disable Tree Not traces function call from the pop up menu in the Profile window a check mark is shown to the left of the menu item When acquiring profile data of the program in which functions are called in a special way such as task switching in the operating system stop tracing function calls 5 12 6 Executing the Program and Checking the Results After the user program has been executed and execution has been halted the results of measurement are displayed in the Profile window The Profile window has two sheets a List sheet and a Tree sheet 254 13 N SAS 5 12 7 List Sheet This sheet lists functions and global variables and displays the profile data for each function and variable 00000800 0000002 00002028 00000080 00002000 0000002 00001468 00000000 00001370 00000000 00001280 00000000 0000121 H OO0000000 00001180 0000002 0000118
23. RESET signal Dialog Box When the Ignore button is clicked the emulator issues a reset in the CPU for initiation However this method is unavailable for some products For details refer to section 3 Software Specifications when Using the SHxxxx in the additional document Supplementary Information on Using the SHxxxx 3 When Connected is displayed in the Output window of the High performance Embedded Workshop the emulator initiation is completed x Connected E Find in Files Figure 4 10 Output Window 95 13 N SAS e Debugging with a connection to the EV chip unit 1 The dialog box is displayed as shown in figure 4 11 Select Emulation Select Emulation Device 5 r Operating mode Select Mode cso 32bit mode C User system Mode Clock Emulator Internal Clock 10 0 MHz a gt User system clock Clock Mode Select Clock Mode mode2 PLL x4 User system Clock Mode m SSCGMD Select SSCGMD ssca OFF User system SSCGMD Figure 4 11 Select Emulation Dialog Box Make the required settings for the EV chip unit Select the settings to be used and click the OK button 96 RENESAS Note The items that can be set in this dialog box depend on the emulator in use For details refer to the online help 2 When Connected is displayed in the Output window of the High performance Embedded Wor
24. The trace buffer pointer 0 for the last executed instruction IP The amount of acquired trace information Master Bus Master Type of bus master accessed Type Type of trace information BRANCH Branch source DESTINATION Branch destination MEMORY Memory access S TRACE Executed Trace x function LOST Lost trace information only in the realtime mode Branch Type Type of branch only when the branch trace is acquired GENERAL General branch SUBROUTINE Subroutine branch EXCEPTION Exception branch 208 13 N SAS Bus R W Address Data Instruction Source Label The bus which was being accessed Whether the generated data is associated with read or write access Address The data of the generated data access When Type is S_TRACE value x a variable of function Trace x is displayed Instruction mnemonic The or assembly language source program Label information 13 N SAS 209 2 Acquiring AUD Trace Information AUD trace Selecting the Set menu in the popup menu of the Internal AUD window displays the I Trace AUD Trace acquisition dialog box When AUD trace is selected in Trace Type within the dialog box the trace information is acquired by using the AUD trace function Type Address Data 000173 000164 MEMORY OOOOFFCO 00005010 000172 000163 MEMORY OOOOFFCO 00005010 000171 000162 Lost 000170 000161 MEMORY OODOFFCB OOOOSBAF 0001
25. When the left of the list is checked the Monitor window is being displayed Selecting items of the Monitor window you want to hide from the monitor setting list displays no Monitor window and removes the check mark at the left of the list To display the Monitor window again select the hidden the Monitor window Monitor d 22 Monitor Setting Shift4 Ctrl E v monitor2 HOOFFBOSO monitori H ODFFBOOO heap area Windows Select Figure 5 20 Monitor Setting List 160 N SAS 5 5 7 Managing the Monitor Window Selecting Display gt CPU gt Monitor gt Windows Select displays the Windows Select dialog box In this window the current monitoring condition is checked and the new monitoring condition is added edited and deleted in succession Selecting multiple monitoring conditions enables a temporary stop of update hiding and deletion Windows Select Name Address monitor2 monitori H OOFFBO _ Edit Lock Refresh Hide Remove Close Figure 5 21 Windows Select Dialog Box 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
26. elements FFFSEFB4 long 10 00000000 FFFSEFB4 long 000053 FFFOEFBB long 00002704 FFFOEFBC long 00005665 FFFOEFCO long H O0000daa FFFOEFCA long H 0000421f FFFOEFC8 long H OO0003ead FFFOEFCC long H OO004did FFFOEFD long 00002 5 FFFOEFD4 long H D00020da FFFOEFD8 long H O000000a R13 int Figure 6 21 Watch Window Displaying Array Elements 310 RENESAS 6 14 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 main function which declares four local variables a j i and p_sam e 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 Note however that the Locals window is initially empty because local variables are yet to be declared Value Type FFFOEFB4 long 10 000020 amp R5 long H O000000a R13 int OxO000053d8 R11 class Sample Figure 6 22 Locals Window e Click mark at the left side of array a in the Locals window to display the elements e Refer to the elements of array a before and after the execution of the sort function and confirm that random data is sorted in descending order 311 13 N SAS 6 15 Ste
27. or Access of the popup menu 5 5 3 Temporarily Stopping Update of the Monitor During user program execution the display of the Monitor window is automatically updated according to the auto update interval Select Lock Refresh from the popup menu of the Monitor window to stop the update of display The characters in the address section are displayed in black and the update of display is stopped Selecting Lock Refresh again from the popup menu cancels the stopped state 159 13 NE SAS 5 5 4 Deleting the Monitor Settings Selecting Close from the popup menu of the Monitor window to be deleted closes the Monitor window and deletes the monitor settings 5 5 5 Monitoring Variables Using the Watch window refers to the value of any variables When the address of the variable registered in the Watch window exists within the monitoring range that has been set by the Monitor function the value of the variable can be updated and displayed This function allows checking the content of a variable without affecting the realtime operation 5 5 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 gt CPU gt Monitor The list consists of the Monitor window name and the address to start monitoring
28. specified such as Up to 1000 breakpoints can be specified The contents to be set differ depending on the product For details refer to the on line help for each product When Value is selected if an overloaded function or class name including a member function is specified in address the Select Function dialog box opens Clicking the OK button sets the specified breakpoint conditions Clicking the Cancel button closes this dialog box without setting the break conditions 169 13 NE SAS 5 8 5 Setting Onchip Eventpoints On the Onchip Event sheet the settings for Onchip Eventpoints are displayed and modified Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Reset point 4 T y Breakpoint Onchip Event AUD Event Other Event A BUS Event Figure 5 27 Event Window Onchip Event Sheet Since the number of event detection channels and the contents to be set differ depending on the product refer to the online help for each product Items that can be displayed in the sheet are listed below Type On chip event channel number and type State Whether the eventpoint is enabled or disabled Condition A condition that satisfies an eventpoint The displayed contents differ depending on the channel Action Operation of the emulator when an eventpoint condi
29. 00000000 Sample sort long 0000202 00000080 00000000 _ 000011F0 0000002 00000000 operator delete void 00001178 00000014 H 00000000 RP ABO m o QOO D O G OG 0 0 0 0 0 0 0 0 0 0 Figure 5 90 Tree Sheet Double clicking a function in the Function column expands or reduces the tree structure display The expansion or reduction is also provided by or key Double clicking the Address column displays the source program corresponding to the specific address Right clicking on the mouse within the window displays a pop up menu Supported menu options are described in the following e View Source Displays the source program or disassembled memory contents for the address in the selected line e View Profile Chart Displays the Profile Chart window focused on the function in the specified line e Enable Profiler Toggles acquisition profile data When profile data acquisition is active a check mark is shown to the left of the menu text 256 13 N SAS e Not trace the function call Stops tracing function calls while profile data is acquired This menu is used when acquiring profile data of the program in which functions are called in a special way such as task switching in the operating system To display the relation of function calls in the Tree sheet of the Profile window acquire p
30. 2 connect the signals to the user system refer to the additional document Supplementary Information on Using the SHxxxx 44 RENESAS 2 3 2 Connecting the E200F Emulation Memory Unit to the Emulator Main Unit Open the cover of TRACE I F on the side of the main unit case Connect the trace cable provided for the external bus trace unit to the emulator as shown in figure 2 5 Figure 2 5 Connecting the Trace Cable to E200F 45 RENESAS Connect the emulation memory unit to the trace cable side Figure 2 6 Connecting the Trace Cable to the Emulation Memory Unit 46 RENESAS 2 3 3 Connecting the Emulation Memory Unit to the User System e After checking the location of pin 1 connect the user system to the emulation memory unit Figure 2 7 Connecting the User System to the Emulation Memory Unit CAUTION Check the location of pin 1 before connecting Notes 1 Connection of the signals differs depending on the MCU used 2 For connecting signals refer to the additional document Supplementary Information on Using the SHxxxx 47 RENESAS 2 3 4 Connecting the 200 External Bus Trace Unit Emulation Memory Unit and User System e When the external bus trace unit is used with the emulation memory unit firstly connect the external bus trace unit to the emulation memory unit figure 2 8 and then to the user system figure 2 10 External bus trace unit Emulation me
31. 2 and 1 are satisfied in this order Trace acquisition stops when the conditions on channels 2 and 1 are satisfied in this order This condition is reset when the reset point condition is satisfied After the condition on channel 2 is satisfied the emulator analyzes the performance until the condition on channel 1 is satisfied After the condition on channel 1 is satisfied the emulator analyzes the performance until the condition on channel 2 is satisfied After the condition on channel 4 is satisfied the emulator acquires trace information until the condition on channel 5 is satisfied After the condition on channel 4 is satisfied the emulator acquires trace information until the condition on channel 5 is satisfied A power on reset validates this condition Set the event condition for each channel in the Event Condition dialog box 173 13 NE SAS Usage Example of Sequential Break Extension Setting A tutorial program provided for the product is used as an example For the tutorial program refer to section 6 Tutorial The conditions of Event Condition are set as follows 1 Chl Breaks address H 00001086 when the condition Prefetch address break after executing is satisfied Ch2 Breaks address H 00001068 when the condition Prefetch address break after executing is satisfied Ch3 Breaks address H 00001058 when the condition Prefetch address break after executing is satisfied Note Do not set other cha
32. 24 Editor Window Step In e The highlighted line moves to the first statement of the sort function in the Editor window 313 RENESAS 6 15 2 Executing 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 e To step out of the sort function select Step Out from the Debug menu or click the Step Out button on the toolbar Note It takes time to execute this function When the calling source is clarified use Go To Cursor Figure 6 25 Step Out Button 314 13 N SAS 00001036 while 1 00001034 p_sam new Sample 00001038 for i70 1 10 itt Jf 00001044 j rand 00001048 if j lt of 00001050 j j i 00001058 ali j 00001068 e p_sam gt sort a 00001070 P sam change a 00001076 p_sam gt s0 a 0 0000107 p_sam gt sl al1 0000107 P sam s2 a 2 00001082 p_sam gt s3 a 3 00001086 p_sam gt s4 a 4 0000108 P sam sb a 5 0000108 p_sam gt s6 a 6 00001092 P sam s a 00001096 P sam s8 a 8 0000109a p_sam gt s9 a 9 0000109 rem P sam 000010b8 DM abort void Figure 6 26 HEW Window Step Out The data of variable a displayed in the Watch window is sorted in ascending order 6 15 3 Executing Step Over Command The Step Over command executes a function call as a single step and stops at the next statement of the main program
33. 8 Probe Head Front View a H UDI port connector This connector is used when the emulator is used as the on chip for user system debugger the same as that of the 36 pin EI0A USB RENESAS Storing the Probe Head Figure 1 9 Storing the Probe Head a Base unit for placing the base unit when the emulator is placed vertically The probe head emulator vertically can be stored when the emulator is not in use RENESAS EV chip Unit Optional Upper View ROES72060VKK00 0 Figure 1 10 EV chip Unit Optional Upper View a External bus trace unit connector 1 b External bus trace unit connector 2 c Probe head connector 2 Connectors for connecting the external bus trace unit When only the EV chip is used connect the optional trace cable Connectors for connecting the external bus trace unit When only the EV chip is used these connectors are not used Connector for connecting the probe head 13 RENESAS EV chip Unit Optional Rear View Figure 1 11 EV chip Unit Optional Rear View a User system interface Connectors for the user system interface They are connected to connectors the user system interface board that supports a package or the dedicated connectors on the user system 14 13 N SAS External Bus Trace Unit Optional Upper View ce 2 o lt a un lt 4 x Figure 1 12 External Bus Trace Unit Optional Upper View a Trace c
34. AUD pin e Set AUD function of Trace type in the I Trace AUD Trace acquisition dialog box e Select the Window trace and Channel A check boxes e Select the Window trace page In the Channel A group box set Read Write for Read Write H 1000 for Start address H 1OFF for End address and M BUS for Bus state e Click the OK button in the I Trace AUD Trace acquisition dialog box 338 13 N SAS Internal AUD acquisition Trace mode Window trace AUD Branch trace Channel amp Read write Read White Start address End address 0 Bus state M BUS Channel B Read Write C Head C Writely Write Start address address Bus state I BLIS m Figure 6 48 Setting the I Trace AUD Trace acquisition Dialog Box Window trace Page 339 RENESAS b Setting the trace acquisition mode Select the Trace mode page of the I Trace AUD Trace acquisition dialog box Click this dialog box with the right hand mouse button and select Settings from the popup menu to display the I Trace AUD Trace acquisition dialog box The AUD trace acquisition condition is set I Trace AUD Trace acquisition Trace mode Window trace AUD Branch trace r Trace type C Trace AUD function r I Trace mode Type Acquisition v Read write v relative addressing v Branch Data access cry F D
35. Big vv Platform Events Figure 6 39 Displayed Contents of the Status Window Onchip Event Ch1 Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help 327 RENESAS 6 18 2 Setting the Sequential Onchip Eventpoint The sequential break is enabled by the combination of Onchip Eventpoints Set the satisfaction conditions of Onchip Eventpoint as follows Ch1 IA OA When an address of the column including p_sam gt sort a of the main function is accessed in a read cycle a break condition is satisfied Ch2 IA OA DT CT When an address of the column including a i j ofthe main function is accessed in a read cycle a break condition is satisfied Follow the setting method described in the previous section To set these eventpoints as sequential e Select Combination action from the popup menu by clicking the Event window with the right hand mouse button The Combination action dialog box will open Combination action Setting Ch 123 Break Ch 2 1 Ch 45 Don t care Figure 6 40 Combination action Dialog Box Note The items that can be displayed in this dialog box differ depending on the product For the items that can be displayed refer to the online help 328 13 N SAS e Select Break Ch2 1 in Ch1 2 3 and click the OK button e Activate the condition of Event Condition 1 from t
36. Box 2 Select the session you want to use from the Current session drop down list 3 Click the OK button to set the session 116 RENESAS 4 4 2 Adding and Removing Sessions A new session can be added by copying settings from another session or removing a session e To add a new empty session 1 Select Options gt Debug Sessions to display the Debug Sessions dialog box figure 4 34 Click the Add button to display the Add new session dialog box figure 4 35 Check the Add new session radio button Enter a name for the session Click the OK button to close the Debug Sessions dialog box This creates a file with the name entered in step 4 If a file with this name already exists an error is displayed Qv QA uper Add new session Add new session Name Cancel Use an existing session file Name Tutorial Session file path Browse Open and maintain link to session file Make session file link read only Figure 4 35 Add new session Dialog Box 117 131 N SAS e To import an existing session into a new session file 1 Select Options gt Debug Sessions to display the Debug Sessions dialog box figure 4 34 Click the Add button to display the Add new session dialog box figure 4 35 Check the Use an existing session file radio button Enter a name for the session Ch eS ue tS Enter the name of an existi
37. Box Bus 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 227 RENESAS 5 9 7 Clearing the Trace Information When Clear is selected from the popup menu the trace buffer that stores the trace information becomes empty 5 9 8 Saving the Trace Information in a File Select Save from the popup menu to open the Save As file dialog box which allows the user to save the information displayed in the Trace window as a text file A range can be specified based on the PTR number saving the complete buffer may take several minutes Note that this file cannot be reloaded into the Trace window Note In filtering of trace information the range to be saved cannot be selected AII the trace information displayed in the Trace window after filtering will be saved Select a filtering range on the General page in the Trace Filter dialog box if you want to save the selected range For details on the filtering function refer to section 5 9 13 Extracting Records from the Acquired Information 5 9 9 Viewing the Editor Window The Editor window corresponding to the selected trace record can be displayed in the following two ways e Select a trace record and choose View Source from the popup menu e Double click a trace record The Editor or Disassembly window o
38. Code submenu of the View menu The Trace Window Type dialog box is displayed Trace Window Type Figure 6 51 Trace Window Type Dialog Box Select BUS trace and click the OK button The BUS trace window will appear 341 RENESAS 1 External bus trace function This function is enabled when the external bus pins of the MCU are connected to the emulator The methods to acquire the external bus trace are described below a Setting the bus trace Set the multiplexed state of the bus pins or the connected memory referring to section 2 5 2 External Bus Trace Break Function b Setting the trace acquisition mode Click the BUS trace window with the right hand mouse button and select Acquisition from the popup menu to display the BUS acquisition dialog box Set the acquisition mode for the external bus trace as shown in figure 6 52 342 13 N SAS BUS acquisition Trace Mode r Trace type BUS trace r BUS buffer over flow Trace continu Trace stop Break BUS trace mode v Enable free trace Time stamp clock 20ns m Trace display range Start pointer 255 End pointer po Figure 6 52 BUS acquisition Dialog Box 343 RENESAS c Setting the trace acquisition condition The following is an example of setting the address condition For setting other trace conditions refer to section 5 8 Using the Eventpoints Select and double click Ch3
39. Disable to Enable e The first point display in the Condition line changes from None to Address H xxxxxxxx pc Break e Set the program counter and stack pointer values PC H 00000800 and R15 H FFF9F000 that were set in section 6 8 Setting Registers in the Register window Click the Go button e If program execution is failed reset the device and execute again the procedures above The program runs and then stops at the condition specified under event channel 1 00001024 ug main void long a 10 long j int i class Sample p sam 00001036 while 1 00001034 p sam nev Sample 00001038 for 120 1 lt 10 00001044 j rand 00001048 lt of 00001050 J 2 j 00001058 ali j 00001068 pP sam sort a 00001070 P sam chanze a 00001076 p_sam gt s0 a 0 0000107a pP sam sl a 1 0000107e p_sam gt s2 a 2 00001082 p_sam gt s3 a 3 00001086 p_sam gt s4 a 4 0000108 P sam s5 a 5 0000108 p_sam gt s6 a 6 00001092 P sam s a 7 00001096 p_sam gt s8 a 8 o000109a P sam s9 a 9 0000109 lete p sam 000010b8 abort void Figure 6 38 Editor Window at Execution Stop Onchip Eventpoint Channel 1 326 13 N SAS The Status window displays the following contents SHXXX E200F SYSTEM E7 E10 Emulator USB Driver SHXXX Ready Cause of last break BREAK KEY Run time count DOh O2min 24s 808ms OS8us 700ns Emulation mode Hardware break disable
40. Figure 5 17 Set Address Dialog Box Enter the address or label name in the Address edit box and either click on the OK button or press the Enter key A label name can also be specified as the address The Disassembly window will be updated to show the code at the new address When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function 5 4 3 Viewing the Current Program Counter Address Wherever you can enter an address or value into the High performance Embedded Workshop you can also enter an expression If you enter a register name prefixed by the hash character the contents of that register will be used as the value in the expression Therefore if you open the Set Address dialog box and enter the expression pc the Editor or Disassembly window will display the current PC address It also allows the offset of the current PC to be displayed by entering an expression with the PC register plus an offset e g 0 100 156 RENESAS 5 5 Displaying Memory Contents in Realtime Use the Monitor window to monitor the memory contents during user program execution 5 5 1 Opening the Monitor Window To open the Monitor window select View gt CPU gt Monitor gt Monitor Setting or click the Monitor toolbar button 3 to display the Monitor Setting dialog box Monitor Setting Monitor Setting Name monitort Options Address moo
41. T Opens the Trace window Stack Trace Ctrl K 8 Opens the Stack Trace window Gra Image Shift m Opens the Image window phic Ctrl G Waveform Shift Opens the Waveform window Ctrl V Per Performance Shift E Opens the Performance Analysis form Analysis Ctrl P window ance Profile Shift iE Opens the Profile window Ctrl F Realtime Profile Shift fal Opens the Realtime Profile Ctrl R window Setup Radix Hexadecimal Uses a hexadecimal for displaying a radix in which the numerical values will be displayed and entered by default Decimal 10 Uses a decimal for displaying a radix in which the numerical values will be displayed and entered by default 358 13 N SAS Table A 1 GUI Menus cont Toolbar Menu Option Shortcut Button Remarks Setup Radix Octal 8 Uses an octal for displaying a radix cont cont in which the numerical values will be displayed and entered by default Binary 2 Uses a binary for displaying a radix in which the numerical values will be displayed and entered by default Emu System Opens the Configuration lator Properties dialog box allowing the user to modify the debugging platform settings Memory Opens the Memory Mapping Resource dialog box to set memory mapping Debug Debug Sessions Opens the Debug Sessions dialog box to list add or remove the debug session Debug Settings Opens the Debug
42. The minimum time to be measured Specifies the resolution of the timer for execution time measurement as any of the following values 20 ns 100 ns 400 ns or 1 6 us Runtime count Specifies the execution time conditions Don t care Specifies no execution time condition Cycle Enters the measurement cycle counts D 0 to D 1099511627775 is available 204 131 NE SAS b Action page Sets the operation after the condition has been satisfied Runtime Count Condition Action Figure 5 53 Runtime Count Dialog Box Action Page Break Breaks after conditions have been matched 205 13 N SAS 5 8 9 Editing Breakpoint or Eventpoint Select a break condition to be modified and choose Edit from the popup menu to open the dialog box for the point which allows the user to modify the breakpoints or eventpoints The Edit menu is only available when one breakpoint or eventpoint is selected 5 8 10 Enabling Breakpoint or Eventpoint Select a breakpoint or an eventpoint and choose Enable from the popup menu to enable the selected breakpoint or eventpoint 5 8 41 Disabling Breakpoint or Eventpoint Select a breakpoint or an eventpoint and choose Disable from the popup menu to disable the selected breakpoint or eventpoint When a breakpoint or an eventpoint is disabled a condition will not be satisfied when the specified conditions have been satisfied 5 8 12 Deleting Breakpoint or Eventpo
43. This function is available when the operation after detecting an event is set as break in the Other Event sheet of the Event window f Trace break function generated by an overflow of the trace buffer Breaks when the AUD trace buffer and external bus trace buffer in the emulator become full This function can be set in the I Trace AUD Trace acquisition dialog box and the BUS acquisition dialog box g Forced break function Forcibly breaks the user program 1 3 5 Probe Function Six external probes can be placed on the emulator 1 Four input probes Monitor input signals break the user program and start or end AUD tracing by satisfying the specified condition This can be set on the Other Event sheet of the Event window 2 One event output probe Outputs the event signal when the event is detected This can be set on the Action page of the dialog box for setting the eventpoint Note The events that can output the event signals differ depending on the product For the specifications of each product refer to the online help 3 One GND A probe for connecting the ground 30 13 N SAS 1 3 6 Performance Measurement Function The emulator has three types of performance measurement functions 1 On chip Performance Analysis Function Onchip Performance Analysis This function applies a counter in the device to measure the number of cycles from one specified condition being satisfied until a next s
44. 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 224 RENESAS 4 R W page Select the type of access cycles Trace Find General RAN J Don t care Setting String READ Cancel Apply Figure 5 64 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 READ Read cycle WRITE Write cycle 225 RENESAS 5 Select the type being accessed The selection is not available when a time stamp is acquired Trace Find General Address data Bus RAW Don t Setting String BRANCH Cancel Apply Figure 5 65 Trace Find Dialog Box Type Page Don t care Detects no type condition when this box is checked Setting Detects the specified type condition String Select a type condition not available when Don t care has been checked 226 RENESAS 6 Bus page Select the status of a bus Trace Find General Address data Type Bus RAW Setting String Bus m Cancel Apply Figure 5 66 Trace Find Dialog
45. acquisition address values e Data values e External probe pin states e Time stamp values e Mnemonics 332 13 N SAS e Operands e Source lines Notes 1 The AUD trace function is not supported for all products For details on the specifications of each product refer to the online help 2 The types of trace information that can be acquired by an AUD trace function differ depending on the product For details on the specifications of each product or the number of acquired branches refer to the online help 3 When multiple loops are performed to reduce the number of AUD trace displays only the IP counts up according to the product e Memory Output Trace Function This function is used to write the trace result to the specified memory range The data is read from the memory range written in the Trace window and the result is then displayed This is large capacity trace function that is valid when the AUD pin of the device is not connected to the emulator Note Some products do not support the memory output trace function For details on the specifications of each product refer to the online help e External Bus Trace Function This is a large capacity trace function that is valid when the external bus pin of the MCU is connected to the emulator The external bus trace function can acquire the information of a maximum of 262 144 cycles per bus cycle The following information can be acquired e External bus addr
46. an external bus trace unit optional an emulation memory unit optional an EV chip unit optional an expansion profiling unit optional a USB cable an AC adapter and an external probe The emulator is connected to the host machine via USB 2 0 E200F main unit Expansion profiling unit optional Trace cable optional Included in main unit Debugger CD R adapter USB cable External probe External bus trace unit optional Emulation memory unit optional EV chip unit optional Figure 1 2 Emulator Hardware Configuration 13 N SAS The names of each section of the emulator are explained next Emulator Front View Figure 1 3 Emulator Front View a POWER LED Marked PWR When this LED is lit the emulator is supplied with power b RUN LED Marked RUN When this LED is lit the user program is in operation c ACTION LED Marked When this LED is lit the emulator is in operation 6 13 N SAS Emulator Rear side View Figure 1 4 Emulator Rear side View a Power switch Marked POWER Turning this switch to I input turns the emulator on and O output turns the emulator off b DC plug Marked DC IN This is a connector to input DC 12 V of the AC adapter Be sure to connect this plug to the provided AC adapter c External probe connector Marked EXT This is a connector for the external probe Be sure to connect t
47. are compared with those displayed in the Trace window Only those that completely match are counted Note however that this test is not case sensitive The number of blanks will not be cared either 238 13 N SAS 5 9 15 Extracting Function Calls from the Acquired Trace Information To extract function calls from the acquired trace information select Function Call from the popup menu The Function Call Display dialog box will be displayed Function Call Display Setting Enable to display trace information with function call only C Disable OK Figure 5 74 Function Call Display Dialog Box Setting Selects whether or not to extract function calls Enable Extracts function calls Disable Does not extract function calls When Enable is selected only the cycles that include function calls are extracted for display from the acquired trace information The content of the trace buffer is not changed by extraction of function calls Using this function for the trace information that includes function calls allows the user to know the order of function calls 239 13 N SAS 5 10 Viewing the Cache Contents The Cache window is used to display the cache contents in an MCU with cache The Cache window differs according to the MCU Read the description corresponding to the MCU 5 10 1 Opening the Cache Window Tag Address Lonqgword Longwordl Longword2 0000
48. as UL or IEC Be careful when you take this emulator overseas 6 Renesas cannot anticipate every possible circumstance that might involve a potential hazard The warnings in this user s manual and on the emulator product are therefore not all inclusive Therefore you must use the emulator product safely at your own risk RENESAS 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 replace any emulator products returned intact to the factory transportation charges prepaid which Renesas upon inspection shall determine to be defective in material and or workmanship The foregoing shall constitute the sole remedy for any breach of Renesas warranty See the Renesas warranty booklet for details on the warranty period This warranty extends only to you the original Purchaser It is not transferable to anyone who subsequently purchases the emulator product from you Renesas is not liable for any claim made by a third party or made by you for a third party DISCLAIMER RENESAS MAKES NO WARRANTIES EITHER EXPRESS OR IMPLIED ORAL OR WRITTEN EXCEPT AS PROVIDED HEREIN INCLUDING WITHOUT LIMITATION THEREOF WARRANTIES AS TO MARKETABILITY MERCHANTABILITY FITNESS FOR ANY PARTICULAR PURPOSE OR USE OR AGAINST INFRINGEMENT OF ANY PATENT IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT INCIDEN
49. avoid these dangers If other equipment is connected to the same branch circuit care should be taken not to overload the circuit Refer to nameplate for electrical ratings When installing this equipment insure that a reliable ground connection is maintained RENESAS VII A WARNING If you smell a strange odor hear an unusual sound or see smoke coming from this product then disconnect power immediately by unplugging the AC power cable from the outlet Do not use this as it is because of the danger of electric shock and or fire In this case contact your local distributor When installing or connecting this product with other equipment shut down AC power or disconnect the AC power cord from the equipment to prevent personal injury or damage to the equipment Warnings to Be Taken for This Product 9 Do not disassemble or modify this product Personal injury due to electric shock may occur if this product is disassembled and modified Make sure nothing falls into the cooling fan on the top panel especially liquids metal objects or anything combustible Warning for Installation G Do not set this product in water or areas of high humidity Make sure that the product does not get wet Spilling water or some other liquid into the product may cause unrepairable damage Warning for Use Environment This equipment is to be used in an environment with a maximum ambient
50. been specified by a source file the saved file cannot be loaded 5 15 8 Updating Coverage Information Selecting Refresh from the popup menu updates the content of the Code Coverage window 5 15 9 Preventing Update of Coverage Information Selecting Lock Refresh from the popup menu prevents update of the Code Coverage window while the user program execution is stopped This also prevents access to the emulator for acquisition of coverage information 286 13 N SAS 5 15 10 Confirmation Request Dialog Box e Clearing code coverage information or closing the Code Coverage window A confirmation dialog box appears before clearing code coverage information or closing the Code Coverage window Confirmation Request Clear Coverage RAM Figure 5 117 Confirmation Request Dialog Box When Save Coverage Data is checked the coverage data can be saved into a file before clearing Clicking the OK button clears the coverage information e When File gt Save Session has been selected When one or more Code Coverage windows are open the number of Save Code Coverage dialog boxes to be opened is the same as that of the Code Coverage window s The data of the windows can be saved separately or together 287 13 NE SAS Save Code Coverage Address range H 00001000 H 00001 Off No No To All Yes To All Figure 5 118 Save Code Coverage Dialog Box Clicking No To All closes
51. c Option board mode setting RealProfile Area2 function mode Monitor settne Virtual space Physical space OK Figure 2 31 Function select Dialog Box The following sections describe the contents that can be selected in this dialog box Note For details on each function refer to section 1 3 Emulator Functions 72 RENESAS 2 5 1 Changing the Functions when Using the 200 Main Unit Select the item in the Main board mode setting combo box of the Function select dialog box Function select Eunction setting Main board mode setting RealProfile Areal SUR ton mode mode v Bus board mode setting Performance 6ch Option board mode setting RealProfile Area2 function mode m Monitor Setting Virtual space C Physical space Cancel Figure 2 32 Function select Dialog Box e RealProfile Areal function mode Measures accumulation of execution time of each function the subroutine execution time is not included e RealProfile Areal nest mode Measures accumulation of execution time of each function the subroutine execution time is also included e Coverage 4M Acquires the information on the CO coverage in the 4 Mbyte areas Note Using the realtime profiling and coverage functions increases the ranges that can be set with the expansion profiling unit 73 RENESAS 2 5 2 Changing the Functions when Using the External
52. changed during user program execution c AUD event break function Breaks when the specified event has been detected by the AUD event detection function This function is available when the operation after detecting an event is set as break in the AUD Event sheet of the Event window It can also be set in the Editor or Disassembly window by double clicking on the line to be set in the AUD Event column d External bus event break function Breaks when the specified event has been detected by the external bus event detection function This function is available when the operation after detecting an event is set as break in the BUS Event sheet of the Event window It can also be set in the Editor or Disassembly window by double clicking on the line to be set in the BUS Event column Notes 1 When a break is generated by detecting the external bus event there is a delay of several cycles from the time of detection to the break 2 This function is optional it is available after an external bus trace unit is purchased 29 13 NE SAS 3 The contents that can be set for the external bus event differ depending on the product For the specifications of each product refer to the online help e Other event break functions Execution time event detection function External probe event detection function Breaks when the specified event has been detected by other event detection functions
53. checked To Enter a single address or the end of the address range only available when Range has been selected Note Along with setting the address range the start and end of the address range can be set in the From and To options respectively 232 RENESAS 3 Data page Set a data condition Trace Filter Point C Range From To Cancel Apply Figure 5 69 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 To Enter the maximum value of the data range only available when Range has been selected Note Along with setting the data range the minimum and maximum values can be set in the From and To options respectively 233 RENESAS 4 R W page Select the type of access cycles Trace Filter General Address data Type Bus R W Eo Figure 5 70 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 READ Detects read cycles when this box is che
54. e Aconfigurable environment to run your own tools An integrated debugger which allows you to build and debug in the same application e Version control support The High performance Embedded Workshop has been designed with two key aims firstly to provide you the user with a set of powerful development tools and secondly to unify and present them in a way that is easy to use RENESAS High performance Embedded Workshop User s Manual About This Manual This manual describes preparation before using the emulator emulator functions debugging functions specific to the emulator tutorial and emulator s hardware and software specifications Refer to the High performance Embedded Workshop User s Manual for details the information on the basic usage of the High performance Embedded Workshop customization of the environment build functions and debugging functions common to each High performance Embedded Workshop product This manual does not intend to explain how to write or assembly language programs how to use any particular operating system or how best to tailor code for the individual devices These issues are left to the respective manuals Microsoft and Windows are registered trademarks of Microsoft Corporation Visual SourceSafe is a trademark of Microsoft Corporation IBM is a registered trademark of International Business Machines Corporation brand or product names used in this manual are trademar
55. function names or CO coverage values to be listed in descending or ascending order 281 RENESAS e Right hand window Displays coverage information of the function selected by double clicking on the left hand window at the C C or assembly language level The items are displayed as follows Executed the instruction was executed or 0 the instruction was not executed Address Instruction address Assembler Disassembled program Source or assembly source program 5 15 2 Displaying a Source File Selecting Display a Source File from the popup menu opens the Editor window which displays the source file for the address at the cursor location on the Code Coverage window 5 15 3 Changing the Address to be Displayed Selecting Go To Address from the popup menu opens the Go To Address dialog box which allows the user to change the address to be displayed in the Code Coverage window Go To Address Cancel Figure 5 111 Go To Address Dialog Box 282 RENESAS 5 15 4 Changing the Coverage Range to be Displayed e When the coverage range for display has been specified by address Selecting Set Range from the popup menu opens the Coverage Display Range dialog box which allows the user to change the condition for acquisition of information on executed instructions Coverage Display Range Start Address H oo2000 End address Hoo20FF File b Browse Figure 5 112 Cov
56. how to set up and execute the diagnostic program and output the result For the SH 2A SH 2 E200F emulator when serial numbers 0001 to 0103 are shown on the product management seal be sure to update the version of the diagnostic program on first execution of that program after it has been installed This update will be completed at one time For the products with serial number 0104 or later the diagnostic program needs not be updated 3 4 1 Installing the Diagnostic Program 1 Opening SOT Setup exe e Execute Setup exe from the sot directory of the CD R e Follow the cues given by the installation wizard to install the software 3 4 2 Executing the Diagnostic Program The following describes how to execute the diagnostic program Connect the emulator to the host machine Note When the diagnostic program is used do not connect the user system nor user system interface board to the emulator 2 Turn on the emulator 3 Select E200F TM E200F TM from Programs in the Start menu 4 The diagnostic program of the emulator is started and the initial screen figure 3 4 is displayed 81 13 NE SAS COMPONENT v Main RE Memory TARGET Select Cpu Select Memory Type Select the component that has been connected USER TEST MODE QA TEST MODE PASSWORD Figure 3 4 Initial Screen of the E200F System Operation Test 5 Select COMPONENT The component to be selected must be connected to the em
57. is high Low Satisfies a condition when the signal is low Note The external interrupt signal differs depending on the supported MCU For details refer to the online help 195 RENESAS 4 Count page Specifies the satisfaction count condition Ch2 Delay Address Data Interrupt Count Delay Action numbers 07 Figure 5 45 Chx Delay Dialog Box Count Page Don t care Sets no satisfaction count numbers Sets a value as the satisfaction count condition D 1 to D 65535 is available Note If Trace get is selected on the Action page this page will not be displayed 196 13 N SAS 5 Delay page Sets the delay cycle from the event detection to the external bus trace stop Ch2 Delay Address Data Interrupt Count Delay Action Delay Figure 5 46 Chx Delay Dialog Box Delay Page Don t care Sets no delay condition Delay Sets the delay cycle counts D 1 to D 262143 is available Note This page is only displayed when external bus event channel Ch2 is selected and Trace stop is specified on the Action page 197 RENESAS 6 Action page Sets the operation after the condition has been satisfied Ch2 Delay Address Data Interrupt Count Action Action Break option Trace start Trace stop C Trace get Figure 5 47 Chx Delay Dialog Box Action Page
58. kbytes are considered as a unit to acquire the profiling information on all the functions in the areas of a maximum of 24 blocks The hardware of the emulator has a maximum of three types of memory for measuring eight blocks to implement the realtime profiling function Note that the adjacent address areas can be set in each block however it is impossible to set a function of which address ranges are extended on the eight block boundaries If such a function is set a warning message will be displayed and correct measurement will not be performed ii Inline expansion When the functions are inline expanded in accordance with optimization of the compiler they are not displayed in the Realtime Profile window 263 13 NE SAS Recursive function The execution time of the recursive function can be correctly measured however the execution count will be once iv AUD trace The realtime profiling function uses the data that is output in AUD trace Therefore when the function is used in the realtime trace mode the trace data may be lost and correct measurement will not be performed In such a case it is recommended that the non realtime trace mode be used 2 Restrictions on using the function mode i Tail call When a tail call is used for a function as shown below the return value of the callee function becomes the return address of the caller function The execution time or execution counts of the callee function cann
59. location of the source file is as follows High performance Embedded Workshop installation directory Tools Renesas DebugComp Platform E200F xxxx Tutorial source 2 If program execution is failed select Reset CPU from the Debug menu reset the device and restart the procedure from figure 6 8 301 13 NE SAS 00001024 void main void long 10 long j int I class Sample p sam 00001036 while 1 00001034 p_sam nev Sample 00001038 for iz0 i lt 10 itt 00001044 j rand 00001048 lt of 00001050 00001058 ali ij 00001068 p sam sort a 00001070 p_sam gt change a 00001076 p_sam gt s0 a 0 0000107 P sam sl a 1 0000107 p_sam gt s2 a 2 00001082 p_sam gt s3 a 3 00001086 P sam s a 4 0000108 P sam sb a b 0000108 p_sam gt s6 a 6 00001092 P sam s a 7 00001096 p_sam gt s8 a 8 0000109a p_sam gt s9 a 9 0000109 DUM p sam 000010b8 abort void Figure 6 11 Editor Window Break State 302 RENESAS The user can see the cause of the break that occurred last time in the Status window e 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 Status aaa SHxxxx E200F SYSTEM E7 E10 Emulator USB Driver SHXXXX Ready Cause of last break BREAK POINT Run time count 00h OOmin 00s OOO0ms OOO0us 160ns
60. memory area for downloading is operating correctly When the destination memory is SDRAM or DRAM a register in the bus controller of the target microcomputer must be set before downloading Set the bus controller correctly in the IO window according to the memory type to be used When the required settings such as the settings for the bus controller have been completed display and edit the contents of the destination memory in the Memory window to check that the memory is operating correctly Note The above way of checking the operation of memory may be inadequate It is recommended that a program for checking the memory be created e Select Memory from the CPU submenu of the View menu and enter H 00000000 in the Display Address edit box Display Address Display Address 00000000 js Scroll Start Address 00000000 Scroll End Address FFFFFFFF Figure 6 2 Format Dialog Box 294 13 N SAS e Click the OK button The Memory window is displayed and shows the specified memory area Address Register 0 ASCII 00000000 RESET Vecto 00 00000010 INT Vectors 00000020 00000080 00000040 00000050 00000060 00000070 00000060 00000090 00000040 1000000801 Figure 6 3 Memory Window e Placing the mouse cursor on a point in the display of data in the Memory window and double clicking allows the values at that point to be changed Data can also be directl
61. 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 Deselect the check box of a column you want to switch off Teo 5 Click the OK button for the new column settings to take effect Global Editor Column States Aud Event Bus Event m CodeCoverage Gancel Line Number Onchip Event S W Breakpoints S W Breakpoints ASM Source Address Figure 5 14 Global Editor Column States Dialog Box To switch off a column in one source file 1 Open the source file which contains the column you want to remove and click the right hand mouse button on the Editor window 2 Click the Columns menu item to display a cascaded menu item The columns are displayed in this popup menu If a column is enabled it has a tick mark next to its name Clicking the entry will toggle whether the column is displayed or not 153 13 N SAS 5 4 Viewing the Assembly Language Code Click the right hand mouse button on the Editor window to open the popup menu and select Go to Disassembly to open the Disassembly window at the address that corresponds to the current source file If you do not have a source file but
62. multiplexed pins Memory type setting Selects the type of memory for each area Select Normal for Notes 136 1 other than SRAM with byte control The items that can be set in this dialog box depend on the emulator in use For details refer to the online help When the external bus trace unit is not connected to the emulator this page is not displayed 13 N SAS Clicking the Multiplexed pins setting button opens the Multiplexed pins setting dialog box Select the pin name according to the state of the multiplexed pin Multiplexed pins setting Address pins ao 50 ag 58 A16 16 A24 A24 Al JA ag 9 17 17 425 25 A2 52 Aio 10 Aig 18 A26 A26 11 A11 Aig A19 A27 27 A4 Ad 12 12 A20 220 28 28 AB JAS A13 13 21 21 A29 A29 A6 A14 514 A22 22 A30 A30 15 1815 423 1823 A3 A31 Chip select pins cso CS0 OS3 053 56 cse OS1 OCS1 O84 54 OS OS7 E 52 052 CS5 055 OS8 58 E Gancel Figure 5 4 Multiplexed pins setting Dialog Box Note The items that can be set in this dialog box depend on the emulator in use For details refer to the online help 137 13 N SAS Clicking the Memory type setting button opens the Memory type setting dialog box Set the memory type on the board Memory type setting Figure 5 5 Memory type setting Dialog Bo
63. this case the emulator may be malfunctioned Create a log file according to the following procedures and send it to the sales office How to create a log file Click the FILE LOG button The E200FTM LOG file is created under the E200F 1 TM directory Send the log file to the sales office ae de 85 13 NE SAS Example of the E200F TM error log E200F Emulator T M ERROR LOG TM Version 1 2 00 ICE CODE F001 Board Number 0011 Device SH72060 Date 2005 04 07 No STATUS NG Address NG Data 03 0318 A8000004 00000040 NG 3 4 4 Updating the Diagnostic Program The following describes how to update the diagnostic program 1 Connect the emulator to the host machine 2 Turn on the emulator 3 Select E200F TM E200F TM from Programs in the Start menu 4 The diagnostic program of the emulator is started and the initial screen figure 3 8 is displayed 5 Select TM Version Up Ee Select TM Version Up COMPONENT 2 Main OPTION TRC EVA Ma TARGET Select Cpu sme rz X Select Memory Type ye USER TEST MODE QA TEST MODE PASSWORD Figure 3 8 Initial Screen of the E200F Diagnostic Program 86 13 N SAS 6 When TM Version Up is started the screen shown in figure 3 9 is displayed 7 Select VER UP 8 When updating the program is executed and completed the screen shown in figure 3 10 is displayed If the screen shown in figure 3 11 is displa
64. this dialog box without saving any coverage information Clicking Yes To All saves data of all the Code Coverage windows into one file 288 RENESAS 5 15 11 Displaying Code Coverage Information in the Editor Window Highlighting the Code Coverage column that corresponds to a source line where an instruction has been executed allows the coverage information to also be displayed in the Editor window If the user changes any setting regarding the coverage information in the Code Coverage window the content of the corresponding Code Coverage column will also be updated 00001038 main void long 10 long j Int i class Sample p sam 00001040 while 1 0000104c p sam new Sample 00001056 for i 0 i 10 0000105e j rand 00001066 ifj lt of o000106a j sj 0000106 ali j 00001084 P sam sort a 0000108 p_sam gt change a 00001098 p sam s a 0 000010aa pP sam sl a 1 zi tutorialcpp gt resetpre c Figure 5 119 Code Coverage Column 289 13 N SAS 290 13 N SAS Section 6 Tutorial 6 1 Introduction This section describes the main functions of the emulator by using a tutorial program The tutorial program is based on the program that sorts ten random data items in ascending or descending order The tutorial program performs the following actions e The main function generates random data to be sorted e The sort function sorts the gener
65. this page will not be displayed 185 RENESAS 6 Delay page Sets the delay cycle from the event detection to the AUD trace stop Ch2 Delay General Branch Count Delay Action Delay Don t care Delay D Clock 100ns hd 1 Apply Figure 5 38 Chx Delay Dialog Box Delay Page Don t care Sets no delay condition Delay Sets the delay cycle counts D 1 to D 262143 is available Clock Sets a cycle for delay measurement 100ns Specifies 100 ns as one cycle number of trace information Specifies a set of AUD trace information as one cycle Note This page is only displayed when AUD event channel Ch2 is selected and Trace stop is specified on the Action page 186 RENESAS 7 Action page Sets the operation after the condition has been satisfied Ch1 Reset General Branch Count Action Action C Break C Trace Performance start Trace option ce Trace start ie Trace stop c Trace get Performance option Sampling time Enable output trigger Figure 5 39 Chx Reset Dialog Box Action Page 187 RENESAS Breaks after conditions have been matched Trace Enables Trace option and sets the AUD trace operation Trace start Starts AUD trace after conditions have been matched Trace stop Stops AUD trace after conditions have
66. type to be used Note When Demonstration is selected in the emulator note the following The Demonstration is a program for the simulator When using a program to be generated delete the Printf statement 106 13 N SAS 3 Make the required setting for the toolchain When the setting has been completed the following dialog box is displayed New Projec ting the Target System For Debugging I SHXXxE200F SYSTEM SHXXX Cycle Base Simulator SHXXX Functional Simulator Figure 4 26 New Project 7 9 Setting the Target System for Debugging Dialog Box The target platform for the session file used when the High performance Embedded Workshop is activated must be selected here Check the box against the target platform and then click the Next button 107 3 N SAS 4 Setthe configuration file name The configuration saves the state of High performance Embedded Workshop except for the emulator tting the Debugger Options Target name SHXXXE200F SYSTEM Configuration name Debug SHXXX E200F SYSTEM Detail options lem Setting lt Back Finish Cancel Figure 4 27 New Project 8 9 Setting the Debugger Options Dialog Box This is the end of the emulator setting Exit the Project Generator according to the instructions on the screen The High performance Embedded Workshop is activated 108 3 NE SAS 5 After the High performance Embedded Workshop has been activated conne
67. value than that has been set for the single address or address range as the condition 181 RENESAS Data Notes 182 Sets the data condition Don t care Sets no data condition Read Write Sets the read or write cycle as the condition Read Sets the read cycle as the condition Write Sets the write cycle as the condition Value Sets the data bus value mask data can be input Byte Sets the byte access as the condition Word Sets the word access as the condition 32 bit Sets the 32 bit access as the condition 64 bit Sets the 64 bit access as the condition Outside Sets other value than that has been set for Value as the condition 1 This page is only displayed when Window trace data is specified on the General page 2 The address range can only be specified for AUD event channels Ch1 and Ch2 3 The mask address can be input for Start when the single address is specified 4 The mask address cannot be input for Start and End when the address range is specified 13 N SAS 4 Software page Specifies the address and data conditions of the software trace Ch2 Delay General Software Count Delay Action r Address Dont care C Address Range Start 00000000 End H o0000000 Outside Data Don t care Value 00000000 Outside Paral pie Figure 5 36 Chx Delay Dialog Box Software P
68. want to view code in the assembly language level either choose View Disassembly or click the Disassembly toolbar button dEl The Disassembly window opens at the current PC location and shows Address and Code optional which show the disassembled mnemonics with labels when available void main void 00001024 2FAs main R10 8 R16 00001026 2FBB 2 R11 8 RI5 00001028 2FCB f R12 8 R15 00001024 2FD6 R13 8 R15 000102C 2FEB R14 8 R15 0000102 4F22 5 15 00001030 7FCC 15 00001032 EA00 ttH 00 R10 p sam new Sample eee 0221 B H 0084 8 PC R2 long a 10 long j int I class Sample p sam while 1 00001036 6443 MOV R10 R4 for i 0 i lt 10 itt 00001038 420B JSR aR 00001034 MOV 00 R13 0000103C 1F0 MOV R0 B H 28 4 R15 0000103 6803 MOV RO R11 00001040 MOV HH 0A R14 00001042 DCIF MOV 8 H 007C 8 PC R2 Figure 5 15 Disassembly Window In this window the following items are shown on the left as information on lines The first column On Chip Break column On chip breakpoints The second column AUD event column AUD event information 154 131 NE SAS The third column BUS event column BUS event information The fourth column Address information column PC and S W Breakpoints Usage of these columns is the same as that in the window for display of source codes 5 4 1 Modifying the Assembly Language Code The A
69. was found in the preceding search select Find Next from the pop up menu Note that during execution of an instruction the Find Next menu is disabled and the next matching cache item cannot be searched for 5 10 6 Saving the Currently Displayed Contents The contents currently displayed in the window can be saved in a text file Select Save to File from the pop up menu 243 13 N SAS 5 11 Analyzing Performance Use the performance analysis function to measure execution performance The emulator has two types of performance analysis functions on chip performance analysis Onchip Performance Analysis and AUD performance analysis AUD Performance Analysis 5 11 1 Opening the Onchip Performance Analysis Window To open the Onchip Performance Analysis window choose View gt Performance gt Performance Analysis or click the PA toolbar button E to open the Select Performance Analysis Type dialog box Select Performance Analysis Type Performance Analysis Onchip Performance Cancel Figure 5 79 Select Performance Analysis Type Dialog Box Select Onchip Performance and click the OK button to open the Performance Analysis window Channel Condition Result chi DISABLE 00000000 Ch2 DISABLE ooo00000 Ch3 DISABLE oo0000000 Ch4 DISABLE ooo00000 Figure 5 80 Performance Analysis Window Onchip Performance The Onchip Performance Analysis function does not affect the realtime operat
70. window Remove Removes the selected monitoring conditions Close Closes this dialog box 161 RENESAS 5 6 Viewing the Current Status Choose View gt CPU gt Status or click the View Status toolbar button to open the Status window and see the current status of the debugging platform Status Target Device Configuration X RAM Area 05007000 OSOOSFFF Y RAM Area 05017000 O5O018FFF U RAM Area OSSEOOOO OS61FFFF Internal I O 04000000 O7FFFFFF Internal I O 1 000000 1FFFFFFF System Memory Resources Remain Emulation Memory OM Memory Loaded Area Figure 5 22 Status Window The Status window has three sheets e Memory sheet Contains information about the current memory status including the memory mapping resources and the areas used by the currently loaded object file e Platform sheet Contains information about the current status of the debugging platform typically including MCU type and emulation mode and the state of execution e Events sheet Contains information about the current event breakpoint status including resource information 162 RENESAS 5 7 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 The Extended Monitor function does not affect the execution of the user program since it monitors the signal output from the u
71. window provides the following useful functions a Searches for the specified data b Extracts the specified data c Filters and displays again the specified data d Supplements the information from the branch destination address to the next branch source address For the usage of those functions refer to section 5 9 Viewing the Trace Information e Changes the trace settings during user program execution Trace settings can be changed during user program execution NE SAS 1 3 4 Break Function The emulator has the following seven break functions a S W break function BREAKPOINT Breaks the program at the specified address by replacing the dedicated instruction onto the original instruction This function cannot be set at a place other than RAM since a memory write occurs This function can be set in the Breakpoint sheet of the Event window It can also be set in the Editor or Disassembly window by double clicking on the line to be set in the Editor column b On chip event break function Breaks when the specified event has been detected by the on chip event detection function This function is available when the operation after detecting an event is set as break in the Onchip Event sheet of the Event window It can also be set in the Editor or Disassembly window by double clicking on the line to be set in the Onchip event column Note On chip event break settings can be
72. 000 H 00 1F F FFF Main H 00200000 H 002 7F FFF cancel Figure 5 101 Select Page Dialog Box 5 13 3 Starting Measurement When the user program is executed measurement is started When the user program is halted the measurement result is displayed in the Realtime Profile window 5 13 4 Clearing Measurement Result Selecting Clear Data from the popup menu clears the measurement result of the Column and Time columns 5 13 5 Deleting Measurement Range Selecting Delete from the popup menu deletes all the specified measurement range and clears the measurement result 5 13 6 Setting the Minimum Unit of the Measurement Time In the emulator it is possible to change the minimum unit of the measurement time as any of 20 ns 100 ns 400 ns or 1 6 us At 20 ns the maximum time that can be measured is about three hours At 100 ns the maximum time that can be measured is about 15 hours At 400 ns the maximum time that can be measured is about 61 hours 271 13 NE SAS At 1 6 us the maximum time that be measured is about 244 hours To change the minimum unit select Set from the popup menu of the Realtime Profile window and open the Properties dialog box Properties Measurement interval 100ns Figure 5 102 Properties Dialog Box Note Be sure to set the following when using the realtime profiling function e I Trace AUD Trace acquisition dialog box that is opened by se
73. 000121 free 0000121c free 000012 0 malloc 000012c0 malloc 00001370 __morecor 000013 0 default new 1 000013 4 eall dtors 00001558 process needed destructions 0000159 _ already marked for destruction 00001544 record needed destruction DO00015CA std needed destruction list x Figure 6 14 Label Window 305 RENESAS 6 12 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 word size e Select Memory from the CPU submenu of the View menu enter mainin the Display Address edit box Display Address Display Address Scroll Start Address 00000000 rl Scroll End Address FFFFFFFF OK Cancel Figure 6 15 Format Dialog Box 306 RENESAS e Click the OK button The Memory window showing the specified area of memory is displayed Address 0 0x00001024 0x00001034 0x00001044 0x00001054 0 00001064 0 00001074 0 00001084 7FD8 6D03 62 3 D613 54F1 64D3 52F9 0000 0000 112 2352 2562 64F6 Figure 6 16 Memory Window RENESAS 53532 36097 36852 25811 20982 7446 9 4416 12102 25622 35317 40963 35315 9 16651 26115 8802 25074 21239 7463 107 0 12118 40962 53517 9 26358 58368 26219 26099 11538 7489 24312 8192 12134 9 53774
74. 001044 AFC60009 000000 000000 000053 0000161 Figure 5 59 BUS trace Window 1 BUS Trace Items that can be displayed in this window are listed below For details on the specifications of each product refer to the online help PTR The bus trace buffer pointer 0 for the last executed instruction IP The amount of acquired trace information R W Whether the generated data is associated with read or write access Address Address Data The data bus value Timestamp Time stamp of bus cycle Source The or assembly language source program 217 13 NE SAS Label Label information Timestamp Difference Difference value of the time stamp 5 9 4 Specifying Conditions or Modes for Acquiring Trace Information 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 trace information acquisition conditions are implemented by eventpoints and acquisition start acquisition end and acquisition can be controlled For setting eventpoints refer to section 5 8 Using the Eventpoints The trace information acquisition mode is set in the BUS acquisition dialog box that is displayed by selecting Set from the popup menu 218 13 N SAS BUS acquisition Trace Mode r Trace type BUS trac
75. 17 4 4 3 Saving Session Information seen ren rennen 120 45 Connecting the Emulator rper entere e E UN EFE Reale dels 121 4 6 Reconnecting the Emulator essere nennen een nennen nennen rennen ens 122 4 T Ending the Emulatot 2 rre PUNIRE IPC das RUE IE E REFER 122 4 8 Uninstalling the Emulator s Software sess eene nennen 123 Section 5 Deb g sing oiii a a UE 129 5 1 Setting the Environment for Emulation esee eene 129 5 1 1 Opening the Configuration Dialog Box eee 129 254 2 General 130 513 Main Board Page etre m ener ero Eee ee enia 132 5 14 EVA Board 134 iv 5 2 5 3 5 4 5 5 5 6 5 7 5 8 High performance Embedded Workshop User s Manual 513 808 Board Page 135 2 1 6 Option Board Eis 139 5 1 7 Downloading to the Flash Memory eere 141 5 1 8 Opening the Memory Mapping Dialog Box eee 144 5 1 9 Changing the Memory Map Setting sse eene 146 5 1 10 Multiplexed Address pins setting Dialog Box see 148 Downloading Program coiere te etit teinte Ete Pere aee 148 5 21 Downloading a Programm
76. 26166 26102 5124 307 6 13 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 e Click the left of displayed array a in the Editor window to position the cursor e Select Instant Watch with the right hand mouse button The following dialog box will be displayed Instant Watch a OxfffSefbd long 10 Figure 6 17 Instant Watch Dialog Box e Click the Add button to add a variable to the Watch window FFFOEFB4 long 10 Watch2 Watch3 Watcha Figure 6 18 Watch Window Displaying the Array 308 RENESAS The user can also add a variable to the Watch window by specifying its name e 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 Enter variable i Add Watch Variable or expression ff ae Figure 6 19 Add Watch Dialog Box e Click the OK button The Watch window will now also show variable i FFFOEFB4 long 10 H O000000a R13 int Figure 6 20 Watch Window Displaying the Variable 309 RENESAS The user can click mark at the left side of array a in the Watch window to watch all the
77. 31 RENESAS 6 19 Trace Functions The emulator has the five trace functions listed below e Internal Trace Function Since this function uses the trace buffer built into the MCU a realtime trace can be acquired The following information can be acquired e Types of trace information Branch information memory access information from the CPU and PC or Rn value during the Trace Rn instruction execution e Trace acquisition address values e Data values e Mnemonics e Operands e Source lines Notes 1 The number of branch instructions that can be acquired by a trace differs according to the product For the number that can be specified for each product refer to the online help 2 The internal trace function is not supported for all products For details on the specifications of each product refer to the online help 3 The internal trace function is not extended for all products For details on the specifications of each product refer to the online help e AUD Trace Function This is the large capacity trace function that is enabled when the AUD pin is connected to the emulator When a set of the branch source and branch destination instructions is one branch the maximum amount of information acquired by a trace is 262 144 The following information can be acquired e Types of trace information Branch information memory access information from the CPU and PC or Rn value during the Trace Rn instruction execution e Trace
78. 69 000160 MEMORY OOOOFFCS OOOOSBAF 000168 000159 MEMORY OOOOFFDO 00005 000167 000158 Lost 000166 000157 MEMORY OOOOFFCS D0005AAC 000165 000156 Lost 000164 000155 MEMORY OOOOFFCO 00005010 000163 000154 Lost Figure 5 56 Internal AUD Window Type 2 AUD Trace This window displays the following trace information items some of this information will not be displayed in some products PTR The AUD trace buffer pointer 0 for the last executed instruction IP The amount of acquired trace information Type Type of trace information BRANCH Branch source DESTINATION Branch destination MEMORY Memory access S_TRACE Executed Trace x function LOST Lost trace information only in the realtime mode Bus The bus which was being accessed R W Whether the generated data is associated with read or write access Address Address 210 131 NE SAS Data The data of the generated data access When Type is S_TRACE value x a variable of function Trace x is displayed Instruction Instruction mnemonic Timestamp Time stamp value Source The or assembly language source program Label Label information Timestamp Difference Difference value of the time stamp Note Since the displayed contents differ depending on the product refer to each product s online help Some MCUS supported may not have the AUD trace function 13 NE SAS 211 3 Specifying Conditions or Modes for Acqui
79. 92 13 N SAS 10 The Function select dialog box is displayed Function select RealProfile Areal nest mode Trace break Gch Trace 262144 c v RealProfile Area function mode v SETUTTE Figure 4 6 Function select Dialog Box Select the emulator function to be used For the items to be selected refer to section 2 5 Changing the Settings 93 RENESAS 11 The Connecting dialog box is displayed and the emulator connection is started Connecting Figure 4 7 Connecting Dialog Box The emulator supports the following two debugging modes Debugging with a connection to the EV chip unit which connects the emulator main unit and H UDI port connector to the EV chip unit Debugging without any connection to the EV chip unit which directly connects the H UDI port connector to the user system The system check procedures shown below differ between those modes 94 RENESAS e Debugging without any connection to the EV chip unit 1 The dialog box is displayed as shown in figure 4 8 hexxxx AN Please Reset the user system and press Enter Key Figure 4 8 Dialog Box of the RESET Signal Input Request Message 2 Input the reset signal from the user system and click the OK button If no reset signal is detected the following dialog box is displayed hexxxx not find RESET signal Please check RESET and Vcc E Retry Ignore Figure 4 9 Can not find
80. Box 126 RENESAS 7 Click the Start button to list the installed components Uninstall HEW Tool Close Select the directory in which to begin the search for tools c ew3 T oolssRenesassDebugComp Platform E 200F sx Browse Include subfolders Located Tools which can be uninstalled Uninstall Search Status 1 file s found Figure 4 45 Highlighting the Product to be Uninstalled Highlight the product name to be uninstalled and click the Uninstall button This is the end of uninstallation CAUTION A shared file may be detected while the program is being removed If another product may be using the shared file do not remove the file If another product does not start up after the removal process re install that product 13 N SAS 127 128 13 N SAS Section 5 Debugging This section describes the debugging operations and their related windows and dialog boxes 5 1 Setting the Environment for Emulation The method for setting the environment for emulation is described here This environment must be set correctly before debugging is started 5 1 1 Opening the Configuration Dialog Box Selecting Setup gt Emulator gt System or clicking the Emulator System toolbar button t opens the Configuration dialog box 129 13 N SAS 5 1 2 General Page Sets the emulator operation conditions Configuration General Main Board Bus Board L
81. Bus Trace Unit Select the item in the Bus board mode setting combo box of the Function select dialog box Function select x Function setting Main board mode setting RealProfile Areal function mode Bus board mode setting Performance Sch M Option board mode setting RealProfile Area2 function mode v m Monitor Setting Virtual space C Physical space Cancel Figure 2 33 Function select Dialog Box e Trace break 6ch Trace 242144 cycles Uses the channel for detecting the external bus event as a break e Emulation memory 4M Trace 8192 cycles Uses the external emulation memory function 4 Mbytes x 1 block Note When the external bus trace unit is not connected to the emulator this combo box is displayed in gray 74 RENESAS 2 5 3 Changing the Functions when Using the Expansion Profiling Unit Select the item in the Option board mode setting combo box of the Function select dialog box Function select x Function setting Main board mode setting RealProfile Areal function mode Bus board mode setting Perfor mance Option board mode RealProfile Area2 function mode v m Monitor Setting Virtual space C Physical space Gancel Figure 2 34 Function select Dialog Box e RealProfile Area2 function mode Measures accumulation of execution time of each function the subrou
82. Code Trace or click the Trace toolbar button Trace Window Type Trace window UGEB Figure 5 54 Trace Window Type Dialog Box Selecting Internal AUD and clicking the OK button displays the Internal AUD window 207 13 NE SAS 1 Acquiring Internal Trace Information Internal trace Selecting the Set menu in the popup menu of the Internal AUD window displays the I Trace AUD Trace acquisition dialog box When Internal trace is selected in Trace Type within the dialog box the trace information is acquired by using the internal trace function When the emulator does not set the acquisition condition of the trace information the trace information is acquired by the internal trace function in default The acquired trace information is displayed in the Internal AUD window Type Address Data Size Instruction Source 00024 MEMORY OOOOFFD4 0000261 LONG eee 00023 BRANCH 00002082 BF S GH 20D0 8 DESTINATION 00002000 MOV H 09 R2 a i tmp 9 i 00022 MEMORY DOOO0FF88 000016185 LONG 00021 MEMORY DOOO0FFD8 000016185 LONG 00020 BRANCH 000020 6 DESTINATION 00001076 ri GR15 R2 p sam s a 0 Figure 5 55 Internal AUD Window Type 1 Internal Trace Some MCUs to be debugged display the items below For details on the specifications of each product refer to the additional document Supplementary Information on Using the SHxxxx or the online help PTR
83. Connect the emulator to the host machine and the user system then turn on the user system 2 Select High performance Embedded Workshop from Renesas High performance Embedded Workshop of Programs in the Start menu 3 The Welcome dialog box is displayed Welcome ptions OK Cancel 2 C Open a recent project workspace Administration ig Browse to another project workspace Figure 4 19 Welcome Dialog Box Create a new project workspace radio button Creates a new workspace Open a recent project workspace radio button Uses an existing workspace and displays the history of the opened workspace Browse to another project workspace radio button Uses an existing workspace this radio button is used when the history of the opened workspace does not remain In this section we describe the following three ways to start up the High performance Embedded Workshop e Create a new project workspace a toolchain is not in use e Create a new project workspace a toolchain is in use e Browse to another project workspace 100 RENESAS The method to create a new workspace depends on whether a toolchain is or is not in use Note that this emulator product does not include a toolchain Use of a toolchain is available in an environment where the H8S H8 300 series C C compiler package or the SuperH RISC engine compiler package has been installed For details on this refer t
84. D clock The AUD clock is only needed for using emulators that have an AUD trace function For the upper limit for the AUD clock refer to section 3 2 3 Notes on Using the JTAG H UDI Clock TCK and AUD Clock AUDCK in the additional document Supplementary Information on Using the SHxxxx Sets the pin that is shared with the AUD pin A communication clock used except for acquiring AUD trace If its frequency is set too low the speed of downloading will be lowered Set the frequency not to exceed the upper limit for the MCU s guaranteed TCK range For the upper limit for TCK refer to section 3 2 3 Notes on Using the JTAG H UDI Clock TCK and AUD Clock AUDCK in the additional document Supplementary Information on Using the SHxxxx 131 13 NE SAS Notes 1 Includes interrupts in a break 2 The items that can be set in this dialog box depend on the emulator in use For details refer to the online help 5 1 3 Main Board Page Sets the main unit case operation conditions Configuration General Main Board Bus Board Loading flash memory Multi analysis mode setting j Aud data bus width 4 bit u Cancel i Figure 5 2 Configuration Dialog Box Main Board Page 132 13 N SAS Items that can be displayed in this page are listed below Multi analysis mode setting Displays the emulator functions Settings cannot be changed if they are to be changed the emulator mus
85. EC Figure 5 87 Standard Toolchain Dialog Box 2 To enable the settings in the Include Profile box specify the Optimize list box as some setting other than None 252 13 N SAS 5 12 3 Loading Stack Information Files You can select whether or not to read the stack information file in a message box for confirmation that is displayed when a load module is loaded Clicking the OK button of the message box loads the stack information file The message box for confirmation will be displayed when e There are stack information files extension SNT e The Load Stack Information Files SNI files check box is checked in the Confirmation page of the Options dialog box figure 5 88 that can be opened by choosing Tools gt Options from the main menu Build Editor Workspace Confirmation Display confirmation dialogs for lt Save memory Set All Fill memory Test memory Delete All Labels Delete Label Loading Labels Clear All lt lt lt IK Saving Labels Delete All Events Delete Event Reset PA Setting Reset All PA Settings Clear PA Data Clear All PA Data Reset All PA Settings at Loading Load Stack Information Files SNI files K 16 6 amp K Figure 5 88 Options Dialog Box 253 7tENESAS 5 12 4 Enabling the Profile Choose View gt Performance gt Profile to open the
86. ESAS e 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 00000800 in this tutorial program and click the OK button PG Set Value Value 00000800 Radix Y Set whole Register z Ewa Figure 6 8 Register Dialog Box PC e Change the value of the stack pointer SP in the same way Set H FF9F000 for the value of the stack pointer in this tutorial program R15 Set Value Value rtterooo Radix Hex z Set As whole Resister x Figure 6 9 Register Dialog Box R15 300 13 N SAS 6 9 Executing the Program Execute the program as described in the following e To execute the program select Go from the Debug menu or click the Go button on the toolbar Figure 6 10 Go Button When the program execution is started RUNNING is displayed on the status bar and then the executed PC address is displayed in the products that support the MCU status acquisition function The program will be executed up to the breakpoint that has been set and an arrow will be displayed in the S W Breakpoints column to show the position that the program has halted with the message BREAKPOINT in the status bar Notes 1 When the source file is displayed after a break a path of the source file may be inquired The
87. EV chip Unit to the User System seen 50 2 3 6 Connecting the E200F External Bus Trace Unit to the EV chip Unit 52 2 3 7 Connecting the E200F Emulation Memory Unit to the EV chip Unit 54 2 3 8 Connecting the E200F External Bus Trace Unit Emulation Memory Unit and EV chip Unit erret ttr te rea er HE eer ite 56 2 3 0 Connecting the Probe Head to the EV chip Unit eene 57 2 3 10 Connecting the E200F Expansion Profiling Unit to the Main Unit Case 58 2 3 11 Connecting the AC Adapter to the Emulator Main Unit Case 64 2 3 12 Connecting the Emulator to the Host Machine e 65 RENESAS High performance Embedded Workshop User s Manual 2 4 Connecting the Emulator to the User System sese 67 2 4 1 Connecting the E200F H UDI Probe to the User 68 2 4 2 Connecting System Ground sess een eene 71 2 5 Changing the Settna Sinis pinana Ere ge ne GER DRE ER coast ess pas 72 2 5 1 Changing the Functions when Using the E200F Main 73 2 5 2 Changing the Functions when Using the External Bus Trace Unit 74 2 5 3 Changing the Functions when Using the Expansion Profiling Unit 75 Section 3 Hardware SPECIMCALONG vcsciscisuccicsansaestzeentwncwanssiuscenease
88. Figure 4 36 Session Properties Dialog Box To make a session read only 1 CA Select Options gt Debug Sessions to display the Debug Sessions dialog box figure 4 34 Select the session you would like to make read only Click the Properties button to display the Session Properties dialog box figure 4 36 Check the Read only check box to make the link read only This is useful if you are sharing debugger setting files and you do not want data to be modified accidentally Click the OK button save a session with a different name Select Options gt Debug Sessions to display the Debug Sessions dialog box figure 4 34 Select the session you would like to save Click the Save as button to display the Save Session dialog box figure 4 37 Browse to the new file location If you want to export the session file to another location leave the Maintain link check box unchecked If you would like the High performance Embedded Workshop to use this location instead of the current session location check the Maintain link check box Click the Save button 119 RENESAS SimDebug SH 2 ai DefaultSession hsf ai SimSessionSH 2 hsf Rem Save as type Sessions hsf x Cancel Maintain link 2 Figure 4 37 Save Session Dialog Box 4 4 3 Saving Session Information e To save session Select File gt Save Session 120 RENESAS 4 5 Connecting
89. Lock pin type DX10G1M 36SE 2 The pin assignments of the connector are shown in section 2 in the additional document Supplementary Information on Using the SHxxxx 3 Connect pins 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 33 34 and 36 when using the 36 pin user system interface cable of the H UDI port connector to GND on the PCB These pins are used as electrical GND and to monitor the connection of the H UDI port connector Note the pin assignments of the H UDI port connector 67 13 N SAS 2 4 1 Connecting the E200F H UDI Probe to the User System Connect the H UDI probe to the user system as shown in figure 2 27 Figure 2 27 Connecting the H UDI Probe to the User System 68 RENESAS Fasten the user system and the H UDI probe with screws as shown in figure 2 28 Figure 2 28 Fastening the User System and the H UDI Probe CAUTION Note that the pin number assignments of the connector differ from those of the connector manufacturer Notes 1 Connection of the signals differs depending on the package For details refer to the MCU s pin assignments 2 range of communication that the emulator operates at is different depending on the MCU used 3 connect the signals from the connector refer to section 2 in the additional document Supplementary Information on Using the SHxxxx 69 RENESAS 4 When developing user systems do not connect the TDI si
90. MA ADMA Instruction Fetch When trace buffer full Trace continue r AUD mode Branch trace Window trace Channel A Channel Software trace AUDmodel Realtime trace Non realtime trace AUDmode2 Trace continue Trace stop Break AUD mode3 Enable free trace Time stamp 20ns trace display Start pointer D 255 End pointer Figure 6 49 Setting the I Trace AUD Trace acquisition Dialog Trace mode Page 340 RENESAS Note The items that can be set in this window differ depending on the product For details on the settings for each product refer to the online help c Displaying the trace result Run the program as shown in the example of section 6 17 1 S W Break Function The trace results are displayed in the Internal AUD window after the program execution is completed Type Address Data 000255 MEMORY 00001044 0000202 000254 000254 MEMORY 00001040 00002000 000253 000253 MEMORY 00001044 00000202C 000252 000252 MEMORY 00001040 00002000 000251 000251 MEMORY 00001044 0000202 000250 000250 MEMORY 00001040 00002000 000249 000249 MEMORY 00001044 0000202 000248 000248 MEMORY 00001040 00002000 000247 000247 MEMORY 00001044 0000202 000246 000246 MEMORY 00001040 00002000 Figure 6 50 Internal AUD Window Example 6 19 2 Displaying the BUS trace Window Select Trace from the
91. Memory data uploading function The specified amount of memory from the specified address can be saved in a file 4 Memory data downloading function The memory contents saved in a file can be downloaded Select Load from the popup menu in the Memory window 5 Displaying the variable contents The variable contents specified in the user program are displayed 6 Monitoring function The emulator monitors a value in the area that has been accessed without suspending the execution of program and displays it on the window 7 Emulation memory function The emulator allocates the memory for emulation in the CS area 35 13 N SAS 8 Other memory operation functions Other functions are as follows e Memory fill e Memory copy e Memory save e Memory verify e Memory search e Internal I O display e Cache table display and edit only for devices incorporating caches e Displaying label and variable names and their contents For details refer to the online help Notes 1 Memory access during user program execution When a memory is accessed from the memory window etc during execution of the user program execution stops for the memory access and is then resumed Therefore realtime emulation cannot be performed 2 Memory access during user program break The program can also be downloaded for the flash memory area by the emulator Other memory write operations are enabled for the RAM area Therefore an op
92. NT 365 13 N SAS 366 13 N SAS Renesas Microcomputer Development Environment System User s Manual SH 2A SH 2 E200F Emulator Publication Date Rev 1 00 December 20 2004 Rev 7 00 May 19 2006 Published by Sales Strategic Planning Div Renesas Technology Corp Edited by Customer Support Department Global Strategic Communication Div Renesas Solutions Corp 2006 Renesas Technology Corp All rights reserved Printed in Japan RenesasTechnology Corp Sales Strategic Planning Div Nippon Bldg 2 6 2 Ohte machi Chiyoda ku Tokyo 100 0004 Japan 5 5 RENESAS SALES OFFICES http www renesas com Refer to http www renesas com en network for the latest and detailed information Renesas Technology America Inc 450 Holger Way San Jose CA 95134 1368 U S A Tel 1 408 382 7500 Fax 1 408 382 7501 Renesas Technology Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 585 100 Fax lt 44 gt 1628 585 900 Renesas Technology Shanghai Co Ltd Unit 204 205 AZIACenter No 1233 Lujiazui Ring Rd Pudong District Shanghai China 200120 Tel 86 21 5877 1818 Fax 86 21 6887 7898 Renesas Technology Hong Kong Ltd 7th Floor North Tower World Finance Centre Harbour City 1 Canton Road Tsimshatsui Kowloon Hong Kong Tel 852 2265 6688 Fax 852 2730 6071 Renesas Technology Taiwan Co Ltd 10th Floo
93. Normal on the BUS Event sheet of the Event window The Ch3 Normal dialog box will appear Ch3 Normal Address Data Interrupt Count Action Address Dontcare Address Range Stat H 00002000 End H 000020FF Outside Cancel Apply Figure 6 53 Ch3 Normal Dialog Box Address Page e Select Range e Input H 2000 and H 20FF into Start and End respectively e Select Trace get in the Action page and click the OK button e The trace information when external memory H 2000 to H 20FF has been accessed is acquired 344 N SAS d Displaying the trace result Run the program as shown in the example of section 6 17 1 S W Break Function The internal trace results are displayed in the BUS trace window after the program execution is completed IP Address Data IRQ15 8 7 0 000255 000255 O000FFEO 00000003 00001000 000254 000254 00001044 4cOB0009 00001100 000253 000253 00001044 4cOB0009 00001100 000252 000252 00001048 40116503 00011100 000251 000251 0000104 8 021 0 00001100 000250 000250 O00011F0 4F12D508 00011100 000249 000249 O000011F4 12086652 00001100 000248 000248 OO00FFBO 00000000 00001000 000247 000247 00001214 0000540 00001100 000246 000246 OO00011F8 0267 630 01101100 000245 000245 O00011FC 46180014A 00011100 Figure 6 54 BUS trace Window e If necessary adjust the column width by dragging the header b
94. REJ10J1003 0700 Everywhere you imagine gE NESAS SH 2A SH 2 E200F Emulator Users Manual Renesas Microcomputer Development Environment System SH 2A SH 2 E200F ROE0200F1EMUOOE Rev 7 00 Renesas Technology Revision Date May 19 2006 www renesas com Keep safety first in your circuit designs 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 Remember to give due consideration to safety when making your circuit designs with appropriate measures such as i placement of substitutive auxiliary circuits ii use of nonflammable material or iii prevention against any malfunction or mishap Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Renesas Technology Corp product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belonging to Renesas Technology Corp or a third party Renesas Technology Corp assumes no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials All information cont
95. SAS High perFormance Embedded Workshop AN Session sessione200f system in project Tutorial has been modified do you want to save it Cancel Figure 4 39 Message Box 4 8 Uninstalling the Emulator s Software Follow this procedure to remove the installed emulator s software from the user s host machine As the installed product is registered with the High performance Embedded Workshop uninstall the product on the High performance Embedded Workshop screen It is also possible to uninstall the emulator s software by using Add Remove Programs in the control panel In this case however note that all the tools including the compiler in the High performance Embedded Workshop will be removed 1 Activate the High performance Embedded Workshop 2 Click the Administration button in the Welcome dialog box Welcome M 9 i Cancel 2 C Open a recent project workspace Administration Ee Browse to another project workspace Figure 4 40 Welcome Dialog Box 123 RENESAS 3 The Tools Administration dialog box is opened Tools Administration System Tools Utility Phases Debugger Components Extension Components Communication Tools Figure 4 41 Tools Administration Dialog Box 124 RENESAS 4 Click the mark at the left of Debugger Components in the Registered components list box to list the installed components Then highlight the product name to be uni
96. Sets no address condition Address Sets the single address Range Sets the address range 179 RENESAS Start Sets the single address or the start address of the address range End Sets the end address of the address range Outside Sets other value than that has been set for the single address or address range as the condition Notes 1 This page is only displayed when Branch trace data is specified on the General page 2 The address range can only be specified for AUD event channels Chl and Ch2 3 The mask address can be input for Start when the single address is specified 4 The mask address cannot be input for Start and End when the address range is specified 180 13 N SAS 3 Window page Specifies the address and data conditions of the window trace Ch2 Delay General Window Count Delay Action Address Don t care C Address Range Start 9100000000 End H o0000000 Outside Data Dont care Read Write Read C Write Value 10000000000000000 C Byte C Wod C 32bit Outside E Figure 5 35 Chx Delay Dialog Box Window Page Address Sets the address condition Don tcare Sets no address condition Address Sets the single address Range Sets the address range Start Sets the single address or the start address of the address range End Sets the end address of the address range Outside Sets other
97. Settings dialog box to set the debugging conditions or download modules Reset CPU F 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 microcomputer and executes the user program from the reset vector address Go To Cursor ru Starts executing the user program at the current PC until the PC reaches the address indicated by the current text cursor position Set PC To Cursor N SAS Sets the PC to the address at the row of the text cursor 359 Table A 1 GUI Menus cont Menu Option Debug Run cont Toolbar Shortcut Button Remarks Launches the Run Program dialog box allowing the user to enter the PC or S W breakpoint during executing the user program Step In F11 Executes a block of user program before breaking Step Over F10 mi Executes a block of user program before breaking If a subroutine call is reached then the subroutine will not be entered Step Out Shift RY F11 Executes the user program to reach the end of the current function Step Launches the Step Program dialog box allowing the user to modify the settings for stepping Step Auto Mode Steps only one source line when the Editor window is active When the Disassembly window is active stepping is execu
98. Stop Button 317 13 N SAS 6 17 Break Function The emulator has S W break functions and break functions by eventpoints With the High performance Embedded Workshop an S W breakpoint can be set using the Breakpoint sheet of the Event window The eventpoint condition setting can be set by the event type using the Onchip Event AUD Event Other Event and BUS Event sheets An overview and setting of the break function are described below 6 17 1 S W Break Function The emulator can set S W breakpoints Other methods for setting an S W breakpoint than in section 6 7 Setting an S W Breakpoint are described below e Select Eventpoints from the Code submenu of the View menu The Event window is displayed e Select the Breakpoint sheet 4 gt Breakpoint Onchip Event AUD Event Other Event BUS Event Figure 6 31 Event Window Before S W Breakpoint Setting 318 13 N SAS e Click the Event window with the right hand mouse button and select Add from the popup menu e Enter the address on the line that has p sam sO a 0 in the Address edit box Breakpoint Address Address Value H 1076 Figure 6 32 Breakpoint Dialog Box Note This dialog box differs according to the product For the items of each product refer to the online help e Click the OK button 319 RENESAS The S W breakpoint that has been set is displayed in the Event
99. TAL OR CONSEQUENTIAL DAMAGES OF ANY NATURE OR LOSSES OR EXPENSES RESULTING FROM ANY DEFECTIVE EMULATOR PRODUCT THE USE OF ANY EMULATOR PRODUCT OR ITS DOCUMENTATION EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES EXCEPT AS EXPRESSLY STATED OTHERWISE IN THIS WARRANTY THIS EMULATOR PRODUCT IS SOLD AS IS AND YOU MUST ASSUME ALL RISK FOR THE USE AND RESULTS OBTAINED FROM THE EMULATOR PRODUCT RENESAS 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 The Warranty is Void in the Following Cases Renesas shall have no liability or legal responsibility for any problems caused by misuse abuse misapplication neglect improper handling installation repair or modifications of the emulator product without Renesas prior written consent or any problems caused by the user system All Rights Reserved 1 Circuitry and other examples described herein are meant merely to indicate the characteristics and performance of Renesas semiconductor products Renesas assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein 2 No license is granted by implication or otherwise under any
100. TRACE START STOP TEST v MAIN FPGA2 REGISTER R W TEST TIME STAMP TEST EVA CHIP BOARD REGISTER R W TEST EMULATION TRACE TEST OPTION MEMORY BOARD REGISTER R W TEST 7 AUD WATCH MEMORY TEST MEMORY AUD SUBROUTINE TIME MEASUREMENT TEST v AUD MEMORY TEST AUD LOST TRACE TEST TRACE UNIT MEMORY TEST TROC TEST OPTION MEMORY TEST OPTION MEMORY BOARD TEST v MAIN MEMORY TEST START STOP FILE LOG BACK Figure 3 5 Screen for Selecting Test Note Do not disconnect the USB cable during the test 83 13 N SAS 13 When the test is executed Testing is shown at the left of STATUS 14 When the test is successfully completed Test OK is displayed 15 Select BACK to exit the diagnostic program E E200F F001 SH72060 Test amp Maintenance Program Version FILE COMPONENT MAIN ERROR STOP Board No 0011 TEST COUNT ep r ENDLESS STATUS SDRAM R W TEST BYPASS TEST FLASH MEMORY READ TEST AUD RUN TIME MEASUREMENT TEST REGISTER R W AUD BREAK H UDI REGISTER R W TEST AUD BREAK TEST v AUD REGISTER R W TEST SEQUENTIAL TRACE STOP BREAK TEST TRO FPGA REGISTER R W TEST AUD TRACE OPTION FPGA1 2 REGISTER R W TEST TRACE START STOP TEST I uotis id ber TERR TES LEE Indicating that the test is EVA CHIP BOARD REGISTER R W TEST EMULATION TRACE TEST OPTION MEMORY BOARD REGISTER RAW TEST 7 AUD WATCH MEMORY TEST bein
101. TUO0 Memory unit optional Type number ROE0200F1MSRxx EV chip unit optional Type number ROE57xxxxVKKoo User interface board package support optional Connected to the 36 pin H UDI connector User system IC socket Figure 1 1 System Configuration with the Emulator Note The H UDI is an interface compatible with the Joint Test Action Group JTAG specifications 13 N SAS The emulator provides the following features Various debugging functions Various break and trace functions enable efficient debugging Breakpoints and break conditions can be set by the specific window and trace information can be displayed on a window In addition various emulation functions such as performance and profiling functions are provided High speed downloading is implemented by supporting USB 2 0 Emulator functions can be changed by each debugging phase Various command line functions can be used Realtime emulation Realtime emulation of the user system is enabled at the maximum operating frequency of the CPU Excellent operability Using the High performance Embedded Workshop on the Microsoft Windows 98SE Microsoft Windows Me Microsoft Windows 2000 and Microsoft Windows XP operating systems enables user program debugging using a pointing device such as a mouse The High performance Embedded Workshop enables high speed downloading of load module files Debugging of the user system in
102. Trace Unit to the EV chip Unit e When the external bus trace unit is used with the EV chip unit connect the external bus trace unit to the EV chip unit as shown in figure 2 13 Figure 2 13 Connecting the External Bus Trace Unit to the EV chip Unit 52 13 N SAS e After checking the location of pin 1 connect the user system to the external bus trace unit Figure 2 14 Connecting the User System to the External Bus Trace Unit CAUTION Check the location of pin 1 before connecting 53 13 N SAS 2 3 7 Connecting the E200F Emulation Memory Unit to the EV chip Unit When the emulation memory unit is used with the EV chip unit connect the emulation memory unit to the EV chip unit figure 2 15 Emulation memory unit Figure 2 15 Connecting the Emulation Memory Unit to the EV chip Unit 54 RENESAS After checking the location of pin 1 connect the EV chip unit emulation memory unit and trace cable r 5 amp T Lus pug a ME net HP E Figure 2 16 Connecting the Emulation Memory Unit EV chip Unit and Trace Cable CAUTION Check the location of pin 1 before connecting 55 13 N SAS 2 3 8 Connecting the 200 External Bus Trace Unit Emulation Memory Unit EV chip Unit When the external bus trace unit is used with the emulation memory unit and EV chip unit as shown in figure 2 17 connect them in the positions
103. Workshop User s Manual 6 13 Watching Variables eer rr eite ERU YU E SIRE Ter ess 308 6 14 Displaying Local Variables om eSI e iesea 311 6 15 Stepping Through a Program seen eene eret rennen reete nne 312 6 15 1 Executing Step In Command eese 312 6 15 2 Executing Step Out Command eene 314 6 15 3 Executing Step Over Command sse 315 6 16 Forced Breaking of Program Executions eese rene eene 317 6 17 Break Punction ence t t I E ER E PER EE EP EPIS SERE De rip eee rn 318 6 17 1 S W Break sese tecto rnc ect one Rene 318 6 18 Break Function by an Eventpoint iuee i cisci ipte er oreet ae rep hito ets 323 6 18 1 Setting the Break by an Onchip 323 6 18 2 Setting the Sequential Onchip 328 6 19 Trace Functions ies ee E eerte re ORE DE E i 332 6 19 1 Displaying the Internal AUD eee 334 6 19 2 Displaying the BUS trace Window eene 341 6 20 Stack Trace FUnDctOn in ertet ire E e IHRE REIS IE EEE E ERSE 346 6 21 Download Function to the Flash Memory Area eseseseeeeeeeen rene 348 6 227 What NEXT sci cete tM ND I MIL E 353 Section 7 Troubles EB Deest bri Costo te eame Dade Sis ue OUS 355 A
104. a 00001076 P sam s a 0 0000107a P sam sl a 1 0000107e p_sam gt s2 a 2 00001082 p_sam gt s3 a 3 00001086 p_sam gt s4 a 4 0000108 P sam sb a 5 0000108 p_sam gt s6 a 6 00001092 p_sam gt s al7 00001096 P sam s8 a 8 0000109a p_sam gt s9 a 9 0000109 7 lete p_sam 00001058 ipid abort void Figure 6 42 Editor Window at Execution Stop Sequential Break 330 RENESAS The Status window displays the following contents SHxxxx E200F SYSTEM E7 E10 Emulator USB Driver SHXXXX Ready Cause of last break EVENT CONDITION 2 for C bus EVENT CONDITION 1 for C bus Run time count 00h OO0min 00s OO00ms 907us 640ns Emulation mode Normal Endian Big lt i gt Memory A Platform A Events Figure 6 43 Displayed Contents of the Status Window Sequential Break Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help e The sequential break conditions that have been previously set are deleted Click the Event window with the right hand mouse button and select Delete All from the popup menu to cancel all eventpoint conditions that have been set e Select Combination action from the popup menu by clicking the Event window with the right hand mouse button The Combination action dialog box will open figure 6 40 e Select the Don t care radio button and click the OK button 3
105. a Perform memory write or S W break only to the RAM area When the flash memory erase is enabled the Stop button cannot stop erasing e Anexample of downloading to the flash memory The following is an example of downloading to the flash memory manufactured by Intel Corporation type number G28F640J5 150 that has been connected as shown in figure 6 58 A sample is provided in the Fmtool folder in the installation destination folder Create a program that suits the user specifications by referring to this sample Table 6 4 Board Specifications Item Contents SDRAM address H 0C000000 to H OFFFFFFF Flash memory address H 00000000 to H O1FFFFFF Bus width of flash memory 32 bits Operating environment Endian Big endian Flash memory SHxxxx FIA bus buffer 32 Mbytes FIA bus buffer FD bus buffer Figure 6 58 Flash Memory Wiring 351 13 NE SAS Table 6 5 Sample Program Specifications Item Contents RAM area to be used H 0C001000 to H 0C0015BF Write module start address H 0C001100 Erase module start address H 0C001000 e Since the SDRAM is used the bus controller must be set e Set the options on the Loading flash memory page in the Configuration dialog box as follows Configuration General Loading flash memory Loading flash memory C Disable Erasing flash memory C Disable Enable Eile name c Hew3 Tools Renesas DebueCor Browse Bus width of flash me
106. able connectors Connectors for connecting the trace cable in the external bus trace unit Be sure to use the optional trace cable 15 RENESAS External Bus Trace Unit Optional Rear View CN Figure 1 13 External Bus Trace Unit Optional Rear View a User system interface Connectors for the user system interface of the external bus trace connectors for the external They are connected to the EV chip unit or the dedicated bus trace connectors on the user system b EV chip unit interface Connectors for the EV chip unit interface They are connected to connectors the dedicated connectors on the EV chip unit 16 13 N SAS Expansion Profiling Unit Optional Rear View eee Figure 1 14 Expansion Profiling Unit Optional Rear View a Optional connectors in the Connectors for the interface to connect the expansion profiling expansion profiling unit unit and the main unit case They are connected to the optional connector on the main unit case RENESAS Emulation Memory Unit Optional Upper View EPM7512AEQC208 7 T BAF490043A 2222 01 700000 rj Figure 1 15 Emulation Memory Unit Optional Upper View a External bus trace unit Connectors for connecting the external bus trace unit When the connector 1 CN1 external bus trace unit is not used connect the optional trace cable b External bus trace unit Connectors for connecting the external bus
107. acestop Break AUD modes Enable free trace Time stamp 20ns z AUD trace display Start pointer p 255 End pointer po Figure 6 45 I Trace AUD Trace acquisition Dialog Box Select I Trace for Trace Type and click the OK button 335 RENESAS b Setting the trace acquisition condition Select acquisition of information in the branch source or branch destination in the I Trace AUD Trace acquisition dialog box After selecting the condition to be acquired in Acquisition click the OK button in the I Trace AUD Trace acquisition dialog box I Trace AUD Trace acquisition Trace mode r Trace type Trace AUD function r 1 mode M Bus amp Branch 7 Acquisition Read Write PC relative addressing Branch Data access cPU OMA ADMA Instruction Fetch When trace buffer full Trace continue AUD mode jranch trace dow trace Jv Channel v Channel B Software trace AUDmodel Rea Non realtime trace UDmode2 Trace continue Tracestop Break SUD modes Enable free trace Time stamp AUD trace display Start pointer D 255 End pointer Figure 6 46 I Trace AUD Trace acquisition Dialog Box Note The items that can be set in this dialog box differ depending on the product For details on the settings
108. age Address Sets the address condition Don tcare Sets no address condition Address Sets the single address Range Sets the address range Start Sets the single address or the start address of the address range End Sets the end address of the address range Outside Sets other value than that has been set for the single address or address range as the condition 183 RENESAS Data Sets the data condition Don tcare Sets no data condition Value Sets the data bus value mask data can be input Outside Sets other value than that has been set for Value as the condition Notes 1 This page is only displayed when Software trace data is specified on the General 184 page The address range can only be specified for AUD event channels Chl and Ch2 The mask address can be input for Start when the single address is specified The mask address cannot be input for Start and End when the address range is specified 13 N SAS 5 Count page Specifies the satisfaction count conditions Ch2 Delay General Branch Count Delay Action Count Don t care Numbers 07 Cancel Apply Figure 5 37 Delay Dialog Box Count Page Don tcare Sets no satisfaction count numbers Sets a value as the satisfaction count condition D 1 to D 65535 is available Note If Trace get is selected on the Action page
109. age from the popup menu on the left hand window Range statistic UUZUFF Figure 5 109 Percentage Shown in the Code Coverage Window 280 RENESAS e Right hand window Displays coverage information at the or assembly language level The items are displayed as follows Executed the instruction was executed or 0 the instruction was not executed Address Instruction address Assembler Disassembled program Source or assembly source program Code Coverage Window Specifying a Source File Code Coverage 00001024 00001199 5 Functions Statistic Executed Address Assembler Source 00001024 R10 60 R15 void main void 00001026 R11 60 R15 00001028 A R12 R15 00001024 z R13 R15 0000102 R14 R15 0000102 PR G R15 00001030 H CC R15 00001032 H 00 R10 00001034 G H 0084 8 PC RZ while 1 00001036 R10 R4 00001038 GRZ 0 0 0 0 0 0 0 0 0 0 0 Figure 5 110 Code Coverage Window Specifying a Source File This window is divided into two by the splitter e Left hand window Displays the coverage range and statistical information of the coverage The items are displayed as follows Functions Function to be selected for coverage Statistic CO coverage value in percentage The percentage will be displayed in the Statistic column by selecting Percentage from the popup menu in the left hand window Clicking the column tab allows the
110. ained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corp without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corp or an authorized Renesas Technology Corp product distributor for the latest product information before purchasing a product listed herein The information described here may contain technical inaccuracies or typographical errors Renesas Technology Corp assumes no responsibility for any damage liability or other loss rising from these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corp by various means including the Renesas Technology Corp Semiconductor home page http www renesas com When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products Renesas Technology Corp assumes no responsibility for any damage liability or other loss resulting from the information contained herein Renesas Technology Corp semiconductors are not designed or manufactured for use in a device or System that is used under circumstance
111. allees of the function on the right The numbers of times the function calls the called functions or is called by the calling functions are also displayed in this window INITSCT Figure 5 92 Profile Chart Window 5 12 10 Types and Purposes of Displayed Data The profiling function is able to acquire the following information Address You can see the locations in memory to which the functions are allocated Sorting the list of functions and global variables in order of their addresses allows the user to view the way the items are allocated in the memory space Size Sorting in order of size makes it easy to find small functions that are frequently called Setting such functions as inline may reduce the overhead of function calls If you execute larger functions more of the cache memory will need to be updated This information allows you to check if those functions that may cause cache misses are frequently called Stack Size When there is deep nesting of function calls pursue the route of the function calls and obtain the total stack size for all of the functions on that route to estimate the amount of stack being used 259 RENESAS Times Sorting by the number of calls or accesses makes it easy to identify the frequently called functions and frequently accessed global variables Profile Data Measurement of a variety of MCU specific data is also available as well as items that can be measured with the performance measuremen
112. ar immediately below the title bar Note The type and the amount of information that can be acquired by a trace differ depending on the product For details on the specifications of each product refer to the online help 345 RENESAS 6 20 Stack Trace Function The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing Note This function can be used only when the load module that has the Dwarf2 type debugging information is loaded Such load modules are supported in SHC C compiler including OEM and bundle products V7 0 or later e Double click the S W Breakpoints column in the sort function and set an S W breakpoint 0000202 Sample sort long long t Inl 1 Ks gaps 0000203 gap 5 while gap gt 0 00002046 for kz0 k lt gap 1 00002054 for i ktgap i lt 10 i itgap 0000205 for jzi zap j gt k j i gap 0000206 if a j gt a j tgap t alil 00002078 ali 0000207c alitgap t else break i 00002090 gap gap i oo0020ae void Sample ichange long long tmp 10 ink ls 000020b0 150 i lt 10 000020b8 tmp i a i o00020cc for iz0 i lt 10 ooo020d0 ali tmp 9 1 Figure 6 55 Editor Window S W Breakpoint Setting 346 13 N SAS e Set the same program counter and stack p
113. ated random data in ascending order change function then sorts the data in descending order The file tutorial cpp contains source code for the tutorial program The file Tutorial abs is compiled load module in the Dwarf2 format Notes 1 Operation of Tutorial abs is big endian For little endian operation Tutorial abs must be recompiled After recompilation the addresses may differ from those given in this section 2 This section describes general usage examples for the emulator For the specifications of particular products refer to the additional document Supplementary Information on Using the SHxxxx or the online help 3 The operation address of Tutorial abs attached to each product differs depending on the product 291 13 N SAS 6 2 Running the High performance Embedded Workshop To run the High performance Embedded Workshop refer to section 4 1 System Check 6 3 Setting up the Emulator The clocks which are used for data communications must be set up on the emulator before the program is downloaded e AUD clock A clock used in acquiring AUD traces If its frequency is set too low complete data may not be acquired during realtime tracing Set the frequency not to exceed the upper limit for the MCU s AUD clock The AUD clock is only needed for using emulators that have an AUD trace function e JTAG H UDD clock TCK A communication clock used except for acquiring AUD trace If its frequency is se
114. been matched Trace get Acquires AUD trace after conditions have been matched Performance start Starts or ends AUD performance measurement after conditions have been matched When this option is selected Performance option is enabled and the time interval of the performance measurement can be specified Sampling time Specifies the time interval of the AUD performance measurement as any of the following values 20 ns 100 ns 400 ns or 1 6 us Enable output trigger Specifies whether or not the trigger is output after conditions have been matched Notes 1 For AUD performance measurement two AUD event channels are used to start and stop measurement When an event channel is specified for performance measurement the related channels Ch1 to Ch2 Ch3 to Ch4 Ch5 to Ch6 and Ch7 to Ch8 must also be specified 2 The Performance option is only displayed for AUD event channels Ch1 Ch3 Ch5 and Ch7 188 13 N SAS 8 Sequential AUD Event dialog box The sequential AUD event occurs when all the AUD Eventpoint conditions are satisfied in the specified order AUD event channel Chl can be specified as the reset point When the reset point is passed the satisfied eventpoint condition is disabled and checking the first eventpoint condition is started Sequential AUD Event Dont care Channel select C Channel 3 gt 2 C Channel 5 gt 4 gt 3 gt 2 C Channel 6 gt 5 gt 4 gt 3 gt 2 C Channe
115. ble Normal Disable Normal Disable no Breakpoint Onchip Event A AUD Event Other Event BUS Event Figure 5 32 Event Window AUD Event Sheet Using eight event detection channels sets eight eventpoints Notes 1 Since the AUD eventpoint condition is set according to the information in the MCU output from the AUD pin the AUD trace information acquisition condition must be set Set the AUD trace information acquisition condition for the AUD eventpoint condition 2 When debugging is performed without any connection to the EV chip unit a break function cannot be selected in AUD event Items that can be displayed in the sheet are listed below Type AUD event channel number and type Normal Standard event channel Delay Event channel that delay conditions can be set Reset Event channel that can be set as the reset point of the AUD sequential event State Whether the eventpoint is enabled or disabled Enable Valid Disable Invalid 176 N SAS Condition A condition that satisfies an eventpoint The displayed contents differ depending on the channel Action Operation of the emulator when an eventpoint condition is satisfied The displayed contents differ depending on the channel When an event channel is double clicked or selected and Edit is selected from the popup menu in this window the Chx dialog box is displayed The Chx dialog box consists of the General Branch Window
116. cancel S W breakpoints Onchip Event sheet Displays or sets the settings made for on chip event channels AUD Event sheet Displays or sets the settings made for AUD event channels BUS Event sheet Displays or sets the settings made for external bus event channels Other Event sheet Displays or sets the settings made for other event channels 167 13 N SAS 5 8 4 Setting S W Breakpoints It is possible to display modify and add S W breakpoints on the Breakpoint sheet Breakpoint Enable Address 00000000 Break 4 gt y Breakpoint 4 Onchip Event AUD Event Other Event BUS Event Figure 5 25 Event Window Breakpoint Sheet Items that can be displayed in the sheet are listed below Type Breakpoint State Whether the breakpoint is enabled or disabled Condition An address that the breakpoint is set Address Program counter Corresponding file name line and symbol name Action Operation of the emulator when a break condition is satisfied Break Breaks program execution 168 RENESAS Select Add or the S W breakpoint displayed in this window and then select Edit from the popup menu to display the Breakpoint dialog box Breakpoint Address Address Value Figure 5 26 Breakpoint Dialog Box This dialog box specifies address conditions of S W breakpoints A breakpoint address to be set is specified in the Value edit box The PC register can also be
117. cked not available when Don t care has been checked WRITE Detects write cycles when this box is checked not available when Don t care has been checked 234 RENESAS 5 Select the type being accessed The selection is not available when a time stamp is acquired Trace Filter General Address data Bus RAW Setting BRANGH DESTINATION MEMORY LOST OPU Wait Cancel Apply Figure 5 71 Trace Filter Dialog Box Page Don care Detects no type condition when this box is checked Setting Detects the specified type condition not available when Don t care has been checked 235 RENESAS 6 Bus page Select the status of a bus The selection is not available when a time stamp is acquired Trace Filter General Address data Type Bus E Cancel Apply Figure 5 72 Trace Filter Dialog Box Bus 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 236 RENESAS 5 9 14 Analyzing Statistical Information Choose Statistic from the popup menu to open the Statistic dialog box and analyze statistical information under the specified conditions Statistic r Statistic Analysis aul C Range ltem lt None gt Start
118. ct the emulator However it is not needed to connect the emulator immediately after the High performance Embedded Workshop has been activated To connect the emulator use one of the methods a and b below For operation during connection refer to section 4 1 System Check 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 After the Debug Settings dialog box has been set when the dialog box is closed the emulator is connected b Connecting the emulator without the setting at emulator activation The emulator can be easily connected by switching the session file that the setting for the emulator use has been registered 109 13 N SAS test High performance Embedded Workshop File Edit view Project Options Build Debug Memory Tools Window Help nsug S xsejovzal l osm m ej amp amp j sms 2 7 gt E BH ee s jos aes amp G stirpe GO m Eme SOT m N ERE H EJ mE mds 19 Eg test C3 source file 2 Download modules 3 Dependencies Figure 4 28 Selecting the Session File In the list box that is circled in figure 4 28 select the se
119. ction is used Acquiring useful information as much as possible by the Trace Acquisition settings improves the efficiency in analysis of data because the capacity of the trace buffer is limited Use the filtering function in the Trace Filter dialog box To open the Trace Filter dialog box select Filter from the popup menu The Trace Filter dialog box has the following pages Table5 3 Trace Filter Dialog Box Pages Page Description General Selects the range for filtering Address Sets address conditions Data Sets data conditions Type Selects the type of trace information Bus Selects the type of a bus R W Selects the type of access cycles Note Items other than General and Address depend on the emulator in use For details refer to the online help 229 13 NE SAS Set filtering conditions and then press the OK button This starts filtering according to the conditions Clicking the Cancel button closes the Trace Filter dialog box which holds the settings at the time when the dialog box was opened In filtering only the trace information that satisfies one or more filtering conditions set in the above pages will be displayed in the Trace window Filtering conditions can be changed several times to analyze data because the content of the trace buffer is not changed by filtering 230 13 N SAS 1 General page Set the range for filtering Trace Filter Gen
120. d color available when Change has been selected A check in this box selects restoration of the color of those data which have not been updated in a specified interval to the color selected in the Background option The specified interval is the interval for monitor acquisition available when Change Gray or Appear has been selected Detail Not supported in the emulator 158 N SAS History Displays the previous settings Note Selection of the foreground or background color may not be available depending on the operating system in use After setting clicking the OK button displays the Monitor window hs z scn J 4 5 6 7 8 49 a B c 4D F 01 OO 2c OO 01 00000010 00 00 08 44 OO OO 08 48 c 3c FO 35 cc E8 16 OO D H 5 Figure 5 19 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 5 2 Changing the Monitor Settings Selecting Monitor Settings from the popup menu of the Monitor window displays the Monitor Setting dialog box which allows the settings to be changed Colors the size of accesses and the display format can be easily changed from Color
121. d method 2 of Debugging without any connection to the EV chip unit above is unavailable the power of the user system may not be input or the RESET signal may not be input to the device Check the input circuits for the power of the user system and the reset pin hexxxx not find RESET signal Please check RESET and Vcc d Retry Ignore Figure 4 15 Can not find RESET signal Dialog Box 98 13 N SAS b If the following dialog box is displayed the user system may be turned off or the H UDI port connector may not be correctly connected Check that the user system is turned on and the H UDI port connector is connected hexxxx IN Check the connection between the H UDI pins and the H UDI port connector Figure 4 16 Check the connection Dialog Box c Ifthe following dialog box is displayed the device may not correctly operate Check if there are reasons for illegal device operation IN COMMUNICATION TIMEOUT ERROR Figure 4 17 COMMUNICATION TIMEOUT ERROR Dialog Box Error JTAG boot Figure 4 18 Error JTAG boot Dialog Box 4 If the emulator is not activated due to other reasons a message box corresponding to the status is displayed Use the message as a reference to check the wiring on the board 99 RENESAS 4 2 Method for Activating High performance Embedded Workshop To activate the High performance Embedded Workshop follow the procedure listed below 1
122. decaaswisiocctavndansye 77 3 1 Last Of Specifications iieri it Rd e i rece eee te cir TI 3 2 User System Interface ca eren terr tero Er ere ae noa eta ene 77 3 3 Reducmg EMI NOISe afr tes japesindasesesedesecsssteadtaas 80 SA Diagnostic Procedure 81 3 4 1 Installing the Diagnostic 81 3 4 2 Executing the Diagnostic een eere 81 3 44 5 Creating a Los Pile iie educere tte REPE rE HEU IER EF REESE ERROR 85 3 4 4 Updating the Diagnostic Program eene enne 86 Section 4 Preparations for Debugging 89 System Check P E 89 4 2 Method for Activating High performance Embedded Workshop 100 4 2 1 Creating the New Workspace Toolchain Not Used esses 101 4 2 2 Creating the New Workspace Toolchain Used eee 105 4 2 3 Selecting an Existing Workspace eesesseeseeeeeeeeeenennen een eee 111 4 3 Setung at Emulator ACUVALOI eerte tbe EE EREA PR ee dean 113 AA Debug ies aie ed E este stay Oe RO ue oves 115 4 4 1 Selecting a SESSION iecit Ritter repe etri etre ee RE yn ds 115 4 4 2 Adding and Removing Sessions esent 1
123. detection functions in addition to the standard S W breakpoints of the High performance Embedded Workshop 1 Events In most practical debugging applications the program or hardware errors that you are trying to debug occur under a certain restricted set of circumstances For example a hardware error may only occur after a specific area of memory has been accessed Tracking down such problems using simple S W breakpoints can be very time consuming With the emulator the combination of the specified conditions such as address or data condition can be defined as the eventpoint condition When an eventpoint condition is satisfied an event will occur The event detection function of the emulator can be used to detect a generated event and control the operations of break trace and performance measurement start end 2 Types of Events The emulator has four types of events a On chip event function Onchip Event This is a function that uses an on chip break controller and sets eventpoints according to the information in the MCU The eventpoints can be defined as a combination of one or more of the following e Address condition e Data condition e Bus state condition e Event count condition For an operation when an event is detected break internal trace acquisition acquisition start acquisition stop or internal performance measurement start end can be specified This function can be set in the Onchip Event sheet of the Event
124. downloading e Immediately after downloading Specify the timing for executing the command chain in the Command batch file load timing drop down list box In addition register the command chain file that is executed at the specified timing in the Command Line Batch Processing list box 114 13 N SAS 4 4 Debug Sessions The High performance Embedded Workshop stores all of your builder options into a configuration In a similar way the High performance Embedded Workshop stores your debugger options in a session The debugging platforms the programs to be downloaded and each debugging 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 Each session s data should be stored in a separate file in the High performance Embedded Workshop project Debug sessions are described in detail below 4 4 1 Selecting a Session The current session can be selected in the following two ways e From the toolbar Select a session from the drop down list box figure 4 33 in the toolbar Figure 4 33 Toolbar Selection 115 13 N SAS e From the dialog box 1 Select Options gt Debug Sessions This will open the Debug Sessions dialog box figure 4 34 etau sion SessionEZ00F SYSTEM REMOVE HIGBETHES DefaultSession Figure 4 34 Debug Sessions Dialog
125. e r BUS buffer over flow Trace continu Trace stop Break BUS trace mode v Enable free trace Time stamp clock 20ns m Trace display range Start pointer 255 End pointer po Figure 5 60 BUS acquisition Dialog Box 219 RENESAS Trace type Selects the type of trace acquisition BUS buffer over flow Specifies the operation when the external bus trace buffer of the emulator becomes full Trace continue The oldest trace information is overwritten by the latest information Trace stop When the trace buffer becomes full the trace information is no longer acquired Break A break occurs BUS trace mode Sets the mode when the external bus trace function is used Enable free trace Enables external bus free trace Time stamp clock Specifies the resolution of the timer for time stamp as any of the following values 20 ns 100 ns or 400 ns Trace display range Sets the trace display range Start pointer Enters the numerical start pointer value of the display range End pointer Enters the numerical end pointer value of the display range Note In some products this window allows settings of other trace functions as well as the bus trace function For specifications of each product refer to the online help 5 9 5 Hiding the Trace Column It is possible to hide any column not necessary in the Trace window Selecting a column you want to hide from the pop
126. e Realtime Profile Window Select View gt Performance gt Realtime Profile to open the Realtime Profile window Clicking the column header changes the ascending or descending order of items in displayed contents f Realtime Profile Ol x Page Function Address size Count Time PowerON Reset PC H 800 H 30 47789 18253h054min011s721ms117us956ns Manual Reset PC H 830 H 1C 61453 i8253h054min011s721msii7us956ns INT Illegal code H 84C H 4 47789 18253h054minO113872 1ms117us956ns _Durmy H 850 H 4 61453 i18253h054min011s721msii7us956ns _sbrk H 1000 H 24 47789 i8253h054min011s721msii7us956ns main H 1024 H 46 61453 18253h054min011s721ms117us956ns 21 H 10D8 H C 47789 18253h054minO118721ms117us956ns _h2 H 10EC H 8 61453 i8253h054min011s721msii7us956ns func3 H 10F4 H 16 47789 18253h054min011s721msi17us956ns _func4 H 1104 H 4 61453 18253h054min011s721ms117us956ns 1 1 1 1 1 1 i i 1 1 Figure 5 99 Realtime Profile Window The following information can be acquired Address You can see the locations in memory to which the functions are allocated Size Sorting in order of size makes it easy to find small functions that are frequently called Setting such functions as inline may reduce the overhead of function calls If you execute larger functions more of the cache memory will need to be updated This information allows you to check if those functions that may cause cache misses are frequently called Count The number of
127. e function When the profiling function is enabled it is invalid to select the internal trace mode as all items of the internal trace mode are internally selected Do not use the internal trace when the profiling function is enabled d Continuous trace function only for the supported devices When the profiling function is enabled do not use the continuous trace function that is used in the internal trace function The profile data cannot be measured correctly e Halt function When the profiling function is enabled do not use the halt function of the internal AUD and external bus traces f Memory access during user program execution When the profiling function is enabled memory access is disabled during user program execution g When the profiling function is used a break occurs if a branch instruction is generated Accordingly the realtime emulation will not be performed In addition since the emulator firmware is controlled on generation of a break the executed result of the branch instruction may be displayed on the Internal AUD Usermemory trace window when the execution is returned to the user program from the emulator firmware In this case EML is displayed 261 13 NE SAS 3 Others a When the profiling function is used an internal break occurs in the execution of the user program Therefore the measurement result of AUD performance analysis will contain errors b When the profiling function is u
128. e to the next found item 221 13 N SAS 1 General page Set the range for searching Trace Find General Address data Type Bus RAW Trace search range Not designation Upward search Start PTR 782767 End Cancel Apply Figure 5 61 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 Note Along with setting the range for searching PTR values to start and end searching can be set in the Start PTR and End PTR options respectively 222 RENESAS 2 Address page Set an address condition Trace Find General Address data Type Bus R W Dont care Setting Value HFFEF80 Cancel Apply Figure 5 62 Trace Find Dialog Box Address Page Don t care Detects no address when this box is checked Setting Detects the specified address Value Enter the address value not available when Don t care has been checked 223 RENESAS 3 Data page Set a data condition Trace Find General Address data Type Bus RAW Don t care Setting Value H o000 Cancel Apply Figure 5 63
129. ea is specified as the user area Multiplexed Address pins setting button Notes 1 2 e The Multiplexed Address pins setting dialog box is opened to set the states of the use of multiplexed address pins e Selecting Emulation memory unit MAP n in the Memory Mapping dialog box enables the Multiplexed Address pins setting button e The states of the use of multiplexed address pins must be set for each 4 Mbyte emulation memory that has been installed on the emulation memory unit The minimum unit for mapping the memory is fixed to 4 Mbytes When the external bus trace unit is connected to the emulator the 4 Mbyte memory can be allocated to one area When the 8 Mbyte emulation memory unit is connected to the emulator the 4 Mbyte memory can be allocated to two areas When the 16 Mbyte emulation memory unit is connected to the emulator the 4 Mbyte memory can be allocated to four areas Therefore the 4 Mbyte memory can be allocated to a maximum of five areas one area for the external bus trace unit and four areas for the emulation memory unit When using the emulation memory that has been installed on the emulation memory unit be sure to set the states of the use of multiplexed address pins The performance of the emulation memory differs whether it is installed on the external bus trace unit or on the emulation memory unit Note the settings of the bus state controller BSC The external bus trace unit and the e
130. eature is not available when Setting gt Only Executed Functions is checked in the pop up menu of the Profile window When the High performance Embedded Workshop does not read any stack information files the data about the functions executed during measurement will be displayed by the profiling function To make the linker create a stack information file choose Options SuperH Risc engine Standard Toolchain and select Other from the Category list box and check the Stack information output box in the Link Library page of the Standard Toolchain dialog box 250 13 N SAS SuperH RISC engine Standard Toolchain E x Configuration C C Assembly Link Librar Standard Library CPU 4 gt Debug E200F SYSTEM Category Other E omm Miscellaneous options i utora 9 C source file TUS ni at the end tack information Ol Jl H E C source file Com 4 pu H E Assembly source file uiia Es A ES nj Linkage symbol file ow memory use during linkage User defined options Absolute Relocatable Library Options Link Library noprelink rom D R nomessage list CONFIGDIR PROJECT NAME map nooptimize start DVECTTBL DINTTBL OO PResetPRG PIntPRG 08 Figure 5 86 Standard Toolchain Dialog Box 1 251 13 N SAS 5 12 2 Profile Information Files To create a profile information file choose the Output Profile Information Files menu option fr
131. efore downloading a program it must be registered to the High performance Embedded Workshop as a load module For registration refer to section 4 3 Setting at Emulator Activation 2 To download a program to the external RAM or emulation memory the bus controller and ports must be initially set in the area for downloading Especially check that the initialization of SDRAM or the setting of the bus width is appropriate for the user system 148 N SAS 5 3 Viewing the Source Code Select your source file and click the Open button to make the High performance Embedded Workshop 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 f tutorial cpp 00001024 TUM main void long a 10 long j int is class Sample p sam 00001036 while 1 00001034 p sam new Sample 00001038 for iz0 i 10 00001044 j rand 00001048 Ure 0 00001050 j 00001058 ali 5 3 00001068 P sam sort a 00001070 pP sam change a 00001076 p_sam gt s0 a 0 0000107a p_sam gt sl al1 Figure 5 10 Editor Window 149 RENESAS In this window the following items are shown on the left as line information The first column Source address column Address information The second column Onchip event column On chip event information The third column AUD event column AUD event information The fourth column BUS event co
132. ent occurs Channel 5 gt 4 gt 3 gt 2 After conditions have been matched in the order of bus event channel 5 gt 4 gt 3 gt 2 a Sequential BUS Event occurs 199 RENESAS Note 200 Channel 6 gt 5 gt 4 gt 3 gt 2 After conditions have been matched in the order of bus event channel 6 gt 5 gt 4 gt 3 gt 2 a Sequential BUS Event occurs Sequential reset Selects whether or not bus event channel Ch1 is used as the reset point Disable Not used as the reset point Enable Used as the reset point Action Specifies the operation after the Sequential BUS Event has been detected Break Breaks after the Sequential BUS Event has been detected Trace stop Stops external bus trace after the Sequential BUS Event has been detected When the Sequential BUS Event condition is set and the eventpoint condition is edited with the bus event channel that has been selected for Channel select the Action page cannot be modified To modify the settings of the Action page cancel the Sequential BUS Event condition 13 N SAS 5 8 8 Setting Other Eventpoints On the Other Event sheet the settings for Other Eventpoints are displayed and modified Disable None Runtime Count Disable None 4 gt Breakpoint Onchip Event AUD Event Other Event A BUS Event Figure 5 49 Event Window Other Event Sheet Items that can be displayed in the shee
133. erage Display Range Dialog Box The following items can be specified Start Address Start address in hexadecimal when the prefix is omitted End Address End address in hexadecimal when the prefix is omitted Clicking the OK button changes the coverage range to be displayed 283 RENESAS e When the coverage range for display has been specified by a source file Selecting Set Range from the popup menu opens the Coverage Display Range dialog box which allows the user to change the condition for acquisition of information on executed instructions Coverage Display Range End address 55 Cancel File Tutorial Source SORT CPP gt Browse Figure 5 113 Coverage Display Range Dialog Box Specifying a Source File The following item can be specified File Specifies a source file that has or CPP as its file type name from the current project This allows a function included in the specified file to be set as the coverage range C will be provided if the file type name is omitted Files with a type name other than C or CPP cannot be specified here A placeholder or the Browse button can be used Clicking the OK button changes the coverage range to be displayed 284 RENESAS 5 15 5 Clearing the Coverage Information e Clearing the coverage information of the specified range Selecting Clear Coverage Range from the popup menu opens the Clear Coverage Range dia
134. eral Address data Type Bus RAW Don t care other pages Enable Filter Not designation Trace display range Start PTR End PTR Cancel Apply Figure 5 67 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 Not designation 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 End PTR Enters a PTR value to end filtering Note Along with setting the range for filtering PTR values to start and end filtering can be set in the Start PTR and End options respectively 231 RENESAS 2 Address page Set address conditions Trace Filter Y Y ont care Setting Point C Range From Cancel Apply Figure 5 68 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
135. eration such as memory write or BREAKPOINT should be set only for the RAM area 1 3 9 Stack Trace Function The emulator uses the stack s information to display the name of the calling function for a function at the current program counter This function can be used only when the load module that has the Dwarf2 type debugging information is loaded 1 3 10 User interrupt Open Function during User Program Break Some devices to be debugged enable all interrupts while executing emulation to the user During a user program break it is possible to specify the mode whether or not the interrupt processing is executed 36 13 N SAS 1 3 11 Online Help An online help explains the usage of each function or the command syntax that can be entered from the command line window Select Emulator Help from the Help menu to view the emulator help 1 4 Environmental Conditions CAUTION Observe the conditions listed in tables 1 4 and 1 5 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 4 Environmental Conditions Item Specifications Temperature Operating 10 C to 35 C Storage 10 C to 50 C Humidity Operating 3596 RH to 80 RH no condensation Storage 35 RH to 80 RH no condensation Vibration Operating 2 45 m s max Storage 4 9 m s max Transportation 14 7 m s max Ambient gases No corro
136. ess values e External bus data values e Interrupt signal states e Time stamp values e Mnemonics e Operands e Source lines Note The types of trace information that can be acquired differ depending on the product For details on the specifications refer to the online help 333 13 NE SAS 6 19 1 Displaying the Internal AUD Window Select Trace from the Code submenu of the View menu The Trace Window Type dialog box is displayed Trace Window Type Figure 6 44 Trace Window Type Dialog Box Select Internal AUD and click the OK button The Internal AUD window will appear 1 Internal trace function The methods to acquire the internal trace are described below a Setting the trace acquisition mode Click the Internal AUD window with the right hand mouse button and select Settings from the popup menu to display the I Trace AUD Trace acquisition dialog box 334 13 N SAS I Trace AUD Trace acquisition Trace mode r Trace type Trace AUD function 1 mode M Bus amp Branch Acquisition Read Write PC relative addressing Branch Data access CPU DMA ADMA Instruction Fetch When trace buffer full Trace continue r AUD mode Branch trace Jv Window trace Jv Channel A Jv Channel B Software trace AUD model Realimetrace C Non realtime trace AUDmode2 Trace continue Tr
137. et CS An AUD performance stop is set The bitmap symbols for break above are shown by double clicking the AUD event column These are also set by using the popup menu Cha Edit Eha Remove Ch4 Ch amp Ch gt gt chs gt gt gt che gt Figure 5 12 Popup Menu for the AUD Event Column Note The contents of the AUD event column are erased when conditions other than the address condition are added to each channel by using the Edit menu or in the Event window 151 NE SAS e BUS event column The BUS event column displays the following item An external bus break is set An external bus sequential break is set 4D An external bus trace acquisition is set GT An external bus trace start is set ET An external bus trace stop is set An external bus trace sequential stop is set The bitmap symbols for break above are shown by double clicking the BUS event column These are also set by using the popup menu Figure 5 13 Popup Menu for the BUS event Column Note The contents of the BUS event column are erased when conditions other than the address condition are added to each channel by using the Edit menu or in the Event window e S W Breakpoints column S W Breakpoints column displays the following items A bookmark is set An S W breakpoint is set gt PC location 152 13 N SAS 2 To switch off a column in all source files Click the right hand
138. executed instructions in the and assembly language levels to measure the CO coverage 1 3 8 Memory Access Functions The emulator has the following memory access functions 1 Memory read write function Memory window The memory contents are displayed in the window Only the amount specified when the Memory window is opened can be read Since there is no cache in the emulator read cycles are always generated If the memory is written in the Memory window read cycles in the range displayed in the Memory window will occur for updating the window When the Memory window is not to be updated change the setting in Lock Refresh from the popup menu me command A command line function that reads or writes the specified amount of memory at the specified address 34 13 N SAS 2 User program downloading function A load module registered in the workspace can be downloaded Such module can be selected from Download Module in the Debug menu Downloading is also possible by a popup menu that is opened by right clicking on the mouse at the load module in the workspace The user program is downloaded to the RAM or flash memory When downloading to the flash memory select Emulator from the Options menu open the Configuration window and perform required settings on the Loading flash memory page This function also downloads information required for source level debugging such as debugging information 3
139. f the measurement channel Set Displays the dialog box to set the AUD event channel for the start or end pointer Sampling time Specifies the resolution of the measurement timer as any of the following values 20 ns 100 ns 400 ns or 1 6 us 247 RENESAS Clicking the Set button opens the dialog box to set the corresponding AUD event channel to modify the measurement start or end condition Ch2 Delay General Branch Count Delay Action AUD function data C Window trace data Software trace data Figure 5 85 Editing the AUD Performance Analysis Measurement Condition Dialog Box for Setting the AUD Event Notes 1 When the AUD performance analysis function is used set Performance start stop on the Action page of each channel 2 When the measurement condition is modified the contents are reflected on the AUD Event sheet in the Event window 248 RENESAS 5 11 3 Hiding the Column It is possible to hide any column not necessary in the Performance Analysis window Selecting a column you want to hide from the popup menu displayed by clicking the right hand mouse button on the header column hides that column To display the hidden column select the column from the said popup menu again 5 11 4 Starting Performance Data Acquisition Executing the user program clears the result of previous measurement and automatically starts measuring execution performance according to the condi
140. for each product refer to the online help 336 131 NE SAS c Displaying the trace result Run the program as shown in the example of section 6 17 1 S W Break Function The internal trace results are displayed in the Internal AUD window after the program execution is completed Type BranchType Bus Address Data PC RELATIVE MBUS 00000830 00000010 PC RELATIVE MBUS 00000834 00001010 BRANCH SUBROUTINE FBUS 00000808 DESTINATION 000010 0 MBUS FFFOEFFC DoO00000A MEMORY MBUS FFFOEFF8 000010 0 MBUS FFFOEFF4 ooooo000 MEMORY MBUS FFFOEFFO 00000002 MBUS FFFOEFEC 00000008 MBUS FFFOEFE8 0000302 Figure 6 47 Internal AUD Window e f necessary adjust the column widths by dragging borders in the header bar immediately below the title bar Note The type and the amount of information that can be acquired by a trace differ depending on the product For details on the specifications of each product refer to the online help 337 RENESAS 2 AUD trace function This function is available when the AUD pin of the MCU is connected to the emulator The following is an example of acquiring memory access information from addresses H 1000 to H 10FF The following is the procedure for setting the AUD trace function a Setting the AUD trace condition Set the condition so that the AUD trace condition can be set to the execution information on the MCU that is output from the
141. g Coverage Information essen 286 5 15 9 Preventing Update of Coverage Information esee 286 5 15 10 Confirmation Request Dialog Box esee 287 5 15 11 Displaying Code Coverage Information in the Editor Window 289 SCHON Mikro EEN 291 6 15 Introduction eer rre trit ee dete tree me e erre eq ert iore casei re Het 291 6 2 Running the High performance Embedded Workshop eese 292 6 3 Settings up the Emulator dette ter erp ret EE eee ga EPIS REIER 292 6 4 Setting the Configuration Dialog Box eee eene 293 6 5 Checking the Operation of the Target Memory for Downloading ses 294 6 6 Downloading the Tutorial Program seen 296 6 6 1 Downloading the Tutorial 296 6 6 2 Displaying the Source Program sese rem eene 207 6 7 Setting an S W trennen nnne 298 6 6 Setting ur M e iE 299 6 9 Executing the Program uda pea RR an ES e I ER IE EHE 301 6 10 Reviewing Breakpoints iiiter tritt rrt her po oe Peso eei EE eH 304 6 11 Referring to Symbols ni eter ire reda io e deo fep pes 305 6 12 Viewing Memory m 306 vii High performance Embedded
142. g and executing these modules Note The write and erase modules must be prepared by the user e Interface with write and erase modules and emulator firmware The write and erase modules must be branched from the emulator firmware To branch from the emulator firmware to the write and erase modules or to return from the write and erase module to the emulator firmware the following conditions must be observed Describe all the write and erase modules with the assembly language Save and return all the general register values and control register values before and after calling the write or erase module Return the write or erase module to the calling source after processing The write and erase module must be a Motorola type file The module interface must be as follows to pass correctly the information that is required for flash memory accessing Table 6 2 Module Interface Module Name Argument Return Value Write module R4 L Write address RO L End code Normal end 0 R7 L Verify option 0 vee P Abnormal end other than O 1 verify Verify error BT R5 L Access size 0x4220 byte 0x5720 word 0x4C20 longword R6 L Write data Erase module R4 L Access size None 0x4220 byte 0x5720 word 0x4C20 longword Note The L means the longword size 348 13 NE SAS Note Write module The write data for the access size is set to the R6 register When the access size i
143. g executed MEMORY AUD SUBROUTINE TIME MEASUREMENT TE V AUD MEMORY TEST AUD LOST TRACE TEST TRACE UNIT MEMORY TEST TRC TEST OPTION MEMORY TEST OPTION MEMORY BOARD TEST MAIN MEMORY TEST FILE LOG Figure 3 6 Screen Showing Testing After the test has been completed normally select BACK to exit the program 84 13 N SAS 3 4 3 Creating Log File E e200F F001 5972060 Test amp Maintenance Program ersion FILE COMPONENT MAIN ERROR STOP E Board No 0011 m COUNT vg 1 ENDLESS STATUS 0318 v SDRAM RAW TEST BYPASS TEST Te st N G V FLASH MEMORY READ TEST AUD RUN TIME MEASUREMENT TEST REGISTER R W AUD BREAK v H UDI REGISTER R W TEST AUD BREAK TEST v AUD REGISTER R W TEST SEQUENTIAL TRACE STOP BREAK TEST TRC FPGA REGISTER R W TEST AUD TRACE OPTION FPGA1 2 REGISTER R W TEST TRACE START STOP TEST MAIN FPGA2 REGISTER R W TEST TIME STAMP TEST EVA CHIP BOARD REGISTER R W TEST EMULATION TRACE TEST OPTION MEMORY BOARD REGISTER R W TEST AUD WATCH MEMORY TEST MEMORY AUD SUBROUTINE TIME MEASUREMENT TEST v AUD MEMORY TEST AUD LOST TRACE TEST TRACE UNIT MEMORY TEST TROC TEST OPTION MEMORY TEST OPTION MEMORY BOARD TEST v MAIN MEMORY TEST START STOP FILE LOG BACK Figure 3 7 Screen Showing Test NG If the test is failed Test NG is shown figure 3 7 In
144. g the OK button displays the BUS trace window Notes 1 When the external bus trace unit is not connected to the emulator the external bus trace function is not supported 2 When the function of the external bus trace unit is changed the number of bus cycles that can be acquired by the external bus trace is changed For details refer to section 5 1 5 Bus Board Page 3 Not only the BUS trace but also other trace functions can be displayed in this window depending on the product For details on the specifications of each product refer to the online help 216 RENESAS 5 9 3 Acquiring External Bus Trace Information BUS trace Selecting the Set menu in the popup menu of the BUS trace window displays the BUS acquisition dialog box When BUS trace is selected in Trace Type within the dialog box the trace information is acquired by using the external bus trace function When the emulator does not set the acquisition condition of the trace information the trace information is acquired by the external bus trace function in default The acquired trace information is displayed in the BUS trace window Address Data 000010 00001098 15B2852F9 000009 000053F0 00003904 000008 O00002A1D 000007 0000109 15829D20B 006 000006 00005384 O00002A1D 000005 000005 OO00rrp4 O0001FFF 000004 000004 00001040 42056453 000003 000003 000053F8 O0001FFF 000002 000002 OO00rrp8 0000161 000001 000001 00
145. ge will be automatically specified if the file type name is omitted Files with a type name other than C or CPP cannot be specified here A placeholder or the Browse button can be used Open a recent coverage file Lists a maximum of four files that were saved most recently Select one from the list Browse to another coverage file Allows specification of a file that is not included in the list Clicking the OK button in this dialog box opens the Code Coverage window The display format differs depending on whether the address range or source file is specified 279 13 N SAS Code Coverage Window Specifying an Address Code Coveraee 00000800 00000FFF Statistic Executed Address Assembler Source 00000800 OOOOOFFF 00000800 G H 002C 8 PC R2 void PowerON Rese 00000802 H FO R2 00000804 RZ VBR 00000806 8 H 00ZC 8 PC RZ 00000808 GRZ 00000804A ooo0080 8 H 0028 8 PC RZ DOOO0080E GRZ 00000810 00000812 H F0 R3 set cr SR Ini v eco oo 6 ao Figure 5 108 Code Coverage Window Specifying an Address The Code Coverage window is divided into two by the splitter e Left hand window Displays the coverage range and statistical information of the coverage The items are displayed as follows Range Address range Statistic CO coverage value in percentage The percentage will be displayed in the Statistic column by selecting Percent
146. ge acquisition start address Optionboard 8M The emulator specifies the measurement start address in the range of 8 Mbytes This function is only available when the expansion profiling unit is connected to the emulator OK Closes this dialog box by setting the specified condition Cancel Closes this dialog box without setting the specified condition This dialog box will only be displayed once after initiation of the emulator To open this dialog box select Hardware Settings from the popup menu of the Code Coverage window When the Coverage Acquisition Range Setting dialog box is closed the Open Coverage dialog box appears Open Coverage Options Start address JHoo0000 End address 000000 C File 4 C Open a recent coverage file C Browse to another coverage file Figure 5 107 Open Coverage Dialog Box In this dialog box specify a range to be shown in the Code Coverage window New Window Specifies a new coverage range Start address Enter the start address of coverage information to be displayed in hexadecimal when the prefix is omitted 278 RENESAS End address Enter the end address of coverage information to be displayed in hexadecimal when the prefix is omitted File Specifies a source file that has C or CPP as its file type name from the current project This allows a function included in the specified file to be set as the coverage ran
147. gnals of the device to the boundary scan loop or separate them by using a switch figure 2 29 Boundary scan loop User system TDI Test data input TDO Test data output TAP Test access port Figure 2 29 User System Example 70 13 N SAS 2 4 2 Connecting System Ground A WARNING Separate the frame ground from the signal ground at the user system 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 emulator s signal ground is connected to the user system s signal ground In the emulator the signal ground and frame ground are connected In the user system connect the frame ground only do not connect the signal ground to the frame ground figure 2 30 Signal line Host machine E200F main unit case Trace User system X Signal ground Frame ground Figure 2 30 Connecting System Ground 71 13 N SAS 2 5 Changing the Settings In the emulator it is possible to change the emulator function flexibly depending on the user s request for debugging When the High performance Embedded Workshop is activated and connected to the emulator the required functions can be selected At this time the following dialog box will be displayed Function select Function setting Main board mode setting RealProfile Areal nest mode Bus board mode setting Trace break 6ch Trace 262144
148. he Renesas web site www renesas com 355 13 N SAS 356 13 N SAS Appendix Menus Table A 1 shows GUI menus Table A 1 GUI Menus Toolbar Menu Option Shortcut Button Remarks View Disassembly Ctrl D E Opens the Disassembly window Command Line Ctrl L Opens the Command Line window TCL toolkit Ctrl Opens the Console window Shift 1 E Workspace Alt K mj Opens the Workspace window Output Alt U mJ Opens the Output window Difference Opens the Difference window CPU Registers Ctrl R E Opens the Register window Memory Ctrl M Opens the Memory window IO Ctrl I E Opens the IO window Status Ctrl U re Opens the Status window Cache Shift Opens the Cache window Ctrl C t TLB Shift Opens the TLB window Ctrl X Monitor Monitor Shift Opens the Monitor Setting Setting Ctrl E dialog box Window Opens the Window Select Select dialog box Extended Monitor mf Opens the Extended Monitor Ex 13 NE SAS window 357 Table A 1 GUI Menus cont Toolbar Menu Option Shortcut Button Remarks View Sym Labels Shift Opens the Labels window cont bol Ctrl A cont Watch Ctrl W Ei Opens the Watch window Locals Shift Opens the Locals window Ctrl W Code Eventpoints Ctrl E Es Opens the Event window Trace Ctrl
149. he cache to be displayed Select one of the following cache types Instruction cache Opens the instruction cache window Operand cache Opens the operand cache window Clicking the OK button displays the selected cache window Clicking the Cancel button closes the dialog box without opening the Cache window The following items are displayed in the Instruction Cache window Entry Entry number in the instruction cache depends on the cache capacity V Validity bit When this bit is 1 the entry is valid U Update bit When this bit is 1 the entry has been written to Tag Address Tag address Longword0 to Longword data 0 to 4 set to the operand cache entry Longword4 5 10 2 Modifying the Cache Contents Selecting Modify from the pop up menu with a cache item selected opens the dialog box to modify the selected cache item Note that during execution of an instruction the Modify menu is disabled and the cache items cannot be modified Set Tag Address Way Entry 0x0 Tag Address 900000000 Cancel Figure 5 77 Set Tag Address Dialog Box This dialog box allows the currently selected cache item to be modified The selected cache item and entry number are displayed in the caption of the dialog box The way number is also displayed for a cache with ways The item name in the dialog box displays the selected cache item 241 13 NE SAS Clicking the OK button stores the newly entered con
150. he popup menu that is opened by clicking the Event Condition sheet with the right hand mouse button When the setting is completed the Event window will be as shown in figure 6 41 1 DT CT Enable Address 00001068 tutorial cpp 45 pe Break Break Ch 2 1 Enable Address 00001058 tutorial cpp 43 pc Break Break Ch 2 1 Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Break Disable None Reset point 4 gt Breakpoint A Onchip Event AUD Event Other Event A BUS Event Figure 6 41 Onchip Event Sheet Note The items that can be displayed in this dialog box differ depending on the product For the items that can be displayed refer to the online help e Set the program counter and stack pointer values PC H 00000800 and R15 H FFF9F000 that were set in section 6 8 Setting Registers in the Register window Click the Go button e If program execution is failed reset the device and execute again the procedures above 329 RENESAS The program runs and then stops at the condition specified under event channel 1 00001024 void main void i long a 10 long i int i class Sample p sam 00001036 while 1 00001034 p_sam new Sample 00001038 for i 0 1 lt 10 00001044 j rand 00001048 0I 00001050 j j 00001058 ali j 00001068 P sam sort a 00001070 P sam change
151. he slave CPU 276 13 N SAS 5 15 Acquiring Code Coverage The emulator acquires code coverage information CO coverage from the address range specified by the user and displays the results Note Be sure to set the following when measuring the code coverage e I Trace AUD Trace acquisition dialog box that is opened by selecting Set from the popup menu of the Trace window Trace Mode page Trace mode Select AUD Trace AUD mode Check the Branch trace check box AUD Branch trace page Acquire normal branch instruction trace Check this check box Acquire subroutine branch instruction trace Check this check box Acquire exception branch instruction trace Check this check box 5 15 1 Opening the Code Coverage Window Select View gt Code gt Code Coverage or click the Code Coverage toolbar button E The following dialog box opens when the coverage function is used for the first time after initiation of the emulator Coverage Acquisition Range Setting Coverage acquisition start address Mainboard 4M 00000000 Coverage acquisition start address Optionboard 8M 00000000 Figure 5 106 Coverage Acquisition Range Setting Dialog Box Enable Checking this box allows acquisition of code coverage information Coverage acquisition start address Mainboard 4M The emulator specifies the measurement start address in the range of 4 Mbytes 277 RENESAS Covera
152. he user s manual Do not attempt to use the emulator product until you fully understand its mechanism Itis highly recommended that first time users be instructed by users that are well versed in the operation of the emulator product Users are required to be familiar with the basic knowledge for the electric circuits logic circuits and microcomputers Precautions to be Taken when Using This Product 1 This emulator is a development supporting unit for use in your program development and evaluation stages In mass producing your program you have finished developing be sure to make a judgment on your own risk that it can be put to practical use by performing integration test evaluation or some experiment else 2 In no event shall Renesas Solutions Corporation be liable for any consequence arising from the use of this emulator 3 Renesas Solutions Corporation strives to renovate or provide a workaround for product malfunction at some charge or without charge However this does not necessarily mean that Renesas Solutions Corporation guarantees the renovation or the provision under any circumstances 4 This emulator has been developed by assuming its use for program development and evaluation in laboratories Therefore it does not fall under the application of Electrical Appliance and Material Safety Law and protection against electromagnetic interference when used in Japan 5 This emulator does not conform to safety standards such
153. his connector to the provided external probe d Host side connector Marked A connector USB connector for the host USB connector machine is provided at the side of this mark Be sure to connect this connector to the provided USB cable RENESAS Emulator Right side View Figure 1 5 Emulator Right side View a E200F logo plate A wine red plate ROE0200F1EMUO0O dedicated for the emulator is provided to be easily distinguished from other E200F main unit case b Analyzer unit connector Marked ANALYZER I F This is a connector for the analyzer unit Be sure to connect this connector to the dedicated analyzer cable provided for the optional analyzer unit c External bus trace unit Marked TRACE I F This is a connector for the external bus trace connector unit Be sure to connect this connector to the dedicated trace cable provided for the optional external bus trace unit 13 N SAS Emulator Left side View IUNIO 00188 Figure 1 6 Emulator Left side View a Label for product The serial number revision and safety standard etc of the management emulator are written to The contents differ depending on the time when you purchased the product RENESAS Probe Head Upper View Z i f Figure 1 7 Probe Head Upper View a Screws for fastening the These screws fasten the user system and the probe head probe head 13 N SAS Probe Head Front View Figure 1
154. ined as a combination of one or more of the following e Branch trace data condition e Window trace data condition e Software trace data condition e Event count condition e Delay condition after an event has occurred For an operation when an event is detected break AUD trace acquisition acquisition start acquisition stop or AUD performance measurement start end can be specified This function can be set in the AUD Event sheet of the Event window 24 13 N SAS Notes 1 When a break is generated by detecting the AUD event there is a delay of several cycles from the time of detection to the break If the delay from the generation of an event to the break in the user system becomes a problem use the on chip event function Onchip event 2 When the acquisition mode of the AUD trace is Realtime trace data that was not output cannot be compared 3 When debugging is performed without any connection to the EV chip unit a break function cannot be selected in AUD event 4 The contents that can be set for the AUD event differ depending on the product For the specifications of each product refer to the online help Supplementary AUD Function When the AUD trace AUD event and AUD performance functions are used AUD must be enabled according to the following procedures e Debugging without any connection to the EV chip unit Set AUD pin Select on the General page of the Configuration dialog box Set AUD cl
155. int Select a breakpoint or an eventpoint and choose Delete from the popup menu to delete the selected breakpoint or eventpoint To retain the break condition but not have it cause an event when its conditions are met use the Disable option see section 5 8 11 Disabling Breakpoint or Eventpoint 5 8 13 Deleting All Breakpoints or Eventpoints Choose Delete AII from the popup menu to delete all breakpoints or eventpoints 5 8 14 Viewing the Source Line for Breakpoints Eventpoints Select a breakpoint or an eventpoint and choose Go to Source from the popup menu to open the Editor or Disassembly window at the address of the breakpoint or eventpoint The Go to Source menu is only available when one breakpoint or eventpoint that has the corresponding source file is selected 206 13 N SAS 5 9 Viewing the Trace Information In the emulator there are functions to acquire information within and outside the MCU by a trace The emulator acquires three types of trace information internal trace Internal trace AUD trace AUD trace and external bus trace BUS trace The information on the Internal trace and AUD trace is displayed on the Internal AUD window The information on the BUS trace is displayed on the BUS trace window For the description on the trace function refer to section 6 19 Trace Functions 5 9 1 Opening the Internal AUD Window To display the Trace Window Type dialog box choose View
156. ion because it uses the performance measurement function in the MCU 244 RENESAS Note The measurement conditions and the number of channels for the on chip performance analysis function differ depending on the product For details refer to the online help of each product When a measurement channel is double clicked or selected and Set is selected from the popup menu in this window the Performance Analysis dialog box is opened and measurement conditions can be modified Performance Analysis Condition Channel 1 Elapsed time Channel 2 area access Oycle Channel 3 Disabled Channel 4 Disabled z Sen Figure 5 81 Performance Analysis Dialog Box For details on the Performance Analysis dialog box refer to the online help for each product 245 13 N SAS 5 11 2 Opening the AUD Performance Analysis Window To open the AUD Performance Analysis window choose View Performance gt Performance Analysis or click the PA toolbar button 8 to open the Select Performance Analysis Type dialog box Select Performance Analysis Type Performance Analysis AUD Performance Figure 5 82 Select Performance Analysis Type Dialog Box Select AUD Performance and click the OK button to open the Performance Analysis window Channel Condition TOTAL RUN TIME chi None 00h OOmin 00s OO00ms OO00us O00ns Ch2 None DOh OOmin 00s OO00ms OO00us O00ns Ch3 None 00h OOmin 00s OO00
157. is not a problem Select Continue Anyway to proceed with driver installation 40 13 N SAS 2 3 Connecting the Optional Units to the Emulator Main Unit Case Optional units are included in the emulator This section describes how to connect the optional units that are mainly used to the E200F main unit case When the external bus trace unit EV chip unit or emulation memory unit is used the trace cable separately purchased is required The connection methods of the optional units differ depending on the supported MCU For details refer to the additional document Supplementary Information on Using the SHxxxx for each MCU 2 3 1 Connecting the E200F External Bus Trace Unit to the User System Open the cover of TRACE I F on the side of the main unit case e Connect the trace cable provided for the external bus trace unit to the emulator as shown in figure 2 2 41 13 N SAS Figure 2 2 Connecting the Trace Cable to E200F Connect the external bus trace unit to the trace cable CN1 side 42 RENESAS Figure 2 3 Connecting the Trace Cable to the External Bus Trace Unit 43 13 NE SAS e After checking the location of pin 1 connect the user system to the external bus trace unit Figure 2 1 Connecting the User System to the External Bus Trace Unit CAUTION Check the location of pin 1 before connecting Notes 1 Connection of the signals differs depending on the MCU used
158. it e EV chip unit e Expansion profiling unit e Emulation memory unit e User system interface board e Trace cable The user system or a host machine is not included in this definition Purpose of the Emulator Product This emulator product is a software and hardware development tool for systems employing the Renesas microcomputer SH 2A SH 2 series hereinafter referred to as SH 2A SH 2 This emulator product must only be used for the above purpose Limited Applications This emulator product is not authorized for use in transportation vehicular medical where human life is potentially at stake aerospace nuclear or undersea repeater applications Buyers of this emulator product must notify Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor before planning to use the product in such applications Improvement Policy Renesas Technology Corp including its subsidiaries hereafter collectively referred to as Renesas pursues a policy of continuing improvement in design performance and safety of the emulator product Renesas reserves the right to change wholly or partially the specifications design user s manual and other documentation at any time without notice RENESAS Target User of the Emulator Product This emulator product should only be used by those who have carefully read and thoroughly understood the information and restrictions contained in t
159. ks or registered trademarks of their respective companies or organizations Document Conventions This manual uses the following typographic conventions Table 1 Typographic Conventions Convention Meaning Menu gt Menu Option Bold text with gt is used to indicate menu options for example File gt Save As FILENAME C Uppercase names are used to indicate filenames enter this string Used to indicate text that must be entered excluding the quotes Key Key Used to indicate required key presses For example CTRL N means press the CTRL key and then whilst holding the CTRL key down press the N key 2 When this symbol is used it is always located in the left hand margin It indicates that the text to its immediate right is describing how to The how to symbol do something RENESAS High performance Embedded Workshop User s Manual Contents Section 1 Product Overview 1 Hels Componeblts tere prece ie t erp ri Decr 4 1 2 Emulator Hardware Configuration sese 5 1 3 Emulator Functions inei e PIU ei PORE SERRE REO EOM sib des 20 IEEE T U E 20 1 3 2 Event Detection Functions e tnt te Pre URP RR 23 IE Trace PUM Ctr M 27 13 4 Break PUBCUOR iiie etre bee tret ero edet tet R ig ege 29 1 3 5 Probe Function
160. kshop the emulator initiation is completed X lIconnected 2 Figure 4 12 Output Window Notes 1 When using the MCU with flash memory the dialog box shown in figure 4 13 is opened Input the clock value The clock value is the frequency of the crystal oscillator connected to the target MCU or the external clock that has been input to that MCU Glock MHz Set the frequency of the crystal resonator connected to the MCU in use or the external clock being input Figure 4 13 Clock Dialog Box 97 13 N SAS 2 After the following dialog box is displayed input the ID code as a security code for the flash memory However H FFFFFFFF is disabled as the ID code Input this ID code when E200F Emulator is selected and the New ID code check box is unselected on activating the emulator If the ID code is not matched or the New ID code check box is selected the flash memory contents are erased Please input ID Code m V New ID code Cancel Figure 4 14 ID Code Dialog Box Note The ID code to be set in the ID Code dialog box and setting the ID code differ depending on the product For details on the specification of each product refer to the additional document Supplementary Information on Using the SHxxxx or the on line help 3 If the emulator is not initiated the following dialog boxes shown in figures 4 15 through 4 18 will be displayed a If the following dialog box is displayed an
161. l gt 6 gt 5 gt 4 gt 3 gt 2 C Channel 8 gt 7 gt 6 gt 5 gt 4 gt 3 gt 2 Sequential reset Disable Enable Action Break C Trace stop Figure 5 40 Sequential AUD Event Dialog Box Don t care Sets no sequential AUD event condition Channel select Specifies the order that the sequential AUD event is satisfied Channel 3 gt 2 After conditions have been matched in the order of AUD event channel 3 gt 2 a sequential AUD event occurs Channel 4 gt 3 gt 2 After conditions have been matched in the order of AUD event channel 4 gt 3 gt 2 a sequential AUD event occurs 189 RENESAS 190 Sequential reset Action Channel 5 gt 4 gt 3 gt 2 After conditions have been matched in the order of AUD event channel 5 gt 4 gt 3 gt 2 a sequential AUD event occurs Channel 6 gt 5 gt 4 gt 3 gt 2 After conditions have been matched in the order of AUD event channel 6 gt 5 gt 4 gt 3 gt 2 a sequential AUD event occurs Channel 7 gt 6 gt 5 gt 4 gt 3 gt 2 After conditions have been matched in the order of AUD event channel 7 gt 6 gt 5 gt 4 gt 3 gt 2 a sequential AUD event occurs Channel 8 gt 7 gt 6 gt 5 gt 4 gt 3 gt 2 After conditions have been matched in the order of AUD event channel 8 gt 7 gt 6 gt 5 gt 4 g
162. l bus event e External bus break function performed by detecting the external bus event Select the pin that is set by the PFC Note The items that can be set in this dialog box depend on the emulator in use For details refer to the online help 134 13 N SAS 5 1 5 Bus Board Page Sets the external bus trace unit operation conditions Note When the external bus trace unit is not connected to the emulator this page is not displayed Configuration General Main Board Bus Board Loading flash memory Bus board mode setting IRQ select gt IRQ 0 Multiplexed pins setting Memory type setting i Cancel i Figure 5 3 Configuration Dialog Box Bus Board Page 135 13 NE SAS Items that can be displayed in this page are listed below Bus board mode setting Displays the debugging functions on the external bus trace unit Settings cannot be changed if they are to be changed the emulator must be activated again Trace break 6ch Trace 262144 cycles The external bus trace or break function event detection channels six has been selected Performance 6ch The external bus trace function has been selected measurement channels six Use emulation memory 4M Trace 8192 cycles The external emulation memory function 4 Mbytes x 1 block has been selected The 8192 bys cycles can be acquired by a trace Multiplexed pins setting Selects the state of the
163. l of the optimizing linkage editor 257 13 N SAS Note If profile information has been acquired by choosing the Not trace the function call menu the program cannot be optimized by the optimizing linkage editor e Output Text File Displays the Save Text of Profile Data dialog box Displayed contents are saved in a text file e Setting This menu has the following submenus the menus available only in the List sheet are also included Show Functions Variables Displays both functions and global variables in the Function Variable column Show Functions Displays only functions in the Function Variable column Show Variables Displays only global variables in the Function Variable column Only Executed Functions Only displays the executed functions If a stack information file sni extension output from the optimizing linkage editor does not exist in the directory where the load module is located only the executed functions are displayed even if this check box is not checked Include Data of Child Functions Sets whether or not to display information for a child function called in the function as profile data e Properties Sets the items to be measured 258 13 N SAS 5 12 9 Profile Chart Window The Profile Chart window displays the relation of calls for a specific function This window displays the specified function in the middle with the callers of the function on the left and the c
164. layed when the toolchain has not been installed Click the OK button 102 131 NE SAS 3 Select the target platform of the session file The following dialog box is displayed Setting the Target n For Debuaaing E200F SYSTEM Figure 4 22 Setting the Target System for Debugging Dialog Box The target for the session file used when the High performance Embedded Workshop is activated must be selected here Check the box against the target platform and then click the Next button 103 3 NE SAS 4 Setthe configuration file name The configuration file saves the state of High performance Embedded Workshop except for the emulator Setting the Debugger Target name SHsxx E200F SYSTEM Configuration name Debug SHx E200F SYSTEM Detail options lem Vale Nest Finish Figure 4 23 Setting the Debugger Options Dialog Box If multiple target platforms were selected in the Setting the Target System for Debugging dialog box shown in figure 4 22 set the name of a configuration file for each of them each time clicking the Next button to proceed to the next target Setting of the configuration file name is the end of the emulator settings Click the Finish button to display the Summary dialog box Pressing the OK button activates the High performance Embedded Workshop 5 After the High performance Embedded Workshop has been activated the emulator is automaticall
165. layed when the user program stops BREAKPOINT IS DELETED A xxxxxxxx If the above message is displayed cancel all BREAKPOINT settings with the Delete All or Disable button in the Event window 12 Number of BREAKPOINT and Stop At Settings in the Run Menu The maximum number of BREAKPOINTS and Stop At settings allowed in the Run menu is 1000 Therefore when 1000 BREAKPOINTS are set specification by Stop At in the Run menu becomes invalid Use the BREAKPOINTS and Stop At in the Run menu with 1000 or less total settings 1 Note on RUN TIME Display The execution time of the user program displayed in the Status window is not a correct value since the timer in the host computer has been used 14 Note on Displaying Timeout error If Timeout error is displayed the emulator cannot communicate with the target microcomputer Turn off the user system and connect the USB connector of the emulator again by using the High performance Embedded Workshop 1 Note on Using the Run Program Dialog Box When Run is selected from the Debug menu to specify the stop address there is the following note When the breakpoint that has been set as Disable is specified as the stop address note that the breakpoint becomes Enable when the user program stops 16 BREAKPOINT Setting for SLEEP Instruction When a break is set for the SLEEP instruction use the Break Condition not the BREAKPOI
166. le while executing a batch file enter the sleep command Adjust the sleep time length which differs according to the operating environment Example To display Not currently available during memory fill execution sleep d 3000 memory fill 0 ffff 0 Hile specification by commands The current directory may be altered by file specifications in commands It is recommended to use absolute paths are recommended to be used to specify the files in a command file so that the current directory alteration is not affected Example FILE LOAD C HEW Tools Renesas DebugComp Platform E200F Tutorial Tutorial Debug_SHxxxx_E200F_SYSTEM tutorial abs Memory Save During User Program Execution Do not execute memory save or verifying during user program execution Load of Motorola S type Files This High performance Embedded Workshop does not support Motorola S type files with only the CR code H OD at the end of each record Load Motorola S type files with the CR and LF codes H ODOA at the end of each record 10 Note on Register Window Operation During Program Execution The register value cannot be changed in the Register window during program execution Even if the changed value is displayed the register contents are not changed actually 364 N SAS 11 Break Function BREAKPOINT cancellation When the contents of the BREAKPOINT address is modified during user program execution the following message is disp
167. lecting Set from the popup menu of the Trace window Trace mode page Trace type Select AUD Trace AUD mode Select the Branch trace check box AUD Branch trace page Acquire normal branch instruction trace Select this check box Acquire subroutine branch instruction trace Select this check box Acquire exception branch instruction trace Select this check box 272 13 N SAS 5 14 Synchronizing Multiple Debugging Platforms Multiple debugging platforms can be operated at the same time in the High performance Embedded Workshop Initiating a High performance Embedded Workshop from another High performance Embedded Workshop synchronizes multiple debugging platforms The High performance Embedded Workshop that initiates another High performance Embedded Workshop is called the master and the initiated High performance Embedded Workshop is called the slave Choose Tools gt Launch Slave HEW or click the Launch Slave HEW toolbar button to initiate a slave High performance Embedded Workshop The slave High performance Embedded Workshop has the same functionality as the master High performance Embedded Workshop The slave High performance Embedded Workshop is notified of the following actions done in the master High performance Embedded Workshop to ensure synchronization of the slave High performance Embedded Workshop and the master High performance Embedded Workshop e Reset go e Go e Stop debugging
168. log box Start Address End Address Cancel Figure 5 114 Clear Coverage Range Dialog Box Enter the start and end addresses of the range to be cleared Clicking the OK button clears the coverage information of the selected range e Clearing all the coverage information Selecting Clear the Entire Coverage from the popup menu clears all the coverage information 5 15 6 Saving the Coverage Information to a File Selecting Save Data from the popup menu opens the Save Coverage Data dialog box File name D Browse em Figure 5 115 Save Coverage Data Dialog Box Specify the location of the coverage information file to be saved and its name A placeholder or the Browse button can be used If the file extension is omitted will automatically be added as the file extension An error message will appear if a file extension other than COV or TXT is entered 285 RENESAS 5 15 7 Loading Coverage Information from a File Selecting Load Data from the popup menu opens the Load Data dialog box Load Data File name Browse m Offset Figure 5 116 Load Data Dialog Box Specify the location of the coverage information file to be loaded A placeholder or the Browse button can be used The only file extension available is COV An error message will appear if any other file extension is entered Note If the coverage range has
169. lumn External bus event information The fifth column CodeCoverage column Coverage information The sixth column S W Breakpoints column PC bookmark and breakpoint information Note When the external bus trace unit is not connected to the emulator the BUS event column is not displayed e 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 breakpoints e Onchip event column The Onchip event column displays the following item An address condition for the on chip event is set The number of address conditions that can be set is the same as that of on chip event channels at which the address condition can be set The bitmap symbol above is shown by double clicking the Onchip event column This is also set by using the popup menu Figure 5 11 Popup Menu for the Onchip Event Column 150 13 N SAS Note The contents of the Onchip event column are erased when conditions other than the address condition are added to each channel by using the Edit menu or in the Event window e AUD event column The AUD event column displays the following item An AUD break is set 0 An AUD sequential break is set m An AUD trace acquisition is set er An AUD trace start is set CD An AUD trace stop is set Qo An AUD trace sequential stop is set AUD performance start is s
170. may be displayed but it is not a problem Select Continue Anyway to proceed with driver installation 3 Be sure to install the software for the emulator before putting the emulator in place WARNING Always switch OFF the emulator product and the user system before connecting or disconnecting any CABLES except for the USB interface cable 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 65 13 N SAS The emulator is connected to the host machine via the USB 1 1 2 0 Figure 2 26 shows the system configuration E200F emulator Host machine USB cable 1 5 m Figure 2 26 System Configuration when Connecting the Emulator to the Host Machine 66 RENESAS 2 4 Connecting the Emulator to the User System Use the procedure below to connect the emulator to the user system or to disconnect them when moving the emulator or the user system 1 Check that the emulator is turned off 2 Connect the probe head connector to the user system 3 Fasten the probe head to the user system with the screws 1 The connector must be installed to the user system Table 2 2 shows the recommended H UDI port connector for the emulator Table 2 2 Recommended Connector Connector Type Number Manufacturer Specifications 36 pin connector DX10M 36S Hirose Electric Co Ltd Screw type DX10M 36SE
171. modules The file that has been set is loaded to the RAM area before loading to the flash memory A maximum of 128 characters can be input for the file name Bus width of flash memory list box Sets the bus width of the flash memory Flash memory erasing time edit box Sets the TIMEOUT value for erasing the flash memory Set a larger value if erasing requires much time the default time is three minutes The radix for the input value is decimal It becomes hexadecimal by adding H Entry point group box Sets the calling destination address of the write and erase modules All erasing module address edit box Enters the calling destination address of the erase module Writing module address edit box Enters the calling destination address of the write module Access size combo box Selects the access size of the RAM area that is used for loading the write erase module Note Although the values that can be set are D 1 to D 65535 the TIMEOUT period may be extended according to the set value Therefore it is recommended to input the minimum value by considering the erasing time of the flash memory in use e Notes on using the flash memory download function The following are notes on downloading to the flash memory When the flash memory download is enabled downloading to areas other than the flash memory area is disabled 350 13 N SAS Downloading is only enabled to the flash memory are
172. mory 32 bit bus width Flash memory erasing time 7 minute r Entry point All erasing module address roconon 7 Writing module address Access size z Figure 6 59 Loading flash memory Page 352 13 N SAS Notes 1 When the data has already been written in the flash memory be sure to select Enable for Erasing flash memory If Disable is selected a verify error occurs 2 When Erasing flash memory is selected it takes about one minute to erase the flash memory in this example e Select the object for downloading to the flash memory area 6 22 What Next This tutorial has described the major features of the emulator and the use of the High performance Embedded Workshop 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 353 13 N SAS 354 13 N SAS 1 2 3 Section 7 Troubleshooting I have a text file open in the editor but syntactic color coding is not being displayed Ensure that you have named the file i e saved it and that the Syntax coloring check box is set on the Editor tab of the Options dialog box which is launched via Setup gt Options The High performance Embedded Workshop looks up the filename extensi
173. mory unit Jd 11 205 1 Figure 2 8 Connecting the External Bus Trace Unit to the Emulation Memory Unit 48 RENESAS e After checking the location of pin 1 connect the external bus trace unit emulation memory unit and trace cable Figure 2 9 Connecting the External Bus Trace Unit Emulation Memory Unit and Trace Cable e After checking the location of pin 1 connect the external bus trace unit emulation memory unit and user system Figure 2 10 Connecting the External Bus Trace Unit Emulation Memory Unit and User System 49 RENESAS CAUTION Check the location of pin 1 before connecting Notes 1 Connection of the signals differs depending on the MCU used 2 For connecting signals refer to the additional document Supplementary Information on Using the SHxxxx 2 3 5 Connecting the EV chip Unit to the User System Open the cover of TRACE I F on the side of the main unit case e Connect the trace cable to the EV chip unit as shown in figure 2 11 Figure 2 11 Connecting the Trace Cable to E200F when Using the EV chip Unit 50 7tENESAS e Connect the EV chip unit to the trace cable CNI side Figure 2 12 Connecting the Trace Cable to the EV chip Unit Install the user system interface board separately purchased to connect the user system CAUTION Check the location of pin 1 before connecting 51 RENESAS 2 3 6 Connecting the E200F External Bus
174. ms OO00us OD00ns Ch4 None DOh OOmin 00s OO00ms OO00us O00ns Figure 5 83 Performance Analysis Window AUD Performance The AUD Performance Analysis function does not affect the realtime operation because it measures execution performance in the specified range by using the circuit for hardware performance measurement on the emulator main unit case The start and end conditions of the measurement channel of the AUD Performance Analysis use one AUD event channel respectively Four measurement channels use eight AUD event channels Note Since the AUD performance function is implemented according to the information in the MCU output from the AUD pin the AUD trace information acquisition condition must be set Set the AUD trace information acquisition condition 246 RENESAS When a measurement channel is double clicked or selected and Set is selected from the popup menu in this window the Performance Analysis AUD Channel x dialog box is opened and measurement conditions can be modified Performance Analysis Aud Channel 1 24 xX Start Point aud event ch Branch source address HO Set End Point aud event ch2 Branch destination address H 100 Set Sampling time 20ns Cancel Figure 5 84 Performance Analysis AUD Channel x Dialog Box Start Point aud event chx Displays the start pointer condition of the measurement channel End Point aud event chx Displays the end pointer condition o
175. mulation memory unit are optional 147 13 N SAS 5 1 10 Multiplexed Address pins setting Dialog Box Set this dialog box depending on the state of the use of multiplexed address pin Address pins group box Select the states of the use of address bus pins that depend on the target MCU Set MASK for the multiplexed pins that are not used as the address bus pins Note To set the emulation memory that has been installed on the emulation memory unit the content of this setting is used If the Address pins group box is illegally set the emulation memory will not be allocated correctly 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 High performance Embedded Workshop 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 High performance Embedded Workshop will open a source file browser dialog box to allow you to manually locate the file 5 2 1 Downloading a Program A load module to be debugged must be downloaded To download a program select the load module from Debug gt Download or select Download from the popup menu opened by clicking the right hand mouse button on the load module in Download modules of the Workspace window Notes 1 B
176. ndition OR Determines whether or not the condition is satisfied by OR operation of the probe signal condition Probe 1 to 4 Specifies the probe signal conditions Don t care Specifies no probe signal condition High Satisfies the condition when the probe signal is high Low satisfies the condition when the probe signal is low 202 RENESAS b Action page Sets the operation after the condition has been satisfied Probe Condition Action Action C Break Trace AUD trace operation C Trace start e Trace filter Caneel Figure 5 51 Probe Dialog Box Action Page Break Breaks after conditions have been matched Trace Enables AUD trace option and sets the AUD trace operation Trace start Starts AUD trace after conditions have been matched Trace stop Stops AUD trace after conditions have been matched Trace filter Sets the filter condition for acquiring AUD trace after conditions have been matched 203 RENESAS 2 Runtime Count dialog box Double clicking the Runtime Count event channel displays this dialog box Conditions of the eventpoint can be set on the Condition and Action pages a Condition page Specifies the execution time of the user program Runtime Count Condition Action Condition The minimum time to be measured 20ns Run time count Figure 5 52 Runtime Count Dialog Condition Page
177. nformation Files eese 260 UB e MH P 261 5 13 Viewing Realtime Profile Information sees eene 263 5 13 1 Opening the Realtime Profile Window eee 269 5 13 2 Specifying the Measurement Range 270 5 13 3 Starting Measurement sicions tee eeu ege daran e HE eee Tes Rota sega 271 5 13 4 Clearing Measurement Result teeth 271 5 13 5 Deleting Measurement Range sess een rennen 271 5 13 6 Setting the Minimum Unit of the Measurement Time esses 271 5 14 Synchronizing Multiple Debugging Platforms seeeeeeeeeeen 273 5 14 1 Distinguishing Two Emulators eene eene 274 5 15 Acquiring Code Coverage a oc retinere eerte ee Desens 277 5 15 1 Opening the Code Coverage Window een 277 5 15 2 Displaying a Source File eee Reiter Pre Rei re tie PER eR e 282 5 15 3 Changing the Address to be 1 1 sse 282 5 15 4 Changing the Coverage Range to be Displayed esses 283 5 15 5 Clearing the Coverage 285 5 15 6 Saving the Coverage Information to a File ss 285 5 15 7 Loading Coverage Information from a 286 5 15 8 Updatin
178. ng at Emulator Activation When the emulator is activated the command chain can be automatically 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 Debug Settings DefaultSession Target Options Target lt none gt Default Debug Format Elf Dwarf2 Download Modules FileName Offset Address Forme Figure 4 31 Debug Settings Dialog Box Target Page 2 Select the product name to be connected in the Target drop down list box 3 Select the format of the load module to be downloaded in the Default Debug Format drop down list box then register the corresponding download module in the Download Modules list box Note Here no program has been downloaded For downloading refer to section 5 2 Downloading a Program 4 Click the Options tab 113 RENESAS Debug Settings DefaultSession E Target Options Command batch file load timing Command Line Batch Processing Gonnect up to target on debug M Download modules after build Cancel Figure 4 32 Debug Settings Dialog Box Options Page The command chain that is automatically executed at the specified timing is registered The following three timings can be specified e At connecting the emulator e Immediately before
179. ng session file that you would like to import into the existing project or click the Browse button to select the file location If the Open and maintain link to session file check box is not checked the imported new session file is generated in the project directory If the Open and maintain link to session file check box is checked a new session file is not generated in the project directory but is linked to the current session file If the Make session file link read only check box is checked the linked session file is used as read only 6 Click the OK button to close the Debug Sessions dialog box e Toremove a session 1 Select Options gt Debug Sessions to display the Debug Sessions dialog box figure 4 34 2 Select the session you would like to remove 3 Click the Remove button Note that the current session cannot be removed 4 Click the OK button to close the Debug Sessions dialog box e To view the session properties 1 Select Options gt Debug Sessions to display the Debug Sessions dialog box figure 4 34 2 Select the session you would like to view the properties for 3 Click the Properties button to display the Session Properties dialog box figure 4 36 118 13 N SAS ession Properties Name SessionE200F SYSTEM Location C Hewd test test 5essionE200F_ SYSTEMhsf E i ance Last modified 18 43 40 Friday February 27 2004 Read only
180. nnels Set the contents of the Ch1 2 3 list box for Break Ch 3 2 1 on the Combination action dialog box Enable the condition of Event Condition 1 from the popup menu that is opened by right clicking on the Event Condition sheet 174 13 N SAS Then set the program counter and stack pointer PC H 00000800 R15 H FFF9F000 in the Registers window and click the Go button If this does not execute normally issue a reset and execute the above procedures The program is executed up to the condition of Chl and halted Here the condition is satisfied in the order of Ch3 gt 2 gt 1 i 00001058 ali j 00001068 P sam sort a 00001070 P sam change a 00001076 p_sam gt s0 a 0 0000107a p_sam gt st al 1 0000107 p_sam gt s2 a 2 00001082 P sam s3 a 3 00001086 p_sam gt s4 a 4 0000108 P sam sb a 5 0000108 p sam sB a B 00001092 P sam s a 7 00001096 p_sam gt s8 a 8 0000109a p_sam gt s9 a 9 0000109 P sam Figure 5 31 Editor Window at Execution Halted Sequential Break Note The items that can be set in the Combination action dialog box depend on the emulator in use For details refer to the online help 175 13 N SAS 5 8 6 Setting AUD Eventpoints On the AUD Event sheet the settings for AUD Eventpoints are displayed and modified Reset Disable Delay Disable Normal Disable Normal Disable Normal Disable Normal Disa
181. nnels of the Onchip Eventpoint differs according to the product For the number that can be specified for each product refer to the online help 323 13 N SAS e Selecta line of Chl in the Event window When highlighted double click this line Chl IA DT CT Disable Break Ch2 IA DT Disable Break Disable Break Disable Break Disable Break Disable Break Disable Break Disable Break Disable Break Disable Break Disable Reset point lt gt Breskpoint A Onchip Event AUD Event Other Event BUS Event Figure 6 36 Event Window Onchip Event Sheet e Event condition 1 dialog box is displayed e Clear the Don t care check box in the Address page e Select the Only program fetched address after radio button and enter an address of the column including sam sort of the main function 324 RENESAS Event condition 1 Address Data Count Action Address Don t Care C Address Only program fetched address Only program fetched address after Address H 00001068 Nonusermask C User mask Mask amp pp Figure 6 37 Address Page Event condition 1 Dialog Box Note The items that can be set in this dialog box differ depending on the product For details on the settings for each product refer to the online help 325 RENESAS e Click the OK button e The first point display in the State line changes from
182. nstalled Tools Administration Registered components a di Cancel p Generic StackTrace View ECX n pl Generic Status View ECX Generic TLB View Register y Generic Trace View ECX Unregister Generic Watch View e ep Beda p Generic Waveform View ECX ep e rm 3 Intel Hex Record Object Reader ropst 5 E200F SYSTEM A SRecord object reader A SuperH RISC engine CPU d Search disk Extension Components Communication Tools a SE Show all components Current HEW tools database location Hew3 Modify Figure 4 42 Highlighting the Product to be Uninstalled Erpat Tool information Uninstaller Til 5 Click the Unregister button After the following message box is displayed click the Yes button High perfo rmance Embedded Worksho Unregistering this tool removes it From the HEW system consequently it will not be available to any HEW WorkSpace 4re you sure that you want to unregister it Figure 4 43 Unregistering this tool Message Box 125 RENESAS This is the end of canceling the High performance Embedded Workshop registration Then remove the file for the emulator from the host machine 6 Click the Uninstaller button in the Tools Administration dialog box to open the Uninstall HEW Tool dialog box Uninstall HEW Tool DU 2111 Figure 4 44 Uninstall HEW Tool Dialog
183. nteed by devices e Reset emulation e Step functions Single step one step one instruction Source level step one step one line source Step over a break will not occur in a subroutine Step out when the PC points to a location within a subroutine execution continues until it returns to the calling function 2 Reset function e Issues a power on reset from the High performance Embedded Workshop to the device during break 3 Event detection e On chip event detection function functions e AUD event detection function e External bus event detection function e Other event detection functions Execution time event detection External probe event detection 4 Trace functions e Internal trace function at on chip event detection e AUD trace function at AUD event detection e External bus trace function at external bus event detection 20 13 NE SAS Table 1 1 Emulator Functions cont No Function 5 Break functions e Breaks at satisfaction of an S W breakpoint condition e Breaks at on chip event detection e Breaks at AUD event detection e Breaks at external bus event detection e Breaks at other types of event detection e Breaks at overflow of a trace buffer e Forced break function 6 Performance e Uses a counter in the device to measure the number of measurement function cycles that passes during point to point execution e Uses an AUD event channel to measure the time or counts of point to point p
184. o the manual attached to the H8S H8 300 series compiler package or the SuperH M RISC engine compiler package 4 2 1 Creating the New Workspace Toolchain Not Used 1 In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select Create a new project workspace radio button and click the OK button Welcome ptions WM OS 2 C Open arecent project workspace Administration fa Browse to another project workspace Figure 4 20 Welcome Dialog Box 101 RENESAS 2 The Project Generator is started In this section we omit description of the settings for the toolchain If you have not purchased the toolchain the following dialog box is displayed New Project Workspace Projects Workspace Name Project ooo Directory c Hew3 Browse CPU family SuperH RISC engine Tool chain None hf Debugger only Properties Figure 4 21 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 Enter the directory name in which the workspace will be created Click the Browse button to select a directory Other list boxes are used for setting the toolchain the fixed information is disp
185. oading flash memory Mode SHxxxx M Emulation mode Step option Disables interrupts during single step execution Read Write on the fly H UDI Read Write e AUD clock 148 CPU clock AUD pin select Custom Bit pattern 0000 JTAG clock 600k Hz Figure 5 1 Configuration Dialog Box General Page 130 13 N SAS Items that can be displayed in this page are listed below Mode Emulation mode Step option Read Write on the fly AUD clock AUD pin Select JTAG clock Displays the MCU name Selects the emulation mode when user program is executed Sets the step interrupt option Disable interrupts during single step execution Disables interrupts during step execution Enable interrupts during single step execution Enables interrupts during step execution Enables or disables reading from or writing to memory during emulation Disable Disables reading from and writing to memory during emulation H UDI Read Write Uses the H UDI to read from or write to memory during emulation Realtime emulation is slightly affected Short Break Read Write A break occurs whenever data are read from or written to memory Realtime emulation is affected A clock used in acquiring AUD traces If its frequency is set too low complete data may not be acquired during realtime tracing Set the frequency not to exceed the upper limit for the MCU s AU
186. ock on the General page of the Configuration dialog box por Set the AUD trace information acquisition condition for Internal AUD trace e Debugging with a connection to the EV chip unit 1 Set AUD clock on the General page of the Configuration dialog box 2 Setthe AUD trace information acquisition condition for Internal AUD trace For the settings of the Configuration dialog box and Internal AUD trace refer to section 5 1 Setting the Environment for Emulation and section 6 19 Trace Functions c External bus event function BUS Event This is a function that sets eventpoints according to the external bus of the MCU or pin information such as an interrupt pin There are six event detection channels The eventpoints can be defined as a combination of one or more of the following e External address bus condition e External data bus condition e Interrupt signal condition e Event count condition e Delay condition after an event has occurred 25 7tENESAS For an operation when an event has been detected a break or external bus trace acquisition acquisition start acquisition stop can be specified This function can be set in the BUS Event sheet of the Event window Notes 1 When a break is generated by detecting the external bus event there is a delay of several cycles from the time of detection to the break 2 This function is optional it is available after an external bus trace unit is purcha
187. ode when the AUD trace function is used Enable free trace When checked the settings of the AUD eventpoint are ignored and the whole trace information is acquired Time stamp clock Specifies the resolution of the timer for time stamp as any of the following values 20 ns 100 ns 400 ns or 1 6 us 214 N SAS AUD trace display range Sets the trace display range when the AUD trace function is used Start pointer Enter the numerical start pointer value of the display range End pointer Enter the numerical end pointer value of the display range Notes 1 When Internal trace is selected AUD MODE AUD mode 1 AUD mode 2 AUD mode 3 and AUD trace display range are disabled 2 AUD MODE AUD mode 1 AUD mode 2 AUD mode 3 and AUD trace display range are enabled only when AUD trace is selected 3 Refer to the online help of each product because available trace acquisition conditions depend on the product 4 Some MCUS do not have the AUD trace function Clicking the OK button stores the settings Clicking the Cancel button closes this dialog box without modifying the settings 215 13 N SAS 5 9 2 Opening the BUS trace Window To display the Trace Window Type dialog box choose View Code Trace or click the Trace toolbar button Trace Window Trace window SIN Figure 5 58 Trace Window Type Dialog Box Selecting BUS trace and clickin
188. of a b and c for the external bus trace unit emulation memory unit and EV chip unit respectively e After checking the location of pin 1 connect the external bus trace unit emulation memory unit and EV chip unit co YR X Figure 2 17 Connecting the External Bus Trace Unit Emulation Memory Unit and EV chip Unit A CAUTION Check the location of pin 1 and the position of each unit before connecting 56 13 NE SAS 2 3 9 Connecting the Probe Head to the EV chip Unit Connect the probe head to the EV chip unit as shown in figure 2 18 Figure 2 18 Connecting the Probe Head to the EV chip Unit CAUTION Check the location of pin 1 before connecting 57 RENESAS 2 3 10 Connecting the E200F Expansion Profiling Unit to the Main Unit Case Remove the screw for fastening the base unit Figure 2 19 Screw for the Base Unit for Placing the Emulator Vertically 58 RENESAS Figure 2 20 Removing the Base Unit for Placing the Emulator Vertically 59 13 N SAS Remove two screws on the rear side of the main unit case Figure 2 21 Screws for the Main Unit Case 60 13 N SAS Remove the main unit case as shown in figure 2 22 Figure 2 22 Removing the Main Unit Case 61 13 N SAS e After checking the location of pin 1 connect the expansion profiling unit to the main unit case Figure 2 23 Connecting the Expansion P
189. of information acquired by a trace that can be stored is 1024 This function is enabled when the AUD pin is not connected to the emulator or the memory cannot be used for tracing This function is hereafter called as the internal trace function or the Internal trace Function to output the information in realtime from the AUD pins This is the large capacity trace function that is useful when the AUD pins are connected to the emulator The emulator generates a break on the basis of the information output from the AUD pins This function is hereafter called as the AUD trace function When a set of the branch source and branch destination instructions is one branch the maximum amount of information acquired by a trace is 262 144 Note The contents that can be acquired by a trace differ depending on the product For details on the specifications of each product refer to the online help Software trace function Note This function can be supported with SHC C compiler manufactured by Renesas Technology Corp including OEM and bundle products V7 0 or later When a specific instruction is executed the PC value at execution and the contents of one general register are acquired by trace Describe the Trace x function x is a variable name to be compiled and linked beforehand For details refer to the SuperH RISC engine C C Compiler Assembler Optimizing Linkage Editor User s Manual 27 13 NE SAS When the load module is d
190. oint to range or range to range execution e Measures the number of cycles that pass in executing individual functions and lists them at the end of execution from a Go command e Measures the execution time or execution counts of functions in the address range specified by the user and lists them at the end of execution from a Go command 7 Memory access functions Downloading to RAM Downloading to flash memory Single line assembly Reverse assembly disassembly Reading of memory Writing to memory Automatic updating of a display of selected variables during user program execution Fill Search Move Copy Monitor physical address Emulation memory 21 13 NE SAS Table 1 1 Emulator Functions cont No Item Function 8 General control register Read or write function of the general control registers access function 9 Internal I O register Read or write function of the internal I O registers access function 10 Source level debugging Various source level debugging functions function 11 Command line function Supports command input Batch processing is enabled when a file is created by arranging commands in input order 12 Help function Describes the usage of each function or command syntax input from the command line window The specific functions of the emulator are described in the next section 22 13 N SAS 1 3 2 Event Detection Functions The emulator has complex event
191. ointer values PC H 00000800 and R15 H FFF9FO000 as were set in section 6 8 Setting Registers again use the Register window Click the Go button e If program execution is failed reset the device and execute again the procedures above e After the break in program execution select Stack Trace from the Code submenu of the View menu to open the Stack Trace window Kind Name Value Sample sort long 0000206 maini 000106 PowerON Reset PC 00000820 PowerON Reset PC 00000820 PowerON Reset PC 00000820 PowerON Reset 00000820 PowerON Reset 00000820 PowerON Reset 00000820 PowerON Reset 00000820 E F F F F F F F F Figure 6 56 Stack Trace Window Figure 6 56 shows that the position of the program counter is currently at the selected line of the sort function and that the sort function is called from the main function To remove the S W breakpoint double click the S W breakpoints column in the sort function again Note For details on this function refer to the online help 347 RENESAS 6 21 Download Function to the Flash Memory Area The emulator enables downloading to the flash memory area This function requires a program for writing the flash memory hereinafter referred to as a write module a program for erasing the flash memory hereinafter referred to as an erase module and the RAM area for downloadin
192. om the pop up menu of the Profile window and specify the file name after measuring a profile data of the application program This file contains information on the number of times functions are called and global variables are accessed The optimizing linker ver 7 0 or later is capable of reading the profile information file and optimizing the allocation of functions and variables in correspondence with the status of the actual operation of the program To input the profiler information file to the linker choose Optimize from the Category list box and check the Include Profile box in the Link Library page of the Standard Toolchain dialog box and specify the name of the profile information file SuperH RISC engine Standard Toolchain Configuration Debug E200F SYSTEM Gabe om El C All Loaded Projects Show entries Tor Optimize items e _1 source file source file Optimize Speed 7 eliminated size 0x001 mm Assembly source file 3 Linkage symbol file Unify strings Eliminate dead code W Use short addressing Madify Reallocate register Cache size Eliminate same code Size 0x0008 Use indirect call jump ee Line 0x0020 Optimize branches Options Link Library inoprelink rom D R nomessage list CONFIGDIRI PROJECTNAME optimize speed start DVECTTBL DINTTBL 00 PResetPRG PIhtPRG 0800 P C C BS
193. on to determine the group to which the file belongs and decides whether or not coloring should be applied to the file To view the currently defined filename extensions and file groups select Project gt File Extensions to launch the File Extensions dialog box To view the coloring information select Setup gt Format to display the Color tab of the Format dialog box for further details see the Syntax Coloring section in Chapter 4 Using the Editor of the volume on the High performance Embedded Workshop I want to change the settings of a tool but the Tools gt Administration menu option is not selectable Tools gt Administration is not selectable while a workspace is open To open the Tool Administration dialog box close the current workspace I opened a workspace from my PC and one of my colleagues opened the same workspace simultaneously from another PC I changed the settings of the workspace and saved it My colleague saved the workspace after me I opened the workspace again and found that the settings of the workspace differed from those I had made The last settings to be saved are effective While a workspace is open in the High performance Embedded Workshop updating of the workspace is within the memory The settings are not saved in a file unless the user intentionally saves the workspace In addition to above refer to FAQs on the emulator and High performance Embedded Workshop on t
194. ormance cannot be measured Be sure to specify both of the measurement start and end conditions 3 When the measurement start end conditions are specified step operation cannot be performed e Measurement tolerance measured value includes tolerance Tolerance will be generated before or after a break 31 13 NE SAS e Measurement items Items are measured in the Performance Analysis dialog box for each channel from Chl to Ch4 A maximum of four conditions can be specified at the same time Note Items to be measured will differ depending on the product For details on the specifications of each product refer to the additional document Supplementary Information on Using the SHxxxx or the online help Each measurement condition is also counted when conditions in table 1 3 are generated Table 1 3 Performance Measurement Conditions to be Counted Measurement Condition Notes Cache on counting Accessing the non cacheable area is counted less than the actual number of cycles and counts Accessing the cacheable and U RAM areas is counted more than the actual number of cycles and counts Branch count The counter value is incremented by 2 This means that two cycles are valid for one branch Notes 1 In the non realtime trace mode of the AUD trace and memory output trace normal counting cannot be performed because the generation state of the stall or the execution cycle is changed 2 Since the clock
195. ory C Disable Enable Eile name C Hewa Tools Renesas DebugCor Browse Bus width of flash memory 32 bit bus width Flash memory erasing time D 3 minute Entry point All erasing module address 000 Writing module address JH oco01 100 Access size x Figure 5 7 Configuration Dialog Box Loading flash memory Page 142 3 NE SAS Items that can be displayed in this page are listed below Loading flash memory Erasing flash memory File name Bus width of flash memory Flash memory erasing time Entry point Sets Enable for flash memory downloading At Enable when the flash memory is downloaded on the High performance Embedded Workshop the write module is always called Disable Not download to the flash memory Enable Download to the flash memory Sets Enable for erasing before the flash memory is written At Enable the erase module is called before calling the write module Disable Not erase the flash memory Enable Erase the flash memory Sets the write erase module name The file that has been set is loaded to the RAM area before loading to the flash memory Sets the bus width of the flash memory Sets the TIMEOUT value at flash memory erasing Increase the value if erasing requires much time although the default time is three minutes The values that can be set are as follows 0 minimum and D 65535 maximum Only positive integers can be input
196. ot be measured correctly No branch Figure 5 94 Tail Call Function Mode 264 13 N SAS ii Relationships between the Go start address break address and measurable ranges Figure 5 95 Measurable Ranges Function Mode Measurable ranges when a break occurs at the position of black circle e Execution time and counts of functions h and k Measurable ranges when a break occurs at the position of red circle Execution time and counts of functions h and k Measurable ranges when a break occurs at the position of blue circle e Execution time and counts of functions h and e Execution time of function counts cannot be measured It is recommended that a break occur within the function where execution is started When execution returns to the upper function the execution counts of the function cannot be measured 265 13 N SAS 3 Restrictions on using the nest mode i Tail call When a tail call is used for a function as shown below the return value of the callee function becomes the return address of the caller function The execution time of the callee function cannot be measured correctly but the execution counts can be measured No branch Figure 5 96 Tail Call Nest Mode 266 13 N SAS There is a restriction when the tail call is used to call another function from the function that has been called by the tail call If the tail call occurs continuously three step measurement
197. our eventpoints can be set in the emulator 1 Onchip Eventpoint This is a function that sets eventpoints according to the information in the MCU For an operation when an event is detected break internal trace acquisition acquisition start acquisition stop or internal performance measurement start end can be specified A combination of one or more of the Onchip Eventpoints enables specifying more complex sequential conditions This function can be set in the Onchip Event sheet of the Event window Note The contents to be set will differ depending on the product For details refer to the on line help for each product 2 AUD Eventpoint This is a function that sets eventpoints according to the information output from the AUD interface There are eight event detection channels For an operation when an event is detected break AUD trace acquisition acquisition start acquisition stop or AUD performance measurement start end can be specified A combination of one or more of the AUD evenpoints enables specifying more complex sequential conditions 165 13 NE SAS This function be set in the AUD Event sheet of the Event window 3 BUS Eventpoint This is a function that sets eventpoints according to the external bus of the MCU or information on the pin such as an interrupt pin There are six event detection channels For an operation when an event is detected break or external bus trace acquisition acquisi
198. ownloaded on the emulator and is executed while a software trace function is valid the PC value that has executed the Trace x function the general register value for x and the source lines are displayed To activate the software trace function double click the event channel on the AUD Event sheet of the Event window and select the Software trace data radio button of the General page b Function to acquire information outside the MCU by a trace The acquired trace information is displayed in the BUS trace window External Bus Trace Function BUS trace This is a large capacity trace function that is useful when the external bus pins of the MCU are connected to the emulator If an external memory is read from or written to trace information is output in realtime from the external bus pins The external bus trace acquisition acquisition start and acquisition end can be controlled depending on the specified external bus eventpoint condition For setting eventpoints refer to section 5 8 Using the Eventpoints With this function information of a maximum of 262 144 cycles can be acquired in each bus cycle Notes 1 This function is optional it is available after an external bus trace unit is purchased 2 The contents that can be acquired by a trace differ depending on the product For details on the specifications of each product refer to the online help 2 Useful functions of the Trace window 28 The Trace
199. patents or other rights of any third party or Renesas 3 This user s manual and emulator product are copyrighted and all rights are reserved by Renesas No part of this user s manual all or part may be reproduced or duplicated in any form in hard copy or machine readable form by any means available without Renesas prior written consent Figures Some figures in this user s manual may show items different from your actual system RENESAS 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 Either in the user s manual or on the product several icons are used to insure proper handling of this product and also to prevent injuries to you or other persons or damage to your properties Their graphic images and meanings are given in this safety page Be sure to read this chapter before using the product gt 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 A DANGER DANGER indicates an imminently hazardous situation which if not avoided will result in death or serious injury A WARNING WARNING indicates a potentially hazardous situation which if not avoided could result in death or serio
200. pe Normal Standard event channel Delay Event channel that delay conditions can be set Reset Event channel that can be set as the reset point of the external bus sequential event State Whether the eventpoint is enabled or disabled Enable Valid Disable Invalid 191 13 NE SAS Condition A condition that satisfies an eventpoint The displayed contents differ depending on the channel Action Operation of the emulator when an eventpoint condition is satisfied The displayed contents differ depending on the channel When an event channel is double clicked or selected and Edit is selected from the popup menu in this window the Chx dialog box is displayed The Chx dialog box consists of the Address Data Interrupt Count Delay and Action pages The combination of the conditions set in each page is set as the detection condition of eventpoints 192 NE SAS 1 Address page Specifies the address condition Ch2 Delay Address Data Interrupt Count Delay Action m Address Don tcare Address Start 100000000 End 9100000000 Outside Figure 5 42 Chx Delay Dialog Box Address Page Address Sets the address condition Don tcare Sets no address condition Address Sets the single address Range Sets the address range Start Sets the single address or the start address of the address range mask address can be inpu
201. pecified condition is satisfied Not only the number of cycles but also various items such as the number of cache misses can be measured according to the supported devices Note Items to be measured will differ depending on the product For details on the specifications of each product refer to the additional document Supplementary Information on Using the SHxxxx or the online help a Setting the performance measurement conditions To set the performance measurement conditions use the Performance Analysis dialog box and the PERFORMANCE SET command When a channel line on the Performance Analysis window is clicked with the right mouse button the popup menu is displayed and the Performance Analysis dialog box is displayed by selecting Setting Note Forthe command line syntax refer to the online help b Specifying the measurement start end conditions To set the measurement start end conditions firstly select Ch1 to Ch2 PA or Ch2 to Chl PA in the Ch1 2 3 list of the Combination action dialog box that is opened by right clicking Combination action on the Event Condition sheet of the Event window Then specify the measurement start end conditions for Ch1 and Ch2 of Event condition Notes 1 When no measurement start end conditions are specified measurement is started by executing a program and ended when a break condition is satisfied 2 When only the measurement start or end condition is specified perf
202. pens and the selected line is marked with a cursor 5 9 10 Trimming the Source Choose Trim Source from the popup menu to remove the white space from the left side of the source When the white space is removed a check mark is shown to the left of the Trim Source menu To restore the white space choose Trim Source while the check mark is shown 228 13 N SAS 5 9 11 Temporarily Stopping Trace Acquisition To temporarily stop trace acquisition during execution of the user program select Halt from the popup menu This stops trace acquisition and updates the trace display Use this method to check the trace information without stopping execution of the user program 5 9 12 Restarting Trace Acquisition To restart trace acquisition being stopped during execution of the user program select Restart from the popup menu 5 9 13 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 Unlike the settings made in the Trace Acquisition dialog box for acquiring trace information by conditions changing the settings for filtering several times to filter the acquired trace information allows easy extraction of necessary information which is useful for analysis of data The content of the trace buffer will not be changed even when the filtering fun
203. pp ndix A Menus M Cc 357 Appendix B Command Line Functions esee 361 Appendix C Notes on High performance Embedded Workshop 363 viii RENESAS Section 1 Product Overview The High performance Embedded Workshop is a graphical user interface intended to ease the development and debugging of applications written in programming language and assembly language for Renesas microcomputers Its aim is to provide a powerful yet intuitive way of accessing measuring and modifying the debugging platform in which the application is running The E200F emulator hereafter referred to as the emulator is a software and hardware development support tool for application systems using the Renesas original microcomputer The emulator main unit case is connected through the dedicated debugging interface to the user system The user system can be debugged under the conditions similar to the actual application conditions The emulator enables debugging anywhere indoors or out The host machine for controlling the emulator must be an IBM PC compatible machine with USB 1 1 2 0 13 N SAS Figure 1 1 shows the system configuration using the emulator ada Expansi n profiling unit Reaper Tree umber ROEO200 FO EPUOO ROEO200F1EMU00 with debugger CD R USB cable Host machine Trace cabk optional H UDVAUD probe Type number ROE0200F0ACC Trace unit optional Type number ROE0200F1E
204. pping Through a Program The High performance Embedded Workshop provides a range of step menu commands that allow efficient program debugging Table 6 1 Step Option Menu Description Command 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 15 1 Executing Step In Command The Step In command steps into the called function and stops at the first statement of the called function e To step through the sort function select Step In from the Debug menu or click the Step In button on the toolbar e Figure 6 23 Step In Button 312 13 N SAS 00002000 Sample Sample 00002002 00002012 s0 0 00002016 5150 00002018 s2 0 O000201a s3 0 00002016 s4 0 0000201 s5 0 00002020 s6 0 00002022 5750 00002024 s8 0 00002026 9 0 0000202 ovoid Sample sort long long t int i j gap 0000203 gap 5 while gap gt 0 00002046 for 0 k lt gap 00002054 for i ktgap 1 lt 10 i itgap 0000205c for jzi gap j gt k j j gap 0000206 gt 1 t ali 00002078 ali a j zap 0000207 i alitgap t else break H i 00002090 gap gap 2 Figure 6
205. r No 99 Fushing North Road Taipei Taiwan Tel 886 2 2715 2888 Fax 886 2 2713 2999 Renesas Technology Singapore Pte Ltd 1 Harbour Front Avenue 06 10 Keppel Bay Tower Singapore 098632 Tel 65 6213 0200 Fax 65 6278 8001 Renesas Technology Korea Co Ltd Kukje Center Bldg 18th Fl 191 2 ka Hangang ro Yongsan ku Seoul 140 702 Korea Tel 82 2 796 3115 Fax lt 82 gt 2 796 2145 Renesas Technology Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jalan Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel 603 7955 9390 Fax 603 7955 9510 Colophon 6 0 SH 2A SH 2 E200F Emulator User s Manual 2 NEC S AS RenesasTechnology Corp 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan
206. re rece reap 165 5 81 S W teri ee ber uri eee PEES 165 2 92 JEVenlpolDts GRO RIPE re E ET 165 5 8 3 Opening the Event Window eese rennen 167 5 8 4 Setting S W Breakpoints essent ener rennen asi 168 5 8 5 Setting Onchip Eventpoints 0 eee cece eeceeseeeeeeeeseseseeeccesaeeeaeeeaeenaeesseeseeeaees 170 53 8656 Setting AUD Byventpoints nee 176 5 8 7 Setting BUS Eventpoints sarsies e cta e de ako eine eR NER sca 191 3 88 Setting Other Eventpoints eene eti pere a deed en 201 5 8 0 Editing Breakpoint or Eventpoint sese een eee 206 5 8 10 Enabling Breakpoint or 206 5 8 11 Disabling Breakpoint or 206 5 8 12 Deleting Breakpoint or Eventpoint eese 206 5 8 13 Deleting All Breakpoints or 206 5 8 14 Viewing the Source Line for Breakpoints or Eventpoints ess 206 RENESAS 5 9 5 11 5 12 vi High performance Embedded Workshop User s Manual Viewing the Trace 207 5 9 1 Opening the Internal AUD Window eene 207 5 9 2 Opening the BUS trace Window enne 216 5 9 3 Acquiring External Bus Trace Information BUS trace
207. ring Trace Information 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 trace information acquisition conditions are implemented by eventpoints and acquisition start acquisition end and acquisition can be controlled For setting eventpoints refer to section 5 8 Using the Eventpoints The trace information acquisition mode is set in the I Trace AUD Trace acquisition dialog box that is displayed by selecting Set from the popup menu 212 13 NE SAS I Trace AUD Trace acquisition Trace mode r Trace type Trace AUD function r l Trace mode M Bus amp Branch Acquisition Read Write PC relative addressing Branch M Data access GP M M ADMA Instruction Fetch When trace buffer full Trace continue r AUD mode Branch trace I Window trace VV Channel IV Che Software trace AUDmodel Realtime trace Hon realtime trace c AUD mode2 gt 1 Trace stop Break Trace continue AUD modes F Enable free trace Time stamp 20ns X AUD trace display Start pointer 07255 End pointer Cancel Figure 5 57 I Trace AUD Trace acquisition Dialog Box RENESAS 213
208. rke 00001048 if 0 jg vecttble 00001050 Jezc ds 4 source file E sertcpp 00001058 ali j 00001068 _ gt J Download modules 00001070 p_sam gt change a 1 tutorialabs 3 Dependencies 00001076 p sam s za 0 0000107a p sam sl a 1 0000107e p_sam gt s2 a 2 00001082 p_sam gt s3 a 3 00001086 p_sam gt s4 a 4 0000108 p_sam gt s5 a 5 0000108 p_sam gt s6 a 6 00001092 p_sam gt s7 a 7 00001096 p_sam gt s8 a 8 0000109a p_sam gt s9 a 9 0000109e b P sam 1 000010b8 nii abort void 00001024 pa main void Figure 6 6 Editor Window Setting an S W Breakpoint The symbol e will appear on the line containing the sort function This shows that an S W breakpoint has been set Note The S W breakpoint cannot be set in the ROM area 298 RENESAS 6 8 Setting Registers Set values of the program counter and the stack pointer before executing the program e Select Registers from the CPU submenu of the View menu The Register window is displayed oo000000 ooo00000 ooo00000 nononono ooo00000 ooo00000 ooo00000 oo000000 oo000000 oooo00000 FFF9F000 00000800 00000000000000000000000111110000 Qllil oo000000 oo000000 nononono oo000000 00001044 Figure 6 7 Register Window 299 REN
209. rofile The profiling function is used to measure the performance of each function A function having low performance can be easily found if the statistics of the time for each function are maintained Items that can be measured are the same as those for the on chip performance measurement function Notes 1 Use of the profiling and on chip performance analysis functions at the same time is not possible The Can not use this function error message dialog box will be displayed if simultaneous use is attempted 2 In this function a break occurs whenever a branch is generated and information is collected to execute the user program again Therefore realtime emulation of the user program will not be performed 33 13 N SAS 4 Realtime Profiling Function Realtime Profile The performance of each function can be measured within the specified address range A function having low performance can be easily found if the statistics of the time for each function are monitored In this function performance information is collected without break Therefore realtime emulation of the user program will be performed The specifiable address ranges are as follows e When the expansion profiling unit is not connected 512 kbytes to 4 Mbytes 8 blocks at 512 kbytes e When the expansion profiling unit is connected 512 kbytes to 12 Mbytes 24 blocks at 512 kbytes 1 3 7 Coverage Function The emulator displays the information on the
210. rofile data without selecting this menu In addition do not select this menu when optimizing the program by the optimizing linkage editor using the acquired profile information file e Find Displays the Find Text dialog box to find a character string in the Function column Search is started by inputting a character string to be found in the edit box and clicking Find Next or pressing the Enter key e Find Data Displays the Find Data dialog box Find Data RES Cancel Find Data Maximum C Minimum Figure 5 91 Find Data Dialog Box By selecting the column to be searched in the Column combo box and the search type in the Find Data group and entering Find Next button or Enter key search is started If the Find Next button or the Enter key is input repeatedly the second larger data the second smaller data when the Minimum is specified is searched for e Clear Data Clears the number of times functions are called and profile data Data in the List sheet of the Profile window and the data in the Profile Chart window are also cleared e Output Profile Information Files Displays the Save Profile Information Files dialog box Profiling results are saved in a profile information file pro extension The optimizing linkage editor optimizes user programs according to the profile information in this file For details of the optimization using the profile information refer to the manua
211. rofiling Unit to the Main Unit Case 62 13 N SAS Fasten the expansion profiling unit with screws provided Figure 2 24 Fastening the Expansion Profiling Unit to the Main Unit Case Close the cover of the main unit case to be fastened with two screws e Fasten the screw of the base unit 63 13 N SAS 2 3 11 Connecting the AC Adapter to the Emulator Main Unit Case Connect the provided AC adapter to the main unit case Figure 2 25 Connecting the AC Adapter to the Main Unit Case Connect the provided AC adapter to the connector to input DC 12 V of the AC adapter marked DC IN A WARNING Be sure to use the AC adapter dedicated for E200F Failure to do so will result in a FIRE HAZARD and will damage the user system or the emulator product 64 RENESAS 2 3 12 Connecting the Emulator to the Host Machine This section describes how to connect the emulator to the host machine For the position of each connector of the emulator refer to section 1 2 Emulator Hardware Configuration Notes 1 When Add New Hardware Wizard is displayed select the Search for the best driver for your device Recommended radio button and then the Specify a location check box to select the path to be searched for drivers The location must be specified as Drive ADRIVERS Drive is CD drive letter 2 When a driver is installed in Windows XP a warning message on the Window logo test
212. s Use them as a reference to determine the value of the pull up resistance Note The IC with UVCC power supply operates at 3 3 V or VCC 3 3 to 5 0 V from the H UDI port connector 13 N SAS 77 Emulator control circuit 3 3 User connector S 74AVCA16245 1 74LVC2G125 Vcc AY 74ALVC16245 Vcc nh 12 LVC2G125 E ASEBRKAK p TMS 74ALVC16245 Vcc BS 7ALVC2G125 Vcc A Y 74LVC2G125 7AALVC16245 Vcc Kimm 74LVC2G125 Vcc A Y Figure 3 1 User System Interface Circuits H UDI 78 13 N SAS Emulator control circuit 3 3V User connector 74ALVC16245 10 Vcc AB v 74ALVC16245 Vec AB AUDATAQ 3 0 74LVC2G125 e Vcc AY 74ALVC16245 74LVC2G125 e Vcc AY 74ALVC16245 74ALVC16245 74LVC2G125 L Vcc AY Figure 3 2 User System Interface Circuits AUD 79 13 NE SAS 3 3 Reducing EMI Noise To prevent EMI noise enclose the EV chip unit in a case at usage as shown in figure 3 3 The recommended material of the case is iron plated with nickel or resin internally plated with nickel The case must be large enough to include the EV chip unit the external bus trace unit the emulation memory unit the probe head and the user system Figure 3 3 Countermeasure for EMI Noise Note EMI stands for Electrical Magnetic Interference 80 13 N SAS 3 4 Diagnostic Procedure This section describes
213. s in which human life is potentially at stake Please contact Renesas Technology Corp or an authorized Renesas Technology Corp product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or Systems for transportation vehicular medical aerospace nuclear or undersea repeater use The prior written approval of Renesas Technology Corp is necessary to reprint or reproduce in whole or in part these materials If these products or technologies are subject to the Japanese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited Please contact Renesas Technology Corp for further details on these materials or the products contained therein 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 and Renesas Solutions Corp excluding all subsidiary products e E200F main unit e External bus trace un
214. s word or byte O is set to the upper bits of the R6 register e Flash memory download method For downloading to the flash memory set the items on the Loading flash memory page in the Configuration dialog box which is opened from System then Emulator from the Options menu Configuration General Loading flash memory Loading flash memory C Disable Erasing flash memory amp Disable C Enable File name Browse Bus width of flash memory 32 bit bus width Flash memory erasing time minute Entry point All erasing module address Writing module address Access size Figure 6 57 Loading flash memory Page 349 13 NE SAS Table 6 3 shows the options for the Loading flash memory page Table 6 3 Loading flash memory Page Options Option Loading flash memory radio button Description Sets Enable for flash memory downloading When Enable is selected and File load is selected from the File menu for downloading the write module is always called Enable Download to the flash memory Disable Not download to the flash memory Erasing flash memory radio button Sets Enable for erasing before the flash memory is written When Enable is selected the erase module is called before calling the write module Enable Erase the flash memory Disable Not erase the flash memory File name edit box Sets the file name of the S type load module including the write and erase
215. sed 3 The contents that can be set for the external bus event differ depending on the product For the specifications of each product refer to the online help d Other events Other Event This function can be set in the Other Event sheet of the Event window e Execution time event A break occurs after the specified execution time has passed There is one event detection channel External probe event There is one event detection channel Eventpoints can be defined specifying four external probe signals via the probe cable as the condition For an operation when an event has been detected a break or AUD trace acquisition acquisition start acquisition stop can be specified Note There is a delay of several cycles from the time of detection to the break 26 13 N SAS 1 3 3 Trace Functions 1 Trace Functions The emulator has mainly two trace functions A function that acquires information outside the MCU such as the external bus by a trace a Function to acquire information within the MCU by a trace The acquired trace information is displayed in the Internal AUD window The information to be acquired by a trace is an event that trace acquisition is selected as the action condition in the channel on the Onchip Event sheet of the Event window To store such information there are following three methods Function to store the information in a dedicated trace memory in the MCU The maximum amount
216. sed the contents that have been set in the on chip performance measurement function or data that has been measured will be deleted c Since the profiling function is implemented with the internal break it takes a long time to start and end the user program execution 262 13 N SAS 5 13 Viewing Realtime Profile Information The realtime profiling function is used to measure the execution performance in the specified range of the application program in a function unit This function is effective to investigate the position and the cause of the lowered performance in the application program The realtime profiling function does not affect the realtime operation because it measures the performance by using the profiler measurement circuit on the main unit case and expansion profiling unit of the emulator The following shows the realtime profiling measurement modes e Function mode This function does not include the subroutine execution time when accumulation of the function execution time is displayed e Nest mode This function includes the subroutine execution time when accumulation of the function execution time is displayed Determine which mode is to be used in the Function select dialog box that is displayed when the emulator is activated Note There are following restrictions in the realtime profiling function 1 Restrictions on all the realtime profiling functions i Areas to be measured In the emulator 512
217. ser system or the MCU 5 7 1 Opening the Extended Monitor Window Selecting View gt CPU gt Extended Monitor or clicking the Extended Monitor toolbar button displays this window DLL uL L9 99S 1 Item Value Signal NMI High Signal BREQ High Signal RESET High Signal WAIT High Figure 5 23 Extended Monitor Window Note The items that can be set in this window depend on the emulator in use For details refer to the online help 163 13 N SAS 5 7 2 Selecting Items to be Displayed Selecting Properties from the popup menu displays the Extended Monitor Configuration dialog box Extended Monitor Configuration Update millsecond Running Settings tem Figure 5 24 Extended Monitor Configuration Dialog Box This dialog box allows the user to set the items to be displayed in the Extended Monitor window 164 RENESAS 5 8 Using the Eventpoints The emulator has the eventpoint function that performs breaking tracing and execution time measurement by specifying more complex conditions along with the S W breakpoints standard for the High performance Embedded Workshop 5 8 1 S W Breakpoints When the instruction of the specified address is fetched the user program is stopped Up to 1000 points can be set 5 8 2 Eventpoints Eventpoints can be used for higher level conditions such as the data condition as well as specification of the single address Up to f
218. sive gases may be present 37 13 N SAS Table 1 5 lists the acceptable operating environments Table 1 5 Operating Environments Item Host machine Description Built in Pentium IIl or higher performance CPU 1 GHz or higher recommended IBM PC or compatible machine with USB 1 1 2 0 Full Speed Operating system Windows 98SE Windows Me Windows 2000 or Windows XP Minimum memory capacity 128 Mbytes or more 512 Mbytes or more recommended Hard disk capacity Installation disk capacity 100 Mbytes or more Prepare an area at least double the memory capacity four times or more recommended as the swap area Pointing device such as mouse Connectable to the host machine compatible with Windows 98SE Windows Me Windows 2000 or Windows XP Display Monitor resolution 1024 x 768 or higher AC input power supply Voltage AC 100 V 10 Frequency 50 60 Hz Consumption power 48 W CD ROM drive 38 Required to install the High performance Embedded Workshop for the emulator or refer to the emulator user s manual 13 N SAS Section 2 Setting Up the Emulator 2 1 Flow Chart before Using the Emulator Unpack the emulator and prepare it for use as follows 4 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
219. source of the counter is the CPU clock counting also stops when the clock halts in the sleep mode e Extension setting of the performance result storing counter The 32 bit counter stores the result of performance and two counters can be used as a 64 bit counter To set a 64 bit counter check the Enable check box in the Extend counter group box of the Performance Analysis dialog box for Chl c Displaying the result of performance The result of performance is displayed in the Performance Analysis window or the PERFORMANCE ANALYSIS command in hexadecimal 32 bits However when the extension counter is enabled it is displayed in hexadecimal 64 bits Note Ifa performance counter overflows as a result of measurement will be displayed 32 N SAS d Initializing the measured result To initialize the measured result select Initialize from the popup menu in the Performance Analysis window or specify INIT with the PERFORMANCE ANALYSIS command 2 AUD Performance Analysis Function AUD Performance Analysis The emulator allows you to measure the time or count of execution between specified events in the AUD event detection system It is possible to set the resolution of the timer to any of the following values 20 ns 100 ns 400 ns or 1 6 us At 20 ns the maximum time that can be measured is about six hours and at 1 6 us the maximum time is about 20 days 3 Profiling Function P
220. ssembler dialog box opens by double clicking on the instruction that you want to change You can modify the assembly language code Assembler Address Code Mnemonic 00001040 79370028 OK Cancel Figure 5 16 Assembler Dialog Box The address instruction code and mnemonic are displayed Enter a new instruction or edit the old instruction in the Mnemonics field Pressing the Enter key will replace the memory content with the new instruction and move on to the next instruction Clicking the OK button will replace the memory content with the new instruction and close the dialog box Clicking the Cancel button or pressing the Esc key will close the dialog box Note The assembly language display is disassembled from the actual machine code in the memory If the memory contents are changed the dialog box and the Disassembly window will show the new assembly language code but the display content of the Editor window will not be changed This is the same even if the source file contains an assembly codes 155 13 N SAS 5 4 2 Viewing a Specific Address When you are viewing your program in the Disassembly window you may want to look at another area of your program s code Rather than scrolling through a lot of code in the program you can go directly to a specific address Select Set Address from the popup menu and the dialog box shown in figure 5 17 is displayed Set Address Address
221. ssion file name including the character string that has been set in the Target name text box in figure 4 27 New Project 8 9 Setting the Debugger Options dialog box The setting for using the emulator has been registered in this session file After selected the emulator is automatically connected 110 3 NE SAS 4 2 3 Selecting an Existing Workspace 1 In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select Browse to another project workspace radio button and click the OK button Welcome Figure 4 29 Welcome Dialog Box 111 RENESAS 2 The Open Workspace dialog box is displayed Select a directory in which you have created workspace After that select the workspace file hws and press the Open button Open Workspace Look in E sample t EJ 24 sample ample wes File name sample hws Files of type Workspaces Cancel 2 Figure 4 30 Open Workspace Dialog Box 3 This activates the High performance Embedded Workshop and recovers the state of the selected workspace at the time it was saved When the saved state information of the selected workspace includes connection to the emulator the emulator will automatically be connected To connect the emulator when the saved state information does not include connection to the emulator refer to section 4 5 Connecting the Emulator 112 RENESAS 4 3 Setti
222. t End Sets the end address of the address range mask address can be input Outside Sets other value than that has been set for the single address or address range as the condition 193 RENESAS 2 Data page Specifies the data bus condition Ch2 Delay Address Data Interrupt Count Delay Action Data Don t Care Read Write Read Write Value H 0000 Outside Figure 5 43 Chx Delay Dialog Box Data Page Data Sets the data condition Don t care Sets no data condition Read Write Sets the read or write cycle as the condition Read Sets the read cycle as the condition Write Sets the write cycle as the condition Value Sets the data bus value mask data can be input Outside Sets other value than that has been set for Value as the condition 194 RENESAS 3 Interrupt page Specifies the signal conditions of NMI and external interrupts Ch2 Delay Address Data Interrupt Count Delay Action NMI IRQI IRQ2 IRQ3 Dont care Don t care Dont care Dont care High C High C High High C Low C Low C Low C Low IRG4 IRQS IRQ IRQ Don t care Dont care Dont care Dont care High C High C High C High C Low Low C Low C Low Caneel Figure 5 44 Chx Delay Dialog Box Interrupt Page Don t care Sets no signal condition High Satisfies a condition when the signal
223. t 3 gt 2 a sequential AUD event occurs Selects whether or not AUD event channel Ch1 is used as the reset point Disable Not used as the reset point Enable Used as the reset point Specifies the operation after the sequential AUD event has been detected Break Breaks after the sequential AUD event has been detected Trace stop Stops AUD trace after the sequential AUD event has been detected When the sequential AUD event condition is set and the eventpoint condition is edited with the AUD event channel that has been selected for Channel select the Action page cannot be modified To modify the settings of the Action page cancel the sequential AUD event condition 13 NE SAS 5 8 7 Setting BUS Eventpoints On the BUS Event sheet the settings for BUS Eventpoints are displayed and modified Reset Disable Delay Disable Normal Disable Normal Disable Normal Disable Normal Disable Breakpoint Onchip Event AUD Event Other Event Figure 5 41 Event Window BUS Event Sheet Using six event detection channels sets six eventpoints Notes 1 When the external bus trace unit is not connected to the emulator this function is not supported 2 When the debugging function of the external bus trace unit is set again the number of event detection channels changes Items that can be displayed in the sheet are listed below Type External bus event channel number and ty
224. t Execution Stop S W Break 321 RENESAS The Status window displays the following contents SHXXX E200F SYSTEM E7 E10 Emulator USB Driver SHXXX Ready Cause of last break BREAK POINT Run time count 00h OOmin 00s OOO0ms OOOus 100ns Emulation mode Hardware break disable Endian Big y Memory A Platform Figure 6 35 Displayed Contents of the Status Window S W Break Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help 322 RENESAS 6 18 Break Function by an Eventpoint With this emulator an Onchip Eventpoint AUD Eventpoint Other Eventpoint and BUS Eventpoint can be set An example of how to set a break using an Onchip Eventpoint is shown below For other eventpoint setting methods refer to section 5 8 Using the Eventpoints 6 18 1 Setting the Break by an Onchip Eventpoint A method is given below in which the address bus condition is set under event channel 1 of the Onchip Eventpoint e Select Eventpoints from the Code submenu of the View menu The Event window is displayed e The S W breakpoint that has been previously set is deleted Click the Event window with the right hand mouse button and select Delete All from the popup menu to cancel all S W breakpoints that have been set e To set an Onchip Eventpoint click on Onchip Eventpoint Here event channel 1 is set Note The number of event cha
225. t are listed below The display content will be added depending on the status of the optional units in use Type Other event channel Probe External probe event channel Runtime Count Execution time event channel State Whether the eventpoint is enabled or disabled Enable Valid Disable Invalid Condition A condition that satisfies an eventpoint The displayed contents differ depending on the channel Action Operation of the emulator when an eventpoint condition is satisfied The displayed contents differ depending on the channel When an event channel is double clicked or selected and Edit is selected from the popup menu in this window the dialog box for setting conditions is displayed The displayed contents of this dialog box differ depending on the event channel 201 13 N SAS 1 Probe dialog box Double clicking the Probe event channel displays this dialog box Conditions of the eventpoint can be set on the Condition and Action pages a Condition page Specifies four external probe signal conditions via the external probe cable Probe Condition Action Condition Operation c OR Probe 1 Low Probe 2 Don t Care Probe 3 Hieh Probe 4 Dont Care Figure 5 50 Probe Dialog Box Condition Page Operation Specifies how to combine the probe signal conditions AND Determines whether or not the condition is satisfied by AND operation of the probe signal co
226. t be activated again RealProfile Area 1 function mode The realtime profiling function measurement mode function mode has been selected RealProfile Area 1 nest mode The realtime profiling function measurement mode nest mode has been selected Coverage 4M The coverage function is selected AUD data bus width Sets the AUD data bus width Notes 1 The bus width can be selected as 4 bits or 8 bits In some products the bus width will be fixed For the specifications of each product refer to the online help The items that can be set in this dialog box depend on the emulator in use For details refer to the online help 133 13 N SAS 5 14 EVA Board Page Sets the EV chip unit operation conditions Note When the EV chip unit is not connected to the emulator this page is not displayed Items that can be displayed in this page are listed below Change Emulation in start up Displays the Select Emulation dialog box when the emulator is activated by connecting the EV chip unit User Signals Enables the reset NMI wait and bus request signals output from the user system Multiplexed pins setting Sets the pins that have been set by the pin function controller PFC The following functions can be implemented by correctly setting the pins corresponding to the signals e Monitoring function e Memory map function e External bus trace function performed by detecting the externa
227. t function For details refer to the online help 5 12 11 Creating Profile Information Files To create a profile information file choose the Output Profile Information Files menu option from the pop up menu The Save Profile Information Files dialog box is displayed Pressing the Save button after selecting a file name will write the profile information to the selected file Pressing the Save button will write the profile information to all of the profile information files Save Profile Information Files Profile Information files Profile Information files GAHew3YSamplei Sample pro Save All Browse Figure 5 93 Save Profile Information Files Dialog Box 260 RENESAS 5 12 12 Notes Tolerances The profiling function internally breaks user program execution collects the measured data and re executes the user program Since the function also counts when the measured item is generated at break or re execution tolerances will be included in the measured profile value The measured value of this function should be the reference 2 Functions that cannot be used while the profiling function is being used a On chip performance analysis function The on chip performance analysis function cannot be used when the profiling function is enabled b Step function When the profiling function is enabled do not use the step function The profile data cannot be measured correctly c Internal trac
228. t too low the speed of downloading will be lowered Set the frequency not to exceed the upper limit for the MCU s guaranteed TCK range For details of the limitations on both clocks refer to the section of Notes on Using the JTAG H UDI Clock TCK and AUD Clock AUDCK in the additional document Supplementary Information on Using the SHxxxx The following is a description of the procedure used to set the clocks 292 13 N SAS 6 4 Setting the Configuration Dialog Box e Select Emulator then Systems from the Options menu to set a communication clock The Configuration dialog box is displayed Configuration General Main Board Bus Board Loading flash memory Mode SHxxxx Emulation mode Step option Disables interrupts during single step execution Read Write on the fly H UDI Read Write y AUD clock 8CPUchck H pin select Disable e Bit pattem fon JTAG clock fook j Cancel Figure 6 1 Configuration Dialog Box e Set appropriate values in the AUD clock and JTAG clock combo boxes The clock also operates with the default value 293 13 NE SAS Note The items that can be set in this dialog box differ depending on the product For details on the settings for each product refer to the online help e Click the OK button to set a configuration 6 5 Checking the Operation of the Target Memory for Downloading Check that the destination
229. ted in a unit of assembly instructions Assembly Executes stepping in a unit of assembly instructions Source Steps only one source line Halt Program Esc Stops the execution of the user program Connect la 6 Connects the debugging platform Initialize Disconnects the debugging platform and connects it again Disconnect Disconnects the debugging platform Download Modules Downloads the object program Unload Modules 360 13 N SAS Unloads the object program Appendix Command Line Functions The emulator supports the commands that can be used in the command line window For details refer to the online help 361 13 N SAS 362 13 N SAS 1 Appendix C Notes on High performance Embedded Workshop Note on Moving Source File Position after Creating Load Module When the source file is moved after creating the load module the Open dialog box may be displayed to specify the source file during the debugging of the created load module Select the corresponding source file and click the Open button Source Level Execution Source file Do not display source files that do not correspond to the load module in the program window For a file having the same name as the source file that corresponds to the load module only its addresses are displayed in the program window The file cannot be operated in the program window Step E
230. temperature of 35 Care should be taken that this temperature is not exceeded VIII RENESAS A CAUTION Cautions for AC Adapter Use only the AC adapter included in this product package The included AC adapter is for this emulator Do not use it for other product The DC plug on the included AC adapter has the below polarity CECI The included AC adapter has no power supply switch The power is always applied to the AC adapter while connecting the AC power cable Cautions to Be Taken for This Product Use caution when handling this product Be careful not to apply a mechanical shock Do not pull the main unit by the probe of the emulation probe or the flexible cable which are connected to this product Excessive flexing or force of the flexible cable for connecting this product to the emulation probe may break connector Caution for Installation When in use do not place the emulator on its side RENESAS RENESAS High performance Embedded Workshop User s Manual Introduction The High performance Embedded Workshop is a powerful development environment for embedded applications targeted at Renesas microcontrollers The main features are e configurable build engine that allows you to set up compiler assembler and linker options via an easy to use interface e Anintegrated text editor with user customizable syntax coloring to improve code readability
231. tents in the cache Clicking the Cancel button closes the dialog box without storing the newly entered contents in the cache A value can be directly input in the window 5 10 3 Flushing the Cache Contents Selecting Flush from the pop up menu flushes cache V U and LRU bits are cleared to 0 and all cache entries are invalidated Note that during execution of an instruction the Flush menu is disabled and cache cannot be flushed 5 10 4 Searching the Cache Items Selecting Find from the pop up menu opens the Find Cache dialog box in which a cache item can be searched for in column units Note that during execution of an instruction the Find menu is disabled and the cache item cannot be searched for Find Gache Find Golumn Tae Address Find Value 900000000 Figure 5 78 Find Cache Dialog Box This dialog box searches for a cache item The following search conditions can be specified Find Column Item to be searched for Find Value Value to be searched for After setting the search conditions the search can be started by clicking the OK button As a result the matching entry is highlighted Clicking the Cancel button closes the dialog box without searching for a cache item 242 13 N SAS 5 10 5 Continuing the Cache Search The next matching cache item can be searched for with the search conditions that have previously been set In the state where a matching cache item
232. that can be set in this dialog box depend on the emulator in use For details refer to the online help 3 The items to be displayed in this dialog box depend on the emulator in use For details refer to the online help 145 13 N SAS 5 1 9 Changing the Memory Map Setting Clicking the Edit button on the Memory Mapping dialog box after selecting the information on the memory map setting you want to change opens the Edit Memory Mapping dialog box Edit Memory Mapping Memory Mapping From Setting EMULATION AREA 32 bit Emulation memory Unit Multiplexed Address pins setting cae Figure 5 9 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 Setting Enter the memory map setting The choices given are listed below z ULATION AREA 32 bit The data bus width is 32 bits lt ULATION AREA 32 bit Read Only is area is write protected and the data bus width is 32 bits gt ULATION AREA 16 bit The data bus width is 16 bits a ULATION AREA 16 bit Read Only is area is write protected and the data bus width is 16 bits e Rs zg MULATION AREA 8 bit The data bus width is 8 bits 146 13 N SAS e EMULATION AREA 8 bit Read Only This area is write protected and the data bus width is 8 bits e USER AREA This ar
233. 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 OS installation directory gt Tools Renesas DebugComp Platform E200F xxxx Tutorial Here xxxx means the name of the target MCU 90 RENESAS After the directory has been specified select the following file and click the Open button Look jn Quoi e er E3 Tutorial Tutor ial File name utorial hws Files of type Workspaces hws Cancel Figure 4 3 Open Workspace Dialog Box 8 The CPU Select dialog box is displayed GPU Select GPU Select SHxxxx Figure 4 4 CPU Select Dialog Box Select the CPU from the drop down list and click the OK button 91 RENESAS 9 The Select Emulator mode dialog box is displayed depending on the MCU used Select Emulator mode DM SHxxxx Mode E200F Emulator C Writing Flash memory Cancel Figure 4 5 Select Emulator mode Dialog Box Select the MCU name in use from the Device drop down list box The following items are selected in the Mode group box E200F Emulator The E200F emulator for the specified MCU is activated Debugging the program is enabled Writing Flash memory The user program is programmed to the flash memory Debugging the program is disabled To download the load module register it in the workspace
234. 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 When the dialog box is closed after setting the Debug Settings dialog box the emulator will automatically be connected b Connecting the emulator without the setting at emulator activation Connect the emulator by simply switching the session file to one in which the setting for the emulator use has been registered test High performance Embedded Workshop Eie Edit view Project Options Build Debug Memory Tools Window Help jBsuc sS seejoraj em m ejes snez mimnm HD Se amp l amp SessionSH Moblle 21 EE sicwucsmeeecm nss X Ea mem Ei test C3 source file 2 Download modules amp Dependencies E Connected Figure 4 38 Selecting the Session File 121 3 NE SAS In the list box that is circled in figure 4 38 select the session file name including the character string that has been set in the Target name text box in figure 4 27 New Project
235. the final development stage The user system can be debugged under conditions similar to the actual application conditions Compact debugging environment When the emulator is used a laptop computer can be used as a host machine creating a debugging environment in any place 13 N SAS 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 Protect the emulator from excessive impacts and stresses For details refer to section 1 4 Environmental Conditions 4 When moving the host machine or user system take care not to vibrate or damage it 5 After connecting the cable check that it is connected correctly For details refer to section 2 Setting Up the Emulator 6 Supply power to the connected equipment after connecting all cables Cables must not be connected or removed while the power is on 1 1 Components Check all the components unpacking For details on the emulator components refer to section 1 1 in the additional document Supplementary Information on Using the SHxxxx If the components are not complete contact Renesas sales office 13 N SAS 1 2 Emulator Hardware Configuration As shown in figure 1 2 the emulator consists of a main unit case
236. times that functions have been called is displayed Times The total execution time is displayed 269 RENESAS 5 13 2 Specifying the Measurement Range Clicking the right hand mouse button on the window displays the popup menu When Add Range is selected from the popup menu the EDIT dialog box opens to specify the measurement range of realtime profile Start 00000000 Cancel Figure 5 100 EDIT Dialog Box When the expansion profiling unit is connected to the emulator it is possible to measure the profile information within the 6 Mbyte ranges in total When the expansion profiling unit is not connected to the emulator it is possible to measure the profile information within the 2 Mbyte ranges in total In the emulator 512 kbytes are considered as a unit to acquire the profiling information on all the functions in the eight block areas Addresses to be specified for each block need not be adjacent When the expansion profiling unit is connected to the emulator 16 blocks of 512 kbytes are added and the 24 block areas can be measured in total The measured data in each block is displayed on each page of the Realtime Profile window To switch the page to be displayed select that page and click the OK button in the Select Page dialog box that is opened by selecting Select Page from the popup menu of the Realtime Profile window 270 13 N SAS al DOCOUU HOD EE EFE 0 00 100000 H 00 17FFFF 00 180
237. tine execution time is not included e RealProfile Area2 nest mode Measures accumulation of execution time of each function the subroutine execution time is also included e Coverage 8M Acquires the information on the CO coverage in the 8 Mbyte areas Note When the expansion profiling unit is not connected to the emulator this combo box is displayed in gray 75 RENESAS 76 13 NE SAS Section 3 Hardware Specifications 3 1 List of Specifications Table 3 1 lists the external dimensions and mass of the emulator Table 3 1 External Dimensions and Mass No Item Specification 1 External dimensions of E200F main unit case 195 x 130 x 45 mm Mass of E200F main unit case 490 g 2 External dimensions of E200F external bus trace unit 90 x 125 x 15 2 mm Mass of E200F external bus trace unit 83 g 3 External dimensions of E200F expansion profiling unit 98x 115 x 15 2 mm Mass of E200F expansion profiling unit 52 g 4 External dimensions of E200F EV chip unit 110 x 125 x 15 2 mm Mass of E200F EV chip unit 110 g 5 External dimensions of user system interface board 60 x 90 x 26 mm Mass of user system interface board 45 g 6 External dimensions of E200F emulation memory unit 90 x 125 x 15 2 mm Mass of E200F emulation memory unit 3 2 User System Interface Circuits ROEO0200F1MSR00 81 9 ROEO200F1MSR01 85 g Figures 3 1 and 3 2 show user system interface circuit
238. tion start acquisition stop can be specified A combination of one or more of the BUS evenpoints enables specifying more complex sequential conditions This function can be set in the BUS Event sheet of the Event window Notes 1 When the external bus trace unit is not connected to the emulator this function is not supported 2 When the function of the external bus trace unit is changed the number of event detection channels is changed For details refer to section 5 1 5 Bus Board Page 4 Other Eventpoint This function can be set in the Other Event sheet of the Event window a Execution time eventpoint Eventpoints can be defined specifying the program execution time as the condition There is one event detection channel For an operation when an event is detected break can be specified b External probe eventpoint Eventpoints can be defined specifying four external probe signals via the probe cable as the condition There is one event detection channel For an operation when an event is detected break or AUD trace acquisition acquisition start acquisition stop can be specified 166 13 N SAS 5 8 3 Opening the Event Window Select View gt Code gt Eventpoints or click the Eventpoints toolbar button E to open the Event window The Event window has the following five sheets Breakpoint sheet Displays the settings made for S W breakpoints It is also possible to set modify and
239. tion is satisfied The displayed contents differ depending on the channel 170 RENESAS When an event channel is double clicked or selected and Edit is selected from the popup menu in this window the Event condition x dialog box is opened and eventpoint conditions can be modified Event condition 1 Address Data Bus State Count Action Address Don t Care Address Only program fetched address Only program fetched address after Address 00000000 Nonusermask C User mask Mask Figure 5 28 Event condition x Dialog Box Address Page For details on the Event condition x dialog box refer to the online help for each product 171 RENESAS Setting Conditions on Combination action The user can set a sequential condition as the order of conditions on multiple channels being satisfied Selecting Combination action from the popup menu of the Onchip Event sheet opens the Combination action dialog box which allows the user to specify the order of conditions being satisfied How to Set Combination action Combination action Sequential or Setting a Ch 1 2 3 Don t care v Don care Break Ch 3 2 1 Ch 45 Break Ch 3 2 1 Reset point Break Ch 2 1 Break Ch 2 1 Reset point Trace stop Ch 3 2 1 Trace stop Ch 3 2 1 Reset ponit Trace stop Ch 2 1 Trace stop Ch 2 1 Reset point Combination action Sequential or Setting
240. tions that have been set Stopping the user program displays the result of measurement in the Performance Analysis window 5 11 5 Deleting a Measurement Condition Select Reset from the popup menu with a measurement condition selected to delete the condition 5 11 6 Deleting All Measurement Conditions Select Reset All from the popup menu to delete all the conditions that have been set 5 12 Viewing the Profile Information The profiling function enables function by function measurement of the performance of the application program in execution This makes it possible to identify parts of an application program that degrade its performance and the reasons for such degradation The High performance Embedded Workshop displays the results of measurement in three windows according to the method and purpose of viewing the profile data 249 13 N SAS 5 121 Stack Information Files The profiling function allows the High performance Embedded Workshop to read the stack information files extension SNI which are output by the optimizing linker ver 7 0 or later Each of these files contains information related to the calling of static functions in the corresponding source file Reading the stack information file makes it possible for the High performance Embedded Workshop to display this information to do with the calling of functions without executing the user application i e before measuring the profile data However this f
241. trace unit When the connector 2 CN4 external bus trace unit 1s not used these connectors are not used Note There are two types of emulation memory unit ROEO200F1MSRO0 8 Mbytes ROE0200F1MSRO01I 16 Mbytes In this manual the 16 Mbyte emulation memory unit is used for explanation 18 3 NE SAS Emulation Memory Unit Optional Rear View He o e o tenes a E gt o re r4 L3 gt Figure 1 16 Emulation Memory Unit Optional Rear View a EV chip unit interface Connectors for interfacing the EV chip unit They are connected to connector CN2 the dedicated connectors on the EV chip unit b User system interface Connectors for interfacing the user system for the external bus trace connector for the external They are connected to the dedicated connector installed on the EV bus trace CN5 chip unit or the user system 19 RENESAS 1 3 Emulator Functions This section describes the emulator functions They differ depending on the device supported by the emulator For the usage of each function refer to section 5 Debugging or section 6 Tutorial 1 3 1 Overview Table 1 1 gives a functional overview of the emulator For details on the functions of each product refer to the online help Table 1 1 Emulator Functions No Item Function 1 User program execution e Executes a program with the operating frequency within a functions range guara
242. ulator The check boxes for COMPONENT indicate as follows Main Emulator main unit OPTION Expansion profiling unit TRC External bus trace unit EVA EV chip unit Memory Emulation memory unit Note When COMPONENT is selected do not select TARGET TARGET is used for jigs for the shipment test 6 When the EV chip unit has been connected select the target MCU in Select Cpu 7 When the emulation memory unit has been connected select the corresponding memory capacity in Select Memory Type The items for this combo box indicate the products as follows 8Mbyte 8 Mbyte emulation memory unit 16Mbyte 16 Mbyte emulation memory unit 8 Click the USER TEST MODE button Do not select QA TEST MODE 9 When the emulator enters USER TEST MODE the screen shown in figure 3 5 is displayed 10 When clicking UNIT ONLY items that can be tested are selected 11 Click the START button 82 13 N SAS 12 When loading FPGA is completed the test will begin F001 SH72060 Test amp Maintenance Program Version DECEM FILE COMPONENT MAIN ERROR STOP Board No 0011 TEST COUNT ME ENDLESS STATUS v SDRAM R W TES BYPASS TEST v FLASH MEMORY READ TEST AUD RUN TIME MEASUREMENT TEST REGISTER R W v H UDI REGISTER R W TEST I Select UNIT ONLY v AUD REGISTER R W TEST TRC FPGA REGISTER R W TEST AUD TRACE OPTION FPGA1 2 REGISTER R W TEST
243. up menu displayed by clicking the right hand mouse button on the header column hides that column To display the hidden column select the column from the said popup menu again Dragging the column with the mouse changes the display order 220 13 N SAS 5 9 6 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 Table5 2 Trace Find Dialog Box Pages Page Description General Sets the range for searching Address Sets an address condition Data Sets a data condition Type Selects the type of trace information Bus Selects the type of a bus R W Selects the type of access cycles Note Items other than General and Address depend on the emulator in use For details refer to the online help Clicking the OK button after setting conditions in those pages stores the settings and starts searching Clicking the Cancel button closes this dialog box without setting conditions When a trace record that matches the search conditions is found the line for the trace record will be highlighted When no matching trace record is found a message dialog box will appear Only the trace information that satisfies all the conditions set in above pages will be searched If a search operation is successful selecting Find Next from the popup menu will mov
244. us injury CAUTION CAUTION indicates a potentially hazardous situation which if not avoided may result in minor or moderate injury CAUTION CAUTION used without the safety alert symbol indicates a potentially hazardous situation which if not avoided may result in property damage NOTE emphasizes essential information In addition to the four above the following are also used as appropriate RENESAS A means WARNING or CAUTION Example A CAUTION AGAINST AN ELECTRIC SHOCK Q means PROHIBITION Example DISASSEMBLY PROHIBITED e means A FORCIBLE ACTION Example c UNPLUG THE POWER CABLE FROM THE RECEPTACLE VI RENESAS A WARNING Warnings for AC Power Supply A If the attached AC power cable does not fit the receptacle do not alter the AC power cable and do not plug it forcibly Failure to comply may cause electric shock and or fire Use an AC power cable which complies with the safety standard of the country Do not touch the plug of the AC power cable when your hands are wet This may cause electric shock This product is connected signal ground with frame ground If your developing product is transformless not having isolation transformer of AC power this may cause electric shock Also this may give an unrepairable damage to this product and your developing one While developing connect AC power of the product to commercial power through isolation transformer in order to
245. ven standard C libraries are executed To return to a higher level function enter Step Out In a for statement or a while statement executing a single step does not move execution to the next line To move to the next line execute two steps Operation During Accessing Files Do not perform other operations during downloading the load module operating Verify Memory or Save Memory in the Memory window or saving in the Trace or Code Coverage window because this will not allow correct file accessing to be performed Watch Local variables at optimization Depending on the generated object code local variables in a C source file that is compiled with the optimization option enabled will not be displayed correctly Check the generated object code by displaying the Disassembly window If the allocation area of the specified local variable does not exist displays as follows Example The variable name is asc asc target error 2010 xxxx Variable name specification When a name other than a variable name such as a symbol name or function name is specified no data is displayed 363 13 NE SAS Example The function name is main main Line Assembly Input radix Regardless of the Radix setting the default for line assembly input is decimal Specify H or Ox as the radix for a hexadecimal input Command Line Interface Batch file To display the message Not currently availab
246. will be correctly performed Step1 Step2 Step3 Figure 5 97 Restriction on Call ii Nesting functions If 32 step or more calls are generated from the top function within the range to be measured correct measurement will not be performed A warning message will be displayed ii Calling from a function outside the measurement range Correct measurement will not be performed if a function outside the measurement range calls a function to be measured and the callee function cannot return correctly to the caller function Even if the callee function returns correctly to the caller function correct measurement will not be performed if other functions are called within three instructions from the return address 267 13 N SAS iv Relationships between the Go start address break address and measurable ranges Figure 5 98 Measurable Ranges Nest Mode Measurable ranges when a break occurs at the position of black circle e Execution time and counts of function h Measurable ranges when a break occurs at the position of red circle e Execution time and counts of functions h and Measurable ranges when a break occurs at the position of blue circle e Execution time and counts of functions h and k It is recommended that a break occur within the function where execution is started When execution returns to the upper function the execution counts of the function cannot be measured 268 13 N SAS 5 13 1 Opening th
247. window 23 13 NE SAS The emulator is used to set event conditions and the software trace in the Onchip Event sheet Table 1 2 lists the conditions of Event Condition Table 1 2 Types of Event Condition Event Condition Type Description Address bus condition Address Breaks when the MCU s address bus value or the program counter value matches the specified value Data bus condition Data Breaks when the MCU s data bus value matches the specified value Byte word or longword can be specified as the access data size Bus state condition There are two bus state condition settings Bus State Bus state condition Breaks or acquires a trace when the specified bus value is matched Read Write condition Breaks or acquires a trace when the specified read write condition is matched Count Breaks when the conditions set are satisfied the specified number of times Action Selects the operation when a condition such as setting a break trace or performance start or end is matched Note The contents that can be set for the on chip event differ depending on the product For the specifications of each product refer to the additional document Supplementary Information on Using the SHxxxx or the online help b AUD event function AUD Event This is a function that sets eventpoints according to the information output from the AUD interface There are eight event detection channels The eventpoints can be def
248. window Breakpoint Enable Address 00001076 tutorial cpp 48 Break 4 o y Breakpoint Onchip Event AUD Event Other Event BUS Event Figure 6 33 Event Window S W Breakpoint Setting Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help To stop the tutorial program at the S W breakpoint the following procedure must be executed e Set the program counter and stack pointer values PC H 00000800 and R15 H FF9F000 that were set in section 6 8 Setting Registers in the Register window Click the Go button e If program execution is failed reset the device and execute again the procedures above 320 RENESAS The program runs and stops at the set S W breakpoint 00001024 Hi maintvoid long a 10 long j int i class Sample p sam 00001036 while 1 00001034 p_sam new Sample 00001038 for i 0 i lt 10 00001044 j rand 00001048 0 00001050 j 00001058 allil j 00001068 pP sam sort a 00001070 P sam change a 00001076 P sam s a 0 0000107 P sam sl a l 0000107 p_sam gt s2 a 2 00001082 P sam s3 a 3 00001086 p_sam gt s4 a 4 o0000108a p sam sb a b 0000108 P sam sB a B 00001092 p_sam gt s al7 00001096 p_sam gt s8 a 8 0000109 p_sam gt s9 a 9 0000109 DA P sam 00001008 abort void Figure 6 34 Editor Window a
249. x Note This dialog box differs depending on the product For details refer to the online help 138 RENESAS 5 1 6 Sets the expansion profiling unit operation conditions Note When the expansion profiling unit is not connected to the emulator this page is not displayed Configuration General Main Board Bus Board Option Board Loading flash memory Option board mode setting 2 Cancel Figure 5 6 Configuration Dialog Box Option Board Page 139 13 NE SAS Item that can be displayed in this page is listed below Option board mode setting 140 Displays the functions of the expansion profiling unit Settings cannot be changed if they are to be changed the emulator must be activated again RealProfile Area 2 function mode The realtime profiling function measurement mode function mode has been selected RealProfile Area 2 nest mode The realtime profiling function measurement mode nest mode has been selected Coverage 8M The coverage function has been selected The 8 Mbyte area can be measured 13 N SAS 5 17 Downloading to the Flash Memory Sets the emulator operation conditions for downloading the external flash memory For details refer to section 6 21 Download Function to the Flash Memory Area 141 13 N SAS Configuration General Loading flash memory Loading flash memory C Disable Erasing flash mem
250. y connected The message Connected is displayed on the Debug tab in the Output window to indicate the completion of connection 104 3 NE SAS 4 2 2 Creating the New Workspace Toolchain Used 1 In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select Create a new project workspace radio button and click the OK button Welcome Figure 4 24 Welcome Dialog Box 105 RENESAS 2 Creation of a new workspace is started If you have purchased the toolchain the following dialog box is displayed Projects Workspace Name Demonstration Cy Empty Application Project Name tE Import Makefile Library Directory C Hew3 test Browse GPU family SuperH RISC engine Tool chain Hitachi SuperH Standard Properties Figure 4 25 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 Enter the directory name in which the workspace will be created Click the Browse button to select a directory CPU family drop down list box Select the target CPU family Tool chain drop down list box Select the target toolchain name when using the toolchain Otherwise select None Project type list box Select the project
251. y edited around the current position of the text cursor 295 RENESAS 6 6 Downloading the Tutorial Program 6 6 1 Downloading the Tutorial Program Download the object program to be debugged e Select Download module from Tutorial abs under Download modules B Q tutorial B tutorial header file sbrkh sorth stackscth 1 vecth 5 39 source file dbsctc intpre c resetpre c sbrk c vecttblc B a source file E m sort cpp i tutorial cpp E a Download modules E tutorial abs Lg Dependencies Download module debug data only module Configure View v Allow Docking Hide Figure 6 4 Downloading the Tutorial Program 296 3 NE SAS 6 6 2 Displaying the Source Program The High performance Embedded Workshop allows the user to debug a user program at the source level e Double click tutorial cpp under C source file tutorial 3 tutorial E C header file l sbrkh sorth long a 10 stackscth long j vecth QUU 5 class Sample p sam C source file dbsctc 00001036 while 1 pipes 20001008 ca reat 29 120 i 00001044 j rand l sbrkc 00001048 ifGi 01 15 veettblc 00001050 j j C C source file sortepp 00001058 7 ali j 8 00001068 p_sam gt sort a I Download modules 00001070 p_sam gt change a tutorialabs x Dependencies 00001076 _
252. yed the latest diagnostic program has been updated In this case select CLOSE and execute the E200F diagnostic program 9 Select CLOSE 10 The initial screen of the E200F diagnostic program is displayed figure 3 8 11 Execute the diagnostic program with the procedure as described in section 3 4 2 Executing the Diagnostic Program TM Version Up COMPONENT V Main OPTION TRO FV TARGET YersionUp Select Cpu E USEI PASSWORD Figure 3 9 Screen after Selecting VER UP 87 RENESAS TM Version COMPONENT Main OPTION TRO EVA I Memmy M ersionUp Select Cpu VersionUp Success USE Figure 3 10 Screen when Completing Update TM Version Up COMPONENT Main OPTION M TRC EVA Memmv Select CLOSE VersionUp Select Cpu With no necessity for updating USE PASSWORD Figure 3 11 Screen Displayed when the Latest Version has been Updated 88 RENESAS Section 4 Preparations for Debugging 4 1 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 e Connecting the emulator Connect the emulator to the host machine Connect the user system interface cable to the connector of the emulator Connect the user system interface cable to the connector in the user system
Download Pdf Manuals
Related Search
Related Contents
DAQ M Series NI USB-621x User Manual Pfister F-049-KYCC Use and Care Manual Samsung SGH-C100 Instrukcja obsługi MANUAL DE USUARIO S7D219 Mode d`emploi - Direct Pesage Genius GS-720 取扱説明書 - 日立の家電品 Peach 312916 ink cartridge MANUAL del USUARIO del AquaLink RS en ESPA OL Ñ RS8TM Victor M2524S Instructions / Assembly Copyright © All rights reserved.
Failed to retrieve file