Home

RX Family Simulator Debugger V.1.02 User`s Manual

image

Contents

1. Table 5 1 Simulator Debugger Commands cont No Command Name Abbr Function 31 CLEAR_OUTPUT_WINDOW COW Clears the contents of the specified tab in the Output window 32 CLOSE_TEST_SUITE CTS Closes a test suite 33 CLOSE_WORKSPACE CW Closes the current workspace 34 COMPARE_TEST_DATA CTD Compares test data 35 COVERAGE CV Enables or disables coverage measurement 36 COVERAGE_DISPLAY CVD Displays coverage information 37 COVERAGE_LOAD CVL Loads coverage information 38 COVERAGE_RANGE CVR Sets a coverage range 39 COVERAGE_SAVE CVS Saves coverage information 40 DEBUGCONSOLE DC Enables or disables the debug console function 41 DEBUGCONSOLE_CLEAR DCC Clears the contents of the DebugConsole window 42 DEBUGCONSOLE_ECHOBACK DCEB Specifies enabling or disabling of local echo back for data transmitted to the microcomputer 43 DEBUGCONSOLE_GETC DCGC Receives one character from the microcomputer 44 DEBUGCONSOLE_ DCGL Acquires the number of characters received from the microcomputer in GETLENGTH the receive buffer 45 DEBUGCONSOLE_GETS DCGS Receives a character string from the microcomputer 46 DEBUGCONSOLE_ DCLE Acquires the states of execution for the most recent DCGC and DCGS LASTERROR commands 47 DEBUGCONSOLE_LOG DCL Logging operations 48 DEBUGCONSOLE_PORT DCP Sets a port as the destination for redirection 49 DEBUGCONSOLE_PUTC DCPC Directly transmits the specified character string to the mic
2. I O DLL Stop The peripheral function has stopped PC Breakpoint PC H nnnnnnnn A PC breakpoint condition was satisfied so execution has stopped The information in parentheses shows the satisfied PC breakpoint condition instruction address Step Normal End The step execution succeeded Stop Execution has been stopped by the Stop button Trace Buffer Full Since the Break mode was selected by Trace buffer full handling in the Trace Acquisition dialog box and the trace buffer became full execution was terminated WAIT Instruction Instruction execution has been suspended by a WAIT instruction R20UT0445EJ0100 Rev 1 00 Page 111 of 136 Dec 24 2010 tENESAS RX Family Simulator Debugger V 1 02 Section6 Messages 6 2 Error Messages The simulator debugger outputs error messages to notify users of the errors of user programs or operation Table 6 2 lists the error messages Table 6 2 Error Messages Message Contents Undefined Instruction Exception An error has occurred due to undefined instruction exception processing Privilege Instruction Exception An error has occurred due to privileged instruction exception processing Floating point Exception An error has occurred due to floating point exception processing Reset Exception An error has occurred due to reset exception processing Interrupt Exception An error has occurred at the i
3. K K K K K K U K K K K Figure 3 38 Options Dialog Box 3 8 3 Enabling the Profile Choose View gt Performance gt Profile to open the Profile window Choose Enable Profiler from the pop up menu of the Profile window The item on the menu will be checked R20UT0445EJ0100 Rev 1 00 Page 62 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 8 4 Specifying Measurement 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 OS stop tracing function calls 3 8 5 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 3 8 6 List Sheet This sheet lists functions and globa
4. sscsessesssssersesncssnsesseesessnessesseesoeesoessceesesenssseessonssesssessersseseeeeses 118 R20UT0445EJ0100 Rev 1 00 Page v of vi Dec 08 2010 RENESAS 7 2 4 setting a PC Breakpoint sinisiin ese eE E EE E E AEE E R 119 125 Setting the Profe sirio en e ERa R E dante sacauysa vos EEA S RE AA 119 7 2 6 setting the Simulated Osis cs iscs cesses ool acct acne Goes eee cs RUN SA lee a ea ea aes 120 7 2 7 Setting the Trace Information Acquisition Conditions ce eeeeeeeeeeeeceseeeeeeeeeeeeeeeeeeeeesecsaesaeeaeesaeeaes 121 7 2 8 Setting the Stack Pointer and Program Counter eeeeecesscesecssecseecneecaeeseeeeeeeeeeeeeeeeseseeeseesaeeaeeaeesaeaes 122 73 Start Debug SING ii s c sete Foetus TEn EEEE EEEE EE EEES EERTE E E E EE E E E E E iad 122 7 3 1 Executing a Progtai srecrorore reie resserc ereere E eE ES EEE E EEE EE EE TEE E ER EEEN ER 122 7 3 2 Using the Traco BUG a cacicccstipnessconieielesisivesssucviaedaiivansssteviads tbvechsviassnuivavsesvousecesadiens pilevontsnecedovaveedveveiuedad 126 7 3 3 Performing Trace Search eesic s cisscesdesseassedsccvaseoucvehi oddcoansdencayesedscvasvdnnsohs vbecsonstes edbeshdedesenttesssbeadsasaedeycayebadees 127 7 3 4 Checking Simulated I O sssi niera Neh dense ae E aie eiday Bie lien GAs 128 7 3 5 Checking the Breakpoint cise so dsscesigateceiecsapevesesnsuneensesboseseesbuee coepuaseictitessnsss0nes cadgevan chapevsndesdeuians sqseveuranetnes 129 7 3 6 Watching Variables iicce cccsstlececkiesee
5. To use the settings saved in a coverage information file choose the file from Open a recent coverage file or open a file open dialog box by Browse to another coverage file and select the file When Open a recent coverage file is selected up to four recent files that have been saved are displayed R20UT0445EJ0100 Rev 1 00 Page 71 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Clicking OK opens the Coverage window When the Coverage window has already been displayed for specifying address settings are added in the window e Coverage window specifying address Coverage w a X Range Statistic status FFFF9071 FFFF9141 96 Enable Figure 3 47 Coverage Window Specifying Address This window displays the coverage range and statistical information The following items are displayed Range Address range Statistic Percentage of the instructions executed within the range Status Enable or Disable status of the coverage range When the Coverage window is closed the acquired coverage information and the conditions to acquire information will be cleared e Coverage window specifying source file Coverage E K os Functions Statistic Status main 96 Enable sort 97 Enable change 100 Enable Figure 3 48 Coverage Window Specifying Source File This window displays the coverage range and statistical information The following
6. Updates all build dependencies of the current project 5 1 17 Test Tool Facility Command Name Abbr Function CLOSE_TEST_SUITE CTS Closes a test suite COMPARE_TEST_DATA CTD Compares test data OPEN_TEST_SUITE OTS Opens a test suite RUN_TEST RT Executes a test 5 1 18 Debugging Functions for the Realtime OS Command Name Abbr Function OSOBJECT_ALL_ADD OAA Adds OS objects of a specific object type OSOBJECT_ALL_DELETE OAD Deletes OS objects in a specific sheet OSOBJECT_AUTO_UPDATE OAU Changes the automatic update setting to Auto and Break OSOBJECT_DATA_LOWLINE ODL Moves an OS object to the next line OSOBJECT_DATA_SAVE ODS Saves the information on an OS object to a file OSOBJECT_DATA_UPLINE ODU Moves an OS object to the previous line OSOBJECT_DISPLAY OD Shows the information on an OS object OSOBJECT_NO_UPDATE ONU Changes the automatic update setting to Lock OSOBJECT_ONE_ADD OOA Adds an OS object OSOBJECT_ONE_DELETE OOD Deletes an OS object OSOBJECT_ONE_EDIT OOE Edits an OS object OSOBJECT_SETTING_LOAD OSL Loads OS object settings from a file OSOBJECT_SETTING_SAVE OSS Saves OS object settings in a file OSOBJECT_STOP_UPDATE OSU Changes the automatic update setting to Break R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 104 of 136 lt ENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines 5 1 19 File Input
7. Initially this window is blank When you choose Analyze Execution History from the pop up menu or click the Analyze Execution History button W in the toolbar the simulator debugger starts analyzing the execution history from the end of the trace result and shows the result in a tree structure Trace evol sasazz t EEr alae lt _PowerON_Reset_PC gt FFFF8043 Ely lt _PowerON_Reset_PC gt FFFF8022 __INITSCT FFFF9386 lt FFFF801E INIT_IOLIB FFFF8CD8 lt FFFF8022 _main FFFF9071 lt FFFF8044 printf FFFF9349 lt FFFFOOTE _rand FFFF936A lt FFFF9090 l printf FFFF9349 lt FFFFOOCF _rand FFFF936A lt FFFF9090 H printf FFFF9349 lt FFFFOOCF Range 0036672 0000000 File Cycle 0035976 Address FFFF9071 Time 00 00 00 000 021 760 Label Address BSW Instruction Interrupt Access Data 0035976 main FFFF9O71 00 00 0 021 760 OPUI C ADD 30H RO RO uUSsP lt 00001A74 0035975 FFFF9074 00 00 a770 OPUI C 00007BE4H R5 lt FFFF841C 0035974 FFFF9O7A 00 00 00 s 780 OPUI C 4H RO usP lt 00001a70 0035973 FFFF9O7 C 00 00 00 i 790 OPUI C R5 R0 00001A70 lt FFFF841C 0035972 FFFF907E 00 00 00 820 OPUI C _printf OOO01A6 C lt FFFF9082 0035971 printf FFFF9349 00 00 00 a 830 OPUI c 0H R5 R5 lt 00000000 0035970 FFFF934B 00 00 00 840 OPUI c RS 00001468 lt 00000000 0035969 FFFF934D 00 00 00 050 OPUI 08H RO R4 R4 lt 00001A70 00359
8. a CPET You can double click the symbol to the left of array a in the Watch window to expand the variable and show the individual elements in the array R20UT0445EJ0100 Rev 1 00 Page 129 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Watch H oo0o00000 H O000053de H 00002704 H 00005665 H O0000daa H O000421f H O0003ead H 00004d1d H O0002f5a H O00020da e Close the Watch window 0000145 long 10 o00001a5 00001460 00001464 00001468 O00001A6 c 00001470 00001474 00001478 00001447C 00001480 Figure 7 20 Watch Window 7 3 7 Executing the Program in Single Steps Current The simulator debugger has various stepping menus that are useful in debugging the program Menu Description Step In Executes each statement includes statements within the function Step Over Executes a function call in a single step Step Out Steps out of a function and stops at the next statement of the program that called the function Step Executes the specified number of steps at the specified speed R20UT0445EJ0100 Rev 1 00 Dec 24 2010 tENESAS Section 7 Tutorial Sc ope Page 130 of 136 RX Family Simulator Debugger V 1 02 Section 7 Tutorial Step In Enters the called function and stops at the statement at the start of the called function e To step in the sort function select Step In from the Debug menu or click the Step In button on th
9. 00000000 oo000000 oo000000 ooo0000a o000198 o0001a5 00001890 00000000000100110000000000000011 OPUI 2e FFFFSOB3 FFFFS858 ooo00000 ooo00000 ooo00000 00000100 oooo000000000000 Figure 7 13 Register Window Register values when the program is terminated can be checked R20UT0445EJ0100 Rev 1 00 Page 125 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial 7 3 2 Using the Trace Buffer The trace buffer can be used to clarify the history of instruction execution e Select Trace from the View gt Code menu and open the Trace window Scroll up to the very top of the main function E Address Time Stamp PSW Instruction Interrupt Access Data 0035207 _ mai FFFF9042 00 00 00 000 OPUI c ADD 30H RO RO usP lt O0001aA5 0035206 FFFF9045 00 00 00 000 OPUI c MOV L OOO07BCCH RS RS lt FFFF8434 0035205 FFFF904B 00 00 00 000 r OPUI C SUB 4H RO usP lt 00001a58 0035204 FFFF904D 00 00 00 000 OPUI c MOV L RS RO 00001458 lt FFFF8434 0035203 FFFF904F 00 00 00 000 A OPUI C BSR A _printf 00001454 lt FFFF9053 0035202 _pri FFFF9312 00 00 00 000 OPUI c MOV L 0H R5 R5 lt 00000000 0035201 FFFF9314 00 00 000 OPUI PUSH L RS 00001a50 lt 00000000 0035200 FFFF9316 00 00 000 OPUI ADD 08H RO R4 R4 lt 00001A58 0035199 FFFF9319 00 00 000 OPUI ADD 7H R4 R4 lt O0001A5F 0035198 FFFF931B 00 00 000 OPUI MOV L O8H RO R3
10. CENESAS OD D aF d lt D S C v RX Family Simulator Debugger V 1 02 User s Manual All information contained in these materials including products and product specifications represents information on the product at the time of publication and is subject to change by Renesas Electronics Corporation without notice Please review the latest information published by Renesas Electronics Corporation through various means including the Renesas Electronics Corporation website http www renesas com Renesas Electronics www renesas com Rev 1 00 Dec 2010 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents copyrights
11. Figure 7 6 Simulator System Dialog Box System Page e Confirm that Enable in Simulated I O Address is checked e Click the OK button to enable the simulated I O R20UT0445EJ0100 Rev 1 00 Page 120 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial e Select Debug Console from the View gt CPU menu and open the DebugConsole window The simulated I O will not be enabled if the DebugConsole window is not open fe DebugConsole eT Figure 7 7 DebugConsole Window 7 2 7 Setting the Trace Information Acquisition Conditions e Select Trace from the View gt Code menu to open the Trace window Open the pop up menu by right clicking the mouse on the Trace window and select Acquisition from the pop up menu The Trace Acquisition dialog box below will be displayed R20UT0445EJ0100 Rev 1 00 Page 121 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Trace Acquisition Trace Function Trace Buffer Full Handling Trace Capacity Acquisition Condition m Trace Event Enable Continue 65536 records All Type Condition Add Delete Delete All Enable All Disable All Cancel Figure 7 8 Trace Acquisition Dialog Box Section 7 Tutorial e Set Trace Function to Enable in the Trace Acquisition dialog box and click the OK button to enable the acquisition of the trace information 7 2 8 Setti
12. OPUI 30H RO RO usP lt O0001a5 0000003 FFFF9045 00 00 00 000 a OPUI OOO007BCCH RS R5 lt FFFF8434 0000002 FFFF90485 00 00 00 000 A OPUI C 4H RO UsP lt 00001458 0000001 FFFF904D 00 00 00 000 A OPUI c R5 R0 00001458 lt FFFF84 i 0000001 _ printf FFFF9312 00 00 00 000 3 OPUI c 0H R5 R5 lt 00000000 0000002 FFFF9314 00 00 00 000 OPUI C R5 00001450 lt 000000 0000003 FFFF9316 00 00 00 000 OPUI 08H RO R4 R4 lt 00001458 0000004 FFFF9319 00 00 00 000 OPpuI 7H R4 R4 lt O0001A5F 0000005 FFFF931B 00 00 00 000 x OPUI O8H RO R3 R3 lt FFFF8434 0000006 FFFF931D 00 00 00 000 OPUI 04H R4 R4 lt 00001a5 0000007 FFFF9320 00 00 00 000 OpuI 00001590H R2 R2 lt 00001590 0000008 FFFF9326 00 00 00 000 OPUI 00006D0BH R1 R1 lt FFFF92F5 Figure 3 30 Trace Window in Event Trigger Mode Bus Display Mode This window displays the following trace information items No Number of times that the trace point has been encountered once the simulation has started PTR Pointer to entry in the trace buffer 0 for the trigger of the event Label Label corresponding to the address only displayed when a label is set Address Instruction address Time Stamp Total instruction execution time hours minutes seconds milliseconds microseconds nanoseconds PSW Display the value of the processor status word PSW as a mnemonic Instruction Instruction m
13. Port Port name File Name Filename I O Input or output In File input Out File output Mode Mode of file input or output Repeat Repeated input Once Input only once Overwrite Write output over existing files Append Append output to existing files Repeat Start Line number where repeated input starts State Whether the file is open or closed Open Open Close Closed 2 Adding a File Section 3 Debugging Right click on the Port I O tabbed page and select Add from the popup menu or double click on an item in the list to open the Set Port I O dialog box Set Port 1 0 21x m Port select Module Port SCI z RxD_0 m File setting File fates 1 0 Input mode Output mode In C Repeat C Erite C Out Start Linef Append Once Cancel Figure 3 15 Set Port I O Dialog Box The following items can be set in this dialog box R20UT0445EJ0100 Rev 1 00 Dec 24 2010 RENESAS Page 37 of 136 RX Family Simulator Debugger V 1 02 Section3 Debugging Port select Module Select the module for the port that data are to be input to or output from Port Select the port name File setting File Specify the filename If the filename extension is omitted csv is automatically appended I O Input File input Output File output Input mode Repeat When the end of the file is reached the input is repeated from the
14. can be set in the Select Break Type dialog box To open the Select Break Type dialog box click on the Add button in the Trace Acquisition dialog box or select Add from the popup menu opened by right clicking on the Software event tabbed page of the Event window For details on the conditions and actions to take refer to section 3 6 Using the Simulator Debugger Breakpoints If you wish to modify the condition of an event for tracing double click on the event condition in the Trace Event section to open the Select Break Type dialog box R20UT0445EJ0100 Rev 1 00 Page 52 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 7 4 Acquiring Trace Information After trace acquisition is enabled trace information is acquired during instruction execution The acquired information will be displayed in the Trace window Bus display disassembly display and source display or mixtures of these are available 1 Bus Display Mode In the pop up menu select Display Mode gt BUS a Acquire All Mode In this mode the Trace window shows all trace data from the start to the end of simulation Range 0036672 0000000 File Cycle 0035976 Address FFFF9071 Time 00 00 00 000 021 760 PTR Label Address Time Stamp PSW Instruction Interrupt Access Data je 0035976 main FFFF9071 00 00 00 000 021 760 OPUI c ADD 30H RO RO aa usP lt O0001A74 0035975 FF
15. d ld n i al i 000037 000038 FFFFSOE4 sort laj Figure 3 32 Trace Window Source Display Mode R20UT0445EJ0100 Rev 1 00 Page 55 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 4 Mixed Display Mode This display mode provides a mixed display of bus disassemble or source display After choosing Display Mode gt BUS from the pop up menu select Display Mode gt DIS That way you can produce a bus and disassemble mixed display In the same way you can produce a bus and source a disassemble and source or a bus disassemble and source mixed display To revert to a bus only display after viewing a bus and disassemble mixed display choose Display Mode gt DIS from the pop up menu again eSVEBl w Await Bie 4d bd ABA File Cycle 0035976 Address FFFF9071 Time 00 00 00 000 021 760 Address Time Stamp PSW Instruction Interrupt Access Data FFFF9O71 _main ADD 30H RO RO 0035976 _main FFFF9O71 00 00 000 021 760 OPUI c ADD 30H RO RO uSsP lt O0001A74 FFFF9074 Moy L OOOO7BE4H R5 0035975 FFFF9074 00 00 000 021 770 OPUI C MOV L 00007BE4H RS R5 lt FFFF841C FFFFOO A SUB 4H RO 0035974 FFFF907A 00 00 000 021 780 OPUI c SUB 4H RO usP lt 00001A70 FFFFSO7C I L R5 R0 0035973 FFFF9O7C 021 790 OPUI C MOV L R5 R0 OO001A70 lt FFFF841 FFFF907E B A _printf 0035972 FFFF907E 00 00 000 021 820 OPUI c BSR A _print
16. respectively e Close the dialog box by clicking OK The memory resource can also be referred to or modified by using the Debugger page on the RX Standard Toolchain dialog box Changes made in either of the dialog boxes are reflected 7 2 2 Downloading the Sample Program When using the demonstration project the sample program to be downloaded is automatically set so check the settings e Open the Debug Setting dialog box by selecting Debug Settings on the Debug menu R20UT0445EJ0100 Rev 1 00 Page 116 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Debug Settings SimSessionRX600 M amp SmoeCoeTasct vow SC CONFIGDIR PRO 00000000 Elf Dwarf2 Modi Modi IEMOYE Jp Bici Figure 7 2 Debug Settings Dialog Box e Files to be downloaded are listed in Download Modules e Close the Debug Settings dialog box by clicking the OK button e Download the sample program by selecting Download Modules gt All Download Modules from the Debug menu R20UT0445EJ0100 Rev 1 00 Page 117 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial 7 2 3 Displaying the Source Program The HEW supports the source level debugging Display the source file Tutorial c in the Source window e Open the Source window by double clicking Tutorial c on the Workspace window Tutorial c Bala Source Ade
17. window Open the pop up menu by right clicking the mouse on the Profile window and select View Profile Chart to display the Profile Chart window Profile Chart _freopen _fclose _fflush Figure 7 29 Profile Chart Window In the above figure it can be found that the __flclose function was called three times from the __freopen functions and the _close function was called three times This is the end of the tutorial using the simulator debugger R20UT0445EJ0100 Rev 1 00 Page 136 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 User s Manual Publication Date Rev 1 00 December 24 2010 Published by Renesas Electronics Corporation rCENESAS SALES OFFICES Renesas Electronics Corporation http www renesas com Refer to http www renesas com for the latest and detailed information Renesas Electronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 U S A Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Electronics Canada Limited 1101 Nicholson Road Newmarket Ontario L3Y 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Electronics Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 585 100 Fax 44 1628 585 900 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel 49 211 65030 Fax 49 21 1 6503 1327 Renesas Electronics China Co Ltd 7th Floor Quantum
18. zl Browse Cancel I Source Address Hoo000000 7 Data size Count Figure 3 26 Set File Output Action Dialog Box When the condition is satisfied the contents at the specified location in memory are written to the specified file Output file Data file to which data are written Append Selects whether the data should be appended to the file if an existing file is specified as the output file Address Memory address to read data from Data size Size of each data value to be read 1 2 4 8 Count Number of values to be read H 1 to H FFFFFFFF when the prefix is omitted values input are taken as decimal and the display is in decimal notation R20UT0445EJ0100 Rev 1 00 Page 48 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging e Interrupt et Interrupt Aetion 2x Interrupt type Ho Interrupt type2 Cancel Priority H O Figure 3 27 Set Interrupt Action Dialog Box When the condition is satisfied interrupt processing proceeds For details refer to section 2 15 Pseudo Interrupts Interrupt type 1 Sets the following values for each CPU when the prefix is omitted values input are taken as hexadecimal and the display is in hexadecimal notation Priority Interrupt priority 0 to 8 or 0 to H 10 if the prefix is omitted values input are taken as hexadecimal and the display is hexadecimal The value is in the range from 0 to
19. 104 Viewing the Source Window sisc ccssesecesiuecedencusndesebedecsetcedesesseuesedeanssadsbanvoescodsttesnsseiiesedennsbsevocesesesboteveev eies 73 3 10 5 Specifying the New Coverage Range ee eeeeccesscssecssecseecseecseseaeseaeeseeeeeeseceeeeaeeeaeesecsaecsaecsaesaeeeeneeaeeegs 73 3 10 6 Changing the Coverage Range wo sic 25ciccis nesscsicatacdsseieaieesccs E aaestae eee tee asec eevee 73 3 10 7 Deleting the Selected Coverage Range sssssscssssssssossessecssenssesseesonssseeneesoseecessoeesnssersessessssossessessesesoess 74 3 10 8 Acquiring Coverage Information 0 0 e ee ceecesecesecssecseecaeecseeeseeeeeeseeeseeeseeesecaecaecsaecsaecaeesseseaeeeeeeeeeaeesaees 74 3 10 9 Clearing Coverage Informations lt vcciscsscscsetisesscsensnse cat ges sn nnestessseiseesesoapeusvestgevepesousees EEEE EE REEE ESERE OS 74 3 10 10 Saving Coverage Information in a File ceceseeeeceeeceeeceseceseceaecaecsaecaecaecsaecsaecaeeeaeseaeseeeeeeeeaeeeaees 74 3 10 11 Loading Coverage Information from a File ee eee ecceeeceeeceseceseceaecnaeceecaeecaeecaeseaeseeseeeseeseeeeseeaeenaees 75 3 10 12 Updating the Informathoms scc scisdceslesscs scdvessscnseceaas oddeoessdencsussedicsvasedecsanhvbsdsunsles tkesedscouducvan EE EEEE Er KREN RE 75 3 10 13 Confirmation Request Dialog BOX 00 cece eeceseeseceee cscs ceeeeneeeeeeeeeeeeeesesessaecsaecsaecsaecaaecaeeeseseeeseeeeeaeeaesaees 75 3 10 14 Save Coverage Data Dialog BOX c cssecsescesenstenetsntecnes
20. 115 SAVE_SESSION SE Saves the current session 116 SAVE_WORKSPACE SW Saves the current workspace 117 SET_DISASSEMBLY_SOFT_ SDB Sets or deletes a software breakpoint at the disassembly level BREAK 118 SET_SOURCE_SOFT_BREAK SSB Sets or deletes a software breakpoint at the source level 119 STATE_DISASSEMBLY_SOFT_ TDB Enables or disables a software breakpoint at the disassembly level BREAK 120 STATE_SOURCE_SOFT_ TSB Enables or disables a software breakpoint at the source level BREAK 121 STATUS STA Displays the debugging platform status 122 STEP ST Steps program by instructions or source lines 123 STEP_MODE SM Selects the step mode 124 STEP_OUT SP Steps out of the current function 125 STEP_OVER SO Steps program not stepping into functions 126 STEP_RATE SR Sets or displays rate of stepping 127 SUBMIT SU Executes a command file 128 SYMBOL_ADD SA Defines a symbol 129 SYMBOL_CLEAR SC Deletes a symbol 130 SYMBOL_LOAD SL Loads a symbol information file 131 SYMBOL_SAVE SS Saves a symbol information file 132 SYMBOL_VIEW SV Displays symbols 133 TCL Enables or disables the TCL 134 TOOL_INFORMATION TO Outputs information on the currently registered tool to a file 135 TRACE TR Displays trace information 136 TRACE_CONDITION_SET TCS Sets trace information acquisition 137 TRACE_SAVE TV Outputs trace information into a file R20UT0445EJ0100 Rev 1 00 Page 109 of 136 Dec 24
21. 21468 a 2 9988 a 3 22117 a 4 3498 a 5 16927 a 6 16045 a 7 19741 a 8 12122 a 9 8410 O x Figure 7 17 DebugConsole Window R20UT0445EJ0100 Rev 1 00 Dec 24 2010 ztENESAS Page 128 of 136 RX Family Simulator Debugger V 1 02 Section 7 Tutorial 7 3 5 Checking the Breakpoints A list of all the breakpoints that are set in the program can be checked in the Event window e Select Eventpoints from the View gt Code menu Event jt s condition BP Enable PC FFFF90B3 Tutorial c39 Software Break A Software Event Figure 7 18 Event Window A breakpoint can be set a new breakpoint can be defined and a breakpoint can be deleted using the Event window e Close the Event window 7 3 6 Watching Variables It is possible to watch the values of variables used in your program and to verify that they change in the way that you eo expected For example set a watch on the long type array a declared at the beginning of the program by using the following procedure e Select Watch from the View gt Symbol menu to open the Watch window And click the right mouse button on the Watch window and choose Add Watch from the pop up menu The following dialog box will be displayed Add Watch Variable or expression Figure 7 19 Add Watch Dialog Box 669 e Type array a and click the OK button er The Watch window will show the long type array
22. 7 Simulator System Dialog Box Memory Tab The following items can be specified in this dialog box Memory Map Displays the memory type start and end addresses data bus width and the number of access cycles Memory Resource Displays the access type and start and end addresses of the current memory resource Memory Map can be added modified or deleted using the following buttons a Adds Memory Map items Clicking this button opens the Set Memory Map dialog box figure 3 7 and memory map items can be added al Modifies Memory Map items Select an item to be modified in the list box and click this button The Set Memory Map dialog box figure 3 8 opens and memory map items can be modified x Deletes Memory Map items Select an item to be deleted in the list box and click this button Memory Resource can be added modified or deleted using the following buttons Adds Memory Resource items Clicking this button opens the Set Memory Resource dialog box and memory resource items can be specified R20UT0445EJ0100 Rev 1 00 Page 28 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging al Modifies Memory Resource items Select an item to be modified in the list box and click this button The Set Memory Resource dialog box opens and memory resource items can be modified x Deletes Memory Resource items Select an item to be deleted in the list box and click this b
23. Break Cycle Condition 2 x Cycle Gount f ALL Times Figure 3 22 Set Number of Cycles Break Condition Dialog Box Up to 1024 number of cycles break conditions can be specified Cycle Number of cycles required to cause a break H 1 to H FFFFFFFF The condition will be satisfied by execution for the number of cycles in the Cycle setting x n However the specified number of cycles may differ from the number of cycles on which the condition is satisfied Count Number of times the break will occur ALL The break will occur whenever the condition is satisfied Times The break will only occur up to the number of times specified as Times 1 to 65535 if the prefix is omitted values input are taken as decimal and the display is in decimal notation R20UT0445EJ0100 Rev 1 00 Page 45 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Break Data Set Data Break Condition Address H o0000000 x Option Equal 7 Cancel Datal H O Data2 Sia I Data mask HFFFFFFFF Size longword Sign Sima vf Figure 3 23 Set Break Data Condition Dialog Box Data break conditions should be set as follows Up to 1024 data break conditions can be specified Address Address in memory for which the break condition is specified Option How the data value is used to form the condition that must be satisfied for break generation Equal The value written to memory
24. Disable Simulated I O is enabled if Using I O Library was selected in the window for setting up the generated file Simulator I O addr Displays address for the above simulated I O Bus mode Currently not used by the simulator debugger Endian Displays the endian of CPU The endian specified on the screen for setting this option is reflected Patch Indicates the priority levels in use for interrupts and whether the MVTIPL instruction is enabled or disabled Off Available priority levels for interrupts are from 0 to 15 The MVTIPL instruction is enabled RX610 Available priority levels for interrupts are from 0 to 7 The MVTIPL instruction is disabled R20UT0445EJ0100 Rev 1 00 Page 23 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Refer to the High performance Embedded Workshop User s Manual for items other than those listed under Detail options 3 2 Starting up the Simulator Debugger You can connect to the simulator debugger by selecting a session file in which simulator debugger settings have already been defined When you have selected targets in the process of creating a project the number of session files is the same as the number of selected targets Select the session file that corresponds to the current target from the drop down list shown in figure 3 3 Figure 3 3 Selecting a Session File If you have selected a session file with which the simulator debugger
25. Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if you have any other
26. FFFF9083 printf a d sld n i a i FFFFSOB3 sort a FFFFSOB8 FFFF90C8 for i O i lt 10 i FFFF90D4 printf a d sld n i a i FFFF9104 change a FFFF910D void sort long aj long t int i j K gap Figure 7 24 Source Window Step Out R20UT0445EJ0100 Rev 1 00 Page 132 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Step Over Executes a function call in a single step and stops at the next statement in the main program Select Step Over from the Debug menu or click the Step Over button on the toolbar to step over the statements in the printf function T Figure 7 25 Step Over Button amp Tutorial c Source ddress S W Breakpoints FFFF9042 oid main void long a 10 long j int i FFFF9045 printt Data Input n FFFF9055 for i O i lt 10 i FFFF9061 j randi FFFF9064 i 3 lt Ot FFFF9071 Js 27 FFFF9079 ati jJ FFFF9083 printf a da sld n i a i FFFFS0B3 2 sort a FFFFS0B8 printft Sorting results n FFFF90C8 FFFF90D4 printf a d l1d n i a i FFFF9104 change a FFFF910D void sort long a long t int i j K gap Figure 7 26 Source Window Step Over When the printf function has been executed Sorting results will be displayed in the DebugConsole window R20UT0445EJ0100 Rev 1 00
27. Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China Tel 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Unit 204 205 AZIA Center No 1233 Lujiazui Ring Rd Pudong District Shanghai 200120 China Tel 86 21 5877 1818 Fax 86 21 6887 7858 7898 Renesas Electronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 852 2886 9318 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 7F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 8 175 9600 Fax 886 2 8175 9670 Renesas Electronics Singapore Pte Ltd 1 harbourFront Avenue 06 10 keppel Bay Tower Singapore 098632 Tel 65 62 13 0200 Fax 65 6278 8001 Renesas Electronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 JIn Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955 9510 Renesas Electronics Korea Co Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2010 Renesas Electronics Corporation and Renesas Solutions Corp All rights reserved Colophon 1 0 RX Family Simulator Debugger V 1 02 User s Manual 2CENESAS Renesas Electronics Corporation R20UT0445EJ0100
28. RAM EXT External memory I0 Internal I O Begin address Start address of the memory corresponding the memory type End address End address of the memory corresponding to the memory type Data bus size Memory data bus width Read state count Number of cycles states for read access to the specified type of memory Write state count Number of cycles states for write access to the specified type of memory Endian Endian of the specified area of memory Clicking the OK button stores the settings Clicking the Cancel button closes this dialog box without modifying the settings Notes 1 The memory map setting for the area allocated to a system memory resource cannot be deleted or modified First delete the system memory resource allocation on the Memory tab of the Simulator System dialog box then delete or modify the memory map setting 2 The data bus size cannot be displayed or modified for any type of memory other than external memory 3 The data bus size read state count and write state count do not affect to the instruction simulations The number of states cycles for memory access is always 1 4 The memory map must start and end on 16 byte boundaries If any other setting is made the map is adjusted to the closest 16 byte boundaries that include the set values 5 Itis not possible to view or modify the current endian for the internal I O area 6 The endian for the internal ROM and RAM areas is only m
29. and Output through Virtual Ports Command Name Abbr Function PORT_FILE_ADD PFA Adds a file for input or output through a virtual port PORT_FILE_CLOSE PFC Closes a file for input or output through a virtual port PORT_FILE_DELETE PFD Deletes the setting of a file for input or output through a virtual port PORT_FILE_OPEN PFO Opens a file for input or output through a virtual port PORT_FILE_STATUS PFS Shows the current state of a file for input or output through a virtual port R20UT0445EJ0100 Rev 1 00 Page 105 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines 5 2 Commands Alphabetical Order Table 5 1 lists the commands in alphabetical order Refer to the simulator debugger help about each command Table 5 1 Simulator Debugger Commands No Command Name Abbr Function 1 Comment 2 ADD_FILE AF Adds a file to the current project 3 ANALYSIS AN Enables or disables performance analysis 4 ANALYSIS_RANGE AR Sets or displays performance analysis functions 5 ANALYSIS_RANGE_ AD Deletes a performance analysis range DELETE 6 ASSEMBLE AS Assembles instructions into memory 7 ASSERT Checks if an expression is true or false 8 AUTO_COMPLETE AC Enables or disables the auto complete function 9 BREAKPOINT BP Sets a breakpoint at an instruction address 10 BREAK_ACCESS BA Specifies a memor
30. cannot activate the DTC or DMAC 2 Control Registers Table 2 8 shows control registers of the ICU that are supported by the simulator debugger In access to control registers ensure that the unit of access is the same as the size of the register R20UT0445EJ0100 Rev 1 00 Page 12 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions Table 2 8 Control Registers of the ICU Supported by the Simulator Debugger Peripheral Supported Control Register Support Module ICU IRn n 028 to 029 IRn n 214 to 241 ISELRO28 ISELRO29 ISELRO30 ISELRO31 ISELR215 ISELR216 ISELR219 ISELR220 ISELR223 ISELR224 ISELR227 ISELR228 ISELR231 ISELR232 ISELR235 ISELR236 ISELR239 ISELR240 IERO3 IER1A IER1B IER1C IER1D IER1E IPRm m 04 to 07 IPRm m 80 to 86 FIR Notes O Supported A Partly supported bits for the function described in section 2 8 3 1 Supported Range 1 These registers are only supported for products of the RX600 series 2 These registers are only supported for products of the RX610 group Oolololtlolololelelelele lelelelelele le leleley eye e leleloljo The addresses of the control registers the interrupt vector numbers and the position of the priority register can be referred to or modified in the Peripheral Modul
31. for the update interval 100 ms Specifiable range for the update interval 10 ms to 10 000 ms 3 5 2 Viewing and Modifying the Settings for the I O Area If you wish to view or modify the settings for the I O area through the Memory window ensure that the access size defined in the hardware manual is selected for display in the Memory window Otherwise the settings may not be correctly displayed or modified 3 6 Using the Simulator Debugger Breakpoints Sophisticated breakpoint functions are available in the simulator debugger in addition to the HEW standard PC breakpoints The user can specify break conditions and actions after a break condition is satisfied and can display the breakpoints set 3 6 1 Listing the Breakpoints Choose View gt Code gt Eventpoints or click the Eventpoints toolbar button Ex to open the Event window which lists the breakpoints set Event BP Enable PC FFFFOOE4 Tutorial c 38 Stop 14 gt software Break A Software Event Figure 3 16 Event Window R20UT0445EJ0100 Rev 1 00 Page 40 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging The following items are displayed Type Break types BP PC break BA Access break BD Data break BR Register break register name BS Sequential break BCY Number of cycles break State Whether the breakpoint is enabled or disabled Enable Valid Disable Invalid Cond
32. item is selected as shown in the figure below GUI 1 0 new panel OF x Figure 3 75 GUI I O Window Item Selected Drag the item to change its position or the control points to change its size 3 13 7 Copying an Item Press the button on the toolbar or choose Copy from the pop up menu The mouse cursor turns into a symbol In this state click on the item you wish to copy Press the button on the toolbar or choose Paste from the pop up menu to create a new item with the same size and attributes R20UT0445EJ0100 Rev 1 00 Page 94 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 13 8 Deleting an Item Press the button on the toolbar or choose Delete from the pop up menu The mouse cursor turns into a symbol In this state click on the item you wish to delete 3 13 9 Showing the Grid Press the button on the toolbar or choose Display Grid from the pop up menu This displays the grid on the background GUI 1 0 new panel Figure 3 76 GUI I O Window Show Grid Clicking the 7 button again hides the grid 3 13 10 Saving I O Panel Information It is possible to reuse created I O panels by saving the information in files Press the button on the toolbar or choose Save from the pop up menu to open the Save GUI I O Panel File dialog box Specify the directory where the file is to be stored and enter the
33. items are displayed Functions List of functions Statistic Percentage of the instruction executed within the function Status Enable or Disable status of the respective function Note The functions can be sorted by their names or percentage either in ascending or descending order by clicking the column tab Functions or Statistic R20UT0445EJ0100 Rev 1 00 Page 72 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging When the Coverage window is closed the acquired coverage information and the conditions to acquire information will be cleared 3 10 2 Acquiring All Coverage Information Choose Enable All from the pop up menu and execute the user program to acquire all coverage information By default Enable All is selected 3 10 3 Clearing All Coverage Information Choosing Clear All from the popup menu clears all the coverage information that has been acquired 3 10 4 Viewing the Source Window Choose View Source from the pop up menu to open the Editor window and to display the Editor window corresponding to the cursor location in the Coverage window 3 10 5 Specifying the New Coverage Range Choose Add Range from the pop up menu to open the Open Coverage dialog box figure 3 46 For the Open Coverage dialog box refer to section 3 10 1 Opening the Coverage Window 3 10 6 Changing the Coverage Range e Specifying the coverage range with an address Choos
34. performance analysis function displays the number of execution cycles and function calls for the specified function in the user program Since performance data for only the specified function is acquired faster simulation is possible For details refer to section 3 9 Analyzing Performance 2 15 Pseudo Interrupts The simulator debugger can generate pseudo interrupts during simulation in the following two ways 1 Pseudo interrupts generated by satisfaction of break conditions A pseudo interrupt can be generated using a break command to specify Interrupt as the action when a break condition is satisfied For details refer to section 3 6 Using the Simulator Debugger Breakpoints 2 Pseudo interrupts generated from windows A pseudo interrupt can be generated by clicking a button in the Trigger or GUI I O window For details refer to section 3 11 Generating a Pseudo Interrupt Manually If another pseudo interrupt occurs between a pseudo interrupt occurrence and its acceptance only the interrupt that has a higher priority can be accepted 3 Break by pseudo interrupts The user can select whether or not to cause a break when a pseudo interrupt occurs This can be set in the Simulator System dialog box or by the EXEC_STOP_SET command Notes 1 For a pseudo interrupt the vector number and priority level of the interrupt are specified The priority level of an interrupt can be specified as a value from 0 to 8 or from 0 to H 10 The fast
35. 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 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 This menu cannot be used in this simulator debugger R20UT0445EJ0100 Rev 1 00 Page 65 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 8 8 Profile Chart Windo
36. r id E E EE EE eee 18 2 14 Performance Measurement icccsriiiresenori sgorio E EE EROT E EOE AEN 19 2 14 1 Profilet ecne EE E AAA al eee ages eee E A 19 2 14 2 Performance ANAlYSIS ateei ana R E E RAE E RE A RN EE O A EA 19 2 15 Pseudo Interrupts es c E E E E E E E Hee 19 216 COVETARC oema e e E E E AE E EEE E E E E E EE E ES 20 POD a DebuUTZIN Seena e a e eE e EE 21 3 1 Creating the Workspace for Simulator Debugger eee cece cece csecssecaeecaeeceeeeeeeeeeeeeeeseeseeaecsaeesaecnaecuecaeeeaeeeaes 22 3 1 1 Selecting a Debugging Platrorine c ccccs cick ciececscoctesssebavbesecicenscessonsesreneventsedsvoecs E E REEE E 22 3 1 2 Setting up a Workspace for the Simulator Debugger seessssesessresesreeresrertsrrrrreresreernsrrrrsrrerrerenrrernsreresreeees 22 3 2 Starting up the Simulator DebUggef irssseisiorseroeircorseeserieneee riene ren rivena SEEE TEENE oea peene E irea 24 3 3 Modifying the Simulator Debugger Settings 20 0 eee eecceecesecesecesecesecseecaeesaeseaeeeeeeeeeeeeeeeesecaecaecsaecsaecaaeeaeeeaes 24 3 3 1 Setting the Endian and Frequency of CPU seeseesenerereeeeserererereenersrererserererereretusesserereeusrerersreeeeserererersenees 24 3 3 2 Modifying the Simulator Systir soseo teisese eirio iie iearnriiot docenia iea A Ee ii EE DE EERE SE 25 3 3 3 Modifying the Memory Map and Memory Resource Settings ssessereeseersseerrsreereseeerestrrrererreeresreeresreereee 28 3 3 4 Set Memory Map Dialog BOX cx cosceesscsthu
37. register Table 2 1 Control Registers of the CMT Supported by the Simulator Debugger Peripheral Module Unit Supported Control Register Support CMT Unit 0 CMSTRO CMCRO CMCNTO CMCORO CMCR1 CMCNT1 CMCOR1 Unit 1 CMSTR1 CMCR2 CMCNT2 CMCOR2 CMCR3 CMCNT3 CMCORS3 O O O OJ CO O OF O CO CO O OF OF O Note O Supported The addresses of the control registers can be referred to or modified in the Peripheral Module Configuration dialog box Refer to section 3 4 Simulating Peripheral Functions for details on this dialog box R20UT0445EJ0100 Rev 1 00 Dec 24 2010 tENESAS Page 7 of 136 RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 8 2 Serial Communications Interface 1 Supported Range The RX600 series simulator debugger supports a total of seven serial communications interface SCI channels that correspond to the RX610 group Table 2 2 lists the supported SCI functions Table 2 2 SCI Functions Supported by the Simulator Debugger Item Support Serial communications Asynchronous or clock synchronous O mode Smart card interface Clock sources for the on PCLK clock O chip baud rate generator BCL K 4 PCLK 16 and PCLK 64 2 Full duplex communications O Interrupt sources Transmit end transmit data empty receive data full and
38. the pop up menu in the Profile window Profile FFFF9071 H 000000D1 H 00000000 B printf FFFF9349 H 00000021 H 00000000 _rand FFFF936A H O000000i H 00000000 _ change FFFF923F H OOOO0OO06 A H 00000000 _sort FFFF9142 H OOO000FD 00000000 __CLOSEALL FFFFODF H OO000004F H O00000000 El INIT_IOLIB FFFF8CD8 H 0000011F H 00000000 El _freopen FFFF92A9 H O000002E H 00000000 E _felose FFFF92D7 H 00000053 H 00000000 H fflush FFFF949F H O000007E H 00000000 _Fofree FFFF965B H 00000051 H 00000000 _close FFFFSEE1 H 00000009 H 00000000 H Foprep FFFF9S1D H 000000E8 H 00000000 e N on o OOwWowwrtHtHEe Ofmmooocoooooo Ofmoooc0ocoaeo0oco0o0a a Figure 3 40 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 the 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 as follows 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 of profile data When profile data acquisition is enabled a check mark is shown to the left of the menu text e Not t
39. the step mode STEP_OUT SP Steps out of the current function STEP_OVER SO Steps program not stepping into functions STEP_RATE SR Sets or displays rate of stepping 5 1 2 Download Command Name Abbr Function BUILD BU Performs a build on the current project BUILD_ALL BL Performs a build all on the current project BUILD_FILE BF Compiles files BUILD_MULTIPLE BM Builds multiple projects CLEAN CL Deletes intermediate and output files produced in building DEFAULT_OBJECT_FORMAT DO Sets the default object program format FILE_LOAD FL Loads an object program file FILE_LOAD_ALL LA Loads all object program files FILE_SAVE FS Saves memory to a file FILE_UNLOAD FU Unloads an object program file from memory FILE_UNLOAD_ALL UA Unloads all object program files from memory FILE_VERIFY FV Verifies file contents against memory GENERATE_MAKE_FILE GM Generates a build makefile for the current workspace R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 99 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines 5 1 3 Register Command Name Abbreviation Function REGISTER_DISPLAY RD Displays CPU register values REGISTER_SET RS Changes CPU register contents 5 1 4 Memory Command Name Abbreviation Function CACHE Sets caching on or off MEMORY_COMPARE MC Compares memory contents MEMORY_DISPLAY MD Di
40. to 8 or 0 to H 10 when the prefix is omitted values input are taken as hexadecimal and the display is in hexadecimal notation The fast interrupt is specified by the value 8 when the range is from 0 to 8 and H 10 when the range is from 0 to H 10 If 0 is specified the interrupt will not occur even if the button is clicked R20UT0445EJ0100 Rev 1 00 Page 82 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 12 Standard I O and File I O Processing Use the DebugConsole window to enable the simulation for standard I O and file I O from the user program 3 12 1 Opening the DebugConsole Window Choose View gt CPU gt Debug Console or click the Debug Console toolbar button to open the DebugConsole window fa DebugConsole NTETE Figure 3 62 DebugConsole Window The standard output from the user program is displayed in this window The key input from this window is handled as the standard input to the user program R20UT0445EJ0100 Rev 1 00 Page 83 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 12 2 Popup Menu Options Right clicking in the DebugConsole window opens a popup menu containing the options listed below Most of these options are also available as toolbar buttons Table 3 1 Popup Menu Options Menu Option Description Copy Copies a selected range of data from the DebugConsole window Paste Pastes data in
41. values in memory as a break condition BREAK_DISPLAY BI Displays a list of breakpoints BREAK_ENABLE BE Enables or disables a breakpoint BREAK_REGISTER BR Specifies a register data as a break condition BREAK_SEQUENCE BS Sets sequential breakpoints SET_DISASSEMBLY_SOFT_ SDB Sets or deletes a software breakpoint at the disassembly level BREAK SET_SOURCE_SOFT_BREAK SSB Sets or cancels a software breakpoint at the source level STATE_DISASSEMBLY_ TDB Enables or disables a software breakpoint at the disassembly level SOFT_BREAK STATE_SOURCE_SOFT_ TSB Enables or disables a software breakpoint at the source level BREAK 5 1 7 Trace Command Name Abbr Function TRACE TR Displays trace information TRACE_CONDITION_SET TCS Sets trace information acquisition TRACE_SAVE TV Outputs trace information into a file 5 1 8 Coverage Command Name Abbr Function COVERAGE CV Enables or disables coverage measurement COVERAGE_DISPLAY CVD Displays coverage information COVERAGE_LOAD CVL Loads coverage information COVERAGE_RANGE CVR Sets a coverage range COVERAGE_SAVE CVS Saves coverage information R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 101 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines 5 1 9 Performance Command Name Abbr Function ANALYSIS AN Enables or disables performance analysis ANALYSIS_RANGE AR Sets or disp
42. 04 5 1 19 File Input and Output through Virtual Ports sesssesseeeeseereeresesreerrsrrnsssrerresentenrestentesrerrnenteerestretesreerrsrntes 105 5 2 Commands Alphabetical Order eeeceeeeesseceeceecssecesceecsaeceeneecaeceneecsaeceeneecsaeceseeecsaeceeneecaaeceaeeessaeceeneeenaeeesees 106 Section G Messages enoe vacnabacgsduadedvaanatien dasieendsaduaudedeswa ded voshedaadeagsond R E EREA 111 6 1 Information Messages xis pic cste ne n E ei adage E Gah ee eas GA eR eS 111 6 2 Error Messa BES ssc sccrseis eraen aeee e a E i EOE EE ove theses ge E EE EREE EEEIEE OS OERE RETES 112 Secuon 7 TUON ale ae a a E E E E E 115 7 1 Preparation seinen e E E hs ed Eee As ees SE ee ae ee Ree 115 7 1 1 Sample Pro Sram wcss cssescsecylci ses sedepectodevsassasnventsarsvacesaniepasvonavensonvvoensodevtessesdueobsadursasecavtaubesfovageessiupacecuavenleasiy 115 7 1 2 Creating the Sample Progra ts cciscashec cbessisccnenciens oddeoanstenesvasedeevsasvdesvund vecdouesteegoueshiedieastdossanseduasansbepcapabadncs 115 72 Settings for De DUS SING con 5 ics s a csdn ca ssssichea oder ioei a E E E EE EEE EEEE EEEE TESE EEE E EEEE E EEEE TEE ears 115 7 2 1 Allocating the Memory ReSOULCE csiscseeesssnssenebesseeressnsssssbeaseupesdaussoudenysapecnssesenseepsssnsuesesensencenpsspaceanes 115 7 2 2 Downloading the Sample Program eee eeeeseesse cece cececeeeeeeeeeeeseeeaeeeeeeeeeseeeeseaeeaeesaecsaessaesaeesaeeseeseeseas 116 1 2 3 Displaying the Source Program
43. 0445EJ0100 Rev 1 00 Page 26 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Stoppage Setting E zjx Break cause i INT instruction BRK instruction Hw SS Figure 3 6 Stoppage Setting Dialog Box Section 3 Debugging In this dialog box whether or not operation stops when an exception occurs is specified for individual exception events Simulation will stop when an event for which the checkbox has been selected occurs The following exception events ar e specifiable e Undefined instruction exception e Privileged instruction exception e Floating point exceptions on e Interrupts e INT instruction e BRK instruction ly for RX600 series R20UT0445EJ0100 Rev 1 00 Dec 24 2010 RENESAS Page 27 of 136 RX Family Simulator Debugger V 1 02 Section3 Debugging 3 3 3 Modifying the Memory Map and Memory Resource Settings The Memory tab in the Simulator System dialog box is used to set and modify the memory map and memory resource Simulator System System Memory Memory Map Ta da K al Memory Resource Ga zal Begin End Type Size Read write Begin End Attribute 00000000 OODIFFFF z 00000000 00007FFF Read wr 00080000 OOOFFFFF FFFF8000 FFFFFFFF_ Read wr 00100000 OO107FFF OO7F8000 007F9FFF OO7FCO00 007FC4FF OO7FFCOO 0O7FFFFF O0EO0000 OOFFFFFF FEFFEOOO FEFFFFFF FF7FCOOO FF7FFFFF FFEOOO00 FFFFFFFF _ i Cancel Apply Figure 3
44. 1 Features e Since the simulator debugger runs on a host computer software debugging can start without using an actual user system thus reducing overall system development time e The simulator debugger performs a simulation to calculate the number of instruction execution cycles for a program and time taken by instruction execution thus enabling performance evaluation without using an actual user system e The simulator debugger provides pseudo interrupt and I O simulation functions for simple system level simulation e The simulator debugger offers the following functions that enable efficient program testing and debugging The ability to handle all of the RX family CPUs Functions to stop or continue execution when an error occurs during user program execution Profile data acquisition and function unit performance measurement A comprehensive set of break functions Functions to set or edit memory maps Functions to display function call history Coverage information is displayed in the C C or assembly source level Visual debugging functions provided through the display of images or waveforms e The breakpoints memory map performance and trace can be set through the dialog boxes under Windows Environments corresponding to each memory map of the RX family microcomputers can be set through the dialog box Intuitive user interface Online help Common display and operability R20UT0445EJ0100 Rev 1 00 Page 3 of 136 D
45. 2 4 0 sB BEE D7 d D5 D4 D3 D2 D1 Do Table 2 7 Bits in RxD and TxD Bit Bit Name Initial R W Description Value 0 DO 0 R W Data Bits 1 D1 0 R W D7 to DO are used for reception or transmission of 8 bit data 2 D2 0 R W D6 to DO are used for reception or transmission of 7 bit data 3 D3 0 R W 4 D4 0 R W 5 D5 0 R W 6 D6 0 R W 7 D7 0 R W 12to8 All O Reserved These bits are always read as 0 The write value should always be 0 13 FE 0 R W Framing Error Bit The SCI detects a framing error if this bit included in a frame is 1 14 PE 0 R W Parity Error Bit The SCI detects a parity error if this bit included in a frame is 1 15 SB 1 R W Start Bit The value of this bit changes from 1 to 0 when transmission starts and from 0 to 1 when transmission ends Reception and transmission of data that are visible in the simulator debugger are abstract all data are transmitted and received at the same time Figures 2 1 and 2 2 respectively show the reception and transmission of data in the simulator debugger R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 10 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions RxD SB virtual port RxD Dn virtual port Received data RSR register When RxD SB is set to 0 When RxD SB is set to 1 the SCI transfers received the SCI
46. 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines Table 5 1 Simulator Debugger Commands cont No Command Name Abbr Function 138 TRACE_STATISTIC TST Analyzes statistic information 139 TRAP_ADDRESS TP Sets a simulated I O address 140 TRAP_ADDRESS_DISPLAY TD Displays simulated I O address settings 141 TRAP_ADDRESS_ENABLE TE Enables or disables the simulated I O 142 UPDATE_ALL_DEPENDENCIES UD Updates all build dependencies of the current project 143 WATCH_ADD WA Adds an item for watching 144 WATCH_AUTO_UPDATE WU Selects or cancels automatic updating of watched items 145 WATCH_DELETE WD Deletes a watched item 146 WATCH_DISPLAY WI Displays the contents of the Watch window 147 WATCH_EDIT WE Edits the value of a watched item 148 WATCH_EXPAND WX Expands or collapses a watched item 149 WATCH_RADIX WR Changes the radix for display of watched items 150 WATCH_RECORD WO Outputs the history of updating of the values of a watched item to a file 151 WATCH_SAVE WS Saves the contents of the Watch window to a file R20UT0445EJ0100 Rev 1 00 Page 110 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section6 Messages Section 6 Messages 6 1 Information Messages The simulator debugger outputs information messages as listed in table 6 1 to notify users of execution status Table 6 1 Information Messages Message Contents Break Access Access Addr
47. 68 FFFF9350 00 00 00 860 OPUI 7H R4 R4 lt 00001477 0035967 FFFF9352 00 00 00 i 870 OPUI O8H RO R3 R3 lt FFFF841 0035966 FFFF9354 00 00 00 f 880 OPUI 04H R4 R4 lt 00001474 0035965 FFFF9357 00 00 00 A 890 OPUI 000015A8H R R2 lt 000015a8 Figure 3 36 Trace Window The lower pane of the window shows the trace result beginning with the cycle in which the function selected in the upper pane was called Note The history of function execution is not displayable in the event trigger mode or the point trace mode 3 8 Viewing the Profile Information The profile 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 HEW displays the results of measurement in three windows according to the method and purpose of viewing the profile data 3 8 1 Stack Information Files The profile function allows the HEW to read the stack information files extension SNI which are output by the optimizing linkage editor 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 HEW to display information related to the calling of functions without executing the user application i e before meas
48. 7 printf a d ld n i a i FFFF9139 change aj Figure 3 55 Coverage Column Source R20UT0445EJ0100 Rev 1 00 Page 77 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 10 16 Displaying the Coverage Information in the Disassembly Window The coverage information is reflected to the Disassembly window by highlighting the Coverage ASM columns corresponding to the disassembly lines of executed instructions When the coverage settings are modified in the Coverage window the Coverage ASM column display will be updated amp Tutorial c Disassembly S Disassembly Address Disassembly FFFF9132 EDOEOB 2CH RO R14 FFFF9135 614E 04H R14 FFFF9137 29D0 OFFFF9107H FFFF9139 EFO1 F RO R1 FFFF913B 390401 _change FFFF913E 710030 30H RO RO FFFF9141 02 FFFF9142 7100E8 18H R0 RO FFFF9145 4109 Ri 14H R0 CARESILI 665E 5H R14 PEPE so E70E04 R14 10H R0 FEPESIA EDOEO4 10H RO R14 FEEPEST 610E 0H R14 FFFF9151 2405 OFFFF9156H FFFF9153 38E800 OFFFF923BH FFFF9156 660E 0H R14 FFFF9158 E7OEO3 R14 OCH R0 FFFF915B EDOEO4 10H RO R14 FFFF91SE 488D OCH R0 R5 FFFF9160 47E5 R14 R5 FFFF9162 2905 OFFFF9167H FFFF9164 38BE00 OFFFF9222H FFFF9167 EDOEO4 10H R0 R14 Figure 3 56 Coverage Column Disassembly R20UT0445EJ0100 Rev 1 00 Page 78 of 136 Dec 24 2010 RENESAS RX Family Simulator Debug
49. 8 or H 10 The fast interrupt is specified by the value 8 when the range is from 0 to 8 and H 10 when the range is from 0 to H 10 If 0 is specified the interrupt will not occur even if the condition is satisfied Point for Caution When the same file is specified for multiple File Input actions the simulator debugger will read data from the file in the order of condition satisfaction When the same file is specified for multiple File Output actions the simulator debugger will write data to the file in the order of condition satisfaction However when the same file is specified for File Input and File Output the only valid action is that for the first condition to be satisfied 3 6 3 Modifying Breakpoints Select a breakpoint to be modified and choose Edit from the pop up menu to open the Select Break Type dialog box which allows the user to modify the break conditions The Edit menu is only available when one breakpoint is selected 3 6 4 Enabling a Breakpoint Select a breakpoint and choose Enable from the pop up menu to enable the selected breakpoint 3 6 5 Disabling a Breakpoint Select a breakpoint and choose Disable from the pop up menu to disable the selected breakpoint When a breakpoint is disabled the breakpoint will remain in the list but a break will not occur when the specified conditions have been satisfied 3 6 6 Deleting a Breakpoint Select a breakpoint and choose Delete from the pop u
50. 910D void sort long a long t int i j K gap Figure 7 11 Source Window Break Status The termination cause can be displayed in the Status window e Select Status from the View gt CPU menu to open the Status window and select the Platform sheet in the Status window R20UT0445EJ0100 Rev 1 00 Page 123 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Status Status RX600 Simulator Rx600 stop Ready Break Cause PC Breakpoint PC H FFFFSOB3 Execute From Reset Exec Instructions 35898 Cycles 58246 Run Time Count 00 00 00 000 582 460 CPU Frequency 100 MHz ALDI Memory A Platform Figure 7 12 Status Window The above status window indicates that 1 The cause of break is a PC breakpoint 2 Execution is performed from the reset 3 The number of instructions executed from a GO command following a reset is 35 898 4 The number of cycles of execution following a reset is 58 246 5 The execution time following a reset is 582 46 ms 6 The operating frequency of the CPU is 100 MHz R20UT0445EJ0100 Rev 1 00 Page 124 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Register values can be checked in the Register window e Select Registers from the View gt CPU menu Register o0001a5 ooo00004 o000010D8 oo0000000 00001001 oo0000000 oo000000 ooo00000 ooo00000 00000000 oo0000000
51. AS PUSH L RS 00 00 00 000 0035969 FFFF934D 710408 ADD 08H RO R4 00 00 00 000 0035968 FFFF9350 6274 ADD 7H R4 00 00 00 000 0035967 FFFF9352 A883 MOV L O8H RO R3 00 00 00 000 0035966 FFFF9354 7524FC AND O4H R4 00 00 00 000 0035965 FFFF9357 FB22A8150000 MOV L 000015A8H R2 00 00 00 000 0035964 FFFF935D FBIZZA93FFFF MOV L O0006CD6H R1 00 00 00 000 0035963 FFFF9363 05490300 BSR A __Printf 00 00 00 000 0035962 Pri FFFFO6AC 6E69 PUSHM R6 R9 00 00 00 000 0035961 FFFF96AE 72005CFF ADD O0A4H RO RO 00 00 00 000 0035960 FFFF9652 E70226 MOV L R2 98H R0 00 00 00 000 Figure 3 31 Trace Window Disassembly Display Mode 3 Source Display Mode From the pop up menu choose Display Mode gt SRC This display mode allows you to inspect the source program s execution path The execution path can be verified by stepping through the source within trace data forward or backward from the current trace cycle Trace Vio F AaZan tz Pia dP CESE Range 0036672 0000000 File Tutorial c Cycle 0035976 Address FFFF9071 Time 00 00 00 000 021 760 Address 000022 FFFF9071 000023 000024 long a 10 000025 long j 000026 int i 000027 000028 FFEFFF9074 printf Data Input n 000029 000030 FFFF9084 fori i 0 i lt 10 i 000031 FFFFSOS0 j rand 000032 FFFF9099 if j lt 0 000033 FFFF9040 j j 000034 000035 FFFF9048 ali j 000036 FFFFSOBZ printf a
52. Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 8 2 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 SNI e The Load Stack Information Files SNI files check box is checked in the Confirmation tab of the Options dialog box figure 3 38 that can be opened by choosing Setup gt Options from the main menu Build Editor Debug Workspace Confirmation Network Display confirmation dialogs for External editor change warning Go when no programs downloaded Initialize Target Clear All Invalid macro initial directory Keyboard shortcut overwrite Load Program Load Stack Information Files SNI files Loading Labels Lose session changes on refresh Macro recording with non supported target Nested symbols expansion Reload out of date download modules Save Coverage at Session Saving Save Coverage data again after save Save file changes before mode switch Save memory M Saving Labels Show component dialog on workspace open Switch from disassembly to new source Unload Program Warn on clean build Warning when workspace and or project is read only K K K K lt
53. Dialog Box This dialog box specifies a function including a label to be evaluated Up to 255 functions can be specified in total Clicking the OK button stores the setting Clicking the Cancel button closes this dialog box without setting the function to be evaluated Select a function that has been set and choose Edit Range from the pop up menu or press the Enter key to open the Performance Option dialog box and to change the function to be evaluated 3 9 3 Starting Performance Data Acquisition Choose Enable Analysis from the pop up menu a check mark is shown to the left of Enable analysis to start acquiring performance analysis data 3 9 4 Resetting Data Choose Reset Counts Times from the pop up menu to clear the current performance analysis data 3 9 5 Deleting a Target Function Select a function and choose Delete Range from the pop up menu to delete the selected target function and to recalculate the data within other ranges The selected function can also be deleted by the Delete key 3 9 6 Deleting All Target Functions Choose Delete All Ranges from the pop up menu to delete all the current target functions to be evaluated and to clear the performance analysis data 3 9 7 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 R20UT0445EJ0100 Rev 1 00 Page 70 of 136 Dec 24 2010 RENESAS RX F
54. FF9074 00 00 00 000 021 770 OPUI C MOV L 00007BE4H R5 R5 lt FFFF841C 0035974 FFFF907A 00 00 00 000 021 780 OPUI c SUB 4H RO usP lt 00001A70 0035973 FFFF9O7 C 00 00 00 x OPUI MOV L R5 R0 00001470 lt FFFF841 0035972 FFFF907E 00 00 00 r 5 OPUI C BSR A _printf OO001A6C lt FFFF9O08 0035971 printf FFFF9349 00 00 00 F OPUI C MOV L 0H R5 R5 lt 00000000 0035970 FFFF934B 00 00 00 a OPUI C PUSH L R5 00001468 lt 000000C 0035969 FFFF934D 00 00 00 F P OPUI ADD 08H RO R4 R4 lt 00001a470 0035968 FFFF9350 00 00 00 OPUI ADD 7H R4 R4 lt 00001A77 0035967 FFFF9352 00 00 00 000 021 opur g OSH RO R3 R3 lt FFFF841 0035966 FFFF9354 00 00 00 a OPUI O4H R4 R4 lt 00001A74 0035965 FFFF9357 00 00 00 OPUI O00015A8H R2 R2 lt 00001548 0035964 FFFF935D 00 00 00 OPUI OO006CD6H R1 R1 lt FFFF932A 0035963 FFFF9363 00 00 00 a OPUI __Printf O0001A64 lt FFFF93E 0035962 Printf FFFF96AC 00 00 00 OPUI R6 R9 00001460 lt 000000C 0035961 FFFFO6AE 00 00 Fi OPUI c 00A4H RO RO usP lt 00001950 ee SS Figure 3 29 Trace Window in All Acquire Mode Bus Display Mode This window displays the following trace information items PTR Pointer in the trace buffer 0 for the last executed instruction Label Label corresponding to the address only displayed when a label is set Address Instruction address Time S
55. Load Data dialog box which allows the user to load the coverage information from a file Load Data 24x fle gt Browse Cancel Figure 3 52 Load Data Dialog Box This dialog box specifies the location and name of a coverage information file to be loaded The placeholder or the Browse button can be used Only COV files can be loaded If a file name extension other than COV is specified an error message will be displayed 3 10 12 Updating the Information Choose Refresh from the pop up menu to update the Coverage window to the latest information 3 10 13 Confirmation Request Dialog Box A confirmation request dialog box will appear when Clear All Clear Data Edit Range or Delete Range is clicked or an attempt is made to close the Coverage window Confirmation Request x Coverage data will be cleared IV Save Coverage data Figure 3 53 Confirmation Request Dialog Box Clicking OK clears the coverage data Choosing Save Coverage data opens the Save Data dialog box figure 3 46 to save the coverage data in a file before it is cleared R20UT0445EJ0100 Rev 1 00 Page 75 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 10 14 Save Coverage Data Dialog Box When File gt Save Session menu option is clicked the Save Coverage Data dialog box will appear which allows the user to save the Coverage window data in separate files or a si
56. Page 133 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial 7 3 8 Checking Profile Information The profile information can be checked in the Profile window e Clicking the Go button and continuing execution from the current PC executes the BRK instruction and then stops List Sheet Displays the profile information as a list e Open the Profile window by selecting Profile from the View gt Performance menu The List sheet will be displayed Profile Ry FFFF9399 H OOOOOOcF FFFF934F H 00000000 FFFF9333 H OOOOOO1 c FFFF9312 H OOO00021 FFFF92F5 H 00000000 FFFF92A2 H OOO000053 FFFF9274 H OOOOO0ZE FFFF92Z0A H OOOO006A FFFF910D H OOOOOOFD FFFF9042 H OOOOOOcEB FFFF8EEZ H OOOOO08B FFFFSED9 H 00000009 FFFFSE44 H 00000095 FFFF8DF7 H OOOO004D FFFF8cD8 H OOOOO11F FFFF8c98 H O0000000 _fwrite __INITSCT _rand _printf FFFF92F5 _telose _freopen _ change _sort _main _write _close _open __ CLOSEALL __INIT_IOLIB oooo0o0c0cc0c 0c 0 00 0 0 0 00 oooo0cc0c 0c 0c 0c 0 00 0 0000 F F F F E F F F F F F E F F F NR rP WW NPP ww Figure 7 27 Profile Window List Sheet In the above figure it can be found that the __fclose function was called three times the execution cycle was 120 and the internal memory was accessed 39 times It is possible to search for the critical path such as a function that is called or accesses the memory many times for the pro
57. R20UT0445EJ0100 Rev 1 00 Page 38 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 9 Format for Virtual Port Files Virtual port files are in the CSV format The input file format is as follows lt Time gt lt Data gt Data values in input files must be accompanied by descriptions of the times they are input Each time is the difference in picoseconds integer value must be or larger from the time for the previous value The values are hexadecimal integers The output file format is as follows Module lt Module name gt Port lt Port name gt Length lt Number of bits in data gt Data lt Time gt lt Data gt The name of the module that outputs the data port name number of bits in the values times and the values themselves are output in an output file The time indicates the duration from the start of simulation to the output of the value in picoseconds as an integer R20UT0445EJ0100 Rev 1 00 Page 39 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 5 Operations for Memory 3 5 1 Regularly Updating Contents of the Memory Window Selecting Auto Refresh from the pop up menu of the Memory window leads to regular updating of the contents displayed in the Memory window during execution of the user program The default value and specifiable range for the update interval are given below Default value
58. R3 lt FFFF8434 0035197 FFFF931D 00 00 000 OPUI AND 04H R4 R4 lt 00001a5 0035196 FFFF9320 00 00 a OPUI MOV L 00001590H R2 R2 lt 00001590 0035195 FFFF9326 00 00 OPUI MOV L 00006D0BH R1 R1 lt FFFF92F5 0035194 FFFF932C 00 00 OPUI BSR A __Printf 00001A4 lt FFFF9330 0035193 Printf FFFF9675 00 00 j OPUI PUSHM R6 R10 00001448 lt 00000000 0035192 FFFFO677 00 00 OPUI c ADD 0044H RO RO usP lt 00001994 xl Figure 7 14 Trace Window Trace Information Display R20UT0445EJ0100 Rev 1 00 Page 126 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial 7 3 3 Performing Trace Search Click the right mouse button on the Trace window to launch the pop up menu and select Find gt Find to open the Find dialog box Find 21x Combination Find Item PTR Find Previous Address fr Time Stamp Instruction Interrupt I Exclusion of the specified condition Find Setting Contents New Delete Delete All Figure 7 15 Trace Search Dialog Box Check the check boxes for the conditions to be targets of the search in the Combination column and specify the details of the conditions in the Find Item column The conditions you have set are shown in the Find Setting Contents list box After setting search conditions click the Find Previous or Find Next button to start a search Whe
59. SAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 4 Memory Management Memory Map Specification A memory map is used to calculate the number of memory access cycles during simulation The following items can be specified e Memory type e Start and end addresses of the memory area e Number of memory access cycles e Memory data bus width e Endian On the memory map the endian is only specifiable for the external area For the internal ROM area and internal RAM area the Endian specified on the CPU Configuration tabbed page of the Set Simulator dialog box displayed when the simulator debugger is started up applies For details refer to section 3 3 3 Modifying the Memory Map and Memory Resource Settings Memory Resource Specification A memory resource must be specified to load and execute a user program The following items can be specified e Start address e End address e Access type The access type is readable writable read only or write only Since an error occurs if the user program attempts an illegal access for example trying to write to read only memory such an illegal access in the user program can be easily detected For details on memory resource setting refer to section 3 3 3 Modifying the Memory Map and Memory Resource Settings 2 5 Instruction Execution Reset Processing Counting by the simulator debugger of executed instructions cycles for instruction execution
60. amily Simulator Debugger V 1 02 Section 3 Debugging 3 10 Measuring Code Coverage The Coverage window acquires code coverage information CO coverage and C1 coverage in the range specified by the user and displays the information 3 10 1 Opening the Coverage Window Choose View gt Code gt Coverage or click the Coverage toolbar button amp to open the Open Coverage dialog box Open Coverage m Options New Window Start address H 000800 a End address H 000963 x a C Fie P Browser Open a recent coverage file i Browse to another coverage file Figure 3 46 Open Coverage Dialog Box This dialog box specifies the coverage measuring range To set coverage for a new range the following two ways are available e Specifying the start and end addresses on the new window Start Address Start address of coverage information display When a prefix is omitted values input are taken as hexadecimal End Address End address of coverage information display When a prefix is omitted values input are taken as hexadecimal e Specifying the file on the new window File Source file whose extension is C or CPP in the current project Functions in the specified file can be set as the coverage range If the extension of the file is omitted C is complemented The file that has other extensions than C or CPP cannot be specified A placeholder or the Browse button is available
61. and time taken by instruction execution is reset in the following cases e The program counter PC is modified after the instruction simulation stops and before it restarts e The Run command to which the execution start address has been specified is executed e Initialization is performed or the program is loaded R20UT0445EJ0100 Rev 1 00 Page 5 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 6 Exception Processing The simulator debugger detects the generation of exceptions in the RX family and simulates exception processing Accordingly simulation can be performed even when an exception occurs The simulator debugger simulates exception processing with the following procedures 1 Detects an exception during instruction execution 2 The PC and PSW are saved in the dedicated registers for the fast interrupt or the stack area for exceptions other than the fast interrupt If an error occurs when saving the simulator debugger stops exception processing shows that the exception processing error has occurred and returns to the command input wait state 3 Bits of the PSW are set as follows U 0 1 0 PM 0 4 Reads the start address from the vector address corresponding to the vector number If an error occurs when reading the simulator debugger stops exception processing shows that the exception processing error has occurred and returns to the command input wait stat
62. andard input 4 H 24 PUTS Outputs one line to the standard output 5 H 25 FOPEN Opens a file 6 H 06 FCLOSE Closes a file 7 H 27 FGETC Inputs one byte from a file 8 H 28 FPUTC Outputs one byte to a file 9 H 29 FGETS Inputs one line from a file 10 H 2A FPUTS Outputs one line to a file 11 H 0B FEOF Checks for end of the file 12 H 0C FSEEK Moves the file pointer 13 H 0D FTELL Returns the current position of the file pointer To perform I O processing use the Simulated I O Address in the Simulator System dialog box refer to section 3 3 2 Modifying the Simulator System in the following procedure 1 Set the address specialized for I O processing in the Simulated I O Address select Enable and execute the program 2 When detecting a subroutine call instruction BSR or JSR that is a simulated I O instruction to the specified address during user program execution the simulator debugger performs I O processing with the value in R1 and R2 as the parameters e Set the function code table 3 1 in the R1 register MSB 1 byte 1 byte LSB i Function H 01 code e Set the parameter block address in the R2 register MSB LSB Parameter block address e Reserve the parameter block and input output buffer areas Each parameter of the parameter block must be accessed in the parameter size After the I O processing the simulator debugger resumes simulation from the instruction that follows the simulated I O instruction Re
63. arrow J Click on an arrow and select Options from the drop down list to bring up the Options dialog box to select the conditions for filtering The available kinds of filtering and filtering conditions are the same as for the kinds of targets and search conditions for trace record searching Note Filtering is not possible in the event trigger mode 3 7 7 Clearing the Trace Information Re executing instruction simulation after trace information has been acquired clears the trace information R20UT0445EJ0100 Rev 1 00 Page 58 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 7 8 Saving the Trace Information in a File The trace information displayed in the Trace window is saved in text format and cannot be saved in binary format Choose File gt Save from the pop up menu to open the Save As dialog box which allows the user to save the contents of the trace buffer as a text file A range can be specified based on Start End Cycle Note that this file cannot be reloaded into the trace buffer 3 7 9 Viewing the Source File An Editor window corresponding to a selected trace record can be displayed in the source display mode by selecting File gt Edit Source from the pop up menu To display another source file in the source display mode of the Trace window use the Display Source dialog box Choose File gt Display Source from the pop up menu to open the Display S
64. at such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office equipment communications equipment tes
65. ce Analysis Window Choose View gt Performance gt Performance Analysis or click the PA toolbar button E to open the Performance Analysis window Performance Analysis Histogram Figure 3 44 Performance Analysis Window This window displays the number of execution cycles required for each specified function The number of execution cycles is calculated as follows Execution cycles total number of execution cycles when execution returns from the function total number of execution cycles when the target function is called The following items are displayed Index Index number of the set condition Function Name of the function to be measured or the start address of the function Cycle Total number of instruction execution cycles Count Total number of calls for the function Histogram Ratio of number of cycles for execution of the function to the number of cycles for execution of the whole program displayed as a percentage and histogram 3 9 2 Specifying a Target Function After the Performance Analysis window is open choose Add Range from the pop up menu or press the Insert key to open the Performance Option dialog box which allows the user to specify a function to be analyzed R20UT0445EJ0100 Rev 1 00 Page 69 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Performance Option 21x Function Name POO Bl Cancel Figure 3 45 Performance Option
66. cic eiir ao i rdre EE EEE ar EE Ere ATEREA EE EEE EEPE SENO AEREE ERE ER ES EEn ERE E a 50 3 7 1 Opening the Trace Wmdow sistone a e i aE E aE AE aE ToS EEEO 50 3 7 2 Specifying Trace Acquisition Conditions ese cseeeseeeeeeseceeeeeseceseceaecaecsaecaaecaeecaeesaecaaeeaeseaeeeeeeeeeas 50 3 7 3 petting Events tor Tracing ssiiseiss iocess ninne a E E E EE E ees eee ei E E 52 3 7 4 ACGuinin gs Trace Informat ON desenes eie eieae aer A EEEE EEE EEEE EEE SEREG EREEREER ERRETA 53 3 7 5 Searching for Trace Information sesisisecseieseisi itaenu eretan sera e ni saoi neo sare E TESTE Si es 57 3 7 6 Filtering Trace Information isc scvsevsasuves coen ies eneen enee a O E E NEE EERE Ea NE EEA EER ERASE 58 3 7 7 Clearing the Trace Information iscs c csvcscasecscscsscneuctavs bansuuncssnevaresstsvsncosesvens EE Eee EEEE EEEE EEEN AEE EEE TESE 58 3 7 8 Saving the Trace Information in a File wo eee eee eecesecsee cece ceeceeeeseeeeeeeeeseeeseeeeeeeeesecaeesaecsaessaeeeeeseeeeaeeeas 59 3 7 9 Viewing the SOurCe Files cscs s csceesienscacseisceosctenoeeabeducpssetobadnsedecssnsdgesauebedeasonstehedensydsseeashcosenibdedbonsdshadayseleser 59 3 7 10 Switching Timestamp Display ciscc scsccsccssiovesssestovetssenvcesseneveesebboneseocbanvevasustensscusd isessoueseneacesadesabvgnensieWeieedaesys 59 3 7 11 Showing the History of Function Execution 0 0 ee eeceseceecseeceeeeeeeeeeeeeeeeeseeeeeeeeeeeseceaeceaecsaecsaesaeeeaeeeseeegs 60 3 8 Viewing the Profile Informati
67. click the Trace toolbar button E 3 7 2 Specifying Trace Acquisition Conditions After the Trace window opens specify the trace acquisition conditions in the Trace Acquisition dialog box To open this dialog box choose Acquisition from the pop up menu R20UT0445EJ0100 Rev 1 00 Page 50 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging Trace Acquisition Trace Function Enable Trace Buffer Full Handling Continue Trace Capacity 65536 records 7 Acquisition Condition All m Trace Event Type Condition Add Delete Delete All Enable All Disable All Cancel Figure 3 28 Trace Acquisition Dialog Box This dialog box specifies the conditions for trace information acquisition Trace Function Disable Disables trace information acquisition Enable Enables trace information acquisition Trace Buffer Full Handling Continue Continues acquiring trace information even if the trace information acquisition buffer becomes full Break Stops execution when the trace information acquisition buffer becomes full race Capacit T Capacity 65536 records The size of the trace buffer is 64 Krecords 131072 records The size of the trace buffer is 128 Krecords 262144 records The size of the trace buffer is 256 Krecords 524288 records The size of the trace buffer is 512 Krecords 1048576 records The size of the trace buffer is 1 Mrecord Acq
68. d while an existing Profile Chart window is already open this option selects whether a new window is opened or the new data is displayed in the existing window When a check mark is shown to the left of this menu item a new window will be opened 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 on optimization with the profile information refer to the user s manual for the optimizing linkage editor e Expands Size Redo the display with larger intervals between functions The key can also be used to do this e Reduces Size oe 99 Redo the display with smaller intervals between functions The key can also be used to this R20UT0445EJ0100 Rev 1 00 Page 66 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 8 9 Types and Purposes of Displayed Data The profile function is able to acquire the following information Address Size Stack Size Times Profile Data You can view 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 Sorting in order of size makes it easy to find small f
69. debugged and debuggers are only able to access those pins through the virtual ports Table 2 4 lists the addresses of virtual ports for the SCI Table 2 4 Addresses of Virtual Ports for the SCI Channel Virtual Port Name Address Access Unit Description 0 RxDO H 00088224 16 Channel 0 receive data TxDO H 00088226 16 Channel 0 transmit data 1 RxD1 H 00088228 16 Channel 1 receive data TxD1 H 0008822A 16 Channel 1 transmit data 2 RxD2 H 0008822C 16 Channel 2 receive data TxD2 H 0008822E 16 Channel 2 transmit data 3 RxD3 H 00088230 16 Channel 3 receive data TxD3 H 00088232 16 Channel 3 transmit data 4 RxD4 H 00088234 16 Channel 4 receive data TxD4 H 00088236 16 Channel 4 transmit data 5 RxD5 H 00088238 16 Channel 5 receive data TxD5 H 0008823A 16 Channel 5 transmit data 6 RxD6 H 0008823C 16 Channel 6 receive data TxD6 H 0008823E 16 Channel 6 transmit data Tables 2 5 and 2 6 show the configurations of virtual ports RxD and TxD respectively Table 2 7 lists the functions of the bits in RxD and TxD R20UT0445EJ0100 Rev 1 00 Page 9 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions Table 2 5 Configuration of RxD Bit Bit 15 14 13 12 1 10 9 8 7 6 5 4 3 2 4 0 B PE FE 07 De Ds D4 ba D2 D1 Do Table 2 6 Configuration of TxD 15 14 13 12 11 10 9 8 7 6 5 4 3
70. debugging programs that include instructions that generate simulation errors 1 First execute the program in the stop mode and confirm that there are no errors except those in the intended locations 2 After confirming the above execute the program in the continuation mode Note If an error occurs in the stop mode and simulation is continued after changing the simulator debugger mode to the continuation mode simulation may not be performed correctly When restarting simulation always restore the register contents and the memory contents to the state prior to the occurrence of the error Break Due to a Trace Buffer Overflow After the Stop mode is specified with Trace Buffer Full Handling in the Trace Acquisition dialog box the simulator debugger stops execution when the trace buffer becomes full The following message is displayed in the Output window when execution is stopped Trace Buffer Full Break Due to Execution of a WAIT Instruction Execution of a WAIT instruction causes execution by the simulator debugger to stop The following message is displayed in the Output window WAIT Instruction Note When restarting execution change the PC value to the instruction address at the restart location R20UT0445EJ0100 Rev 1 00 Page 17 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions Break Due to the Stop Button Users can forcibly terminate execution by clicking th
71. dule Name File Name Enable All CO CMT C Program Files Renesas_E valuation_Rx F O icu C Program Files Renesas_E valuation_Rx F Disable All Detail Peripheral Clock Rate T Don t show this dialog box Figure 3 10 Set Simulator Dialog Box Peripheral Function Simulation Tab The following items are specified in this dialog box Peripheral Functions Shows information on the peripheral function simulation modules Module Name Names of peripheral functions to be simulated File Name Names of files holding peripheral function simulation modules Check the checkbox under Module Name to register the corresponding peripheral function simulation module and make it available Enable All Enables all peripheral function simulation modules Disable All Disables all peripheral function simulation modules Detail Opens the Peripheral Module Configuration dialog box allowing you to view information on the corresponding peripheral function and change the address where it starts and the interrupt source information Peripheral Clock Rate The ratio between the peripheral clock and the system clock the number of cycles of the system clock corresponding to one cycle of the peripheral clock is specified here The clock rate setting can be selected as 1 2 3 4 6 8 12 16 24 or 32 R20UT0445EJ0100 Rev 1 00 Page 32 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debuggi
72. e 5 Starts instruction execution from the start address Specifying Execution Mode in the Simulator System dialog box causes the simulator debugger to stop the simulation of exception processing after step 4 For details refer to section 3 3 2 Modifying the Simulator System 2 7 Endian 2 7 1 Endian of the CPU The endian of the CPU can be specified in the CPU Configuration tabbed page in the Set Simulator dialog box which is displayed at initiation of the simulator debugger The endian of the CPU are applied to the internal ROM and the internal RAM For details refer to section 3 3 1 Setting the Endian and Frequency of CPU 2 7 2 Endian of the External Memory Area The endian of the external memory area can be set in the Set Memory Map dialog box For details refer to section 3 3 4 Set Memory Map Dialog Box R20UT0445EJ0100 Rev 1 00 Page 6 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 2 8 Simulation of Peripheral Functions 2 8 1 Timer 1 Supported Range Section 2 Simulator Debugger Functions The RX600 series and RX200 series simulator debugger supports a total of four compare match timer CMT channels i e two CMT units unit 0 and unit 1 each with two 16 bit timers 2 Control Registers Table 2 1 lists the control registers of the CMT that are supported by the simulator debugger In access to control registers ensure that the unit of access is the same as the size of the
73. e 10 H 2A FPUTS Outputs one line to a file 11 H 0B FEOF Checks for end of the file 12 H 0C FSEEK Moves the file pointer 13 H 0D FTELL Returns the current position of the file pointer For details on I O functions refer to section 3 12 Standard I O and File I O Processing R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Page 15 of 136 ztENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 11 Break Conditions The simulator debugger provides the following conditions for interrupting the simulation of a user program during execution e Break due to the satisfaction of a break command condition e Break due to the detection of an error during execution of the user program e Break due to a trace buffer overflow e Break due to execution of the WAIT instruction e Break due to the STOP button Break Due to Satisfaction of a Break Command Condition There are nine break commands as follows e BREAKPOINT Break based on the address of the instruction executed e BREAK ACCESS Break based on access to a memory range e BREAK CYCLE Break based on the instruction execution cycles e BREAK DATA Break based on the value of data written to memory e BREAK DATA_DIFFERENCE Break based on a difference between values in memory e BREAK DATA_ INVERSE Break based on sign inversion of a value in memory e BREAK DATA_RANGE Break based on the range of values in memory e BREAK REGISTER Break based on the value of da
74. e HALT button during instruction execution The following message is displayed on the status bar when execution is stopped Stop Execution can be resumed with the GO or STEP command 2 12 Floating Point Data Floating point numbers can be used for the following real number data which makes floating point data processing easier The following data can be specified for floating point data e Data when the break type is set to Break Data or Break Register in the Select Break Type dialog box e Data in the Memory window e Data in the Fill Memory dialog box e Data in the Search Memory dialog box e Input data in the Register dialog box The floating point data format conforms to the ANSI C standard In the simulator debugger the round to nearest RN mode is applied as the rounding mode for floating point decimal to binary conversion If a denormalized number is specified for binary to decimal or decimal to binary conversion it is left as a denormalized number in RN mode If an overflow occurs during decimal to binary conversion the infinity is returned in RN mode 2 13 Display of Function Call History The simulator debugger displays the function call history in the Stack Trace window when simulation stops which enables program execution flow to be checked easily Selecting a function name in the Stack Trace window displays the corresponding source program in the Editor window This allows the function that has cal
75. e Configuration dialog box Refer to section 3 4 Simulating Peripheral Functions for details on this dialog box 3 Note on Using the ICU To select whether an interrupt should cause a break in execution use the Simulator System dialog box or EXEC_STOP_SET command R20UT0445EJ0100 Rev 1 00 Page 13 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 8 4 Clocks The simulator debugger supports a system clock that provides timing in access to memory a peripheral function clock and clocks for operating the timers The numbers of cycles of the internal clock required for access to memory correspond to the specifications for the memory map Set the frequency ratio of the system clock to the peripheral function clock in the Set Peripheral Function Simulation dialog box Use the timer control register to specify the division ratio to create the clock for operating the timers 2 8 5 Using Peripheral Functions To use a peripheral function the corresponding module must be registered in the Set Peripheral Function Simulation dialog box which is opened on initiation of the simulator debugger For details on the module registration refer to section 3 4 Simulating Peripheral Functions 2 9 Trace The simulator debugger writes the execution results of each instruction into the trace buffer The conditions for trace information acquisition can be specified in the Trace Acquis
76. e simulated I O Response Specifies the window refresh timing that is how many instructions should be executed between refresh operations D to D 2 147 483 647 The default is D 40000 Execution Mode Specifies whether the simulator debugger stops or continues operation when a simulation error including interrupts occurs Stop Stops simulation It is also possible to specify this as the operation to follow specific exceptions in RX family microcomputers by clicking on the Detail button Continue Continues simulation Cache the results of decoding instructions and accelerate simulation Selects whether or not to save the results of decoding instructions at the time of their execution and reuse the results of decoding when instructions at the same addresses are reused Selecting this box enables the caching facility for decoded instructions making simulation faster Clicking the OK or Apply button stores the modified settings Clicking the Cancel button closes this dialog box without modifying the settings Note The caching facility for decoded instructions reuses results of decoding so is not applicable to programs that contain self modifying code Furthermore errors in the form of an instruction being overwritten due to unexpected behavior of the program may not be correctly detected Clicking on the Detail button when Stop is specified for Execution Mode opens the Stoppage Setting dialog box R20UT
77. e the coverage range and Edit Range from the pop up menu to open the Coverage Range dialog box Coverage Range Fix Start address H 000800 x Bl End address JH 000963 x Cancel C File W Freee Figure 3 49 Coverage Range Dialog Box Specifying Address This dialog box specifies the condition to acquire instruction execution information The following items can be specified Start address Start address When a prefix is omitted values input are taken as hexadecimal End address End address When a prefix is omitted values input are taken as hexadecimal Clicking OK changes the coverage range R20UT0445EJ0100 Rev 1 00 Page 73 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging e Specifying the coverage range with a source file Choose Edit Range from the pop up menu to open the Coverage Range dialog box Coverage Range Sterbeddress a E i p End address gt Cancel File resete gt Browse Figure 3 50 Coverage Range Dialog Box Specifying Source File This dialog box specifies the condition to acquire instruction execution information The following items can be specified File Source file whose extension is C or CPP in the current project Functions in the specified file can be set as the coverage range If the extension of the file is omitted C is complemented The file that has other extensions than C or CPP cannot be specifi
78. e toolbar 8 Figure 7 21 Step In Button a S Source Address SAW Breakpoints Source FFFFSOB3 sort ia FFFF9058 printf Sorting results n FFFF90C8 for i O i lt 10 i FFFF90D4 printf a d sld n i a i FFFF9104 change a FFFF910D woid sort long ta long t int i j K gap FFFF9112 gap 5 FFFF9117 while gap gt O j FFFF9121 for k O k lt gap k FFFF9132 for i kK gap i lt 10 i i gap FFFF9146 for j i gap j gt k j j gap FFFF9159 if a j gt alj gap FFFF9178 t a j FFFF9185 a j aljt gap FFFF9140 a j gap t Figure 7 22 Source Window Step In e The PC location display gt in the Source window moves to the statement at the start of the sort function R20UT0445EJ0100 Rev 1 00 Page 131 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Step Out Steps out of the called function and stops at the next statement in the called program e Select Step Out from the Debug menu to exit the sort function or click the Step Out button on the toolbar P Figure 7 23 Step Out Button amp Tutorial c Source ddress SAW Breakpoints FFFF9042 oid main void long a 10 long j int i FFFF9045 printf Data Input n FFFF9055 for i O i lt 10 i FFFF9061 j randi FFFF9064 if j lt 0 FFFF9071 j J FFFFS079 alij 3
79. ec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 2 Target User Program Load modules in the Elf Dwarf2 format can be symbolically debugged with the simulator debugger Load modules in other formats can be downloaded and their instructions can be executed however they cannot be symbolically debugged For details refer to the High performance Embedded Workshop User s Manual 2 3 Range The simulator debugger provides simulation functions for the RX600 series and RX200 series microcomputers The simulator debugger supports the following RX600 series and RX200 series microcomputer functions e All CPU instructions e Exception processing e Registers e All address space The simulator debugger does not support the following RX600 series and RX200 series MCU functions Programs that use these functions must be debugged with the RX600 series or RX200 series emulator Item Remarks Low power state Simulation is stopped on the execution of a WAIT instruction Non maskable interrupt NMI Reception of an interrupt during execution of any of The interrupt is accepted when execution of the instruction is the following instructions RMPA SCMPU SMOVF completed SMOVB SMOVU SSTR SUNTIL SWHILE Values in memory and registers that become undefined after the execution of instructions Lower order 16 bits of the accumulator ACC R20UT0445EJ0100 Rev 1 00 Page 4 of 136 Dec 24 2010 RENE
80. ecifying a break condition and Set xx Action for specifying an action to take when the break condition is satisfied To open the Select Break Type dialog box from the Event window when you wish to select Stop as Action type in the Select Break Type dialog box select Add from the pop up menu on the Software Break tab if you wish to select another action type select Add from the pop up menu on the Software Event tab Selecting a Break Type Selecting Add from the popup menu on the Event window opens the Select Break Type dialog box Select a break type in the Break type field of this dialog box Select Break Type E 2 x Break type pg PG Breakpo int Detai T Aese eeseseeeeeeeseeeesessseseseeeet Detail Cancel Action type File Input x Detail Figure 3 17 Select Break Type Dialog Box The following options are available Break type PC Breakpoint Breakpoint set at an instruction Break Access Break on access to a memory range Break Data Break on detection of a memory value Break Register Break on detection of a register value Break Sequence Sequential breakpoints Break Cycle Break after the specified number of cycles R20UT0445EJ0100 Rev 1 00 Page 42 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging Setting Break Conditions Click on Detail after selecting the break type in the Select Break Type dialog box Th
81. ed A placeholder or the Browse button is available Clicking OK changes the coverage range 3 10 7 Deleting the Selected Coverage Range Select a coverage range and choose Delete Range from the pop up menu to delete the selected coverage range 3 10 8 Acquiring Coverage Information Specify a coverage range choose Enable Coverage from the pop up menu and execute the user program to acquire coverage information By default Enable Coverage is selected 3 10 9 Clearing Coverage Information Specify a coverage range and choose Clear Data from the pop up menu to clear the acquired coverage information 3 10 10 Saving Coverage Information in a File Choose Save Data from the pop up menu to open the Save Data dialog box which allows the user to save the coverage information in a file Save Data 24 x filet cov gt Browse Cancel Figure 3 51 Save Data Dialog Box R20UT0445EJ0100 Rev 1 00 Page 74 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging This dialog box specifies the location and name of a coverage information file to be saved The placeholder or the Browse button can be used If a file name extension is omitted COV is automatically added If a file name extension other than COV or TXT is specified an error message will be displayed 3 10 11 Loading Coverage Information from a File Choose Load Data from the pop up menu to open the
82. edgns eases es chee ioscan Gass AEN aie BEA tee RE E GA he Ra 129 7 3 7 Executing the Program in Single Steps ee eeeeseeeeeeceeeceseceseceaecaecaaecaaecseseaeseeeeeeeseeeeaeesesnsessaeenaeeaee 130 7 3 8 Checking Profile Information peceren noia iiei eae E EERE EE E e R a Ri 134 R20UT0445EJ0100 Rev 1 00 Page vi of vi Dec 08 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 1 Overview Section 1 Overview The simulator debugger is a powerful development environment tool for embedded applications to run on Renesas Electronics microcomputers The simulator debugger is used with the High performance Embedded Workshop HEW The HEW provides a graphical user interface that eases the development and debugging of applications written in the C C programming languages or assembly language for Renesas Electronics microcomputers Its aim is to provide a powerful yet intuitive way of accessing observing and modifying the debugging platform on which the application is running READ the simulator debugger and HEW help information before using the simulator debugger R20UT0445EJ0100 Rev 1 00 Page 1 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section1 Overview R20UT0445EJ0100 Rev 1 00 Page 2 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions Section 2 Simulator Debugger Functions This section describes the functions of the RX family simulator debugger 2
83. elected trigger button the name will be displayed in the Trigger window Enable Checking this box enables the trigger button Interrupt typel Interrupt vector number Priority Interrupt priority 0 to 8 or 0 to H 10 when the prefix is omitted values input are taken as hexadecimal and the display is in hexadecimal notation The fast interrupt is specified by the value 8 when the range is from 0 to 8 and H 10 when the range is from 0 to H 10 If 0 is specified the interrupt will not occur even if the button is clicked Clicking the OK button stores the setting Clicking the Cancel button closes this dialog box without setting the details of the interrupt Note If the Cancel button is clicked after multiple trigger button settings are modified the modifications of all those buttons are canceled e Changing the number of trigger buttons Specify the number of trigger buttons displayed in the Trigger window in the Number of Buttons submenu in the pop up menu 4 16 64 or 256 can be selected e Changing the size of trigger buttons Specify the size of trigger buttons displayed in the Trigger window in the Size submenu in the pop up menu Large Normal or Small can be selected R20UT0445EJ0100 Rev 1 00 Page 80 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 11 2 GUI I O Window Choose View gt Graphic gt GUI I O or click the GUI I O toolbar butt
84. er selecting a file name will write the profile information to the selected file Pressing the Save All button will write the profile information to all of the profile information files Save Profile Information Files Profile Information files Profile Information files C Workspace_Evaluation_RAxX lt T ute Save All Browse Figure 3 43 Save Profile Information Files Dialog Box 3 8 11 Notes 1 The number of executed cycles for an application program as measured by the profile function includes a margin of error The profile function only allows the measurement of the proportions of execution time that the functions occupy in the overall execution of the application program Use the Performance Analysis function to precisely measure the numbers of executed cycles 2 The names of the corresponding functions may not be displayed when the profile information on a load module with no debugging information is measured 3 The stack information file extension SNI must be in the same directory as the load module file extension ABS 4 Itis not possible to store the results of measurement 5 Itis not possible to modify the results of measurement R20UT0445EJ0100 Rev 1 00 Page 68 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 9 Analyzing Performance Use the Performance Analysis window to select a function name and analyze the performance 3 9 1 Opening the Performan
85. esdisassnvseneUbatestovenndas bebbenhien doen ee 100 5 1 5 Assemble IDisassemble sisi cocsssessteessteccncccevsteaseancnsbsvetitsssycovesncosdsabienusesbeausdeudebscapaccent est AEREE EEEE EE EE 100 5 1 6 MBG AN oroe n E aa er EE E E ioe mnasy 101 5 1 7 PACE E E E E E E E 101 5 1 8 COVETABE sorrire deorienn E Ea TEENER EEEE EE ETER E E E REEE AEE EE E 101 5 1 9 PerformanCE sssrinin no eee EEEE EE EEE E EEE EE EER E EE E EE E E EE EEE EEE 102 5 41 10 Weatehiciiccscisciecs aiee a ee nas oe ce Gas ee eed Eee SE 102 5 1 11 SCHMP VLOG BING ocats cases des ceseszescgessces E des Pecues se chic due caugdod cues cosde cussed soc ne E see Peavegesestogs sedee cong todecneses 102 5 1 12 Memory Resource sesers ee il beets E aes es rea eed ape ee A ae 102 5 1 13 Simulator Debup per SEIN GS it s cccscestesevsersensesndssaceienseseusessageveensestnsesedsdoss ener E a e sbapeussdssacueveds E E ERR 103 5 1 14 Standard T O and Pile T O runasi teases ion aea a neni bier Ua EE EE eel 103 5 1 15 NGM Ys EEEE EEEE Ponca scaatecg E E E A A EE E eset a A EE E eam 103 5 1 16 Project W OFKSPaCe secacs sei sesscdeaceashens n ee Ere belecnensecnedenbeddsbesdecaghssdeensasveendandsoedsbescteesthse stoeesienstaysiaoes 104 5 1 17 Test Tool Facility verienenn enie n selusses abuses venidensshsnieel EENE ETE TEE RE EEEE EEr E ETES 104 5 1 18 Debugging Functions for the Realtime OS eseseesseseesssreeresrrrrerrsrrerssrerrestrrreresrentssrerrereetnsrerissrerrertrsrntts 1
86. ess H nnnnnnnn Type xxxx Access Size yyyy An access break condition was satisfied so execution has stopped The information in parentheses shows the satisfied access break condition accessed address access type and access unit Break Cycle Cycle H nnnnnnnn A number of cycles condition was satisfied so execution has stopped The information in parentheses shows the satisfied number of cycles condition number of cycles Break Data Access Address H nnnnnnnn Data H mmmm A data break condition other than Inverse sign or Difference was satisfied so execution has stopped The information in parentheses shows the satisfied data break condition accessed address and value Break Data Access Address H nnnnnnnn Previous Data H mmmm Current Data Himmmm A data break condition Inverse sign or Difference was satisfied so execution has stopped The information in parentheses shows the satisfied data break condition accessed address and previous and current values Break Register Register XX Value H mmmm A register break condition was satisfied so execution has stopped The information in parentheses shows the satisfied register break condition register name and value Break Sequence PC H nnnnnnnn A sequential break condition was satisfied so execution has stopped The information in parentheses shows the satisfied sequential break condition address of the last instruction
87. ess TRAP_ADDRESS_DISPLAY TD Displays simulated I O address settings TRAP_ADDRESS_ENABLE TE Enables or disables the simulated I O 5 1 15 Utility Command Name Abbr Function HELP HE Displays the command line help INITIALIZE IN Initializes the debugging platform QUIT QU Exits HEW RADIX RA Sets default input radix RESPONSE RP Sets an interval to refresh the window STATUS STA Displays the debugging platform status TOOL_INFORMATION TO Outputs information on the currently registered tool to a file R20UT0445EJ0100 Rev 1 00 Dec 24 2010 RE Page 103 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines 5 1 16 Project Workspace Command Name Abbr Function ADD_FILE AF Adds a file to the current project CHANGE_CONFIGURATION CC Sets the current configuration CHANGE_PROJECT CP Sets the current project CHANGE_SESSION CS Changes the current session CHANGE_SUB_SESSION CB Changes the currently active session when simultaneous debugging is enabled CLEAR_OUTPUT_WINDOW COW Clears the contents of the specified tab in the Output window CLOSE_WORKSPACE CW Closes the current workspace OPEN_WORKSPACE OW Opens a workspace REFRESH_SESSION RSE Updates information on the session REMOVE_FILE REM Removes a file from the current project SAVE_SESSION SE Saves the current session SAVE_WORKSPACE SW Saves the current workspace UPDATE_ALL_DEPENDENCIES UD
88. fer to the simulator debugger help about each I O function R20UT0445EJ0100 Rev 1 00 Page 85 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging The following shows an example for inputting one character as a standard input from a keyboard Label SYS_CALL is specified as the simulated I O address STOP SYS_CALL PARM INBUF MOV L MOV L MOV L JSR NOP NOP LWORD SECTION BLKB END 01210000h R1 PARM R2 SYS CALL R3 R3 INBUF B DATA 2 R20UT0445EJ0100 Rev 1 00 Dec 24 2010 RENESAS Page 86 of 136 RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 13 Creating a Virtual I O Panel The simulator debugger has a GUI I O function for simulating a simple key input or key output panel of the user target system in a window This virtual I O panel is created in the GUI I O window That is virtual buttons and virtual LEDs are arranged in this window to allow the input and output of data GUI IFO Sample pni Input Panel Figure 3 63 Example of a GUI I O Window 3 13 1 Opening the GUI I O Window Choose View gt Graphic gt GUI I O or click the GUI I O toolbar button A to open the GUI I O window GUI 170 new panel Ioj x Figure 3 64 GUI I O Window This window is used to arrange the following items Button Press a button for input of data to a virtual port or generation of a virtual interrupt Label A c
89. fied Interrupt Interrupt processing proceeds when the condition is satisfied Trace Trigger Tracing starts when the condition is satisfied only in cases where triggering of tracing by events and tracing by points have been enabled Setting Details of the Action Click on Detail after selecting the action type in the Select Break Type dialog box This opens a dialog box that allows you to set details of the selected action except Stop and Trace Trigger R20UT0445EJ0100 Rev 1 00 Page 47 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging e File Input I 2x Input file zi _Bronse _ Cancel r Destination Address HooD00000 Data size fi x Count D Figure 3 25 Set File Input Action Dialog Box When the condition is satisfied data are read out from the specified file and written to the specified location in memory Input file File from which data are to be read out When reading out by the simulator debugger reaches the end of the file reading out recommences from the beginning of the same file Address Memory address to which data should be written Data size Size of each data value in bytes 1 2 4 8 Count Number of values to be written H 1 to H FFFFFFFF when the prefix is omitted values input are taken as decimal and the display is in decimal notation File Output Set File Output Action 2 x Output file
90. file name 3 13 11 Loading I O Panel Information Press the i button on the toolbar or choose Load from the pop up menu to open the Load GUI I O Panel File dialog box Specify the file you wish to load Panel information prior to the load will be deleted R20UT0445EJ0100 Rev 1 00 Page 95 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging R20UT0445EJ0100 Rev 1 00 Page 96 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 4 Windows Table 4 1 lists the windows Section 4 Windows Refer to the simulator debugger help about the toolbar buttons Table 4 1 Simulator Debugger Windows Window Name Function 10 Viewing the I O Memory Debug Console Standard I O and File I O Processing Event Using the Simulator Debugger Breakpoints Watch Looking at Variables any variables Editor Displaying the source code Image Displaying Memory Contents as an Image Coverage Measuring Code Coverage Disassembly Viewing the Assembly Language Code Command Line Debugging with the Command Line Interface Stack Trace Viewing the Function Call History Status Viewing the Current Status Trigger Generating a Pseudo Interrupt Manually Trace Viewing the Trace Information Wave Displaying Memory Contents as Waveforms Performance Analysis Analyzing Performance Profile Profile Chart Viewing the Profile Informati
91. ger V 1 02 Section 3 Debugging 3 11 Generating a Pseudo Interrupt Manually Windows Trigger and GUI I O allow the user to generate a pseudo interrupt manually by pressing a button on the window 3 11 1 Trigger Window Choose View gt CPU gt Trigger or click the Trigger toolbar button to open the Trigger window Figure 3 57 Trigger Window This window displays trigger buttons that generate pseudo interrupts manually The details of the interrupt to be generated by pressing each trigger button can be specified in the Trigger Setting dialog box Up to 256 trigger buttons can be used For details on the interrupt processing in the simulator debugger refer to section 2 15 Pseudo Interrupts R20UT0445EJ0100 Rev 1 00 Page 79 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging e Setting a trigger button Choose Setting from the pop up menu to open the Trigger Setting dialog box and to specify the details of the pseudo interrupt to be generated by pressing each trigger button Trigger Setting Trigger 1 MV Enable Name f Interrupt Typel H oooo0000 lRteropt lipped Priority 0 ba Figure 3 58 Trigger Setting Dialog Box This dialog box allows the user to specify the details of the pseudo interrupt to be generated by pressing each trigger button Trigger Selects the trigger button to be specified in detail Name Specifies a name for the s
92. gging Sign Sign of the data This option is only available in the following cases e The selection for Option is Difference e The selection for Option is GT gt LT lt GE gt LE lt IN or OUT and the selection for Size is Byte Word or Long word Notes 1 Since Inverse sign and Difference require comparison of the data with the value previously written to memory the break will never occur on the first test after a reset or break generation when either of these conditions has been selected 2 For string and multiply and accumulate instructions only the last data access operation is checked for data break conditions Selecting an Action in Response to a Break If you click on OK after setting break conditions in the dialog boxes described on the preceding pages the Select Break Type dialog box is opened again Select an action type in the Action type field of this dialog box Break type PC Breakpoint Detail Action type File Input Detail Figure 3 24 Select Break Type Dialog Box The following options are available Stop Execution of the user program is stopped when the condition is satisfied File Input The contents of a specified file are read out and written to the specified memory when the condition is satisfied File Output The contents of the specified memory are read out and written to the specified file when the condition is satis
93. gram performance R20UT0445EJ0100 Rev 1 00 Page 134 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Tree Sheet Displays the profile information as a tree diagram e Select the Tree sheet Double clicking the function name in the Profile window expands or minimizes the tree structure Profile B Shaw Functions Variables z Rel H main FFFF9042 H O00000cB H OOOO0O000 1 _printf FFFF9312 H 00000021 H 00000000 _rand FFFF9333 H O0000001 H 00000000 _change FFFF920A H OOO0006A H 00000000 _sort FFFF910D H OOOOO0FD H 00000000 __CLOSEALL FFFFSDF H OOO0004D H 00000000 B INIT_IOLIB FFFF8CD8 H O000011F H 00000000 Eb _freopen FFFF9274 H 0000002E 00000000 El _felose FFFF9ZAZ H OO000053 4H 00000000 _fflush FFFF9468 H OOOOOO7E 4H 00000000 _ Fofree FFFF9624 H 00000051 H 90000000 _close FFFFSED9 H 00000009 H 00000000 __Foprep FFFFO4E6 H OOOOO0ES H 00000000 Oo Ofmooooqocoooqo0oco aj OBmoooocoo0coaoosa Figure 7 28 Profile Window Tree Sheet In above figure it can be found that the __close function was called three times from the _fclose function the execution cycle was 21 and the internal memory was accessed six times R20UT0445EJ0100 Rev 1 00 Page 135 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Profile Chart Window Displays the relation of calls for a specific function e Select the __flclose function on the Profile
94. haracter string which is shown when the value written to a selected address or bit was the specified value and hidden otherwise R20UT0445EJ0100 Rev 1 00 Page 87 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging LED A defined region in which a specified color is displayed representing illumination of an LED when the value written to a selected address or bit was the specified value Text A region for the display of a text string 3 13 2 Creating a Button Click on the g button of the toolbar or choose Create Button from the pop up menu The mouse cursor turns into a symbol Create the button by dragging the mouse cursor from a higher left to a lower right position GUI 170 new panel Figure 3 65 GUI I O Window Create Button e Specifying the event generated by clicking the button Press the button on the toolbar and double click on the created button to open the Set Button dialog box R20UT0445EJ0100 Rev 1 00 Page 88 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging Set Button Dialog ic Address eo a a feve I Bites M Not Use Mask Water l Aa a e e Ar me LL LA Bit Symbol z ewen ox mitema eT UBt PREF MeTupt PpeZr PCTs Figure 3 66 Set Button Dialog Box Enter the name of the button input port address and input data The button name must not include white space 3 13 3 Creating a Label Click on
95. has been registered but the simulator debugger is disconnected select Debug gt Connect or click on the Connect toolbar button La To disconnect the simulator debugger on the other hand select Debug gt Disconnect or click on the Disconnect toolbar button 3 3 Modifying the Simulator Debugger Settings This section describes how to modify the simulator system after the simulator debugger is started 3 3 1 Setting the Endian and Frequency of CPU The endian and operating frequency of CPU are set on the CPU Configuration tabbed page in the Set Simulator dialog box which is displayed on initiation of the simulator debugger Set Simulator CPU Configuration Peripheral Function Simulation Endian System Clock ICLK Frequency 100 MHz I Don t show this dialog box Figure 3 4 Set Simulator Dialog Box CPU Configuration R20UT0445EJ0100 Rev 1 00 Page 24 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging The following items can be specified in this dialog box Endian Endian of CPU Big Big endian Little Little endian System Clock ICLK Frequency Operating frequency of the CPU unit MHz Specifiable range 1 to 1000 If you do not wish this dialog box to be opened when the simulator debugger is subsequently initiated check Don t show this dialog box 3 3 2 Modifying the Simulator System The System tab in the Simulator System dialog box is
96. he Set Interrupt Source Information dialog box by double clicking on the line for the interrupt source to be changed R20UT0445EJ0100 Rev 1 00 Page 34 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging Set Interrupt Source Information Interrupt Source Emio E Cancel Interrupt Vector Number 28 Priority Register Address ox00087304 MS Priority Register Size 8 bit b Priority Register Bit Position 20 x Figure 3 13 Set Interrupt Source Information Dialog Box The following items can be set or displayed in this dialog box Interrupt Source Interrupt source name Interrupt Vector Number Interrupt vector number when the prefix is omitted values input are taken as decimal and the display is in decimal notation Priority Register Address Address of the interrupt priority register Priority Register Size Size of the interrupt priority register Priority Register Bit Position Positions of bits in the interrupt priority register Clicking the OK button makes the settings effective Clicking the Cancel button closes this dialog box without storing the settings 3 4 4 Memory Resources for Control Registers The peripheral function simulation module secures memory resources in the control register area Do not perform operations that lead to the deletion or alteration of memory resources for control registers after they have been allocated For details on the sett
97. i O i lt 10 i FFFF9OD4 printf a da ld n i a i FFFF9104 change a FFFF910D Void sort long a long t int i j K gap Figure 7 4 Source Window Setting the Breakpoint A is displayed at the line that includes the sort function call indicating that the PC breakpoint is set at the address 7 2 5 Setting the Profiler e Open the Profile window by selecting Profile from the View gt Performance menu R20UT0445EJ0100 Rev 1 00 Page 119 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Profile ER Ena Show Functions Variables ma eS or e TE EPS PG VO TEA tist Tree 7 Figure 7 5 Profile Window e Open the pop up menu by right clicking the mouse on the Profile window and select Enable Profiler to enable acquisition of the profile information 7 2 6 Setting the Simulated I O When the demonstration project is used the simulated I O is automatically set so check the setting e Open the Simulator System dialog box by selecting Simulator gt System from the Setup menu Simulator System System Memory CPU Rx600 he Bit size Simulated 1 0 Address V Enable P32 H o0000000 7 Bl Endian Execution Mode litte Endian Stop x Detail Interrupt Priority Level Response o7 Disable MYTIPL instruction b 40000 I Cache the results of decoding instructions and accelerate simulation
98. ing of memory resources refer to section 3 3 3 Modifying the Memory Map and Memory Resource Settings 3 4 5 Viewing the Names of Connected Peripheral Functions After the simulator debugger has been initiated Peripheral Modules on the Platform sheet of the Status window shows the names of the peripheral functions that are connected R20UT0445EJ0100 Rev 1 00 Page 35 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 4 6 Input to and Output from Virtual Ports For the simulator debugger some pins are allocated to memory as virtual ports These can be used for input to and output from files For details on the virtual ports supported by the simulator debugger refer to section 2 8 2 3 Input and Output of Data 1 Viewing the List of File Input and Output To view the list of file input and output that is currently defined open the Port I O tabbed page of the Simulator System dialog box that is displayed by selecting Setup gt Simulator gt System If no modules with virtual ports have been registered the Port I O tab does not appear Simulator System System Memory Port 1 0 Module File Name Repeat Start Cancel Apply Figure 3 14 Simulator System Dialog Box Port I O Tab R20UT0445EJ0100 Rev 1 00 Page 36 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 The following items are displayed in this dialog box Module Module name
99. inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics Trademarks Microsoft MS DOS Windows and Windows Vista are registered trademarks of Microsoft Corporation Visual SourceSafe is a trademark of Microsoft Corporation IBM is a registered trademark of International Business Machines Corporation All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organizations R20UT0445EJ0100 Rev 1 00 Page i of vi Dec 08 2010 RENESAS About This Manual This manual describes debugger functions of the High performance Embedded Workshop HEW This manual does not intend to explain how to write C C 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 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 en
100. interrupt is specified by the value 8 when the range is from 0 to 8 and H 10 when the range is from 0 to H 10 If 0 is specified the interrupt will not occur even if the condition is satisfied 2 Operation of the interrupt controller is not simulated for pseudo interrupts Therefore the interrupt status flag is not changed even if an interrupt occurs R20UT0445EJ0100 Rev 1 00 Page 19 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 16 Coverage The simulator debugger acquires instruction coverage information during instruction execution within the measurement range specified by the user In the measurement range addresses are directly specified and all functions in a file whose name has been specified are set The state of each instruction execution can be monitored through the instruction coverage information In addition this information can be used to determine which part of a program has not been executed The Coverage window displays the acquired instruction coverage information The instruction coverage information can be displayed in the Editor window by highlighting the column corresponding to the source line of the executed instruction For the address range or function to be measured the coverage statistical information is displayed in percentage This gives the user a clear idea how much the program has been executed The instruction coverage informati
101. is opens a dialog box that allows you to set conditions for the selected break type PC Breakpoint Set PC Breakpoint Condition a Address JHoo000000 7 Count D1 Figure 3 18 Set PC Breakpoint Condition Dialog Box Up to 1024 PC breakpoint conditions can be specified Address Address of the instruction where a break will occur Count Number of times that the specified instruction is fetched 1 to 16 383 the default value is 1 if the prefix is omitted values input are taken as decimal and the display is in decimal notation e Break Access Set Break Access Condition q Begin address H 00000000 l End address JH ooooooo0 J Bl Cancel Access type Read Write Figure 3 19 Set Break Access Condition Dialog Box Up to 1024 access break conditions can be specified Begin address First address of the range of memory for which access generates a break End address Last address of the range of memory for which access generates a break if no data is input the range corresponds to the first address alone Access type Read write or read write Note For string and multiply and accumulate instructions only the last data access operation is checked for access break conditions R20UT0445EJ0100 Rev 1 00 Page 43 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Break Register Set Break Register Condition 2 x Register Ro q i Option Eq
102. ition Condition that causes a break The contents to be displayed depend on the type of the break When the type of the break is BR the register name is displayed and when the type of the break is BCY the number of cycles is displayed BP PC Program counter Corresponding file name line and symbol name BA Address Address Symbol name BD Address Address Symbol name BR Register Register name BS PC Program counter Corresponding file name line and symbol name BCY Cycle Number of cycles displayed in hexadecimal Action Operation of the simulator debugger when a break condition is satisfied Stop Execution halts File Input file name File state Memory data is read from file File Output file name File state Memory data is written to file Interrupt Interrupt type priority Interrupt processing Trace Trigger Tracing starts Conditions specifying Stop for Action is displayed on the Software Break tab and the conditions specifying another action type is on the Software Event tab R20UT0445EJ0100 Rev 1 00 Page 41 of 136 Dec 24 2010 ztENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 6 2 Setting a Breakpoint Selecting Add from the pop up menu in the Event window opens the Select Break Type dialog box which allows the user to set a breakpoint Two further dialog boxes can be opened from the Select Break Type dialog box Set xx Condition for sp
103. ition dialog box Right clicking on the Trace window displays the pop up menu Choose Acquisition from the pop up menu to display the Trace Acquisition dialog box The acquired trace information is displayed in the Trace window The trace information can be searched The search conditions can be specified in the Find dialog box Right clicking on the Trace window displays the pop up menu Choose Find gt Find from the pop up menu to display the Find dialog box For details refer to section 3 7 Viewing Trace Information R20UT0445EJ0100 Rev 1 00 Page 14 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 10 Standard I O and File I O Processing The simulator debugger enables the standard I O and file I O processing to be executed by the user program When the T O processing is executed the DebugConsole window must be open Table 2 9 shows the supported I O functions Table 2 9 I O Functions No Function Code Function Name Description 1 H 21 GETC Inputs one byte from the standard input 2 H 22 PUTC Outputs one byte to the standard output 3 H 23 GETS Inputs one line from the standard input 4 H 24 PUTS Outputs one line to the standard output 5 H 25 FOPEN Opens a file 6 H 06 FCLOSE Closes a file 7 H 27 FGETC Inputs one byte from a file 8 H 28 FPUTC Outputs one byte to a file 9 H 29 FGETS Inputs one line from a fil
104. l variables and displays the profile data for each function and variable Profile ES Ea Shen Functions Variables JE 2 FFFF9071 H OOOOOOD1 738 FFFF9142 H OOOOOOFD 1870 FFFF923F H OOOOOO6A 425 FFFF92A9 H OOOOOOZE 96 FFFF92D7 H 00000053 126 FFFF932A H 00000000 3700 FFFF9349 H 00000021 374 FFFF936A H OOOOO01c 110 FFFF9386 H 00000000 987 FFFF93D0 H OOOOOOcrF 24459 FFFF949F H OOOOOO E 13254 FFFF951D H OOOOOQOES 415 FFFF9655 H 00000051 66 FFFF96AC H 00000292 12713 _main hy _sort _ change _freopen _fclose FFFFO32A _printf _rand __INITSCT _fwrite _fflush __Foprep _ Fofree __Printf oooo0o0cc0c0c 0c oR 0 0 00 F F F Ly F F F F F F F F F oooo0o0 0 0c 0c 0 00 00 Figure 3 39 List Sheet Clicking the column header sorts the items in an alphabetical or ascending descending order 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 3 8 7 Tree Sheet R20UT0445EJ0100 Rev 1 00 Page 63 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 8 7 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
105. lays performance analysis functions ANALYSIS_RANGE_DELETE AD Deletes a performance analysis range PROFILE PR Enables or disables profile PROFILE_DISPLAY PD Displays profile information PROFILE_SAVE PS Saves the profile information to file 5 1 10 Watch Command Name Abbr Function WATCH_ADD WA Adds an item for watching WATCH_AUTO_UPDATE WU Selects or cancels automatic updating of watched items WATCH_DELETE WD Deletes a watched item WATCH_DISPLAY WI Displays the contents of the Watch window WATCH_EDIT WE Edits the value of a watched item WATCH_EXPAND WX Expands or collapses a watched item WATCH_RADIX WR Changes the radix for display of watched items WATCH_RECORD WO Outputs the history of updating of the values of a watched item to a file WATCH_SAVE WS Saves the contents of the Watch window to a file 5 1 11 Script Logging Command Name Abbr Function Comment ASSERT Checks if an expression is true or false AUTO_COMPLETE AC Enables or disables the auto complete function ERASE ER Clears the Command Line window EVALUATE EV Evaluates an expression LOG LO Controls command output logging SLEEP Delays command execution SUBMIT SU Executes a command file TCL Displays TCL information 5 1 12 Memory Resource Command Name Abbr Function MAP_DISPLAY MA Displays memory resource settings MAP_SET MS Allocates a memory area R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 102 of 136 sLKENESAS RX Family Simulat
106. led the current function to also be checked The displayed function call history is updated in the following cases e When simulation stops due to the break conditions described in section 2 11 Break Conditions e When register values are modified while simulation stops due to the above break conditions e While single step execution is performed For details refer to the High performance Embedded Workshop User s Manual R20UT0445EJ0100 Rev 1 00 Page 18 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 14 Performance Measurement The simulator debugger has the profiler function and performance analysis function for performance measurement of the user program 2 14 1 Profiler The profiler function displays the memory address and size allocated to functions and global variables the number of function calls and the profile data for the entire user program The profile data to be displayed depends on the CPU Profile information is displayed in list tree and chart formats Profile information is useful in optimizing user programs by reducing the size and putting the most frequently called functions in line When using the profile information saved in a file it is possible to optimize user programs based on dynamic information using the optimizing linkage editor For details refer to section 3 8 Viewing the Profile Information 2 14 2 Performance Analysis The
107. low appears Specify the debugging platform in step 8 New Project 8 10 Setting the Target System for Debugging MAX600 Simulator Target type Rx600 7 Target CPU fan CPUs x lt Back n gt Finish Cancel Figure 3 1 Debugger Target Setting Display 8 10 Targets Sets the debugger targets Select by checking the debugger targets No selection or a selection of more than one target is possible Target type Specifies the type of the targets displayed under Targets Target CPU Specifies the type of the CPUs displayed under Targets 3 1 2 Setting up a Workspace for the Simulator Debugger Set up the workspace for the simulator debugger in step 9 10 R20UT0445EJ0100 Rev 1 00 Page 22 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging New Project 9 10 Setting the Debugger Options Target name Fxe00 Simulator Core lt single core gt Configuration name SimD ebug_Ax600 Simulator 1 0 Simulator 1 0 addr 0x0 Bus mode 0 Endian Little Patch Off Modity T Initial session Figure 3 2 Debugger Option Setting Display 9 10 Detail options Sets the debugger target options To modify an option select Item and click Modify If the selected item cannot be modified Modify remains gray even when Item is selected Simulator I O Indicates whether simulation of standard I O and file I O by the user program is enabled Enable or disabled
108. matches Data Not equal The value written to memory does not match Data Inverse sign The sign of the value written to memory is the inverse of that for the previous value Difference The difference between the current and previous values written to memory exceeds Data GT gt A value written to memory is greater than Data LT lt A value written to memory is less than Data GE gt A value written to memory is greater than or equal to Data LE lt A value written to memory is less than or equal to Data IN A value written to memory is within the range between Data 1 and Data 2 Data 1 lt value written to memory lt Data 2 OUT A value written to memory is outside the range between Data 1 and Data 2 value written to memory lt Data 1 Data 2 lt value written to memory Data 1 Data value used in the break condition When IN or OUT has been selected Data 1 is the beginning of a range for use in the break condition Data 2 Data value that is the end of a range for use in the break condition This option is only available when IN or OUT has been selected Data mask Mask condition specifying 0 for a bit masks the bit This option is not available when Inverse sign or Difference has been selected Size Data size R20UT0445EJ0100 Rev 1 00 Page 46 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debu
109. n PLOCESSINE norise reisa E E E R EE E EE EATE E E EEE E 6 2 7 Ediacara Er EEEE E EE E E EE EEE E 6 2 7 1 Endian Of th CPU seseris eese e EE ao E E EEE EKE siceicedt conssepeerensseeestys 6 2 7 2 Endian of the External Memory Area cece eeeesceeeceesceeecesecaecsaeceaecaaecaeesseseaeeeaeeeeeseesesaessaessaseaeeaeenaes 6 2 8 Simulation of Peripheral FUNCtions 00 0 0 eee eee cseecseeeeeeeeeeeeeesceesecesecsaecsaecsaecaaecaeseaeeeaeseeeeeseaeseaeeereseseaeeaeeaeenaes 7 2 8 1 WUC a se8 se Ses ee Ree 5 eS cae cate gait A E E A ee pases aes eee 7 2 8 2 Serial Communications Interface scessessecsseescecneeceeconscnnsensvensossossonssesssesseessesssessersseessessersserseesnersnees 8 2 8 3 Interrupt Controller ssi scenes aiiged eel E EEE Gos deel eh as 12 2 8 4 TO CIS sce h ha toteast N tes anes heches N A ns Seuscatuaeos phones A 14 2 8 5 Using Peripheral PUDCHOMS sic cseevseestasds scien vapsctasetosieunesensdassbsasebpessasesoabeds venesdevecedbunncbensveuedesteabebsdteesensseee 14 2 9 Trace ea sicshs sucks eack eis E EE E E bua voubcbanwayecbapbanedteniend di cavans E E EEE nites 14 2 10 Standard I O and File 1 O Processitg c sccccsssesssaseseesentsensscnsecpeceescsetoresoeseteeatertbancdsnssustorasessnensensbansosnsednesenseastans 15 211 Break COMCIMONS ssnin ieies nien EE E E ENE EREE O EEEE S ER 16 2 12 Floating Point Datasssieprcriesvor eretar E EA E EE E E EAEE E EEE E 18 2 13 Display of Function Call History seresnsss mennie
110. n a matching trace record is found by a search the relevant line in the Trace window is highlighted When an instance of the trace record was successfully found choose the Find Previous or Find Next button from the pop up menu The next instance of the trace record will be searched for R20UT0445EJ0100 Rev 1 00 Page 127 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 0035885 0035884 0035883 0035882 0035881 0035880 0035879 0035878 0035877 0035876 0035875 0035874 0035873 0035872 0035871 7 3 4 Address Time Stamp FFFF935F 00 00 000 next_loo FFFF936F loop1 FFFF9371 FFFF9361 FFFF9364 FFFF9367 FFFF9369 FFFF936B FFFF936D next_loo FFFF936F loop1 FFFF9371 FFFF9361 FFFF9364 FFFF9367 FFFF9369 next_loo FFFF936F 000 2 Instruction BRA B Interrupt next loopl R4 R5 loop1 R4 R1 R4 R3 R1 R3 next_loop1l R1 R3 R4 R5 loop1 R4 R1 R4 R3 R1 R3 next_loop1l R4 R5 Figure 7 16 Trace Window Searched Result Checking Simulated I O Section 7 Tutorial Access Data PC lt FFFF93 6F PC lt FFFF9361 R4 lt FFFF8578 R4 lt FFFF857C R3 lt 00000458 0000152F lt 00 PC lt FFFF9361 R4 lt FFFF8580 R4 lt FFFF8584 PC lt FFFF936F Random data that is displayed by the printf function can be checked in the DebugConsole window e Do not close the DebugConsole window DebugConsole d Data Input a 0 0 a 1
111. n address Specified hexadecimal value A range is specifiable Searching for values other than the specified value is selectable Time Stamp Execution time of total instruction Value specified in an edit box in the unit of time A range is specifiable Searching for values other than the specified value is selectable Instruction Instruction mnemonic Specified string Searching for values other than the specified value is selectable Interrupt Interrupt occurrence Fixed string Interrupt Searching for values other than the specified value is selectable The conditions you have set are shown in the Find Setting Contents list box After setting search conditions click the Find Previous or Find Next button to start a search When a matching trace record is found by a search the relevant line in the Trace window is highlighted If no matching trace records are found a message dialog box is displayed When an instance of the trace record was successfully found choose the Find Previous or Find Next button from the pop up menu The next instance of the trace record will be searched for 3 7 6 Filtering Trace Information Use the filter function to extract only the necessary records from the acquired trace information To use the filter function select Auto Filter from the pop up menu of the Trace window When Auto Filter is turned on each column of the Trace window is marked with an auto filter
112. nemonic Interrupt Interrupt Interrupt if an interrupt is generated if not Access Data Data access information display format destination lt accessed data Note For string and multiply and accumulate instructions this is only the last data to have been accessed c Point Trace Mode In this mode the Trace window shows the line of data for which an event condition was satisfied The displayed items are the same as those described under a Acquire All Mode Note When a breakpoint is used as an event since the event occurs before the specified instruction is executed the displayed result is that for the previously executed instruction R20UT0445EJ0100 Rev 1 00 Page 54 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 2 Disassembly Display Mode In the pop up menu select Display Mode gt DIS This enables reference to executed instructions Trace s Range 0036672 0000000 Cycle 0035976 Address FFFF9071 Time 00 00 00 000 021 760 PTR Label z Address Object Code Instruction Time Stamp 0035976 _main FFFF9071 7100D0 ADD 30H R0 RO 00 00 00 000 0035975 FFFF9074 FBSZ1C84FFFF MOV L OO007BE4H R5 00 00 00 000 0035974 FFFF9O7A 6040 SUB 4H RO 00 00 00 000 0035973 FFFF907 E305 MOV L R5 R0 00 00 00 000 0035972 FFFF907E O5 B0200 BSR A _printf 00 00 00 000 0035971 _pri FFFF9349 6605 MOV L 0H R5 00 00 00 000 0035970 FFFF934B 7E
113. ng Clicking the OK button makes the settings effective Clicking the Cancel button closes this dialog box without storing the settings If you do not wish this dialog box to be opened when the simulator debugger is subsequently initiated check Don t show this dialog box 3 4 2 Changing the Addresses of Peripheral Functions The addresses of peripheral functions can be changed on the Peripheral Module Configuration dialog box The addresses of the peripheral functions which have interrupt source information can be changed on the Address tabbed page of the Peripheral Module Configuration dialog box To open this dialog box select a peripheral function in Peripheral Functions on the Peripheral Function Simulation tabbed page of the Set Simulator dialog box and then press the Detail button Peripheral Module Configuration Address Interrupt Module ICU Begin Address Register H 0008701 D v Register Address Register Address lt IR028 o008701C IR029 0008701D IR030 00008701E IR031 00008701F ISELR028 00085711C y e Figure 3 11 Peripheral Module Configuration Dialog Box Address Tab The following items can be set or displayed in this dialog box Module Name of the peripheral function supported by the selected peripheral function simulation module Start Address Start address of the peripheral function selected in Module Register Address Names and addresses of registers of the pe
114. ng a resource with units smaller than 16 bytes use the memory within an area in accord with the hardware manual 3 Attempts by instructions to write to memory for which only reading is permitted or to read from memory for which only writing is permitted cause memory access errors 3 4 Simulating Peripheral Functions The simulator debugger is able to simulate peripheral functions by using DLL modules This section describes how to register the peripheral function simulation modules to enable the simulation of individual peripheral functions and how to set their configurations R20UT0445EJ0100 Rev 1 00 Page 31 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 4 1 Registering Peripheral Function Simulation Modules Peripheral function simulation modules can be registered in the Peripheral Function Simulation tabbed page of the Set Simulator dialog box which is opened on initiation of the simulator debugger Once a peripheral function simulation module has been registered in this dialog box the simulated peripheral function provided by that simulation module becomes available The registered settings cannot be modified after the simulator debugger has fully started up To change the peripheral function simulation modules that are in use restart the simulator debugger to bring up this dialog box Set Simulator CPU Configuration Peripheral Function Simulation m Peripheral Functions Mo
115. ng the Stack Pointer and Program Counter To execute the program the program counter must be set from the location of the reset vector In the reset vector of the sample program the PC value H FFFF8000 is written e Select Reset CPU from the Debug menu or click the Reset CPU button on the toolbar Set the program counter to H FFFF8000 from the reset vector 7 3 7 3 1 Start Debugging Executing a Program Bi Figure 7 9 Reset CPU Button e Select Go from the Debug menu or click the Go button on the toolbar Bl Figure 7 10 Go Button R20UT0445EJ0100 Rev 1 00 Dec 24 2010 QENE SAS Page 122 of 136 RX Family Simulator Debugger V 1 02 Section 7 Tutorial The program halts where a breakpoint is set An arrow is displayed in the Source window indicating the location the execution has stopped As the termination cause PC Breakpoint PC H FFFF90E4 is displayed in the Output window Tutorial c B ala Source ddress SAW Breakpoints Source FFFF9042 oid main void long a 10 long j int i FFFF9045 printt Data Input n FFFF9055 for i O i lt 10 i jf FFFF9061 j rand FFFF9064 if j 0 FFFF9071 J J FFFF9079 a i j FFFF9083 printf a sd sld n i a i FFFFS0B3 FFFFS0B8 print Sorting results n FFFF90Cc8 for i O i lt 10 i jf FFFF90D4 printf a d ld n i a i FFFF9104 change aj FFFF
116. ngle file Save Coverage Data Address range 00001000 00001061 No NoToall Yes Toal Figure 3 54 Save Coverage Data Dialog Box When multiple Coverage windows are open a Save Coverage Data dialog box will appear for each open coverage window Clicking the No To All button closes the dialog box without saving any coverage data Clicking the Yes To All button saves the data of all Coverage windows in a single file Note Ifa file is specified for the coverage range not all Coverage windows can be saved in a single file R20UT0445EJ0100 Rev 1 00 Page 76 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 10 15 Displaying the Coverage Information in the Editor Window The coverage information is reflected to the Editor window by highlighting the coverage columns corresponding to the source lines of executed instructions When the coverage settings are modified in the Coverage window the coverage column display will be updated Tutorial c O x Source Address Coverage FFFF9O71 oid main void long a 10 long j int is FFFF9074 printf Data Input n FFFF9084 for i O i lt 10 i FFFF9090 j rand FFFF9099 if j lt Of FFFF90i0 j j FFFF90i8 a i j FFFF9052 printf a da sld n i a i FFFFS0E4 sort a FFFF90EB print Sorting results n FFFFSOFB fori i O i lt 10 i jf FFFF910
117. nterrupt exception INT Instruction Exception An error has occurred due to unconditional trap INT instruction exception processing BRK Instruction Exception An error has occurred due to unconditional trap BRK instruction exception processing I O area not exist An attempt was made to delete the I O area Be sure to set the I O area I O DLL Illegal Interrupt Information errNum 2xx Information on interrupts is incorrect errNum shows the details on this error Correct the information errNum 200 The specified vector is outside the supported range 201 The specified priority is outside the supported range 1 0 DLL Memory Access Error errNum Oxx Address 0xXXXXXXXX An error has occurred during a memory access to the peripheral function errNum shows the details on this error and Address shows the address where this error occurred Correct the user program according to the error information errNum 001 The specified address is outside the supported range 002 No memory exists in the specified area 003 The required memory cannot be allocated 004 The specified data size is outside the supported range 005 The specified address cannot be accessed I O DLL Register Access Error errNum 1xx RegisterName xxxx An error has occurred during a register access to the peripheral function errNum shows the details on this error and RegisterName shows the register where this err
118. odifiable through the Set Simulator dialog box For details on the Set Simulator dialog box refer to section 3 3 1 Setting the Endian and Frequency of CPU R20UT0445EJ0100 Rev 1 00 Page 30 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 3 5 Set Memory Resource Dialog Box The Set Memory Resource dialog box sets and modifies memory resources Set Memory Resource Begin Address P H o0000000 7 al 5 7 Cancel End ddress H 0000FFFF X al Attribute Read Write Figure 3 9 Set Memory Resource Dialog Box The following items are specified Begin Address Address where the memory area to be secured starts End Address Address where the memory area to be secured ends Attribute Access type Read Read only Write Write only Read Write Readable writable Click the OK button after specifying the Begin Address End Address and Attribute Clicking the Cancel button closes this dialog box without modifying the settings Notes 1 If memory resources are set memory in the host computer will be used If the user allocates too much memory resources operation of the host computer will be extremely slow 2 The memory area must start and end on 16 byte boundaries If any other setting is made the area is adjusted to the closest 16 byte boundaries that include the set values Furthermore concerning the type of access boundaries become 16 bytes When usi
119. on Memory Viewing a Memory Area Label Looking at Labels Register Looking at Registers Local Looking at Variables local variables GUI I O Creating a Virtual I O Panel OS Object Displaying the status of OS objects such as tasks and semaphores Task Trace Measuring the execution history of the program by using the realtime OS Task Analyze Displaying the state of CPU occupancy OS Trace Measuring the task execution history of the program under the realtime OS OS Analyze Displaying the result of statistically processing the measured data in the range specified by the start and end markers in the OS Trace window R20UT0445EJ0100 Rev 1 00 Dec 24 2010 RE Page 97 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 4 Windows R20UT0445EJ0100 Rev 1 00 Page 98 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines Section 5 Command Lines 5 1 Commands Functional Order The following tables show the commands in functional order Refer to the simulator debugger help about each command 5 1 1 Execution Command Name Abbr Function GO GO Executes user program GO_RESET GR Executes user program from reset vector GO_TILL GT Executes user program until temporary breakpoint HALT HA Halts the user program RESET RE Resets CPU STEP ST Steps program by instructions or source lines STEP_MODE SM Selects
120. on ccc csiveccliscviscesiivecdesnevennseneseodeudsce sbuenbeculvesnnsbsvacve dievisds sievsatbsbeveentonsvennoctantedorvenys 60 3 8 1 Stack Information Mules iv iss scstssctecosacosecsactessacecnssescaiesdeevsnsievsecssezccevecosceaesned O AEE OEE EEE ER 60 3 8 2 Loading Stack Information FileSs esses sirni aea E S E EEES E E 62 3 8 3 Enabling the Profle veces cxscesscecseaieeexseosasoetises R E E E RE E TAER EE ER A E RERE 62 3 8 4 Specifying Measurement Modesa nisnirenie ee EEE E E E E EE EEEE E 63 3 8 5 Executing the Program and Checking the Results essssesseseeseeeessesesteersstsresresreeresterresteressesrenesrenresreerese 63 3 8 6 List Sheet serinin n ste clececte ses E E ote E Goes oes Sea eevee A R 63 3 8 7 Tree SPCC eeocmi ranee T E EE EEEa SE EPEE NEEE ETET EEE T EE EN E eT N 64 3 8 8 Profile Chart Window i 2 sscescesesssseessvescasetesscaeonsusvats iein SEEE ENE EEE EEEE EE EEEE EEE E EE EE EAE EE EE EEE 66 3 8 9 Types and Purposes of Displayed Data ee ceeeeeeeeceeeceeeceseceaecaeceaecnaecaaecaeecaeseaeseeeseeeeeeseeeeeeseaeeaee 67 3 8 10 Creating Profile Information Files cece eeeeceeeeeeeeeeeeceeceaecaeeseceaecaecsaecaaecaeecaeseaeseeeseeseeeseeeeaeeeaeesaee 68 3 8 11 NOTES issu abs nieren E AEE EErEE S EEA EE EEEO aiuveasbas vues EE EE N R 68 3 9 Analyzing Performante d scesiencseasiadsshaserscsexseesedeadeancssuccaleatteshesvasvsntbvabencvsnsterhdonhebeasyeste tina bbasuuncdenstenevouhespasensuensies 69 3 9 1 Opening the Pe
121. on 7 Tutorial Section 7 Tutorial 7 1 Preparation The basic functions of the simulator debugger will be described in this section using a sample program Note The contents of usage examples figures in this section will differ depending on the compiler version 7 1 1 Sample Program The HEW demonstration program is used for the sample program and is written in C language It first sorts ten random data in the ascending order and then in the descending order The sample program 1 Generates random data for sorting using the main function 2 Inputs the array which stores the random data that is generated by the main function then sorts the data in the ascending order using the sort function 3 Inputs the array generated by the sort function and sorts the data in the descending order using the change function 4 Displays the random data and the sorted data using the printf function The HEW demonstration program is used as the sample program 7 1 2 Creating the Sample Program Note the following when creating the HEW demonstration program e Specify Demonstration for Project Type in Creating a New Workspace RX600 for CPU Series RX600 Simulator for Target e Specify SimDebug_RX600 for the configuration on the toolbar before building the project e Specify e Specify e Specify SimSessionRX600 for the session on the toolbar e This demonstration program uses no peripheral function In
122. on can be saved in or loaded from a file Only a file in the COV format can be loaded For details refer to section 3 10 Measuring Code Coverage R20UT0445EJ0100 Rev 1 00 Page 20 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging Section 3 Debugging This section describes the simulator debugger operations and their related windows and dialog boxes For details on the functions common to the HEW listed below refer to the HEW help information Preparations for Debugging Viewing a Program Operating Memory Displaying Memory Contents as Waveforms Displaying Memory Contents as an Image Modifying the Memory Contents Viewing the I O Memory Looking at Registers Executing Your Program Viewing the Current Status Synchronizing Multiple Debugging Platforms Debugging with the Command Line Interface Elf Dwarf2 Support Looking at Labels R20UT0445EJ0100 Rev 1 00 Page 21 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 1 Creating the Workspace for Simulator Debugger To use the simulator debugger a workspace for the simulator debugger must be created This section only describes the procedures specific to the simulator debugger For details refer to the High performance Embedded Workshop user s manual 3 1 1 Selecting a Debugging Platform When you create a new workspace the dialog box shown be
123. on fj to open the GUI I O window lolx Input Panel Figure 3 59 GUI I O Window This window displays buttons that generate pseudo interrupts manually The details of the interrupt to be generated by pressing each button can be specified in the Set Button dialog box For details on the interrupt processing in the simulator debugger refer to section 2 15 Pseudo Interrupts e Setting a button Choose Create Button from the pop up menu or click the Create Button toolbar button 4 The mouse cursor turns into a symbol Create the button by dragging the mouse cursor from a higher left to a lower right position GUI 170 new panel Figure 3 60 GUI I O Window Create Button R20UT0445EJ0100 Rev 1 00 Page 81 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Double click the created button to open the Set Button dialog box Set Button Dialog it bd mole Biv asic M Not Use Mase Water l rfl a Ar anos AAAA AAHH ESUN Bib Values oz H o00000 MEraptHippez l Figure 3 61 Set Button Dialog Box This dialog box allows the user to specify the details of the pseudo interrupt to be generated by pressing each button Button Name Specifies a name for the button the name will be displayed in the GUI I O window Select Button Type Select Input or Input and Interrupt Interrupt Interrupt Type1 Interrupt vector number Priority Interrupt priority 0
124. or Debugger V 1 02 5 1 13 Simulator Debugger Settings Section 5 Command Lines Command Name Abbr Function EXEC_MODE EM Sets and displays execution mode EXEC_STOP_SET ESS Sets or displays the execution mode at the occurrence of an interrupt 5 1 14 Standard I O and File I O Command Name Abbr Function DEBUGCONSOLE DC Enables or disables the debug console function DEBUGCONSOLE_CLEAR DCC Clears the contents of the DebugConsole window DEBUGCONSOLE_ECHOBACK DCEB Specifies enabling or disabling of local echo back for data transmitted to the microcomputer DEBUGCONSOLE_GETC DCGC Receives one character from the microcomputer DEBUGCONSOLE_GETLENGTH DCGL Acquires the number of characters received from the microcomputer in the receive buffer DEBUGCONSOLE_GETS DCGS Receives a character string from the microcomputer DEBUGCONSOLE_LASTERROR DCLE Acquires the states of execution for the most recent DCGC and DCGS commands DEBUGCONSOLE_LOG DCL Logging operations DEBUGCONSOLE_PORT DCP Sets a port as the destination for redirection DEBUGCONSOLE_PUTC DCPC Directly transmits the specified character string to the microcomputer DEBUGCONSOLE_PUTS DCPS Adds a line feed code to the end of the specified character string and transmits the result to the microcomputer DEBUGCONSOLE_TIMEOUT DCTO Looks up or sets the timeout period for reception TRAP_ADDRESS TP Sets a simulated I O addr
125. or occurred Correct the user program according to the error information errNum 100 The register description is incorrect 101 The specified data value is incorrect R20UT0445EJ0100 Rev 1 00 Page 112 of 136 Dec 24 2010 tENESAS RX Family Simulator Debugger V 1 02 Section6 Messages Table 6 2 Error Messages cont Message Contents Memory Access Error One of the following events occurred the information in parentheses shows the target Address H nnnnnnnn address for the operation that generated the error e A memory area that had not been allocated was accessed Data was written to a memory area having the write protected attribute e Data was read from a memory area having the read disabled attribute e A memory area in which memory does not exist was accessed Allocate memory change the memory attribute or correct the user program to prevent the memory from being accessed System Call Error Simulated I O error occurred Modify the incorrect contents of registers R1 R2 and parameter block The memory resource The memory resource was set outside the range of memory mapping Modify the memory has not been set up resource settings so that no error will occur R20UT0445EJ0100 Rev 1 00 Page 113 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section6 Messages R20UT0445EJ0100 Rev 1 00 Page 114 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Secti
126. or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not warrant th
127. ource dialog box Display Source 2 x Source File Tutorial c z Function Cancel Figure 3 35 Display Source Dialog Box The source file to be displayed in the Trace window can be selected in this dialog box After setting the conditions click on the OK button to display the source file in the Trace window with the first line of the selected function highlighted 3 7 10 Switching Timestamp Display The timestamp displayed in the Trace window can be switched to absolute time differential time or relative time In the initial state the timestamp is displayed in absolute time 1 Absolute time From the pop up menu choose Time gt Absolute Time or click the Absolute Time button amp in the toolbar 2 Differential time From the pop up menu choose Time gt Differences or click the Differences button gl in the toolbar 3 Relative time R20UT0445EJ0100 Rev 1 00 Page 59 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging From the pop up menu choose Time gt Relative Time or click the Relative Time button in the toolbar 3 7 11 Showing the History of Function Execution To show the history of function execution from the acquired trace information choose Function Execution History gt Function Execution History from the pop up menu or click the Function Execution History button Te in the toolbar An upper pane of the window will be displayed
128. p menu to remove the selected breakpoint To retain the breakpoint but not have it cause a break when its conditions are met use the Disable option see section 3 6 5 Disabling a Breakpoint R20UT0445EJ0100 Rev 1 00 Page 49 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 6 7 Deleting All Breakpoints Choose Delete All from the pop up menu to remove all breakpoints 3 6 8 Viewing the Source Line for a Breakpoint Select a breakpoint and choose Go to Source from the pop up menu to open the Source or Disassembly window at the address of the breakpoint The Go to Source menu is only available when one breakpoint is selected 3 6 9 Closing Input or Output File Select a breakpoint and choose Close File from the pop up menu to close the selected File Input or File Output data file and to reset the address to read the file 3 6 10 Closing All Input and Output Files Choose Close All Files from the pop up menu to close all File Input and File Output data files and to reset the address for reading the file 3 7 Viewing Trace Information The simulator debugger acquires the results of each instruction execution as trace information and displays it in the Trace window The conditions for the trace information acquisition can be specified in the Trace Acquisition dialog box 3 7 1 Opening the Trace Window To open the Trace window choose View gt Code gt Trace or
129. race 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 OS To display the relation of function calls in the Tree sheet of the Profile window acquire profile 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 entering 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 R20UT0445EJ0100 Rev 1 00 Page 64 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging Find Data Rigs Column E Find Next Address E ress a Cancel Find Data Maximum C Minimum Figure 3 41 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 then pressing 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 Minimum is specified is searched for e Clear Data Clears the number of times functions are called and the
130. receive error O Asynchronous mode Data length 7 or 8 bits O Transmission stop bit 1 or 2 bits O Parity Even odd or none O Receive error detection Parity overrun and framing errors O Break detection Clock source Internal clock O External clock or transfer rate clock input from TMR Clock synchronous mode Data length 8 bits O Receive error detection Overrun errors O Note O Supported Not supported 2 Control Registers Table 2 3 shows control registers of the SCI supported by the simulator debugger In access to control registers ensure that the unit of access is the same as the size of the register R20UT0445EJ0100 Rev 1 00 Page 8 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions Table 2 3 Control Registers of the SCI Supported by the Simulator Debugger Peripheral Channel Supported Control Register Support Module SCI O to 6 SMR BRR SCR TDR SSR RDR SCMR SEMR gt l gt lol lol lol gt Note O Supported A Partly supported bits for the function described in section 2 8 2 1 Supported Range The addresses of the control registers can be referred to or modified in the Peripheral Module Configuration dialog box Refer to section 3 4 Simulating Peripheral Functions for details on this dialog box 3 Input and Output of Data For the simulator debugger some pins are allocated to memory as virtual ports Programs being
131. rformance Analysis WindOW 0 cceceeceeeseesceescesecesecesecaecsaecaaecaeecaeseaeeeaeeeeeeeeeeeenseeeseenaees 69 3 9 2 Specifying a Target PUnCt On ai sss ssces coveectsscsasces cecaoces opbeecsscoagestectoct decavses cess EESE EESE SEEI EEIE E 69 3 9 3 Starting Performance Data ACQUISITION ee eeceeeesecesecesecaecacecseecseeeaeeeeeeeeeeeeesecsecaecsaecaesaeeeneeaeeees 70 3 9 4 Resetting Data asics ecacastc evs cesteescentncescoaineasadesndsctdacnse ced gaces dteesedesueenepsuewscu ante ieesins ages veues chsgucneceedan sateonsenses eenaeees 70 3 9 5 Deleting a Target F nctionsanaseseni cas nd E as hb A tebe eG onde whew aia 70 3 9 6 Deleting All Target Functions vcsiesdeccscessecsscegucscacassessscts cosusossoascedeacessetecesees seg vsstiogiessesdes saceectanessonensecuiettoseasers 70 3 9 7 Saving the Currently Displayed Contents 00 0 ee ee ceeceseceeecseeceeeeeeeeceeseeeseeesecaecsaecsaecsaecaeecaeesueseeseneeaeeeas 70 3 10 Measuring Code Coverage sssr rorarii nini En Er ENEE ce visuiceh EEE EEEE EE EErEE TARE EEEE EEE TE 71 3 10 1 Opening the Coverage WindOW s cs 0 sccscasssessetscaecnanebesbeencssnscssesssseseostenssonsenssuscensesesbensossnstinevetbesneasssesseuysees 71 3 10 2 Acquiring All Coverage Information 000 ee eeeeceeceeeeeeeeecesecesecesecaecsaecsaecaaecaeecaeseneseeeeeeseeeseeeenaeeaeenaee 73 3 10 3 Clearing All Coverage Information eee ceeceeeeeeeeeeeecesecesecesecaecsaeceaecaaecaeecaeeeaeseeeeseseeeeeaeseaeeeaeeeaee 73 3
132. ripheral function selected in Module It is not possible to change the register addresses Clicking the OK or Set button makes the settings effective Clicking the Cancel button closes this dialog box without storing the settings R20UT0445EJ0100 Rev 1 00 Page 33 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 4 3 Changing the Interrupt Source Information of Peripheral Functions The interrupt source information of peripheral functions can be changed in the Interrupt tab of the Peripheral Module Configuration dialog box To open this dialog box select a peripheral function in Peripheral Functions on the Peripheral Function Simulation tabbed page of the Set Simulator dialog box and then press the Detail button Peripheral Module Configuration Address Interrupt Interrupt Source Information Interrupt So Vector Num Priority Register CMIO 28 00087304 2 0 CM1 29 00087305 2 0 CM2 30 00087306 2 0 CMI3 31 00087307 2 0 Figure 3 12 Peripheral Module Configuration Dialog Box Interrupt Tab The following items can be displayed in this dialog box Interrupt Source Name of the interrupt source or sources supported by the peripheral function Vector Number Interrupt vector number Priority Register Address Address of the interrupt priority register and positions of bits in Bit Field Position the register To change the interrupt source information open t
133. rocomputer 50 DEBUGCONSOLE_PUTS DCPS Adds a line feed code to the end of the specified character string and transmits the result to the microcomputer 51 DEBUGCONSOLE_TIMEOUT DCTO Looks up or sets the timeout period for reception 52 DEFAULT_OBJECT_FORMAT DO Sets the default object program format 53 DISASSEMBLE DA Disassembles memory contents 54 ERASE ER Clears the Command Line window 55 EVALUATE EV Evaluates an expression 56 EXEC_MODE EM Sets and displays execution mode 57 EXEC_STOP_SET ESS Sets or displays the execution mode at the occurrence of an interrupt 58 FILE_LOAD FL Loads an object program file 59 FILE_LOAD_ALL LA Loads all object program files 60 FILE_SAVE FS Saves memory to a file 61 FILE_UNLOAD FU Unloads an object program file from memory 62 FILE_UNLOAD_ALL UA Unloads all object program files from memory 63 FILE_VERIFY FV Verifies file contents against memory 64 GENERATE_MAKE_FILE GM Generates a build makefile for the current workspace 65 GO GO Executes user program R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 107 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines Table 5 1 Simulator Debugger Commands cont No Command Name Abbr Function 66 GO_RESET GR Executes user program from reset vector 67 GO_TILL GT Executes user program until temporary breakpoin
134. rrors that is program errors that cannot be detected by the CPU exception generation functions The Simulator System dialog box specifies whether to stop or continue the simulation when such an error occurs Table 2 11 lists the error messages error causes and the action of the simulator debugger in the continuation mode Table 2 11 Simulation Errors Error Message Error Cause Processing in Continuation Mode Memory Access Error Access to a memory area that has not been On memory write nothing is written on ADDRESS H nnnnnnnn allocated memory read all bits are read as 1 Write to a memory area having the write protected attribute Read from a memory area having the read disable attribute Access to an area where memory data do not exist When a simulation error occurs in the stop mode the simulator debugger returns to the command input wait state after stopping instruction execution and displaying the error message Table 2 12 lists the states of the program counter PC at a simulation error stop Also after a stop due to a simulation error the contents of the PSW are not changed Table 2 12 Register States at Simulation Error Stop Error Message PC Value Memory Access Error e When an instruction is read The start address of the instruction that caused the error e When an instruction is executed The instruction address following the instruction that caused the error Use the following procedure when
135. s 23 FFFF9042 oid main void long a 10 long j int i FFFF9045 printf Data Input n FFFF9055 for i O i lt 10 i jf FFFF9061 j rand FFFF9064 if j lt 0j FFFF9071 j j FFFF9079 a i j FFFF9083 printf a sd sld n i a li FFFFSOB3 sort a FFFFSOB8 printf Sorting results n j FFFF90C8 for i O i lt 10 i FFFF90D4 printf a sd sld n i a li FFFF9104 change a FFFF910D oid sort long a long t int i j K gap Figure 7 3 Source Window Displaying the Source Program R20UT0445EJ0100 Rev 1 00 Page 118 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial 7 2 4 Setting a PC Breakpoint Breakpoints can be set easily via the Source window To set a breakpoint on a line that includes the sort function call e Place the cursor in the line that includes the sort function call and click the right mouse button to launch the pop up menu and select Toggle Breakpoint from the pop up menu Tutorial c Source Address S W Breakpoints FFFF9042 oid main void long a 10 long jJ int i FFFF9045 printf Data Input n FFFF9055 for i O i lt 10 i FFFF9061 j rand FFFF906a if j lt Oj FFFF9071 3 i FFFF9079 a i j FFFF9083 printf a da sld n i a i FFFF9053 sort a FFFF9058 printf Sorting results n FFFF90C8 fori
136. secoscergscdapines e E EE EER E E EREE RE 29 3 3 5 Set Memory Resource Dialog BOX eceeceesceseceseceseceecaeecseeeseseaeeeeeeeeeseesecaecsaecsaecaaecaeeeaaseneeeeeeaeseas 31 3 4 Sim lating Peripheral FUNCHODS s scsicisssesecssehessede cies setvecesensvsatoetisvendesdoveebesdavensscnevesoollesdesoceebecueviuteedeeniventeetersecensores 31 3 4 1 Registering Peripheral Function Simulation Modules eee eceeceesceeeceseceecsseceeceecaeesaeseeeseeeeeeeeereeaee 32 3 4 2 Changing the Addresses of Peripheral Functions 00 0 0 ccceceescessceseceeceaeceeecaeecaeecaeeeaeseeeeeeeeeeseeeeneenaeeaee 33 3 4 3 Changing the Interrupt Source Information of Peripheral Functions 200 0 ce eeceeeeeeeeeeeeeeeeeeeeseeeeeeseenaes 34 3 4 4 Memory Resources for Control Registers 0 0 0 eee eeeeeeeeeceseeeeeeeeeeeeeeseeesecsaecsaecsaesaeecaeesseseeeseneeneeeaeenaee 35 3 4 5 Viewing the Names of Connected Peripheral Functions 200 0 eseeseeeeceeeceeeeeeeeeeeeeeeeeeeseeesecaeceaecaesaeeeaeea 35 3 4 6 Input to and Output from Virtual Ports eee eeeeeeeeeeeeeecesecesecaecaecsaecsaecaaecaeseaecaeecaeseaeseaeeeseseaeenaee 36 3 5 Operations for Memory ceceni eoin oee aR EE eA EN E aE E EE EARE aE E RE EERS 40 3 5 1 Regularly Updating Contents of the Memory Window sseesseseesesrsseeesssrsreesreeresreeresrerreesrenresreeresrereeee 40 3 52 Viewing and Modifying the Settings for the I O Area oo ee ee eecesecesecese cee caeecaeeeneeeeeeeeeeeeseeeeeeeeereesaee 40 3 6 U
137. settings from a file 95 OSOBJECT_SETTING_SAVE OSS Saves OS object settings in a file 96 OSOBJECT_STOP_UPDATE OSU Changes the automatic update setting to Break 97 PORT_FILE_ADD PFA Adds a file for input or output through a virtual port 98 PORT_FILE_CLOSE PFC Closes a file for input or output through a virtual port 99 PORT_FILE_DELETE PFD Deletes the setting of a file for input or output through a virtual port 100 PORT_FILE_OPEN PFO Opens a file for input or output through a virtual port 101 PORT_FILE_STATUS PFS Shows the current state of a file for input or output through a virtual port 102 PROFILE PR Enables or disables the profile R20UT0445EJ0100 Rev 1 00 Dec 24 2010 Re Page 108 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines Table 5 1 Simulator Debugger Commands cont No Command Name Abbr Function 103 PROFILE_DISPLAY PD Displays profile information 104 PROFILE_SAVE PS Saves the profile information to file 105 QUIT QU Exits HEW 106 RADIX RA Sets default input radix 107 REFRESH_SESSION RSE Updates information on the session 108 REGISTER_DISPLAY RD Displays CPU register values 109 REGISTER_SET RS Changes CPU register contents 110 REMOVE_FILE REM Removes a file from the current project 111 RESET RE Resets CPU 112 RESPONSE RP Sets an interval to refresh the window 113 RUN_TEST RT Executes a test 114 SLEEP Delays command execution
138. sine e a E ies E AE EE E AE E eee 88 3 13 3 Creating a Label irronneen E E E A E AE ER a EE ESES 89 34134 Creating an LED fics nscnsiiiielien E E E Aes E E E R E E E E 91 3 13 5 Creating Fixed TeX terceira aar E OE e E EAE A EREE TEE E AE EREE EN EE E EEEE REEE SEE 93 3 13 6 Changing the Size and Position of an tem ee eee eeceeecesecesecneeceecaeecaeseeeeeaeeeeeeeeeeeeeseseaeseeeeseenaeenaees 94 3 13 7 Copying an Heminetier EA hanes E E Eea EEE EE ONE EER o a a E R aE SREE ES 94 3 13 8 Deleting an TL creere snc enosis aie orare onie eee EEEE EEEE EE EEEE EEEE EEEE EE EEE EEE E REEE ES 95 3 13 9 Showing the God s cieisciscied disse civ aa E E ETE N E EE EATE E 95 3 13 10 Saving I O Panel Informationen s c c cscs cescesocesecensesnesensesnedanssarsapnsessessnsecnssonsecpscansueesornsnsoenenbrasnsenssabodarsesstare 95 3 13 11 Loading I O Panel Information oo ecee cee ceeeeeeeeeeeeceseeeeeteeeeeeceeeesecsaecsaecsaecsaecaaecaeeeaeseeeseesseeeeaeeeaees 95 OCI ETE CON E sucauaceueeuteupatanuddeauceentosadsandesnsceaaserigacetes 97 Sections Command Lines sensisse ar E E AEE R 99 5 1 Commands Functional Order ccccccecssccecssssececssccecesssececsesaececseneeceeeeeecsesaececseeeeeseseeecseseeecseeeeesessueeecseaeeeeseeaees 99 5 1 1 E ec tioi enee E A E E E E E E E 99 5 1 2 WO WII OA EEE EE E E E E E E E E E E 99 5 1 3 Resister npin E E E A E AE E Spacer R 100 5 1 4 Memory sereen aerer cuties oles rae Mbledves inblcelgubilenslobeaNlinidea sasblans
139. sing the Simulator Debugger Breakpoints eee eecceeeceseceecesceseceseceaeceaecaaecaeecaeeeaeseaeesaeeeeseeecsaesaecaaeeneeeaes 40 3 6 1 Listing the Break poms ocseccssdetscsascesacelueessshissusecuesevavesesineesecesetendeesusedesstngonosates sce aeees chaguese lavdeeanteonseeuseeneteeees 40 3 6 2 Setting a Break point s ciscsseciedeseusvenesenccertdasseencosasuagedads E ENEE EEE E EE EE EE EAEE EREE ERE E TEENE EEEIEE 42 R20UT0445EJ0100 Rev 1 00 Page iii of vi Dec 08 2010 RENESAS 3 6 3 Modifying Breakpoints sccissssscgscssvees casts ei E E hanes Advent peated nd eG heel eeu pestis aes 49 3 6 4 Enabling a Breakpoint sairin cieo a sh sevsepstreshessteenseausekpes EE E RRI 49 3 6 5 Dis bling a Breakpoint rosenen nne E esas E E ee io E SN S 49 3 6 6 Deleting a Breakp int serseri a an E E EEE EE EEEE E EEE Ki 49 3 6 7 Deleting All Break points uc ccccscccetssssisivcssncesccswestdnasonsseh cunsedeseeesncondeetndeatons shodarsedscssucnsuonentbdvcdedbensdshedaysedssare 50 3 6 8 Viewing the Source Line for a Breakpoint 0 0 cece eee eeeeeeceeeceeeceseceaeceeeeecsaecsaecsaecaaecaeesaeeeeeseesesaeeaeenaee 50 3 6 9 Closing Input or Output Pile vic c ccs cs cseseasscsssecscspuseebe bans eabesbaseasesheasbenstenssoaseaiacnscensdenabanacvencuale EEEE Sa EEEE ESE 50 3 6 10 Closing All Input and Output Files 0 0 0 0 ss scsceesceutesssossensseveetesdevsenscnsvenssobeseessssstirsorssitsasenusassesdueneaeeseee 50 3 7 Viewing Trace Informatom sic
140. splays memory contents MEMORY_EDIT ME Modifies memory contents MEMORY_FILL MF Modifies the content of a memory area by specifying data MEMORY_FIND MI Finds a string in an area of memory MEMORY_MOVE MV Moves a block of memory MEMORY_TEST MT Tests a block of memory 5 1 5 Assemble Disassemble Command Name Abbreviation Function ASSEMBLE AS Assembles instructions into memory DISASSEMBLE DA Disassembles memory contents SYMBOL_ADD SA Defines a symbol SYMBOL_CLEAR SC Deletes a symbol SYMBOL_LOAD SL Loads a symbol information file SYMBOL_SAVE SS Saves a symbol information file SYMBOL_VIEW SV Displays symbols R20UT0445EJ0100 Rev 1 00 Dec 24 2010 RE Page 100 of 136 sLKENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines 5 1 6 Break Command Name Abbreviation Function BREAKPOINT BP Sets a breakpoint at an instruction address BREAK_ACCESS BA Specifies a memory range access as a break condition BREAK_CLEAR BC Deletes breakpoints BREAK_CYCLE BCY Specifies a cycle as a break condition BREAK_DATA BD Specifies a memory data value as a break condition BREAK_DATA_DIFFERENCE BDD Specifies a difference between two values of data in memory as a break condition BREAK_DATA_INVERSE BDI Specifies inversion of the sign of a value of data in memory as a break condition BREAK_DATA_RANGE BDR Specifies a range of
141. start Start Line Line number where repeated input starts 1 to 65535 Once When the end of the file is reached the input is ended Output mode Overwrite If an output file with the specified name already exists that file is overwritten Append If an output file with the specified name already exists output data are appended to the end of the file Each port can be allocated to one file for input and one file for output A single file can also be allocated to two or more input ports 3 Opening a File To open a file click on the line where the filename appears on the Port I O tabbed page and select Open from the popup menu 4 Opening All Files To open all files right click on the Port I O tabbed page and select Open All from the popup menu 5 Closing a File To close a file click on the line where the filename appears on the Port I O tabbed page and select Close from the popup menu 6 Closing All Files To close all files right click on the Port I O tabbed page and select Close All from the popup menu 7 Modifying File Setting Click on the line where the filename appears and select Edit from the popup menu or simply double click on the line to open the Set Port I O dialog box where the settings for the file can be modified 8 Deleting a File To delete a file click on the line where the filename appears on the Port I O tabbed page and select Delete from the popup menu
142. t 68 HALT HA Halts the user program 69 HELP HE Displays the command line help 70 INITIALIZE IN Initializes the debugging platform 71 LOG LO Controls command output logging 72 MAP_DISPLAY MA Displays memory resource settings 73 MAP_SET MS Allocates a memory area 74 MEMORY_COMPARE MC Compares memory contents 75 MEMORY_DISPLAY MD Displays memory contents 76 MEMORY_EDIT ME Modifies memory contents 77 MEMORY FILL MF Modifies the content of a memory area by specifying data 78 MEMORY FIND MI Finds a string in an area of memory 79 MEMORY_MOVE MV Moves a block of memory 80 MEMORY_TEST MT Tests a block of memory 81 OPEN_TEST_SUITE OTS Opens a test suite 82 OPEN_WORKSPACE OW Opens a workspace 83 OSOBJECT_ALL_ADD OAA Adds OS objects of a specific object type 84 OSOBJECT_ALL_DELETE OAD Deletes OS objects in a specific sheet 85 OSOBJECT_AUTO_UPDATE OAU Changes the automatic update setting to Auto and Break 86 OSOBJECT_DATA_LOWLINE ODL Moves an OS object to the next line 87 OSOBJECT_DATA_SAVE ODS Saves the information on an OS object to a file 88 OSOBJECT_DATA_UPLINE ODU Moves an OS object to the previous line 89 OSOBJECT_DISPLAY OD Shows the information on an OS object 90 OSOBJECT_NO_UPDATE ONU Changes the automatic update setting to Lock 91 OSOBJECT_ONE_ADD OOA Adds an OS object 92 OSOBJECT_ONE_DELETE OOD Deletes an OS object 93 OSOBJECT_ONE_EDIT OOE Edits an OS object 94 OSOBJECT_SETTING_LOAD OSL Loads OS object
143. t OO0001A6C lt FFFF9O8 FFFF9349 _ printf MOV L 0H R5 0035971 _printf FFFF9349 00 00 000 021 830 OPUI c MOV L 0H R5 R5 lt 00000000 FFFF934B PUSH L R5 0035970 FFFF934B 00 00 000 021 840 OPUI C PUSH L RS 00001468 lt 000000C FFFF934D ADD 08H RO R4 0035969 FFFF934D 00 00 000 021 850 OPUI ADD 08H RO R4 R4 lt 00001A70 off Figure 3 33 Trace Window Mixed Display Mode R20UT0445EJ0100 Rev 1 00 Page 56 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 7 5 Searching for Trace Information Use the Find dialog box to search for trace information To open it select Find gt Find from the pop up menu Ring erevIGus Figure 3 34 Find Dialog Box R20UT0445EJ0100 Rev 1 00 Page 57 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Select the conditions required for the search by checking the corresponding buttons in the Combination list Details of the condition can be specified under Find Item When several conditions have been chosen in the Combination list specify the details of the individual conditions The target of the search is the logical AND of the several conditions Item Contents Search Conditions PTR Pointer in the trace buffer Specified decimal value A range is specifiable Searching for values other than the specified value is selectable Address Instructio
144. t and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas
145. t up the display of green or red respectively in the LED area when the value 0x10 or 0x20 is written to address Ox3E0 Set LED Dialog x Address 3e0 7 gl Biet um G Positive Negative r Data Display Color1 fio Display Color2 20 Cancel Figure 3 72 Set LED Dialog Box Data Selection Clicking the Color 1 or Color 2 button opens the Color dialog box which allows you to select the color 3 13 5 Creating Fixed Text Click the button on the toolbar or choose Create Text from the pop up menu The mouse cursor turns into a symbol Create the text box by dragging the mouse cursor from a higher left to a lower right position GUI 1 0 new panel Figure 3 73 GUI I O Window Create Fixed Text R20UT0445EJ0100 Rev 1 00 Page 93 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging e Setting the format for the text Press the button on the toolbar and double click on the created text to open the Set Text dialog box Set Text Dialog x Text Text Font Font Name FixedSys Font Size 11 r Color a Cancel Figure 3 74 Set Text Dialog Box Click the Font button to select the font and size for the text Then click the Text and Back buttons to specify the colors of the text and its background 3 13 6 Changing the Size and Position of an Item Press the button on the toolbar and click on the item The
146. ta written to a register e BREAK SEQUENCE Break based on a specified execution sequence If Stop is specified as the action to take when a break condition is satisfied user program execution stops when the break condition is satisfied For details refer to section 3 6 Using the Simulator Debugger Breakpoints When a break condition is satisfied and user program execution stops the instruction at the breakpoint may or may not be executed before a break depending on the type of break as listed in table 2 10 Table 2 10 Processing When a Break Condition is Satisfied Command Instruction When a Break Condition is Satisfied BREAKPOINT Not executed BREAK_ACCESS Executed BREAK_CYCLE Executed BREAK_DATA Executed BREAK_DATA_DIFFERENCE Executed BREAK_DATA_INVERSE Executed BREAK_DATA_RANGE Executed BREAK_REGISTER Executed BREAK_SEQUENCE Not executed For BREAKPOINT and BREAK_SEQUENCE if a breakpoint is specified at an address that is not the beginning of an instruction the break will not be detected When a break condition is satisfied during user program execution a break condition satisfaction message is displayed in the Output window and the execution stops R20UT0445EJ0100 Rev 1 00 Page 16 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions Break Due to Error Detection during User Program Execution The simulator debugger detects simulation e
147. tamp Total instruction execution time hours minutes seconds milliseconds microseconds nanoseconds PSW Display the value of the processor status word PSW as a mnemonic Instruction Instruction mnemonic Interrupt Interrupt Interrupt if an interrupt is generated if not Access Data Data access information display format destination lt accessed data Note For string and multiply and accumulate instructions this is only the last data to have been accessed b Event Trigger Mode In this mode the Trace window shows a set of 512 records of data around an event that has been encountered To view data on another event select Trace Point gt Trace Point Previous or Trace Point gt Trace Point Next from the popup menu of the Trace window After the simulation stops the Trace window shows information on the oldest event R20UT0445EJ0100 Rev 1 00 Page 53 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Range 0000255 0000256 File Cycle 0000008 Address FFFF803E Time 00 00 00 000 021 310 No PTR Tabel Address Time Stamp Instruction Interrupt Access Data a 1 0000008 FFFF803E 00 00 00 000 a Q I S PUSH L R1 00001588 lt FFFF80 0000007 FFFF8040 00 00 00 000 OPUI PC lt FFFF8043 ISP 0000006 FFFF8043 00 00 00 000 i OPUI 0000005 FFFF8044 00 00 00 000 OPUI _main 0000148C lt FFFF80 0000004 _main FFFF9042 00 00 00 000
148. tered 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 gt When this symbol is used it is always located in the left hand margin It indicates that the The how to symbol text to its immediate right is describing how to do something For inquiries about the contents of this document or product email to your local distributor Renesas Tools Homepage _http www renesas com tools R20UT0445EJ0100 Rev 1 00 Page ii of vi Dec 08 2010 RENESAS Table of Contents Section COSI aacsausdanasetoaasheavaiehapeseaneiscrtuneces vases EA EE EE E ETE AT EGAS 1 Section 2 Simulator Debugger Functions sssesessssesssesseessereseessetesstesstessessseeesssetssresseesseessseeesseessets 3 2 1 FeatUre Sys ea ea e E EE A E E E E E A E A E RE EEES ES 3 22 Target User Pro gran si cssccvescsassvens sensveies sssvencopesheousessieesdeustauadasscesoaescbanedeasvuntapnsvarebasbesncosasiedednnereavacivedesbebucnsusuenisosssbns 4 2 3 RAD BG seirena EEEE E EEEE E EEEE EAEEREN REEE E EERE 4 24 Memory Management siider erer erec Er Senduteessesternvens deascuscebedenselocevensesssunibdeceesedayedesbhducovaclevashivapenstebeseusbistsonseeas 5 2 5 Instruiction Exectition Reset Processing css senesetessncosassvasecevevescesanvenntenrvsntosnsecevstevsnsustesesensnsstebsavsssesveveegessoviecenede 5 2 6 Exceptio
149. the button of the toolbar or choose Create Label from the pop up menu The mouse cursor turns into a symbol Drag the mouse cursor from a higher left to a lower right position This shows the frame for the label GUI 1 0 new panel Figure 3 67 GUI I O Window Create Label R20UT0445EJ0100 Rev 1 00 Page 89 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Press the button on the toolbar or choose Select Item from the pop up menu and double click on the created label to open the Set Label dialog box Specify the responses to events The label name must not include white space e Response to writing of either value to a selected bit The settings shown below set up display of the character string Printing in progress or Printer ready when the value of bit 3 at address 0x3E0 is 0 or 1 respectively Set Label Dialog Ed Address 2E0 7 al Namel Printing in progress Name2 Printer ready r Logic Positive C Negative Data Display eriel Display hanez cmo Figure 3 68 Set Label Dialog Box Bit Selection e Response to writing of specified values to a selected address The settings shown below set up display of the character string Printing in progress or Printer ready when the value 0x10 or 0x20 respectively is written to address 0x3E0 R20UT0445EJ0100 Rev 1 00 Page 90 of 136 Dec 24 2010 RENESAS RX Family Simula
150. the Set Peripheral Function Simulation dialog box that opens when the session is changed check Don t show this dialog box and then press the OK button Since this section explains the debugging function Demonstration has not been optimized Do not change this setting 7 2 Settings for Debugging 7 2 1 Allocating the Memory Resource The allocation of the memory resource is necessary to run the application being developed When using the demonstration project the memory resource is allocated automatically so check the setting e Select Simulator gt Memory Resource from the Setup menu and display the allocation of the current memory resource R20UT0445EJ0100 Rev 1 00 Page 115 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 7 Tutorial Simulator System System Memory Memory Map oy Ka al Memory Resource a gt A Begin End Type Size Read write Begin End Attribute 00000000 0001FFFF 00000000 00007FFF Read w 00080000 OOOFFFFF FFFF8000 FFFFFFFF_ Read w 00100000 OO107FFF 0O7F8000 007F9FFF OO7FCO00 007FC4FF OO7FFCOO 0O7FFFFF O0EO0000 OOFFFFFF FEFFEOOO FEFFFFFF FF7FCOOO FF7FFFFF FFEOOO00 FFFFFFFF _ 1 1 1 1 1 1 1 1 1 Figure 7 1 Simulator System Dialog Box Memory Page The ranges of addresses from H FFFF8000 to H FFFFFFFF and H 00000000 to H 00007FFF are secured as readable and writable areas for storage of the program and data
151. to the DebugConsole window Erase Clears all data in the DebugConsole window DebugConsole Toggles the debug console on and off Redirect Port Setting Opens the Redirect Port Setting dialog box in which you can select a COM port to which standard input and output will be redirected Specify the following values COM_PORT COM port to which standard input and output will be redirected BAUDRATE Baud rate for communications via the COM port Standard input and output by the user program will be redirected via the debug console to the selected COM port Set Log File Opens the Open Log File dialog box in which you can select a log file Logging Toggles logging on or off Local Echo Back Toggles local echo back on and off Standard input to and output from the DebugConsole window will be locally echoed back Toolbar display Shows or hides the toolbar Customize toolbar Used to customize toolbar buttons Allow Docking Docks the window Hide Hides the window R20UT0445EJ0100 Rev 1 00 Page 84 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging 3 12 3 I O Functions Table 3 2 lists the supported I O functions Table 3 2 I O Functions No Function Code Function Name Description 1 H 21 GETC Inputs one byte from the standard input 2 H 22 PUTC Outputs one byte to the standard output 3 H 23 GETS Inputs one line from the st
152. tor Debugger V 1 02 Section 3 Debugging Set Label Dialog Ed Address 3e0 x Bl Bitton Name Printing in progress Name2 Printer ready Lagic e Positive Negative Data Display Namet fio Display Name2 20 Figure 3 69 Set Label Dialog Box Data Selection 3 13 4 Creating an LED Click on the amp button on the toolbar or choose Create LED from the pop up menu The mouse cursor turns into a symbol Drag the mouse cursor from a higher left to a lower right position This shows the frame for the LED output GUI 1 0 new panel Figure 3 70 GUI I O Window Create LED Press the button on the toolbar or choose Select Item from the pop up menu and double click on the created LED to open the Set LED dialog box Specify the events and responses R20UT0445EJ0100 Rev 1 00 Page 91 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging e Response to writing of either value to a selected bit The settings shown below set up the display of green or red respectively in the LED area when the value of bit 2 at address 0x3E0 is 0 or 1 Set LED Dialog Wata Dispapleoianiik Display lealGrT eZ Figure 3 71 Set LED Dialog Box Bit Selection R20UT0445EJ0100 Rev 1 00 Page 92 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging e Response to writing of specified values to a selected address The settings shown below se
153. transfers data in data to RSR RSR to RDR RDR register Received data Note RxD SB is not used in clock synchronous mode Figure 2 1 Reception of Data in the Simulator Debugger TDR register Transmit data TSR register Transmit data l I Time taken for transmission of one frame ld gt TxD SB virtual port I I Writing to TDR causes the SCI When the data transfer is to transfer the data to TxD Dn completed the SCI sets and set TxD SB to 0 TxD SB to 1 Note The time taken for transmission of one frame differs with the selected mode Asynchronous mode Time taken for transmission of one bit x start bit data size 7 8 parity bit 0 1 stop bit 1 2 Clock synchronous mode Time taken for transmission of one bit x data size 8 Figure 2 2 Transmission of Data in the Simulator Debugger The simulator debugger allows input to and output from files through virtual ports For details refer to section 3 4 6 Input to and Output from Files through Virtual Ports R20UT0445EJ0100 Rev 1 00 Page 11 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 2 Simulator Debugger Functions 2 8 3 Interrupt Controller 1 Supported Range The RX600 series simulator debugger supports the interrupt controller unit ICU that is related to the CMT and SCI The RX200 series simulator debugger supports the ICU that is related to the CMT The ICU can convey interrupts to the CPU but
154. ual Cancel Data H0000 I Data mask H FFFFFFFF Size Word Figure 3 20 Set Break Register Condition Dialog Box Up to 1024 register break conditions can be specified Register Register name for which the break condition is specified Option Match or mismatch with the data Data Data value used in the break condition if no data is input here a break will occur whenever data is written to the register Data mask Mask condition specifying 0 for a bit masks the bit Size Data size Notes 1 For string and multiply and accumulate instructions only the last register access operation is checked for register break conditions 2 Checking of registers when stack pointer registers are specified as break registers is as shown below Register Specification Accessed Register ISP USP RO Checked Checked ISP Checked Not Checked USP Not Checked Checked R20UT0445EJ0100 Rev 1 00 Page 44 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging e Break Sequence Set Break Sequence Condition 2 x Address1 Address2 Address3 Address4 Address5 Address6 Address Address8 Figure 3 21 Set Break Sequence Condition Dialog Box Only one sequential break condition can be specified Address1 to Address8 Addresses that must be passed as conditions to generate the break not all of the eight breakpoints have to be set Break Cycle Set
155. uisition Condition All Trace information is acquired until execution of the program is stopped Event Trigger A total of 512 records of trace data i e 255 records before the event the event point itself and 256 records after the event are acquired every time the trigger event is encountered Point Trace The line of trace data for which an event condition is satisfied is acquired every time the trigger event occurs R20UT0445EJ0100 Rev 1 00 Page 51 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging Trace Event Shows information on the events to start tracing The following items are displayed Type Event type Condition Condition Events of the type selected for Type with the checkbox selected are valid Add Opens a dialog box in which events can be added Delete Deletes the selected event Delete All Deletes all events Enable All Enables all events Disable All Disables all events Modifying a setting in the Trace Acquisition dialog box clears the trace information Clicking the OK button stores the settings Clicking the Cancel button closes this dialog box without modifying the settings 3 7 3 Setting Events for Tracing Break conditions are utilized as events for tracing When a specified event occurs the acquired trace information is the trace data from around the event point or the line of trace data for which the event condition was satisfied Such events
156. unctions that are frequently called Setting such functions as inline may reduce the overhead of function calls 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 Sorting by the number of calls or accesses makes it easy to identify the frequently called functions and frequently accessed global variables Measurement of a variety of CPU specific data is also available as follows e Cycle the number of cycles execution requires e Ext_mem the number of external memory accesses e I O_area the number of internal I O area accesses e Int_mem the number of internal memory accesses The number of cycles is calculated by subtracting the number of cycles until the specified function is called from the number of cycles when the return instruction for the function is called Note A string or multiply and accumulate instruction is treated as accessing data only once i e the last data access operation R20UT0445EJ0100 Rev 1 00 Page 67 of 136 Dec 24 2010 ztENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging 3 8 10 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 aft
157. unssspsssasenseosnsvinesonbebescevsctrsoneseressesstanssebbenssseesenysir gt 76 3 10 15 Displaying the Coverage Information in the Editor Window cece eee eseceeeeeeeeeeeeeeeeeeeeeeeeeeeenaeeaee 77 3 10 16 Displaying the Coverage Information in the Disassembly WindOw 0 ec eeceeseeeeeeeeeeeeeeeeeeeeseeeaeeneees 78 R20UT0445EJ0100 Rev 1 00 Page iv of vi Dec 08 2010 RENESAS 3 11 Generating a Pseudo Interrupt Manually 00 eeceeecesecesecesecaecsaecaaecaeeeaaseaeseaeeeeeeesseesaesaecnaecsaeeaaeeaeeeaes 79 3 11 1 THs BSL WiINdOW psc scchcnsceetadsigesvecscned ces acepechenc ser baneveesoase ak nase ope E E E E E E 79 3 11 2 IGUI VOJ Window iisen anaa a EENE ee i eee heed eee 81 3 12 Standard V O and File VO Processing c ccccccce cscs cotaveescunsessscuavtveecuceevbecusvsunecusvocbentesscvsnsobecouieusvanscabvechoobentvescpeties 83 3 12 1 Opening the DebugConsole Window 0 cceseesceceeseeeseeeeeeeeceeecesecnseceaecsaecnaecaaecaeecaeseaeeaeecaeseaeseneeneeeaeenaee 83 3 12 2 Popup Men OPtONS sericese tee edb abe odes saagel sca E dsb EE E EE EEN E a a ea 84 3 12 3 WO FUDCHONS A E Seqazhea dhensnebssoaseaiscnscesddenatheaota dhenstens sasanseeesedsenys 85 3 13 Creating a Virt al I O Panel erensia ririn eee arinen aE n EE EEEE EEE EEEE E E E EE 87 3 13 1 Opening the GUI 10 Window a scc c scisccesscescashbedscoesstenconnsedsesvasedacevanncnsvunsySeecbededsderesndoessbicdsdsenssasnshesedstees 87 3 13 2 Creating a Button mer
158. uring the profile R20UT0445EJ0100 Rev 1 00 Page 60 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 3 Debugging data However this feature is not available when Setting gt Only Executed Functions is checked in the pop up menu of the Profile window When the HEW does not read any stack information files only the data on the functions executed during measurement will be displayed by the profile function To make the linkage editor create a stack information file choose Build gt RX600 Standard Toolchain and select Other from the Category list box and check the Stack information output box in the Link Library sheet of the Standard Toolchain dialog box Configuration C C Assembly Link Library Standard Library CPU al gt SimDebug_RX600 7 Category Other j smm Miscellaneous options S C source fie C source file Stack information output C Assembly source file Compress debug information E Linkage symbol file Low memory use during linkage Displays total section size x User defined options Absolute R elocatable Library a A Options Link Library noprelink rom D R D_1 R_1 D_2 F_2 nomessage list CONFIGDIR PROJECTNAME map nooptimize start B_1 R_1 B_2 R_2 B 7 SU_S1 01000 PResetPRG 0 gt Figure 3 37 Standard Toolchain Dialog Box 1 R20UT0445EJ0100 Rev 1 00 Page 61 of 136
159. used to modify the location to start the simulated I O and execution mode Choose Setup gt Simulator gt System or click the Simulator System toolbar button tt to open the System tab in this dialog box Simulator System System Memory CPU Rx600 fes Bit size Simulated 1 0 Address IV Enable p32 H o0000000 7 Bl Endian Execution Mode Little Endian Stop Detail Interrupt Priority Level Response 07 Disable MYTIPL instruction o 40000 I Cache the results of decoding instructions and accelerate simulation Cancel Apply Figure 3 5 Simulator System Dialog Box System Tab R20UT0445EJ0100 Rev 1 00 Page 25 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging The following items can be specified in this dialog box CPU The current CPU Bit Size Size of the address space as the number of bits in addresses Endian Endian of the CPU Priority Level of Interrupts Priority levels of interrupts and whether the MVTIPL instruction is enabled or disabled 0 to 7 Disable MVTIPL instruction Available priority levels for interrupts are from 0 to 7 0 to 15 Enable MVTIPL instruction Available priority levels for interrupts are from 0 to 15 Simulated I O Address Specifies the start address of a simulated I O that performs standard input output or file input output processing from the user program Enable Checking this box enables th
160. utton Memory Resource is the same setting information as that of Memory Resource of the Debugger sheet in the RX Standard Toolchain dialog box Modifications are reflected on both items Memory Map can be reset to the default value by the E button Clicking the OK or Apply button stores the modified settings Clicking the Cancel button closes this dialog box without modifying the settings When there is a linkage list file map output by the optimizing linkage editor the memory resource can be automatically allocated according to the memory map and linkage map information For details refer to Automatically Allocating the Memory Resource in the High performance Embedded Workshop User s Manual 3 3 4 Set Memory Map Dialog Box The Set Memory Map dialog box specifies the memory map of the target CPU The contents displayed in this dialog box depend on the target CPU The values are used in simulation of memory access by the simulator debugger Set Memory Map Memory type n a Cancel Begin address H o0000000 7 End address pre da Data bus size 32 Read state count Write state count SS Endian Little Hi Figure 3 8 Set Memory Map Dialog Box R20UT0445EJ0100 Rev 1 00 Page 29 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section3 Debugging The following items are specified Memory type Memory type ROM Internal ROM RAM Internal
161. w 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 callees of the function on the right The numbers of times the function calls the functions or is called by the functions are also displayed in this window Profile Chart freopen _fflush Figure 3 42 Profile Chart Window Right clicking the mouse within the window displays a pop up menu Supported menu options are as follows e View Source Displays the source program or disassembled memory contents for the address of the function on which the cursor is placed when the right hand mouse button is clicked If the cursor is not placed on a function when the right hand mouse button is clicked this menu option remains gray e View Profile Chart Displays the Profile Chart window for the specific function on which the cursor is placed when the right hand mouse button is clicked If the cursor is not placed on a function when the right hand mouse button is clicked this menu option remains gray e Enable Profiler Toggles acquisition of profile data When profile data acquisition is enabled a check mark is shown to the left of the menu text e Clear Data Clears the number of times functions are called Data in the List and Tree sheets of the Profile window are also cleared e Multiple View If a further Profile Chart window is opene
162. y range access as a break condition 11 BREAK_CLEAR BC Deletes breakpoints 12 BREAK_CYCLE BCY Specifies a cycle as a break condition 13 BREAK_DATA BD Specifies a memory data value as a break condition 14 BREAK_DATA_ BDD Specifies a difference between two values of data in memory as a DIFFERENCE break condition 15 BREAK_DATA_ BDI Specifies inversion of the sign of a value of data in memory as a break INVERSE condition 16 BREAK_DATA_RANGE BDR Specifies a range of values in memory as a break condition 17 BREAK_DISPLAY BI Displays a list of breakpoints 18 BREAK_ENABLE BE Enables or disables a breakpoint 19 BREAK_REGISTER BR Specifies a register data as a break condition 20 BREAK_SEQUENCE BS Sets sequential breakpoints 21 BUILD BU Performs a build on the current project 22 BUILD_ALL BL Performs a build all on the current project 23 BUILD_FILE BF Compiles files 24 BUILD _MULTIPLE BM Builds multiple projects 25 CACHE Sets caching on or off 26 CHANGE_CONFIGURATION CC Sets the current configuration 27 CHANGE_PROJECT CP Sets the current project 28 CHANGE_SESSION CS Changes the current session 29 CHANGE_SUB_SESSION CB Changes the currently active session when simultaneous debugging is enabled 30 CLEAN CL Deletes intermediate and output files produced in building R20UT0445EJ0100 Rev 1 00 Page 106 of 136 Dec 24 2010 RENESAS RX Family Simulator Debugger V 1 02 Section 5 Command Lines

Download Pdf Manuals

image

Related Search

Related Contents

Uniden FRS440 Two-Way Radio User Manual    Mode d`emploi  Metra 99-6504 car kit  Philips HDC-TM20 Camcorder User Manual  Ubiquiti Networks TC-CARRIER networking cable  Collect & Send 1 1. Enlèvement des envois affranchis (Collect  Zebra Technologies 2 Printer User Manual  freecomm 600 Set DE/EN  

Copyright © All rights reserved.
Failed to retrieve file