Home
740 Simulator Debugger V.1.02 User`s Manual
Contents
1. Operator Meaning Priority O Parentheses Level 1 RES Unary plus unary minus unary bit logic Level 2 Fol Binary multiplication binary division Level 3 RS Binary addition binary subtraction Level 4 gt gt Shift right shift left Level 5 lt lt gt gt Binary comparison Level 6 Binary comparison Level 7 amp Binary logical AND Level 8 A Binary exclusive OR Level 9 Binary logical OR Level 10 amp amp Logical AND Level 11 Logical OR Level 12 9 3 7 isfetch isint Hisread iswrite These statements are used in conditional expressions of I O script statements and if and while statements 9 3 7 1 isfetch expression Format isfetch address Function The value of the expression becomes true 1 when the program s PC value goes to a specified address Otherwise the expression is false 0 For example the if statement below if isfetch 0xfc000 becomes true 1 when the program s address PC value becomes Oxfc000 9 3 7 2 isint expression Format isint vector number Function The value of the expression becomes true 1 immediately after a virtual interrupt of a specified vector number is generated Otherwise the expression is false 0 For example the if statement below if isint 13 becomes true 1 if a virtual interrupt of vector number 13 had occurred immediately before the if statement was evaluated 264 91 0 Script
2. Item Contents ID ID No of cycle handler Name Name of cycle handler Cycphs The activation phase by the millisecond Cyctim The activation cycle time by the millisecond Tmout The amount of time by the millisecond remaining before the cyclic handler s next activation time Status Activity status of cycle start handler e The following are displayed in the Status area TCYC_STA TCYC_STP Cycle handler is in an operational state Cycle handler is in a non operational state 213 6 14 10 Display the Alarm Handler Status In the MR window select Popup Menu Mode gt Alarm Handler MR Fi wi Onega OSUD A o a a S Remain Handler Now System Clock Count 0000H 0000H 018AH ID Stazddr name AlarmTime OF1C68H alarm 0000H OOOOH OF1C70H alarm 6 O000H 1000H OF1C66H alarml OOOOH ABCDH OF1C72H alarm OOODH OO13H OF1C6AH alarm3 OOCDH OOO3H OF1C6CH alarm OOcDH 00039 OFIC6EH alarmd OOCDH OAAS3H When the realtime OS is MRxx conformed to uITRON specifications V 3 0 the following data is displayed in the status bar Remain Handler Now System Clock Count OOOOH 0000H 0184H 6 14 10 1 Display the Alarm Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Of all the cycle start handlers defined in the configuration only those which are not started yet at present are listed i
3. Command Name Short Name Contents Assemble A Line by line assembly DisAssemble DA Disassembles memory contents line by line Module MOD Displays modules names Scope Sets and checks the effective local symbol scope Section SEC Checks section information Bit Checks and sets bit symbols Symbol SYM Checks assembler symbols Label Checks assembler labels Express EXP Displays an assembler expression 7 1 6 Software Break Setting Commands Command Name Short Name Contents SoftwareBreak SB Sets and checks software breaks SoftwareBreakClear SBC Clears software breaks SoftwareBreakClearAll SBCA Clears all software breaks SoftwareBreakDisable SBD Disables software breakpoints SoftwareBreakDisableAll SBDA Disables all software breaks SoftwareBreak Enable SBE Enables software breakpoints SoftwareBreakEnableAll Enables all software breaks BreakAt SBEA Sets a software breakpoint by specifying a line No BreakIn Sets a software breakpoint by specifying a function 7 1 7 Hardware Break Setting Commands Command Name Short Name Contents HardwareBreak HB Sets and checks a hardware break HardwareBreakClear HBC Clears hardware breaks HardwareBreakClearAll HBCA Clears all hardware breaks BreakMode BM Sets and checks hardware break mode 7 1 8 Real time Trace Commands Command Name Short Name Contents TracePoint TP Sets and checks
4. 174 6Windows Dialogs 6 10 8 2 Writing Reading a Specified Bit Symbol Set as below Example Writing 1 to bit symbol bitsym Al Set Event Status BIT SYMBOL l 175 6 10 9 Specify the Events Interrupt To specify an interrupt event change Event Type in the event select dialog box to INTERRUPT When an interrupt is generated or finished the event is established 6 10 9 1 Interrupt Occurrence Set as below AT Set Event Status INTERRUPT y 176 6Windows Dialogs 6 10 9 2 Interrupt Termination Set as below T Set Event Status 177 6 10 10 Specify the Event Combination Condition Use the Combination group of the event setting windows to specify the combinatorial conditions of events The combination of two or more events can be used One of the following combinatorial conditions can be selected AND All of the specified events are established AND Same Time The specified events are established at the same time OR One of the specified events is established STATE TRANSITION Established upon entering a break state in the state transition diagram Pass counts number of times passed can be specified for each event 1 255 If the specified combinatorial condition is AND Same Time no pass counts can be set fixed to 1 6 10 10 1 Select AND OR Change the Combination group to AND to specify AND for the combinatorial cond
5. 6Windows Dialogs 6 14 5 2 Display the Event Flag Status When the realtime OS is MRxx conformed to ulTRON specifications V 4 0 All the event flags defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of event flag Flgatr Attribute of each event flag Flgptn Bit pattern of each event flag Flag Queue Task ID Nos and task names in the event flag queue e The following are displayed in the Flgatr area TA TFIFO Task wait queue is in FIFO order TA TPRI Task wait queue is in task priority order TA WSGL Only one task is allowed to be in the waiting state for the eventflag TA WMUL Multiple tasks are allowed to be in the waiting state for the eventflag TA CLR Eventflag s bit pattern is cleared when a task is released from the waiting state for that eventflag e When a task connected to the event flag queue is in the state of waiting with timeout enabled waiting in twai flg a string Itmol which indicates a state of waiting with timeout enabled is appended to a string displayed in the Flag Queue field When a task connected to the event flag queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the Flag Queue field Normal Displa
6. dbsctc lowsre c E resetprg c sbrk c E lowsrc h sbrk h stackscth 24 000b28 30 000b30 32 000b38 34 000b44 35 000b4c void main void void sort long ta void change long ta extern void srand unsigned int void main void long a 10 min max long j int srand 1 printf fit Data Input ftit n fort i 0 i lt 10 i j rand se Tutoriale Select the Format Views option from the Setup menu to set a font and size that are legible if necessary Initially the Editor Source window shows the start of the user program but the user can use the scroll bar to scroll through the user program and look at the other statements 67 5 2 4 Step4 Setting a Breakpoint software breakpoint is a basic debugging function The Editor Source window provides a very simple way of setting a software breakpoint at any point in a program 5 2 4 1 Setting a Software Breakpoint For example to set a software breakpoint at the sort function call Double click the S W breakpoints column on the line containing the sort function call s tutorial c init sam for 0 i lt 10 i I j rand ifj lt 0 I Jaj ali j sort a change a sam s0 a 0 sam s1 a 1 sam s2 a 2 sam s3 a 3 sam s4 a 4 sam s5 a 5 sam s6 a 6 sam s7 a 7 sam s8 a 8 sam s9 a 9
7. Create Label Create a new label item Create LED Create a new LED item Create Text Create a new text item Display grid Display the grid line Save Save I O panel file Load Load I O panel file Sampling Period Set RAM monitor sampling period Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 194 6Windows Dialogs 6 14 MR Window Use the MR Window to display the status of the realtime OS The debugger for R32C doesn t support this function The debugger for 740 doesn t support this function You can only use the MR Window when you have downloaded a program that uses the realtime OS Gf the downloaded program does not use the MR nothing is displayed in the MR Window when it is opened MR xj w OP AmUGHO lt ORE Current Run Task 1 main ID Stazddr name Pri Status wup count timeout flg ptn flg mode OF17F8H main 1 RUN 0000H OF1A68H task2 2 RDY 0000H OF1A76H task3 SUS 0000H DF1A84H task4 WAI SLP 0000H DF1A9AH _task5 WAI SLP 5US 00008 DF1ABOH task6 WAT DLY 0000H OF1ACAH task WAI DLY SUS 0000H OF1AE4H tasks WAI FLG 00008 1111H TWE_ORW OF1BOZH task9 WAI FLG SUS 0000H 1111H TWF ORW Fa gt 1 2 3 4 5 6 7 8 9 i e You can open the MR window as many as the number o
8. 159 6 10 7 2 Memory Access The debugger for M32C 6 10 72 1 Writing Reading a Specified Address Set as below Example Writing to even address 400h Event Type DATA ACCESS x Address Data Setting Ranee addr Address gt Address1 400 Jal Address2 000000 v Al Function Source File v Function 7 ACCESS WRITE ADDRESS 000400 GONDITION addr 000400 omei Al Set Event Status Event Type DATA ACCESS x Address Data Setting Ranee Not Specify v Data 1 pooo Data 2 food Access WRITE v IT Mask 0000 ACCESS WRITE ADDRESS 000400 CONDITION faddr 000400 cance 160 6Windows Dialogs Example Writing byte length data 32h to even address 400h AT Set Event Status DATA ACCESS addr Address1 po0400 l Ga l ar Al Set Event Status DATA ACCESS data Datal Re gt po oo we A 161 Example Writing byte length data 32h to odd address 401h l Set Event Status DATA ACCESS oot a d Al Set Event Status DATA ACCESS vi 2 po ooo WRITE A ov 162 6Windows Dialogs Example Writing word length data 1234h to even address 400h Al Set Event Status DATA ACCESS addr Address1 Al Set Event Status DATA ACCESS vi Fa wees 163 Example Writing data 10h 3Fh to even ad
9. ER Range 32511 TD hv Be Fie Dye oden OT ins GFDL Cycle Obj code Laber hrm s ms us a 18960 0F0199 730BFO RO 10H FB 00 00 00 054 427 18957 OFO19C CS1BFD 1H 3H FB 00 00 00 054 427 18953 OFO19F FEC1 FO161H 00 00 00 054 427 18948 OFO161 778BFDOA00 OOO0AH 3H FB 00 00 00 054 428 18943 OFO166 7DCA39 FOIA1H 00 00 00 054 428 18936 OFO1A1 7DF2 00 00 00 054 428 18929 0F0087 F50600 randam FOOSEH 00 00 00 054 429 18920 OFOOSE 7CF204 randam access 04H 00 00 00 054 429 16916 OF0091 FDD40BOF rand FOBD4H 00 00 00 054 430 mi 18906 OFOBD4 7SCO6D4E _rand 4E6DH RO 00 00 00 054 430 18904 OFOBDS 75C2C641 41C6H R2 00 00 00 054 430 18902 OFOBDC 754F4004 0440H 00 00 00 054 430 18898 OFOBEO 7S4F3E04 043EH 00 00 00 054 431 18893 OFOBE4 FEO1 FOBE6H 00 00 00 054 431 18889 OFOBE6 FD1COCOF i4mull FOC1CH 00 00 00 054 431 18879 oFocic EC50 R1 R3 00 00 00 054 432 18875 OFOC1E 75B107 7H SP R1 00 00 00 054 432 18870 orocz1 7121 R2 R1 00 00 00 054 432 18865 orocz3 7312 R1 R2 00 00 00 054 433 18863 orocz5 75B109 SH SP R1 00 00 00 054 433 18859 oroc28 7101 RO R1 00 00 00 054 433 18854 OFOC2A A112 R1 R2 00 00 00 054 433 TH E 2 2 3 4 1 Address display area Shows addresses corresponding to instructions Double click here to bring up a dialog box to search for addresses 2 Object code display area Shows the object codes of instructions 3 Label display area Shows labels c
10. H i 2 task002 12 00700 00 012 067 00700 00 006 915 00700 00 011 552 00700 00 138 630 8 84 m 3 task003 12 00700 00 012 597 00700 00 006 892 00700 00 012 111 00 00 00 145 332 3 27 m H i 4 task004j 12 00 00 00 012 170 00700 00 006 505 00700 00 011 604 00700 00 139 252 8 65 mm 5 I task005j 12 00700 00 012 277 00700 00 006 577 00700 00 011 795 00700 00 141 540 3 02 H H 6 task006 11 00700 00 013 435 00700 00 006 490 00700 00 012 353 00 00 00 135 885 6 66 m H H 7 task007 11 00 00 00 013 020 00700 00 006 790 00700 00 012 431 00700 00 136 745 8 72 H 8 task008 11 00700 00 014 080 00700 00 008 055 00700 00 013 232 00700 00 145 552 9 28 9 task009 11 00700 00 013 642 00700 00 007 277 00700 00 012 663 00700 00 139 295 6 68 m H i 10 task0l0j 11 00700 00 013 710 00700 00 008 070 00700 00 795 00 00 00 140 752 8 97 m 11 taskOllj 11 00700 00 011 892 00700 00 006 290 00700 00 193 00700 00 123 132 7 85 m H i 222 Unknown 0 00700 00 000 000 00700 00 000 000 00700 00 000 00700 00 000 000 0 00 H The displayed data is the statistical results of the range specified by the start marker and the end marker in the Task Trace window By clicking the maximum ready time minimum ready time display field of each line you can search the processing h
11. Note Because the simulator s execution time measurement is calculated using the number of cycles described above it includes some error when compared with the actual chip s execution time e WAIT Executed as an NOP instruction Other instructions operate the same as those of the actual MCU e INT INTO UND BRK As with the actual MCU these instructions generate interrupts The INTO instruction only generates an interrupt when the O flag is 1 2 3 2 Resetting e The SFR area is nonexistent in the debugger so the initialization as in the actual chip is not performed e The cycle count is initialized to 0 Resetting is performed in the same way as the actual MCU A reset is also performed when the debugger starts The value 000F000016 is set in the reset vector immediately after starting The program counter is therefore set to F000016 immediately after the debugger starts 27 2 3 3 Memory Memory Space There is no processor mode If mapped for memory the whole 1MB of memory from 00000h to FFFFFh can be read from and written to as RAM Note however that in the initial state memory between 10000h and EFFFFh is not secured and an error will result if an attempt is made to access this part of memory If this occurs while a program is running the program will stop with an illegal memory access error Use the map function described later to map this part of memory Memory Structure and Initial Values Immediately after Sta
12. At assemble e c option outputs debugging information concerned with source line to a relocatable file Note When the directive comand FUNC is specified to a function in a source file if c option is used the name of the function will be not available Please do not use the option to make the name available e s option outputs local labels local equ symbols and local bequ symbols to a relocatable file At link e s option generates a symbol file In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 6 2 1 Command Execution Examples The following shows examples of entering commands depending on the product e The Debugger for 740 gt sra74 c s main a74 lt Enter gt gt sra74 c s sub a74 lt Enter gt gt link74 main sub s lt Enter gt 282 12Attention 12 6 3 When Using the IAR EC Compiler EW Please specify the project setting by following process 1 The Setting in the IAR Embedded Workbench When you select the menu Project gt Options the dialog for Options For Target target will open In this dialog please select the XLINK as category and set the project setting e Output Tab In the Format area check the Other option and select the elf dwarf as Output Format e Include Tab In the XCL File Name area specify your XCL file ex Inkm3
13. B t fact cyo TE OK a bas ag a E OBJ che pri E QOVR clr_fle E TMOUT dis den F RI WAT Ri Ri F Ri Ri R2 R2 Fr FR R3 R3 Ra R A0 Object ID AQ Direction amp Forward C Backward Close Specify the search condition With the function code RO Function Code and error code RO Error Code you can specify multiple values OR condition Other items are searched based on the AND condition Then specify the search direction The debugger searches the items in the direction specified in the dialog using the position pointed by the indicator as the radix point When the debugger does not check all the search items the subsequent system call issuance history in the search direction will be a search result Click the Find Next button The debugger searches the system call issuance history corresponding to the specified condition The specified items are searched using the AND condition If the search condition is met the indicator is moved to that point 224 6Windows Dialogs 6 15242 Change the display magnification Click the Expand button or Reduce button in the tool bar Or select Menu Expand or Reducel The display is expanded or reduced using the left corner of the graph area as the radix point By default the display is expanded or reduced with display scale of 1 5 The display scale appears in the Scale field in the status bar The default expansion reduction sca
14. Displays a function call status 248 8Writing Script Files This debugger allows you to run script files in a Script Window The script file contains the controls necessary for automatically executing the script commands 8 1 Structural Elements of a Script File You can include the following in script files e Script commands e Assign statements e Conditional statements if else endi Program execution branches to the statement s to be executed according to the result of the conditional expression e Loop statements while endw A block of one or more statements is repeatedly executed according to the expression e break statement Exits from the innermost loop e Comment statements You can include comments in a script file The comment statements are ignored when the script commands are executed Specify only one statement on each line of the script file You cannot specify more than one statement on a line or write statements that span two or more lines Notes e You cannot include comments on the same lines as script commands e You can nest script files up to five levels e You can nest if statements and while statements up to 32 levels e If statements must be paired with endi statements and while statements with endw statements in each script file e Expressions included in script files are evaluated as unsigned types Therefore operation cannot be guaranteed if you use negative values for c
15. The red symbol will appear on the line containing the sort function call This shows that a softwarebreak breakpoint has been set 68 5Tutorial 5 2 5 Step5 Executing the Program Execute the program as described in the following 5 2 5 1 Resetting of CPU By default CPU is not reset after downloading a program To reset the CPU select Reset CPU from the Debug menu or click the Reset CPU button et on the toolbar 5 2 5 2 Executing the Program To execute the program select Go from the Debug menu or click the Gol button on the toolbar The program will be executed up to the breakpoint that has been set and an arrow will be displayed in the S W Breakpoints column to show the position that the program has halted init amp sam for i 0 i lt 103 i I j rand ifj lt 0 I J J ali j sort a change a sam s0 a 0 sam s1 a 1 sam s2 a 2 sam s3 a 3 sam s4 a 4 sam s5 a 5 sam s6 a 6 sam s7 a 7 sam s8 a 8 sam s9 a 9 Note When the source file is displayed after a break a path of the source file may be inquired In this case please specify the location of a source file 69 5 2 5 3 Reviewing Cause of the Break The break factor is displayed in the Output window Connected S W break Find in Files Version Control The user can also see the cause of the break that occurred last time in the Status window S
16. This help explains the debugging function corresponding to the following CPUs R32C 100 Series Note In this help the information which depends on this CPU is described as for R32C M32C 90 M32C 80 M16C 80 M16C 70 Series Note In this help the information which depends on this CPU is described as for M32C M16C 60 M16C 30 M16C Tiny M16C 20 M16C 10 R8C Tiny Series Note In this help the information which depends on this CPU is described as for M16C R8C 740 Family Note In this help the information which depends on this CPU is described as for 740 Blank Page Setup of Debugger 1 Features 3 1 1 Real Time RAM Monitor FUnNCtiOD seessessessrrrersrrrererrrsrrrrssnnrerrrrrsrrr rss rr rss nr rer rr nr enn rr kn rrr rr nr enn n nen 3 1 1 1 RAM Monitor Aveda EAEE E EEEE E E 3 IEN 22Samplins Period EAEN EAEE A TE AASE EEST A AAE EE OE EAEE EAE EN 4 1 1 3 Related WandOws meotre e a a a a E aE a A aeS 4 1 2 Break PUC OA S e a a E E a EE a E a E 5 1 2 1 Software Breaks Function srrrrnnvororrnnrrrrrennrrrrrsnnrnrrnsrnrrrrnnrnrsssnnnsrrssnnsvsrsnnrsesssnnrsrssssnssrnnn 5 1 2 2 Hardware Breaks F ncti n merre Sioe eE E NE E R EEE eia 6 1 3 R al Time Trace FUT O a e e a a a e a a ES aA eE e E E RT 7 1 31 Trace Area orc e a a a ak eco Sek 7 1 3 2 Trace Condition Setting rrrorvrnrnrnnononnrvrrrrrrrenannrvrnenerrensnnrnnrenesnensnnrnnrsnnssessenannrsensnnssensnnnsen 8 1 3 3 Trace Data Write Condition
17. e When AND or OR is selected In the event specification area the event used and a pass count for that event can be specified To alter the pass count while the event to alter is being selected click the pass count value of that event Event Status OODEDOE e When AND Same Time is selected In the event specification area the event used can be specified No pass counts can be specified Event Status PASS EVENT B1 B2 B3 B4 B5 B OOODEDOE 145 e When State Transition is selected Click the Details button and the dialog box shown below appears Sequential specification can be used If the content of any event is altered it is marked with an asterisk on the title bar Once conditions are set in the simulator asterisks are not displayed State Setting State Transition B1 main FETCH B2 000410 WRITE B3 OFE000 FETCH B4 000000 FETCH m Time Out B5 000000 FETCH f Not Use etat f lrstatel stater Time Cot B6 000000 FETCH 10usec Not Use IV Sequential Start gt B1 1 gt B2 1 gt Pass Count mest 6 10 3 Specify the Trace Range For the simulator debugger as many cycles as specified on the Init dialog box s Trace tab can be recorded Descriptions below are written assuming 32K cycles Trace Area About 16K 16K After 0 32K Full Break
18. 00 00 00 055 114 R o 4 1 11111111 00 00 00 055 115 w 0 3 1 11111111 00 00 00 055 115 R 0 3 1 11111111 00 00 00 055 115 R o 3 1 11111111 00 00 00 055 115 1 3 1 11111111 00 00 00 055 115 R o 1 1 11111111 00 00 00 055 115 R o 3 1 11111111 00 00 00 055 115 R o 4 1 11111111 00 00 00 055 115 3 4 184 6Windows Dialogs 10 In Cycle display area Shows trace cycles Double click here to bring up a dialog box to change the displayed cycle Label display area Shows labels corresponding to address bus information Double click here to bring up a dialog box to search for addresses Bus information display area The content displayed here differs depending on the MCU or simulator system used 6 11 6 Display of bus information on the Simulator Debugger Time information display area Shows time information of trace measurement result One of the following three modes can be selected from the menu Absolute Time Shows an elapsed time from the time the program started running up to now in terms of absolute time default Differences Shows a differential time from the immediately preceding cycle Relative Time Shows a relative time from the selected cycle Note however that this mode changes to the absolute time display mode when the trace measurement result is updated Acquired range of trace measurement result Shows the currently acquired range of trace measurement
19. 25 TA_TFIFO Receive 27 task27 28 _task28 s 0 TA TFIFO 0 Send 31 task3l 32 task32 s 33 0 Receive 35 task35 36 task36 s TA TPRI 6 14 8 1 Display the Data Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the data queues defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of data queue Dtqatr Attribute of each date queue Dtent Number of messages in each data queue Dtqsz Maximum number of messages that can be contained in each data queue Data Queue Wait ID No and task name of tasks waiting for message transmission waiting or message reception waiting Data Queue Data The messages stored in the data queue e The display of the ID field varies depending on which one is specified the standard data 32 bits or the extended data 16 bits MR308 4 If the standard data 32 bits the ID field displays a string 32 and data queue ID number If the extended data 16 bits the ID field displays a string 16 and data queue ID number MR30 4 If the standard data 16 bits the ID field displays a string 16 and data queue ID number If the extended data 32 bits the ID field displays a string 32 and data queue ID number 210 6Windows Dialogs e The following
20. HAW Break Point Label Addr Cnt Size Data Type Cmp OFOO C 00T eK ok Del Del All EE like key input 0F0346 001 BYTE 0000 e The hardware break point of 64 points can be set up You can set one address breakpoints with pass counts e s address break point access types you can specify writing data to the address break point Write reading data from the address break point Read reading or writing data R W and fetching instructions Fetch e You can also specify that execution breaks if the data read from or written to the address break point has a specific value Moreover you can specify valid and invalid bits for the specific value e Ifyou have set multiple hardware breakpoints program execution stops when any one hardware break address is encountered OR conditions 137 6 9 1 Specify the Events 6 9 1 1 Instruction Fetch Set as below Example Executing a instruction at address FO003h H N Break Point H W Break Disable Enable Address rooos Pass Count Ja Access Type ret cn v Length Erte z Data Compare Help VV Not Specify Data Je fe CT t C gt EE C gt aj Close cH W Break Point Label Addr Cnt Size Data Type Cmp OFO003 001 eK KK When the Add button is clicked the breakpoint is added to the breakpoint list under the dialog Please click the Close button after completing the hardware breakpoint setting 138
21. 2 Graphic mode displayed in units of bytes The virtual port input that has been set is displayed in graphic mode in units of bytes Cycle count display area Input data display area e Address display area displays the memory address to which a virtual port is input e Input data display area displays the virtual port input data that has been set in graphic mode The peaks in this graph represent data values derived by equally dividing the height of the data displaying area by 255 maximum value of 1 byte data The short white lines appearing at the bottom of the input data display area indicate points at which data are input To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area e Cycle count display area displays cycle counts 3 Hexadecimal mode The virtual port input that has been set is displayed in hexadecimal mode Imu cycle Cycle Address 91112131451671819 1011121141516171819204 5722 count F A a OUOSEO det 7 i i a JE i i EG A display area Address display area Input data display area e Address display area displays the memory address to which a virtual port is input e Input data display area displays the virtual port input data that has been set by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and th
22. 6 10 10 3 Select State Transition Change the Combination group to State Transition The Detail button included in the Combination group becomes useful so click that button This opens the State Setting window In this window State Transition can be specified using sequentially Use the buttons included in the Sequential group Pass counts can be specified from the popup menu that appears when selecting an event The contents set here are reflected in the state transition diagram Example Events B1 and B2 that occur successively in that order are established State Setting State Transition 0 m Time Out Wot Use Start Statel Statez Time Count 65535 ji x 1Dusec IV Sequential Stat gt Bli J gt 18210 gt End 179 6 10 11 Specify the write condition Trace data write conditions can be specified You can specify the following write conditions Write conditions unlimited default Cycles from the start event established to the end event established Only cycles where the start event is established Cycles from the start event established to the start event unestablished Other than cycles from the start event established to the end event established Other than cycles where the start event is established Other than cycles from the start event established to the start event unestablished AOT i GONG To specify condition 1 choose Total from
23. 6 2 4 1 Screen structure for cycle synchronized inputs If you ve set virtual port inputs that are synchronized to machine cycles they can be displayed in one of the three modes shown below The display modes can be changed from the Mode menu 1 Chart mode displayed in units of bits The virtual port input that has been set is displayed in chart mode in units of bits Cycle count display area Irput cycle Cycle OCO0000041 Daca 0 gt x01 Acdress Bi 101 20130140 1 50160170801 901100 0003E0 0003E0 0003E0 0003E0 0003E0 0003E0 Bit number display area Address display area Input data display area e Address display area displays the memory address to which a virtual port is input e Bit number display area displays bit numbers of memory to which a virtual port is input e Input data display area displays the virtual port input data that has been set in chart mode in units of bits a This means that memory bits are in the state of logic 0 The short white lines appearing at the bottom of the input data display area indicate points at which data are input To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area e Cycle count display area displays cycle counts This means that memory bits are in the state of logic 1 94 6Windows Dialogs
24. 6Windows Dialogs 6 9 1 2 Memory Access Set as below Example Reading to even address 400h HW Break Point 139 Example Write data equal to or greater than 3Fh to address 400h HW Break Point H W Break Disable Enable Address 400 v Pass Count Ja Access Type write Length Byte nad Data Compare Help Not Specify Data ar i C lt z lt H WU Break Point Label Addr Cnt Size Data Type Cmp data SE to 000400 001 BYTE 003F WRITE gt 140 6Windows Dialogs 6 10 Trace Point Setting Window The Trace Point Setting window is used to set trace points The debugger for 740 doesn t support this function Setting modification flag Setting the effective events E Trace Points Setting Current event list ADDRESS ACOE CONDITION main FETCH Fune_ Static FETCH global float WRITE 000000 FETCH 000000 FETOH 000000 FETCH addr OF 0042 addr OFO1A4 addr 000400 0420 lt data lt O4FF addr 000000 addr 000000 addr 000000 PIU I Enable Detail v Detail ace Area About 16K 16K Setting of trace area Setting of combination condition Setting of trace write condition Setting of Process ID e The events listed below can be specified as trace events If the contents of events are altered they are marked by an asterisk on the title bar
25. 7 sam s8 a 8 sam s9 a 3 78 5Tutorial 5 2 11 Step11 Forced Breaking of Program Executions This debugger can force a break in the execution of a program 5 2 11 1 Forced Breaking of Program Executions Cancel all breaks To execute the remaining sections of the main function select Go from the Debug menu or the Go button on the toolbar The program goes into an endless loop To force a break in execution select Halt Program from the Debug menu or the Halt button on the toolbar 79 5 2 12 Step12 Displaying Local Variables The user can display local variables in a function using the C Watch window If the downloaded program is the program generated by the assembler package for 740 family you can not watch variables in C watch window 5 2 12 1 Displaying Local Variables For example we will examine the local variables in the tutorial function which declares four local variables a j 1 and sam Select C Watch from the Symbol submenu of the View menu The C Watch window is displayed By default C watch window has four tabs as following e Watch tab Only the variable which the user registered is displayed e Local tab All the local variables that can be referred to by the scope in which the the PC exists are displayed If a scope is changed by program execution the contents of the Local tab will also change e File Local tab All the file local variables of the fi
26. Hide window 192 6Windows Dialogs 6 13 GUI I O Window The GUI I O window allows you for port input by creating a user target system key input panel button in the window and clicking the created button And this window also allows you to implement the user target system output panel in the window s t GUI 1 0 Sample pni SP HEN EE 0 I Input Panel pi p e You can arrange the following parts on the window Label character string Displays erases a character string specified by the user when any value is written to the specified address bit LED Changes the display color of any area when any value is written to the specified address bit Substitution for LED ON Button A virtual port input or virtual interrupt the simulator debugger only for the latter can be executed at the time the button is pressed Text Display the text string e You can also save the created panel in a file and reload it e You can set up to 200 address points to the created part If different addresses are set to the individual parts you can arrange up to 200 parts 193 6 13 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Select Item Select an I O item Delete Delete the selected I O item Copy Copy the selected I O item Paste Paste the copied I O item Create Button Create a new button item
27. High end Debugging described later in this manual Using this I O script function you can specify more precise data input timings such as when the program fetches an instruction when the program writes to memory or when the program has executed instructions a specified number of times Virtual Port Output Function When a data write to some memory address by the program occurs this function records the written data value and the cycle at which the data was written The recorded data can be verified in graphic or numeric format from the I O Window The maximum number of data that can be recorded by this function is 30 000 entries counted from the beginning of program execution 35 Interrupts This function defines interrupt generation Using this function you can generate timer interrupts and key input interrupts in a simulated manner without having to actually generate them The following shows timings at which virtual interrupts can be generated Virtual Interrupt Function This function defines interrupt generation Using this function you can generate timer interrupts and key input interrupts in a simulated manner without having to actually generate them The following shows timings at which virtual interrupts can be generated 1 When program execution has reached a specified number of cycles 2 When the program has executed a specified address 3 Every specified time interval Virtual interrupts at the above timings can be defi
28. Input from port 1 This interrupt handler routine aims to assign the value of port 1 to variable key when a virtual interrupt is generated In such a case a value can be assigned to variable key by entering it to port 1 when a virtual interrupt in this case a timer interrupt is generated It is assumed that timer interrupts are generated using a separately available virtual interrupt function For details refer to the virtual interrupt function described later in this manual To support processing of interrupt handlers like this this debugger provides a function that allows you to define the data to be input according to a number of times a virtual interrupt is generated a virtual input port synchronized to virtual interrupts By using this function you can perform an operation where data OxFF is input to memory address 3E1 when the virtual interrupt occurs first and data OxFE is input to said memory address when the virtual interrupt occurs next time Number of times a virtual interrupt is generated Data input to address 3E1 First OxFF Second OxFE Third OxFD 91 6 2 2 Virtual Port Output Virtual Port Output is a function that when data is written to some memory address by the program allows the written data value to be recorded along with the cycle in which the data was written The recorded data can be displayed for your reference in chart numeric or graphic mode The number of data entries
29. When moving the mouse on the marker the cursor shape changes Then start dragging The start marker moves into the window left portion by clicking the Start Marker button in the tool bar Or select Start Marker from popup menu by right clicking on the window The end marker moves into the window right portion by clicking the End Marker button Or select End Marker from popup menu The indicator moves into the window center by clicking the Indicator button Or select Indicator from popup menu Note that each marker can move only to the point where an event is established 239 6 18 Task Analyze Window The Task Analyze window displays the result of the measurement data statistically analyzed within the range specified by the start marker and the end marker in the Task Trace window The Task Analyze window displays the CPU occupation state The Task Analyze window functions together with the Task Trace window The debugger for R32C doesn t support this function The debugger for 740 doesn t support this function This window is available even when a target program using an OS other than our real time OS MRxx is downloaded The CPU occupation state display mode is used to display the CPU occupation time and ratio by task This mode shows the statistical result within the range specified by the start marker and end marker in the Task Trace window Mark 00 00 00 000 672 00 00 01 569 272 0
30. name Pri Status wup count timeout flg pen flg mode OF17F8H main 1 RUN 0000H OF1A68H task2 2 RDY 0000 OF1A76H _task3 sus 0000 OF1AS4H task4 WAT SLP 0000 OF1A9AH _task5 WAI SLP SUS 0000 OF1ABOH _task6 WAI DLY 0000 OF1ACAH task WAI DLY SUS 0000 OFIAE4H tasks WAI FLG 0000 OF1BOZH task9 WAI FLG SUS 0000 1111H TWE_ORW 1111H TWF ORW 1 2 3 4 5 6 7 8 9 Tote eee By double clicking any line the information on the task context is displayed in the Context dialog For details on the Context dialog see 6 14 12 Display the Task Context The following data is displayed in the status bar Current Run Task 1 main 6 14 2 1 Display the Task Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the tasks defined in the configuration are listed in the order of ID number The function of each item is as described below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Items Contents ID Task ID StaAddr Starting address of task name Task name Pri Priority Status 1 Task status wup count Wake up count timeout Timeout value flg ptn Wait bit pattern of event flag flg mode 2 Wait cancellation condition of event flag 197 1Task Status Display Status RUN Run status RDY Ready Status SUS Suspend status DMT Dorma
31. status 1 2 3 4 5 6 7 8 OF1C56H OF1C58H OF1c5AH OF1C5CH OF1CSEH OF1C60H OF1C62H OF1C64H cyclel cycle2 eycle3 cycle4 cycle5 _cycle6 _cycele cycled 0064H O3E8H O1F4H 0258H 00C8H 012CH 0190H 015EH 0064H O3E8H O1F4H 0258H O0c8H 012CH 0190H 015EH TCY ON TCY OFF TCY ON TCY ON TCY OFF TCY ON TCY ON TCY ON 6 14 9 1 Display the Cycle Handler Status When the realtime OS is MRxx conformed to ul TRON specifications V 3 0 All the cycle handlers defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of cycle handler StaAddr Starting address of cycle handler name Name of cycle handler interval Interrupt interval count Interrupt count Status Activity status of cycle start handler e The following are displayed in the Status area TCY_ON Cycle handler enabled TCY_OFF Cycle handler disabled 212 6Windows Dialogs 6 14 9 2 Display the Cycle Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the cycle handlers defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0
32. 0018B6H 00000014 00000014 001496H 80 10 10 30 15 24 1 56 0 120 0 248 6 1111111110 1111111111111110 6 14 11 1 Display the Memory Pool Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the memory pools defined in the configuration are listed in the order of ID number The fixed length data comes first and the optional length data comes after the fixed length data The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of memory pool BaseAddr Base address of memory pool Blk Size Block size of memory pool Total Blk_cnt Tot al block count of memory pool Free Blk_cnt map Number of unused blocks and information on unused memory blocks bit information e The display of the ID field varies depending on which one is specified fixed length or optional length If the data is of fixed length the ID field displays a string F and memory pool ID number For an arbitrary length the contents displayed on the first line are the character string V a memory pool ID number and a block ID number Displayed on the second to fourth lines are the memory pool ID and block ID numbers The block ID numbers are enclosed in parentheses When specifying the optional length memory pool is displayed in the Total Mlk cut field No bit information is displayed in the
33. 1 2 Specifying Clock Frequency Specify the operation clock of the target MCU within the MCU Clock field in the Time Count Resource group in units of MHz m Resource MCU Glock f10 0 MHz Fl Specify the MCU clock and the clock divide ratio If you are using the MCU at 10 MHz divided by 4 for example enter 10 on the left side and 4 on the right side of the text box If no values are set in the clock divide ratio specifying area it is assumed that the clock is not divided i e the same as you would specify the value 1 52 4Setup the Debugger 4 1 2 Debugging Information Tab The specified content becomes effective when the next being download Compiler NCSOWA NC8C Object Format fic EE 695 I On Demand 4 1 2 1 display the compiler used and its object format Display the compiler used and its object file format Compiler NO30WA NC8G Object Format IEEE 695 E Please specify the compiler used and its object file format in the dialog opened by menu Debug gt Debug Settings 4 1 2 2 Specify the Storing of Debugging Information There are two methods for storing debugging information on memory and on demand Select one of these two methods The on memory method is selected by default To select the on demand method click the On Demand check box e On memory method Debugging information is stored in the internal memory of your computer This method is suitable when the
34. 1 7 Member Reference Using Dot Operator You can only use variable name member name for checking the members of structures and unions using the dot operator Example class T public int member1 char member2 class T t_cls class T pt_cls amp t cls In this case t cIs member1 pt cls member2 correctly checks the members 10 1 8 Member Reference Using Arrow You can only use variable name gt member name for checking the members of structures and unions using the arrow Example class T public int member1 char member2 class T t_cls class T pt_cls amp t cls In this case amp t_cls gt member1 pt_cls gt member2 correctly checks the members 269 10 1 9 Pointers to Members Pointers to members using the or gt operator can be refered only in the forms of variable name member name or variable name gt member name Example class T public int member bi class T t cls class T pt cls amp t cls int T mp amp T member In this case t cls mp and tp cls gt mp can correctly reference the variable of pointer to member type Note e Note that the expression mp cannot considered as the variable of pointer to member type 10 1 10 Parentheses Use the and to specify priority of calculation within an expression 10 1 11 Arrays You can use the and to specify the elements of an array You can code arrays as follows v
35. 7 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Setup Sets up data virtual port input virtual port output or virtual interrupt Modify Changes the setup data Delete Deletes the setup data Load Loads the saved setup data or I O script file Mode Changes display mode Scale Changes display scale Color Changes display color Timer Sets the interval synchronized interrupts T O Script Files Lists registered I O script files Previous Input data Find the previous input data Next Input data Find the next input data Previous Output data Find the previous output data Next Output data Find the next output data Previous Interrupt data Find the previous interrupt data Next Interrupt data Find the next interrupt data Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 101 6 2 8 Setting Virtual Port Inputs The Virtual Port Input function allows you to simulate data inputs and similar other operations performed on the ports defined in the SFR Data can be input to memory at one of the following timings 1 If you want data to be input to some memory location with the lapse of time Data can be input when
36. E chances EEEE E E EPEE E a chek 125 6 41 Extended Menussnauarasarbnstr Skal gradene bre stdeaee 126 6 5 C Watch Window uses egene an ke 127 6 07 Extended Menusassansertisesokkuktatuadseun bkeareentenekbekklnl 128 6 6 Coverage Windowusrssism rusisarmdatid sakna duetten ac EE ou abel sive baie ioks 129 6 6 Extended Menusurnsstsdaenka aS ANNE 130 6 6 2 Refer to the Source Line the Executed ACddreSS sssssssersrrrsrrrrrserrersrnrerrrrrsrrrrsrnnn rn nn nen 131 GET Script Windowadusdaimaataaimaen konne arne RM ASC NME ON Lea AEA RNA DERA NE ae eMC 132 6 71 Extended M nu Sven Saco ead Vass needs Near eas Gade eies 133 6 8 S W Break Point Setting Window s ssserseseresreressoserrerererrerrrreresrererr enes rrrerr enes esse r ennen er brann orena 134 6 8 1 Command Button snn tR EA EE Ea AREER a EE snitt 135 6 8 2 Setting and Deleting a Break Points from Editor Source Window rsrervrrvarvervrrrvrvee 136 6 9 H W Break Point Setting Dialog Box rrrrrrronnrnrrrnrrrsrensnnrvrnenrsrsnsnnrnrnenssernennrnnnenssnnsennnnnnensnsnnen 137 6 9 1 Specfy the DET ai r AE AE AE Banat EES AENT EEE TAES 138 6 10 Trace Point Setting Window nassikanesssarindruedaneraindsrnerldsernstnsddrs 141 6 10 1 Specify the Trace Evetitisscccveseciecsescceeees reseeteen coed cave es en tevin cobs eatat ence hen a 142 6 10 2 Specify the Combinatorial CONCitiOn ssessersrsererrersssererrrresrorerrr enes rrrr rr rr er rr se rr nn ena 145 6 10 3 Specify the Trac
37. ES EEEE E EON ete Be Bes eh aa EE NE Re 15 2 1 5 Cycle Count The CYcle CY Command sosvrsrrvrrvrerevreverrevsrverrenervervensevervevsenerrevsenerveneene 18 2 1 6 Stack Utilization Monitor The StackMonitor SM CommandC sssrsrsrsrsrsrsrsrsrsrsnsnnnn 18 2 2 Simulation Specifications for M320OC ssssessessesrsrrrererseserreressererreresrrrerrrrerer rese rr rr rr reses rer rese nr er enn on 19 2 2 1 Operation of Instructions a a a r a a r EEEO aE NES 19 2 2 2 Resetting eee eee EE aina i a a aii LFE era 20 IAPR ENI LITO AEA EE A EA EA S A A A A E A E A AS NA 21 QD AT V EE EEEE EEE E AO E E abi be E T EEE 22 2 2 5 Cycle Count The CYcle CY Command ssvrsrevrrvrerevrevrrrevsevervevsrvervevsevervensenerrevseneeveneene 25 2 2 6 Stack Utilization Monitor The StackMonitor SM Command sssrsravvrvrsravnevsenevnevenne 25 2 3 Simulation Specifications for M16C R8C rrrorvrnrnrsranannrnnnsnnsnenennrnnnrnsseenennrvnnenssrenennrnnnenssesnennner 26 2 3 1 Operation of Instru tion S si tenies e eres EN EFEN tE e ERES VEES EEEE eA EEE 26 pA BE EILA 60 0 secs ste cctedsaes debs stectececsasdeceatecesceseeecneceteceddcesecduecadecnecetedecdecgteckedseecdebacectbacteedes 27 2 3 3 MEMO eai a a e a a iaee aar i aiiai 28 23 AT O PRENESE AEO EAE A EETA ES ATEA a Sedan 29 2 3 5 Cycle Count The CYcle CY Command ssvrsrevrsvrerevrenervevsevesveververvevsevervensenerveveenesveneene 32 2 3 6 Stack Utilization Monitor The StackMonitor SM Command ss
38. Free Blk_cnt map field When specifying the fixed length memory pool the display format of each bit in the memory block information in Free Blk_cnt map is as shown below item Contents 0 Memory block in use busy aly Memory block not in use ready tat No memory block 215 6 14 11 2 Display the Memory Pool Status When the realtime OS is MRxx conformed to ulTRON specifications V 4 0 All the memory pools are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of memory pool Mplatr Attribute of each memory pool Mpladr Base address of memory pool Mplsz Size of memory pool Blkent Total block count of fixed length memory pool Fblkent Number of unused blocks and information on unused memory blocks Memory Pool Queue Displays the ID number and name of tasks waiting in the memory pool e The following are displayed in the Mplatr area TA_TFIFO Task wait queue is in FIFO order TA_TPRI Task wait queue is in task priority order e The display of the ID field varies depending on which one is specified fixed length or optional length If the data is of fixed length the ID field displays a string F and memory pool ID number For an arbitrary length the contents displayed on the first line are
39. MR command will not run properly if the startup file you uses don t match with the version of MRxx 6 14 1 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Mode Task Displays Task status Ready Queue Displays Ready status Timeout Queue Displays Timeout status Event Flag Displays Event Flag status Semaphore Displays Semaphore status Mailbox Displays Mailbox status Data Queue Displays Data Queue status Cyclic Handler Displays Cyclic Handler status Alarm Handler Displays Alarm Handler status Memory Pool Displays Memory Pool status Message Buffer Displays Message Buffer status Port Displays Port status Mailbox with Priority Displays Mailbox with Priority status Context Displays Context Layout Status Bar Switch display or non display of status bar Refresh Refresh memory data RAM Monitor Enable RAM Monitor Switch enable or disable RAM Monitor function Sampling Period Set RAM Monitor sampling period Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 196 6Windows Dialogs 6 14 2 Display the Task Status In the MR window select Popup Menu Model gt Task MR x uioOPrPr Huv S MG Current Run Task 1 main ID Stazddr
40. RAM monitor area by using the realtime RAM monitor function The displayed contents are updated at given intervals by default every 100 ms while running the target program ME 0 78ms 0008F0 000400 pool SB Label Register F ASCII 000480 e This system provides a 1Kbytes of RAM monitor area which can be placed at any continuous addresses e The RAM monitor area can be changed to any desired address range Refer to 6 1 2 Setting the RAM monitor area for details on how to change the RAM monitor area The default RAM monitor area is mapped into a 1 Kbyte area beginning with the start address of the internal RAM e The display content updating interval can be set for each window individually The actual updating interval at which the display contents are actually updated while running the target program is shown in the title field of the Address display area e The background colors of the data display and code display areas are predetermined by access attribute as shown below Access attribute Background color Read accessed address Green Write accessed address Red Non accessed address White The background colors can be changed ATTENTION e The RAM monitor window shows the data that have been accessed through the bus Therefore changes are not reflected in the displayed data unless they have been accessed via the target program as in
41. Setting Window 2 By using the I O script function 30 2Simulation Specifications With either method the virtual interrupts are subject to the following limitations 1 Virtual interrupts set by using the I O Timing Setting Window Regarding interrupt control for virtual interrupts generated Each Interrupt Control Register s interrupt request bit is not set to 1 The priority levels set in each Interrupt Control Register s interrupt priority level select bit are not referenced The priority of virtual interrupts can be specified when setting virtual interrupts on the I O Timing Setting Window The Flag Register FLG s interrupt enable flag I flag and processor interrupt priority level IPL are referenced as in the actual chip 2 Virtual interrupts set by using the I O script function Regarding interrupt control for virtual interrupts generated statement can be written so that when an interrupt occurs each Interrupt Control Register s interrupt request bit is set to 1 The priority levels set in each Interrupt Control Register s interrupt priority level select bit can be referenced However once a virtual interrupt is generated and registered in the simulator the priority of the virtual interrupt cannot be altered even when the priority levels specified with the interrupt priority level select bit is changed by the user program The Flag Register FLG s interrupt enable flag I flag and processor interr
42. Show the elapsed time from the target program beginning The value enclosed in that follows indicates a total amount of instruction execution cycles reckoning from when the program started to run 190 6Windows Dialogs 6 12 Data Trace Window The Data Trace Window is used to analyze the results of real time trace measurements and graphically show data access information The debugger for 740 doesn t support this function It operates in conjunction with Trace Window Time at indicator cycle Time at makers Grid interval Scale 4 Data Trace ep union tag struct tag Bit b0 bit unsigned char 1 b0 bit bO unsigned char 1 b0 bit bl unsigned char 1 b0 bit b2 unsigned char 1 b0 bit b3 signed char 4 b0 bit b4 7 unrsigned char b0 all b0 bit b2 b0 bit b3 b0 tbat b4 7 Data Reference Indicator Markers Access history reference area e In the data reference area you can inspect memory values at the point of a cycle currently in interest or the values of registered C variables e In the access history reference area you can see the history of accesses to registered addresses in chart form e In conjunction with the Trace Window you can inspect memory values at the point of a cycle you are watching in the Trace Window Conversely you can show the cycle in the Trace Window which you are watching in the Data Trace Window 191 6 12 1 Extended M
43. TO 1G Som TA VEr SION ck EEEE E E EREE EEA E E E EE EENE E 269 10 1 7 Member Reference Using Dot Operator cccccccccccseesssseceeececeessaeceeececeesssseceeeeeeeenees 269 10 1 8 Member Reference Using Arrow ccccccccccccsssssseseeececeesssseceeeceesessaaeeeeececeensaaseeeeeeesenses 269 10 19 Pointers to Mem bers si ic 220 a sacs sten ness Sha ss rake tesen a a Shit sad onkelens 270 10 1 10 Parentheses NO MALTA T PAYS ye desse rates ee eto Me Sete 10 1 12 Casting to Basic Types is siccaccecces n E Aes ns door a 270 10 1 13 Casting to typedef Types rrrrronrrvrrrrrrrrronnrnrrrnrnrrrennnnrrrnsersrensnnrrnnsnrsrensnnrrenesessensnnnsen 271 LO DTA Variable Name isos E EEE EAE E E EE EAEE EEE EEA 271 10 1 15 BUNCtiOri Nain e EEAO EEE E EEE E anus S gazes decekeg eastnedaadeseess ri AA 271 10 1 16 Ch ract r Constants ciaeo n A E E E E S E E N E 271 10 1 17 Character String Literals rrrrrorrrrrrroronnrnrrrnrnrrrennnnrrrnsersrennnnrrnnsnrsrensnnrrnnsnesrensnnrsen 271 10 2 Display Format of C C Expressions c cccccccessesssesececeesessesecceccccsesssseceeeceesesnsaeceeeesesensaaeas 272 10 2 1 Enumeration Types cccccccscscesesecesececececececececeeecececececeeeeeeececeeeeeeeceeeeeeeeeeeeeeeeeeeeeeeeees 272 T022 Basie Py POs i n E cet E E E EE awe Eee ees 272 10 2 3 Pointer Types cccccccecssesesececeeeceeeeecececeeeeececeeesececeseceeeeeeseeeeceeeeeeecececeeeeeeeeeeeeeeeeeceeees 273 OLD A Array Py pes ss R
44. The asterisks are not displayed after setting up the simulator Fetch Memory Access Bit Access Interrupt e Events at up to six points can be used e These events can be combined in one of the following ways Trace when all of the valid events are established AND condition Trace when all of the valid events are established at the same time simultaneous AND condition Trace when one of the valid events is established OR condition Trace upon entering a break state during state transition State Transition condition 141 6 10 1 Specify the Trace Event To set events double click to select the event you want to set from the event setting area of the Trace Point Setting Window This opens the dialog box shown below Event name i Specify the event type Contents change with the setting of Event Type Following events can be set by specifying Event Type in this dialog box e When FETCH is selected Traces for the instruction fetch ran ga Fr l 142 6Windows Dialogs e When DATA ACCESS is selected Traces for the memory access pw e When BIT SYMBOL is selected Traces for the bit access 143 e When INTERRUPT is selected Traces for the interrupt occurrence or termination 144 6Windows Dialogs 6 10 2 Specify the Combinatorial Condition To specify a combinatorial condition specify the desired condition from the combinatorial condition specification area
45. The global symbols and global labels defined in the target program can be used Symbol and label names may consist of alphanumeric characters underscore _ period and question mark However numbers cannot be used at the beginning of symbol and label names Symbol and label names can be written in up to 255 characters Symbol and label names are discriminated between uppercase and lowercase letters The structured instructions pseudo instructions macro instructions and reserved op code words of assembler asxx cannot be used in symbol and label names These for example include SECTION BYTE switch and if Character strings that begin with cannot be used in symbol and label names 262 91 0 Script 9 3 3 Macro Variables Macro variables are used by adding at the beginning of each variable name e Variable names following the percent character 26 may consist of alphanumeric characters and underscore However numbers cannot be used at the beginning of macro variable names e Register names cannot be used in variable names e Variable names are discriminated between uppercase and lowercase letters e Upto 32 macro variables can be defined Once defined the macro variables remain effective until the debugger is terminated 9 3 4 Memory Variables Memory variables are used when using memory values in expressions The following shows a format of memory variables address data size e Expres
46. Using SRA74 IEEE695 ICC740 IEEE 695 format file When Using ICC740 This debugger does not support the object formats which are not shown in the drop down list 48 3Preparation before Use 3 Then register the corresponding download module in the Download Modules list box A download module can be specified in the dialog opened with a Add button Download Module offset 53 Format IEEE695 RENESAS o x Cancel Filename D HEW4 samples M160 demox30 gt Browse Access size fi I Download debug information only I Perform memory verify during download I Download automatically on target connection Enter the offset at which to load the download module in the Offset edit box Select the format of the download module in the Format edit box Please refer to the upper table about the format name of a download module Enter the full path and filename of the download module in the Filename edit box Specifies the access size for the current download module in the Access size list box After that click the OK button ATTENTION Access size and Perform memory verify during download is ignored The access size is always set to 1 and the verification does not work 49 3 3 Starting the Debugger The debugging can be started by connecting with an emulator 3 3 1 Connecting the Emulator Connect the emulator by simply switching the session file to one in which the
47. Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select the Create a new project workspace radio button and click the OK button Creation of a new workspace is started The following dialog box is displayed New Project Works Projects Workspace Name ies Empty Application Sample01 t5 Import Makefile Project Name Library Sample01 Directory D work H EW4 Samples M16C Sample01 Browse CPU family Mic v Tool chain Renesas M16C Standard Properties seven 1 Select the target CPU family In the CPU family combo box select the target CPU family 2 Select the target toolchain In the Tool chain combo box select the target toolchain name when using the toolchain 3 Select the project type In the Project type list box select the project type to be used In this case select Application Please refer to the manual attached to your C C compiler package about the details of the project type which can be chosen 4 Specify the workspace name and project name In the Workspace Name edit box enter the new workspace name In the Project Name edit box enter the project name When the project name is the same as the workspace name it needs not be entered In the Directory edit box enter the directory name in which the workspace will be created Click the Browse button to select a directory After a setting cl
48. are displayed in the Dtqatr area TA TFIFO Task wait queue is in FIFO order TA TPRI Task wait queue is in task priority order e The Data Queue Wait field displays a string Send if a task waiting for a message sending and then displays the ID number and name of the task waiting for a message sending Also if a task waiting for a message receiving displays a string Receive and then displays the ID number and name of the task waiting for a message receiving e When a task connected to the date queue is in the state of waiting with timeout enabled a string Itmol which indicates the state of timeout enabled is appended to a string displayed in the Data Queue Wait field When a task connected to the data queue is in the state of forced waiting Double waiting a string s which indicates the state of double waiting is appended to a string displayed in the Data Queue Wait field Normal Display 26 task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl Up to 8 characters can be displayed in the task name in the Data Queue Wait field If a task name exceeds 8 characters the extra characters are omitted 211 6 14 9 Display the Cycle Handler Status In the MR window select Popup Menu Model gt Cyclic Handler MR mi OPA ID Stazddr name interval count hon Feo sala
49. are synchronized to fixed intervals choose the Timer menus in the I O Timing Setting window This opens a dialog box necessary to set virtual interrupts which are synchronized to fixed intervals In this dialog box you can set the following items Setting a virtual interrupt Deleting a virtual interrupt Temporarily disabling a virtual interrupt Reenabling a disabled virtual interrupt Saving a virtual interrupt Loading a virtual interrupt The following shows how to specify each item 117 62 10 31 Setting a virtual interrupt Shown below is an example specification with the M16C 6X simulator debugger Example Generate an interrupt of vector number 21 with priority level IPL 7 every 200 ms Fill out the dialog box as shown below For the Temp Directory area set a writable directory because it is a temporary area used internally by the debugger to set virtual interrupts Set Timer Dialog Load Interval po msec I CC usec Vector pA Close Priority pA Temp Directory C WIN DOWS TEMP Refer Timer Del Del All Enable All Enable Disable All Disable Click the Add button and the virtual interrupt you ve set is added to the list of virtual interrupts in the lower part of the dialog box When you ve finished setting virtual interrupts click the Close button 118 6Windows Dialogs 62 1032 Deleting a virtual interrupt Click to select the virtual interrupt
50. are updated each time a command is executed When RAM monitor function is effective and the C watch points are within the RAM monitor area the displayed values are updated during execution of the target program mx A 16 2 Der IE Watch Local File Local Global Name value struct tag S p 0x404 struct taz_S ps 0x404 signed int ni 1028 unsigned char cl 4 74 struct tag S next 0x404 signed short global short 1028 signed long global long 67372036 signed int 5 5 global array Ox444 1028 signed int 5 global array 0 Ox444 1028 signed int 5 global array 1 0x454 1028 signed int 5 global_array 2 Ox45E 1028 signed int 5 global_array 3 0x468 1028 signed int 5 global_array 4 0x472 1028 e Variables can be inspected by scope local file local or global e The display is automatically updated at the same time the PC value changes e Variable values can be changed e The display radix can be changed for each variable individually e Any variable can be registered to the Watch tab so that it will be displayed at all times The registered content is saved for each project separately If two or more of the C watch window are opened at the same time the registered e The C watchpoints can be registered to separate destinations by adding Watch tabs e Variables can be registered from another window or editor by a drag and drop oper
51. area Address Vector display display area area e Address display area displays the memory address to which a virtual port is input e Vector number display area displays the virtual interrupt vector number to be monitored e Input data display area displays the virtual port input data that has been set by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and the virtual interrupt occurrence count of the data at which the cursor is positioned will be displayed in the virtual interrupt occurrence count display area Virtual interrupt occurrence count display area It displays virtual interrupt occurrence counts e Virtual interrupt occurrence count display area displays virtual interrupt occurrence counts 96 6Windows Dialogs 6 2 5 Structure of Virtual Port Output Screen Virtual port output results can be displayed in one of the three modes shown below The display modes can be changed from the Mode menu 1 Chart mode displayed in units of bits Virtual port output results are displayed in chart mode in units of bits Output cycle Cycle 0000004778 Data 0x30 Address Bit _3462047304840495 50605170528053905500564 Cycle count display area Address Bit number Output data display area display display area area e Address display area displays the address to be monitored for virtual port output e Bit number display area displays bit numbers of memory being monitored for
52. can also write script commands in the script file so that they are automatically executed The results of script command execution can also be stored in a previously specified log file Toolbar JO x DEKKER OM Script Scnpt File Name Log Log File Name gt assemble main LABEL PROGRAM main Execution Result Area assemble main Command History Area gt Enter Command Command Input Area e The Script Window has a view buffer that stores the results of executing the last 1000 lines The results of execution can therefore be stored in a file view file without specifying a log file e When a script file is opened the command history area changes to become the script file display area and displays the contents of the script file When script files are nested the contents of the last opened script file are displayed The script file display area shows the line currently being executed in inverse vide e When a script file is open you can invoke script commands from the command input area provided the script file is not being executed e The Script Window can record the history of the executed commands to a file This function is not the same as the log function This function records not the result but only the executed commands so the saved files can be used as the script files 132 6Windows Dialogs 6 7 1 Extended Menus This window has the following popup menus that can be brought up by right cl
53. columns of dialog boxes no addresses can be specified using function names 12 1 5 Debugging multi modules If you register two or more absolute module file in one session you can download only one file in same time If you register one absolute module file and one or more machine language file in one session you can download all file in same time 12 1 6 Syncronized debugging Syncronized debugging function is not available 12 1 7 Virtual port output functions The maximum number of data that can be acquired on I O timing setting window s virtual port output or output port windows can be specified in the Init dialog box We recommend specifying a value less than 500 000 for this data count In the 740 debugger the maximum number of data is 30000 Specifying any value greater than that may cause the performance of the simulator debugger or Windows to drop 278 12Attention 12 2 Attention of the R32C Debugger 12 2 1 Option of C Compiler Assembler Linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 6 Options for compiler assembler and linker The compiler that can be used by R32C debugger e NCxx 12 3 Attention of the M32C Debugger 12 3 1 Option of C Compiler Assembler Linker The information may not be downloaded debugged normally depending on the option
54. cycle of an interrupt sequence is not considered when measuring the number of cycles When an interrupt occurs the executed cycle of an interrupt sequence is 0 This debugger starts counting cycles immediately after a reset Cycles immediately after a reset are 0 The number of cycles needed to execute one machine instruction are added on for each instruction executed See Figure shown below Note Because the number of cycles measured by the emulator does not take into account the bus width queue wait cycles etc it includes some error when compared with the number of cycles in the actual chip If four cycles are required for the ENTER instruction cycles are added at this point in time l If two cycles are required for the MOV instruction cycles are added at this point in time ENTER instruction MOV instruction prp Execution 0 1 2 3 4 5 6 T 8 9 cycles In the above example no cycles are added while the ENTER or MOV instruction is being executed The cycles required for each instruction are added after instruction execution Note that the virtual port input output and virtual interrupt functions are processed after instruction execution is completed e Target program execution time measurement The target program execution time measurement is calculated from the number of cycles described above and the MCU clock and divide by ratio specified on the MCU tab of the Init dialog box 26 2Simulation Specifications
55. designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 6 Options for compiler assembler and linker The compiler that can be used by M32C debugger e NCxx e the IAR EC Compiler e the IAR C Compiler 279 12 4 Attention of the M16C R8C Debugger 12 4 1 Options for compiler assembler and linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 6 Options for compiler assembler and linker The compiler that can be used by M16C R8C debugger e NCxx e the IAR EC Compiler e the IAR C Compiler e the TASKING C Compiler 12 4 2 TASKING C Compiler When you debug programs compiled by the TASKING C Compiler CCM16 the type of bit field is fixed on unsigned short int Because CCM16 outputs the debug information for the type of bit field as unsigned short int 12 4 3 Precautions on Using M16C 62 Group This debugger does not support the M16C 62 group s memory extension mode Only the normal mode is supported 12 4 4 The number of cycles measuring on using R8C Tiny Series The M16C R8C Tiny Series simulator debugger is an instruction set simulator and does not include bus width cue or wait events when counting the number of cycles Rather it uses the values indicated in the microcomputer
56. dialog box Note Because the simulator s execution time measurement is calculated using the number of cycles described above it includes some error when compared with the actual chip s execution time e WIT STP Executed as an NOP instruction Other instructions operate the same as those of the actual MCU 33 2 4 2 Resetting e S register is set to FF16 only T flag is set to 1 about PS register and Program Counter is set to the value of the reset vector Other registers are set to 0 e SFR area is not initialized e Executed cycle count is set to 0 Resetting is performed in the same way as the actual MCU A reset is also performed when the debugger of 740 starts The value 0000h is set in the reset vector immediately after starting The program counter is therefore set to 0000h immediately after the debugger of 740 starts 2 4 3 Memory e Memory Space The entire memory space 0000h to FFFFh functions as RAM At startup memory is allocated for the entire area e Memory Structure and Initial Values Immediately after Starting The memory is set up as follows immediately after starting the debugger 0000h to FFFFh Filled with 00h 34 2Simulation Specifications 2 4 4 I O SFR No peripheral I Os such as timers and serial I O in the actual chip are supported Only the CPU core is supported Consequently the 740 debugger handles the SFR area to which peripheral I Os are connected simply as RAM Howe
57. displayed Enter variable i Add new watch point FF Cancel Click the OK button The C Watch window will now also show the int type variable i le oware AE mx 716 2 a Watch Local File Local Global Name Value signed long 10 a Ox6c2 16838 signed int i 10 75 5 2 10 Step10 Stepping Through a Program This debugger provides a range of step menu commands that allow efficient program debugging 1 Step In Executes each statement including statements within functions subroutines 2 Step Out Steps out of a function subroutine and stops at the statement following the statement in the program that called the function subroutine 3 Step Over Executes a function subroutine call in a single step 4 Step Steps the specified times repeatedly at a specified rate 5 2 10 1 Executing Step In Command The Step In command steps into the called function subroutine and stops at the first statement of the called function subroutine To step through the sort function select Step In from the Debug menu or click the Step In button 8 on the toolbar The PC cursor moves to the first statement of the sort function in the Editor Source window p_sam gt s5 p_sam gt s6 p sam gt s po sam gt s8 p_sam gt s9 I sort long ta long t int i Ja gap ur TR TI oooos k gap 5 whilel gap gt 0 Df for k 0 k lt gap kt for
58. else break gap gap 2 To executes the user program from the reset vector address select Reset Gol from the Debug menu or click the Reset Go button on the toolbar After the break in program execution select Stack Trace from the Code submenu of the View menu to open the Stack Trace window StackTrace lt oi xi Kind Name Value F sort OFO140 F tutorial OFO272 F main OFO2Z1E The upper figure shows that the position of the program counter is currently at the selected line of the sort function and that the sort0 function is called from the tutorial0 function 81 5 2 14 What Next This tutorial has described the usage of this debugger Sophisticated debugging can be carried out by using the emulation functions that the emulator offers This provides for effective investigation of hardware and software problems by accurately isolating and identifying the conditions under which such problems arise 82 Reference 83 Blank Page 84 6Windows Dialogs 6 WindowsDialogs The window of this debugger is shown below When the window name is clicked the reference is displayed Window Name View Menu RAM Monitor Window View gt CPU gt RamMonitor I O Timing Setting Window View gt CPU gt I O Timing Setting Output Port Window View gt CPU gt OutputPort ASM Watch Window View gt
59. file the 740 Debugger In the MCU file write the following contents in the order listed below For the file name specify the MCU name For the extension specify mcu Write each address in hexadecimal Do not add the prefix that represents the radix Please describe information on 3 6 referring to the data book on MCU used 1 AH OCR we MCU name Reserved number CPU mode register address and stack page select bit number Reset vector address information BRK vector address information Interrupt vector address information MCU name and Reserved number Always be sure to add a semicolon before the CPU name and the reserved number CPU mode register address and stack page select bit number Separate the CPU mode register address and the stack page select bit number with a colon Reset vector address information Add the word RST after the reset vector address BRK vector address information Add the word BRK after the BRK vector address Interrupt vector address information Separate between the interrupt vector address and interrupt control register address and between the interrupt control register address and interrupt control bit number with a colon Interrupt vector information can be writennen for up to 32 points 4 3 4 1 Example M38000 ed 3B 2 FFFC RST FFDC BRK FFFA 3E FFF8 3E FFF6 3E FFF4 3E FFF2 3E FFFO 3E FFEE 3E FFEC 3E FFEA 3F FFE8 3F FFE6 3F FFE4 3F FFE2 3
60. herein The information described here may contain technical inaccuracies or typographical errors Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss rising from these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corporation and Renesas Solutions Corporation by various means including the Renesas home page http www renesas com When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss resulting from the information contained herein Renesas Technology semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake Please contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or systems for transportation vehicular medical aerospace nuclear or undersea repeater use The prior written approval of Renesas Tech
61. input virtual interrupt and I O script procedures that can be set is limited to a total of 48 256 91 0 Script Procedure 1 in the example below defines the timer mode of timer AO In this example a timer AO interrupt is generated every divide by ratio number of cycles specified for the timer AO The value specified in the interrupt control register is referenced to determine the priority of this timer interrupt Procedure 2 in the example below defines a cycle synchronized virtual port input In this example data is input from virtual port to memory when the program has been executed 10 000 cycles Although the I O Timing Setting Window supports virtual port inputs in only bytes T O scripts allow for virtual port inputs in words or long words Definition example of I O script file Gomment statement Definition of procedure 1 example for virtual interrupt Beginning of procedure 1 whilef1 while statement iff 0x380 b amp 0x01 0x01 f Checks timer AQ s count start flag waite 0x386 w 1 Keeps execution of I O script waiting for the number ot eyele equal to the divide by ratio that is set for er AD int 21 0x55 amp Ox7 Generates a timer AD virtual interrupt Interrupt control register is referenced to determine jel st priority waiti 100 Keeps execution of I O script waiting for 100 instructions Terminates procedure 1 Definition of procedure 2 example
62. instruction execution is completed 12 2Simulation Specifications e Target program execution time measurement The target program execution time measurement is calculated from the number of cycles described above and the MCU clock and divide by ratio specified on the MCU tab of the Init dialog box Note Because the simulator s execution time measurement is calculated using the number of cycles described above it includes some error when compared with the actual chip s execution time e STOP WAIT BRK2 Executed as an NOP instruction Other instructions operate the same as those of the actual MCU e INT INTO UND BRK As with the actual MCU these instructions generate interrupts The INTO instruction only generates an interrupt when the O flag is 1 2 1 2 Resetting The SFR area is nonexistent in the debugger so the initialization as in the actual chip is not performed The cycle count is initialized to 0 Resetting is performed in the same way as the actual MCU A reset is also performed when the debugger starts The value FFFFO000h is set in the reset vector FFFFFFFCh to FFFFFFFFh immediately after starting The program counter is therefore set to FFFF0000h immediately after the debugger starts 13 2 1 3 Memory e Memory Space There is no processor mode If mapped for memory the whole 4GB of memory from 00000000h to FFFFFFFFh can be read from and written to as RAM Note however that in the initial st
63. interrupt Click to select the virtual interrupt you want to reenable from the list of virtual interrupts in the lower part of the dialog box Then click the Enable button Or you can double click on a virtual interrupt to reenable it Set Timer Dialog Load Save Interval go Add C usec Vector Close Priority J Temp Directory C WINDOWS TEMP Refer Timer x Vec 21 Priol Timel200 Imsec Del Vec 22 Priol5 TimeL500 Imsec Del All All Enable All Disable The reenabled virtual interrupt has its asterisk shown to the left of the virtual interrupt list disappeared To reenable all virtual interrupts click the All Enable button When you ve finished setting virtual interrupts click the Close button 6 2 10 8 5 Saving a virtual interrupt Click the Save button on the dialog box A file selection dialog box appears In this dialog box specify the file name to which to save virtual interrupts If the extension is omitted the extension stm is automatically added 62 10 36 Loading a virtual interrupt Click the Load button on the dialog box A file selection dialog box appears In this dialog box specify the file name from which to load virtual interrupts The virtual interrupts loaded from the file are added to the currently set virtual interrupts 121 6 2 11 Regarding Evaluation Timings of Virtual Port Inputs Virtual Interrupts and I O Script Files Set The virtual port input
64. interrupts of the same priority occur simultaneously If in the actual chip multiple interrupts of the same priority occur simultaneously they are resolved according to the priority levels set in hardware so that an interrupt of the highest priority is accepted For virtual interrupts however all interrupts belonging to one interrupt type e g peripheral I O interrupt are handled as having the same priority Therefore if virtual interrupts of the same priority occur simultaneously the order in which they are accepted is indeterminate There are following two methods to set virtual interrupts 1 By using the I O Timing Setting Window 2 By using the I O script function 16 2Simulation Specifications With either method the virtual interrupts are subject to the following limitations 1 Virtual interrupts set by using the I O Timing Setting Window Regarding interrupt control for virtual interrupts generated Each Interrupt Control Register s interrupt request bit is not set to 1 The priority levels set in each Interrupt Control Register s interrupt priority level select bit are not referenced The priority of virtual interrupts can be specified when setting virtual interrupts on the I O Timing Setting Window The Flag Register FLG s interrupt enable flag I flag and processor interrupt priority level IPL are referenced as in the actual chip Virtual interrupts set by using the I O script function Regarding inter
65. load module target program size is small e On demand method Debugging information is stored in a reusable temporary file on the hard disk of your computer Because the stored debugging information is reused the next time you download the same load module it can be downloaded at high speed This method is suitable when the load module target program size is large Notes e If the load module size is large the on memory method may be inefficient because it requires a very large amount of time for downloading In such a case select the on demand method e In the on demand method a folder in which to store a reusable temporary file is created in the folder that contains the downloaded load module This folder is named after the load module name by the word INDEX_ to it If the load module name is sample abs for example the folder name is INDEX_sample This folder is not deleted even after quitting the debugger 53 4 1 3 Script Tab The specified content becomes effective when the next being start hte p AV Refer 4 1 3 1 Automatically Execute the Script Commands To automatically execute the script command at start of Debugger click the Refer button to specify the script file to be executed hit File Refer By clicking the Refer button the File Selection dialog is opened The specified script file is displayed in the Init File field To disable auto execution of the script command erase a character
66. m Unknown 0 00 00 00 000 000 00 00 00 000 000 00 00 00 000 000 00 00 00 000 000 0 00 I By clicking the maximum execution time minimum execution time display area of each line you can search interrupt to the clicked line or process history at the maximum minimum execution time of the task The search result is pointed by the indicator which moves to the target position in the MR Trace window 228 6Windows Dialogs 6 16 2 Configuration of Ready State Duration Display Mode The ready state time display mode by task is used to display the results generated from statistical process of the time required from execution ready to transition to execution by task The statistical result is displayed within the range specified by the start marker and end marker in the MR Trace window Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 ID name Num Max Min sg taskl 11 GO 00 00 013 069 00700 00 000 013 0070000 005 961 task 3 00 00 00 000 080 00700 00 000 009 00 00 00 000 032 il 2 3 taskaj 2 00 00 00 000 083 00700 00 000 013 O0 00 00 000 048 4 taskt 2 00700 00 000 093 00 00 00 000 009 00 00 00 000 051 5 task5 2 OO 00 00 000 099 00700 00 000 012 00700 00 000 056 By clicking the maximum ready time minimum ready time display area of the desired line you can search the pro
67. not be entered In the Directory edit box enter the directory name in which the workspace will be created Click the Browse button to select a directory After a setting click the OK button 45 3 2 2 2 Step 2 Selecting of the Target Platform Select the target system used for your debugging emulator simulator A wizard starts and the following dialog box is displayed Setting the Target m for Debugging M16G PC4701 Emulator M16G R8C Compact Emulator M16G RSC FoUSB UART M16C R8C PC7501 Emulator Target type mes EH Next gt Finish re 1 Selecting of the Target type In the Target typel list box select the target CPU type 2 Selecting of the Target Platform In the Targets area the target for the session file used when this debugger is activated must be selected here Check the box against the target platform And choose other target as required And click the Next button 46 3Preparation before Use 3 2 2 3 Step3 Setting the Configuration File Name Set the configuration file name for each of the all selected target The configuration file saves the state of High performance Embedded Workshop except for the target emulator simulator New Project 6 7 Setting the Debugger Options 01 Emulator Debue_M16C_R8C_PC7501_Emulator Item Setting Mod ity The default name is already set If it is not necessary to change please click the next but
68. or Reduce button in the tool bar Or select Expand or Reduce from popup menu by right clicking on the window The display is expanded or reduced using the left corner of the graph area as the radix point By default the display is expanded or reduced with display scale of 1 5 The display scale appears in the Scale field in the status bar The default expansion reduction scale is 1 5 To change the scale select Value from popup menu by right clicking on the window The Value dialog is opened Specify the display expansion reduction scale Grid Time Rate ES 20 Reduce fam me 237 6 17 2 2 2 Change the grid line display interval Select Value from popup menu by right clicking on the window The Value dialog is opened Specify the time interval in the display Grid Time pnh p m fo 8 am mf us Rate Expand fi 500000 Reduce fi 500000 mest 6 172 2 3 Change the task display order Select Color from popup menu by right clicking on the window The Color dialog is opened Click the button corresponding to the desired item The Color Setting dialog is opened Change the display color in the dialog 238 6Windows Dialogs 6 172 2 4 Measure the Execution Time of Task By changing the start marker position and end marker position in the Task Trace window you can measure the execution time between the markers we Task Trace BIO amp am
69. recorded is the number of entries specified on the Init dialog box s I O Scrip tab reckoning from when the program started to run For example if data is written to port 0 address 3E0 by executing a program like the one shown below pragma ADDRESS portd 0H char port 0 out port cha data i port0 data Data is output to port 0 the data written to address 3E0 is recorded along with the cycle count in which the data was written 6 2 3 Virtual Interrupt This function defines interrupt generation Using this function you can generate timer interrupts or key input interrupts in a simulated manner without having to actually generate them There are following three types of virtual interrupts 1 Cycle synchronized interrupt A specified virtual interrupt can be generated when program execution has reached a specified number of cycles The diagram below shows an example of a virtual interrupt that is synchronized to machine cycles Example where virtual interrupt of software interrupt No 21 timer AO is defined Virtual interrupt Virtual interrupt Virtual interrupt is generated in is generated in the is generated in the 3 000th cycle 6 000th cycle the 9 000th cycle So SNE 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of cycles executed As shown above virtual interrupts in this case timer AO interrupt can be generated in any desired cycle 92 6Windows Dialogs 2 Executed addres
70. set memory address input value Function The input value is input to a specified memory address virtual port input to memory Left side expressions can be used to specify the memory address and right side expressions can be used to specify the input value Specifications of left side and right side expressions are described later For example if following statements are written set 0x3e0 Oxld data Ox1d is input to memory address 0x3e0 Format 2 set condition expression memory address input value 1 input value 2 Function The input value 1 input value 2 etc are sequentially input to a specified memory address each time the conditional expression is established Left side expressions can be used to specify the memory address and right side expressions can be used to specify the conditional expressions and input values Specifications of left side and right side expressions are described later For example if following statements are written set isfetch 0xf0000 0x3e1 0x10 0x20 isfetch becomes true established when the program executes a specified address data 0x10 and 0x20 are sequentially input to memory address 0x3el each time the program executes address 0xf0000 Namely data 0x10 is input to memory address 0x3el when address Oxf0000 is executed first and data 0x20 is input when the address is executed next Format 3 set macro variable right side expression Function The right sid
71. software manual for the number of cycles The cycles count indicated for the R8C Tiny Series is the number of cycles it takes to read or write 8 bits of data to or from the memory with no wait when the instruction codes are lined up in the instruction cue buffer Therefore depending on the conditions of the instruction cue buffer etc when the program is run on the simulator debugger the results may show half the number of cycles in comparison to the results when using the emulator debugger Please keep this in mind when using these measurements For more details concerning how to calculate the number of cycles for the R8C Tiny Series please refer to the R8C Tiny Series Software Manual 280 12Attention 12 5 Attention of the 740 Debugger 12 5 1 Options for compiler assembler and linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 6 Options for compiler assembler and linker The compiler that can be used by 740 debugger e the Assembler Package for 740 Family SRA74 e the IAR C Compiler 12 5 2 Not support functions e The simulator debugger for 740 does not support the real time tracing The following windows and script commands are not available Output Port Window Trace Point Setting Window Trace Window Data Trace Window TracePoint Command TraceDat
72. specify a repetition of virtual interrupt generation e You can specify that the priority levels set in the interrupt control register s interrupt priority level select bits be referenced to resolve the interrupt priority of virtual interrupts generated e As conditions for entering virtual port inputs or generating virtual interrupts you can specify a combination of program fetch memory access for read write or memory comparison In addition to the above various other I O settings are possible 9 1 Method for Writing I O Script This section explains the method for defining virtual port inputs virtual interrupts and other I Os to be written in I O script by using definition examples To define an I O script write a procedure for it Enclose a procedure with braces as you write it Multiple procedures can be written in one file In each procedure write settings timings etc of virtual port inputs or virtual interrupts Each of the multiple procedures thus defined are processed in parallel with program execution However the order in which each procedure is evaluated is indeterminate Register the I O script file you ve created in debugger using the popup menus Load in the I O Timing Setting Window Multiple I O script files can be registered However the total number of procedures that can be registered is limited to 50 Also if you are using the Printf function output function in the Output Port Window the number of virtual port
73. string displayed in the Init File field 54 4Setup the Debugger 4 1 4 Trace Tab Specify whether or not to enable trace measurement and when you chose to enable specify the trace buffer size In the 740 debugger this tab is not displayed The contents you specified here are also effective the next time you start the debugger Trace Buffer Size 22 K Cycles 1 256 K Cycles To perform trace measurement check Use Trace Function If trace measurement is disabled you cannot open the Trace Window and Trace Point Setting Window In the Trace Buffer Size area specify the size of the buffer in which to store the traced data in K Cycles 4 1 5 I O Script Tab Specify the number of data to be recorded by the I O Window or Output Port Window s port output function In the 740 debugger this tab is not displayed and the maximum number of data is 30000 The contents you specified here are also effective the next time you start the debugger Output Data Num 30000 3 Data 1 1000000 Data In the Output Data Num area specify the number of output data to be recorded 55 4 2 Simulator engine setup When Simulator engine simxx starts up it is registered in the system tray Ch Right clicking on the running simxx and selecting Version from the menu bar will open up the Version Information dialog box Use this Version Information dialog box to set up simxx Shown below is the Version Inform
74. symbols BreakAt Sets a software breakpoint by specifying a line No BreakIn Sets a software breakpoint by specifying a function BreakMode BM Sets and checks hardware break mode CD Specifies and checks the current directory Coverage CV Specifies and displays coverage measurement Cycle CY Sets and checks cycle counting Date Displays the date DisAssemble DA Disassembles memory contents line by line Down Displays a called function DumpByte DB Displays the contents of memory in 1 byte units DumpLword DL Displays the contents of memory in 4 byte units DumpWord DW Displays the contents of memory in 2 byte units Echo Displays messages Exec Executes external application Exit Exits the script file Express EXP Displays an assembler expression File Checks a filename and displays the contents of that file FillByte FB Fills a memory block with the specified data in 1 byte units FillLword FL Fills a memory block with the specified data in 4 byte units FillWord FW Fills a memory block with the specified data in 2 byte units Func Checks function names and displays the contents of functions Go G Program execution with breakpoints GoBreakAt GBA Run target program with software break point GoFree GF Free run program execution GoProgramBreak GPB Run target program with software break point HardwareBreak HB Sets and checks a hardware break HardwareBreakClear HBC Clears hardware breaks HardwareBreakClearAll HBCA Clears
75. the Stop button in the Task Trace window Or select Menu Trace Stopl The measurement results so far are displayed in the MR Trace window 6 15 2 3 Restart the Task Execution History Measurement Click the Restart button in the Task Trace window Or select Menu Trace Restartl When restarting the trace measurement all the measurement results so far are deleted 222 6Windows Dialogs 6 15 2 4 Refer the Execution History of Task You can reference the task execution transition in the MR Trace window _VEC table DFFDBO OFFD84 HAD el amp S hi ol R n Mark 00 0000 020 160 00 0000431 909 00 0000111 749 kuram 00 00 00 052 ed 4 Scale 2401435 00 00 00 032832 name DFFDSB SYSCALLZ if Idle taskl task2 task3 task4 On 6 task5 Unknown By moving the mouse to any information displayed in the window the following window is opened showing the detailed information Interrupt handling or task execution history System call issue history Task state transition history 223 6 15 24 1 Search the History of System Call Issue Click the Search button in the tool bar The Search dialog is opened Or select Menu Search tem Call Search Parameter Return Parameter RO Function Code RO Error Gode
76. the Event Flag Status In the MR window select Popup Menu Mode gt Event Flag MR CERLE DS H 4 RAR ID flg ptn flago 0000H 0000H 0000H 0000H 0000H 0000H 0000H 8 tasks 9 task s 6 14 5 1 Display the Event Flag Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the event flags defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of event flag flg ptn Bit pattern of each event flag flagQ Task ID Nos and task names in the event flag queue e When a task connected to the event flag queue is in the state of waiting with timeout enabled waiting in twai flg a string Itmol which indicates a state of waiting with timeout enabled is appended to a string displayed in the flag Q field When a task connected to the event flag queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the flag Q field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 _task26 sl Display when in WAIT SUSPEND with time out 26 task26 tmol s e Up to 8 characters can be displayed in the task name in the flag Q field If a task name exceeds 8 characters the extra characters are omitted 204
77. the execution history at any position or to continue execution of the target program specify the trace event and change the trance range 1 3 2 Trace Condition Setting The following designations are available as trace events Address designation Instruction fetch Memory access Bit access External trigger designation eight events Interruption The number of events that can be specified are six events of all These break events can be combined as below Trace when all of the valid events are established AND condition Trace when all of the valid events are established at the same time And same time comdition Trace when one of the valid events is established OR condition Trace upon entering a break state during state transition State Transition condition You can select specified task only or other than specified task as the trace condition to meet the real time OS 1 3 3 Trace Data Write Condition Trace data write conditions can be specified You can specify the following write conditions Write conditions unlimited default Cycles from the start event established to the end event established Only cycles where the start event is established Cycles from the start event established to the start event unestablished Other than cycles from the start event established to the end event established Other than cycles where the start event is established Other than cycles from the start event establishe
78. the list box of the window s Write Condition item Write Condition Total v To specify conditions 2 to 4 choose Pick Up and click the Detail button to open the Realtime trace Write Condition dialog box Write Condition Pick up v e For condition 2 choose the Mode shown below and set the Start and End events Realtime trace Write Condition Setting Mode _ Me Start 180 6Windows Dialogs e For condition 3 choose the Mode shown below and set the Start event Realtime trace Write Condition Setting Mode TT Start Similarly when specifying conditions 5 to 7 choose Exclude and click the Detail button to open the Realtime trace Write Condition dialog box Write Condition Exclude v 181 e For condition 5 choose the Mode shown below and set the Start and End events Realtime trace Write Condition Cancel 182 6Windows Dialogs e For condition 7 choose the Mode shown below and set the Start event Realtime trace Write Condition Setting Start End 183 6 11 Trace Window The Trace Window is used to display the results of real time trace measurement The debugger for 740 doesn t support this function The measurement result can be displayed in the following display modes e Bus mode This mode allows you to inspect cycle by cycle bus information T
79. the maximum and minimum addresses of the stack and to determine how much the program has used of what part of the stack The stack monitoring continues from the time that a Go or GoFree command is invoked until it is interrupted the maximum and minimum values being recorded for the two stack pointers USP and ISP registers If while the program is running it causes a change in the value of a stack pointer monitoring of stack utilization of that stack stops at that point 18 2Simulation Specifications 2 2 Simulation Specifications for M32C 2 2 1 Operation of Instructions Regarding the number of instruction cycles Time management is exercised in units of cycles The number of cycles is represented by the values listed in the microcomputer s software manual However this differs from the actual chip in the following points The bus width queue and wait states are not considered when measuring the number of cycles The executed cycle of an interrupt sequence is not considered when measuring the number of cycles When an interrupt occurs the executed cycle of an interrupt sequence is 0 This debugger starts counting cycles immediately after a reset Cycles immediately after a reset are 0 The number of cycles needed to execute one machine instruction are added on for each instruction executed See Figure shown below Note Because the number of cycles measured by the simulator does not take into account the bus wi
80. to know an approximate number of cycles and the execution time of the program you ve executed The number of cycles are represented using the values listed in the microcomputer s software manual The execution time refers to the target program s execution time calculated from the cumulative number of cycles of the CPU instructions executed and the MCU clock and divide by ratio specified on the Init dialog box s MCU tab 2 2 6 Stack Utilization Monitor The StackMonitor SM Command Use the StackMonitor command to check the maximum and minimum addresses of the stack and to determine how much the program has used of what part of the stack The stack monitoring continues from the time that a Go or GoFree command is invoked until it is interrupted the maximum and minimum values being recorded for the two stack pointers USP and ISP registers If while the program is running it causes a change in the value of a stack pointer monitoring of stack utilization of that stack stops at that point 25 2 3 Simulation Specifications for M16C R8C 2 3 1 Operation of Instructions e Regarding the number of instruction cycles Time management is exercised in units of cycles The number of cycles is represented by the values listed in the microcomputer s software manual However this differs from the actual chip in the following points The bus width queue and wait states are not considered when measuring the number of cycles The executed
81. to the cycles location called an element where you want data to be set then double click the left mouse button Or you can scroll the screen to go to the desired location 2 Input data in the selected place using a hexadecimal number The data size that can be input is one byte from 0x0 up to OxFF 3 Repeat steps 1 and 2 as many times as the number of data you want to set When you finished entering all data press the Next button dialog box for saving the virtual port input data you ve set to a file virtual port input file will appear EE Save nf My Computer v Dg F r 314 Floppy A SI SYSTEM C SJ DATA D Compact Disc E Compact Disc F JSUBSYS G File name Jinputiog Save as type fio Script Files ios v Cancel pr Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into the simulator debugger back again by using the Load menus in the I O Timing Setting window When you ve input a file name press the Save button Thus you ve finished setting the cycle synchronized virtual port inputs 104 6Windows Dialogs 6 2 8 2 Setting Read Access synchronized Inputs To set read access synchronized virtual port inputs choose the Setup menus in the I O Timing Setting Window The dialog box shown below will appear Set this item Setup Dialog Here choose the item Set Virtual Port I
82. trace range the execution history is displayed in the Task Trace window immediately after the trace memory is filled or immediately after the target program stops When you select Break for the trace range the execution history is displayed in the Task Trace window immediately after the target program stops You can stop task execution history measurement To do this click the Stop button in the Task Trace window Or select Trace Stop from popup menu by right clicking on the window To restart task execution history measurement click the Restart button in the Task Trace window Or select Trace Restart from popup menu by right clicking on the window 236 6Windows Dialogs 6 17 2 2 Refer the Execution History of Task You can reference task trace transition in the Task Trace window s t Task Trace EIT el he ot a Mark 00 00 00 000 442 00 00 01 847 055 00 00 01 846 612 Indicator 00 00 00 940 805 Scale 6 939931 Grid 00 00 01 850 572 Area Break ID name D AHCB ENT task2 task3 task4j task5 task6 task l l y Olin in Nea tasks task9 task10 nknown wo Oo pa ae ae a By moving the mouse to the information displayed in the window a window of the following example is opened showing the detailed information 6 172 2 1 Change the display magnification Click the Expand button
83. value is written to a specified memory address or according to logic 1 or 0 in bits LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or Qin bits Text Display a text string 2 3 5 Cycle Count The CYcle CY Command Use of the CYcle command allows you to know an approximate number of cycles and the execution time of the program you ve executed The number of cycles are represented using the values listed in the microcomputer s software manual The execution time refers to the target program s execution time calculated from the cumulative number of cycles of the CPU instructions executed and the MCU clock and divide by ratio specified on the Init dialog box s MCU tab 2 3 6 Stack Utilization Monitor The StackMonitor SM Command Use the StackMonitor command to check the maximum and minimum addresses of the stack and to determine how much the program has used of what part of the stack The stack monitoring continues from the time that a Go or GoFree command is invoked until it is interrupted the maximum and minimum values being recorded for the two stack pointers USP and ISP registers If while the program is running it causes a change in the value of a stack pointer monitoring of stack utilization of that stack stops at that point 32 2Simulation Specifications 2 4 Simulation Specifications for 740 2 4 1 Operation of Instructions e Regarding the number of ins
84. which indicates double waiting is appended to a string displayed in the ID name field Normal display 26 _task26 Display when in WAIT SUSPEND 26 _task26 sl 202 6Windows Dialogs 6 14 4 2 Display the Timeout Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 The function of each item is as described below Tasks waiting at present are displayed in the descending order of timeout value When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents Tmout Shows the timeout value ms of each task ID Name Shows the ID No and task name of the tasks in the timeout queue e Following character strings are used to indicate the type of wait state Character string Wait state slp Wait due to tslp tsk dly Wait due to dly_tsk flg Wait due to twai_flg sem Wait due to twai_sem mbx Wait due to trev_mbx mpf Wait due to tget_mpf sdtq Wait due to tsnd dtq rdtq Wait due to trev dtq vsdtq Wait due to vtsnd_dtq vrdtq Wait due to vtrev_dtq e When a task connected to the timeout queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the ID Name field Normal display 26 _task26 Display when in WAIT SUSPEND 26 _task26 I s 203 6 14 5 Display
85. window in which you can register specific addresses as watchpoints and inspect memory contents at those addresses If a registered address resides within the RAM monitor area the memory content at that address is updated at given intervals by default every 100 ms during program execution Toolbar at ASMWatch 080000 RUNt sk 080655 BufTsk7 1 084620 Dbe_cnt O108CB 4 Dbz_mode2 Address Bit No Data Length Expression Radix e The addresses to be registered are called the watchpoints One of the following can be registered Address can be specified using a symbol Address Bit number Bit symbol e The registered watchpoints are saved in the debugger when the ASM watch window is closed and are automatically registered when the window is reopened e If symbols or bit symbols are specified for the watchpoints the watchpoint addresses are recalculated when downloading the target program e The invalid watchpoints are marked by lt not active gt when displayed on the screen e The order in which the watchpoints are listed can be changed by a drag and drop operation e The watchpoint expressions sizes radixes and datas can be changed by in place editing ATTENTION e The RAM monitor obtains the data accessed through the bus Any change other than the access from the target program will not be reflected e Ifthe display data length of the RAM monitor area is not 1 byte the data s access attribute to th
86. 0 00 01 568 600 ID name Hun Max Run Time Hin Run Time Avg Run Time Total Run Time Ratios 10 25 50 75100 Y J 1 00 00 00 005 195 00700 00 005 195 00700 00 005 195 00700 00 005 195 0 33 H 1 mainj 115 00700 00 007 305 00700 00 000 767 00700 00 001 541 00700 00 177 287 11 30 H i 2 task002 12 00700 00 012 067 00700 00 006 915 00700 00 011 552 00700 00 138 630 6 64 3 task003 12 00700 00 012 597 00700 00 006 892 00700 00 012 111 00 00 00 145 332 9 27 m H i 4 task004 12 00700 00 012 170 00700 00 006 505 00700 00 011 604 00700 00 139 252 8 85 mm 5 task005 12 00700 00 012 277 00700 00 006 577 00700 00 011 795 00700 00 141 540 3 02 mm I H i 6 task006 11 00700 00 013 435 00700 00 006 490 00700 00 012 353 00 00 00 135 885 8 56 m 7 task007 11 00700 00 013 020 00700 00 006 790 00700 00 012 431 00700 00 136 745 6 72 m H i 8 task008 11 00700 00 014 080 00700 00 008 055 00700 00 013 232 00700 00 145 552 9 28 mm I 9 task009 11 00700 00 013 642 00700 00 007 277 00700 00 012 663 00 00 00 139 295 8 88 m i i 10 taskOl0 11 00700 00 013 710 00700 00 008 070 00700 00 012 795 00700 00 140 752 8 97 m 11 taskOll 11 00700 00 011 892 00700 00 006 290 00700 00 011 193 00700 00 123 132 7 65
87. 0 1 Writing C C Expressions You can use C C expressions consisting of the tokens shown below for registering C watchpoints and for specifying the values to be assigned to C watchpoints Token Example Immediate values 10 Ox0a 012 1 12 1 0E 3 Scope name classname member Mathematical operators He Pointers Kra Reference amp Sign inversion Member reference using dot operator Object Member Member reference using arrow Pointer gt Member this gt Member Pointers to Members Object var Pointer gt var Parentheses Q Arrays Arrayl 2 DArrayl2 3 Casting to basic types int char unsigned long Casting to typedef types DWORD ENUM Variable names and function names var i j func Character constants A b Character string literals abedef I am a boy 10 1 1 Immediate Values You can use hexadecimals decimals octals as immediate values Values starting with Ox are processed as hexadecimals those with 0 as octals and those without either prefix as decimals Floating point numbers can also be used to assign values to variables Notes e You cannot register only immediate values as C watchpoints e The immediate value is effective only when it is used in C C language expressions that specify C C watchpoints or when it is used to specify the value to be assig
88. 00 00 055 299 05006 00047E oo W 00 00 00 055 299 05001 00047F 06 W 00 00 00 055 299 05000 000480 oo UVW 00 00 00 055 299 GLOBAL C 47 global struct m struct m uchar 0x10 i 04995 000481 oo UVW 00 00 00 055 300 04994 000482 oo Ww 00 00 00 055 300 vi 187 6 11 4 Configuration of Source Mode When only source mode is selected trace information is displayed in source mode Source mode is configured as shown below OFOGCB global char A OFOOCF global_short 2 OFOODS global long 3 OFOOGDB global struct m char B global struct m short 5 global struct m long 6 DOFOOEB global struct m struct m uchar 0x10 OFOOEF global struct m struct m ushort 0x20 global struct m struct m uint 0x30 OFOOFB for i 0 i lt 5 i OFO104 for 3 0 3 lt 5 j OFO10D global array i j 0 1 2 3 4 1 Line number display area Shows the line number information of the displayed file Double click here to bring up a dialog box to change the displayed file 2 Address display area Shows addresses corresponding to source lines Double click here to bring up a dialog box to search for addresses 8 Referenced cycle display area Shows the currently referenced cycle that is marked by gt gt Furthermore the addresses corresponding to source lines if any are marked by 4 Source display area Shows the content of the
89. 00 055 299 05006 00047E 00 00 00 055 299 05001 00047F 00 00 00 055 299 05000 000480 00 00 00 055 299 04995 000481 00 00 00 055 300 04994 000482 00 00 00 055 300 04989 000483 00 00 00 055 300 04984 000484 00 00 00 055 300 04977 000486 00 00 00 055 301 04972 0007E4 00 00 00 055 301 04971 0007E4 00 00 00 055 301 04964 0007E2 00 00 00 055 302 04963 0007E2 00 00 00 055 302 04957 0007E4 00 00 00 055 302 04949 0007E2 00 00 00 055 302 04939 global array 000444 00 00 00 055 303 04938 0007E2 00 00 00 055 303 04935 0007E2 00 00 00 055 303 04929 0007E2 00 00 00 055 304 00 00 00 055 304 no nn NN N55 3N5 x 04924 0007E4 Abele eao badra hdd kr N4916 iNNN7E2 1 Data access display area Shows data access information If the information displayed here is 000400 1234 W for example it means that data 1234H was written to the address 000400H in 2 byte width Other display areas are the same as in bus mode In addition to data access information the window can display source line information in combination In this case the display will be similar to the one shown below Renee 20511 00000 EIN fer bed TE UTEN TETTE Cycle Label Datazccess hh m 8 ms us GLOBAL C 44 global_struct m short 5 05012 global struct 000470 42 W 00 00 00 055 299 GLOBAL C 45 global struct m long 6 05007 00047D 05W 00
90. 1 Setting Cycle synchronized Interrupts To set cycle synchronized virtual interrupts choose the Setup menus in the I O Timing Setting Window The dialog box shown below will appear Select this item Setup Dialog Select Type Set Virtual Port Input Set Virtual Port Output Cancel Here choose the item Set Virtual Interrupt and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual interrupt timings will appear 112 6Windows Dialogs Setup Dialog Q Re Oued HANNE Ser Expression can be input here First choose Cycle in the Interrupt Generation Timing column Next specify the cycles at which you want a virtual interrupt to be started and ended for Start cycle and End cycle respectively using decimal numbers Then specify the vector number and the priority of the virtual interrupt to be generated for Vector and Priority respectively using decimal numbers Then press the Next button Or press the Prev button here if you want to return to the previous dialog box A matrix dialog box for setting virtual interrupts will appear 113 Setup Dialog Finds the previous data you ve set UP or the next data DOWN The setup example in this element specifies that virtual interrupt be generated at the 10 007th cycle Point to the desired elemen
91. 2 Analyze the Execution History of Task rrrerrrrnrvnrvrrrrrrrrnsnnrnrrensrrrnennrnrnrnssrnsennrnnnensnee 241 7 Table of Script Commands 242 7 1 Table of Script Commands classified by function ererrervrrrarvrrvrrrervrervervrsvarvervsrservrersesvenvere 242 7 1 1 Execution Commands ccccccccssscessscecesssececsescecessseeecsesaeeecseseeceeaeeecsesuececseeeeessseeeeseaas 242 7 1 2 File Operation Commands iis cscccciccscotsecsecescecsecvecsceccesvesescevtedtectseessoubetteedsosvenucctasesesses 243 7 1 3 Register Operation Commands ccccsssssscsececsesssececececsessaeceeececsessssseeeeeeceensseseeeeeees 243 7 1 4 Memory Operation Commands ccccsessssccececeessssececececeesessececececsessusceeeeessensseaeeeeeees 243 7 1 5 Assemble Disassemble Commands cccccssccesssececeessececseseecessneeecseueeeceuseeeessueseenenaes 244 7 1 6 Software Break Setting Command cccccccccesssssscecececsesssececececsesssseseeceecsenssssseeeeeees 244 7 1 7 Hardware Break Setting Command ccccccccccsssssscccececsesssseceeececsesssseceeeeeceensasaeeeeeees 244 7 128 Real time Trace Commands oecon e E E TEE E R E a i 244 7 1 9 Coverage Measurement Command cccccccesesssssssecececsessaececececsessssceeececsensasseeeeeees 245 7 1 10 Stack Utilization Monitor Command rrrsnorornnnrrrrssnnrrrrssnnversnnrnrsrennrnrrssnsrsrsnnrsesssnnnenr 245 7 1 11 Cycle Count Monitor Command c ccccccccccccesessssseceeece
92. 274 10C C Expressions 10 2 8 When No C Symbol is Found If the calculated expression contained a C symbol that could not be found it is displayed as follows x lt not active gt all Radices 10 2 9 Syntax Errors e When the calculated expression contains a syntax error it is displayed as follows str p lt syntax error gt all Radices where str p is the syntax error 10 2 10 Structure and Union Types e When the result of calculation is a structure or union type the address is displayed in hex as follows Data v 0x1234 all Radices If as in structures and unions the C C expression consists of members a is displayed to the left of the type name tag name KP gn indicating structure or union Value unsigned char str OxFOOOO 89 unsigned char str 89 y struct DATA pData 0x408 struct Answer ans 0x82B unsigned char ch 100 d signed int nID 3980 Bs 11 ttre I a You can double click on lines indicated by a to see the members of that structure or union The changes to a while the members are displayed To return to the original display double click the line now indicated by the This function allows you to check the members of structures and unions Attention If a variable is declared with the same name as the type definition name declared by typedef you cannot reference that variable e Register Variables When
93. 2cf xcl 2 Edit the XCL file Add the command line option y to your XCL file The designation of y option varies depending on the product Product Name y Option The debugger for M32C yspe The debugger for M16C R8C yspe 3 Build your program after the setting above In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 6 4 When Using the IAR C Compiler EW Please specify the project setting by following process 1 The Setting in the IAR Embedded Workbench When you select the menu Project gt Options the dialog for Options For Target target will open In this dialog please select the XLINK as category and set the project setting Output Tab In the Format area check the Other option and select the ieee 695 as Output Format Include Tab In the XCL File Name area specify your XCL file ex Inkm16c xcl 2 Edit the XCL file Add the command line option y to your XCL file The designation of y option varies depending on the product Product Name y Option The debugger for M32C ylmb The debugger for M16C R8C ylmb The debugger for 740 ylmba 3 Build your program after the setting above In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the abo
94. 3 2 Method of making MCU file the M32C Debugger In the MCU file write the following contents in the order listed below For the file name specify the MCU name For the extension specify mcu MCU type 0 or 1 UARTO Transmit Receive Control Register 1 address UART1 Transmit Receive Control Register 1 address UARTO Transmit Buffer Register address UART1 Transmit Buffer Register address SEE 00 N The MCU type only needs to be specified for the M32C Debugger 0 Selects the M16C 8x 1 Selects the M32C 8x Write each address in hexadecimal Do not add the prefix that represents the radix 4 3 2 1 Example 0 3A5 3AD 3A2 3AA 58 4Setup the Debugger 4 3 3 Method of making MCU file the M16C R8C Debugger In the MCU file write the following contents in the order listed below For the file name specify the MCU name For the extension specify mcu UARTO Transmit Receive Control Register 1 address UART1 Transmit Receive Control Register 1 address UARTO Transmit Buffer Register address UART1 Transmit Buffer Register address Reset Vector address Undefined Instruction Interrupt Vector address Overflow Interruput Vector address BRK Instruction Interrupt Vector address DENON Ob I Nr Write each address in hexadecimal Do not add the prefix that represents the radix 4 3 3 1 Example 3A5 3AD 3A2 3AA FFFFC FFFDC FFFEO FFFE4 59 4 3 4 Method of making MCU
95. 4 2 2 Display the Task Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the tasks defined in the configuration are listed in the order of ID number The function of each item is as described below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Items Contents ID Task ID Name Task name Pri Priority Status 1 Task status Wupent Wake up count Actent Activated count Tmout Timeout value Flgptn Wait bit pattern of event flag Wfmode 2 Wait cancellation condition of event flag 199 e 1Task Status Display Status RUN Run status RDY Ready Status SUS Suspend status DMT Dormant status WAI SLP Sleep state WAI SLP SUS Sleep state double wait WAI DLY Time wait state due to dly_tsk WAI DLY SUS Time wait state due to dly_tsk double wait WAI FLG Event flagwait status WAI FLG SUS Event flagwait status double wait WAI SEM Semaphore wait status WAI SEM SUS Semaphore wait status double wait WAI MBX Message wait status WAI MBX SUS Message wait status double wait WAI SDTQ Transmission data wait status WAI SDTQ SUS Transmission data wait status double wait WAI RDTQ Reception data wait status WAI RDTQ SUS Reception data wait status double wait WAI VSDTQ Transmission extended data wait status WAI VSDTQ SUS Transmission extended data wait
96. 5 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Add Add C watchpoint Remove Remove the selected C watchpoint Remove All Remove all C watchpoints Initialize Reevaluates the selected C watchpoint Set New Value Set new data to selected C watchpoint Radix Hex Display in Hexadecimal Bin Display in Binary Default Display in Default Radix Toggle All Variables Change radix toggle Refresh Refresh memory data Hide type name Hide type names from variables Show char as string Selects whether to display char type as a string Sort Sort by Name Sort variables by its name Sort by Address Sort variables by its address RAM Monitor Enable RAM Monitor Switch enable or disable RAM moniter function Sampling Period Set RAM monitor sampling period Add New Tab Add new tab Remove Tab Remove the selected tab Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 128 6Windows Dialogs 6 6 Coverage Window The Coverage window allows you to reference the coverage measurement result of the functions of the target program downloaded The coverage which can be measured is CO coverage Two types of windows are provided the Coverage window in which yo
97. 7 18 19 20 2122 23 24 25 26 27 28 29 30 3132 33 ErinnsnieniunnneRnn En lt gt 89 6 2 1 Virtual Port Input Virtual Port Input refers to a function that defines changes in the data that is input from external sources to a specified memory address Use of this function makes it possible to simulate data inputs to the ports defined in the SFR The defined input data can be referenced by displaying it in chart numeric hexadecimal or graphic mode There are following three types of virtual port inputs 1 Cycle synchronized input The input data can be written to memory when program execution has reached a specified number of cycles The data size that can be input is one byte The diagram below shows an example of a virtual port input that is synchronized to machine cycles Data 20 is input Data FF is input Data 1D is input in the 2 000th in the 5 000th in the 9 000th cycle cycle cycle GE a a EU UNE NG 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of cycles executed As shown above data can be input to memory address 3E0 in any desired cycle as specified by the user 2 Read access synchronized input Data can be input when the program accesses a specified memory location for read The data size that can be input is one byte The diagram below shows an example of a virtual port input that is synchronized to memory accesses for read pragma ADDRESS port 3e0H char port 0 read port char
98. 78 pk msg R3j H 12 E OK 00 00 00 098 327 20 rev msg mbxid D 1 ered 22 pk msg Rlj 22 pk 00 00 00 111 362 x By clicking the desired line you can search the system call issuance history to the clicked line The search result is pointed by the indicator which moves to the target position in the MR Trace window 229 6 16 4 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Run Time CPU occupancy status display mode Rdy gt Run Ready state duration display mode System Call System call history display mode Pick Up System Call Extract specified system calls display mode Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 6 16 5 Analyze the Execution History of Task 6 16 5 1 Analyze the Execution History of Task You can reference the execution history statistical processing in the MR Analyze window The MR Analyze window functions together with the MR Trace window If the MR Trace window is not open or the MR Trace window does not show any data the MR Analyze window will not function The execution history statistical processing function allows you to reference the following topics 6 16 5 1 1 Refer the CPU Occupation State Click the Run Time button in the tool bar Or select Menu Run Timel The MR A
99. 9 3 7 3 Hisread expression Format Hisread address Function The value of the expression becomes true 1 immediately after a specified memory address is accessed for read to read data from memory Otherwise the expression is false 0 For example the if statement below if isread 0x800 becomes true 1 if memory at address 0x800 had been accessed for read immediately before the if statement was evaluated 9 3 7 4 iswrite expression Format iswrite address Function The value of the expression becomes true 1 immediately after a specified memory address is accessed for write to write data to memory Otherwise the expression is false 0 For example the if statement below if iswirte 0x800 becomes true 1 if memory at address 0x800 had been accessed for write immediately before the if statement was evaluated 265 9 4 Method for Writing Left side Expressions Left side expressions can be written in memory addresses and macro variables of the set statement in T O script statements The following shows an example of an I O script statement using left side expressions set 0x3e0 Oxla set val 10 Left side expressions may be composed of the following e Macro variable e Memory variable Each part of left side expressions are described below 9 4 1 Macro Variables Macro variables are used by adding at the beginning of each variable name e Variable names following the percent char
100. C table ID name OFFD80 SYSCALLO 33 DFFDBA4 SYSCALL1 38 OFFD98 6 SESCAUL Idle taskij task2 task3j task4 task5 ini 60 8 The content of each item is as follows Items Contents VEC 1 Indicates a software interrupt number table Indicates the interrupt vector table number ID Indicates a task ID number name Indicates an interrupt routine name task name idle processing display idle and unknown name displayed unknown 219 When moving the mouse to the information displayed in the window the pop up window as below is opened showing the detailed information Interrupt handling or task execution history System call issue history Task state transition history ti Following information is displayed in the status bar e Time value at which start marker is positioned e Time value at which end marker is positioned e Time width of a range indicated by start and end markers e Time value at which indicator is positioned e Scale factor of display e Time width of grid line interval e Range of measurement trace result The grid lines are displayed using the start marker as the radix point The grid lines are displayed using the start marker as the radix point The scale is displayed using the time at which the start marker is positioned as 0 with the left forward in time set to minus
101. CU MiGc6x mcu Time Count Resource Refer MCU Clock fio MHz fi name shown in the table below 4Setup the Debugger hit M16G REG Simulator xi i t AIL Do not show this dialog box again Tab Name Product Name The debugger The debugger The debugger The debugger for R32C for M32C for M16C R8C for 740 MCU exist exist exist exist Debugging exist exist exist exist Information Script exist exist exist exist Trace exist exist exist ace I O Script exist exist exist aoe You can open the Init dialog using either one of the following methods e After the debugger gets started select Menu Setup gt Simulator gt System e Start Debugger while holding down the Ctrl key 51 4 1 1 MCU Tab The specified content becomes effective when the next being start MCU M16c6x mcu Time Count Resource MGU Clock fi 0 MHz Dividing ratio fi 4 1 1 1 Specifying the MCU file MCU M30626 MGU Refer Click the Refer button The File Selection dialog is opened Specify the corresponding MCU file e An MCU file contains the information specific to the target MCU e The specified MCU file is displayed in the MCU area of the MCU tab If the corresponding MCU file is not contained in the debugger emulation pod you must create a new MCU file To do this see the following Refer to 4 3 Method of making MCU file 4 1
102. E EEE EEE E de Saas area k teSile Raad asd oP Le 274 10 2 5 Function Types ccccccecsseseeececeseceeececeeecececececeeeeececeeeeeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 274 10 2 6 Reference Ty pesicscsiesetetecovscotesriov debs E E a tesen 274 10 2 7 Bit Field Types cccccccccssssssscesesecececeeecececececeeecececececeeeceeeeeceeeeeeeeeceeeeeeeeeeeeeeeeeeeeeeeeees 274 10 2 8 When No C Symbol is Found o ccccccccccccccsesscececececsesssceceecceesesssaeeeeeeeceesssaeeeeeeeesenees 275 10 2 9 Symtax Errorsuassssedkddrieotsdtsn aaee skis RTR SSA SKA BRAIN des PoE stedet 275 10 2 1O Structure and Union Ty pees iiss dosiebeevcesssiecsesee ade NN NR 275 Display the Cause of the Program Stoppage 276 Attention 12 1 Common Attention sirrini de nere sss So vee ei oles es a ie eee eee 12 1 1 File operation on Windows 12 1 2 Area where software breakpoint can be set s sssssseseererersrserrrreressererrererrererrrr rr er rr rr nn 277 12 1 3 Getor s t C variables aneen a Bee cee se GRS eee ettiin whee RE 277 12 1 4 Function name ity CE ojsisvsseqessseesssdrrssedrss ner Ee sr E dere n ENS sn EET eigne 278 12 1 5 Debugging multi modules rerererorornrnrernrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnnnrnnnrnrnrnnnvnrnvnrnvnnnnnnnne 278 12 1 6 Syncronized debugging ccccccccccccsessssececececsessececeeccecsesssseeeeeceesesssaeeeescecsenssaseeeeeeeeeaeea 278 19 1 7 Virtual port outputfunetions usrusporerdksunsernvnuakteennarnseanis
103. F FFEO 3F UuURWUNKHOSJAURWNHKHKEO 60 Tutorial Blank Page 62 5Tutorial 5 Tutorial 5 1 Introduction This section describes the main functions of this debugger by using a tutorial program The tutorial programs are installed to the directory YWorkSpaceYTutorial of the drive you installed High performance Embedded Workshop There are workspaces for each targets and each MCUs Please select the corresponding one to your system and open the workspace file hws from the menu Open Workspace The tutorial program is based on the C program that sorts ten random data items in ascending or descending order The tutorial program performs the following actions e The tutorial function generates random data to be sorted e The sort function sorts the generated random data in ascending order e The change function then sorts the data in descending order Note After recompilation the addresses may differ from those given in this section When using the assembler package for 740 family The tutorial program for the assembler package for 740 family is prepared If you use the assembler package for 740 family please use it e Please read this tutorial with replacing function names with subroutine name e g replace function sort with subroutine sort e About the source file name also please replace it with the corresponding one e The diagrams in this tutorial are for C program The displayed diagram f
104. J This is test ABDCDEFGHIJ This is test ABDCDEFGHIT 1 Lua Jes aa laula 09 e For the output port you can select any port or UARTO or UART1 which is the output destination for the Printf function For details about the Printf function output destination see the User s Manual of your Renesas C Compiler NCxx e The data which are output to ports can be saved to a specified file log file before being presented to the Output Port Window e The Output Port Window has a buffer that contains 10 000 bytes of the latest execution result Even when you forgot to specify a log file the data which are output to ports can be saved to a file view file e The output data is displayed on a window or output to a file when the target program has stopped 123 6 3 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Set Sets output port Colm Sets column Log On Open log file and start recording start output to file Off Close log file and end recording stop output to file View Save Save view buffer to file Clear Clear view buffer Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 124 6Windows Dialogs 6 4 ASM Watch Window The ASM watch window is a
105. Renesas Electronics does not warrant that 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 eq
106. Status sseororersosereoreressererreresrorerrrrererrerrrrrrer rese rr rr ena 214 ill 6 14 11 Display the Memory Pool Status ssosereorererserrereressererreresrrrerrrr enes rese rr rr er rese rn nn ena 215 6 14 12 Display theTask COPtexb 534 2020 nnr n rid is secs S E Gee I NI NON 217 6 15 MR Trace Windows ie ee 219 6 15 0 Extended Menusususskakekadkarroeam some aaceavesveassaes EET 221 6 15 2 Refer the Execution History of Task MRxx Window srervrrvrrvervrrrvevvrsvervrsvasvervseseesee 222 6 16 MRAfitalyze Window soadru klsornstadakadkanaskestars eaikelgek kant 228 6 16 1 Configuration of CPU Occupancy Status Display Mode ssserresersrsererrererserererr arr 228 6 16 2 Configuration of Ready State Duration Display Mode s sssesressrrsersrrrsrrrsrsrrrrssnnnrnnnnen 229 6 16 3 Configuration of System Call History Display Mode sssssssseserrererersererrerereerere rr ena 229 616 4 Extended Men s A a a knea aksene 230 6 16 5 Analyze the Execution History of Task s sssmsssssssrsererreresseserreresrorerrrrererrerrrr rr er rr nr rr rn ena 230 67 Task Trace Windomssaneudatansetntes sr anse dtsgveraascteccducsavecnsccseds Gaia sne ude 6 17 1 Extended Menus 6 17 2 Refer the Execution History of Task Taskxx Window a ssseeeessssrsrsrsrrsrersresrererirrsrenen 235 6 18 Task Analyze Window m eea iater n EEEE EE EOR ue LEEENA E EEE RR A LEEN EE 240 61S T Extended MEN S a a ee E sedd bones a ATA aae sedeti 240 6 18
107. Stores the 32K cycles 32K to 0 cycles to the point at which the target program stops Before Stores the 32K cycles 32K to 1 cycles to the point at which the trace point is passed About Stores the 32K cycles 16K to 16K cycles either side of the trace point After Stores the 32K cycles 0 to 32K cycles of trace data after the trace point Full Stores the 32K cycles 32K to 0 cycles of trace data after the trace starts 146 6Windows Dialogs 6 10 4 Specify the Trace Write Condition Conditions for cycles to be written to trace memory can be specified Realtime trace Write Condition Setting Mode 01 gt Start Total Writes all cycles Pick up Writes only the cycles where specified condition holds true Exclude Writes only the cycles where specified condition does not hold true Also following three write modes are supported Only cycles where specified event is established RK Cycles from where specified event is established to where specified event is not established en Cycles from where start event is established to where end event is established 6 10 5 Command Button The buttons on this window has the following meanings Button Function Reset Discards the contents being displayed in the window and loads contents from the simulator in which they were set Save Saves
108. Symbol gt ASMWatch C Watch Window View gt Symbol gt CWatch Coverage Window View gt Codel gt Coveragel Script Window View gt Script S W Break Point Setting Window View gt Break gt S W Break Points H W Break Point Setting Dialog Box View gt Break gt H W Break Points Trace Point Setting Window View gt Trace gt Trace Points Trace Window View gt Trace gt Trace Data Trace Window View gt Trace gt Data Trace GUI I O Window View gt Graphic gt GUI 1 0 MR Window View gt RTOS gt MR MR Trace Window View gt IRTOS gt MR Trace MR Analyze Window View gt RTOS gt MR Analyze Task Trace Window View gt RTOS gt Task Trace Task Analyze Window View gt RTOS gt Task Analyze The R32C debuggers are not supported The 740 debuggers are not supported For the reference of the following windows refer to the help attached to a High performance Embedded Workshop main part e Differences Window e Map Window e Command Line Window e Workspace Window e Output Window e Disassembly Window e Memory Window e IO Window e Status Window e Register Window e Image Window e Waveform Window e Stack Trace Window 6 1 RAM Monitor Window The RAM monitor window is a window in which changes of memory contents are displayed while running the target program The relevant memory contents are displayed in dump form in the
109. The following shows timings at which virtual interrupts can be generated 1 When program execution has reached a specified number of cycles 2 When the program has executed a specified address 3 Every specified time interval Virtual interrupts at the above timings can be defined from the I O Timing Setting Window Use of the I O script function the function that allows uses to define virtual port input or virtual interrupt makes it possible to write timer interrupt Differences between Virtual Interrupts and Interrupts in Actual Chip Virtual interrupts differ from interrupts in the actual chip in the following points 1 Special hardware interrupts cannot be generated as virtual interrupts Reset NMI DBC watchdog timer single step address match interrupts cannot be generated as virtual interrupts 2 If virtual interrupts of the same priority occur simultaneously If in the actual chip multiple interrupts of the same priority occur simultaneously they are resolved according to the priority levels set in hardware so that an interrupt of the highest priority is accepted For virtual interrupts however all interrupts belonging to one interrupt type e g peripheral I O interrupt are handled as having the same priority Therefore if virtual interrupts of the same priority occur simultaneously the order in which they are accepted is indeterminate There are following two methods to set virtual interrupts 1 By using the I O Timing
110. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry CENESAS 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 grant
111. Virtual Port Input and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box dialog box for setting up virtual port input timings will appear 107 Setup Dialog gt Expressions can be input ere Pr Cane First choose Interrupt in the Data Input Timing column Next enter an address for virtual port input in the Input Address column the address to which you want data to be input using a hexadecimal number Then enter the vector number of a virtual interrupt that signals timing for virtual port input in the Vector column For PD32RSIM the vector addresses are fixed Then press the Next button Or press the Prev button here if you want to return to the previous dialog box matrix dialog box for setting the virtual port input data will appear Virtual interrupt counts Setup Dialog Finds the previous data you ve set UP or the next data DOWN t The setup example in this element specifies that data OxFF be set when virtual interrupt occurs 7 times Double click on an element you want and set the desi red input value in it In this dialog box set the data you want to be actually input to memory Follow the procedure below to set data 1 Move the mouse cursor to the virtual interrupt counts location called an element where you want data to be set then double click the left mouse button Or y
112. You cannot use the names of registers as variable names e Uppercase and lowercase letters are differentiated in variable names e You can define a maximum of 32 macro variables Once defined a macro variable remains valid until you quit the debugger Macro variables are useful for specifying the number of iterations of the while statement 253 8 2 4 Register variables Register variables are used for using the values of registers in an expression Precede the name of the register with to use it as a register variable Use the following format The debugger for 740 can use _ instead of Product Name Register name The debugger for M32C PC USP ISP INTB FLB SVF SVP VCT DMD0 DMD1 DCTO DCT1 DRCO DRC1 DMAO DMA1 DCAO DCA1 DRAO DRA1 ORO OR1 OR2 OR3 OAO OA1 OFB OSB lt Bank 0 Register 1RO 1R1 1R2 1R3 1A0 1A1 1FB 1SB lt Bank 1 Register The debugger for M16C R8C PC USP ISP SB INTB FLG ORO OR1 OR2 OR3 OAO OA1 OFB lt Bank 0 Register 1RO 1R1 1R2 1R3 1A0 1A1 1FB lt Bank 1 Register The debugger for 740 PC A X Y S PS Uppercase and lowercase letters are not unique in register names You can specify either 8 2 5 Memory variables Use memory variables to use memory values in expressions The format is as follows Address data size e You can specify expressions in addresses you can also specify memory variables e The data size is specifi
113. a Command TraceList Command e The whole of the memory range is available for debugging with the simulator debugger for 740 The MAP command to assign memories is not supported It is not necessary to specify a range for coverage e The simulator engine for 740 can not detect factors of breaks Therefore the factors are not displayed in the Output window and the Status window Platform sheet e The debugger for 740 does not support stack tracing Therefore the following windows and script commands are not available Stack Trace Window Up command Down command Where command 281 12 6 Options for compiler assembler and linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 6 1 When Using NCxx When O OR or OS option is specified at compilation the source line information may not be generated normally due to optimization causing step execution to be operated abnormally To avoid this problem specify ONBSD or Ono Break source debug option together with O OR or OS option 12 6 2 When Using the Assembler Package for 740 Family Please assemble according to the following procedures and link
114. a new workspace In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select the Create a new project workspace radio button and click the OK button Creation of a new workspace is started The following dialog box is displayed New Project Workspace Projects GM GA AN Workspace Name gt gt Debugger only M16C PC7501 DOSample0 gt Debugger only M16G Starterk Project Name gt Debugger only RBC E SYSTEM DOSampledi gt Debugger only R8C E8 SYSTEM Directory D work H EW4 Samples M16C DOSample01 Browse CPU family M16G Tool chain None Properties seven 1 Select the target CPU family In the CPU familyl combo box select the target CPU family 2 Select the target toolchain In the Tool chain combo box select None In this case toolchain is not used When the toolchain has not been installed the fixed information is displayed in this combo box 3 Select the project type When the toolchain is not used it is displayed on a Project Typel list box as Debugger only Target Name Select it When two or more project types are displayed please select one of them 4 Specify the workspace name and project name In the Workspace Namel edit box enter the new workspace name In the Project Name edit box enter the project name When the project name is the same as the workspace name it needs
115. a to the specified address range Set as below Example Writing data to addresses ranging from 400h to 40Fh Al Set Event Status DATA ACCESS Adderss1 lt addr lt Address joo for Ba Al Set Event Status DATA ACCESS Not Specity HH po po o WRITE I Mask 172 6Windows Dialogs 6 10 7 3 8 Reading writing data to addresses outside the specified range Set as below Example Writing data to addresses below 7FFh Event Type DATA ACCESS x Address Data Setting Ranee addr lt Address v Address1 FF v Bl Address2 0040F gt Bl Function Source File 3 Function ACCESS WRITE ADDRESS 0007 FF CONDITION faddr lt 0007FF canes Al Set Event Status Event Type DATA ACCESS v Address Data Setting Range Not Specify gt Data 1 pooo Data 2 5000 Access WRITE v IT Mask 5000 ACCESS WRITE ADDRESS 0007FF CONDITION faddr lt 0007FF mest 173 6 10 8 Specify the Events Bit Access To specify a bit access event change the event select dialog box s Event Type to BIT SYMBOL The event is established when the specified bit at the specified address or specified bit symbol is accessed under specified conditions 6 10 8 1 Writing Reading a Specified Bit Set as below Example Writing 0 to bit 2 at address 400h Al Set Event Status BIT SYMBOL
116. a trace points TraceData TD Realtime trace data display TraceList TL Displays disassembled realtime trace data 244 TTable of Script Commands 7 1 9 Coverage Measurement Commands Command Name Short Name Contents Coverage CV Specifies and displays coverage measurement 7 1 10 Stack Utilization Monitor Command Command Name Short Name Contents StackMonitor SM Sets and checks stack utilization measurement 7 1 11 Cycle Count Monitor Command Command Name Short Name Contents Cycle CY Sets and checks cycle counting 7 1 12 Script Log File Commands Command Name Short Name Contents Script Opens and executes a script file Exit Exits the script file Wait Waits for an event to occur before command input Pause Waits for user input Sleep 5 Halts for user input until the specified time has elapsed Logon 5 Outputs the screen display to a log file Logoff Stops the output of the screen display to a log file Exec 2 Executes external application 7 1 13 Program Display Commands Command Name Short Name Contents Func A Checks function names and displays the contents of functions Up Displays the calling function Down Displays a called function Where 2 Displays a function call status Path Sets and chec
117. acter 26 may consist of alphanumeric characters and underscore _ However numbers cannot be used at the beginning of macro variable names e The values that can be handled by an expression that is substituted for macro variables are integers in the range of 0 to FFFFFFFF16 If negative numbers are used they are handled as 2 s complements When specifying a repeat count for the while statement use of macro variables should prove convenient set val 0 Macro variable val is assigned 0 while val while statement is repeated until val 10 waitc 10000 int 13 5 set val val 1 val is incremented by 1 9 4 2 Memory Variables This variable is used when writing values in memory The following shows a format of memory variables address data size e Expressions can be written in address Memory variables cannot be used e Specify data size as shown in the table below For byte size Borb For word 2 byte size W or w For long word 4 byte size Lorl e If specification of data size is omitted the data size is assumed to be byte long Example 1 When writing to memory at address 0x8000 in bytes set 0x8000 B 0x10 or set 0x8000 0x10 Example 2 When writing to memory at address 0x8000 in words set 0x8000 w 0x1234 Example 3 When writing to memory at address 0x8000 in long words set 0x8000 L 0x12345678 266 10C C Expressions 1
118. acters of the string are processed For example ABCD would be processed as CD or value 4344h 8 2 8 Operators The table below lists the operators that you can use in expressions e The priority of operators is indicated by the level level 1 being the highest and level 8 the lowest If two or more operators have the same level of priority they are evaluated in order from the left of the expression Operator Function Priority level O Brackets level 1 Kr Monadic positive monadic level 2 negative monadic logical NOT Dyadic multiply dyadic divide level 3 Ye Dyadic add dyadic subtract level 4 gt gt Right shift left shift level 5 amp Dyadic logical AND level 6 G Dyadic logical OR dyadic level 7 exclusive OR lt lt gt gt Dyadic comparison level 8 255 Settings of virtual port inputs or virtual interrupts can be written to a file in script form This script is called the I O script Also the files that contain a description of I O scripts are called the I O script file Using I O scripts you can set virtual port inputs and virtual interrupts in a more flexible manner than can be set from the I O Timing Setting Window For example you can make the following settings that cannot be made from the I O Timing Setting Window e If you want to generate a cyclic virtual interrupt like timer interrupts you can use the while statement to
119. ain use conditions Further Renesas 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 Electronic
120. all hardware breaks Label 5 Checks assembler labels Load L Downloads the target program LoadHex LH Downloads an Intel HEX format file Loadleee LI Downloads IEEE 695 absolute format files LoadMot LM Downloads a Motorola S format file LoadSymbol LS Loads source line ASM symbol information Logoff Stops the output of the screen display to a log file Logon Outputs the screen display to a log file Map Checks and sets mapping data Module MOD Displays modules names Move z Moves memory blocks MoveLword MOVEL Moves memory blocksGn 4 byte units MoveWord MOVEW Moves memory blocks in 2 byte units 247 MR Displays status of realtime OS MRxx OverStep O Overstep execution of source lines OverStepInstruaction OI Overstep execution of instructions Path 5 Sets and checks the search path Pause 3 Waits for user input Print Check value of specified C variable expression Radix 5 Sets and checks the radix for numerical input Register R Checks and sets a register value Reload Re downloads the target program Reset Resets the target MCU Return RET Executes a source line return ReturnInstruction RETI Executes an instruction return Scope 3 Sets and checks the effective local symbol scope Script Opens and executes a script file Section SEC Checks section information Set i Set s
121. ame name as the type definition name declared by typedef you cannot reference that variable Values cannot be changed for register variables and bit fields Values cannot be changed for 64 bit width variables long long double and so on Values cannot be changed for C C expressions that do not indicate the memory address and size For the sake of optimization the C compiler may place different variables at the same address In this case values of the C variable may not be displayed correctly Literal character strings can only be substituted for char array and char pointer type variables No arithmetic operations can be performed on floating point types No sign inversion can be performed on floating point types Casting cannot be performed on floating point types Casting cannot be performed on register variables Casting cannot be performed on structure types union types or pointer types to structure or union types Character constants and literal character strings cannot contain escape sequences 277 12 1 4 Function name in C When you input the address using the function name in setting display address setting break points and so on you can not specify the member function operator function and overloaded function of a class You can not use function names for C C expression No script commands e g breakin and func can be used in which function names are specified for arguments In address value specifying
122. and the right backward in time set to plus The grid lines allow you to roughly understand the interrupt occurrence cycle and process time The interval time width of the displayed grid lines appears in the Grid area of the status bar The time value in the MR Trace window means the execution elapsed time using the program execution start time as 0 in all the cases On the contrary the numeric value above the grid lines scale in the MR Trace window is a relative value using the start marker as 0 the grid interval is specified in the Value dialog It has nothing to do with the time value This is provided so that you can see the window easily Note The software interrupt number 1 is different according to product For details about which interrupt number is assigned to which system call refer to the MRxx Reference Manual Assemble Language Interface 220 6Windows Dialogs 6 15 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Start Marker Move the start marker in the display area End Marker Move the end marker in the display area Indicator Move the indicator in the display area Adjust Adjust range of start and end marker to full width of display area Adjust Expand Expand scale factor of display Reduce Reduce scale factor of display Trace Stop Stop measuring Trace Restar
123. anged If the downloaded program is the program generated by the assembler package for 740 family you can not watch variables in C watch window 5 2 9 1 Watching Variables For example set a watch on the long type array a declared at the beginning of the program by using the following procedure Click the left of displayed array a in the Editor Source window to position the cursor and select Add C Watch with the right hand mouse button The Watch tab of C watch window in which the variable is displayed opens Cwatch me mx 7 6 2 Der Er Watch Local File Local Global Name Value signed long 10 a Ox6c2 16838 The user can click mark at the left side of array a in the C Watch window to watch all the elements at CWatch olx mx s 16 2 Der zi Watch Local File Local Global Name Value signed long 10 a Ox6c2 16838 signed long la 0 16838 signed long la 1 5758 signed long la 2 10113 signed long a 3 17515 signed long a 4 31051 signed long la 5 5627 signed long la 6 23010 signed long a 7 7419 signed long la 8 16212 signed long la 9 4086 74 5Tutorial 5 2 9 2 Registering Variable The user can also add a variable to the C Watch window by specifying its name Click the C Watch window with the right hand mouse button and select Add from the popup menu The following dialog box will be
124. ariable name element No or variable variable name element No or variable element No or variable etc 10 1 12 Casting to Basic Types You can cast to C basic types char short int and long and cast to the pointer types to these basic types When casting to a pointer type you can also use pointers to pointers and pointers to pointers to pointers etc Note that if signed or unsigned is not specified the default values are as follows Basic type Default char unsigned short signed int signed long signed Notes e Of the basic types of C casts to bool type wchar t type and floating point type float or double cannot be used e Casts to register variables cannot be used 270 10C C Expressions 10 1 13 Casting to typedef Types You can use casting to typedef types types other than the C basic types and the pointer types to them When casting to a pointer type you can also use pointers to pointers and pointers to pointers to pointers etc Notes e You cannot cast to struct or union types or the pointers to those types 10 1 14 Variable Name Variable names that begin with English alphabets as required under C C conventions can be used The maximum number of characters for variable name is 255 And this pointer is available 10 1 15 Function Name Function names that begin with English alphabets as required under C conventions can be used In the case
125. at waiti number of machine instructions Function Execution of the next statement is kept waiting for a specified number of machine instructions Right side expressions can be used to specify the number of machine instructions Specification of right side expressions is described later For example if following statements are written waiti 100 set 0x800 0x10 the set statement is executed only after executing 100 machine instructions 9 2 2 2 waitc statement Format waite number of cycles Function Execution of the next statement is kept waiting for a specified number of cycles Right side expressions can be used to specify the number of cycles Specification of right side expressions is described later For example if following statements are written waitc 10000 set 0x800 0x10 the set statement is executed only after executing the program 10 000 cycles 258 91 0 Script 9 2 2 3 int statement Format int vector number priority Function The virtual interrupt of a specified vector number is generated in a specified order of priority Right side expressions can be used to specify the vector number and priority Specification of right side expressions is described later For example if following statements are written int 21 5 a timer AO vector number 21 interrupt is generated at priority level 5 9 2 2 4 set statement There are following three formats for the set statement Format 1
126. ate memory between 00010000h and 0003FFFFh and memory between 00050000h and FFFEFFFFh is not secured and an error will result if an attempt is made to access this part of memory If this occurs while a program is running the program will stop with an illegal memory access error Use the map function described later to map this part of memory e Memory Structure and Initial Values Immediately after Starting The memory is set up as follows immediately after starting the debugger 00000000h to 000003FFh SFR1 area Filled with OOh 00000400h to 0000FFFFh Filled with FFh 00010000h to 0003FFFFh No memory immediately after starting 00040000h to 0004FFFFh SFR2 area Filled with OOh 00050000h to FFFEFFFFh No memory immediately after starting FFFF0000h to FFFFFFFBh Filled with FFh FFFFFFFCh to FFFFFFh reset vector Set to FFFF0000h e The Map Function MAP Command The simulator divides the memory between 00000000h and FFFFFFFFh into 65536 equal parts so that the memory space can be mapped in 64KB blocks Note that the blocks with the lowest address 00000000h to 0000FFFFh and the next address 00040000h to 0004FFFFh with the highest address FFFF0000h to FFFFFFFFh are already mapped when the simulator starts Use the MAP command to map the simulator memory Memory mapped using this command is initialized with the value FF16 immediately after being allocated When downloading a target program the memory
127. ation e The C watchpoints can be sorted by name or by address e Values can be inspected in real time during program execution by using the RAM monitor function ATTENTION e You cannot change the values of the C watch points listed below Bit field variables Register variables C watch point which does not indicate an address invalid C watch point e Ifa C C language expression cannot be calculated correctly for example when a C C symbol has not been defined it is registered as invalid C watch point It is displayed as lt not active gt If that C C language expression can be calculated correctly at the second time it becomes an effective C watch point e The display settings of the Local File Local and Global tabs are not saved The contents of the Watch tab and those of newly added tabs are saved e The RAM monitor obtains the data accessed through the bus Any change other than the access from the target program will not be reflected e The variables which are changed in real time are global variables and file local variables only e Ifthe display data length of the RAM monitor area is not 1 byte the data s access attribute to the memory may varies in units of 1 byte In such a case that the access attribute is not unified within a set of data the data s access attribute cannot be displayed correctly In this case the background colors the access attribute color of the first byte of the data 127 6
128. ation dialog box of the simulator engine for the M16C and M32C series debugger Version Information X Sim30 M16C R amp C simulator engine Bsim30 Version 5 00 00 Exit Copyright C 1997 2004 Renesas Technology Corp and Ex Renesas Solutions Corp Application Information Interface CUT Option IV Auto exit MCU Status STOP e Auto Exit Switch Setting By checking the Auto exit check box simxx can be terminated at the same time the simulator debugger front end finishes e Communications Connection Status CONNECT is displayed when connected to the simulator debugger CUT is displayed when there is no connection e Simulator MCU Status RUN STOP RUN is displayed when the simulator MCU is running STOP when stopped e OK button Closes the Version Information dialog box e Exit button Exits simxx 56 4Setup the Debugger 4 3 Method of making MCU file 4 3 1 Method of making MCU file the R32C Debugger In the MCU file write the following contents in the order listed below For the file name specify the MCU name For the extension specify mcu 1 2 3 4 UARTO Transmit Receive Control Register 1 address UART1 Transmit Receive Control Register 1 address UARTO Transmit Buffer Register address UART1 Transmit Buffer Register address Write each address in hexadecimal Do not add the prefix that represents the radix 4 3 1 1 Example 365 36D 362 36A 57 4
129. atoesaw ates cade EERE E E wetegle weet 251 8 2 Constants rss nese dant estat see dates nee NAR 251 8 2 2 Symbols nd labels 2 esses sense sissi eNews Soe eh oc toss ssh aaah andakt ada debe kGadde 252 8 2 3 Macro Varia bles ci cscs cccsteccotes te covecs icc SR sods FSS DEN A casas NEN IRENE Ang vbaseassadederaevbeees 253 822 4 Re sisterWarla bles icsccsccsccecsc cesses A r teed enue E NAN HOS ON e e cuss adel 254 8 2 5 Memory variables rrrorerorerererererereverevevererevevevevevevevevevevevevevevevevesevevesevesevesevevevesesesesesens 254 S276 Lane Nossa riaa ae ae 254 8 2 7 Character constants aeeoe eieae ase ae aiaa a EEE r aA Enara oona rE EEEa E an 255 S e1 ON I AA EAE AAS E E EE A E E ee EAT S E E EEEE 255 9 I O Script 256 9 1 Method for Writing I O Script ccccceccecccececsessssececececcesssseceeccecsessseaecececsesesesecececsesenssaeeeeecs 256 lv 10 11 12 9 2 Composition of T O Scripta pensia a E EE danser ri Deren A EVE e E ASAT RT SERNER SALE NEVER 257 9 21 Proceduren neenon He Se 258 9 22 T O Script Statements seisisissvssdrsssseceseovsside ccvedsncectencesseovscauceveasseevecdceacedevenverucedieasveavecvertde 258 9 2 3 Judge Statements if else enenu nnen nne ie ens 260 9 2 4 Repeat Statement while and break Statement ccccccccessescsseseescsseseescsseseesesseseees 261 9 2 5 Comment Statements s cassette ican Goh teu dancunsn aden 261 9 3 Method for Writing Right side Expressi
130. ault The actual sampling cycle may take longer time than the specified cycle depending on the operating environment Sampling cycle depends on the following environments e Communication interface e Number of the RAM Monitor windows displayed e Size of the RAM Monitor window displayed e Number of ASM watch points within the RAM monitor area of the ASM Watch window e Number of C watch points within the RAM monitor area of the C Watch window 1 1 3 Related Windows The window where the function of the real time RAM monitor function can be used is shown below e RAM Monitor Window e ASM Watch Window e C Watch Window 1Features 1 2 Break Functions 1 2 1 Software Breaks Function Software Break breaks the target program before execution of the command at the specified address This break point is called software breakpoint The software breakpoint is set reset in the Editor Source window or in the S W Breakpoint Setting window You can also disable enable a software breakpoint temporarily You can specify up to 64 software breakpoints When specifying two or more software breakpoints the breakpoint combination is based on the OR logic Arrival to any one of breakpoints breaks the target program 1 2 1 1 Setting of software breakpoint The software breakpoint can be set by the following windows e Editor Source Window e S W Break Point Setting Window You can double click the mouse to set reset the software breakpoint i
131. can simulate data inputs to the ports defined in SFR The following shows timings at which data can be input to memory 1 When program execution has reached a specified number of cycles 2 When a specified memory location is accessed for read by a program 3 When a specified virtual interrupt is generated Virtual interrupts at the above timings can be defined from the I O Timing Setting Window Use of the I O script function the function that allows users to define virtual port input or virtual interrupt makes it possible to specify more elaborate data input timing such as when the program performs fetch or writes to memory or when it executed an instruction a specified number of times Virtual Port Output Function When a data write to some memory address by the program occurs this function records the written data value and the cycle at which the data was written The recorded data can be verified in graphic or numeric format from the I O Timing Setting Window The number of data entries that can be recorded by this function equals the number of data entries specified on the Init dialog box s I O script tab reckoning from the time at which the program started running When reexecuted the previous data is cleared The output port simulate function The output port simulate function provides an efficient means of simulation When data are written to some memory addresses by a program it allows you to record the written data values The recor
132. ce can be mapped in 64KB blocks Note that the blocks with the lowest address 000000h to OOFFFFh and the next address 010000h to 01FFFFh with the highest address FF0000h to FFFFFFh are already mapped when the simulator starts Use the MAP command to map the simulator memory Memory mapped using this command is initialized with the value FF16 immediately after being allocated When downloading a target program the memory is mapped automatically Note Memory space that has been mapped cannot be deleted Accessing an Area Without Memory There is no actual memory in the 253 memory blocks between 020000h and FEFFFFh unless memory is secured If an attempt is made to access this area an illegal memory access error occurs and execution of the command or program stops 21 2 2 4 I O SFR The actual chip s peripheral I Os other than the CPU core such as the timers DMAC and serial I O are not supported The SFR area 000000h to 0003FFh to which the peripheral I Os are connected is also handled as RAM by the simulator However a method is available that allows you to materialize data input to memory such as the SFR or interrupts such as timer interrupt in an artificial manner For details about this method see I O Script and Interrupts described later T O Script Virtual Port Input Function This function defines changes of the data that is input from external devices to a specified memory address Using this function you
133. cess history of the maximum ready time minimum ready time of the task corresponding to the clicked line The search result is pointed by the indicator which moves to the target position in the MR Trace window 6 16 3 Configuration of System Call History Display Mode The system call issuance history list mode is used to list the system calls issued The system call issuance history is listed within the range specified by the start marker and end marker in the MR Trace window The number indicates a numeric value counted from the top system call within the measurable range at MR Analyze Ev Mark 00 00 00 000 335 00 00 00164 498 00 00 00 164 163 No System Call Parameter Return Parameter TIME a 7 wai flg wfmode H 3 waiptn H 1 flgid D 1 E OK flgptn H l 00 00 00 000 501 8 wai sem semid D 1 E OK 00 00 00 000 533 9 rev msg mbxid D 1 E OK pk msgirlj H 1234 pk 00 00 00 000 565 10 wup tsk tskid D 2 E OK 00 00 00 000 594 ii slp tsk E OK 00 00 00 013 620 12 ram tsk tskid D 2 E OBJ 00 00 00 020 147 ag Set Ele secpen H i Agidi E OK 00 00 00 033 163 14 wai flg wimode H 3 waiptn H l flgid p l ercd 222 flgptn 22 00 00 00 046 203 H 15 ram tsk tskid D 3 E OBJ 00 00 00 052 734 16 sig sem semid D 1 E OK 00 00 00 065 751 17 wai sem semid D 1 ercd 222 00 00 00 078 780 18 rsm tsk tskid D 4 E OBJ 00 00 00 085 310 19 snd msg pk msg R1j H 56
134. csesssececececseseseeeeeeeceenssseseeeeeees 245 T 1 12 Sermpt Log File Commands eseese ee r e r ENN 245 7 1 13 Program Display Commands ccccsessssccececsessssececececeesesaeceeececsesssaeceeeeeceeneasaeeeeeees 245 TX FA Map Commi and s ass doses 265 och EEEE be Seuss cus tench Ba saat eek dobah EE E duets eS bode R R 246 7 1 15 C Language Debugging Commands cccccccccccssssssecececeesssececececsessseceeececeenssseseeeeeees 246 71516 Real time OS Command seren er e E EE E E A Ei 246 7 1 17 Utility Commands eaen a a E a a a aa 246 7 2 Table of Script Commands alphabetical order smsusssersrsrerrersresrsrerererrsresr sr ere rear sr en er enn 247 8 Writing Script Files 249 8 1 Structural Elements of a Script File sm sssesesesecssssoseseerereoserrrrerrrrrrrrr enes rrrrrrrr er rr ror rn rr rn soner renen sn 249 8 1 1 Script Command meorrovorerrrrssrerennrnrnerssernennrnrrenssessensnnrsenssresensnnrnensnsssenannrsnnsssssensnnnnenene 250 821 2 Assign Statement naa AE e EE T A O reisene 250 8 1 3 Conditional Statement sm sssmsssrsrrserrrrssrrrererrrerrrrssrrrrssrnrrrrr nee rr rr ere rr sr nr rr rr nr enn nr kr rr sn nr en nn sn 250 8 1 4 Loop Statement while endw and Break Statement ssssssssnssnsosrsrsrsrsrsrsrsrsrsnnnnen 250 8 1 5 Comment statements m ssmsssssssersrrrerrrersrrressrrrerrrrssrrrrssrnrrrrr rss rr rr ser rss RR rr rn Krk Rr rr kr Kr sann enn sn 251 82 Writing Expressions ra ao r tected aren Geeta dhe M
135. cursor to the read access counts location called an element where you want data to be set then double click the left mouse button Or you can scroll the screen to go to the desired location 2 Input data in the selected place using a hexadecimal number The data size that can be input is one byte from 0x0 up to OxFF 3 Repeat steps 1 and 2 as many times as the number of data you want to set When you finished entering all data press the Next button A dialog box for saving the virtual port input data you ve set to a file virtual port input file will appear Ta 2 Save in SE My Computer 7 ra fr 314 Floppy A SYSTEM C SJ DATA D Compact Disc E Compact Disc F SJ SUBSYS G File name finputiog Save as type flo Script Files ios v Cancel i Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into the simulator debugger back again by using the Load menus in the I O Timing Setting window When you ve input a file name press the Save button Thus you ve finished setting the read access synchronized virtual port inputs 106 6Windows Dialogs 6 2 8 3 Setting Interrupt synchronized Inputs To set interrupt synchronized virtual port inputs choose the Setup menus in the I O Timing Setting Window The dialog box shown below will appear Set this item Here choose the item Set
136. d 6 16 1 Configuration of CPU Occupancy Status Display Mode The CPU occupation state display mode is used to display the CPU occupation time and ratio by interrupt task The MR Trace window shows the statistical results within the range specified by the start marker and end marker CER IE Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 VEC table ID name Num Max Run Time Min Run Time Avg Run Time Total Run Time Ratio 0 25 50 75 100 32 OFFDSO SYSCALLO 17 00 00 00 000 033 00 00 00 000 013 00700 00 000 022 00 00 00 000 378 0 23 l i 33 OFFD84 SYSCALL1 5 00 00 00 000 020 00 00 00 000 019 00 00 00 000 019 00 00 00 000 099 0 06 38 OFFD96 SYSCALL2 3 00700 00 000 028 00 00 00 000 028 00 00 00 000 028 00 00 00 000 084 0 05 Idle 6 00 00 00 000 017 00 00 00 000 002 00 00 00 000 006 00 00 00 000 036 0 02 1 _task1 11 00 00 00 014 003 00 00 00 000 001 00 00 00 008 957 00 00 00 098 528 60 02 2 task2j 3 00 00 00 013 003 00700 00 000 002 00 00 00 008 669 00700 00 026 008 15 84 mmm 3 taskaj 2 00 00 00 013 006 00 00 00 000 003 00 00 00 006 504 00 00 00 013 009 7 92 m 4 task4j 2 00 00 00 013 003 00 00 00 000 001 00 00 00 006 502 00 00 00 013 005 7 92 m 5 1 task5 2 00 00 00 013 007 00 00 00 000 003 00 00 00 006 505 00 00 00 013 011 7 93
137. d tabs in front of the semicolon e Lines with comment statements are ignored when the script file is executed 8 2 Writing Expressions This debugger allows you to use expressions for specifying addresses data and number of passes etc The following shows example commands using expressions gt DumpByte TABLE1 gt DumpByte TABLE1 20 You can use the following elements in expressions e Constants e Symbols and labels e Macro variables e Register variables e Memory variables e Line Nos e Character constants e Operators 8 2 1 Constants You can use binary octal decimal or hexadecimals The prefix or suffix symbol attached to the numerical value indicates which radix is used The debugger for M32C and M16C R8C and 740 Hexadecimal Decimal Octal Binary Prefix 0x 0X None Suffix h H None 0 0 b B Examples 0xAB24 1234 12340 10010 AB24h 10010b You can only specify when the predetermined radix is hexadecimal e If you are inputting a radix that matches the predetermined radix you can omit the symbol that indicates the radix excluding binary e Use the RADIX command to set the predetermined value of a radix However in the cases shown below the radix is fixed regardless of what you specify in a RADIX command Type Radix Address Hex Line No Dec No of executions No of passes 251 8 2 2 Symbols and labels You can include symb
138. d to set the specified context register value of the specified task Set Context Data Task ID 14 Register py v Value fiz 0 Cancel Specify the register to be changed in the Register field list box and enter the value to be set in the Value field If an expression description set in the Value field is wrong or if the specified value is outside the allowable range set for the specified register an error occurs 218 6Windows Dialogs 6 15 MR Trace Window The MR Trace window measures the task execution history of a program using the real time OS and displays the result graphically The debugger for R32C doesn t support this function The debugger for 740 doesn t support this function In addition to the task execution history a history of various other operations each are traced and displayed including interrupt processing task state transition and system call issuance This window is available only when a target program which uses our real time OS MRxx is downloaded For MR30 e For MR30 this window is available for V 2 00 or later version If a target program crated on MR30 V 1 00 is downloaded the MR Trace window will not function and not display any data For MR308 e The history of the high speed interrupt can not record and display Mark 00 00 00 020 160 00 00 00 131 909 00 00 00 111 749 Indicator 00 00 00 052 734 Scale 2401435 Grid 00 00 00 032 832 Area Break VE
139. d to the start event unestablished 1Features 1 4 Coverage Function Coverage Measurement is a function to record the addresses executed accessed by the target program CO coverage After stopping execution of the target program you can understand which addresses are not executed yet By using the coverage measurement function in the test process you can check for missing test items 1 4 1 Coverage Measurement Area On simulator debugger all the memory space is the coverage measurement area 1 4 2 Related Windows Refer to the coverage measurement result in the following windows e Editor Source Window e Memory Window e Coverage Window 1 5 Real Time OS Debugging Function This function debugs the realtime OS dependent parts of the target program that uses the realtime OS This function helps to show the status of the realtime OS and inspect a task execution history etc The debugger for R32C doesn t support the real time OS debugging function The debugger for 740 doesn t support the real time OS debugging function 1 6 GUI Input Output Function This function simulates the user target system s key input panel buttons and output panel on a window Buttons can be used for the input panel and labels strings and LEDs can be used for the output panel 1 7 I O Simulation Function e Virtual Port Inputs This function lets you define changes of input port data Use the I O Timing Setting Window to define chan
140. d virtual interrupts 114 6Windows Dialogs 6 2 10 2 Setting Executed Address synchronized Interrupts To set executed address synchronized virtual interrupts choose the Setup menus in the I O Timing Setting Window The dialog box shown below will appear Select this item Setup Dialog Here choose the item Set Virtual Interrupt and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual interrupt timings will appear 115 Setup Dialog 7 Expressions can be input here First choose Executed Address in the Interrupt Generation Timing column Next specify the executed address i e the address at which a virtual interrupt is generated when it is executed for Executed Address Then specify the vector number and the priority of the virtual interrupt to be generated for Vector and Priority respectively using decimal numbers Then press the Next button Or press the Prev button here if you want to return to the previous dialog box A matrix dialog box for setting virtual interrupts will appear Setup Dialog Finds the previous data you ve set UP or the next data DOWN The setup example in this element specifies that data 0x22 be set at the gt 10 016th cycle Double click on an element you want and set the desired input value in it In this dialog b
141. ded data can be displayed on a window or output to a file Also you can verify the data which are output to UARTs by the Printf function The number of data entries that can be recorded by this function equals the number of data entries specified on the Init dialog box s I O script tab reckoning from the time at which the program started running When reexecuted the previous data is cleared 22 2Simulation Specifications Interrupts In the actual MCU peripheral I O including external interrupt signals are generating factors for interrupts However the simulator has nothing corresponding to peripheral I O This simulator provides another method in place of this which allows you to generate interrupts in a simulated manner virtual interrupt function Virtual interrupts can be generated at any time e g in a specified cycle or at an executed address Virtual Interrupt Function This function defines interrupt generation Using this function you can generate timer interrupts and key input interrupts in a simulated manner without having to actually generate them The following shows timings at which virtual interrupts can be generated 1 When program execution has reached a specified number of cycles 2 When the program has executed a specified address 3 Every specified time interval Virtual interrupts at the above timings can be defined from the I O Timing Setting Window Use of the I O script function the function that allows
142. dress 400h Al Set Event Status DATA ACCESS ao v d Al Set Event Status DATA ACCESS vi fo gt pr WAT dr 164 6Windows Dialogs 6 10 72 2 Reading writing data to the specified address range Set as below Example Writing data to addresses ranging from 400h to 40Fh Event Type DATA ACCESS v Address Data Setting Range Adderss1 lt addr lt Address2 v Address1 400 i Address2 for Function Source File z Function ACCESS WRITE ADDRESS 000400 CONDITION 000400 lt addr lt 00040F canes Al Set Event Status Event Type DATA ACCESS v Address Data Setting Range Not Specify gt Data 1 pooo Data 2 5000 Access WRITE v IT Mask 5000 ACCESS WRITE ADDRESS 000400 CONDITION 000400 lt addr lt 00040F cance 165 610 7 2 8 Reading writing data to addresses outside the specified range Set as below Example Writing data to addresses below 7FFh Al Set Event Status DATA ACCESS addr lt Address1 FF Ba l Al Set Event Status DATA ACCESS Not Specity HH po po o WRITE J Mask 166 6Windows Dialogs 6 10 7 3 Memory Access The debugger for M16C R8C 6 10 7 3 1 Writing Reading a Specified Address Set as below Example Writing to even address 400h Event Type DATA ACCESS x Addres
143. dth queue wait cycles etc it includes some error when compared with the number of cycles in the actual chip If four cycles are required for the ENTER instruction cycles are added at this point in time l If two cycles are required for the MOV instruction cycles are added at this point in time ENTER instruction MOV instruction Execution 0 1 2 3 4 5 6 7 8 9 cycles In the above example no cycles are added while the ENTER or MOV instruction is being executed The cycles required for each instruction are added after instruction execution Note that the virtual port input output and virtual interrupt functions are processed after instruction execution is completed Target program execution time measurement The target program execution time measurement is calculated from the number of cycles described above and the MCU clock and divide by ratio specified on the MCU tab of the Init dialog box 19 Note Because the simulator s execution time measurement is calculated using the number of cycles described above it includes some error when compared with the actual chip s execution time e WAIT BRK2 Executed as an NOP instruction Other instructions operate the same as those of the actual MCU e INT INTO UND BRK As with the actual MCU these instructions generate interrupts The INTO instruction only generates an interrupt when the O flag is 1 2 2 2 Resetting The SFR area is nonexistent in the debugger so
144. e memory may varies in units of 1 byte In such a case that the access attribute is not unified within a set of data the data s access attribute cannot be displayed correctly In this case the background colors the access attribute color of the first byte of the data 125 6 4 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Add Add watchpoint Add Bit Add bit lebel watchpoint Remove Remove the selected watchpoint Remove All Remove all watchpoints Set Set new data to selected watchpoint Radix Bin Display in Binary Dec Display in Decimal Hex Display in Hexadecimal Refresh Refresh memory data Layout Address Area Switch display or non display of Address area Size Area Switch display or non display of Size area RAM Monitor Enable RAM Monitor Switch enable or disable RAM moniter function Sampling Period Set RAM monitor sampling period Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 126 6Windows Dialogs 6 5 C Watch Window The C Watch Window displays C C expressions and their values results of calculations The C C expressions displayed in the C Watch Window are known as C watchpoints The displays of the results of calculating the C watchpoints
145. e 278 12 2 Attention of the R32C Debugger rrrrnnnrnrnrnrsrenannrnrrrnssrrrennnnrrenssrerennvnrrnnsnrssensnnrvnnsnsssensnnrsenene 279 12 2 1 Option of C Compiler Assembler Linker rerrrnrorrronnnnrrrnrrrrrennnnrrnnsnrrrensnnrrnnenrsrensnnnenn 279 12 3 Attention of the M32C Debugger rrrrnnrvrnrnrrnrrannrnrrrnssrsrennrnrrensnrerennnnnrnnsnrssensnnrvnnsnsssensnnrsenene 279 12 3 1 Option of C Compiler Assembler Linker rerrrrrorrronnnnrrrnrrrrrennnnrrnnsnrrrensnnrrnnsnesrensnnnenr 279 12 4 Attention of the M16C R8C Debugger rerrrnrrrrnannrnrnrnsrrrrennnnrrenssrrrennvnrrnnsnrsrensnnrvnnsnssnensnnrnensne 280 12 4 1 Options for compiler assembler and linker ssmmsssesesrerrrsrserrrreressererrerererrerrrr rr rr rr rr nen 280 12 42 TASKING C Compilere kuiere iea lise aunudevare Rd henta 280 12 4 3 Precautions on Using M16C 62 Group s sssseserrereresseserrsrerersererreresrerernrrrerrrrerr rr rr en rann nn 280 12 4 4 The number of cycles measuring on using R8C Tiny SerieS sesrrrrsessrsererrrrerserrrrt 280 12 5 Attention of the 740 Debugger cccccssssccccccsesessecececececsenssseceesceesesaaeceeececsesssaseeeeeeceensaaeas 281 12 5 1 Options for compiler assembler and linker ssmsssseseererrrsrserrrreressrrerrnrererrerrrr rr er rr re na 281 12 5 2 Not supportfunctionsuLasankanusragkarsarkulddnmsde eae ee eee hea ewe 281 12 6 Options for compiler assembler and linker ccccccceceessssececececeessceceeececs
146. e Range rrrrnnvrnrnrnnrrensnnrvrnsrrseensnnrnrnensseensnnrnnnnnsseenennrnnnenssnesennrnnssnseee 146 6 10 4 Specify the Trace Write Condition ssosesersersrsereereressererrnresrorerrrr enes rese rr rr ers re nn nn ena 147 6 10 5 C mmand BU AOA a renas Aniline hindi E eo Eea iR 147 6 10 6 Specify the Events Instruction Fetch mermrvrsnovrrvrrnerrrvernevrrvernevrrvesvevssvesverssvesvensnner 148 6 10 7 Specify the Events Memory Access cccccesssssssessescsseseescsseseescsseseescssesecscsseseesesseaeees 152 6 10 8 Specify the Events Bit Access cccccccsscscssessescsseseescsseseescssesescssessescsseseescssessescsseaeees 174 6 10 9 Specify the Events Interrupt sasen ar na A ERA TR AER 176 6 10 10 Specify the Event Combination Condition sessersssererreresreserrrrererserrrrrrerrrrerr rn ana 178 6 10 11 Specify the write condition rervrrrororonnnnrvrnrrrrrennnrnrnrnerrenennrnnnrnereenennnnnnenssresennnnnsenseee 180 611 Trace Wand OW iccceies ice tel shee cer del ene Si aa 184 6 11 1 Configuration of Bus Mode cccccccscssssssececececsessnsccccececssssacaesececsensaacaecececesssasaaeees 184 6 11 2 Configuration of Disassemble Mode ccccccccsesssssscecececsesenseceeececeenssssseseceeeenenseaeees 186 6 11 3 Configuration of Data Access Mode ccccscccsccessesessscecececeesessscesececsesesssceeeeeesenensaaeees 187 6 11 4 Configuration of Source Mode c cccccccccessesssceeececsesessscecec
147. e cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area e Cycle count display area displays cycle counts 95 6 2 4 2 Screen structure for read access synchronized inputs When you ve set virtual port inputs that are synchronized to memory accesses for read a display screen configured as shown below will appear Input read Nembe of times Address Read 2 3 4 F f 7 g 9 4 Read access count display area Input data display area Address Read address display display area area e Address display area displays the memory address to which a virtual port is input e Read address display area displays the address to be monitored for read access e Input data display area displays the virtual port input data that has been set by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and the read access count of the data at which the cursor is positioned will be displayed in the read access count display area e Read access count display area displays read access counts 6 2 4 3 Screen structure for interrupt synchronized inputs When you ve set virtual port inputs that are synchronized to virtual interrupts a display screen configured as shown below will appear Input interrupt Number of times rae Address Vec Peo a Bbw ENER 9 Virtual interrupt 001 000 5 occurrence count display area Input data display
148. e expression is placed in a specified macro variable Specification of macro variables is described later For example following macro variables can be written 10 Macro variable val is initialized to 10 val 1 Value of the macro variable is incremented by 1 set val set val 259 9 2 2 5 pass statement Format pass conditional expression pass count Function Execution of the next statement is skipped a number of times as specified by the pass count until the conditional expression is met Right side expressions can be used to specify the conditional statement and pass count Specification of right side expressions is described later For example if following statements are written pass isint 21 3 Hisint becomes true established when a specified virtual interrupt is generated set 0x800 0x10 The set statement is executed only after a timer AO interrupt vector number 21 occurs three times 9 2 3 Judge Statements if else Judge statements judge the results of expressions thereby causing the statements to be executed to branch off The following shows a description format if conditional expression Statement 1 else if conditional expression Statement 2 else Statement 3 e When if conditional expression is true not 0 statement 1 is executed If the conditional expression is false 0 else if conditional expression is evaluated to see whether it is true o
149. e immediately following RAM monitor area larger address Address Display from specified address Scroll Area Specify scroll range Data Length lbyte Display in 1Byte unit 2bytes Display in 2Byte unit Abytes Display in 4Byte unit 8bytes Display in 8Byte unit Radix Hex Display in Hexadecimal Dec Display in Decimal Single Dec Display in Signed Decimal Oct Display in Octdecimal Bin Display in Binary Code ASCII Display as ASCII character SJIS Display as SJIS character JIS Display as JIS character UNICODE Display as UNICODE character EUC Display as EUC character Float Display as Floating point Double Display as Double Floating point Layout Label Switch display or non display of Label area Register Switch display or non display of Register area Code Switch display or non display of Code area Column Set the number of columns displayed on one line Split Split window Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 87 6 1 2 Setting the RAM monitor area Choose the popup menu RAM Monitor Area in the RAM monitor window The Set RRAM Area dialog box shown below will appear The start address of the currently set RAM monitor area and the range of the RAM monitor area are displayed in the Start and the Area fields of this dialog box No values can be entered in the Size fi
150. e macro variables within the expression Always precede macro variables with the sign 8 1 3 Conditional Statement In a conditional statement different statements are executed according to whether the condition is true or false The following shows the format to be used if expression statement 1 else statement 2 endi e If the expression is t rue other than 0 statement 1 is executed If false 0 statement 2 is executed e You can omit the else statement If omitted and the expression is false execution jumps to the line after the endi statement e if statements can be nested up to 32 levels 8 1 4 Loop Statement while endw and Break Statement In loop statements execution of a group of statements is repeated while the expression is true The following shows the format to be used while expression statement endw e If the expression is t rue the group of statements is repeated If false the loop is exited and the statement following the endw statement is executed e You can nest while statements up to 32 levels e Use the break statement to forcibly exit a while loop If while statements are nested break exits from the inner most loop 250 8Writing Script Files 8 1 5 Comment statements You can include comments in a script file Use the following format character string e Write the statement after a semicolon You can include only spaces an
151. e moved by dragging When moving the mouse on the marker the cursor shape changes Then start dragging The start marker moves into the window left portion by clicking the Start Marker button in the tool bar Or select Menu Start Marker The end marker moves into the window right portion by clicking the End Marker button Or select Menu End Marker The indicator moves into the window center by clicking the Indicator button Or select Menu Indicator The other markers can move only to the specified positions listed below e Position to which the interrupt processing or task execution transits e Position to which the task state transits e Position where the system call issuance history is displayed 227 6 16 MR Analyze Window The MR Analyze window displays the result of the measurement data statistically analyzed within the range specified by the start marker and the end marker in the MR Trace window The debugger for R32C doesn t support this function The debugger for 740 doesn t support this function The MR Analyze window supports three display mode as below e CPU occupation state by interrupt task e Ready time by task e List of system call issuance histories You can extract and display the history based on the specific condition The MR Analyze window functions together with the MR Trace window This window is available only when a target program using our real time OS MRxx is downloade
152. e of each mailbox Mailbox Queue Wait ID No and task name of tasks waiting for messages Mailbox Queue Message The messages stored in the mailbox e The following are displayed in the Mbxatr area TA_TFIFO Task wait queue is in FIFO order TA_TPRI Task wait queue is in task priority order TA_MFIFO Message queue is in FIFO order TA_MPRI Message queue is in message priority order e When a task connected to the mail box queue is in the state of waiting with timeout enabled waiting in trev mbx a string tmol which indicates the state of timeout enabled is appended to a string displayed in the Mailbox Queue Wait field When a task connected to the mail box queue is in the state of forced waiting Double waiting a string s which indicates the state of double waiting is appended to a string displayed in the Mailbox Queue Wait field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl e Up to 8 characters can be displayed in the task name in the Mailbox Queue Wait field If a task name exceeds 8 characters the extra characters are omitted 209 6 14 8 Display the Data Queue Status In the MR window select Popup Menu Mode gt Data Queuel MR CEREAL OR Ga AA EG Dtgatr Dtent Dtgsz Data Queue Wait Data Queue Data TA TFIFO 0 0 Send 23 task23 24 _task24 s
153. ecae iat colds eee 52 4 1 2 Debugging Information Tabene enei outers soebiticcoestoestacwetsecseeedeestchabescsessesteods 53 41 3 SeriptTabassssa erste se ette 54 ATA Trace Tabunsasssk rsma e a a Pelee ini di edheus ccd taael cadeasessiel chbuh usle Sp r Nee 55 4 1 5 10 S ript VAD RE TEE EEE A TA E EEOAE EE ATE Mosse rv SANS nen OST RASER de 55 42 Simulator engine setupen e iene T E E E AO R diktet 56 4 3 Method of making MCU file rrerrronnrorrrnrrrrrensnnrrrnrnrsrensnnrnnnenssnensnnrnnnenssnenennrnnnensseenennrnnsenssnenennnen 57 4 3 1 Method of making MCU file the R32C Debugger rerrsrarvrsvarervrervavvesvervesresvervsssesvrenne 57 4 3 2 Method of making MCU file the M32C Debugger srrsrarvrsvarvervrrsnevrsresvrsrasvesvsesersvenne 58 4 3 3 Method of making MCU file the M16C R8C Debugger rsrrrvvrvrrrvrvvrvrarvrsrasvervssservvenne 59 4 3 4 Method of making MCU file the 740 Debugger srarvrsrarvrsvarvervrrsnevvesvesvesvasveevsssesvrenne 60 Tutorial 5 Tutorial 63 S LJatroducto niaraugsedersreeutvartkdaskee Rabat skate ska 63 52 Usage Lvinnensndvsnerd disease ei Er SE VT ne SE RGr RAN AERE NESS EEE 64 5 2 1 Step Starting the Debugger ns isssistesverssssrsevisssnvneivs rvssrrvesvesssrsrsrrisssnrneiss rensrrnvenvessdt 64 5 2 2 Step2 Checking the Operation of RAM rrerrronnnorvrnrrrrrenannrnrnenssrrnennrnnnenssnesennnnnrenssnsren 65 5 2 3 Step3 Downloading the Tutorial Program eernrorvrnrnrsrrnan
154. ecify a memory access event change the event select dialog box s Event Type to DATA ACCESS The event is established when memory is accessed at the specified address or under conditions set for the specified address range 152 6Windows Dialogs 6 10 7 1 Memory Access The debugger for R32C 6 10 7 1 1 Writing Reading a Specified Address Set as below Example Writing to even address 400h Event Type DATA ACCESS x Address Data Setting Range addr Address gt Address1 400 Jal Address2 000000 v Al Function Source File v Function ACCESS WRITE ADDRESS 000400 GONDITION addr 000400 omei Al Set Event Status Event Type DATA ACCESS x Address Data Setting Ranee Not Specify v Data 1 pooo Data 2 food Access WRITE I Mask Joao ACCESS WRITE ADDRESS 000400 CONDITION faddr 000400 cance 153 Example Writing byte length data 32h to even address 400h AT Set Event Status DATA ACCESS poao a 7 Al Set Event Status DATA ACCESS data Datal Re gt po oo we A 154 6Windows Dialogs Example Writing byte length data 32h to odd address 401h l Set Event Status DATA ACCESS faddr Address1 v poar ja d Al Set Event Status DATA ACCESS vi 2 po ooo WRITE A ov 155 Example Writin
155. ecsesssssseeecscsesesssaeeeeseeenentaaeees 188 6 11 5 Extended Mehus addresses ean aan ae 189 6 11 6 Display of bus information on the Simulator Debugger ssessersersrrrsrrrrrsrrrrrsnnrennnnrn 190 6 12 Data Trace Window sauser edrn eSak rier este 191 6 12 1 Extended Menusuirinessasesmansgdanaslaasdaresead ananas side 192 6 18 GUT T O Window r esnean dhe oo u arten bona ete hn Gane 193 6 13 1 Extended Meus enn E E EE vaere een ote tn SAGE 194 GLAM Window uassfatasrarsfsttatssarestekOseseessn SERA NS NES SR RGA Sr 195 6 14 2 Display the Task St tusussaneunaadrauuulksensssveasdknert advarer 197 6 14 3 Display the Ready Queue Status o ccccccssssccccecsesssssceeececsesesseceeeeecseseeaeeeeseeenenseaeees 201 6 14 4 Display the Timeout Queue Status ccccccccccccccscssssscecccecsessssesesececsesesssaeeeeeeeesenseaeees 202 6 14 5 Display the Event Flag StatUS sssssssosereorereoserreroresronerrrrerrorrrrrrrrrrrrnrrr rr er ro ne rr rr enn 204 6 14 6 Display the Semaphore Status c cccccccccssssscccccecsesssssceeccecsesesssseeececsesesssaeeeeeceesenseaeees 206 6 14 7 Display the Mailbox St tus uasaussaroamitoenakkesemiasttualsekuadkrue 208 6 14 8 Display the Data Queue Status sssessesosereorereosererreressererrererrrrerrrrerrrrrrr rr rr er rese nn en ena 210 6 14 9 Display the Cycle Handler Status ssesrseorsersosererreressorerrererrorerrrr enes rerrrr rr rr rr re rr rr ena 212 6 14 10 Display the Alarm Handler
156. ect that the interrupt request bit is set when an interrupt occurs Reset interrupts cannot be generated There are following two methods to set virtual interrupts 1 By using the I O Timing Setting Window 2 By using the I O script function I O Script Function This function allows you to write virtual port input and virtual interrupt settings to a file in script form Therefore it provides a more flexible way to define virtual port inputs and virtual interrupts than can be set from the I O Timing Setting Window Specifically this includes for example reading the divide by N ratios you ve set in the timer register and generating a timer interrupt periodically 36 2Simulation Specifications e Port input output GUI input function The GUI input function refers to simulating the user target system s simple key input panel on a window The key input panel is created from the GUI input window The input panel can have the following parts placed on it Buttons Virtual port input or virtual interrupt can be performed by pressing the button The following actions can be set for the button Enter data to a specified memory address virtual port input Generate a specified virtual interrupt Generate a specified virtual interrupt and virtual port input at the same time Text Display a text string GUI output function The GUI output function refers to simulating the user target system s simple key output panel on a w
157. ed as shown in the following table The debugger for 740 doesn t support four byte length data Length Debugger Specification 1 Byte All Borb 2 Bytes The debugger for M32R Horh Other W or w 4 bytes The debugger for M32R W or w The debugger for M32R M16C R8C Lor Example Referencing the contents of memory at address 8000h in 2 bytes 0x8000 W e The default data size is word if not specified 8 2 6 Line Nos These are source file line Nos The format for line Nos is as follows line_no line_no source file name e Specify line Nos in decimal e You can only specify line Nos in which software breaks can be set You cannot specify lines in which no assembler instructions have been generated including comment lines and blank lines e If you omit the name of the source file the line Nos apply to the source file displayed in active Editor Source Window e Include the file attribute in the name of the source file e Do not include any spaces between the line No and name of the source file 254 8Writing Script Files 8 2 7 Character constants The specified character or character string is converted into ASCII code and processed as a constant e Enclose characters in single quote marks e Enclose character strings in double quote marks e The character string must consist of one or two characters 16 bits max If more than two characters are specified the last two char
158. ed hereby under any patents copyrights 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
159. ed in units of object files The scope is switched in this debugger in the following circumstances e When a command is entered The object file that includes the address indicated by the program counter becomes the current scope When the SCOPE command is used to set the scope the specified scope is the active scope e During command execution The current scope automatically switches depending on the program address being handled by the command 252 8Writing Script Files 8 2 2 2 Priority levels of labels and symbols The conversion of values to labels or symbols and vice versa is subject to the following levels of priority Conversion of address values Local labels Global labels Local symbols Global symbols Local labels outside scope Local symbols outside scope Doe oH Conversion of data values Local symbols Global symbols Local labels Global labels Local symbols outside scope Local labels outside scope F RR WNH ee Conversion of bit values Local bit symbols Global bit symbols Local bit symbols outside scope wwo 8 2 3 Macro Variables Macro variables are defined by assign statements in the script file See Section 8 1 2 Assign Statement in the Reference part for details Precede variables with for use as macro variables e You can specify alphanumerics and or the underbar _ in the variable name following the percent sign However do not star t the names with a numeric e
160. eld Set RRAM Area Start fen 0 v Size fi blocks Area 000810 0000F Cancel Use this dialog box to change the position of the RAM monitor area Specify the RAM monitor area by its start address The size cannot be changed fixed to 1 Kbyte The start address can be specified in 0x10 byte units If you specify a non aligned address value it is rounded off to the nearest address value in 0x10 byte units before being set 6 1 2 1 Changing the RAM Monitor Area The start address of the RAM monitor area can be changed Specify the start address of the RAM monitor area in the Start field of the Set RRAM Area dialog box No values can be entered in the Size field 88 6Windows Dialogs 6 2 I O Timing Setting Window The I O Timing Setting Window is used to set and display virtual port input outputs or virtual interrupts Virtual port inputs virtual interrupt settings and virtual port output results can be displayed for your reference in numeric or graphic mode This window is split into three sections each displaying the setup contents of virtual port inputs the output results of virtual port outputs and the setup contents of virtual interrupts I O Timing Setting Address 000100 000100 000100 000100 000100 000100 000100 000100 Output cycle Address Bit 414 450 3e0 7 3e0 6 3e0 HS 3e0 4 3e0 3 3e0 2 3e0 1 3e0 0 lt Interrupt cycle Cycle Vec Pri 1314 15 161
161. elect Status from the CPU submenu of the View menu After the Status window is displayed open the Platform sheet and check the Status of Cause of last break The debugger for 740 doesn t support this function Item Status Connected to M16C RSC PC7501 Emulator CPU M16C Run Status Ready Cause of last break S W break Run time count 00 h 00 m 00 sec 001 msec 991 usec Jf Memory Platform Events Please refer to 11 Display the Cause of the Program Stoppage about the notation of a break factor 70 5Tutorial 5 2 6 Step6 Reviewing Breakpoints The user can see all the breakpoints set in the program in the S W Break Points window 5 2 6 1 Reviewing Breakpoints Select S W Break Points from the Break submenu of the View menu The S W Break Points window is displayed W S W Break Points Load Save Help C af C Filename Refer Line JEE Close SAN Break Point OFO26F L 37 D M16C TutorialM16C tutorialml6c source tutorial c Delete Delete All Enable All Enable Disable All Disable This window allows the user to set or change breakpoints define new breakpoints and delete enable or disable breakpoints 71 5 2 7 Step7 Viewing Register The user can see all registers flags value in the Register window 5 2 7 1 Viewing Register Select Registers from the CPU submenu of the View menu The Register windo
162. enus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Analyze Trace Data Analyze the realtime trace data Set Cycle Specify the display cycle Sync with Trace Window Synchronize with Trace Window Data Length lbyte Display in 1Byte unit 2bytes Display in 2Byte unit Abytes Display in 4Byte unit Radix Hex Display in Hexadecimal Dec Display in Decimal Address Display from specified address Add C Watch Add C watchpoint Remove C Watch Remove the selected C watchpoint Hide Type Name Hide type names from variables Add Adds new watch item into Access History Reference Area Remove Removes the selected watch item from Access History Reference Area Zoom Zoom In Increase the display scale Zoom Out Decrease the display sacle Zoom Specify the display scale Marker Start Marker Move the start marker in the display area End Marker Move the end marker in the display area Indicator Move the indicator in the display area Adjust Set cycle range between markers Change Grid Interval Change the grid interval Change Row Setting Change setting of the selected row Color Change the display color Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide
163. ero and then displays the stored message When no message is stored when Msg_cont is zero the WaitQueue field displays a string Task if a task waiting for a message exists and then displays the ID number and name of the task waiting for a message When a task connected to the mail box queue is in the state of waiting with timeout enabled waiting in trev msg a string tmo which indicates the state of timeout enabled is appended to a string displayed in the WaitQueue Message field When a task connected to the mail box queue is in the state of forced waiting Double waiting a string s which indicates the state of double waiting is appended to a string displayed in the WaitQueue Message field Normal Display 26 task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl e Up to 8 characters can be displayed in the task name in the Wait Queue Message field If a task name exceeds 8 characters the extra characters are omitted 208 6Windows Dialogs 6 14 7 2 Display the Mailbox Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the mail boxes defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of mailbox Mbxatr Attribut
164. essasceeeceeeensaaees 282 12 631 Wher Using NOx ugress sand GAS Stade 282 12 6 2 When Using the Assembler Package for 740 Family ssssssresssseserrerersorernnrererrrrr rt 282 12 6 3 When Using the IAR EC Compiler EW rrrrnerrrvrrrererverserervenserernenseresvevsevevsenenne 283 12 6 4 When Using the IAR C Compiler EW srorrerorvrrrerrrverrerervenserervenseresvenseresvevserevvevenne 283 12 6 5 When Using the IAR C Compiler ICC a sssmiseesisesererererererererererer ere er er rr rn rr er er en ora 284 12 6 6 When Using the TASKING C Compiler EDE s ssssssssssssssseseresererererenir ere er een en rn en ena 285 12 6 7 When Using the TASKING C Compiler CM s ssssssssssssrrrrererererererenen ere er en er en en en rna 285 vi Setup of Debugger Blank Page 1Features 1 Features 1 1 Real Time RAM Monitor Function This function allows you to inspect changes of memory contents without impairing the realtime capability of target program execution The simulator system contains a 1 Kbyte RAM monitor area which cannot be divided into smaller areas 1 1 1 RAM Monitor Area This debugger provides a 1KB of RAM monitor area which can be placed at any continuous addresses Base Address 000h Base Address 400h Oh Oh 1 1 2 Sampling Period Sampling cycle means the display update interval You can specify this function in any window which supports the RAM monitor The interval of 100 ms is set by def
165. ety when making your circuit designs with appropriate measures such as i placement of substitutive auxiliary circuits ii use of nonflammable material or iii prevention against any malfunction or mishap Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Renesas Technology product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belonging to Renesas Technology Corporation Renesas Solutions Corporation or a third party Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation and Renesas Solutions Corporation without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor for the latest product information before purchasing a product listed
166. f data entries specified on the Init dialog box s I O script tab reckoning from the time at which the program started running When reexecuted the previous data is cleared The output port simulate function The output port simulate function provides an efficient means of simulation When data are written to some memory addresses by a program it allows you to record the written data values The recorded data can be displayed on a window or output to a file Also you can verify the data which are output to UARTs by the Printf function The number of data entries that can be recorded by this function equals the number of data entries specified on the Init dialog box s I O script tab reckoning from the time at which the program started running When reexecuted the previous data is cleared 29 Interrupts In the actual MCU peripheral I O including external interrupt signals are generating factors for interrupts However the simulator has nothing corresponding to peripheral I O This simulator provides another method in place of this which allows you to generate interrupts in a simulated manner virtual interrupt function Virtual interrupts can be generated at any time e g in a specified cycle or at an executed address Virtual Interrupt Function This function defines interrupt generation Using this function you can generate timer interrupts and key input interrupts in a simulated manner without having to actually generate them
167. f display modes e By clicking the desired button the MR window display mode changes and the display data also changes e By double clicking the desired task line you can display the context data of the task e You can drag the cursor to change the width of the display area in each mode e If the downloaded program does not use MR you cannot select all the menu which will select the display mode e The supported display mode is as follows If a target program created by MR30 or MR308 conformed to uITRON4 is downloaded this window supports the displays listed below Task status Ready queue status Timeout queue status Event flag status Semaphore status Mailbox status Data queue status Cyclic handler status Alarm handler status Memory pool status 195 If a target program created by MR30 or MR308 conformed to uITRONS is downloaded this window supports the displays listed below If a target program created on MR30 V 1 00 is downloaded the MPL mode cannot be used on MR30 You cannot select the menu which changes the current mode to the MPL mode Task status Ready queue status Timeout queue status Event flag status Semaphore status Mailbox status Cyclic handler status Alarm handler status Memory pool status ATTENTION Please use the startup file crtOmr axx start axx whoes contents matches with the version of MRxx when you make downloaded program The MR Window and
168. for virtual port input Beginning of procedure 2 waite 10000 Keeps execution of I O script waiting for 10 000 cycles set 0x3e0 0x20 Inputs 0x20 in address Ox3e0 waite 10000 set Ox3e0 w Ox4143 Inputs 2 byte data Ox4143 from address Ox3e0 Terminates procedure 2 9 2 Composition of I O Script Following statements can be written in I O script Procedure I O script statement Judgment if else Execution statements are branched off by judging the evaluation result of expression Repeat statement while and Break statement Statements are executed repeatedly by judging the evaluation result of expression Comment statement Comments can be written in I O script Comment statements are ignored when executing I O script 257 9 2 1 Procedure Procedures specify a definition block of an I O script Multiple procedures can be written in one file However the total number of procedures that can be registered is limited to 50 Also if you are using the Printf function output function in the Output Port Window the number of virtual port input virtual interrupt and I O script procedures that can be set is limited to a total of 48 The following shows a description format Statements Statements In the same way multiple procedures can be defined below 9 2 2 I O Script Statements Following five statements can be used in I O script 9 2 2 1 waiti statement Form
169. g the button The following actions can be set for the button Enter data to a specified memory address virtual port input Generate a specified virtual interrupt Generate a specified virtual interrupt and virtual port input at the same time Text Display a text string GUI output function The GUI output function refers to simulating the user target system s simple key output panel on a window The key output panel is created from the GUI output window The following parts can be arranged on this output panel Character string User specified character strings are displayed or erased when some value is written to a specified memory address or according to logic 1 or 0 in bits LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or Qin bits Text Display a text string 2 1 5 Cycle Count The CYcle CY Command Use of the CYcle command allows you to know an approximate number of cycles and the execution time of the program you ve executed The number of cycles are represented using the values listed in the microcomputer s software manual The execution time refers to the target program s execution time calculated from the cumulative number of cycles of the CPU instructions executed and the MCU clock and divide by ratio specified on the Init dialog box s MCU tab 2 1 6 Stack Utilization Monitor The StackMonitor SM Command Use the StackMonitor command to check
170. g word length data 1234h to even address 400h Al Set Event Status DATA ACCESS addr Address1 Al Set Event Status DATA ACCESS vi Fa wees 6Windows Dialogs Example Writing data 10h 3Fh to even address 400h Al Set Event Status DATA ACCESS addr Address1 Al Set Event Status DATA ACCESS vi fo gt pr WAT dr 157 6 10 7 1 2 Reading writing data to the specified address range Set as below Example Writing data to addresses ranging from 400h to 40Fh Al Set Event Status DATA ACCESS Adderss1 lt addr lt Address joo for Ba Al Set Event Status DATA ACCESS Not Specity HH po po o WRITE I Mask 6Windows Dialogs 6 107 183 Reading writing data to addresses outside the specified range Set as below Example Writing data to addresses below 7FFh Event Type DATA ACCESS x Address Data Setting Ranee addr lt Address v Address1 FF v Bl Address2 0040F gt Bl Function Source File 3 Function ACCESS WRITE ADDRESS 0007 FF CONDITION faddr lt 0007FF canes Al Set Event Status Event Type DATA ACCESS v Address Data Setting Range Not Specify gt Data 1 pooo Data 2 5000 Access WRITE v IT Mask 5000 ACCESS WRITE ADDRESS 0007FF CONDITION faddr lt 0007FF mest
171. ges of input port data The contents thus defined can be simulated at the time When the program execution reaches specified cycles When the program accesses a specified memory location for read When a specified virtual interrupt is generated This function when combined with the I O script function allows you to simulate at any time such as when the program fetches an instruction or memory is accessed for write e Virtual Port Outputs This function lets you record changes of output port data and the cycles in which changes occurred The recorded data can be verified in graphic or numeric forms on the I O Timing Setting Window The number of data entries recorded is the number of entries specified on the Init dialog box s I O Script tab reckoning from when the program started to run When reexecuted the previous data is cleared e Virtual Interrupts This function lets you generate an interrupt e g timer interrupt or key input interrupt An interrupt can be generated at the time When the program execution reaches specified cycle When the program fetches an instruction from a specified address At a specified time interval Use the I O Timing Setting Window to define virtual interrupts This function when combined with the I O script function allows you to generate an interrupt at any time such as when memory is accessed for write or accessed for read e Simulating output ports This function lets you record changes of o
172. he data displayed is the statistical results for the range specified with the start marker and end marker in the MR Trace window By clicking the maximum execution time minimum execution time display field of each line you can search the processing history at the maximum execution time minimum execution time of the task corresponding to the clicked line The search result is pointed by the indicator in the MR Trace window after the indicator moves to the destination position 230 6Windows Dialogs 6 16 5 2 Refer the Ready Queue Time Click the Ready gt Run button in the tool bar Or select Menu Rdy gt Run s t MR Anal Elles te er Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 ID name Hum Max Min vg 1 I taskij 11 00700 00 013 069 00700 00 000 013 0070000 005 961 Z task2 3 00 00 00 000 080 00700 00 000 009 00 00 00 000 032 task3 2 00700 00 000 083 00700 00 000 013 00700 00 000 048 2 00 00 00 000 093 00700 00 000 009 00700 00 000 051 2 OO 00 00 000 099 00700 00 000 012 00700 00 000 056 The time required from execution ready state to transition to execution state by task is processed statistically and displayed The data displayed is the statistical results of the range specified with the start marker and end marker in the MR Trace window By clicking the maximum ready t
173. he display content depends on the MCU and simulator system used In addition to bus information this mode allows disassemble source line or data access information to be displayed in combination Disassemble mode This mode allows you to inspect the executed instructions In addition to disassemble information this mode allows source line or data access information to be displayed in combination Data access mode This mode allows you to inspect the data read write cycles In addition to data access information this mode allows source line information to be displayed in combination Source mode This mode allows you to inspect the program execution path in the source program The measurement result is displayed when a trace measurement has finished When a trace measurement restarts the window display is cleared The range of a trace measurement can be altered in the Trace Point Setting Window For details about this window refer to 6 10 Trace Point Setting Window With default settings the trace information immediately before the program has stopped is recorded 6 11 1 Configuration of Bus Mode When bus mode is selected trace information is displayed in bus mode Bus mode is configured as shown below The display content in bus mode differs depending on the MCU or simulator system used vm iv 4 058 Address OG TR RM Tron O T 76543210 h m s ms us 4 R 0 o 1 11111111 00 00 00 055 114 R o 2 1 11111111
174. he result value of calculation has not been defined it is displayed as follows DATE date 16 when Radix is in initial state DATE date 0x10 when Radix is hex DATE date 0000000000010000B when Radix is binary 10 2 2 Basic Types e When the result of calculation is a basic type other than a char type or floating point type it is displayed as follows unsigned int i unsigned int i unsigned int i 65280 when Radix is in initial state OxFF00 when Radix is hex 1111111100000000B when Radix is binary e When the result of calculation is a char type it is displayed as follows unsigned char c J when Radix is in initial state unsigned char c Ox4A when Radix is hex unsigned char c 10100100B when Radix is binary e When the result of calculation is a floating point it is displayed as follows double d 8 207880399131839E 304 when Radix is in initial state double d 0x10203045060708 when Radix is hex double d 0000000010 1000B when Radix is binary r ken indicates abbreviation 272 10C C Expressions 10 2 3 Pointer Types e When the result of calculation is a pointer type to other than a char type it is displayed in hexadecimal as follows unsigned int p 0x1234 all Radices e When the result of calculation is a char type you can select the display format of the string or a character in the C Watch window s menu Display String string types unsigned char
175. he status bar e Time value at the start marker position e Time value at the end marker position e Time interval between the start marker and the end marker e Time value at the indicator position e Disp lay scale e Time width at grid line interval e Measurement trace range 233 The grid lines are displayed using the start marker as the radix point The scale is displayed using the time at which the start marker is positioned as 0 with the left forward in time set to minus and the right backward in time set to plus The grid lines allow you to roughly understand the interrupt occurrence cycle and process time The interval time width of the displayed grid lines appears in the Grid area of the status bar The time value in the Task Trace window means the execution elapsed time using the program execution start time as 0 in all the cases On the contrary the numeric value above the grid lines scale in the Task Trace window is a relative value using the start marker as 0 the grid interval is specified in the Value dialog It has nothing to do with the time value This is provided so that you can see the window easily 6 17 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Start Marker Move the start marker in the display area End Marker Move the end marker in
176. ick the OK button 40 3Preparation before Use 3 2 1 2 Step2 Setting for the Toolchain A wizard for the project creation starts New Project Toolchain version 53000 Which CPU do you want to use for this project GPU Series If there is no CPU type to be selected select the GPU Type that a similar to hardware specification or select Other lt Back ned Finish Cancel Here the following contents are set e toolchain e the setting for the real time OS when using e the setting for the startup file heap area stack area and so on Please set required information and click the Next button The contents of a setting change with C C compiler packages of use Please refer to the manual attached to your C C compiler package about the details of the contents of a setting 41 3 2 1 3 Step 3 Selecting of the Target Platform Select the target system used for your debugging emulator simulator When the setting for the toolchain has been completed the following dialog box is displayed I New Project 5 7 Setting the Target System for Debugging pe p MM160 REC FoUSB UART MIM1SG REC PC7501 Emulator MMISC REC Simulator 1 Selecting of the Target type In the Target type list box select the target CPU type 2 Selecting of the Target Platform In the Targets area the target for the session file used when this debugger is activated must be selected here Chec
177. icking in the window Menu Function Script Open Open seript file Run Run seript file Step One step execution of seript file Close Close script file View Save Save view buffer to file Clear Clear view buffer Log On Open log file and start recording start output to file Off Close log file and end recording stop output to file Record On Record the executed commands to a file Off Stop recording the executed commands Copy Copy the selection and put it on the Clipboard Paste Insert Clipboard contents Cut Cut the selection and put it on the Clipboard Delete Erase the selection Undo Undo the last action Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 133 6 8 S W Break Point Setting Window The S W Break Point Setting window allows you to set software break points Software breaks stop the execution of instructions immediately before the specified break point Save Load Break Point Buttons Set Break Point Area E S W Break Points 0F0000 0F00C2 36 GLOBAL C 0F012C 22 LOCAL C Display Break Points Operation Buttons to Break Points e If you have set multiple software breakpoints program execution stops when any one software break address is encountered OR conditions e You can continue to set software breakpoints until
178. ime minimum ready time display field of each line you can search the processing history at the maximum ready time minimum ready time of the task corresponding to the clicked line The search result is pointed by the indicator in the MR Trace window after the indicator moves to the destination position 6 16 5 3 Refer the System Call Issuance History Click the System Call button in the tool bar Or select Menu System Call MR Analyze Sk Th Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 No System Call Parameter Return Parameter TIME a 7 wai flg wfmode H 3 waiptn H l flgid p l E OK flgptn H l 00 00 00 000 501 8 wai sem semid D 1 E OK 00 00 00 000 533 9 rev msg mbxid D 1 E OK pk msgirlj H 1234 pk 00 00 00 000 565 10 wup tsk tskid D 2 E OK 00 00 00 000 594 ii slp tsk E OK 00 00 00 013 620 12 rsm tsk tskid D 2 E OBJ 00 00 00 020 147 13 set flg setptn H l flgid D 1 E OK 00 00 00 033 163 14 wai flg wimode H 3 waiptn H l flgid D 1 ercd 222 flgptn 227 00 00 00 046 203 15 rsm tsk tskid D 3 E OBJ 00 00 00 052 734 16 sig sem semid D 1 E OK 00 00 00 065 751 17 wai sem semid D 1 ered 277 00 00 00 078 780 18 rsm tsk tskid D 4 E OBS 00 00 00 085 310 19 snd msg pk msg R1j H 5678 pk msg R3j H 12 E OK 00 00 00 098 327 20 rev msg mbxid D 1 ered 222 pk _msg R1j 222 pk 00 00 00 111 362 7 The issued
179. indow The key output panel is created from the GUI output window The following parts can be arranged on this output panel Character string User specified character strings are displayed or erased when some value is written to a specified memory address or according to logic 1 or 0 in bits LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or 0 in bits Text Display a text string 2 4 5 Cycle Count The CYcle CY Command Use of the CYcle command allows you to know an approximate number of cycles and the execution time of the program you ve executed The number of cycles are represented using the values listed in the microcomputer s software manual The execution time refers to the target program s execution time calculated from the cumulative number of cycles of the CPU instructions executed and the MCU clock and divide by ratio specified on the Init dialog box s MCU tab 2 4 6 Stack Utilization Monitor The StackMonitor SM Command Use the StackMonitor command to check the maximum and minimum addresses of the stack and to determine how much the program has used of what part of the stack The stack monitoring continues from the time that a Go or GoFree command is invoked until it is interrupted the maximum and minimum values being recorded for the two stack pointers USP and ISP registers If while the program is running it causes a change in the value of a stack pointer monit
180. ing on the product and memory model For details see the ICCxxxx manual 284 12Attention 12 6 6 When Using the TASKING C Compiler EDE Please specify the project setting by following process 1 Select menu EDE gt C Compiler Option gt Project Options The M16C C Compiler Options Project Namel dialog opens Please set as follows by this dialog Optimeze Tab Please specify No optimization by Optimization level Debug Tab Please check only Enable generation of any debug information Gncluding type checkeing and Genarate symbolic debug information 2 Select menu EDE gt Linker Locator Options The M16C Linker Locator Options Project Namel dialog opens Please set as follows by this dialog Format Tab Please specify IEEE 695 for debuggers abs by Output Format 3 Build your program after the setting above In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 6 7 When Using the TASKING C Compiler CM 12 6 7 1 Specify the Option Please specify g and OO options when compiling In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 6 7 2 Command Execution Examples The following shows examples of entering commands gt CM16 g 00 fi
181. irese a e e E rer NEDRE FRA 8 1 4 Coverage Function rrnorvrnrarsoonannrnrrenrrnenennrnrnenssrerennrnrsenesnesennnnnrnnnesessenannrnnsenssennannrnnnensseesannrnnsenseee 9 1 4 1 Coverage Measurement Area rrrmmservrrrrrrreronvrrrrerrrerrenvrnrrenssernennrnnnenssesssensnnrvensssssensnnnsen 9 1 42 Related Wmdows hisse rea bocagees idcceesswtesdezediesst cece E E obsisezet cesta ap TYSEN FR SANS AN 9 1 5 Real Time OS Debugging Function ccccccccccssssssscccececssssnsaccecccsessnsaecesecescsessaacaeeececesssasaaeees 9 1 6 GUI Input Output Function rorervrorroonannrornrnssernennrnrrenssrssennnnrrenssresensnnnrnnnenssnenannrnnnsnssensannnnnsenseee 9 T 71 O Simulation Function saussraaarksamkhjrist oe a ae A A eee 10 1 8 Time Measurement Function ccccccccceceessnsececececseseaececececsesenececececesseqneaececseesnequaaeseeseeenennanes 11 1 9 Stack Utilization Monitor Function rerorororrnnrrrrrsnnrrrrrsnnrnrrrsrnrsrrnnrnrrssnnrsrsssrnrersnnnsesssnnrsrsssnnsernn 11 Simulation Specifications 12 2 1 Simulation Specifications for R82C c ccccccccssssscccececsessssececececcessseceeececseseesecececsesetssaeeeeeeeenes 12 2 1 1 Operation of Instructions aa n vee seteccccscusesuncatededcseesectucetedsceevusustacessusadeevtests 12 2 VD RESCH soos ce Read cs OE aah Sek Gee Eas ee eC HN VORE arkene Seen bene cd Seba La Vers E 13 2 1 3 Memory ususskom ungarmetek nkknemb ee ete cated eae da lea deca ted ENS ami a a i e aa 14 DAA T O
182. is cleared 15 Interrupts In the actual MCU peripheral I O including external interrupt signals are generating factors for interrupts However the simulator has nothing corresponding to peripheral I O This simulator provides another method in place of this which allows you to generate interrupts in a simulated manner virtual interrupt function Virtual interrupts can be generated at any time e g in a specified cycle or at an executed address Virtual Interrupt Function This function defines interrupt generation Using this function you can generate timer interrupts and key input interrupts in a simulated manner without having to actually generate them The following shows timings at which virtual interrupts can be generated 1 When program execution has reached a specified number of cycles 2 When the program has executed a specified address 3 Every specified time interval Virtual interrupts at the above timings can be defined from the I O Timing Setting Window Use of the I O script function the function that allows uses to define virtual port input or virtual interrupt makes it possible to write timer interrupt Differences between Virtual Interrupts and Interrupts in Actual Chip Virtual interrupts differ from interrupts in the actual chip in the following points 1 Special hardware interrupts cannot be generated as virtual interrupts 2 High Speed interrupt cannot be generated as virtual interrupts 3 If virtual
183. is indeterminate 9 2 5 Comment Statements Comment statements are used to write comments in I O script The following shows a description format character string e comment statement starts from a semicolon e A range of statement from the semicolon till the end of the line is handled as a comment e Lines of comment statements are ignored when executing I O scripts 261 9 3 Method for Writing Right side Expressions Right side expressions can be used to write the number of machine instructions or cycles vector numbers priority levels input values conditional expressions or pass counts in I O script statements as well as write expressions in if and while statements The following shows an example of an I O script statement written using right side expressions waitc LABEL waiti 0x800 20 if Ox1ff while fisfetch 0x 0000 0x30 Right side expressions may be composed of the following Constant Symbol and label Macro variable Memory variable Character constant Operator isfetch isint Hisread iswrite Each part of right side expressions are described below 9 3 1 Constants Binary decimal and hexadecimal numbers can be input The radix of numerals is discriminated by a symbol added at the beginning or end of a numeric value Hexadecimal Decimal Binary Beginning 0x 0X None Example OxAB24 1234 210010 9 3 2 Symbols and Labels
184. is mapped automatically Note Memory space that has been mapped cannot be deleted e Accessing an Area Without Memory There is no actual memory in the memory blocks between 00010000h and 0003FFFFh and between 00050000h and FFFEFFFFh unless memory is secured If an attempt is made to access this area an illegal memory access error occurs and execution of the command or program stops 14 2Simulation Specifications 2 1 4 I O SFR The actual chip s peripheral I Os other than the CPU core such as the timers DMAC and serial T O are not supported The SFR area to which the peripheral I Os are connected is also handled as RAM by the simulator However a method is available that allows you to materialize data input to memory such as the SFR or interrupts such as timer interrupt in an artificial manner For details about this method see I O Script and Interrupts described later T O Script Virtual Port Input Function This function defines changes of the data that is input from external devices to a specified memory address Using this function you can simulate data inputs to the ports defined in SFR The following shows timings at which data can be input to memory 1 When program execution has reached a specified number of cycles 2 When a specified memory location is accessed for read by a program 3 When a specified virtual interrupt is generated Virtual interrupts at the above timings can be defined from the I O Timing Set
185. istory at the maximum ready time minimum ready time of the task corresponding to the clicked line The search result is pointed by the indicator in the Task Trace window after the indicator moves to the destination position 241 7 Table of Script Commands The following script commands are prepared The commands with yellow color displaying can be executed at run time The command to which adheres behind is not supported according to the product 7 1 Table of Script Commands classified by function 7 1 1 Execution Commands Command Name Short Name Contents Go G Program execution with breakpoints GoFree GF Free run program execution GoProgramBreak GPB Run target program with software break point GoBreakAt GBA Run target program with software break point Stop 5 Stops program execution Status R Checks the operating status of the MCU Step S Halts for user input until the specified time has elapsed StepInstruction SI Step execution of instructions OverStep O Overstep execution of source lines OverStepInstruaction OI Overstep execution of instructions Return RET Executes a source line return ReturnInstruction RETI Executes an instruction return Reset Resets the target MCU 242 7Table of Script Commands 7 1 2 File Operation Commands Command Name Short Name Contents Load L Downloads the target program LoadHex LH Download
186. ition or OR to specify OR for the combinatorial condition Next check turn on an event in the event specification area that you want to use and specify a pass count for that event To alter the pass count while the event to alter is being selected click the pass count value of that event ME HAV Break Points Setting IV Enable HAN Break ADDRE GONDITION 41 000400 WRITE addr 000400 data 0032 A2 0F0528 FETCH faddr 0F0528 43 000000 FETCH addr 000000 A4 000000 FETCH addr 000000 45 000000 FETCH addr 000000 46 000000 FETCH addr 000000 OOODRRE PID AND etal Enable Detail AND ae Same Time Save Load gt Close State Transition Combination 178 6Windows Dialogs 6 10 10 2 Select AND Same Time Change the Combination group to AND Same Time Next check turn on an event in the event specification area that you want to use No pass counts can be specified fixed to 1 ME HAV Break Points Setting rv Enable HAN Break ADDRE GONDITION Al 000400 WRITE addr 000400 data 0032 A2 0F0528 FETCH addr 0F0528 43 000000 FETCH addr 000000 44 000000 FETCH addr 000000 A5 000000 FETCH faddr 000000 A6 000000 FETCH faddr 000000 OOOOOE r Combination PID AND Same Time Md Detail Enable Detail HT Close Reset Save Load E
187. k the box against the target platform And choose other target as required And click the Next button 42 3Preparation before Use 3 2 1 4 Step4 Setting the Configuration File Name Set the configuration file name for each of the all selected target The configuration file saves the state of High performance Embedded Workshop except for the target emulator simulator New Project 6 7 Setting the Debugger Options Emulator Debue M160 R8C PC7501 Emulator MGany The default name is already set If it is not necessary to change please click the next button as it is 43 3 2 1 5 Step5 The check of a created file name Finally confirm the file name you create The files which will be generated by the High performance Embedded Workshop are displayed If you want to change the file name select and click it then enter the new name hanging the File N The following source files will be generated Main Program nertO a30 Start up file sect30 inc Start up file Next gt Finish Cancel This is the end of the emulator settings Exit the Project Generator following the instructions on the screen 44 3Preparation before Use 3 2 2 Creating a New Workspace Toolchain Not Used When debugging the existing load module file with this product a workspace is created by this method It can work even if the tool chain is not installed 3 2 2 1 Step1 Creation of
188. key key port0 Input from port 0 This function aims to assign the value of port 0 to variable key In such a case a value can be assigned to variable key by entering it to port 0 when the program accesses port 0 address 3E0 for read To support processing of functions like this this debugger provides a function that allows you to define the data to be input according to a number of times the specified memory address is read a virtual input port synchronized to memory accesses for read By using this function you can perform an operation where data 0x10 is input to memory address 3E0 when address 3E0 is read first and data 0x20 is input to said memory address when the address is read next 90 6Windows Dialogs Number of times the address 3E0 is read Data input to address 3E0 First 0x10 Second 0x20 Third 0x30 3 Interrupt synchronized input Data can be input to a specified memory location when a virtual interrupt occurs The data size that can be input is one byte The diagram below shows an example of a virtual port input that is synchronized to interrupts Shown in the sample program below is the case where data is read from port 1 address 3E1 using an interrupt handler routine in this case a timer interrupt handler routine pragma ADDRESS porti 3e1H char port1 pragma INTERRUPT read_port Interrupt handler for polling port 1 read_port char key key portl
189. ks the search path AddPath Adds the search path File Checks a filename and displays the contents of that file 245 7 1 14 Map Commands Command Name Short Name Contents Map Checks and sets mapping data 7 1 15 C Language Debugging Commands Command Name Short Name Contents Print Check value of specified C variable expression Set Set specified data in specified C variable expression 7 1 16 Real time OS Command Command Name Short Name Contents MR Displays status of realtime OS MRxx 7 1 17 Utility Commands Command Name Short Name Contents Radix Sets and checks the radix for numerical input Alias Specifies and checks command alias definitions UnaAlias Cancels the alias defined for a command UnaAliasAll Cancels all aliases defined for commands Version VER Displays the version No Date Displays the date Echo Displays messages CD Window open 246 7Table of Script Commands 7 2 Table of Script Commands alphabetical order Command Name Short Name Contents AddPath Adds the search path Alias Specifies and checks command alias definitions Assemble A Line by line assembly Bit Checks and sets bit
190. kspace Administration C Browse to another project workspace In this dialog box workspace is created or displayed e Create a new project workspace radio button Creates a new workspace e Open a recent project workspace radio button Uses an existing workspace and displays the history of the opened workspace e Browse to another project workspace radio button Uses an existing workspace this radio button is used when the history of the opened workspace does not remain In the case of Selecting an Existing Workspace select Open a recent project workspacel or Browse to another project workspace radio button and select the workspace file hws Please refer to the following about the method to create a new workspace e Refer to 3 2 1 Creating a New Workspace Toolchain Used e Refer to 3 2 2Creating a New Workspace Toolchain Not Used When debugging the existing load module file with this product a workspace is created by this method The method to create a new workspace depends on whether a toolchain is or is not in use Note that this product does not include a toolchain Use of a toolchain is available in an environment where the C C compiler package for the CPU which you are using has been installed For details on this refer to the manual attached to your C C compiler package 39 3 2 1 Creating a New Workspace Toolchain Used 3 2 1 1 Step1 Creation of a new workspace In the
191. le is 1 5 To change the scale select Menu Value The Value dialog is opened Specify the display expansion reduction scale Grid Time G Pp mo ep meg us Rate Expand fi 500000 Reduce fi 500000 Cancel 6 15 2 4 3 Change the grid line display interval Select Menu Value The Value dialog is opened Specify the display time interval Grid Time fam ENER f EE Rate Expand fi 500000 Reduce fi 500000 Cancel 225 6 15 2 44 Change the task display order Drag the task interrupt routine to be moved the left portion of the graph to the destination s t MR Trace BAD PHR amp QE ru Alv Boo Mark 00 00 00 020 160 00 00 00 131 909 00 00 00 111 749 Indicator 00 00 00 052 734 Scale 2 401435 Grid 00700 00 032832 Area Break VEC table ID name 0 1 2 3 32 OFFDEO SYSCALLO 33 OFFDB4 SYSCALD1 38 OFFD9B Idle 3 _task4 Unknown taskl task2 tasks task3 td en IN e To initialize the display order select Menu Init Order 6 152465 Display the specific task only Click the task interrupt routine to be hidden the left portion of the graph Every time you click the setting is switched between Display and Hide 6 15 246 Change the display color Select Menu Color The Color dialog is opened Click the button cor
192. le scope in which the PC exists are displayed If a file scope is changed by program execution the contents of the File Local tab will also change e Global tab All the global variables currently used by the downloaded program are displayed Please choose the Local tab when you display a local variable CWatch cee 6 2 De GS Watch Local File Local Global Name Value signed long 10 a Ox6C2 31051 signed int i 10 signed long j 4086 struct Sample sam Ox6EA Click mark at the left side of array a in the Locals window to display the elements When the user refers to the elements of array a before and after the execution of the sort function it is clarified that random data is sorted in descending order 80 5Tutorial 5 2 13 Step13 Stack Trace Function The debugger uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing The debugger for 740 doesn t support the stack trace function 5 2 13 1 Reference the function call status Double click the S W Breakpoints column in the sort function and set a software breakpoint port clang Ha long t int i J k gap gap 5 while gap gt 0 for k 0 k lt gap ktt fort i ktgap i lt 10 ititgap I for j i gap j gt k j i gap iftalil gt alit zap t t alj alj alitgap alitgap t
193. le waiting is appended to a string displayed in the Semaphore Queue field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 _task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl e Upto 8 characters can be displayed in the task name in the Semaphore Queue field If a task name exceeds 8 characters the extra characters are omitted 207 6 14 7 Display the Mailbox Status In the MR window select Popup Menu Model gt Mailbox MR x w OPi o SUDA o aa S ID Msg_cnt MAXmsg WaitQueue Message 0000H OO0AH 0002H 0014H 0000H OO0AH 0000H 003CH 0000H 0022H 0000H OOOFH 0000H 0028H Task 12 _task12 Msg 0033H 0055H Task 13 _task13 s 6 14 7 1 Display the Mailbox Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the mail boxes defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of mailbox Msg cnt Number of messages in each mailbox MAXmsg Maximum number of messages that can be contained in each mailbox Wait Queue Message The messages stored in the mailbox or ID No and task name of tasks waiting for messages The WaitQueue Message field shows a string Msg when a message is stored when Msg_cont as described above is non z
194. lel c lt Enter gt 285 MEMO 286 740 Simulator Debugger V 1 02 User s Manual Publication Date Aug 01 2006 Rev 1 00 Sales Strategic Planning Div Publskedhny Renesas Technology Corp Microcomputer Tool Development Department Edited by Renesas Solutions Corp O 2006 Renesas Technology Corp and Renesas Solutions Corp All rights reserved Printed in Japan 740 Simulator Debugger V 1 02 User s Manual ratkENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J1386 0100
195. log box for setting the address you want to be monitored for virtual port output will appear 111 6 2 10 Setting Virtual Interrupts The Virtual Interrupt function allows you to generate interrupts in a simulated manner without having to actually generate them Using this function you can generate timer interrupts or key input interrupts in simulated manner Virtual interrupts can be generated at one of the following timings 1 Ifyou want virtual interrupts to be generated with the lapse of time Virtual interrupts can be generated when program execution has reached a specified number of cycles In this case set cycle synchronized interrupts 2 Ifyou want virtual interrupts to be generated when the program executes a specified address Use this method if you want virtual interrupts to be generated when some specific function is executed n this case set executed address synchronized interrupts 3 When generating a virtual interrupt at fixed intervals Use the virtual interrupt function when you want to generate a virtual interrupt at fixed intervals In this case set the interval synchronized interrupts ATTENTION Up to a total of 50 virtual port input virtual interrupt and I O script procedures can be set However if you are using the Printf function output function in the Output Port Window the number of virtual port input virtual interrupt and I O script procedures that can be set is limited to a total of 48 6 2 10
196. m H H 222 Unknown O _G0 00 00 000 000 00700 00 000 000 00700 00 000 000 00700 00 000 000 0 00 By clicking the maximum execution time minimum execution time display area of each line you can search process history of the task for the clicked line at the maximum minimum execution time The search result is pointed by the indicator which moves to the target position in the Task Trace window 6 18 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Allow Docking Allows the window docking Hide Hides the window 240 6Windows Dialogs 6 18 2 Analyze the Execution History of Task You can reference the execution history statistical processing in the Task Analyze window This window shows the CPU occupation time and ratio by task The Task Analyze window functions together with the Task Trace window If the Task Trace window is not open or the Task Trace window does not show any data the Task Analyze window will not function Mark 00 00 00 000 672 00 00 01 569 272 00 00 01 568 600 ID name Num Max Run Time Min Run Time Avg Run Time Total Run Tine Ratios o 25 50 75100 1 f j 1 00700 00 005 195 00700 00 005 195 00700 00 005 195 00 00 00 005 195 DPS H H 1 main 115 00700 00 007 305 00700 00 000 767 00700 00 001 541 00700 00 177 287 11 30
197. me address value of the execution task ID storage area and its size e Task start address expression Open the Task Trace window Select Menu View gt RTOS gt Task Trace When you select this menu at first time after starting PDxx the RTOS Information dialog is opened before the Task Trace window is opened RTOS Information PID Address RUNtsk Access Size Byte v Task Entry CD TCB ENT amp TaskID 1 0 default Cancel When using our real time OS MRxx 1 Click the default button The MRxx information is set Click the OK button The Task Trace window is opened When using a real time OS other than MRxx Specify the label address is also available of the execution task ID storage area in the PID Address field specify the size of the execution task ID storage area in the Size list box If this information is not set correctly you cannot use the Task Trace window 2 Specify the task start address expression in the Task Entry field Describe the expression in the format in accordance with the description rules Use a macro variable TaskID in the address where the task ID number is supposed to assign If this information is not set correctly the task name is not displayed in the Task Trace window 3 Click the OK button The Task Trace window is opened On debuger for 740 simply by clicking the default button the OSEK OS information is set Once the real time OS information is set in
198. mode in the specified direction of search Stop Stops trace measurement in the middle and displays the measured content at the present point of time Restart Restarts trace measurement Layout Change layout of the corrent view Copy Copy selected lines Save Save trace data to file Load Load trace data from file Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 189 6 11 6 Display of bus information on the Simulator Debugger From left to right the contents are as follows e Address The status of the address bus e Data The status of the data bus e Size Indicates the data access size Product Display format Size the R32C Debugger DB 8bit DW 16bit DL 32bit the M32C Debugger DB 8bit the M16C R8C Debugger DW 16bit e Type Indicates that data has been accessed Display format Status Code 1 Instruction fetch Data Data access 1 The Code data displayed by the R32C Debugger are fixed to 32 bits long with the rest of data omitted The Code data displayed by the M32C Debugger M16C R8C Debugger are fixed to 16 bits long with the rest of data omitted e R W Indicates the data access status Display format Status R Read W Write If Type is Code the status is always R code read e h m s ms us
199. n the Editor Source window You can also switch to temporarily disable enable the software breakpoint in the S W Breakpoint Setting window 1 2 1 2 Area where software breakpoint can be set The area which can be set for software breakpoint varies depending on the product For the areas available for software breakpoint see the following Refer to 12 1 2 Area where software breakpoint can be set 1 2 2 Hardware Breaks Function This function stops the target program upon detecting data read writes to memory or instruction execution The H W Break Point Setting dialog box allows you to set hardware break points You can set up to 64 hardware break points You can set one hardware breakpoints with pass counts As hardware break point access types you can specify writing data to the hardware break point Write reading data from the hardware break point Read reading or writing data R W and fetching instructions Fetch You can also specify that execution breaks if the data read from or written to the hardware break point has a specific value If multiple hardware breakpoints have been set a break occurs when one of the hardware breakpoints is reached 1Features 1 3 Real Time Trace Function The real time trace function records the execution history of the target program The debugger for 740 doesn t support the real time trace function The execution history is referred to in the tracing window The execution his
200. n the ascending order of start time The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of alarm handler StaAddr Starting address of alarm handler name Name of alarm handler AlarmTime Starting time of alarm handler 6 14 10 2 Display the Alarm Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Of all the cycle start handlers defined in the configuration only those which are not started yet at present are listed in the ascending order of start time The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of alarm handler Name Name of alarm handler Almtim The amount of time by the millisecond remaining before the alarm handler s activation time Status Activity status of alarm handler The following are displayed in the Status area TALM_STA Alarm handler is in an operational state TALM_STP Alarm handler is in a non operational state 214 6Windows Dialogs 6 14 11 Display the Memory Pool Status In the MR window select Popup Menu Mode gt Memory Pooll MR wmioOor A mo0oHO lt FE ID BaseAddr Blk size Total Blk cnt Free Blk cnt map F 1 F 2 F 3 V 1 1 1 2 1 3 1 4 00078624 0008F2H 000956H
201. naas 86 6 1 Extended MENS e e a aa a a o rE E E deras dried eld 87 6 1 2 Setting the RAM monitor area cccccccccccccccesssssceeccecsesesnscecececsesesssseeeescsesesssaeeeeceseeeneaaees 88 6 21 0 Timing Setting Wmndowiaseusissisnnssaduseten a E T E N 89 6 2 1 Virtual Port D r r serie tenn Tea a a Eaa E o T E aE O 90 6 2 2 Virtual Port OQutputissa EE E e E E A AEE EE ENE EAEE E E EEE 92 6 2 3 Virtua Ater pterea a aaia aaaea aaa aa 92 6 2 4 Structure of Virtual Port Input Screen smssseserrererrrserrererrrserrrrerer reser rr er er se rr rr er er seen renen nn 94 ii 6 2 5 Structure of Virtual Port Output Screen ccccccccccccccssssceccceceesessececeeeceesessaeceeeeeesensaaees 97 6 2 6 Structure of Virtual Interrupt Screen s sssessesrsrrrrrrrsrrrrrerersrrerrerer reser rr er rr se rr rr er er been renen sn 99 6 2 T Extended MeNUSiy a otutessv ss sven ass ss sides R karer Ares Rives 101 6 2 8 Setting Virtual Port Inputs sororvrnrorroonnnnrvrnrnrsrenannrnrnennsrenennrnnrrnsseenennrnnnrnssresennnnnsensnee 102 6 2 9 Setting Virtual Port Outputs sneri reinoirei R E AR ELE EES ERES 110 6 2 10 Setting Virtual Interr pts kerisna R AA Sig 112 6 2 11 Regarding Evaluation Timings of Virtual Port Inputs Virtual Interrupts and I O Script NiE AT A EEE ANE EAE EE A EN R EA E keen 122 6 3 Output Port Window ar oha ee AE es LAD E TN ARR 123 6 3 F Extended Menus vivxevs sie cchsieiest aired aS sene a 124 6 4 ASM Wateh Window oserei ron E
202. nalyze window changes to the CPU occupation state display mode MR Analyze CERI Mark 00 00 00 000 335 00700 00164 498 00 00 00 164 163 VEC table ID name Num Max Run Time Min Run Time Avg Run Time Total Run Time Ratio 0 25 50 75100 32 OFFDBO SYSCALLD 17 00700 00 000 033 00 00 00 000 013 00 00 00 000 022 00 00 00 000 378 0 23 rot 33 orrpe4 svscannij 5 00 00 00 000 020 00700 00 000 019 00700 00 000 0129 00700 00 000 099 0 06 38 OFFDSE SYSCALL2 3 006 00 00 000 028 60 00 00 000 028 00700 00 000 028 00 00 00 000 084 0 05 i Idle 6 00700 00 000 017 00700 00 000 002 00700 00 000 006 00 00 00 000 036 0 02 1 taski 11 00700 00 014 003 00 00 00 000 001 00 00 00 008 957 00 00 00 098 528 60 02 memme 2 taskz 3 00 00 00 013 003 00700 00 000 001 00700 00 008 669 00700 00 026 008 15 84 3 tasks 2 00 00 00 013 006 00 00 00 000 003 00700 00 006 504 00700 00 013 009 7 92 4 task4 2 00 00 00 013 003 00 00 00 000 001 0070000 006 502 00700 00 013 005 7 92 15 Ntasks 2 00 00 00 013 007 00700 00 000 003 00700 00 006 505 00 00 00 013 011 7 93 Unknown oj 00 00 00 000 000 00 00 00 000 000 00 00 00 000 000 00700 00 000 000 0 00 The window shows the CPU occupation time and ratio by interrupt processing and by task T
203. ned from the I O Timing Setting Window Furthermore this function can be used in combination with the I O script function a function that allows you to define virtual port inputs and virtual interrupts For details refer to High end Debugging described later in this manual Using this I O script function you can specify more precise interrupt generation timings such as when the program reads or writes to memory or when the program has executed instructions a specified number of times Differences between Virtual Interrupts and Interrupts in Actual Chip Virtual interrupts differ from interrupts in the actual chip in the following points About the Interrupt Control and Interrupt Request Registers When a virtual interrupt is generated PD38SIM looks up the Interrupt Control Register s interrupt control bit as it simulates virtual interrupt generation If a virtual interrupt occurs when interrupt generation is disabled the interrupt request is saved inside the simulator so that a virtual interrupt is generated after interrupt generation is enabled However since the interrupt request bit is not simulated the interrupt request bit is not set even when an interrupt request is saved Nor can the virtual interrupts that have been saved be deleted by clearing the interrupt request bit The virtual interrupts saved in the simulator are deleted when the device is reset Note that you can use the I O script function to write a statement to the eff
204. ned to those expressions When using floating point numbers operation cannot be performed on an expression like 1 0 2 0 267 10 1 2 Scope Resolution The scope resolution operator is available as following Global scope valiable name 1 x val Class scope class name member name class name class name member name e g T member A B member 10 1 3 Mathematical Operators You can use the addition subtraction multiplication and division mathematical operators The following shows the order of priority in which they are evaluated 4 Notes e There is no support currently for mathematical operators for floating point numbers 10 1 4 Pointers Pointers are indicated by the asterisk You can use pointer to pointers and pointer to pointer to pointers etc Examples variable name variable name etc Notes e Immediate values cannot be processed as pointers That is you cannot specify 0xE000 for example 10 1 5 Reference References are indicated by the ampersand amp You can only specify amp variable name 268 10C C Expressions 10 1 6 Sign Inversion Sign inversion is indicated by the minus sign You can only specify immediate value or variable name No sign inversion is performed if you specify 2 or any even number of minus signs Notes e There is no support currently for sign inversion of floating point numbers 10
205. nology Corporation and Renesas Solutions Corporation is necessary to reprint or reproduce in whole or in part these materials If these products or technologies are subject to the Japanese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited Please contact Renesas Technology Corporation or Renesas Solutions Corporation for further details on these materials or the products contained therein For inquiries about the contents of this document or product fill in the text file the installer generates in the following directory and email to your local distributor SUPPORT Product name SUPPORT TXT Renesas Tools Homepage http www renesas com en tools Overview The High performance Embedded Workshop is a Graphical User Interface intended to ease the development and debugging of applications written in C C programming language and assembly language for Renesas microcomputers Its aim is to provide a powerful yet intuitive way of accessing observing and modifying the debugging platform in which the application is running This help explains the function as a debugger of High performance Embedded Workshop Target System The Debugger operates on the simulator system Supported CPU
206. nput and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual port input timings will appear Setup Dialog EG Q 0 o Expressions can be input Sian yeer First choose Read Access in the Data Input Timing column Next enter an address for virtual port input in the Input Address column the address to which you want data to be input using a hexadecimal number Then enter the address to be accessed for read to read data from memory in the Read Address column Virtual port inputs are executed when the memory address you ve specified here is accessed for read Then press the Next button Or press the Prev button here if you want to return to the previous dialog box A matrix dialog box for setting the virtual port input data will appear 105 Virtual interrupt counts EN Setup Dialog Finds the previous data you ve set UP or the next data DOWN i nae ee DE f i 10 20 030 4C 50 60 70 80 80 The setup example in this element rie kede Ca ete alet fn res specifies that data OxFF be set when virtual interrupt occurs 7 times EV NVE ee Double click on an element you want and set the desired input value in it EE EE EE SE EE er Cancel In this dialog box set the data you want to be actually input to memory Follow the procedure below to set data 1 Move the mouse
207. nrnrnenssrenennrnrnenssnesennnnnrensssernn 66 5 2 4 Step4 Setting a Breakpoint rereroroorronnnnrnrnrersrensnnrnrnensreenannrnnnensrnenennnnnnenssnesennnnnsensnsenen 68 5 2 5 Step5 Executing the Program cccsssssccccccecsesscccececscsessnccecececsesseaececscsensnseaeeececs 69 5 2 6 Step6 Reviewing Breakpoints cccccssssscecececsessececececsesssscecececsesesssseseesesesenssaeeeeees 71 5 2 7 Step T Viewing Register sssesccccccccsessssneccccscsessnscecccescsesessnaeecsscecsessnaueesscecesnseeeacsececs 72 5 2 8 Step8 Viewing Memory ccssccccccccsesssssnccececscsensnececececesssaeaecececsessaaeaecececsessnseaeeececs 73 52 9 StepO Watching Variables sciis cesses nn a lese os wate cate Resin ea oan Cab eee ake 74 5 2 10 Step10 Stepping Through a Program reerrerrronnnnrrrnrrrrernannrnrnenssesnennnnnnenssnesennrnnsenssseren 76 5 2 11 Step11 Forced Breaking of Program Executions cccccscsccccecsesssssceeeceseenssssceeeeeees 79 5 2 12 Step12 Displaying Local Variables errrrrrrrronnnnrvrnrrrrrrnannrnrnenssrenennrnnnenssnerennnnnvenssnnnnn 80 5 213 Step13 Stack Trace Function enne cace evden vied da beens Ss ee Sea a Se A ARE Cave onde NER Sebi 81 5 2 14 What Next onra intii ao ies Sess SVARS EE reser ae geit UTE 82 Reference 83 6 Windows Dialogs 85 6 1 RAM Monitor Window ccccccccesssscecsscecessnececeesaececeeeeeeecaeeecsesaececeeaeeceesaeeessesaececeeeaeeseaeeee
208. nt status WAI SLP Sleep state WAI SLP SUS Sleep state double wait WAI DLY Time wait state duw to dly_tsk WAI DLY SUS Time wait state duw to dly_tsk double wait WAI FLG Event flagwait status WAI FLG SUS Event flagwait status double wait WAI SEM Semaphore wait status WAI SEM SUS Semaphore wait status double wait WAI MBX Message wait status WAI MBX SUS Message wait status double wait WAI SLP TMO Sleep state with time out WAI SLP TMO SUS Sleep state with time out double wait WAI FLG TMO Event flag wait state with time out WAI FLG TMO SUS Event flag wait state with time out double wait WAI SEM TMO Semaphore wait state with time out WAI SEM TMO SUS Semaphore wait state with time out double wait WAI MBX TMO Message wait state with time out WAI MBX TMO SUS Message wait state with time out double wait 2Display the Wait Cancellation Condition of Event Flag flg mode Status TWF ANDW Waits for all bits set in the wait bit pattern to be set AND wait TWF ANDW TWF CLR Clears the event flag to 0 when an AND wait has occurred and the task wait status has been cancelled TWF ORW Waits for any one bit set in the wait bit pattern to be set OR wait TWF ORW TWF CLR Clears the event flag to 0 when an OR wait has occurred and the task wait status has been cancelled 198 6Windows Dialogs 6 1
209. o 12 1 2 Area where software breakpoint can be set for details You can set break points in the Editor Source Window To do so double click the break point setting area S W breakpoints column for the line in which you want to set the break A red marker is displayed on the line to which the break point was set tt Sample c i 0 while 1 I for 0 i lt DATA SIZE i I data i data i 1 data i 2 data i 3 sub Double click You can delete the break point by double clicking again in the break point setting area S W breakpoints column In the Editor Source window a display of S W breakpoints column is set to Enable by default To erase this column deselect the S W breakpoints check box in the dialog box opened by choosing the main menu Edit gt Define Column Format The S W breakpoints column is erased from all Editor Source windows And select popup menu Columns gt S W breakpoints in the Editor Source window A column can be set up for each Editor Source windows 136 6Windows Dialogs 6 9 H W Break Point Setting Dialog Box The H W Break Point Setting dialog box allows you to set hardware break points HAN Break Point HAN Break Disable Enable Address key input v Bl Pass Count fi Access Type Write Length Byte v Data Compare Not Specify Data p eae gt Help Close
210. oading the Tutorial Program Download the object program to be debugged The download file and the address to be downloaded will depends on the target mcu you uses Please replace the screen image and addresses with corresponding one to your target mcu e The Debugger for M16C R8C or M32C Select Download module from Tutorial x30 under Download modules e The Debugger for 740 If you use the C Compiler Package for 740 Family select Download module from Tutorial 695 under Download modules If you use the Assembler Package for 740 Family select Download module from Tutorial hex under Download modules dd E E Tutorial g Tutorial 3 6 Assembly source file 2 lowlvlere 3 8 C source file E dbsctc lowsre c resetpre c sbrk c Tutorial c ownload modules TETEE p Download module IoD ependencie lowerch Download module debug data only sbrk h Unload module stacksct ull my ull Configure View iv Allow Docking Hide 66 5Tutorial 5 2 3 2 Displaying the Source Program This debugger allows the user to debug a user program at the source level Double click tutorial c under C source file A Editor Source window opens and the contents of a Tutorial c file are displayed dd amp Tutorial Tutorial 3 Assembly source file
211. od is available that allows you to materialize data input to memory such as the SFR or interrupts such as timer interrupt in an artificial manner For details about this method see I O Script and Interrupts described later T O Script Virtual Port Input Function This function defines changes of the data that is input from external devices to a specified memory address Using this function you can simulate data inputs to the ports defined in SFR The following shows timings at which data can be input to memory 1 When program execution has reached a specified number of cycles 2 When a specified memory location is accessed for read by a program 3 When a specified virtual interrupt is generated Virtual interrupts at the above timings can be defined from the I O Timing Setting Window Use of the I O script function the function that allows users to define virtual port input or virtual interrupt makes it possible to specify more elaborate data input timing such as when the program performs fetch or writes to memory or when it executed an instruction a specified number of times Virtual Port Output Function When a data write to some memory address by the program occurs this function records the written data value and the cycle at which the data was written The recorded data can be verified in graphic or numeric format from the I O Timing Setting Window The number of data entries that can be recorded by this function equals the number o
212. of C no function names can be used 10 1 16 Character Constants You can use characters enclosed in single quote marks as character constants For example A b etc These character constants are converted to ASCII code and used as 1 byte immediate values Notes e You cannot register character constants only as C watchpoints e Character constants are valid only when used in a C C expression that specifies a C watchpoint and when specifying a value to be assigned character constants are processed in the same manner as immediate values 10 1 17 Character String Literals You can use character strings enclosed in double quote marks as character string literals Examples are abcde I am a boy etc Notes e Character string literals can only be placed on the right side of an assignment operator in an expression They can only be used when the left side of the assignment operator is a char array or a char pointer type In all other cases a syntax error results 271 10 2 Display Format of C C Expressions C C expressions in the data display areas of the C Watch Windows are displayed as their type name C C expression variable name and result of calculation value as shown below The following describes the display formats of the respective types 10 2 1 Enumeration Types e When the result value of calculation has been defined its name is displayed DATE date Sunday all Radices e If t
213. of a virtual interrupt e Priority level display area displays the priority level of a virtual interrupt e Virtual interrupt display area displays timing at which the virtual interrupt you ve set is generated This means that a virtual interrupt is generated me This means that a virtual interrupt is not generated e Cycle count display area displays cycle counts 6 2 6 2 Screen structure for executed address synchronized interrupts When you ve set virtual interrupts that are synchronized to executed addresses a display screen configured as shown below will appear nterrupt address Number of times Address Vec He SEERA Be De Execution count display 004444 14 2 area Executed Vector Priority level Virtual interrupt display area address display display area display area area e Executed address display area displays the fetch address the address where the program is executed at which time a virtual interrupt is generated e Vector number display area displays the vector number of a virtual interrupt e Priority level display area displays the priority level of a virtual interrupt e Virtual interrupt display area displays timings by an asterisk at which the virtual interrupt you ve set is generated When an asterisk is indicated it means that a virtual interrupt is generated When an asterisk is not indicated it means that a virtual interrupt is not generated e Execution count display area displays e
214. ols and labels defined in your target program or symbols and labels defined using the Assemble command e You can include alphanumerics the underscore _ period and question mark in symbols and labels However do not start with a numeric e Symbols and labels can consist of up to 255 characters e Uppercase and lowercase letters are unique Product Name Notes The debugger for M32R The debugger for M32C The debugger for M16C R8C You cannot include the assembler structured instructions pseudo instructions macro instructions operation code or reserved words SECTION BYTE switch if etc You cannot use strings that start with two periods for symbols or labels The debugger for 740 8 2 2 1 Local label symbol and scope You cannot use the register name A X Y S PC PS P You cannot include the assembler structured instructions pseudo instructions macro instructions operation code or reserved words SECTION BYTE switch if etc You cannot use strings that start with two periods for symbols or labels DO to D65535 FO to F65535 IO to 156635 SO to S65535 0 to 65535 0 to 65535 This debugger supports both global label symbols which can be referenced from the whole program area and local label symbols which can only be referenced within the file in which they are declared The effective range of local label symbols is known as the scope which is measur
215. omparison in if or while statements e You can specify up to 4096 characters per line An error occurs if a line exceeds this number of characters e When a script file containing illegal commands is automatically executed when you select Option gt Script gt Run from the Script Window menu after opening a script file or click the button in the Script Window execution of the script file continues even after the error is detected except when the script line itself cannot be read If an error is detected and the script file continues to be executed operation after detection of the error cannot be guaranteed Reliability cannot therefore be placed on the results of execution after an error has been detected 249 8 1 1 Script Command You can use the same script commands that you enter in the Script Window You can also call script files from within other script files nesting up to 10 levels 8 1 2 Assign Statement Assign statement s define and initialize macro variables and assign values The following shows the format to be used macro variable expression e You can use alphanumerics and the underscore 9 in macro variable names However you cannot use a numeric to start a macro variable name e You can specify any expression of which the value is an integer between Oh and FFFFFFFFh to be assigned in a macro variable If you specify a negative number it is processed as twos complement e You can us
216. ons cccccccsesesssseeececsessnsscecececsenssnececececeesenssaeeeeees 262 9 35 Constants lt 003 AE wastes ase aah ase ie keke EROA 262 9 3 2 Symbols and abel si icc sedeoecccecs essed acc eens lsat eee dst eee oe Re 262 9 3 3 Macro VarlablesvsinonettnsssanerauStaskea kne a eee 263 9 3 4 Memory Variables caccceciccccscceciccteecccccsesecccctccccscctesececenceceecsteseescetedcedceteaecccesceccdesteseaneeeees 263 9 3 5 Ch racter Constants sapei era i sed ees gheend teaie dye acgeesxsdetecd sole ae 263 9 3 6 Operators 9 3 7 tisfetch isint Hisread HSWrIite scstieveciseserecessiesesionersecesversetisnseriers s n ia e a o 264 9 4 Method for Writing Left side Expressions s ssssseseererersoserrereresrererreresrrrerrrr enes seen rer er renen rr nen sn 266 9 41 Macro Varia blesisss iccs ti avg ii vader eet caaaheesegegett Gti ka BEM este 266 9 4 2 Memory Variables cecinil iiinn ds te ded EE AEA E EE t EEs 266 C C Expressions 267 10 1 Waritimnge C CE EX pressions nonren e a o e E E E E Dre 267 10 11 Trimedrate Vales a a a a E chs or E ie beg a E 267 T0 1 2 Scop nA T0 KO Ao 1O a HAASE bs EEE PAE EE E ENE E E E EEN 268 10 1 3 Mathematical Operators rerrrrrannrnrrrnrrrrrenannrrrnsersrensnnrrrnsersrenannrnnnsnessensnnrvnnssessensnnnsen 268 TOLA Pointers EE E sda Mable E E E R E E eske 268 10 1 5 Reference m remrnvrvrrrsnvrrrrrorvrrrrnnrrrrssnnrsrsrersrsrsnnrnrssennrsrrssnnrssennnsrsssnnrsrsssnsssssnnrsssssnnsennn 268
217. ontents Pri Displays priority Ready Queue Shows the ID Nos and task names of tasks in the ready queue e Up to 8 characters of the task name is displayed in the Ready Queue field When the task name exceeds 8 characters the extra characters are omitted 201 6 14 4 Display the Timeout Queue Status In the MR window select Popup Menu Model gt Timeout Queuel ENRETE FETEI Value ID name TOFFH 7FOOH 7FOFH TFFOH TFFFH 7FFFH TFFFH 21 task2l dly 24 task24 dly 22 task22 dly 23 task23 dly 6 task6 dly 7 task dly s 20 task20 dly 6 14 4 1 Display the Timeout Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 The function of each item is as described below Tasks waiting at present are displayed in the descending order of timeout value When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents Value Shows the timeout value of each task ID name Shows the ID No and task name of the tasks in the timeout queue e Following character strings are used to indicate the type of wait state Character string Wait state slp Wait due to tslp tsk dly Wait due to dly_tsk flg Wait due to twai flg sem Wait due to twai sem mbx Wait due to trev msg e When a task connected to the timeout queue is in the state of forced waiting double waiting a string s
218. or the assembler program may different from them e Step9 and Step12 are descriptions of C program 5 2 Usage Please follow these instructions 5 2 1 Step1 Starting the Debugger 5 2 1 1 Preparation before Use To run the High performance Embedded Workshop and connect the emulator refer to 3 Preparation before Use 5 2 1 2 Setup the Debugger If it connects with an emulator the dialog box for setting up a debugger will be displayed Please set up the debugger in this dialog box To setup the debugger in this dialog box refer to 4 Setup the Debugger After the setup of a debugger it will function as a debugger 64 5Tutorial 5 2 2 Step2 Checking the Operation of RAM Check that RAM is operating correctly Display and edit the contents of the memory in the Memory window to check that the memory is operating correctly Note The memory can be installed on the board in some microcomputers In this case however the above way of checking the operation of memory may be inadequate It is recommended that a program for checking the memory be created 5 2 2 1 Checking the Operation of RAM Select Memory from the CPU submenu of the View menu and enter the RAM address Here enter H 400 in the Display Address edit boxes The Scroll Start Address and Scroll End Address editing box is left to a default setting By default the scroll range is set to Oh to the maximum address of MCU Display Addre
219. oring of stack utilization of that stack stops at that point 37 3 Preparation before Use Please run the High performance Embedded Workshop and connect the emulator In addition in order to debug with this product it is necessary to create a workspace 3 1 Workspaces Projects and Files Just as a word processor allows you to create and modify documents this product allows you to create and modify workspaces A workspace can be thought of as a container of projects and similarly a project can be thought of as a container of project files Thus each workspace contains one or more projects and each project contains one or more files workspace Workspaces allow you to group related projects together For example you may have an application that needs to be built for different processors or you may be developing an application and library at the same time Projects can also be linked hierarchically within a workspace which means that when one project is built all of its child projects are built first However workspaces on their own are not very useful we need to add a project to a workspace and then add files to that project before we can actually do anything 38 3Preparation before Use 3 2 Starting the High performance Embedded Workshop Activate the High performance Embedded Workshop from Programs in the Start menu The Welcome dialog box is displayed Cancel Open a recent project wor
220. orresponding to instruction addresses Double click here to bring up a dialog box to search for addresses 4 Mnemonic display area Shows the mnemonics of instructions Other display areas are the same as in bus mode In addition to disassemble information the window can display source line or data access information in combination In this case the display will be similar to the one shown below ve laaa viasznv Range 32511 00000 Area Break File Cycle 19026 Address OFO161 Time 00 00 00 054 423 Cycle Address Obj code Label Mnemonic Datalecess hr m s ms us LOCAL C 42 for i 0 i lt 10 i 19026 OFO161 778BFD0400 CHP W 0004H 3H FB 00 00 00 054 423 0007E3 OS R 0007E4 00 R 19021 OFO166 7DCA39 JGE FO1A1H 00 00 00 054 423 LOCAL C 43 char localScope char a 19019 OFO169 C661FF MOV B 61H 1H FB 00 00 00 054 423 LOCAL C 44 long localScope_long 0 19017 OFO16C D90BF9 HOV W HOH 7H FB OOO7ES 61 W 00 00 00 054 423 19014 OFO16F D90BFB MOV UW HOH SH FB 0007DF oo W 00 00 00 054 423 x 186 6Windows Dialogs 6 11 3 Configuration of Data Access Mode When data access mode is selected while bus mode and disassemble mode are unselected trace information is displayed in data access mode Data access mode is configured as shown below OR Cycle I m s ms us 05012 global struct erte 00 00 00 055 299 05007 00047D 00 00
221. ou can scroll the screen to go to the desired location 2 Input data in the selected place using a hexadecimal number The data size that can be input is one byte from 0x0 up to OxFF 3 Repeat steps 1 and 2 as many times as the number of data you want to set When you finished entering all data press the Next button A dialog box for saving the virtual port input data you ve set to a file virtual port input file will appear 108 6Windows Dialogs Save Data i 21x File name inputi SS Save as type izo Script Files ios v Cancel 4 Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into the simulator debugger back again by using the Load menus in the I O Timing Setting window When you ve input a file name press the Save button Thus you ve finished setting the virtual interrupt synchronized virtual port inputs 109 6 2 9 Setting Virtual Port Outputs The Virtual Port Output function allows data values written to some memory address by a program to be recorded along with cycles at which data was written The recorded data can be displayed for verification in graphic or numeric form ATTENTION e The number of data entries recorded is the number of entries specified on the Init dialog box s I O Scrip tab reckoning from when the program started to run When reexecuted the previous data is cleared e Up to 200 ins
222. ouble wait 200 6Windows Dialogs e 2Display the Wait Cancellation Condition of Event Flag Wfmode Status TWF ANDW Waits for all bits set in the wait bit pattern to be set AND wait TWF ORW Waits for any one bit set in the wait bit pattern to be set OR wait 6 14 3 Display the Ready Queue Status In the MR window select Popup Menu Mode gt Ready Queuel MR x LENEA LAN Mba AACA Current Run Task 1 main Number of Priority 100 RdyQ 1 main 2 task2 15 taskl15 16 taskl6 17 _task17 18 _task18 The following data is displayed in the status bar Current Run Task 1 main Number of Priority 100 6 14 3 1 Display the Ready Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 The function of each item is as described below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents Pri Displays priority RdyQ Shows the ID Nos and task names of tasks in the ready queue e Up to 8 characters of the task name is displayed in the RdyQ field When the task name exceeds 8 characters the extra characters are omitted 6 14 3 2 Display the Ready Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 The function of each item is as described below When the realtime OS is MRxx conformed to ulTRON specifications V 4 0 Item C
223. ox set the virtual interrupts you want to be actually generated Follow the procedure below to set virtual interrupts 1 Move the mouse cursor to the cycles location called an element where you want a virtual interrupt to be generated then click the left mouse button Or you can scroll the screen to go to the desired location 2 The element is marked by an asterisk when you ve clicked Click at the same place again if you want the virtual interrupt you ve set to be canceled In this case the asterisk goes out 3 Repeat steps 1 and 2 as many times as the number of virtual interrupts to be generated When you finished setting all virtual interrupts press the Next button A dialog box for saving the virtual interrupts you ve set to a file virtual interrupt file will appear 116 6Windows Dialogs Save in E My Compter ges 21x DATA D Compact Disc E Compact Disc F SS SUBSYS G File name Jinput ios Save as type fo Script Files ios v Cancel pr Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into the simulator debugger back again by using the Load menus in the I O Timing Setting window When you ve input a file name press the Save button Thus you ve finished setting executed address synchronized virtual interrupts 6 2 10 3 Setting interval synchronized interrupts To set virtual interrupts which
224. p he ay Mark 00 00 00 1 90 802 00 00 00 784 555 00 00 00 593 752 Indicator 00 00 01 472 055 Scale 5 600414 Grid 00 00 01 ID namne OOOO pg ds i o a om SEE GE co HETE WO 2 AGN PES j 1 ie av rn ee p AEE saerasae s DJAHGBJENTJEM 1 2 2 22 2e eee eee fone ee eee eee eee eee task4 1 M 4 1 1 m L tasks Mi 4 4 lm m 4 Mm Lt task6y See See ee Se en i i i task3 m 1 M EE ee 4m al cai a bata tachi Uitte etal i dn SE i cect Raia a alate a a tae a alata ala a Drag the start marker position and end marker position The time interval between the markers is displayed in the status bar Note e Definition of time value in the Task Trace window The time value in the Task Trace window indicates the execution elapsed time which sets the program execution start point to 0 in all the cases On the contrary a numeric value above the grid line scale in the Task Trace window is a relative value which sets the start marker to 0 the grid interval is specified in the Value dialog which has nothing to do with the time value It is provided so that you can see the window easily 6 17 2 2 5 Move the Marker Each marker can be moved by dragging
225. pecified data in specified C variable expression SetMemoryByte MB Checks and changes memory contents in 1 byte units SetMemoryLword ML Checks and changes memory contents in 4 byte units SetMemoryWord MW Checks and changes memory contents in 2 byte units Sleep Halts for user input until the specified time has elapsed SoftwareBreak SB Sets and checks software breaks SoftwareBreakClear SBC Clears software breaks SoftwareBreakClearAll SBCA Clears software breaks SoftwareBreakDisable SBD Disables software breakpoints SoftwareBreakDisableAll SBDA Disables all software breaks SoftwareBreak Enable SBE Enables software breakpoints SoftwareBreakEnableAll SBEA Enables all software breaks StackMonitor SM Sets and checks stack utilization measurement Status Checks the operating status of the MCU Step S Step execution of source line StepInstruction SI Step execution of instructions Stop a Stops program execution Symbol SYM Checks assembler symbols TraceData TD Realtime trace data display TraceList TL Displays disassembled realtime trace data TracePoint RP Sets and checks a trace points UnAlias Cancels the alias defined for a command UnAliasAll Cancels all aliases defined for commands Up Displays the calling function UploadHex UH Outputs data to an Intel HEX format file UploadMot UM Outputs data to a Motorola S format file Version VER Displays the version No Wait Waits for an event to occur before command input Where
226. pen toolbar customize dialog box Allow Docking Allow window docking Hide Hide window The simulator debugger doesn t support because the entire memory area is coverage area 130 6Windows Dialogs 6 6 2 Refer to the Source Line the Executed Address It is possible to refer in the Editor Source Window or Memory Window 6 6 2 1 Refer in the Editor Source Window In the Editor Source window a display of Coverage Measurement is set to Disable by default To enable the display check the Coverage check box in the dialog box opened by choosing the main menu Edit gt Define Column Formatl The column for a coverage measurement display is displayed on all Editor Source windows And select popup menu Columns gt Coverage in the Editor Source window A column can be set up for each Editor Source windows Init i l while 1 I for i 0 i lt DATA SIZE i I data i data i 1 data i 2 datalit3 1 sub 6 6 2 2 Refer in the Memory Window In the Memory window a display of Coverage Measurement is set to Disable by default To enable the display select popup menu Coverage gt On Off in the Memory window Memory Ldata 131 6 7 Script Window The Script Window displays the execution of text format script commands and the results of that execution Script commands can be executed using a script file or interactively You
227. program execution has reached a specified number of cycles In this case set cycle synchronized inputs 2 If you want data to be input when some memory location is read Data can be input when the program accesses a specified memory location for read For example this method can be used in cases where you want a variable e g global variables located at fixed addresses to be assigned a value when it is read In this case set read access synchronized inputs 3 If you want data to be input when some virtual interrupt occurs Data can be input when a specified virtual interrupt is generated For example this method can be used in cases where memory for the SFR is referenced in an interrupt handler In this case set interrupt synchronized inputs ATTENTION Up to a total of 50 virtual port input virtual interrupt and I O script procedures can be set However if you are using the Printf function output function in the Output Port Window the number of virtual port input virtual interrupt and I O script procedures that can be set is limited to a total of 48 6 2 8 1 Setting Cycle synchronized Inputs To set cycle synchronized virtual port inputs choose the Setup menus in the I O Timing Setting Window The dialog box shown below will appear Select Type Set this item Sot Virtual Port Input C Set Virtual Port Output C Set Virtual Interrupt Cancel Here choose the item Set Virtual Port Input and pres
228. r false If the conditional expression is true statement 2 is executed Otherwise statement 3 the else statement is executed e The else if and else statements can be omitted e The if statement can be nested in up to 32 levels e Right side expressions can be used for the conditional expression e The conditional expressions written in I O script are calculated as unsigned type Therefore if negative values are compared in an if statement the operation to be performed by this debugger is indeterminate 260 91 0 Script 9 2 4 Repeat Statement while and break Statement Repeat statements judge the results of expressions thereby executing statements repeatedly The following shows a description format while conditional expression statement or break statement e If the conditional expression is true the statement is executed repeatedly If the conditional expression is false program execution exits from the loop e The while statement can be nested in up to 32 levels e A break statement is used if it is necessary to forcibly exit the while statement If the while statement is nested program execution exits from the innermost loop e Right side expressions can be used for the conditional expression e The conditional expressions written in I O script are calculated as unsigned type Therefore if negative values are compared in an while statement the operation to be performed by this debugger
229. rea indicate points at which data are output To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area e Cycle count display area displays cycle counts Hexadecimal mode Virtual port output results are displayed in hexadecimal mode Outout cycle Cycle Address 1943130313030308181818181318181318101308181a2 ce count He fo fam Gam am I Address display area Output data display area e Address display area displays the address to be monitored for virtual port output e Output data display area displays the data as virtual port output results by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area e Cycle count display area displays cycle counts 98 6Windows Dialogs 6 2 6 Structure of Virtual Interrupt Screen 6 2 6 1 Screen structure for cycle synchronized interrupts When you ve set virtual interrupts that are synchronized to machine cycles a display screen configured as shown below will appear Interrupt cycle Cycle NEG Pri Ce Cycle count RT display area Virtual interrupt display area Vector Priority level display display area area e Vector number display area displays the vector number
230. responding to the desired item The Color Setting dialog is opened Change the display color in the dialog 226 6Windows Dialogs 6 15 2 5 Measure the Execution Time of Task You can measure the execution time between the markers by changing the positions of start marker and end marker in the MR Trace window s t MR Trace lei xi BOOS S ue oy fal Mark 00 00 00 078 808 00 00 00 131 909 00 00 00 053 101 hdicator 00 00 00 184 063 Scale 2 401435 Grid 00 00 00 032 832 Area Break VEC table ID name 32 OFED80 SYSCEALLO 33 OFFDB4 SYSCALL1 38 OFFD98 SYSCALLZ Idle task4 Unknown taskl task2 task5 task3 RE i MAR i Me SA a VER AR od OT Drag the start marker position and end marker position The time interval between the markers is displayed in the status bar Note Definition of time value in the MR Trace window The time value in the MR Trace window indicates the execution elapsed time which sets the program execution start point to 0 in all the cases On the contrary a numeric value above the grid line scale in the MR Trace window is a relative value which sets the start marker to 0 the grid interval is specified in the Value dialog which has nothing to do with the time value It is provided so that you can see the window easily 6 15 25 1 Move the Marker Each marker can b
231. result Trace measurement range Shows the currently set range of trace measurement First line cycle Shows the cycle of the first line displayed First line address Shows the address of the first line displayed First line time First line time Shows the time information of the first line displayed Window splitting box Double clicking this box splits the window into parts addition to bus information the window can display disassemble source line or data access information in combination In this case the display will be similar to the one shown below k Trace JO x va QQQ vasz av Range 32511 00000 Area Break File Cycle 32389 Address OFO107 Time 00 0000053587 Label Address Data BUS BIU B W RUT CPU ON B T O T 76543210 Datakccess hrm 8 ms us E GLOBAL C 52 for jiji 5 IF d OFO107 CHP U HSH 4H FB 32359 0007E2 0000 ith DU W o av 1 1 1 11111111 0007E2 0000 W 00 00 00 053 587 32388 0007E2 0000 ith DW R o R 0 1 1 11111111 O007E2 0000 R 00 00 00 053 588 32387 OFO10A CA7D 16h IV R 0 2 1 1 11111111 00 00 00 053 588 32386 OFO10C 7318 16h IV R o 4 1 i 11111111 00 00 00 053 588 185 6 11 2 Configuration of Disassemble Mode When disassemble mode is selected while bus mode is unselected trace information is displayed in disassemble mode Disassemble mode is configured as shown below
232. rting The memory is set up as follows immediately after starting the debugger 00000h to 003FFh Filled with 00h 00400h to OFFFFh Filled with FFh 10000h to EFFFFh No memory immediately after starting F0000h to FFFFFh Filled with FFh Reset Vector Set to 000F0000h The Map Function MAP Command The simulator divides the memory between 00000h and FFFFFh into sixteen equal parts so that the memory space can be mapped in 64KB blocks Note that the blocks with the lowest address 00000h to OFFFFh and with the highest address FO000h to FFFFFh are already mapped when the simulator starts Use the MAP command to map the simulator memory Memory mapped using this command is initialized with the value FFh immediately after being allocated When downloading a target program the memory is mapped automatically Note Memory space that has been mapped cannot be deleted Accessing an Area Without Memory There is no actual memory in the 14 memory blocks between 10000h and EFFFFh unless memory is secured If an attempt is made to access this area an illegal memory access error occurs and execution of the command or program stops 28 2Simulation Specifications 2 3 4 I O SFR The actual chip s peripheral I Os other than the CPU core such as the timers DMAC and serial T O are not supported The SFR area to which the peripheral I Os are connected is also handled as RAM by the simulator However a meth
233. rupt control for virtual interrupts generated A statement can be written so that when an interrupt occurs each Interrupt Control Register s interrupt request bit is set to 1 The priority levels set in each Interrupt Control Register s interrupt priority level select bit can be referenced However once a virtual interrupt is generated and registered in the simulator the priority of the virtual interrupt cannot be altered even when the priority levels specified with the interrupt priority level select bit is changed by the user program The Flag Register FLG s interrupt enable flag I flag and processor interrupt priority level IPL are referenced as in the actual chip I O Script Function This function allows you to write virtual port input and virtual interrupt settings to a file in script form Therefore it provides a more flexible way to define virtual port inputs and virtual interrupts than can be set from the I O Timing Setting Window Specifically this includes for example reading the divide by N ratios you ve set in the timer register and generating a timer interrupt periodically 17 e Port input output GUI input function The GUI input function refers to simulating the user target system s simple key input panel on a window The key input panel is created from the GUI input window The input panel can have the following parts placed on it Buttons Virtual port input or virtual interrupt can be performed by pressin
234. s Data Setting Range addr Address gt Address1 400 Jal Address2 000000 v Al Function Source File v Function ACCESS WRITE ADDRESS 000400 GONDITION addr 000400 omei Al Set Event Status Event Type DATA ACCESS x Address Data Setting Ranee Not Specify v Data 1 pooo Data 2 food Access WRITE I Mask Joao ACCESS WRITE ADDRESS 000400 CONDITION faddr 000400 cance 167 Example Writing byte length data 32h to even address 400h AT Set Event Status DATA ACCESS poao a 7 Al Set Event Status DATA ACCESS data Datal Re gt po oo we A 168 6Windows Dialogs Example Writing byte length data 32h to odd address 401h l Set Event Status DATA ACCESS faddr Address1 v poar ja d Al Set Event Status DATA ACCESS vi 2 po ooo WRITE A ov 169 Example Writing word length data 1234h to even address 400h Al Set Event Status DATA ACCESS addr Address1 Al Set Event Status DATA ACCESS vi Fa wees 170 6Windows Dialogs Example Writing data 10h 3Fh to even address 400h Al Set Event Status DATA ACCESS addr Address1 Al Set Event Status DATA ACCESS vi fo gt pr WAT dr 171 6107 32 Reading writing dat
235. s virtual interrupts and I O script files you ve set are evaluated at the following timings 6 2 11 1 Evaluation timings When program is executed continuously when come is executed When program is single stepped When program is overstepped When control is returned RODE 6 2 11 2 Processing when program is reset The virtual port inputs virtual interrupts and I O script files that you ve set are reevaluated Namely when a program is reset the virtual port inputs virtual interrupts and I O script files you ve set are set newly again 6 2 11 3 Processing when I O Window is closed If the I O Window is closed the virtual port inputs virtual interrupts and I O script files that you ve set are not evaluated This case is the same as when their settings have been deleted 122 6Windows Dialogs 6 3 Output Port Window The Output Port Window is used to display the data to be output to ports on a window or output the data to a file The debugger for 740 doesn t support this function It also allows you to verify the data that is output to UARTs by the Printf function Output Destination Format Window ASCII display Hexadecimal display File ASCII output Hexadecimal output Binary output Not including data output for the Printf function however Gal fa amp Os HA Port UARTI Log File Number 1 ABDCDEFGHIJ This is test ABDCDEFGHIT This is test ABDCDEFGHI
236. s an Intel HEX format file LoadMot LM Downloads a Motorola S format file LoadSymbol LS Loads source line ASM symbol information Loadleee LI Downloads IEEE 695 absolute format files Reload Re downloads the target program UploadHex UH Outputs data to an Intel HEX format file UploadMot UM Outputs data to a Motorola S format file 7 1 3 Register Operation Commands Command Name Short Name Contents Register R Checks and sets a register value 7 1 4 Memory Operation Commands Command Name Short Name Contents DumpByte DB Displays the contents of memory in 1 byte units DumpWord DW Displays the contents of memory in 2 byte units DumpLword DL Displays the contents of memory in 4 byte units SetMemoryByte MB Checks and changes memory contents in 1 byte units SetMemoryWord MW Checks and changes memory contents in 2 byte units SetMemoryLword ML Checks and changes memory contents in 4 byte units FillByte FB Fills a memory block with the specified data in 1 byte units FillWord FW Fills a memory block with the specified data in 2 byte units FillLword FL Fills a memory block with the specified data in 4 byte units Move E Moves memory blocks MoveWord MOVEW Moves memory blocks in 2 byte units MoveLword MOVEL Moves memory blocks in 4 byte units 243 7 1 5 Assemble Disassemble Commands
237. s products or if you have any other 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 xtENESAS C 7 D me on lt D D 740 Simulator Debugger V 1 02 User s Manual Renesas Microcomputer Development Environment System R Electroni enesas Electronics Rev 1 00 2006 08 www renesas com Active X Microsoft MS DOS Visual Basic Visual C Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries IBM and AT are registered trademarks of International Business Machines Corporation Intel and Pentium are registered trademarks of Intel Corporation Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated All other brand and product names are trademarks registered trademarks or service marks of their respective holders Keep safety first in your circuit designs Renesas Technology Corporation and Renesas Solutions Corporation put the maximum effort into making semiconductor products better and more reliable but there is always the possibility that trouble may occur with them Trouble with semiconductors may lead to personal injury fire or property damage Remember to give due consideration to saf
238. s synchronized interrupt Virtual interrupts can be generated when the program has executed a specified address The diagram below shows an example of a virtual interrupt that is synchronized to executed addresses funci Virtual interrupt is generated Processing when program execution has moved into address FO000 As shown above a specified virtual interrupt can be generated when program execution has moved into address F0000 By using this function you can specify that a virtual interrupt be generated when address F0000 is executed first by the program and that no virtual interrupt be generated when the address is executed next as shown below Number of times the address F0000 is executed Whether virtual interrupt is generated First Virtual interrupt is generated Second Virtual interrupt is not generated Third Virtual interrupt is generated 3 Interval synchronized interrupts A virtual interrupt can be generated at specified intervals The following shows an example of a virtual interrupt which is synchronized to a specified interval time Example where virtual interrupt of software interrupt No 21 timer AO is defined Virtual interrupt is generated every 200ms 0 100 200 300 400 500 600 TOO 800 900 Execution time ms As shown above virtual interrupts in this case timer AO interrupt can be generated in interval synchronized 93 6 2 4 Structure of Virtual Port Input Screen
239. s the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual port input timings will appear 102 6Windows Dialogs Setup Dialog Expressions Fr can be input read Aadress Zoo here 10000 100000 De First choose Cycle in the Data Input Timing column Next enter an address for virtual port input in the Input Address column the address to which you want data to be input using a hexadecimal number Then enter the cycles at which you want the virtual port input to be started and ended for Start cycle and End cycle respectively using decimal numbers Then press the Next button Or press the Prev button here if you want to return to the previous dialog box A matrix dialog box for setting the virtual port input data will appear 103 Setup Dialog Finds the previous lata you ve set or the next data DOWN The setup example in this element specifies that data 0x22 be set at the 10 016th cycle CL A sna a Pemer non E 11 A a a Se ee et eee e Ce Pe ee fr ja AT ee MIR Double click on an EE E ee ee element you want re and set the desired input value in it Spee pass pss ess pssepsseressrss paca EE EE EE EE SE EE EE In this dialog box set the data you want to be actually input to memory Follow the procedure below to set data 1 Move the mouse cursor
240. setting for the emulator use has been registered The session file is created by default The session file has information about the target selected when a project was created In the circled list box in the following tool bars select the session name including the character string of the target to connect After the session name is selected the dialog box for setting the debugger is displayed and the emulator will be connected 3 3 2 Ending the Emulator The emulator can be exited by using the following methods 1 Selecting the DefaultSession Select the DefaultSession in the list box that was used at the time of emulator connection 2 Exiting the High performance Embedded Workshop Select Exit from the File menu High performance Embedded Workshop will be ended The message box that asks whether to save a session will be displayed when an emulator is exited If necessary to save it click the Yes button If not necessary click the No button 50 4 Setup the Debugger 4 1 Init Dialog The Init dialog box is provided for setting the items that need to be set when the debugger starts up The contents set from this dialog box are also effective the next time the debugger starts The data set in this dialog remains effective for the next start The tabs available on this dialog box vary with each product used For details click the desired tab MGU Debugging Information Script Trace 1 0 Script M
241. sions can be written in address Memory variables also can be used e Specify data size as shown in the table below For byte size Borb For word 2 byte size W or w For long word 4 byte size Lorl e If specification of data size is omitted the data size is assumed to be byte long Example 1 To reference memory contents at address 800016 in bytes 0x8000 B or 0x8000 Example 2 To reference memory contents at address 800016 in words 0x8000 w Example 3 To reference memory contents at address 800016 in long words 0x8000 L 9 3 5 Character Constants Specified characters or character strings are handled as constants after being converted into ASCII code e Characters must be enclosed with single quotations e Character strings must be enclosed with double quotations e Character strings must be within 2 characters 16 bits in length If a character string consists of more than two characters only the last two characters written in the string are operated on For example if you write ABCD only the last two characters in this string 1 e CD are operated on the value of which is 434416 263 9 3 6 Operators The following lists the operators that can be written in expressions The priorities of operators are such that level 1 is the highest and level 12 the lowest If operators in an expression have the same priority they are calculated sequentially from left to right
242. smssrsrsrsrsrsrsrsrsnnnn 32 2 4 Simulation Specifications for 740 rerrrnrnnnrannnnrnrnrnrsnensnnrvrnsnsseensnnrnnnenesnensnnrnnnenssnenennrnnnenssennennnes 33 2 4 1 Operation of Instructionsisaservasaasnanmekdeannursetrval aksen tate N 33 DEAD Resetting arn E armenerne Sinead iraner EG 34 Ded 3 Memory PEA EEE ET ble ae 34 24421 OLE 35 2 4 5 Cycle Count The CYcle CY Command sosvrsrrvrrvrerevrenrrrevsevervevsrvervevsevervevsenervensenerveneene 37 2 4 6 Stack Utilization Monitor The StackMonitor SM Command sasrsravvavrsvavnevssrevnevenne 37 Preparation before Use 38 3 1 Workspaces Projects and Files rrrrrrrrrrrrrrrrrrrrvvvrrrvnvrsrrrrrvevrrrveverssereresesesevessvesesesesevesesssevesesene 38 3 2 Starting the High performance Embedded Workshop ssssesesrerersoserrrreressererrnresrrrerrrrer rr nr nt 39 3 2 1 Creating a New Workspace Toolchain Used c cccccccccsscsssesessccssesecssesscssesesseesessecssessens 40 3 2 2 Creating a New Workspace Toolchain Not Used sersvarvrrvarvervrrsnevvesvervrevasvesvessersrenne 45 3 3 Starting th Debuggerussaanssrh enguhidaeidenlnidetn annie 50 3 071 Connecting the EmulatoruasssnukkustarderttaunakkusGaetGbakeskuatarni 50 3 3 2 Ending the Hm ulator xc ccc cc eins tee cccect ences cence ctenctcuccedeveacavcescacescerdectecetecccedeteacacesecdees 50 4 Setup the Debugger 51 41 it Dialoger ni sesin E EEE Seek ee ARES TO age RE Ea 51 AsV MOU T bi i asstsriaes det aent boc
243. source file 5 File name Shows the file name of the currently displayed source file 6 Referenced cycle Shows the currently referenced cycle 7 Referenced address Shows the address corresponding to the currently referenced cycle 8 Referenced time Shows the time information corresponding to the currently referenced cycle Other display areas are the same as in bus mode 188 6Windows Dialogs 6 11 5 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function BUS Display the information of BUS mode DIS Display the information of Disassemble mode SRC Display the information of Source mode DATA Display the information of Data access mode View Cycle Changes the displayed position by specifying a cycle Address Changes the displayed position by searching an address Source Display a selected source file Time Absolute Time Shows elapsed time from the time the program started running up to now in terms of absolute time Differences Shows a differential time from the immediately preceding displayed cycle Relative Time Shows a relative time from the currently selected cycle Trace Forward Changes the direction of search to forward direction Backward Changes the direction of search to reverse direction Step Searches in Step mode in the specified direction of search Come Searches in Come
244. ss Ha Display Address fam v Scroll Start Address 000000 v l Scroll End Address JOFFFFF v Note The settings of the RAM area differ depending on the product For details refer to the hardware manual Click the OK button The Memory window is displayed and shows the specified memory area Memory 000400 Be 16 1040 8 2 loxi Address Label Register 0 1 2 8 4 5 6 7 8 9 A B 40 D E F ASCII 000400 00 00 00 00 00 00 00 00 00 00 00 OO 00 OO 00 OO 000410 DF D5 F6 OF 20 04 00 00 20 04 00 00 00 03 00 00 000420 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000430 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000440 FF FF GS FF FF FF FF FF FF FF FF FF FF FF FF FF 000450 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000460 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000470 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000480 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000490 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000440 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000480 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00400 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000400 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FR Placing the mouse cursor on a point in the display of data in the Memory window and double clicking allows the values at that point to be changed 65 5 2 3 Step3 Downloading the Tutorial Program 5 2 3 1 Downl
245. status double wait WAI VRDTQ Reception extended data wait status WAI VRDTQ SUS Reception extended data wait status double wait WAI MPF Fixed length memory pool wait WAI MPF SUS Fixed length memory pool wait double wait WAI SLP TMO Sleep state with timeout WAI SLP TMO SUS Sleep state with timeout double wait WAI FLG TMO Event flag wait state with timeout WAI FLG TMO SUS Event flag wait state with timeout double wait WAI SEM TMO Semaphore wait state with timeout WAI SEM TMO SUS Semaphore wait state with timeout double wait WAI MBX TMO Message wait state with time out WAI MBX TMO SUS Message wait state with timeout double wait WAI SDTQ TMO Transmission data with timeout wait status WAI SDTQ TMO SUS Transmission data with timeout wait status double wait WAI RDTQ TMO Reception data with timeout wait status WAI RDTQ TMO SUS Reception data with timeout wait status double wait WAI VSDTQ TMO Transmission extended data with timeout wait status WAI VSDTQ TMO SUS Transmission extended data with timeout wait status double wait WAI VRDTQ TMO Reception extended data with timeout wait status WAI VRDTQ TMO SUS Reception extended data with timeout wait status double wait WAI MPF TMO Fixed length memory pool with timeout wait WAI MPF TMO SUS Fixed length memory pool with timeout wait d
246. ster s interrupt request bit is not set to 1 The priority levels set in each Interrupt Control Register s interrupt priority level select bit are not referenced The priority of virtual interrupts can be specified when setting virtual interrupts on the I O Timing Setting Window The Flag Register FLG s interrupt enable flag I flag and processor interrupt priority level IPL are referenced as in the actual chip Virtual interrupts set by using the I O script function Regarding interrupt control for virtual interrupts generated A statement can be written so that when an interrupt occurs each Interrupt Control Register s interrupt request bit is set to 1 The priority levels set in each Interrupt Control Register s interrupt priority level select bit can be referenced However once a virtual interrupt is generated and registered in the simulator the priority of the virtual interrupt cannot be altered even when the priority levels specified with the interrupt priority level select bit is changed by the user program The Flag Register FLG s interrupt enable flag I flag and processor interrupt priority level IPL are referenced as in the actual chip I O Script Function This function allows you to write virtual port input and virtual interrupt settings to a file in script form Therefore it provides a more flexible way to define virtual port inputs and virtual interrupts than can be set from the I O Timing Setting Window Specificall
247. str 0x1234 Japan all Radices character types unsigned char str 0x1234 74 J all Radices 1 When the result of calculation is a char type it is displayed as follows unsigned char str 0x1234 Jap all Radices If the string contains a non printing code prior to the code to show the end of the string 0 it is displayed up to the non printing character and the closing quote mark is not displayed indicating pointer type ES CWatch Value unsigned char str OxFOOOO 89 Y struct DATA pData 0x408 struct DATA pData 0x408 signed int nID 0 unsigned char str OxFOOOS 83 s You can double click on lines indicated by a to see the members of that structure or union The changes to a while the members are displayed To return to the original display double click the line now indicated by the 273 10 2 4 Array Types e When the result of calculation is an array type other than a char type the starting address is displayed in hex as follows signed int 10 z 0x1234 all Radices e When the result of calculation is a char type it is displayed as follows unsigned char 10 str 0x1234 Japan all Radices If the string contains a non printing code prior to the code to show the end of the string 0 it is displayed up to the non printing character and the closing quote mark is not displayed unsigned char 10 str 0
248. system calls are listed in chronological order of system call The data displayed is the statistical results for the range specified with the start marker and end marker in the MR Trace window By clicking each line you can search the system call issuance history corresponding to the clicked line The search result is pointed by the indicator in the MR Trace window after the indicator moves to the destination position 231 6 16 5 3 1 Extract the Issuance History Click the Pick Up button in the tool bar Or select Menu Pick Up System Call The dialog shown below is opened Specify the search condition of the system call to be extracted and displayed MR System Call Pick Up Extract the issuance history of the system call which meets the specified condition and display it 232 6Windows Dialogs 6 17 Task Trace Window The Task Trace window measures the task execution history of a program using the real time OS and display it graphically This win dow is available even when a target program using an OS other than our real time OS MRxx is downloaded The debugger for R32C doesn t support this function The debugger for 740 doesn t support this function BOO Ha A hein ey ID Mark 00 00 00 000 442 00 00 01 847 055 00 00 01 846 612 Indicator 00 00 00 940 805 Scale 6939931 Grid 00 00 01 850572 Area Break name lo DERSEN gt gt g
249. t gt gt gt gt gt gt gt 000nnnnnmnnnnnnfnnnnnmnnnnnnnnnnnnnnnnnnnnnnnnnennnnnnnennmnee task2 B W W H W task3j WM dll M bdl M Fdl M task4 SoG He er OR akon fest det Hesse hue HESSE Hen HET EE sas task5 f ee d oe eee ee taskb Pf d M j M b dM j M dM 1 task F Mk M j db p M 1 4dk t M 1 OW HO SO DN task8j er Wi I ll 4 taskoj Mt n H ER EE EE taski0 m B l l l l l l l U nknowvn nD ee oe The content of each item is as follows Items Contents ID Indicates a task ID number name Indicates an interrupt routine name task name idle processing display idle and unknown name displayed unknown When moving the mouse to the information displayed in the window the pop up window as below is opened showing the detailed information The following information is displayed in t
250. t Restarts measuring Search Search for history of system calls Trace Range After Set measurement range condition to After Break Set measurement range condition to Break Value Set value Color Change display color Init Order Reset the task order on the display Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 221 6 15 2 Refer the Execution History of Task MRxx Window You can reference the task execution history in the MR Trace window You can reference the execution history statistical processing result in the MR Analyze window These windows are available for a target program using our real time OS MRxx 6 15 2 1 Select the Trace Range To measure the task execution history the real time trace function is used Click the After button or select Menu Trace Range gt After or Break button or select Menu Trace Range gt Break in the MR Trace window After Stores the cycles of trace data after the trace point Break Stores the cycles to the point at which the trace point is passed Execute the target program Record the information required to know the task execution history in the trace memory ATTENTION trace point set in the Trace Point Setting dialog is disabled 6 15 2 2 Stop the Task Execution History Measurement Click
251. t and click the mouse button The selected element is jeg by an asterisk x In this dialog box set the virtual interrupts you want to be actually generated Follow the procedure below to set virtual interrupts Move the mouse cursor to the cycles location called an element where you want a virtual interrupt to be generated then click the left mouse button Or you can scroll the screen to go to the desired location The element is marked by an asterisk when you ve clicked Click at the same place again if you want the virtual interrupt you ve set to be canceled In this case the asterisk goes out Repeat steps 1 and 2 as many times as the number of virtual interrupts to be generated 1 When you finished setting all virtual interrupts press the Next button A dialog box for saving the virtual interrupts you ve set to a file virtual interrupt file will appear fe xd Save in SQ My Computer ee Ek EJ 314 Floppy A SI SYSTEM C DATA D Compact Disc E Compact Disc F JSUBSYS G File name finput ios Save as type fizo Script Files ios v Cancel Zi Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into the simulator debugger back again by using the Load menus in the I O Timing Setting window When you ve input a file name press the Save button Thus you ve finished setting cycle synchronize
252. t i ktgap i lt 10 i itzap OL for j i gap j gt k j j gap iftalil gt alit sapld i t alj alj alitgap 76 5Tutorial 5 2 10 2 Executing Step Out Command The Step Out command steps out of the called function subroutine and stops at the next statement of the calling statement in the main function To step out of the sort function select Step Out from the Debug menu or click the Step Out n button on the toolbar The PC cursor slips out of a sort function and moves to the position before a change function st tutorial c j rand ifj lt 0 I j j ali j sorta changea sam s0 a 0 sam s1 a 1 sam s2 a 2 sam s3 a 3 sam s4 a 4 Note It takes time to execute this function When the calling source is clarified use Go To Cursor TT 5 2 10 3 Executing Step Over Command The Step Over command executes a function subroutine call as a single step and stops at the next statement of the main program To step through all statements in the change function at a single step select Step Over from the m Debug menu or click the Step Over button 0 on the toolbar The PC cursor moves to the next position of a change function tutorial c for 0 i lt 103 i I j rand iffi lt 0 I j J chanze a sam s0 a 0 sam st a 1 sam s2 a 2 sam s3 a 3 sam s4 a 4 sam s5 a 5 sam s6 a 6 sam s7 a
253. tances of virtual port output can be set However if you are using the Output Port Window the number of virtual port outputs that can be set is limited to 199 6 2 9 1 Setting Virtual Port Outputs To set virtual port outputs choose the Setup menus in the I O Timing Setting Window The dialog box shown below will appear Select this item Setup Dialog Here choose the item Set Virtual Port Output and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting the address you want to be monitored for virtual port output will appear 110 6Windows Dialogs Setup Dialog Input the address you want to be monitored for output Input the address you want to be monitored for virtual port output in the Output Address column Then press the Next button A dialog box for specifying a file virtual port output file to which you want the virtual port output results to be saved recorded will appear This simulator debugger saves the virtual port output results that have occurred during program execution to this file and references it when the program stops running Save Data My Computer v S SYSTEM C DATA D output ios Here choose the item Set Virtual Port Output and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dia
254. tes double waiting is appended to a string displayed in the semQ field Normal Display 26 task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol s e Upto 8 characters can be displayed in the task name in the semQ field If a task name exceeds 8 characters the extra characters are omitted 206 6Windows Dialogs 6 14 6 2 Display the Semaphore Status When the realtime OS is MRxx conformed to ul TRON specifications V 4 0 All the SEMs defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of semaphore Sematr Attribute of each semaphore Sement Semaphore count Semaphore Queue Task ID Nos and task names in the semaphore queue e The following are displayed in the Sematr area TA_TFIFO Task wait queue is in FIFO order TA_TPRI Task wait queue is in task priority order e When a task connected to the SEM queue is in the state of waiting with timeout enabled waiting in twai sem a string tmol which indicates a state of waiting with timeout enabled is appended to a string displayed in the Semaphore Queue field When a task connected to the SEM queue is in the state of forced waiting double waiting a string s which indicates doub
255. the case where memory is rewritten directly from an external I O e Ifthe data in the RAM monitor area are displayed in lengths other than the byte it is possible that the data will have different memory access attributes in byte units If bytes in one data have a different access attribute as in this case those data are enclosed in parentheses when displayed in the window In that case the background color shows the access attribute of the first byte of the data 001B 0008 00D2 0000 007C 0000 0000 0000 0000 0000 0000 MOON 0000 0000 0000 0000 0000 0050 0000 86 6Windows Dialogs e The displayed access attributes are initialized by downloading the target program e The interval time at which intervals the display is updated may be longer than the specified interval depending on the operating condition shown below Host machine performance load condition Communication interface Window size memory display range or the number of windows displayed 6 1 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function RAM Monitor Area Set RAM monitor base address Sampling Period Set RAM monitor sampling period Clear Clear access attribute Up Moves display position to the immediately preceding RAM monitor area smaller address Down Moves display position to th
256. the character string V a memory pool ID number and a block ID number Displayed on the second to fourth lines are the memory pool ID and block ID numbers The block ID numbers are enclosed in parentheses 216 6Windows Dialogs 6 14 12 Display the Task Context 6 14 12 1 Display the Task Context In the MR window select Popup Menu Context The Context dialog box is opened The Context dialog box is used to reference specify the context information of the specified task You can also open the Context dialog box by double clicking the data display area in the task state display mode Context Task ID Context Task ID 14 taskl4 Status WAI SEM Priority 15 PC FF2883 0000 0001 0000 0014 000001 000050 00040E Enter the task ID number in the Task ID field and click the View button or press the Enter key The context of the specified task appears in the Context field e Ifthe task entered in the Task ID field is RUN or DMT when clicking the View button the context is not displayed In the Context field only the task ID and task state are displayed e If a task ID number which does not exist is entered in the Task ID field when clicking the View button an error occurs 217 6 14 12 2 Change the task context Enter the task ID number in the Task ID field in the Context dialog and click the Set button The Set Context dialog is opened The Set Context dialog is use
257. the contents set in the window to a file Load Loads event information from a file in which it was saved Set Sends the contents set in the window to the simulator Close Closes the window 147 6 10 6 Specify the Events Instruction Fetch To specify an instruction fetch event change the event select dialog box s Event Type to FETCH The event is established when instruction is fetched from the specified address or any address in the specified address range 6 106 1 1 Instruction Fetch of Specified Address Set as below Example Instruction fetch at address 80000h Al Set Event Status FETCH v faddr Address1 vi om m afa 148 6Windows Dialogs 6 10 6 2 Instruction Fetch of Specified Address Area In Set as below Example Instruction fetch at address 80000h to 80FFFh poo Ba E Ga 149 6 10 6 3 Instruction Fetch of Specified Address Area Out Set as below Example Instruction fetch at any address other than the range 80000h to 80FFFh addr lt Address Address lt addr ha pon Ba porr Ga 6Windows Dialogs 6 10 6 4 Entering exiting to specified function Set as below Example Entering a break to function name wait 41 Set Event Status 151 Example Exiting from function name wait Al Set Event Status Je Je OE 6 10 7 Specify the Events Memory Access To sp
258. the display area Indicator Move the indicator in the display area Adjust Adjust range of start and end marker to full width of display area Adjust Expand Increase scale factor of display Reduce Decrease scale factor of display Trace Stop Stop measuring Trace Restart Restarts measuring Trace Range After Set measurement range condition to After Break Set measurement range condition to Break Value Set value Color Change display color RTOS Set target RTOS information Toolbar display Displays the toolbar Customize toolbar Opens the toolbar customize dialog box Allow Docking Allows the window docking Hide Hides the window 234 6Windows Dialogs 6 17 2 Refer the Execution History of Task Taskxx Window You can reference the task execution history in the Task Trace window You can reference the execution history statistical processing result in the Task Analyze window These windows are also available for a target program using an OS other than our real time OS MRxx 6 17 2 1 Prepare the Measurement To measure the task execution history of the program using the real time OS you must select the trace range in the Task Trace window and then execute the target program 6 17 2 1 1 Set the Information of Realtime OS To use the Task Trace window you must set the following information concerning the real time OS the target real time OS which are used by the downloaded program e Label na
259. the initialization as in the actual chip is not performed The cycle count is initialized to 0 Resetting is performed in the same way as the actual MCU A reset is also performed when the debugger starts The value FF0000h is set in the reset vector FFFFFCh to FFFFFFh immediately after starting The program counter is therefore set to FFO000h immediately after the debugger starts 20 2Simulation Specifications 2 2 3 Memory Memory Space There is no processor mode If mapped for memory the whole 16MB of memory from 000000h to FFFFFFh can be read from and written to as RAM Note however that in the initial state memory between 020000h and FEFFFFh is not secured and an error will result if an attempt is made to access this part of memory If this occurs while a program is running the program will stop with an illegal memory access error Use the map function described later to map this part of memory Memory Structure and Initial Values Immediately after Starting The memory is set up as follows immediately after starting the debugger 000000h to 0003FFh SFR area Filled with 00h 000400h to 01FFFFh Filled with FFh 020000h to FEFFFFh No memory immediately after starting FFO000h to FFFFFBh Filled with FFh FFFFFCh to FFFFFFh reset vector Set to 0000FFOOh The Map Function MAP Command The simulator divides the memory between 000000h and FFFFFFh into 256 equal parts so that the memory spa
260. the result of calculation is a register variable register is displayed to the left of the type name as follows register signed int j 100 275 11 Display the Cause of the Program Stoppage If the program is stoped by the debug function the cause of the stoppage is displayed in the Output window or Status window Platform sheet The debugger for 740 doesn t support this function The contents of a display and the meaning of the cause of the stoppage are as follows Display The cause of the stoppage Halt The stop by the Halt Program button menu S W break Software break H W break Hardware break Memory access error Memory access error break Undefined instruction Undefined instruction break 276 12Attention 12 Attention 12 1 Common Attention 12 1 1 File operation on Windows The following points should be noted 1 2 File Name and Directory Name Do not use directory names or filenames that include blanks Operation is not guaranteed if your directory names and filenames include kanji Use only one period in a filename Specify the File and Directory You cannot use to specify two levels upper directories You cannot use a network pathname You must allocate a drive 12 1 2 Area where software breakpoint can be set Software breakpoints can be set in the entire area 12 1 3 Get or set C variables If a variable is declared with the s
261. this dialog the information becomes effective from the next time To change the setting data select RTOS from popup menu by right clicking on the window The RTOS Information dialog is re opened 235 ATTENTION When specifying WORD in the access size when performing PID setting in the RTOS Information dialog you must observe the following limits If these conditions are not met the system does not operate normally e The PID information storage area is allocated to an even address e The PID information storage area is allocated to an area accessed with 16 bit bus width 6 17 2 1 2 Select the Trace Range The real time trace function is used for task execution history measurement Click the After button or select After from popup menu by right clicking on the window or Break button or or select Break from popup menu in the Task Trace window After Records a task execution history until the trace memory is filled with recorded data Break Records a task execution history as much as trace memory available until before the target program stops Only an specific cycle required to know the task execution history is recorded in the trace memory ATTENTION A trace point set in the Trace Point Setting dialog is disabled 6 17 2 1 8 Start the Target Program Execute the target program Record the information required to know the task execution history in the trace memory When you select After for the
262. ting Window Use of the I O script function the function that allows users to define virtual port input or virtual interrupt makes it possible to specify more elaborate data input timing such as when the program performs fetch or writes to memory or when it executed an instruction a specified number of times Virtual Port Output Function When a data write to some memory address by the program occurs this function records the written data value and the cycle at which the data was written The recorded data can be verified in graphic or numeric format from the I O Timing Setting Window The number of data entries that can be recorded by this function equals the number of data entries specified on the Init dialog box s I O script tab reckoning from the time at which the program started running When reexecuted the previous data is cleared The output port simulate function The output port simulate function provides an efficient means of simulation When data are written to some memory addresses by a program it allows you to record the written data values The recorded data can be displayed on a window or output to a file Also you can verify the data which are output to UARTs by the Printf function The number of data entries that can be recorded by this function equals the number of data entries specified on the Init dialog box s I O script tab reckoning from the time at which the program started running When reexecuted the previous data
263. ton as it is This is the end of the emulator settings Exit the Project Generator following the instructions on the screen And the dialog for the setup of a debugger is also displayed at this time If preparation of an emulator is completed set up the debugger in this dialog box and connect with an emulator 47 3 2 2 4 Step4 Registering the Load modules to be downloaded Finally register the load module file to be used Select Debug Settings from the Debug menu to open the Debug Settings dialog box Debug Settings SessionM16C_RBC_PC7501 Emulator gt Target Options amp DoSample01 Tareet m 6C R amp C PC7501 Emulator gt Default Debue Format IEEE695 RENESAS v Download Modules Offset Address Format D work HEW4 Samples M16C Sample01 x30 00000000 IEEE6S Feb 1 Select the product name to be connected in the Target drop down list box 2 Select the format of the load module to be downloaded in the Default Debug Format drop down list box Format Name Contents IEEE695 RENESAS IEEE 695 format file When Using NCxx IEEE695 IAR IEEE 695 format file When Using IAR cross tool IEEE695 TASKING IEEE 695 format file When Using Tasking cross tool ELF DWARF2_IAR ELF DWARF2 format file When Using IAR cross tool ELF DWARF2_TASKING ELF DWARF2 format file When Using Tasking cross tool Intel Hex Sym Intel Hex format file with Symbol format file When
264. tory can be referred to in the following mode e BUS mode This mode allows you to inspect cycle by cycle bus information The display content depends on the MCU and simulator system used In addition to bus information this mode allows disassemble source line or data access information to be displayed in combination e Disassemble mode This mode allows you to inspect the executed instructions In addition to disassemble information this mode allows source line or data access information to be displayed in combination e Data access mode This mode allows you to inspect the data read write cycles In addition to data access information this mode allows source line information to be displayed in combination e Source mode This mode allows you to inspect the program execution path in the source program 1 3 1 Trace Area For the simulator debugger as many cycles as specified on the Init dialog box can be recorded The trace area of the following 5 mode is being supported e Break the specified cycles before target program stops e Before the specified cycles before trace point e About the specified cycles either side of trace point e After the specified cycles after trace point e Full Until the specified cycles are written in the trace memory Start Trace Event Stop Event Break is set by default To refer the execution history before stopping the target program use Break designation of trace event is not required To refer
265. truction cycles Time management is exercised in units of cycles The number of cycles is represented by the values listed in the microcomputer s software manual However this differs from the actual chip in the following points The 740 debugger starts counting cycles immediately after a reset Cycles immediately after a reset are 0 The number of cycles needed to execute one machine instruction are added on for each instruction executed See Figure shown below Note Because the number of cycles measured by the emulator does not take into account the bus width queue wait cycles etc it includes some error when compared with the number of cycles in the actual chip If two cycles are required for the LDA instruction cycles are added at this int in time een If four cycles are required for the CMP instruction cycles are added at this point in time LDA instruction CMP instruction 0 1 2 3 4 5 6 7 8 9 In the above example no cycles are added while the LDA or CMP instruction is being executed The cycles required for each instruction are added after instruction execution Note that the virtual port input output and virtual interrupt functions are processed after instruction execution is completed Target program execution time measurement The target program execution time measurement is calculated from the number of cycles described above and the MCU clock and divide by ratio specified on the MCU tab of the Init
266. u can check the start address end address of the functions and coverage measurement results and the Editor window in which you can check execution non execution by source line Toolbar For All Files OFO08C randam_access OFOOCI Func Global OFO124 Func_Loca I OFO1A2 Func_Stat ic OFO1DC Func_Exe OFO23E exe_stub 0F0240 OFO25C Function Name Coverage of Each Function Function Scope e Allof the memory space is the target for coverage measurement e By double clicking any function line the corresponding function appears in the Editor Source window e During coverage measurement appears in the coverage display area e You can change the display ratio between the function name display area and the function range display area using the mouse 129 6 6 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Select source file Select a source file for checking the coverage Auto Refresh Refresh coverage measurement result automatically Refresh Refresh coverage measurement result Clear Clear coverage measurement result Base Change coverage base address File Save Save coverage measurement result to file Load Load coverage measurement result from file Layout Address Switch display or non display of Address area Toolbar display Display toolbar Customize toolbar O
267. uipment communications equipment test 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 cert
268. upt priority level IPL are referenced as in the actual chip I O Script Function This function allows you to write virtual port input and virtual interrupt settings to a file in script form Therefore it provides a more flexible way to define virtual port inputs and virtual interrupts than can be set from the I O Timing Setting Window Specifically this includes for example reading the divide by N ratios you ve set in the timer register and generating a timer interrupt periodically 31 e Port input output GUI input function The GUI input function refers to simulating the user target system s simple key input panel on a window The key input panel is created from the GUI input window The input panel can have the following parts placed on it Buttons Virtual port input or virtual interrupt can be performed by pressing the button The following actions can be set for the button Enter data to a specified memory address virtual port input Generate a specified virtual interrupt Generate a specified virtual interrupt and virtual port input at the same time Text Display a text string GUI output function The GUI output function refers to simulating the user target system s simple key output panel on a window The key output panel is created from the GUI output window The following parts can be arranged on this output panel Character string User specified character strings are displayed or erased when some
269. uses to define virtual port input or virtual interrupt makes it possible to write timer interrupt Differences between Virtual Interrupts and Interrupts in Actual Chip Virtual interrupts differ from interrupts in the actual chip in the following points 1 Special hardware interrupts cannot be generated as virtual interrupts Reset NMI DBC watchdog timer single step address match interrupts cannot be generated as virtual interrupts 2 High Speed interrupt cannot be generated as virtual interrupts 3 If virtual interrupts of the same priority occur simultaneously If in the actual chip multiple interrupts of the same priority occur simultaneously they are resolved according to the priority levels set in hardware so that an interrupt of the highest priority is accepted For virtual interrupts however all interrupts belonging to one interrupt type e g peripheral I O interrupt are handled as having the same priority Therefore if virtual interrupts of the same priority occur simultaneously the order in which they are accepted is indeterminate There are following two methods to set virtual interrupts 1 By using the I O Timing Setting Window 2 By using the I O script function 23 With either method the virtual interrupts are subject to the following limitations 1 Virtual interrupts set by using the I O Timing Setting Window Regarding interrupt control for virtual interrupts generated Each Interrupt Control Regi
270. utput port data The recorded data can be displayed in the Output Port Window or can be output to a file The number of data entries recorded is the number of entries specified on the Init dialog box s I O Script tab reckoning from when the program started to run e T O Script This function lets you execute virtual port input or virtual interrupt settings as a script It provides a more flexible way to define virtual port inputs and virtual interrupts than can be set from the I O Timing Setting Window Example Read a set divide by value from the timer register and generate a timer interrupt periodically 10 1Features 1 8 Time Measurement Function This function lets you measure an approximate number of cycles and the execution time spent by the program you ve run The number of cycles are represented using the values listed in the microcomputer s software manual The execution time is calculated from the cumulative number of cycles of the instructions executed and the MCU clock frequency specified on the Init dialog box s MCU tab 1 9 Stack Utilization Monitor Function This function lets you detect the maximum and minimum addresses of the stack which the target program used 11 2 Simulation Specifications The simulation specifications vary with the type of simulator use 2 1 Simulation Specifications for R32C 2 1 1 Operation of Instructions e Regarding the number of instruction cycles Time management is e
271. ve mentioned cannot be recommended 283 12 6 5 When Using the IAR C Compiler ICC 12 6 5 1 Specify the Option Please compile according to the following procedures and link e At compilation Specify the r option e Before linking Open the linker s option definition file extension xcl to be read when linking and add FIEEE695 and y options The designation of y option varies depending on the product Product Name y Option The debugger for M32C ylmb The debugger for M16C R8C ylmb The debugger for 740 ylmba e At link Specify the linker s option definition file name using f option In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 6 5 2 Command Execution Examples The following shows examples of entering commands depending on the product e The debugger for M32C gt ICCMC80 r filel c lt Enter gt gt ICCMC80 r file2 c lt Enter gt gt XLINK o filename 695 f lnkm80 xcl filel file2 lt Enter gt e The debugger for M16C R8C gt ICCM16C r filel c lt Enter gt gt ICCM16C r file2 c lt Enter gt gt XLINK o filename 695 f lnkml6c xcl filel file2 lt Enter gt e The debugger for 740 gt ICC740 r filel c lt Enter gt gt ICC740 r file2 c lt Enter gt gt XLINK o filename 695 f 1nk7400t xcl filel file2 lt Enter gt The XCL file name varies depend
272. ver the CPU Mode Register s stack page select bit and the Interrupt Control Register each are handled as SFR For details about each register location refer to the user s manual of your chip When the stack page select bit is set to 1 one page of RAM can be used as a stack area When a bit of the Interrupt Control Register is set to 1 the corresponding interrupt of that bit is enabled Moreover a method is provided that allows you to accomplish interrupts e g a timer interrupt and data input to SRF or other memory by simulating these operations without having to actually execute them For details about this method refer to the virtual port input output and virtual interrupt functions described later in this manual T O Script Virtual Port Input Function This function defines changes of the data that is input from external devices to a specified memory address Using this function you can simulate data inputs to the ports defined in SFR The following shows timings at which data can be input to memory 1 When program execution has reached a specified number of cycles 2 When a specified memory location is accessed for read by a program 3 When a specified virtual interrupt is generated The input data at the above timings can be defined from the I O Window Furthermore this function can be used in combination with the I O script function a function that allows you to define virtual port inputs and virtual interrupts For details refer to
273. virtual port output e Output data display area displays the data as virtual port output results in chart mode in units of bits This means that memory bits are in the state of logic 1 LT This means that memory bits are in the state of logic 0 The short white lines appearing at the bottom of the output data display area indicate points at which data are output To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area e Cycle count display area displays cycle counts 97 2 Graphic mode displayed in units of bytes Virtual port output results are displayed in graphic mode in units of bytes Qutput cycle cycle Address 10464290 4620 4950528953 10594062 7066006930 i 1 i i i Cycle count eS lt display area I OCO3C0 1 oo ee TEE I i I I I i i I 1 i minimini i 1 I i i I af z 4 2 Address display area Output data display area e Address display area displays the address to be monitored for virtual port output e Output data display area displays the data as virtual port output results in graphic mode in units of bytes The peaks in this graph represent data values derived by equally dividing the height of the data displaying area by 255 maximum value of 1 byte data The short white lines appearing at the bottom of the output data display a
274. w is displayed The figure below shows a Register window of the debugger for M16C R8C 0 BANK Register 0024 OFOO 0000 0000 O6E6 0000 0718 O6c2 02420 OFO26F 0400 INTB OFFDOO 10000101 5 2 7 2 Setting the Register Value You can change a register flag value from this window Double click the register line to be changed The dialog is opened Enter the value to be changed PG Set Value Value Radix Hex v Set As hole Reiser z 72 5Tutorial 5 2 8 Step8 Viewing Memory When the label name is specified the user can view the memory contents that the label has been registered in the ASM Watch window 5 2 8 1 Viewing Memory For example to view the memory contents corresponding to __msize in word size Select ASM Watch from the Symbol submenu of the View menu open the ASM Watch window And click the ASM Watch window with the right hand mouse button and select Add from the popup menu enter __msize in the Address edit box and set Word in the Size combo box Address ms ize Size Word Radix Hex C Dec C Bin oeei Click the OK button The ASM Watch window showing the specified area of memory is displayed mw xK 2 0E Address Bit 000416 __msize Word Hex 0300 73 5 2 9 Step9 Watching Variables As the user steps through a program it is possible to watch that the values of variables used in the user program are ch
275. x1234 Jap all Radices Also if the string contains more than 80 characters the closing quote mark is not displayed When the C C expression is an array type as same as pointer type a is display to the left of the type name You can see the elements of the array by using this indicating for the details refer 10 2 3 Pointer Types When the number of the array elements is more than 100 the following dialog box open Specify the number of the elements in the dialog box Please set array area Start 0 End fi 023 Cancel The elements from the index specified in Start to the index specified in End are displayed If you specify the value more than the max index of the array the value is regarded as max index of the array When you click the Cancel button the elements are not displayed 10 2 5 Function Types e When the result of calculation is a function type the starting address is displayed in hex as follows void main 0xF000 all Radices 10 2 6 Reference Types e When the result of calculation is a reference type the reference address is displayed in hex as follows signed int amp ref 0xD038 all Radices 10 2 7 Bit Field Types e When the result of calculation is a bit field type it is displayed as follows unsigned int 13 s f 8191 when Radix is in initial state unsigned int 13 s f Ox1FFF when Radix is hex unsigned int 13 s f 1111111111111B when Radix is binary
276. xecution counts or a number of times the program has executed a specified address 99 6 2 6 3 Screen configuration for interval synchronized interrupts To set a virtual interrupt which is synchronized to a specified interval time click the Timer button and use the Timer dialog box that appears The Timer dialog box has a display screen configuration similar to the one shown below Set Timer Dialog Load Save Interval fi 00 fe msec C usec Vector 23 Close Priority 5 Temp Directory CHWINDOWSXTEMP Refer Timer Vec 21 Prio 7 TimeL800 Jusec Del 22 Priol Timell Imsec Del All Enable All Enable Disable All Disable e In the virtual interrupt register area specify the virtual interrupt you want to set and the interval time at which intervals you want to generate the interrupt e The interval time is calculated from the number of execution cycles and the MCU clock and divide by ratio specified on the MCU tab of the Init dialog box e The virtual interrupt display area shows the registered virtual interrupts and the specified interrupt generation intervals e The operation buttons for virtual interrupts can be used to delete or disable enable each virtual interrupt e The operation buttons to save load virtual interrupts can be used to save the virtual interrupt information to a file as well as load the saved virtual interrupt information from the file 100 6Windows Dialogs 6 2
277. xercised in units of cycles The number of cycles is represented by the values listed in the microcomputer s software manual However this differs from the actual chip in the following points The bus width queue and wait states are not considered when measuring the number of cycles The executed cycle of an interrupt sequence is not considered when measuring the number of cycles When an interrupt occurs the executed cycle of an interrupt sequence is 0 This debugger starts counting cycles immediately after a reset Cycles immediately after a reset are 0 The number of cycles needed to execute one machine instruction are added on for each instruction executed See Figure shown below Note Because the number of cycles measured by the simulator does not take into account the bus width queue wait cycles etc it includes some error when compared with the number of cycles in the actual chip If four cycles are required for the ENTER instruction cycles are added at this point in time If two cycles are required for the MOV instruction cycles are added at this point in time ENTER instruction MOV instruction EEE Execution 0 1 2 3 4 5 7 8 9 cycles In the above example no cycles are added while the ENTER or MOV instruction is being executed The cycles required for each instruction are added after instruction execution Note that the virtual port input output and virtual interrupt functions are processed after
278. y this includes for example reading the divide by N ratios you ve set in the timer register and generating a timer interrupt periodically 24 2Simulation Specifications e Port input output GUI input function The GUI input function refers to simulating the user target system s simple key input panel on a window The key input panel is created from the GUI input window The input panel can have the following parts placed on it Buttons Virtual port input or virtual interrupt can be performed by pressing the button The following actions can be set for the button Enter data to a specified memory address virtual port input Generate a specified virtual interrupt Generate a specified virtual interrupt and virtual port input at the same time Text Display a text string GUI output function The GUI output function refers to simulating the user target system s simple key output panel on a window The key output panel is created from the GUI output window The following parts can be arranged on this output panel Character string User specified character strings are displayed or erased when some value is written to a specified memory address or according to logic 1 or 0 in bits LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or Qin bits Text Display a text string 2 2 5 Cycle Count The CYcle CY Command Use of the CYcle command allows you
279. y 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl e Upto 8 characters can be displayed in the task name in the Flag Queue field If a task name exceeds 8 characters the extra characters are omitted 205 6 14 6 Display the Semaphore Status In the MR window select Popup Menu Mode gt Semaphorel MR mi OP ID A DS FE PD RAR Def ent Count semQ 0000H 0003H 0005H 0005H 0007H 0002H 0003H 0000H 10 task10 11 taskll s 0003H 0003H 0005H 0007H 0002H 0003H 6 14 6 1 Display the Semaphore Status When the realtime OS is MRxx conformed to ulTRON specifications V 3 0 All the SEMs defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of semaphore Def cnt Default value of semaphore counter Count Semaphore count semQ Task ID Nos and task names in the semaphore queue e When a task connected to the SEM queue is in the state of waiting with timeout enabled waiting in twai sem a string Itmol which indicates a state of waiting with timeout enabled is appended to a string displayed in the semQ field When a task connected to the SEM queue is in the state of forced waiting double waiting a string s which indica
280. you click the Close button to close the S W Break Point Setting Window e You can clear enable or disable software breakpoints selected by clicking in the software breakpoint display area You can also enable and disable software breakpoints by double clicking on them e Click on the Save button to save the software break points in the file To reload software break point settings from the saved file click the Load button If you load software break points from a file they are added to any existing break points 134 6Windows Dialogs 6 8 1 Command Button The buttons on this window has the following meanings Button Function Load Load setting information from a file in which it was saved Save Save the contents set in the window to a file Help Display the help of this window Add Add the break point Refer Open file selection dialog box Close Close the window Delete Remove the selected break point Delete All Remove all break points Enable Enable the selected break points All Enable Enable all break points Disable Disable the selected break point All Disable Disable all break points View Shows the selected breakpoint positions in the Editor Source window 135 6 8 2 Setting and Deleting a Break Points from Editor Source Window The area which can be set in the software breakpoint is different according to the product Please refer t
281. you want to delete from the list of virtual interrupts in the lower part of the dialog box Then click the Del button Set Timer Dialog Load Save Interval msec Add C usec Vector I Close Priority Temp Directory C WIN DOWS TEMP Refer Timer Vecl21 Priol Timel200 Imsec 22 Priol5 TimeL500 Imsec Del All Enable All Enable Disable All Disable To delete all virtual interrupts click the DelAll button When you ve finished deleting virtual interrupts click the Close button 119 6 2 10 3 3 Temporarily disabling a virtual interrupt Click to select the virtual interrupt you want to temporarily disable from the list of virtual interrupts in the lower part of the dialog box Then click the Disable button Or you can double click on a virtual interrupt to temporarily disable it Set Timer Dialog Load Save Interval msec Add C usec Vector Close Priority J Temp Directory C WIN DOWS TEMP Refer Timer Vec 21 Priol Time 200 Del Vec 22 Priol5 TimeL500 Imsec Del All All Disable The temporarily disabled virtual interrupt is marked with an asterisk to the left of the virtual interrupt list To temporarily disable all virtual interrupts click the All Disable button When you ve finished setting virtual interrupts click the Close button 120 6Windows Dialogs 6 2 103 4 Reenabling a disabled virtual
Download Pdf Manuals
Related Search
Related Contents
ThOR Series EUROLITE SB-42 User Manual - LTT Manual - CNET Content Solutions Championnats académiques scolaires : mode d`emploi ZOOMER バーハンドルフルキット 取扱説明書 日程等 Installation Manual - avantgarde Intellinet 19" Server Cabinet 42U Acco 7501 mounting kit Admiral Craft ST-120/2 Owner's Manual Copyright © All rights reserved.
Failed to retrieve file