Home
R32C/100 E30A Emulator Debugger V.1.00 User`s Manual
Contents
1. Pause E Waits for user input Print z Check value of specified C variable expression Radix Sets and checks the radix for numerical input Register R Checks and sets a register value Reload 2 Re downloads the target program Reset Resets the target MCU Return RET Executes a source line return ReturnInstruction RETI Executes an instruction return Scope a Sets and checks the effective local symbol scope Script z Opens and executes a script file Section SEC Checks section information Set Set specified 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 SoftwareBreakEnable SBE Enables software breakpoints SoftwareBreakEnableAll SBEA Enables all software breaks Status Checks the operating status of the MCU Step S Step execution of source line StepInstruction SI Step execution of instructions Stop Stops program
2. field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmolls e Up to 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 127 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 7 Display the Mailbox Status In the MR window select Popup Menu Mode gt Mailbox MR x ERREFE DI FET T ri ID Msg cnt MAXmsg WaitQueue Message 0000H OO0AH Task 12 _task12 0002H 0014H Msg 0033H 0055H 0000H 000AH Task 13 _task13 s 0000H 003 CH 0000H 0022H 0000H OOOFH 0000H 0028H 7 10 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 e The WaitQueue Message field shows a string Msg when a message is stored when Msg_cont as
3. 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 124 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 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 tmol 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 Display 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmolls e Up to 8 characters can be displayed in the task name in the Flag Queue field If a task
4. 7 7 5 2 Reference the interval time measurement results The point time measurement results are displayed at the bottom of the Point Time Measurement window r Measurement Result Min O0h 00m 00s 000ms Ous Max O0h 00m 00s 000ms 000us Avg 00h 00m 00s 000ms 000us Crt 0 00h 00m 00s O00ms Olus Max 00h 00m 00s 000ms 000us Avg 00h 00m 00s 000ms 000us Crt 0 Min 00h 00m 00s 000ms 000us 00h 00m 00s O00ms Olus Max 00h 00m 00s 000ms O00us Max 00h 00m 00s 000ms O00us Avg 00h 00m 00s 000ms 000us vg 00h 00m 00s 000ms 000us Crt O Cnt O 7 7 5 8 Clear the measurement results Click the button of the measurement result to be cleared Clear Result You can clear all the measurement results by clicking the ALL button REJ10J1680 0100 Rev 1 00 July 1 2008 Page 105 CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 8 Trace Window The Trace Window is used to display the results of real time trace measurement 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 com
5. Current Run Task 1 main Number of Priority 100 7 10 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 7 10 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 Contents 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 121 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 4 Display the Timeout Queue Status In the MR window select Popup Menu Mode gt Timeout Queue MR x LEIRA N Ea er Value ID name 70FFH 21 task21 dly TFOOH 24 task24 dly TFOFH TFFOH TFFFH 22 _task22 dly
6. REJ10J1680 0100 Rev 1 00 July 1 2008 Page 118 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 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 Wupcnt Wake up count Actent Activated count Tmout Timeout value Flgptn Wait bit pattern of event flag Wfmode 2 Wait cancellation condition of event flag REJ10J1680 0100 Rev 1 00 July 1 2008 Page 119 RENESAS R32C 100 E30A Emulator Debugger e 1Task Status Chapter 7 Windows Dialogs Display Status RUN RUNNING state RDY READY state SUS SUSPENDED state DMT DORMANT state WAI SLP Sleeping state WAI SLP SUS Sleeping state suspended WAI SLP TMO Sleeping state with time out WAI SLP TMO SUS Sleeping state with time out suspended WAI DLY Delayed state due to dly_tsk WAI DLY SUS Delayed state due to dly_tsk suspended WAI FLG Waiting state for an eventflag WAI FLG SUS Waiting state for an eventflag suspended WAI FLG TMO Waiting state for an eventflag WAI FLG TMO SUS Waiting sta
7. gl Address2 Access WRITE z z m Data Compare Il Not Use Data fi 234 Mask tt Cancel Chapter 7 Windows Dialogs ATTENTION e Data comparison can be specified for the event E5 only when Trace mode is selected in the Debugging Mode tab of the Init dialog e Ifthe event E5 is used for a break event without data comparison be sure to specify 0000h for the mask value Furthermore if it is used for data comparison in byte units specify OOFFh for the mask value Note that data comparison in word units beginning with an odd address can also be specified e Ifdata comparison is set the real time capability of the user program execution will be lost REJ10J1680 0100 Rev 1 00 July 1 2008 Page 87 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 10 3 Reading writing data to the specified address range Set as below Example Writing data to addresses ranging from 4100h to 41FFh Event Type Break m Break Point Range address lt add lt Addiess2 tt Address jo x al Address2 jar al Access wae gt Function Source File z Function z m Data Compare M Not Use Data 00000000 Mask foo000000 Cancel 7 6 10 4 Entering to specified function Set as below Example Entering a break to function name change Event Type l Break rm Break Point Range addr A
8. F4221 F4223 void tutorial void F4224 long j int is struct Sample far p_sam F422 p_sam amp st F4231 init p_sam F423D fori i 0 i lt 10 i 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 43 7CENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 4 Step4 Setting a Breakpoint A 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 6 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 CT icx init p_sam for i 0 i lt 10 i j rand if j lt of j j ali j sortia change a p_sam gt sO a 0 p_sam gt sl al1 p_sam gt s2 a 2 p_sam gt s3 a 3 The red symbol will appear on the line containing the sort function call This shows that a softwarebreak breakpoint has been set REJ10J1680 0100 Rev 1 00 July 1 2008 Page 44 RENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 5 Step5
9. Trace Area BREAK 7 Access EXECUTE z l End Address 00000000 gt JV Pickup Trace Access WRITE Range ledd Addes o i SY Address 4100 g Address2 FFFFFFFF F REJ10J1680 0100 Rev 1 00 July 1 2008 Page 91 7PENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs e Specify the condition branch trace The jump address information in the entire address range is recorded Please remove all the trace events E Event Setting lei x r Event Status EVENT ADDRESS ACTION ACCESS RANGE Oeo 00000000 BREAK EXECUTION addr 00000000 OE1 00000000 BREAK EXECUTION addr 00000000 OE2 00000000 BREAK EXECUTION addr 00000000 OE3 00000000 BREAK EXECUTION addr 00000000 OE4 00000000 BREAK EXECUTION addr 00000000 Oes 00000000 BREAK EXECUTION addr 00000000 OE6 00000000 TRACE PICKUP BRANCH 00000000 lt addr COE FFFFFFFF TRACE PICKUP BRANCH addr lt FFFFFFFF r Trace Area ete Ean BREAK v F Assing to RAM monitor Execution Time Measure J Do Measure r Trace Mode Trace Execution Y m Sequential Break Setting Kind of Trace Branch Compressed Sequential Color Reset Save Load Ls Close REJ10J1680 0100 Rev 1 00 July 1 2008 Page 92 1ZENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 12 1 Specifying a trace range for the trace eve
10. gt E6 gt E3 gt E2 gt El gt E5 gt E4 gt EO The events EO and E4 and the event E5 are assigned lower priorities because the former are special events for specifying the trace or the start and end of time measurement and the latter is a data comparison break event or the RAM monitor event You also can set events directly in the event setting area of the Event Setting Window Select the line for the event you want to set and then click on a condition to select Event Status ADDRESS oo000000 EXECUTIC addr 00000000 oo000000 addr 00000000 ooo00000 faddr 00000000 oo000000 addr 00000000 ooo00000 RAN faddr 00000000 ooo00000 EXECUTION addr 00000000 The following can be set up as a condition of each event REJ10J1680 0100 Rev 1 00 July 1 2008 Page 77 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 1 1 Select the access condition Select the access condition for an event to occur Use the ACCESS area of the Event Setting Window to make this selection ACCESS Condition Content EXECUTION Instruction Execution Yes race event Trace pickup event No Trace event Trace start event and Trace end Yes No event nterval time measurement event RAM monitor event Yes 7 6 1 2 Select address match or range specification Select address match or range specification as the address range condition for an event to occur Use the RANGE area of
11. h m s ms us RO 10H FB 1H 3H FB F0161H 000AH 3H FB FOLALH _randam_ FOOSEH 04H _rand FOBD4H 4E6DH RO 00 00 00 054 427 00 00 00 0S4 427 00 00 00 054 427 00 00 00 0S54 428 00 00 00 054 428 00 00 00 054 428 00 00 00 054 429 00 00 00 054 429 00 00 00 054 430 00 00 00 054 430 00 00 00 054 430 41C6H R2 0440H 043EH FOBE6H __i4mulU FOC1CH R1 R3 7H SP R1 R2 R1 R1 R2 9H SP R1 RO R1 R1 R2 OFOBDC OFOBEO OFOBE4 OFOBE6 OFOC1C OFOC1E OFOC21 OFOC23 oFroczs OFOC28 7101 OFOCZA A11z 7S54F4004 7S4F3E04 FEO1 FD1COCOF EcsoO 75B107 7121 7312 758109 00 00 00 054 430 00 00 00 054 431 00 00 00 054 431 00 00 00 054 431 00 00 00 054 432 00 00 00 054 432 00 00 00 054 432 00 00 00 054 433 00 00 00 054 433 00 00 00 054 433 00 00 00 054 433 xl 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 corresponding 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 sho
12. 23 _task23 dly 6 _task6 dly TFFFH TFFFH 7 _task7 dly s 20 _task20 dly 7 10 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 which indicates double waiting is appended to a string displayed in the ID name field 26 _task26 26 task26 s Normal display Display when in WAIT SUSPEND REJ10J1680 0100 Rev 1 00 July 1 2008 Page 122 7CENESAS R32C 100 E30A Emulator Debugger 7 10 4 2 Display the Timeout Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Chapter 7 Windows Dialogs The function of each item is as described below Tasks waiting at present are
13. Bit Checks and sets bit symbols Symbol SYM Checks assembler symbols Label Checks assembler labels Express EXP Displays an assembler expression 8 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 SoftwareBreakEnable SBE Enables software breakpoints SoftwareBreakEnableAll SBEA Enables all software breaks BreakAt s Sets a software breakpoint by specifying a line No BreakIn Sets a software breakpoint by specifying a function REJ10J1680 0100 Rev 1 00 July 1 2008 Page 140 7CENESAS R32C 100 E30A Emulator Debugger Chapter 8 Table of Script Commands 8 1 7 Real time Trace Commands Command Name Short Name Contents TraceData TD Realtime trace data display TraceList TL Displays disassembled realtime trace data 8 1 8 Event Setting Commands Command Name Short Name Contents EVent EV Sets and checks events 8 1 9 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 com
14. DSA0 DSA1 DSA2 DSA3 DSRO DSR1 DSR2 DSR3 DDAO DDA1 DDA2 DDA3 DDRO DDR1 DDR2 DDR3 ORO OR1 OR2 OR3 OR4 OR5 OR6 OR7 lt Bank 0 Register OAO 0A1 0A2 0A3 OFB OSB lt Bank 0 Register 1RO 1R1 1R2 1R3 1R4 1R5 1R6 1R7 lt Bank 1 Register 1A0 1A1 1A2 143 1FB 1SB lt Bank 1 Register Uppercase and lowercase letters are not unique in register names You can specify either 9 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 specified as shown in the following table 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 Lorl Example Referencing the contents of memory at address 8000h in 2 bytes 0x8000 W e The default data size is word if not specified REJ10J1680 0100 Rev 1 00 July 1 2008 Page 150 tENESAS R32C 100 E30A Emulator Debugger Chapter 9 Writing Script Files 9 2 6 Line Nos These are source file line Nos The format for line Nos is as follows 1line_no line_no source file name Specify line Nos in decimal You can only specify line Nos in which software breaks can be set You cannot specify lines in which no assembler
15. Executing the Program Execute the program as described in the following 6 2 5 1 Resetting of CPU Bi To reset the CPU select Reset CPU from the Debug menu or click the Reset CPU button on the toolbar 6 2 5 2 Executing the Program To execute the program select Go from the Debug menu or click the Go 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 Tutorial c iol xj Source init p_sam 3 for i 0 i lt 10 i Jf j rand if j lt Ot j j ali j changela p_sam gt s0 a 0 p_sam gt sl al1 p_sam gt s2 a 2 p_sam gt s3 a 3 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 45 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 5 3 Reviewing Cause of the Break The break factor is displayed in the Output window 4 ol ot al at 21 2 2 e Connected Cause of break S W break The user can also see the cause of the break that occurred last time in the Status window Select Status from the CPU submenu of the View menu After the Status window is displayed open the Platform sheet and check the Status of
16. If the Sequential condition is specified for the event En that event and the event En 1 are specified to be Sequential The Sequential condition can be specified in order of events En En 1 En 2 and so on For example the Sequential condition can be specified for events E2 gt E1 gt EO but cannot be specified in order of EO gt E1 gt E2 or in order of E3 gt EO etc Example To set successively occurring events as in E83 gt E2 gt E1 gt EO 2 E es __ i es gt e2 gt E gt e0 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 89 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs Example To set successively occurring events as in E3 gt E2 and E7 gt E6 gt E5 SQU E E gt e gt a a gt a ens Bes 7 6 12 Specify the Trace Events To specify a trace event select Trace Point on the Trace Time Measurement tab of the Event Select dialog box For the trace event you can specify a branch trace event that records jump address information or a data trace event that records data access information For whichever trace event to be set you should specify trace conditions as necessary Note that you can set both branch trace event and data trace event so that mixed information can be recorded When the trace event are not set the trace function is the condition branch trace The condition branch trace is recorded by compressing information of the condition branch instruction
17. R32C 100 E30A Emulator Debugger Chapter 9 Writing Script Files 9 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 9 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 and tabs in front of the semicolon e Lines with comment statements are ignored when the script file is executed REJ10J1680 0100 Rev 1 00 July 1 2008 Page 147 RENESAS R32C 100 E30A Emulator Debugger Chapter 9 Writing Script Files 9 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
18. SLP 000014 0F149AH _task5 WAI SLP SUS 0000H OF1ABOH _task6 WAI DLY 0000H OF1ACAH _task7 WAI DL SuUS 0000H DF1AE4H _ task8 WAI FLG 00008 1111H TWE_ORW OF1BO2H task9 WAI FLG SUS 00008 1111H TWF ORW Fa r 1 2 3 4 5 6 7 8 9 e You can open the MR window as many as the number of 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 usable display mode depends on MRxx ATTENTION Please use the startup file crtOmr axx start axx whose contents matches with the version of MRxx when you make downloaded program The MR Window and MR command will not run properly if the startup file you uses don t match with the version of MRxx REJ10J1680 0100 Rev 1 00 July 1 2008 Page 115 tENESAS R32C 100 E30A Emulator Debugger 7 10 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Chapter 7 Windows Dialogs Menu Function Mode Task Displays Task status Ready Queue Displays Ready status Timeout Queue Di
19. Scope Resolution sriieisicc cessed ee E EO EN Ee A AE ENA ccveduvtsctexcdecevtecte 153 10 1 3 Mathematical Operators c cccccccccssssscccececsesssssceecceceesesececceeceesesseseceescsesesssaeeeeseseeenees 153 AO bo Be ad acosh ale St of AA E E EE E EE E EE errr EE corer erie eee ere cerry 10 1 5 Reference cece cne Ge ik ane ia ail ok Seka ne Sa i anes 10 1 6 Sign Inversion 10 1 7 Member Reference Using Dot Operator c cccccccccccssssscecececeenssececececsessasseeececeensaaees 154 10 1 8 Member Reference Using Arrow cccccccccccssssscecececsesesnsceceeeceesesseceeeesceesennsaeeeeeeeeseneas 154 10 1 9 P inters to Members icici susie 3 a pad eve ae cdee gue ted eaecege sta manatee 155 10110 Parentheses sc ives ccccveved e vee Goce tes ccs ca veatnccdvedecedssensdacenceteedeansbendiccevedsegustencaceeusehe 155 WOT DATTA ARE PE OEE ETAT E bees EE E E E ES A ah wohe 155 10 1512 Casting to Basic Type skireis tee RE a E an aai 155 10 1 13 Casting to typedef Types dresinn i a e e AN Sy 156 10 14 14 Variable NaMe ei eE E E N E E E TA EEE 156 KOIN EI ACEA KOS aA ET e 1T E REEE EAE A E T E E E EO 156 10 1 16 Character ConstantSes reciia EEE EEEE R EEEE R EERE R 156 10 1 17 Character String Literal 8 se ecsisevesecs cc tecceseseueees R RE N E Nes este Ree A ete 156 10 2 Display Format of C C Expressions cccccccccsessscecececeesessscececececsesseceeeesesenenseseseeeeeesenteaeees 157 10 2 T Enumeration Types aspon pr iieiea a a
20. Yes Event E6 Yes Yes Yes Yes Yes Yes Yes Yes Yes__ Yes Yes Yes Yes EventE4 Yes Yes Yes Yes Yes Yes REJ10J1680 0100 Rev 1 00 July 1 2008 Page 79 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 3 Select the Combinatorial Condition Select the combinatorial conditions of an event Use the EVENT and the SEQ areas of the Event Setting Window to make this selection e Select the OR Condition In the EVENT area you can select an use event Event Stai eo gE oe oes oes e Select the Sequential Condition In the SEQ area you can select an event for which the Sequential condition is to be set Sequential condition can only be selected for break events However if the event E5 is used to set a data comparison break event or the RAM monitor event you cannot specify Sequential for the event E5 Sequential Condition Content E Single Condition Ex gt Exi Sequential Condition The Sequential condition can also be selected using the Sequential button Sequential Break Setting Sequential Click on the button between the events for which you want to specify the Sequential condition Transition between the events will be shown by an arrow The Sequential condition can only be specified for the events that have been set as break events Example To set successively occurring events as in E83 gt E2 gt
21. described above is non zero 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 e 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 tmolls e Up to 8 characters can be displayed in the task name in the WaitQueue Message field If a task name exceeds 8 characters the extra characters are omitted REJ10J1680 0100 Rev 1 00 July 1 2008 Page 128 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 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 confor
22. e The time measurement mode is the mode to use the time measurement function e The RAM monitor mode is the mode to use the RAM monitor function e The writer mode is the mode to use the emulator as a writer of the flash ROM The function of the mode except for the chosen mode can t be used The following shows the debugging function that can be used in each mode Debugging function Mode Break Trace Time measurement RAM monitor Execution Data Address Data Execution Interval PC access Area compare time time Trace Yes Yes No No Yes No No No Trace priority Trace Yes Yes No Yes Yes No No No MCU execution priority Time Yes Yes No No No Yes Yes No measurement RAM monitor Yes Yes Yes No No No No Yes Writer No No No No No No No No REJ10J1680 0100 Rev 1 00 July 1 2008 Page 31 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 5 2 Setting of Download to Flash ROM Area When downloading the target program specify whether or not to verify in the flash ROM area To use the verify function select the Enable Verification check box Download to Flash ROM Area I Enable Verification 5 1 5 3 Specifying Writer Mode Specify writer mode when the emulator needs to be used as a flash ROM writer The target program cannot be debugged in writer mode To specify writer mode select the the load module file you want to download To select
23. level 7 exclusive OR lt lt gt gt Dyadic comparison level 8 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 151 7CENESAS R32C 100 E30A Emulator Debugger Chapter 10 C C Expressions 10 C CH Expressions 10 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 TAA Pointers ere 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 Arrays Array 2 DArray 2 8 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 Dhien Character string literals abcdef 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 variabl
24. s Display when in WAIT SUSPEND with time out 26 _task26 tmolls e Up to 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 7 10 6 2 Display the Semaphore Status When the realtime OS is MRxx conformed to uITRON 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 126 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 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 tmo 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 double waiting is appended to a string displayed in the Semaphore Queue
25. should be specified in the ACCESS area of the event used To specify an address range use range specification of the event The events that can be combined in range specification are limited to those given below because the events EO and E4 are used for the trace start and trace end events e Combination of E2 and E3 e Combination of E6 and E7 By default events for recording jump address information in the entire address range are set in E6 and E7 as the trace event Specify the following Example To record data access data read and data write in the entire address range in After mode and specify data writes at the address 4100h as the trace start condition Set Event Status 7 j i Event Type Trace bi m Trace Area Trace Area AFTER z Start Address 41 oo 7 End Address Access WRITE 7 Access dv Pickup Trace Access RAY ii Range Address1 lt addr lt Address2 x Address 00000000 7 Bl Address2 ee 7 Cancel To perform a trace with any condition you specified change the above setting Specify the following REJ10J1680 0100 Rev 1 00 July 1 2008 Page 97 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs Example To record data writes to the 4100h 4110h and 4120h in After mode and and specify data writes at the address 4010h as the trace start condition Set Event Status 3 it Event Type Trace ba r Trace Area Trace Are
26. the dialog box to inform that thing appears In that case reset the target in hardware or turn on the power for the target and then click the OK button 12 1 11 Use of Watch dog timer You can debug a program making use of the watchdog timer Only when the watchdog timer is active the emulator s monitor program performs refreshing 12 1 12 Debugging Resource on MCU Since the MCU s internal break events share trace events and time measurement events there is a total of 8 break events 12 1 13 Setting of break point on MCU s internal RAM area Please use the software breakpoint to the MCU s internal RAM area to use the hardware break resource effectively REJ10J1680 0100 Rev 1 00 July 1 2008 Page 164 RENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 2 Attention of the R32C Debugger 12 2 1 Stack area used by the emulator The emulator uses the interrupt stack area as its work area MAX 52 bytes When debugging allocate a sufficient interrupt stack area consisting of the regularly used size plus 52 bytes 12 2 2 Interrupt stack pointer when resetting the target program The emulator sets the interrupt stack pointer ISP to 0500h when resetting the target program Remember that the interrupt stack pointer ISP is set to 0000h on a unit at the production stage 12 2 3 RAM area used by the data compare break function Be aware that when you are using the data comparison break function based on event E5 8
27. 1 2008 Page 65 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 2 ASM Watch Window The ASM watch window is a 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 080000 080655 Buf Tsk 1 084620 Dbg_ent O108CB 4 Dbz_mode2 Address Bit No Data Length Data 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 function of this debugger is realized with memory dump Real time capability is impaired when this function is us
28. 1 3 Register Operation Commands ccccccessssescceceesesseseceecceceessaeceeececsensssseeeeeeceenertsaeees 140 8 1 4 Memory Operation Commands cccccceceesssseseeeceesessssecceececsesssaeceeececsensssceeeesesenenseaeees 140 8 1 5 Assemble Disassemble Commands ccccccsssscesssceeeessececseseeeecsneeecssaececseseesessneeeeneaaes 140 8 1 6 Software Break Setting Commands ccccccccccccessesssseceeececsessaeceeececsenessceeeeeceenenseaeees 140 8 1 7 Real time Trace Commands cccccccesssscecesssececseeeeceeseeecseseeeessneeeesesaeeecseseesesseeeensaaes 141 8 1 8 Event Setting Commands cccccccccccccsssssssececececeessaececececcesssceeececsesesssaeeeeeceesenssaeeeeees 141 8 1 9 Script og File Command yaseen EA E E N EE N EAE EES 141 8 1 10 Program Display Commands c cccccccccsessssesececeesessseceeccecsessaeceeececsenessceeeeeceesertsaeees 141 821 17 Clock Comimand oe cieo a Staite a a a es Sie Ae 141 8 1 12 C Language Debugging Commands ccccccccecssssssecececeesssnscecececeesenseceeececeesenssaeeeeees 142 1 13 Real time OS Command Moscone ei E ER E KT EE E 142 8 1 14 Utility Commands ccccccccccccccssssscecececeesensscecececeesessaseceeececeessesseseeecseeesesssaeeeeseeseeneaaees 142 8 2 Table of Script Commands alphabetical order cc cccccccsessseseescescesessccssesecssesscsvesessecesesesaees 143 9 Writing Script Files 145 9 1 Structural Elements of a Script File c cccc
29. 2 1 Step1 Creation of 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 Projects l e workspace Name P Debugger only MI6C PO7501 DOSample0 gt Debugger only MI6C StarterK Project Name gt gt Debugger only R8C E SYSTEM DOSamplent gt Debugger only RBC E8 SYSTEM Directory D work HEW4 Samples M16C D0Sample01 Browse GPU family M16C Me Tool chain None Y Properties oree 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 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 Type 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 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 ent
30. 95 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs Example To record data writes in the range 4100h to 41FFh in Before mode and specify data writes at the address 4200h as the trace end condition Set Event Status Event Type Trace v r Trace Area Trace Area BEFORE x Start Address 00000000 z zl End Address 4200 7 gl Access EXECUTE z Access WRITE Vv Pickup Trace Access WRITE 7 Range Address1 lt addr lt Address2 X Address ja 00 gt gl Address2 ar ff 7 gl Cancel REJ10J1680 0100 Rev 1 00 July 1 2008 Page 96 CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs e Specify After for the trace range for the trace event to be set Set the trace start event only event EO specifiable and the trace end event only event E4 specifiable and then specify any address or address range to set a trace event In After mode the debugger records the trace events that have occurred from when the condition for the trace start event was met till when the program has stopped running For the trace start event set any address and ACCESS condition in the event EO as the trace start condition For the trace end event set a condition unlikely to occur e g Oh is specified for the address while WRITE is specified for the ACCESS condition in the event E4 as the trace end event for After mode Trace conditions branch trace data trace
31. Checking the Operation of RAM cccccccssscccccecsessssscecececsesesssseceeseeenenssaeeeeecs 41 6 2 3 Step3 Downloading the Tutorial Program ccccccccccccsessessscecececsesenseceeeeeceesenssaeeeeecs 42 6 2 4 Step4 Setting a Breakpoint cccccssssssccccececssssnsccecececesssncaecececsensseaeescecssnsaaeeeeecs 44 6 2 5 Step5 Executing the Program 0 ccccsessscccececeesessececececsenssnececececsesesssseeeesesenentsaeeeeees 45 6 2 6 Step6 Reviewing Breakpoints ccccccccssscccccecsesessececececsessssscecceecsenesssseeeesesenenseaeeeeecs 47 6 2 7 Step7 Viewing Register ccscccccccccscsssssnccececscsessnnccecececeessaeaecececsensaseaeeececsesstaaeeeeecs 48 6 2 8 StepS Viewing MEMOLY cc ecsessectcceseetecdetensvaevces sesencntace cauesaeienGersecvvensdedce RR 49 6 2 9 Step9 Watching Variables c ccccccccccsssssececececsesssseceecceceessseseccceceesenssseeeeeesenesssaeeeeecs 50 6 2 10 Step10 Stepping Through a Program ccccccsssscccceceesessscecececeesesssseceeeesesentsaeeeeees 52 6 2 11 Step11 Forced Breaking of Program Executions cccccscccccceceesesssceeececsessnsseeeeeeees 55 6 2 12 Step12 Displaying Local Variables cccccccccssssscecececeesssssceecceceenesssceseesesenenseaeeeeecs 56 6 2 13 Step13 Stack Trace Function cccccccsssscccceceessssececececeessssscecccecsesesssseseescsenensaaeeeeees 57 6 2 Ta What Nexto x Suter eines Sea eiten e
32. Data Queue Status In the MR window select Popup Menu Model gt Data Queuel MR x mior AMuevdeoWi GOB _ Dtgatr Dtent Dtgsz Data Queue Wait Data Queue Data TA TFIFO 0 o Send 23 _task23 24 task24 s 25 TA_TFIFO 0 Receive 27 _task27 28 _task28 s TA TFIFO 0 Send 31 _task31 32 _task32 s 33 TA_TPRI oO Receive 35 _task35 36 _task36 s 7 10 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 MR100 4 If the standard data 82 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 e The following are dis
33. Emulator Debugger Chapter 5 Setup the Debugger 5 1 2 Debugging Information Tab The specified content becomes effective when the next being start Compiler Object Format M On Demand iv Display the instruction format specifier in disassembly i Always treat variables of enumerator type with unknown size as 1 byte 5 1 2 1 display the compiler used and its object format Display the compiler used and its object file format Compiler NC3OWA NC8C Object Format IEEE 695 Please specify the compiler used and its object file format in the dialog opened by menu Debug gt Debug Settings 5 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 The specified content becomes effective when the next being download e On memory method Debugging information is stored in the internal memory of your computer Usually select this method 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 faster This method is suitable when it takes so long time to download the debugging information because the PC has less memory
34. FFFEOOOO FFFE7FFF FEFESnnn FEEEFEFE fa Select All Clear All E2 Data Flash is not erased on download The selected blocks are over written not erased on download 5 3 1 1 1 Setting to clear the MCU s internal flash ROM Specify whether or not to clear the contents of the MCU s internal flash ROM when downloading the target program or data 00060000 OOOBOFFF 00061000 00061FFF FFF80000 FFFSFFFF FFFSO000 FFFSFFFF FFFAQOOO FFFAFFFF FFFB0000 FFFBFFFF FFFCOOOO FFFCFFFF FFFDOOOO FFFDFFFF FFFEOOOO FFFE7FFF FEFESnnn FFEEFEFE z Select All Clear All The MCU s internal flash ROM is displayed block by block in the list view e The blocks whose check marks are turned on do not have their flash contents cleared when downloading The memory contents in places not overwritten by downloading remain intact e The blocks whose check marks are turned off have their flash contents cleared when downloading e Pressing the Select All button keeps all blocks from being cleared when downloading e Pressing the Clear All button clears all blocks when downloading 6811 2 Setting to clear the E2 Data Flash Specify whether or not to clear the contents of the E2 Data Flash when downloading the target program or data E2 Data Flash is not erased on download Select t
35. Local symbols Global symbols Local labels Global labels Local symbols outside scope Local labels outside scope O3 Dt Im Co Nor e Conversion of bit values Local bit symbols Global bit symbols 3 Local bit symbols outside scope Noe REJ10J1680 0100 Rev 1 00 July 1 2008 Page 149 tENESAS R32C 100 E30A Emulator Debugger Chapter 9 Writing Script Files 9 2 3 Macro Variables Macro variables are defined by assign statements in the script file See Section 9 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 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 9 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 Product Name Register name The debugger for R32C PC USP ISP INTB FLB SVF SVP VCT DMDO DMD1 DMD2 DMD3 DCTO DCT1 DCT2 DCT3 DCRO DCR1 DCR2 DCR3
36. RamMonitor ASM Watch Window View gt Symbol gt ASMWatch C Watch Window View gt Symbol gt CWatch Script Window View gt Script S W Break Point Setting Window View gt Break gt S W Break Points Event Setting Window View gt Trace gt Trace Points View gt Break gt H W Break Points Time Measurement Window View gt Trace gt Time Measure Trace Window View gt Trace gt Trace GUI I O Window View gt Graphic gt GUI 1 0 MR Window View gt RTOS gt MR 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 gt Register Window e Image Window e Waveform Window e Stack Trace Window REJ10J1680 0100 Rev 1 00 July 1 2008 Page 61 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 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 displayed contents are updated at given intervals while running the target program a Memory pool 1 nu mssi 10 410 8 2 abc de a de dw ct a as ee E Label Register Address pool SB ABDCDEFGHI is is test Label Register Data Code This system has 1 Kby
37. SLP ooo0 WAI SLP SuUS 0000 WAI DLY 0000 WAI DLY SUS 0000 WAI FLG 0000 WAI FLG SUS 0000 1111H TWF_ORW 1111H TWF ORW nununununuununm By double clicking any line the information on the task context is displayed in the Context dialog For details on the Context dialog see 7 10 12 Display the Task Context The following data is displayed in the status bar Current Run Task 1 main 7 10 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 fle_mode 2 Wait cancellation condition of event flag REJ10J1680 0100 Rev 1 00 July 1 2008 Page 117 7CENESAS R32C 100 E30A Emulator Debugger e 1Task Status Chapter 7 Windows Dialogs Display Status RUN RUNNING state RDY READY state SUS SUSPENDED state DMT DORMANT state WAI SLP Sleeping state WAI SLP SUS Sleeping state suspended WAI SLP TMO Sleeping state with time out WAI SLP TMO SUS Sleeping state with
38. Status Jj i Event Type Break z Break Point Range addr Address1 Z Addess1 1000 g Address2 Access JEXECUTE x T Function Source File z Function z m Data Compare Vv Not Use Cancel REJ10J1680 0100 Rev 1 00 July 1 2008 Page 85 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 10 2 Writing Reading a Specified Address Set as below Example Writing to address 4100h Event Type Break Me r Break Point Range addr Address1 z Address1 4100 gl Address2 00000000 zl Access WRITE T Function Source File z Function z r Data Compare Appa IV Not Use Data foo000000 Mask Joooo0000 Cancel Example Writing byte length data 32h to address 4100h Event Type Break v r Break Point Range addr Address1 ee Address1 s100 x gl Address2 foo000000 z a Access WRITE 7 Function Source File z Function z r Data Compare I Not Use Data faz Mask iG Cancel REJ10J1680 0100 Rev 1 00 July 1 2008 Page 86 CENESAS R32C 100 E30A Emulator Debugger Example Writing word length data 1234h to Set Event Status i address 4100h Event Type Break nd m Break Point Function Source File Function Range addr Address1 Address1 s100
39. Therefore the condition branch trace can record the execution history more than the branch trace The following shows the trace conditions that can be set e Specify the branch trace event The new instruction address fetched at the jump address is recorded To specify an branch trace event select the BRANCH in the ACCESS area of the event The branch trace event can specify only the setting that records jump address information in the entire address range Specify the following Example To record the jump address information in the entire address range Set Event Status Event Type Trace z r Trace Area Trace Area BREAK E End Address Access EXECUTE Access EXECUTE z JV Pickup Trace Access BRAN CH Address lt addr Range lt Address2 Address Cancel REJ10J1680 0100 Rev 1 00 July 1 2008 Page 90 tENESAS R32C 100 E30A Emulator Debugger e Specify the data trace event Chapter 7 Windows Dialogs The access information to the specified address is recorded To specify an data trace event select the READ WRITE RW in the ACCESS area of the event The event is established when memory is accessed at the specified address or under conditions set for the specified address range Specify the following Example To record the data writes to the address 4100h Set Event Status ij Event Type Trace X m Trace Area
40. 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 O000H0000H 018AH 7 10 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 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 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 7 10 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 e The following are displayed in the Status area TALM_STA
41. a file click the Add button and select one in the ensuing dialog box The selected file is listed in the file name column of the dialog box Multiple files can be selected To delete a file from the list select the file you want to delete and click the Remove button To use the verify and checksum functions select the Enable Verification and Checksum check box HT Writer Mode File Name When the write operation is completed restart or quit the emulator debugger ATTENTION e Only when writer mode is selected in the Debugging Mode writer function can be used REJ10J1680 0100 Rev 1 00 July 1 2008 Page 32 RENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 2 Setting of the Communication Interface 5 2 1 Setting of the USB Interface USB communication uses the personal computer s USB interface It is compliant with USB 2 0 Before USB communication can be performed the computer must have a dedicated device driver installed in it For details on how to install USB device drivers see 3 3 1 1 Install of USB device driver The currently USB connected emulators are listed in the Serial No area Select the serial No of the emulator you want to connect Serial No E304 DEBUG REJ10J1680 0100 Rev 1 00 July 1 2008 Page 33 RENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 3 Setup the Debugger for R32C 5 3 1 Emem Dialog In the Emem dialog box setting in
42. 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 __hitp www renesas com en tools Setup of Debugger 1 Features 3 TRAM Monitor Punction ysa e ces oelei cease aace see esate bee eign sta bees ieee 3 1 1 1 RAM Monitor Area cccccccssscccssseceessneeeceesececseeceeecsseeecsesaececseaeeesesueeecsesaeesseeseeesesaeeeenaes 3 1 122 Sampling Period eas csc isch SE E EEE EE EE E EE AE cadtnses sosdeace dca tusks Se edeo 3 1013 Related Windows cseccidscol cssssccstccesseote ceseenads cosas tea A E E EE E 3 1 2 Break Functions aneian E T e T E ted NE E R E NR 4 1 2 1 Software Breaks Function ccccccccsscecesssscecseceeecseeeecsessececseseeeecseeeeesssaeeecsesaeeesseeeeeneaee 4 122 Hardwar Break no eetarea a aa e aea a e Eaa AE ea Sao EAE aea 4 1 3 ar EI A Bita NE Trace Wun ction A EEEE E A E AE 5 Tsoi Trace Arean sE a N na a eee Sere Be eee 5 1 3 2 Trace Condition Setting cccccccccccccccsessssecccececsessaeseccceceesssaeeeeececsesesaesecececeesestsseeeeeeeenenaes 6 1 4 Time Measurement Function cccccccecceesessececececeesenaececeeeceeseaececeescseseneaececeseeseaeaeseeseeenenenaeess 6 1 4 1 The Measurement Condition ccccccccccsssscecsessececseececeessececsssaeeecsesaeeeesseeecsesaeeseneaaeeeees 6 1 5 Real Time OS Debugging Funtion
43. area around this variable Start Recording Start to record the updated values Stop Recording Stop recording the updated values Add New Tab Add new tab Remove Tab Remove the selected tab Copy Copy the selected item to the clipboard Copy All Copy the all items in the sheet to the clipboard Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window REJ10J1680 0100 Rev 1 00 July 1 2008 Page 70 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 4 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 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 Script Of x gt b SR EAR Om Script Script File Name Log Log File Name Dassemble _main ADDRESS gt LABEL PROGRAM OFO042 maini gt 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
44. each project separately If two or more of the C watch window are opened at the same time the registered The reference scope of the variable is selectable from current scope global scope and each file s scopes 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 operation e The C watchpoints can be sorted by name or by address e The RAM monitor can be allocated to the address of specified variable REJ10J1680 0100 Rev 1 00 July 1 2008 Page 68 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs ATTENTION You cannot change the values of the C watch points listed below Register variables C watch point which does not indicate an address invalid C watch point If a 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 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 The variables which are changed in RAM monitor function are global variables and file local variables only The RAM monitor function of this debugger is realized wit
45. enumerators variables of bool types characters types integers types and enumeration types hbit field When the substituted value is larger than the size of the bit field it will be truncated e The bit field member allocated in the SFR area might not be transformed into a correct value e While the target program is running values of local variables and bit fields cannot be modified 12 1 4 Function name in C e 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 e You can not use function names for C C expression e No script commands e g breakin and func can be used in which function names are specified for arguments e In address value specifying columns of dialog boxes no addresses can be specified using function names e The pointers for a member function can not be referred correctly in C watch window 12 1 5 Option settings for download modules These options which can be set in Debug Settings dialog box are invalid for this debugger e Offset specified value is regarded as 0 e Access size specified value is regarded as 1 e Perform memory verify during download Not supported 12 1 6 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 absolu
46. executed at run time The command to which adheres behind is not supported according to the product 8 1 Table of Script Commands classified by function 8 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 Stops program execution Status 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 E Resets the target MCU Time Sets the run time display and checks the current setting 8 1 2 File Operation Commands Command Name Short Name Contents Load L Downloads the target program LoadHex LH Downloads an Intel HEX format file LoadMot LM Downloads a Motorola S format file LoadSymbol LS Loads source line ASM symbol information 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 13
47. execution Symbol SYM Checks assembler symbols Time Sets the run time display and checks the current setting TraceData TD Realtime trace data display TraceList TL Displays disassembled realtime trace data UnAlias Cancels the alias defined for a command UnAliasAll 2 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 E Displays a function call status REJ10J1680 0100 Rev 1 00 July 1 2008 Page 144 7CENESAS R32C 100 E30A Emulator Debugger Chapter 9 Writing 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 9 1 Structural Elements of a Script File You can include the following in script files Script commands Assign statements Conditional statements if else endi Program execution branches to the statement s to be executed according to the result of the conditional expression Loop statements while endw A block of one or more statements is repeatedly executed according to the expression break statement Exits from the innermost loop Comment statements You can include comments in a script file The comment statements are ignored when th
48. instructions have been generated including comment lines and blank lines If you omit the name of the source file the line Nos apply to the source file displayed in active Editor Source Window Include the file attribute in the name of the source file Do not include any spaces between the line No and name of the source file 9 2 7 Character constants The specified character or character string is converted into ASCII code and processed as a constant Enclose characters in single quote marks Enclose character strings in double quote marks The character string must consist of one or two characters 16 bits max If more than two characters are specified the last two characters of the string are processed For example ABCD would be processed as CD or value 4344h 9 2 8 Operators The table below lists the operators that you can use in expressions 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 naa Monadic positive monadic level 2 negative monadic logical NOT of Dyadic multiply dyadic divide level 3 Dyadic add dyadic subtract level 4 gt gt Right shift left shift level 5 amp Dyadic logical AND level 6 Is Dyadic logical OR dyadic
49. pData 0x408 signed int nID 0 unsigned char str OxFOOOS 83 s wt 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 158 RENESAS R32C 100 E30A Emulator Debugger Chapter 10 C C Expressions 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 0x1234 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 th
50. program is running e If the area is an instruction non rewritable area such as the ROM area in the user target no software breakpoints can be set REJ10J1680 0100 Rev 1 00 July 1 2008 Page 162 RENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 1 3 Get or set C variables e Ifa variable is declared with the same name as the type definition name declared by typedef you cannot reference that variable e Values cannot be changed for register variables e Values cannot be changed for 64 bit width variables long long double and so on e Values cannot be changed for C C expressions that do not indicate the memory address and size e 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 e Literal character strings can only be substituted for char array and char pointer type variables e No arithmetic operations can be performed on floating point types e No sign inversion can be performed on floating point types e Casting cannot be performed on floating point types e Casting cannot be performed on register variables e Casting cannot be performed on structure types union types or pointer types to structure or union types e Character constants and literal character strings cannot contain escape sequences e The following values can be substituted for the bit fields integer constants character constants and
51. 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 72 RENESAS R32C 100 E30A Emulator Debugger 7 5 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 Me S W Break Points S W Break Point 0F0000 OF00C2 36 GLOBAL C 0F012C 22 LOCAL C Set Break Point Area Display Break Points e Ifyou have set multiple software breakpoints program execution stops when any one software break Operation Buttons to Break Points address is encountered OR conditions e You can continue to set software breakpoints until 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 p
52. specify measurement intervals click any line MP1 MP3 in the Measurement Point group of the Interval Time Measure Window This opens a dialog box for specifying measurement conditions 7 7 4 1 Measure the execution time between the events 1 Set the measurement events measurement start event and measurement end event 2 Specify the following in the Measurement Condition Designation dialog Select this mode Set Mesurement Point MP1 m Measurement Point Setting Mode Stat JE z Ent E2 zl Source File Function Select the end event Select the start event ATTENTION e The time measurement interval ranges from the location where a start event occurs to the location where an end event occurs However this does not include the point in time at which an end event occurs REJ10J1680 0100 Rev 1 00 July 1 2008 Page 104 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 7 5 Reference the time measurement results 7 7 5 1 Reference the execution time measurement results The point execution time measurement results are displayed in the Platform tab of the Status window The cumulative result is displayed when measured two or more times Item status Connected to R32 100 E30A Emulator CPU R32 100 Run Status Ready Cause of last break Program Run time count 00 h OO m O00 sec 947 msec 212 usec OO00000000060621625 cycle Memory Platform A Events
53. srein e N ET N E EE EOT ESS 6 1 6 GUI Input Output Function 2 0 cccccccccesssssceeececsessseceeececseseaseeeceecsenssssseeeeseseneaseeeeseeesenaeeess 6 2 About the Emulator E30A 7 2 1 Commiunication method sc ccscsiecececeeei cee he niir ceded EEE EEEE EEAS EE EN AREER 7 2 2 Munction table scsi aise atetiva eine naa ier aati nea eee eas 7 3 Before starting the debugger 8 3 1 Communication method by emulator cccccccccessssecececeesessecececececsesssaeceeececsesssaeceeccecsenesnsseeeeeees 8 SLA USB Interface ene hs ascent aiaa e Meee ALG hese I A 8 3 2 Download of Firmware cc cccccssccccsssseceesssceceessececseeeeeeecsseeecessaeeecsesaeeecseseesessaeeecsesaeescseseeseeeeeenaas 8 8 3 Setting before emulator Starts cccssccccccccsesssssnccccecsessssnnccecscecescesnsaeeececsessnsaaeeescesceessaaeeecesense 9 3 371 WSB communications 5 0 as 26e secant a cad svanben eas E EaR 9 4 Preparation before Use 10 4 1 Workspaces Projects and Files ccccccccccccecsessscececececsenssaeceeccecsesnsseceeeceesessaaeseeeceesenssseeeeecenes 10 4 2 Starting the High performance Embedded Workshop c ccccsssseessescecsesnececsseeeeeesseeeesenes 11 4 2 1 Creating a New Workspace Toolchain Used c ccccccscccssesssesesscsseescsscesessecesesecsuessensees 12 4 2 2 Creating a New Workspace Toolchain Not Used c ccccccccssscssesscssesscsseesesssesessecesessens 17 AB Starting the Debugger eed cvsecsge
54. the Event Setting Window to make this selection RANGE Condition Content EQU Address match N START Address range specification Start Address IN END Address range specification End Address Address range specification cannot be set for the events that have had EXECUTION selected in ACCESS condition Note also that only the following combinations of events can be selected e O Start Address and E1 End Address e 2 Start Address and E3 End Address e 4 Start Address and E5 End Address e 6 Start Address and E7 End Address REJ10J1680 0100 Rev 1 00 July 1 2008 Page 78 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 2 Select the action condition by which an event is assumed to have occurred Select the action condition by which an event is assumed to have occurred Use the ACTION area of the Event Setting Window to make this selection Any event selected in the EVENT area is displayed in different colors depending on the event action you have selected for it in the ACTION area The display color can be changed using the Color button ACTION Condition Content Color BREAK Break Red RACE PICKUP IME START IME END TIME TRACE START Tracing start Blue TRACE END RAM MONITOR The ACTION conditions that can be specified for each event are listed below ACTION Condition Event BREAK TRACE PICKUP Event EO Yes Event E2 Yes Event E3 Yes Event E5
55. trace start for Before mode by specifying the current PC value for the address and EXECUTION for the ACCESS condition in the event EO For the trace end event set any address and ACCESS condition in the event E4 as the trace end condition Trace conditions branch trace data trace should be specified in the ACCESS area of the event used To specify an address range use range specification of the event The events that can be combined in range specification are limited to those given below because the events EO and E4 are used for the trace start and trace end events e Combination of E2 and E3 e Combination of E6 and E7 By default events for recording jump address information in the entire address range are set in E6 and E7 as the trace event Specify the following Example To record jump address information in the entire address range in Before mode and specify instruction execution at the address F82000h as the trace end condition Set Event Status N Event Type Trace v m Trace Area Trace Area BEFORE Start Address End Address fie2000 E gl Access fe ECUTE z Access JEXECUTE JY Pickup Trace Access BRANCH Range ddress1 lt addr lt Address2 F Adcress2 FFFFFFFF al ddress1 Cancel To perform a trace with any condition you specified change the above setting Specify the following REJ10J1680 0100 Rev 1 00 July 1 2008 Page
56. 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 136 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 12 Display the Task Context 7 10 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 Task ID Context Task ID 14 task14 Status WAI SEM Priority 15 FF2853 0000 0001 0000 0014 000001 OO005 OOO40E Enter the task ID numb
57. 0 GLOBAL C 47 04995 04994 global_struct m short 5 oo047c 42 Wj oo 00 00 055 299 global _struct m_long 6 00047D 05 W 00 00 00 055 299 00047E oo W 00 00 00 055 299 O0047F 06 W 00 00 00 055 299 000480 oo Wj o0 00 00 055 299 global_struct m struct m uchar 000481 oo W 00 00 00 055 300 000462 oo Ww oo 00 00 055 300 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 109 RENESAS 0x10 oe R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 8 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 SNS Range 32511 00000 Area Break ne Address Now oFoocs j global_char y i _OFOOCF global short 2 _OFOOD3 global_long 3 i FOODE global_struct m char B gt gt global _struct m short 5 _GFOGES global_struct m_long 6 OFGOEEB global struct m_struct m_uchar 0x10 OFOOEF global _struct m_ struct m_ushort 0x20 19 OFGOFS global_struct m struct m_ uint 0x30 OFOOFB for i 0O i lt 5 i OFO104 for 3 072 5 SIr OFO10D global array i j 0 1 2 3 4 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 Address display area Shows addresses corr
58. 00 don t output the sizes of enumerator types in debugging information and debuggers consider the size as same size of int Therefore you may not correctly refer the values of enumeration types in the target programs which were compiled with the above option This function is for resolving the above issue See the users manual of each compiler for details of the above option s Always treat variables of enumerator type with unknown size as 1 byte Check the above check box if you would like to treat all sizes of enumeration types as 1 byte It is necessary to load the debugging information again in order to reflect this setting REJ10J1680 0100 Rev 1 00 July 1 2008 Page 27 RENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 3 Emulator Tab Clock xin 128 0000 ao Generated PLL MHz i MHz COR Ox MF C Internal Data acquisition interval in MCU running state 4 10 ms 6 ms Do not communicate with MCU while target is executing 5 1 3 1 Specify the Target Clock Change the setting by synchronizing with the clock used by the target microcomputer Generated is set by default Clock Xin fi 6 0 MHz Generated hternal Select the option Generated if the frequency you have set should be set for the clock internally generated by the emulator user defined clock or select Internal if said frequency should be set for the internal clock No matter whether you set th
59. 044A 0007E2 0007E2 0007E2 0007E4 fNNN7E2 e VelslaG Qiviaszinyv Range 32511 00000 Ares Fase oe eee ee os 00 06 oo 00 oo 10 0020 0030 0000 0000 0000 0000 0000 0000 0000 0000 0001 0001 1 Ss ms DOGO 00 055 299 00 00 00 055 299 00 00 00 055 299 00 00 00 055 299 00 00 00 055 299 00 00 00 055 300 00 00 00 055 300 00 00 00 055 300 00 00 00 055 300 00 00 00 055 301 00 00 00 055 301 PRAM EMD SMPMPRPErVEGESESSEHEBZESES 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 nnn An 055 301 055 302 055 302 055 302 055 302 055 303 055 303 055 303 055 304 055 304 055 305 15 x 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 j Trace Cycle Label rE 32511 00000 A Area Break F ile Cycle 0501 0501 2 A Address OFOODF Time 00 00 00 055 299 Databecess lela apd ae us Bes GLOBAL C 44 _global_struct GLOBAL C 45 05012 aa 05007 05006 05001 0500
60. 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 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 Tam a boy etc Notes e Character string literals can only be pl
61. 163 12 1 5 Option settings for download Modules cc cccccccccesssssesccececsessaeceeccecsessseceeeeeesensaaees 163 12 1 6 Debugging multi MOdUIES ce cecseseseeeteseeeseeeseseseseseaeaeaeaeaeaeaeseaeaeaeaeaeaeaeseaeaeaeaeaea 163 12 1 7 Synchronized debugging jssccecce eeweeveerecd ev veseedesess ces cove dh seekva N E Nes este ee tetas 164 12 1 8 Down load of Firmware cccccccsscccessseceesnececesaececseececesseeecseaaeeeseeeaeeessaeeessesaeeessesaeens 164 12 19 Ch ck of TD Code iiss scctseivsccdecce r a atta ceeded et Ades ested 164 12 1 10 The start procedure of debugger ccccccsesscecececsesessececececeesesssseceeeceesenssaeeeeceseeenees 164 12 14 Used Watch doe G1 Gre fsisecgcs does tse tock oe eae cod e e bee eu SE a 164 12 1 12 Debugging Resource on MCU ccccccccsesssceeececeesensscecececeesessseceesceeeestsaeeeeeeeeeeaees 164 12 1 13 Setting of break point on MCU s internal RAM area ccecsceesseceeeeteeeenteeeenes 164 12 2 Attention of the R82C Debugger cccccccccccccceesessscecececeesenssceceeeceesessseeeeeceenennsseeeeeecesseneaaes 165 12 2 1 Stack area used by the emulator ccccccccsessecccececsesscececececsesssseceeccsesessaeeeeeesesensaaeas 165 12 2 2 Interrupt stack pointer when resetting the target Program ssesesesesesesesereseseserene 165 12 2 3 RAM area used by the data compare break function ccccceesseceesseceeeeteeeeeeseeeeees 165 12 2 4 Option of C Compiler Assembler
62. 680 0100 Rev 1 00 July 1 2008 Page 6 tENESAS R32C 100 E30A Emulator Debugger Chapter 2 About the Emulator E30A 2 About the Emulator E30A The E30AEmulator is an on chip debugging emulator that makes use of the debugging circuit or 1 Pin NSD New Single wire Debugger that is built in the R32C 100 series MCUs 1 Pin NSD is Renesas original OCD On chip Debugger Using only the BYTE pin of the target MCU as a communication path it permits the MCU operation and electrical characteristics etc to be debugged under a condition close to that of the user s final product 2 1 Communication method The supported communication method is USB communication 2 2 Function table The supported functions are as follows Sa Be oo Emulator E30A S O 64 points ooo O aor Break 8 points A total of 8 events comprised of break events trace events and time measurement events in combination can be ee E Real same Trace 8M IsMeycles eee 1K bytes 16bytes x 64blocks area Time Measurement Go to Stop 3 points interval REJ10J1680 0100 Rev 1 00 July 1 2008 Page 7 tENESAS R32C 100 E30A Emulator Debugger Chapter 3 Before starting the debugger 3 Before starting the debugger 3 1 Communication method by emulator The supported communication method is as follows e USB 3 1 1 USB Interface e Compliant with USB Standard 2 0 e Connections via USB hub are not supported e The necessary cable is included with the emula
63. 7 3 Command Button AEAEE EEEE EEA E ETE AE EIEE T 103 7 7 4 Set the Measurement Condition cccccceccssccesssececseeececssececesaeeecsesaeeecseeeeessseeeeseaaees 104 7 7 5 Reference the time measurement results ccccceceessecesseseeceessececseaeeecseeeeeessaeeeesnaaes 105 1 8 Trace WAT DOW ocvec css ccves cB oti cstcedes ritn Gece ccucdeeeetueandecoecobentecectcdceddebenedecetdeccecebepeesecbeecesceteevedevecdede 106 7 8 1 Configuration of Bus Mode ccccccccccccsessscesececsesessecececcceesesssseceeecsesesssaeceeeceesenssasaeeeeeees 106 7 8 2 Configuration of Disassemble Mode ccccccccssssssccececsesesececececeeseseceeececsessstseeeeeeeeenes 108 7 8 3 Configuration of Data Access Mode cccccccsssssssseeececsessaeceeececeessaeeececeesensaeseeeeeeeenes 109 7 8 4 Configuration of Source Mode cccccessssccccecsesensececececeesesssceceeeccesesssaeceeececsensasaeeeeeees 110 TSO HXteNnded MenUSis 6265 cel a Sede ae ae A AER TIL 7 8 6 Display of bus information on the R82C Debugger ccccccccccccessesssseceeeceesessceeeeeeeenes 112 TI GULIO Ward ow anean N cede A N 0 TIA E E E E E se RN 113 T9 Extended MENUS nenen EA e AR EAEE EE EER E ENN Ee ETO SENERE 114 EKO A E Eaa A Yo OW amp ATE A AE S E E E EAE A T T A E T ETE 115 AIOT Extended Menus wii a E EEA AAE RENEA ease eae 116 T402 Display the Task Status a a Gobet AE eaves 117 7 10 3 Display the Ready Queue Status ccccccccccccssssssscecccec
64. 8 events comprised of break events trace events and time measurement events in combination can be specified Instruction execution allows you to specify the function name For the address designation method memory access allow the range designation in addition to the normal one address designation Moreover memory access allows you to specify the comparison data to read write data related to the specified address in the same manner as when setting the breakpoint It also allows mask designation to the comparison data Note however that comparison data can be specified for only one event You cannot specify an address range Specified hardware break events can be used in one of the following combinations e Break when any one of the specified break points is effected Or e Events occur in a specified order Sequential REJ10J1680 0100 Rev 1 00 July 1 2008 Page 4 tENESAS R32C 100 E30A Emulator Debugger Chapter 1 Features 1 3 Real Time Trace Function This function records a target program execution history Up to 8M cycles of execution history can be recorded This record allows inspecting the bus information executed instructions and source program execution path for each cycle The real time trace function records the execution history of the target program The execution history is referred to in the tracing window The execution history can be referred to in the following mode e BUS mode This mode allows you to inspect
65. 9 7CENESAS R32C 100 E30A Emulator Debugger Chapter 8 Table of Script Commands 8 1 3 Register Operation Commands Command Name Short Name Contents Register R Checks and sets a register value 8 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 Moves memory blocks MoveLord MOVEL Moves memory blocks in 4 byte units MoveWord MOVEW Moves memory blocks in 2 byte units 8 1 5 Assemble Disassemble Commands 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
66. Alarm handler is in an operational state TALM_STP Alarm handler is in a non operational state REJ10J1680 0100 Rev 1 00 July 1 2008 Page 134 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 11 Display the Memory Pool Status In the MR window select Popup Menu Model gt Memory Pool ERRETENA FENIE ID BaseAddr Blk size Total Blk cnt Free Blk cnt map F 1 00078582H 80 4 2 F 2 OOO8F2H 10 10 9 F 3 000956H 30 16 15 1111111111111110 1 1 001856H 24 1 1 2 000000H 56 D 1 3 000000H 120 0 1 4 001496H 248 6 7 10 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 a l 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
67. Cause of last break Item Status Connected to Mi6c R amp C PC7501 Emulator CPU Mi6c Run Status Ready Cause of last break S W break Run time count 00 h OO m OO sec 001 msec 991 usec Ey Memory Platform Events Please refer to 11 Display the Cause of the Program Stoppage about the notation of a break factor REJ10J1680 0100 Rev 1 00 July 1 2008 Page 46 RENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 6 Step6 Reviewing Breakpoints The user can see all the breakpoints set in the program in the Breakpoints dialog box 6 2 6 1 Reviewing Breakpoints Push the key Ctrl B and the Breakpoints dialog box will be displayed Miltutorial ch Line 40 Remove This window allows the user to delete enable or disable breakpoints REJ10J1680 0100 Rev 1 00 July 1 2008 Page 47 RENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 7 Step7 Viewing Register The user can see all registers flags value in the Register window 6 2 7 1 Viewing Register Select Registers from the CPU submenu of the View menu The Register window is displayed The figure below shows a Register window of the debugger for M16C R8C 0 BANK Register x Value 0024 OFroo 0000 0000 O6E6 0000 0718 o6c2 O0a20 OFOZ 6F 0400 INTB OFFDOO tooooidil 6 2 7 2 Setting the Register Value You can change a register flag value from this window Double click the regist
68. Current Assigned Area Start Area iS Add 000810 2 000810 00082F 001000 00102 Remove 001400 2 001400 0014F Remove All View 57 blocks 912 bytes are available lt 1 block 16 bytes gt JV Event E5 is assinged to RAM monitor Save Load Close Use this window to add delete or change RAM monitor areas e Specify a RAM monitor area by its start address and size the latter by a number of blocks e 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 e Specify the size of the RAM monitor area by a number of blocks For the E30A one block is 16 bytes in size Up to 64 blocks can be specified e RAM monitor areas can be added until the total number of blocks used reaches 64 The number of blocks and the size that are currently available to use are displayed below the list REJ10J1680 0100 Rev 1 00 July 1 2008 Page 64 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 1 2 1 Changing the RAM Monitor Area The start address and the size of the RAM monitor area can be changed e Changing from a dialog box Select the RAM monitor area you want to change from a list of RAM monitor areas and double click on it The Set RRAM Area dialog box shown below will appear Specify the start address and the size by a number of blocks
69. E1 gt EO Sau Ey 2 a a E e gt e gt heo The Sequential condition can be specified for two to eight events You also can specify multiple Sequential conditions in pairs If the Sequential condition is specified for the event En that event and the event En 1 are specified to be Sequential The Sequential condition can be specified in order of events En En 1 En 2 and so on For example the Sequential condition can be specified for events E2 gt E1 gt EO but cannot be specified in order of EO gt E1 gt E2 or in order of E3 gt EO etc REJ10J1680 0100 Rev 1 00 July 1 2008 Page 80 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 4 Setting the RAM monitor event To set the RAM monitor event select the below check box gt Event E5 JV Assing to RAM monitor The RAM monitor event is set to the event E5 Please note that the RAM monitor function doesn t operate when the RAM monitor event is not set ATTENTION e Only when RAM monitor mode is selected in the Debugging Mode tab of the Init dialog RAM monitor function can be used 7 6 5 Select the Trace Range A trace range can be selected for the trace event concerned A trace measurement of up to 8M cycles can be recorded Trace Area BREAK Trace Area Content Stores the 8M cycles to the point at which the target program stops Break Before Stores the 8M cycles to the point at which the trac
70. EEan A A e aena 157 10 2 2 Basic Types eneren iiri aa EE ca su EEEE EE OE eS EEFE SEERE E Sdvvsesteseveesteeetetees 157 102 3 Pointer Types iiss es 5 sects ess eae eee eek eee Sees ad ne Se Geek I es a E e EEEE R 158 10 24 Array Ty Pes ne ee iE E cote eke ce Cad osbde Fos lee Lae bs PEN ED la ta Cob A AE ios Ht Cai 159 102 5 Function VY PSS se24 Gs blevescde se oaa N a ara EAEE ARSAN EROA ENL Ean es 159 10 26 Refer nce Py pes ranno e A LEE E EOR N E E R a 159 10 227 Bit Field Py p Os icceesexs ox sec seseseyaesiee de chic ec se veb A ES E IEEE E E E ER 159 10 2 8 When No C Symbol is Found cccccccccccccessessscecececeesensscecececeesesssseceeeceesesssaeeeeeeseseneas 160 102 9 Syntax Errors sie e loess a anre a a a cose ae s ah cds avahbeeeasotsudsvane decueacheesepertvasasaatons 160 10 2 10 Structure and Union Types cccccccccccccceessssscecceecsesenseceeceeesenesseseeeecceeeesnsaeeeeceeeseneea 160 Display the Cause of the Program Stoppage 161 Attention 162 12 1 Common Attention i sicccecies ieee ch cates E ERE E EEE E EE R a TERE aves deeds 162 12 1 1 File operation on WindOWS cccccesssssesseesesesseseseseseseseseseaeseaeaeaeaeaeaeaeaeaeseaeaeaeaeaeaeaeaes 162 12 1 2 Area where software breakpoint can be Set ccccccccccscssssecececeesesssceceeececsesssaeeeeeeeceenees 162 12 13 Getior set Cvarlabless i ncechncian heidi inde TE eens 163 12 1 4 Function name in C ccle csehetsencd cies bie ces E eed held beste sieved
71. Jf rand change a p_sam gt sl al1 posam gt s2 a 2 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 54 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 11 Step11 Forced Breaking of Program Executions This debugger can force a break in the execution of a program 6 2 11 1 Forced Breaking of Program Executions Cancel all breaks at 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 55 RENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 12 Step12 Displaying Local Variables The user can display local variables in a function using the C Watch window 6 2 12 1 Displaying Local Variables For example we will examine the local variables in the tutorial function which declares three local variables i j and p_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 th
72. Linker c cccccccccesssccceesseeeceeeceeecssececessaeeeeneeeeens 165 12 3 Option of C Compiler Assembler Linker 0 ccccccccccceceesessscecececeesessececececeesesseaeeeeeeeesentsaeees 166 12 3 When Using NOXE ionnta iee a abba ov Bei ol ives dee ota ca bol Shade bee ie E a iS 166 12 3 2 When Using the IAR EC Compiler EW cccccccccccsscscssessescssesessessescsseseescsseseeseseess 166 12 3 3 When Using the TAR C Compiler EW c ccccccscssessescssessescssessescssessescsseseescssesseeesseas 12 3 4 When Using the ITAR C Compiler ICC o ccccccccccccsesscscssessescsseseescssessescsseseescsseseesenaens Blank Page vi Setup of Debugger Blank Page R32C 100 E30A Emulator Debugger Chapter 1 Features 1 Features 1 1 RAM Monitor Function This debugger supports the real time RAM monitor function which allows you to reference the memory data during execution of the target program The memory contents being displayed can be periodically updated However the real time capability of program execution is lost To operate the RAM monitor function set as follows e Set the RAM monitor event to the event E5 in the Event Setting window or the RAM monitor area setup window e Select the menu RAM Monitor gt Enable RAM Monitor of each window which supports the RAM monitor function Specify the memory data acquisition interval time during executing the target program in the Emulator tab of the Init dia
73. REJ10J1680 0100 Everywhere you imagine g e NI ESAS R32C 100 E30A Emulator Debugger V 1 00 User s Manual Renesas Microcomputer Development Environment System Rev 1 00 July 1 2008 Renesas Technology www renesas com 10 11 12 13 Notes regarding these materials This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document including but not limited to product data diagrams charts programs algorithms and application circuit examples You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use When exporting the products or technology described herein you should follow the applicable export control laws and regulations and procedures required by such laws and regulations All information included in this document such as produ
74. U while executing the target program Do not communicate with MOU while target is executing Select the above check box when not communicating with MCU The communication fault occurs if it communicates with MCU while executing the WAIT STOP instruction In this case please set not to communicate with MCU REJ10J1680 0100 Rev 1 00 July 1 2008 Page 29 RENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 4 Script Tab The specified content becomes effective when the next being start Rr 5 1 4 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 Ra 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 string displayed in the Init File field REJ10J1680 0100 Rev 1 00 July 1 2008 Page 30 CENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 5 Debugging Mode Tab Mode Trace v m Download to Flash ROM Area I Enable Verification Writer Mode File Name IV Enable Verification and Checksum 5 1 5 1 Selecting of the Debugging Mode Select the debugging mode of the emulator debugger Mode Trace z e The trace mode is the mode to use the trace function
75. a AFTER Start Address 4010 7 End Address Access WRITE he Access dv Pickup Trace Access WRITE x Range addr Address Address1 4100 7 Bl Addiess2 fret 1 To set a data write to the addresses 4110h and 4120h open the Set Event Status dialog box again and change the address in the Address1 text box shown above to register it as addition ATTENTION In Before and After modes the debugger records the trace events that have occurred within the trace range as well as the trace start events that occurred during that time Note that no trace end events are recorded The condition branch trace might take time to display the disassemble mode and the source mode of the trace window When the MCU execution priority mode is selected in the trace mode the trace range is 512 cycles Please select the Trace priority mode in the trace mode when the trace range is 8M cycles The Trace priority mode gives priority to the trace data output and the MCU execution is delayed This mode requires a program processing time more than in MCU execution priority mode When the condition branch trace the trace mode is the Trace priority mode Only when Trace mode is selected in the Debugging Mode tab of the Init dialog Trace function can be used REJ10J1680 0100 Rev 1 00 July 1 2008 Page 98 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 13 Specify the Time Measure
76. 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 Watch Local File Local Global Name Value Address Scope signed long 10 a 000414 Auto The user can click mark at the left side of array a in the C Watch window to watch all the elements Watch Local File Local Global Name value _ Address Scope signed long 10 a 000414 Auto signed long a 0 16838 000414 signed long a 1 5758 000418 signed long a 2 10113 0004ic signed long a 3 17515 000420 signed long a 4 31051 000424 signed long a 5 5627 000428 signed long a 6 23010 00042c signed long a 7 7419 000430 signed long a 8 16212 000434 signed long a 9 4086 000438 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 50 CENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 displayed Enter variable i Add new watch point xj ooo Cancel Click the OK button The C Watch windo
77. 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 71 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 4 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Script Open Open script file Run Run script file Step One step execution of script 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
78. aced 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 156 tENESAS R32C 100 E30A Emulator Debugger Chapter 10 C C Expressions 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 the 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 65280 when Radix is in initial state unsigned int i 0xFF00 when Radix is hex unsigned int i 1111111100000000B when Radix is binary When the result of calculation is a char type it is displayed as follows unsigned char c J when Radix is in initial state unsi
79. against the load module file size 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 Inthe 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 26 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 2 3 Specify whether to display the instruction format specifier Specify whether to display the instruction format specifier in the disassembled display v Display the instruction format specifier in disassembly Select the above check box when you display the instruction format specifier This specification can only be set or changed when you start the debugger 5 1 2 4 To treat size of enumeration type as 1 byte You can specify whether your debugger treat all sizes of enumeration types whose size is unknown in the debugging information as 1 byte For reducing memory consumption NC30 NC308 and NC100 have an option to treat the sizes of enumerator types as 1 byte and not as same size of int Note that NC30 NC308 and NC1
80. age execution time and measurement count at any measurement point The execution time of up to 3 measurement points can be measured simultaneously You can specify the event for the measurement condition in the same manner as when specifying events in the Event Setting Window Event setting area Measurement result clear buttons E Time Measurement EVENT ADDRESS ACTION ACCESS RANGE 00000000 BREAK EXECUTION addr 00000000 00000000 BREAK EXECUTION addr 00000000 00000000 BREAK EXECUTION addr 00000000 00000000 BREAK EXECUTION addr 00000000 00000000 BREAK EXECUTION addr 00000000 00000000 BREAK EXECUTION addr 00000000 OMPI NotUse r Clear Resut COMP2 NotUse ALL mp1 mp2 COMP3 NotUse majes J Measurement result display area Measurement condition setting area e If the contents of events are altered they are marked by an asterisk on the title bar The asterisks are not displayed after setting up the emulator ATTENTION e The Event Setting Window and the Time Measure Windows use the same resource of the emulator If the event settings are modified in Time Measure Window settings of the Event Setting Window are modified too REJ10J1680 0100 Rev 1 00 July 1 2008 Page 102 CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 7 1 Specify the Time Measurement Event The events listed below can be specified as measurement events e Memory Access To s
81. am is stoped by the debug function the cause of the stoppage is displayed in the Output window or Status window Platform sheet The contents of a display and the meaning of the cause of the stoppage are as follows The cause of the stoppage The stop by the Halt Program button menu es eee break software break or Instruction Execution break event break Event Data Access Memory Access break event break REJ10J1680 0100 Rev 1 00 July 1 2008 Page 161 tENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 Attention 12 1 Common Attention 12 1 1 File operation on Windows 1 File Name and Directory Name Operation is not guaranteed if your directory names and filenames include kanji Use only one period in a filename 2 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 The area where the software breakpoint can be set is different according to the product 12 1 2 1 The debugger for R32C Software breakpoints can be set in the MCU s internal RAM area MCU s internal flash ROM area and the RAM area in the user target ATTENTION e Ifa breakpoint in the MCU s internal flash ROM area is specified it is necessary that instructions be rewritten or written back in block units Therefore no software breakpoints can be set while the target
82. ariable name gt member name Example class T public int member 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 variable_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 Ofthe 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 155 tENESAS R32C 100 E30A Emulator Debugger Chapter 10 C C Expressions 10 1
83. bination 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 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 7 6 Event Setting Window With default settings the trace information immediately before the program has stopped is recorded 7 8 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 6543210 m s ms 11111111 00 00 00 11111111 00 00 00 11111111 00 00 o0 11111111 00 00 00 11111111 00 00 00 11111111 00 00 00 11111111 00 00 o0 11111111 c00 00 o0 11111111 00 00 00 11111111 00 00 00 05 00042 Oroipc _Func_Exe OFO1DE oo042 0007E8 OOO7EA OOO7EA 0F0083 0F0084 0OF0086 a Q 3 4 ywpPawminwmenn win i gt w ewww BN Old mooroco0cvc0oo oF REJ10J1680 0100 Rev 1 00 July 1 2008 Page 106 tENESAS R32C 100 E30A Emulator Debugger 1 Cycl
84. bout the method to create a new workspace Refer to 4 2 1 Creating a New Workspace Toolchain Used Refer to 4 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 11 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 2 1 Creating a New Workspace Toolchain Used 4 2 1 1 Step1 Creation of 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 Workspace Name J Empty Application Sample01 t5 Import Makefile Project Name Library Sampled Directory D work HEW4 Samples M16C Sample01 Browse GPU family es z Tool chain Renesas M160 Standard Properties oeer 1 Select the tar
85. bytes from the beginning of the MCU s internal RAM address 0400h are used 12 2 4 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 Refer to 12 3 Option of C Compiler Assembler Linker The compiler that can be used by R32C debugger e NCxx e the IAR EC Compiler e the IAR C Compiler REJ10J1680 0100 Rev 1 00 July 1 2008 Page 165 RENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 3 Option of C Compiler Assembler Linker We do not evaluate other settings so we can not recommend to append other options 12 3 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 3 2 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 Output Tab In the Format area check the Other option and select the elf dwarf as Output Format Include Tab In the XCL File Na
86. cation 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 10 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 We lc ome welcome Cancel C Open a recent project workspace Administration C Browse to another project workspace w Oh amp In this dialog box A 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 workspace or Browse to another project workspace radio button and select the workspace file hws Please refer to the following a
87. ccccccssssccccecsesessececcceceesesssceeceecsesesssseeeesesesenseaeeeeees 145 9 1 1 Script Command ieee eck iio eL KEEN EE a e hase A EE E R Nea 146 91 2 Assign State meN Te a aa ra a a E E N a a Naia 146 9 1 3 Conditional StateMentiraconecpn inie EEE RE R E aa 146 9 1 4 Loop Statement while endw and Break Statement 0 ccccccccccccccsescscsseescsessesecsessesees 147 9 1 5 Comment statements seirer iere eir eriein R eE EE RE EE EEEo pR ares Ee poriro eater iia 147 9 2 Writing ExXpressi nS ceedesesesnadecuescsescceacgveeedeseucdeacsdeceedeeee A a Te a e iare aae ora NEER 148 9 2 1 Constants sieu Ea a EE R EA aie R EAE A E EN E ai 148 9 2 2 Sy bole ad labels a a Re a ee i 149 9 23 Macro Variables ivciicstesiessntec es E aE ten Rl te igs ace la he Pen ecb AEK 150 9 2 A Register variables ea aesg dea vacssees eoenbeatadeh A ara edb eeSe Sea he ved ese leita eecvesas cues 150 9 2 5 Memory Variables vc siscccidsscccccesee dete EO cc ceseuee EE CEEE SEEE E EE 150 DP OTe N n NOS snte eann ekice as eves ene tached meta hee eee eat EE ata ee eaaea nhs 151 9 2 7 Character constants ecer ie ERE E KEE EEEE RT Ee ER ia Eia 151 92 8 Operators OEEO EEE E S AE E E S AE I BA R A EE S 151 10 11 12 C C Expressions 152 10 1 Writing C C Expressions ts scccsceicci cea letedendecveecvesvevdedeceesesvelevededcessuscevsveccsdceseseseedeteleaceesteses 152 10 10 Immediate Values ss wise censeuine dora ten vena elu wie cet aces 152 10 1 2
88. 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 i 0 while 1 for i 0 i lt DATALSIZE i datali data litl data lit2 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 75 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 Event Setting Window The Event Setting window is used to set break events trace events time measurement events and RAM monitor event Selecting the effective events Current event list Setting modification flag W Event Setting Pe loi xs ACCESS _ EXECUTION EXECUTION EXECUTION EXECUTION EXECUTION EXECUTION poort o Assing to RAM morior Trace Mode Trace Execution Ki
89. ct data diagrams charts programs algorithms and application circuit examples is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas products listed in this document please confirm the latest product information with a Renesas sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website http www renesas com Renesas has used reasonable care in compiling the information included in this document but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document When using or otherwise relying on the information in this document you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application Renesas makes no representations warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products With the exception of products specified by Renesas as suitable for automobile applications Renesas products are not designed manufactured or tested for applications or otherwise in systems the failure or malfun
90. ction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems or equipment or systems for transportation and traffic healthcare combustion control aerospace and aeronautics nuclear power or undersea communication transmission If you are considering the use of our products for such purposes please contact a Renesas sales office beforehand Renesas shall have no liability for damages arising out of the uses set forth above Notwithstanding the preceding paragraph you should not use Renesas products for the purposes listed below 1 artificial life support devices or systems 2 surgical implantations 3 healthcare intervention e g excision administration of medication etc 4 any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp its affiliated companies and their officers directors and employees against any and all damages arising out of such applications You should use the products described herein within the range specified by Renesas especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and oth
91. cycle by cycle bus information The display content depends on the MCU and emulator 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 The 8M cycles execution history can be referred to with this debugger The trace area of the following 4 mode is being supported e Break 8M cycles before target program stops e Before 8M cycles before trace point e After 8M cycles after trace point e Ful Until 8M cycles are written in the trace memory Start Trace Event Stop Event To perform a trace measurement you need to set a trace range and a trace event By default Break is set for the trace range and an event for measuring jump address information in the entire address range is set as the trace event REJ10J1680 0100 Rev 1 00 July 1 2008 Page 5 tENESAS R32C 100 E30A Emulator Debugger Chapter 1 Features 1 3 2 Trace Condition Setti
92. ddress1 M Address1 change gt El Address2 00000000 gt Access JEXECUTE x Iv Function Source File feart c Function change E r Data Compare V Not Use Data _foo000000 Mask 00000000 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 88 CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 11 Specify the Event Combination Condition Break events can be used in one of the following combinations A total of 8 events comprised of break events trace events and time measurement events in combination can be specified e One of the specified events is established OR condition e Events occur in a specified order Sequential condition 7 6 11 1 Select OR Check turn on an event in the event specification area that you want to use m Event Stai geo gE or oe oe 7 6 11 2 Select Sequential Use the Seaquential button Sequential Break Setting Sequential Click on the button between the events for which you want to specify the Sequential condition Transition between the events will be shown by an arrow The Sequential condition can only be specified for the events that have been set as break events However if the event E5 is used to set a data comparison break event you cannot specify Sequential for the event E5 The Sequential condition can be specified for two to eight events You also can specify multiple Sequential conditions in pairs
93. ding waiting state for an extended data queue with time out suspended WAI VRDTQ Receiving waiting state for an extended data queue WAI VRDTQ SUS Receiving waiting state for an extended data queue suspended WAI VRDTQ TMO Receiving waiting state for an extended data queue with time out WAI VRDTQ TMO SUS Receiving waiting state for an extended data queue with time out suspended WAI MPF Waiting state for a fixed sized memory block WAI MPF SUS Waiting state for a fixed sized memory block suspended WAI MPF TMO Waiting state for a fixed sized memory block with time out WAI MPF TMO SUS Waiting state for a fixed sized memory block with time out suspended REJ10J1680 0100 Rev 1 00 July 1 2008 Page 120 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs e 2 Display 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 7 10 3 Display the Ready Queue Status In the MR window select Popup Menu Mode gt Ready Queue MR mi Or AmdeGHMO lt GHEE Current Run Task 1 main Number of Priority 100 Pri RdyQ 1 _main 2 _task2 15 _task15 16 _task16 17 _task17 18 _task18 The following data is displayed in the status bar
94. disassemble source line or data access information in combination In this case the display will be similar to the one shown below First line time First line time Shows the time information of the first line displayed Chapter 7 Windows Dialogs Bf aa vas Evy Dataiccess h m s ms Label Address Data BUS BIU R W RUT CPU ON B T 0 T 76543210 GLOBAL C 52 for j 03 j lt S5 444 0F0107 CHP U 5H 4H FB 32389 0007E2 0000 16h DW W mr YX r 323868 0007E2 0000 16b DW R 0 RB 0 1 f 32387 OFO10A CA7D 16h IW R 0 2 1 i 14411111 OF010C 7318 R 0 4 ki 1 11111111 11111111 0007E2 0000 W 11111111 OOO7E2 0000 R 00 00 00 053 587 00 00 00 053 588 00 00 00 053 588 00 00 00 053 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 107 tENESAS R32C 100 E30A Emulator Debugger 7 8 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 Vv f Aly ay 00000 Ares File Cycle le 18960 8960 Address 0F0199 Time 00 00 00 054 427 Mnemonic 0F0199 0F019C OFO19F OFO161 OFO166 OFO1A1 OFOO87 OFOOS8E OF0091 OFOBD4 OFOBDS an C91BFD FEC1 778BFDOA00 7DCA39 7DF2 FS0600 7CF204 FDD40B0F 7SCO6D4E 75C2C641 _randam_ access _rand Chapter 7 Windows Dialogs loj x
95. 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 s REJ10J1680 0100 Rev 1 00 July 1 2008 Page 123 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 5 Display the Event Flag Status In the MR window select Popup Menu Mode gt Event Flag mi Or fANOSEO lt 0OE8 flg ptn flago 0000H 8 _task8 0000H 0000H 9 _task9 s 0000H 0000H 0000H 0000H 7 10 5 1 Display the Event Flag Status When the realtime OS is MRxx conformed to uITRON
96. e Line Nos e Character constants e Operators 9 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 148 tENESAS R32C 100 E30A Emulator Debugger Chapter 9 Writing Script Files 9 2 2 Symbols and labels You can include symbols 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 Th
97. e contents of the Local tab will also change e File Local tab All the file local variables of the file 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 LIM i x Watch Local File Local Global Name Address Signed int i 000462 signed long j 00054 struct Sample p_sam OOOASE Double click the mark at the left side of pointer p_sam in the Locals window to display the structure p_sam When the user refers to the members of the structure at the end of the Tutorial function it is clarified that random data is sorted in descending order REJ10J1680 0100 Rev 1 00 July 1 2008 Page 56 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 6 2 13 1 Reference the function call status Double click the S W Breakpoints column in the sort function and set a software breakpoint aes ta long t3 int i j k gap gap 5 while gap gt 0 Df for k 0 k lt gap k for i ktgap i lt 10 i itgap
98. e debugger for M32R e You cannot include the assembler structured The debugger for R32C instructions pseudo instructions macro instructions The debugger for M32C operation code or reserved words SECTION BYTE The debugger for M16C R8C switch if etc e You cannot use strings that start with two periods for symbols or labels 9 2 2 1 Local label symbol and scope 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 measured 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 9 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 e Conversion of address values Local labels Global labels Local symbols Global symbols Local labels outside scope Local symbols outside scope Oo rwnr e Conversion of data values
99. e dialog box Set Array Size Please set array area Start a 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 159 tENESAS R32C 100 E30A Emulator Debugger Chapter 10 C 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 Rad
100. e display area Shows trace cycles Double click here to bring up a dialog box to change the displayed cycle 2 Label display area Shows labels corresponding to address bus information Double click here to bring up a dialog box to search for addresses 3 Bus information display area The content displayed here differs depending on the MCU or simulator system used Refer to 7 8 6 Display of bus information on the R32C Debugger 4 Time information display area Shows time information of trace measurement result One of the following three modes can be selected from the menu Not supported 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 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 CANN 10 Window splitting box Double clicking this box splits the window into parts In addition to bus information the window can display
101. e point is passed After Stores the 8M cycles of trace data after the trace point Fu Stores the 8M cycles of trace data after the trace starts ATTENTION e Only when Trace mode is selected in the Debugging Mode tab of the Init dialog Trace function can be used REJ10J1680 0100 Rev 1 00 July 1 2008 Page 81 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 6 Select the Trace Mode The trace mode can be selected Trace Mode Trace Execution v Kind of Trace Branch Data Mode Content Trace priority The Trace priority mode gives priority to the trace data output and the MCU execution is delayed MCU execution priority The MCU execution priority mode gives priority to the MCU execution and the trace range is 512 cycles The kind of trace data to record is displayed in the trace kind column Kind Content Branch Data Branch trace Data trace Branch Compression Condition branch trace ATTENTION e Only when Trace mode is selected in the Debugging Mode tab of the Init dialog Trace function can be used 7 6 7 Setting the execution time measurement The trace mode can be selected m Execution Time Measure IV Do Measure The Execution time measurement event is set to the event EO and the event E4 Please note that the execution time measurement function doesn t operate when the Execution time measurement event is not set ATTENTION e Only wh
102. e 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 You cannot include comments on the same lines as script commands You can nest script files up to five levels You can nest if statements and while statements up to 32 levels If statements must be paired with endi statements and while statements with endw statements in each script file Expressions included in script files are evaluated as unsigned types Therefore operation cannot be guaranteed if you use negative values for comparison in if or while statements You can specify up to 4096 characters per line An error occurs if a line exceeds this number of characters 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 145 7CENESAS R32C 100 E30A Emulator Debugge
103. e this column deselect the H W Breakpoints check box in the dialog box opened by choosing the main menu Edit gt Define Column Format The H W Breakpoints column is erased from all Editor Source windows And select popup menu Columns gt H W Breakpoints in the Editor Source window A column can be set up for each Editor Source windows REJ10J1680 0100 Rev 1 00 July 1 2008 Page 84 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 10 Specify the Break Events To specify an break event select Break on the Event Type of the Event Select dialog box Following events can be set for an break event Instruction Execution To specify an instruction execution event select the EXECUTION in the ACCESS area of the event The event is established immediately before executing the instruction at a specified address Memory Access To specify a memory access event select the READ or WRITE or R W in the ACCESS area of the event The event is established when memory is accessed at the specified address or under conditions set for the specified address range When specifying a break event for memory access you can specify the data to be compared with the data written read to or from a specified address You also can specify mask bits for the comparison data 7 6 10 1 Instruction Execution of Specified Address Specify the following Example Instruction execution at address F81000h Set Event
104. e user defined clock or the internal clock be sure to enter the frequency to be used in the frequency input text box By default no values are set e The user defined clock in the debugger can be input in the range 1 0000 MHz to 99 9999 MHz in 0 0001 MHz increments e The value in the frequency input text box can only be set or altered at debugger startup e The debugger cannot be started unless any value is set in the frequency input text box 5 1 3 2 Setting of PLL circuit Enter the frequency of the internal PLL of the target MCU Enter the value of the internal clock control register of the target MCU PL le 128 0000 MHz CGR Ox IF REJ10J1680 0100 Rev 1 00 July 1 2008 Page 28 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 3 3 Specifying Memory Data Acquisition Intervals during Target Program Execution While the target program is running specify a memory data acquisition interval in ms units at which intervals you want memory data to be acquired one byte or word at a time by the RAM monitor function The default interval time is 5 ms The interval time specified here differs from the display update interval sampling period that you set in each window that supports the RAM monitor Data acquisition interval in MCU running state 10 ms f ms 5 1 3 4 Choosing to communicate or not to communicate with MCU while executing target program Please specify whether to communicate with MC
105. ecommended REJ10J1680 0100 Rev 1 00 July 1 2008 Page 167 RENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 3 4 When Using the IAR C Compiler ICC 12 3 4 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 R32C ylmb 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 3 4 2 Command Execution Examples The following shows examples of entering commands depending on the product e The debugger for M32C gt ICCR32C r filel c lt Enter gt gt ICCR32C r file2 c lt Enter gt gt XLINK o filename 695 f Inkr32c xcl filel file2 lt Enter gt The XCL file name varies depending on the product and memory model For details see the ICCxxxx manual REJ10J1680 0100 Rev 1 00 July 1 2008 Page 168 tENESAS R32C 100 E30A Emulator Debugger V 1 00 User s Manual Publication Date July 1 2008 Rev 1 00 l Sales Strategic Planning Div Pupigned Bys Renesas Technology Corp M
106. ed e The background color by the access attribute cannot be changed REJ10J1680 0100 Rev 1 00 July 1 2008 Page 66 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 2 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Page 67 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 REJ10J1680 0100 Rev 1 00 July 1 2008 7CENESAS R32C 100 E30A Emulator Debugger 7 3 C Watch Window Chapter 7 Windows Dialogs 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 t
107. edeseccvcscevats KRE E EEN N T E e EE E IE aai 22 433 1 Connecting the Emulator rancon ioan a E N ae av tea Cate ATEI 22 4 3 2 Ending the Emulators soin eseat cotecccuceteeccecctedccdcetcecceccteecedcctcecceccececcdccteccceccesecevs 22 5 Setup the Debugger 23 Ean A DAE Ca ser RES SES EEEE E EAA EEA EE AAEE 23 Bed Ls KO DA RE o POE PEE E EAA AEE E EE E E EEE 24 5 1 2 Debugging Information Fabeae eene e e nE E N EEEE 26 AA R Hm ula por Va bx vv E AEE E E A A A A AE EE 28 1 NZ el 1h SAE Bes 1 o TSE A AE E E E N E EAE E EE A EEE EEEE E E E 30 5 1 5 Debugging Mode Tab ccccccccccccccecececeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 31 5 2 Setting of the Communication Interface c cccccccccessscecececeesensececeecceceessaaeeeeccecsenssaeeeeeeeeeenes 33 5 2 1 Setting of the USB Interface oo cccccccssscccccecsessaeceeececsessaaeceeececeesssaeeeeececeenessseeeeeeeenes 33 5 3 Setup the Debugger for RB2C cccssccccccecesssnscnccececsessnsaccecececsessaaececececsensnaeaecececsensasaaeeececeses 34 5 821 Hie ms Dialog asi fos dosccdecicss vada ctca cost tacsbia AEREE a EE a AEE EAEE E EAE s aies 34 Tutorial 6 Tutorial 39 G1 Wales goo hu Lee 0 ee a merce rT prrreteccerrer rr heer ecrc rrr ree rent cer rrer E EA N EEPE REEERE 39 60 2 Usal RR en ee 40 6 2 1 Step Starting the Debugger ccccccssssscccccecsesssssceeececsesssssceeccecsesesssseeeeecsenenseaeeeeees 40 6 2 2 Step2
108. ee oni easa nee dae tees 58 Reference 59 7 Windows Dialogs 61 7 1 RAM Monitor Window s sece ciosees nk execs ik Mia es Sie a a e E e 62 Pel Ly Wxtended Mens vs EE EAE T E N E 63 7 1 2 Setting the RAM monitor area ccccscccccccccecssssaccecececsensnaecececscsessaeeeccescsensaeaeeeeeceenes 64 7 2 ASM Watch Window ccccccccsccccssssceceessececseaeeecsesaececsneeecsesaeeecsesaeeecsaeeecsesaeeecsesueeessseeenssaeenesaes 66 721 Extended Menus s 05 a a a Honads Hed enase des dewth E e E cebdeate dls dnote Stee 67 Ted GC Watch Win dOW EPEA AE EET EEA Becasecti Miecdctecdccesddie Gh as becsccctict elas EE 68 Wel Extended Men Siris enine e E E E sue ceiustvewrdeeeestebistasbestoets 70 TA Seript WIndows ee a a E E a E a a i 71 TAL Mxtended Menus e aa a a E Eea E a r E e E Saa h EEEE oaas 72 7 5 S W Break Point Setting Window ccccccccccsssesseceeececeesssececececsenssssceeecseseneaseeeeeceesessaaeeeeeeeees 73 Tot Command Button occ diese hiss cose ieee E E rei oa esa be eee 74 7 5 2 Setting and Deleting a Break Points from Editor Source Window cccccscsseseseseees 75 7 6 Event Setting WIndows 2 face EEE E EAEE E EE E E lessence dus dvsdeducuuob tees dnswededduadscesdvsveduedhessus duce 7 6 1 Specify the Event 7 6 2 Select the action condition by which an event is assumed to have occurred 79 7 6 3 Select the Combinatorial Condition sssssseesesseseesseressseressstessereessesssssersssrres
109. en Time measurement mode is selected in the Debugging Mode tab of the Init dialog Execution time measurement function can be used REJ10J1680 0100 Rev 1 00 July 1 2008 Page 82 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 8 Command Button The buttons at the bottom of the Event Setting window have the following meanings Button Name Content Color Change the display color of the event list Reset Discards the contents being displayed in the window and loads contents from the emulator in which they were set REJ10J1680 0100 Rev 1 00 July 1 2008 Page 83 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 9 Setting and Deleting a Break Points from Editor Source Window You can set break points in the Editor Source Window To do so double click the break point setting area H W Breakpoints column for the line in which you want to set the break A blue marker is displayed on the line to which the break point was set zorte while gap gt 0 for k 0 k lt gap kt for i ktgap i lt 10 ititgap for j i gap j gt k j i gap iffali gt alitgap f t alj ali alitgap alitgap t t Double click You can delete the break point by double clicking again in the break point setting area H W Breakpoints column In the Editor Source window a display of H W Breakpoints column is set to Enable by default To eras
110. er 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 If the 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 Ifa task ID number which does not exist is entered in the Task ID field when clicking the View button an error occurs REJ10J1680 0100 Rev 1 00 July 1 2008 Page 137 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 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 used to set the specified context register value of the specified task Set Context Data Task ID 14 Register Ry X Value fizse o 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 138 RENESAS R32C 100 E30A Emulator Debugger Chapter 8 Table of Script Commands 8 TableofScript Commands The following script commands are prepared The commands with yellow color displaying can be
111. er line to be changed The dialog is opened Enter the value to be changed PC Set Value RIES Value Radix Hex Set s Whole Register x ce REJ10J1680 0100 Rev 1 00 July 1 2008 Page 48 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 6 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 Add F 2 x Address _msize 7 Size Word v Radix Hex C Dec C Bin omes Click the OK button The ASM Watch window showing the specified area of memory is displayed e asmwaten T 1 Er Address Bit oo041ic __msize Word Hex 0300 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 49 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 changed 6 2 9 1 Watching Variables For example set a watch on the long type array
112. er product characteristics Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges Although Renesas endeavors to improve the quality and reliability of its products IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Please be sure to implement safety measures to guard against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other applicable measures Among others since the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed the risk of accident such as swallowing by infants and small children is very high You should implement safety measures so that Renesas products may not be easily detached from your products Renesas shall have no liability for damages arising out of such detachment This document may not be reproduced or duplicated in any form in whole or in part without prior written approval from Renesas Please c
113. ered 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 17 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 Taree m for Debugging M16 P4701 Emulator M16 R8C Compact Emulator M16C R8C FoUSB UART M16C RSC PC7501 Emulator 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 Check the box against the target platform And choose other target as required And click the Next button REJ10J1680 0100 Rev 1 00 July 1 2008 Page 18 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 etting the Debugger O Target name M166 R amp C PC 501 Emula
114. es 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 assigned to those expressions When using floating point numbers operation cannot be performed on an expression like 1 0 2 0 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 152 7CENESAS R32C 100 E30A Emulator Debugger Chapter 10 C C Expressions 10 1 2 Scope Resolution The scope resolution operator is available as following Global scope valiable name tix itival 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 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 OxE000 for example 10 1 5 Reference References are indicated by the ampersand amp You can onl
115. esponding to source lines Double click here to bring up a dialog box to search for addresses 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 Source display area Shows the content of the source file File name Shows the file name of the currently displayed source file Referenced cycle Shows the currently referenced cycle Referenced address Shows the address corresponding to the currently referenced cycle Referenced time Shows the time information corresponding to the currently referenced cycle Other display areas are the same as in bus mode REJ10J1680 0100 Rev 1 00 July 1 2008 Page 110 tENESAS R32C 100 E30A Emulator Debugger 7 8 5 Extended Menus Chapter 7 Windows Dialogs 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 star
116. et events double click to the event setting area of the Time Measurement Window This opens an event setting dialog box For details on how to specify an interval time measurement event see 7 6 13 Specify the Time Measurement Events 7 7 2 Time Measurement Condition For the time measurement conditions the following can be specified for each measurement interval Set Mesurement Point MP1 xi m Measurement Point Setting Mode Start El E End j amp 2 Source File Function z _ Measures the time in an interval from where the start event is established till where the end event is established 7 7 8 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 emulator in which they were set Save Saves 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 emulator Close Closes the window REJ10J1680 0100 Rev 1 00 July 1 2008 Page 103 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 7 4 Set the Measurement Condition For the debugger the following measurement conditions can be specified e Measure the execution time between the events Up to three measurement intervals can be specified To
117. 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 e When specifying the optional length memory pool is displayed in the Total Mlk cut field No bit information is displayed in the Free Blk_cnt map field e 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 T Memory block not in use ready ar No memory block REJ10J1680 0100 Rev 1 00 July 1 2008 Page 135 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 11 2 Display the Memory Pool Status When the realtime OS is MRxx conformed to uITRON 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
118. for j i gap j gt k j j gap if alil gt aliteap alj ali a j gap alitgap t else To executes the user program from the reset vector address select Reset Go 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 ic x Kind Name Value F sort 0F4140 F tutorial 0F4276 F main OF421E The upper figure shows that the position of the program counter is currently at the selected line of the sortQ function and that the sort function is called from the tutorialQ function REJ10J1680 0100 Rev 1 00 July 1 2008 Page 57 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 58 RENESAS Reference Blank Page 60 R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 Windows Dialogs The window of this debugger is shown below Window Name View Menu RAM Monitor Window View gt CPU gt
119. formation on the user target The Emem dialog box opens after closing the Init dialog box Emem re xj Flash ROM Clear Ext Port Flash ROM Block 00060000 OOOBOFFF 00061000 00061FFF FFF80000 FFF8FFFF FFF90000 FFFSFFFF FFFAQOOO FFFAFFFF FFFB0000 FFFBFFFF FFFCOOOO FFFCFFFF FFFDOOOO FFFDFFFF FFFEQOOO FFFE7FFF FEFEennn FEEEEEFE pa Select All Clear All E2 Data Flash is not erased on download The selected blocks are over written not erased on download Cancel Help I Do not show this dialog box again Tab Name Contents Flash ROM Clear Specify whether or not to clear the contents of the MCU s internal flash ROM Ext Port Specify whether or not to invalidate reset of the target You can open the Emem dialog using either one of the following methods e After the debugger gets started select Menu Setup gt Emulator gt Target REJ10J1680 0100 Rev 1 00 July 1 2008 Page 34 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 3 1 1 Flash ROM Clear Tab The specified content becomes effective when the next being start Flash ROM Block A 00060000 O0O6OFFF 00061000 00061FFF FFF80000 FFF8FFFF FFFSO000 FFFSFFFF FFFAQOOO FFFAFFFF FFFBOOOO FFFBFFFF FFFCOOOO FFFCFFFF FFFDOOO0 FFFDFFFF
120. get 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 click the OK button REJ10J1680 0100 Rev 1 00 July 1 2008 Page 12 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 2 1 2 Step2 Setting for the Toolchain A wizard for the project creation starts New Project 1 ct Target GPU Toolchain Which GPU do you want to use for this project GPU Series If there is no GPU type to be selected select the GPU Type that a similar to hardware specification or select Other Here the following contents are set e toolchain e the setting for the real time OS when using e the se
121. gned char c 0x4A 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 ams indicates abbreviation REJ10J1680 0100 Rev 1 00 July 1 2008 Page 157 RENESAS R32C 100 E30A Emulator Debugger Chapter 10 C 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 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 Value unsigned char str OxFOOOO 89 struct DATA pData 0x408 struct DATA
122. h memory dump Real time capability is impaired when this function is used The background color by the access attribute cannot be changed About more information for C variables please refer to 12 1 3 Get or set C variables REJ10J1680 0100 Rev 1 00 July 1 2008 Page 69 7CENESAS R32C 100 E30A Emulator Debugger 7 3 1 Extended Menus Chapter 7 Windows Dialogs 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 Set initial Set initial radix 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 Zero suppress in Hex display Suppress zero in Hex display 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 monitor function Sampling Period Set RAM monitor sampling period Arrange a RAM monitor area around this variable Arrange a RAM monitor
123. hat 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 6 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 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 0h to the maximum address of MCU Display Address TE Display Address 00 gl Scroll Start Address foooooo 7 Scroll End Address JOFFFFF x 5l oeei 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 1 u mssi 1040 8 2 a dt amp dp de Label Register 0 00 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 41 tENESAS R32C 100 E30A Emulator Debugger 6 2 3 Step3 Downloading the Tutorial Program 6 2 3 1 Downloading the Tutorial Program Chapter 6 Tutorial Download the object program to be debugged T
124. he C watchpoints 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 tee Watch Ci X KA l6 gjeje T E e a Watch Local File Local Global Name value Address istruct tag_s ps struct tag_s ps signed short global short signed long global long signed int 5 5 global_array signed int 5 global_array 0 signed int global_array 0 0 signed int global_ array 0 1 signed int global_ array 0 2 signed int global_array 0 3 signed int global_ array 0 4 signed int 5 global_array 1 siqned int 5 qlobal array 2 Oxi 0 l 15 15 15 2649 E 2649 0 768 3842 000410 000001 000412 000414 000418 000418 000418 00041A oo041 c 00041E 000420 000422 00042 e 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 The initial display radix can be changed Leading zero suppression is selectable in hexadecimal display 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
125. he above check box when you do not clear the content of the E2 Data Flash when downloading The memory contents in places not overwritten by downloading remain intact This setting is invalid for MCU that doesn t support the E2 Data Flash REJ10J1680 0100 Rev 1 00 July 1 2008 Page 35 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 3 1 2 Ext Port Tab The specified content becomes effective when the next being start m Setting of Extension Port I Disable Reset of Target Only when the Extention Port is connected you can select this function 58121 Setting to extension port Specify whether or not to invalidate reset of the target l Disable Reset of Target e If you want to invalidate reset of the target select the check box shown above When the extension port is not connected this function cannot be set e When the extension port is connected this function can be changed even after debugger start REJ10J1680 0100 Rev 1 00 July 1 2008 Page 36 RENESAS Tutorial Blank Page 38 R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 Tutorial 6 1 Introduction This section describes the main functions of this debugger by using a tutorial program The tutorial programs are installed to the directory WorkSpace Tutorial of the drive you installed High performance Embedded Workshop There are workspaces for each targets and each MCUs Please select the corresponding one to
126. he 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 M32C or R32C Select Download module from Tutorial x30 under Download modules E ro Tutorial E E Tutorial TE OEN 2 ncrt0 a30 C source file B sorte E Tutoriale Download modules D Dependencie ne_defin sect30 ir sorth J il il v Allow Docking REJ10J1680 0100 Rev 1 00 July 1 2008 Page 42 Assembly source file Download Debug Data Only Unload Download New Module Remove Debug Settings Configure View Hide Properties 7CENESAS R32C 100 E30A Emulator Debugger 6 2 3 2 Displaying the Source Program Chapter 6 Tutorial 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 Tutorial Tutorial Assembly source file E nert0 a30 E C source file B sorte ommen Download modules H Tutorialx30 00000000 Dependencies ne_define inc sect30 inc B sorth aie Sour S Source long a 10 struct Sample st void main void F421A F421 while 1 F421E tutorial
127. ices 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 o indicating structure or union iio vae unsigned char str OxF0000 89 unsigned char str 89 Y struct DATA pData 0x408 struct Answer ans 0x82B unsigned char ch 100 d signed int nID 3980 oe 1 Lo lrr 1 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 160 tENESAS R32C 100 E30A Emulator Debugger Chapter 11 Display the Cause of the Program Stoppage 11 Display the Cause of the Program Stoppage If the progr
128. icrocomputer Tool Development Department Edited by Renesas Solutions Corp 2008 Renesas Technology Corp and Renesas Solutions Corp All rights reserved Printed in Japan R32C 100 E30A Emulator Debugger V 1 00 User s Manual 2tENESAS Renesas Technology Corp 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan
129. ile When Using Renesas toolchain TEEE695_IAR IEEE 695 format file When Using IAR toolchain IEEE695_TASKING IEEE 695 format file When Using Tasking toolchain ELF DWARF2 ELF DWARF2 format file When Using Renesas toolchain ELF DWARF2_IAR ELF DWARF2 format file When Using IAR toolchain ELF DWARF2_TASKING ELF DWARF2 format file When Using Tasking toolchain ELF DWARF2_KPIT ELF DWARF2 format file When Using KPIT toolchain This debugger does not support the object formats which are not shown in the drop down list REJ10J1680 0100 Rev 1 00 July 1 2008 Page 20 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation 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 I Offset foo ga Format IEEE695 RENESAS z o Oei Filename D HEW4 samples M160 demox30 gt Browse Access size fi Download debug information only Perform memory verify during download Download automatically on target connection 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 but
130. ion of E2 and E3 e Combination of E4 and E5 e Combination of E6 and E7 To perform a trace with any condition you specified change the above setting Specify the following REJ10J1680 0100 Rev 1 00 July 1 2008 Page 93 CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs Example To record data writes to the 4100h 4110h and 4120h in Full mode Set Event Status Event Type Trace r Trace Area Trace Area FULL x Start Address 00000000 gt zl End Address 00000000 zl Access EXECUTE 7 Access EXECUTE z Hv Pickup Trace Access WRITE 7 Range addr Address1 Address s100 7 l Address2 FFFFFFFF z zl To set a data write to the addresses 4110h and 4120h open the Set Event Status dialog box again and change the address in the Address1 text box shown above to register it as addition REJ10J1680 0100 Rev 1 00 July 1 2008 Page 94 ztENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs e Specify Before for the trace range for the trace event to be set Set the trace start event only event EO specifiable and the trace end event only event E4 specifiable and then specify any address or address range to set a trace event In Before mode the debugger records the trace events that have occurred from the trace start event program started running till the condition for the trace end event is met For the trace start event set a
131. j j gap if alj gt aliteap i wh t alj REJ10J1680 0100 Rev 1 00 July 1 2008 Page 52 tENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 P To step out of the sort function select Step Out from the Debug menu or click the Step Out button on the toolbar The PC cursor slips out of a sort function and moves to the position before a change function A Tutoriale E Source p_sam amp st init p_sam s i lt 10 i Vf rand i 0 p_sam gt s0 a 0 p_sam gt sl al1 pusen gt s2 a 2 Note It takes time to execute this function When the calling source is clarified use Go To Cursor REJ10J1680 0100 Rev 1 00 July 1 2008 Page 53 CENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 Debug menu or m click the Step Over button tf on the toolbar The PC cursor moves to the next position of a change function Tutorial c p_sam amp st init p_sam i 0 i lt 10 i
132. l Time Measurement Events e Writing Reading a Specified Address Set as below Example Writing to address 410h Set Event Status i Event Type Time Measurement m Execution Time Measure IV Do Measure Av Section Time Measure Address 410 Mi gl Access WRITE Data Compare Data 00000000 Mack oo000000 Cancel Example Writing byte length data 32h to address 420h Set Event Status Event Type Time Measurement m Execution Time Measure IV Do Measure JY Section Time Measure Address 420 id gl Access WRITE 7 v Data Compare Data 22 Mask ft REJ10J1680 0100 Rev 1 00 July 1 2008 Page 100 CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs Example Writing word length data 1234h to address 430h Set Event Status Event Type Time Measurement Execution Time Measure IV Do Measure HY Section Time Measure Address 1430 tet gl Access WRITE v Data Compare Data fi 234 Mask tt Cancel ATTENTION e Only when Time measurement mode is selected in the Debugging Mode tab of the Init dialog Execution time measurement function can be used REJ10J1680 0100 Rev 1 00 July 1 2008 Page 101 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 7 Time Measurement Window The Time Measurement window displays the minimum maximum aver
133. le inf file is displayed Specify the elusb inf file stored in a location below the directory where this debugger is installed ATTENTION e Before the USB device drivers can be installed the debugger you use must already be installed Install this debugger first e A user who install the USB device driver need administrator rights e During installation a message may be output indicating that the device driver proper elusb sys cannot be found In this case specify the elusb sys which is stored in the same directory as is the elusb inf file REJ10J1680 0100 Rev 1 00 July 1 2008 Page 9 RENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 4 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 appli
134. le 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 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 Cycle handler is in an operational state TCYC_STP Cycle handler is in a non operational state REJ10J1680 0100 Rev 1 00 July 1 2008 Page 133 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 10 Display the Alarm Handler Status In the MR window select Popup Menu Mode gt Alarm Handler MR x mi Or AMAmwodGCHeOU lt GORE Remain Handler Now System Clock Count O000H 0000H 0184H ID StaAddr name AlarmTime OF1ic68H _alarm2 0000H OOOOH OFic70H _alarm6 0000H 1000H OF1C66H _alarmi OOOOH ABCDH OFic 2H _alarm OOODH 0013H OFIC6AH _alarm3 OOcDH OOO3H OFic6 cH _alarm4 OOcDH OOO3H OFIC6EH _alarm5 OOCDH OAA3H
135. lect 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 22 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 Setup the Debugger 5 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 Init R32C 100 E304 Emulator Sa x MCU Debugging Information Emulator Script Mode MCU R5F64112_E30A mcu Serial No E30A ZKM0093 Tl Debug the program using the CPU Rewrite Mode I Use ECC for E2 Data Flash Work Area For Monitor Program First Address 00 20 00 OK Cancel Help OK cma He I Do not show this dialog box again The tabs available on this dialog box vary with each product used For details click the desired tab name shown in the table below The debugger for R32C MCU exist Debugging Information Debugging Mode You can open the Init dialog using either one of the following methods e After the debugger gets started select Menu Setup gt Emulator gt Sy
136. log 1 1 1 RAM Monitor Area This debugger has 1 Kbytes of RAM monitor area which can be located in any contiguous address location or in 64 separate blocks comprised of 16 bytes each 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 1s is set by default 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 RAM monitor function can be used is shown below e RAM Monitor Window e ASM Watch Window e C Watch Window REJ10J1680 0100 Rev 1 00 July 1 2008 Page 3 tENESAS R32C 100 E30A Emulator Debugger Chapter 1 Features 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 breakpoi
137. mand input Pause Waits for user input Sleep Halts for user input until the specified time has elapsed Logon 3 Outputs the screen display to a log file Logoff g Stops the output of the screen display to a log file Exec i Executes external application 8 1 10 Program Display Commands Command Name Short Name Contents Func Checks function names and displays the contents of functions Up Displays the calling function Down i Displays a called function Where 5 Displays a function call status Path 7 Sets and checks the search path AddPath i Adds the search path File 5 Checks a filename and displays the contents of that file 8 1 11 Clock Command Command Name Short Name Contents Clock CLK Checks the clock REJ10J1680 0100 Rev 1 00 July 1 2008 Page 141 tENESAS R32C 100 E30A Emulator Debugger Chapter 8 Table of Script Commands 8 1 12 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 8 1 13 Real time OS Command Command Name Short Name Contents MR Displays status of realtime OS MRxx 8 1 14 Utility Commands Command Name Short Name Contents Radix Sets and checks the radix for numerical input Alias S
138. me area specify your XCL file ex Inkm32cf 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 R32C yspc 3 Build your program after the setting above We do not evaluate other settings so we can not recommend to append other options REJ10J1680 0100 Rev 1 00 July 1 2008 Page 166 tENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 3 3 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 R382C ylmb 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 r
139. me for each of the all selected target The configuration file saves the state of High performance Embedded Workshop except for the target emulator simulator etting the Debugger O Target name M166 R amp C PC 501 Emulator Configuration name Debuge_M16C_R8C_PC7501_Emulator Detail options Item Setting Modify The default name is already set If it is not necessary to change please click the next button as it is REJ10J1680 0100 Rev 1 00 July 1 2008 Page 15 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 The following source files will be generated Sample01 c Main Program nertO a30 Start up file sect30 inc Start up file flee Finish Cancel This is the end of the emulator settings Exit the Project Generator following the instructions on the screen REJ10J1680 0100 Rev 1 00 July 1 2008 Page 16 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 4 2
140. med to uITRON specifications V 4 0 Item Contents ID ID No of mailbox Mbxatr Attribute 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 tmo 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 tmollsl 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 129 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 8 Display the
141. ment Events To specify an time measurement event double click to the event setting area This opens an event setting dialog box Select Time Measurement on the Event Type of the event setting dialog box There are the following measurement functions in the time measurement Execution time measurement Measuring the program execution time from when the program started to when it stops Interval time measurement Measuring the interval time from Start Event to End Event Following events can be set for an interval time measurement event Memory Access To specify a memory access event select the READ or WRITE or R W in the ACCESS area of the event The event is established when memory is accessed at the specified address Set the measurement events measurement start event and measurement end event at the Measurement Condition of the Time Measurement Window 7 6 13 1 Specify the Execution Time Measurement Events Measuring the program execution time from when the program started to when it stops Select the below check box r Execution Time Measure IV Do Measure The Execution time measurement event is set to the event EO and the event E4 Please note that the execution time measurement function doesn t operate when the Execution time measurement event is not set REJ10J1680 0100 Rev 1 00 July 1 2008 Page 99 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 18 2 Specify the Interva
142. name exceeds 8 characters the extra characters are omitted REJ10J1680 0100 Rev 1 00 July 1 2008 Page 125 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 6 Display the Semaphore Status In the MR window select Popup Menu Mode gt Semaphore EMELLAN ea ORES Def cnt Count semo 0000H OOOOH 10 _task1i0 11 _task11 s 0003H 0003H 0005H 0003H 0005H 0005H 0007H 0007H 0002H 0002H 0003H 0003H 7 10 6 1 Display the Semaphore Status When the realtime OS is MRxx conformed to uITRON 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 tmo 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 indicates double waiting is appended to a string displayed in the semQ field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 _task26
143. nd of Trace Branch Data Setting of trace area Setting of RAM monitor event Setting of sequential condition Setting of trace mode Setting of execution time measurement e If the contents of events are altered they are marked by an asterisk on the title bar The asterisks are not displayed after setting up the emulator e A total of 8 events comprised of break events trace events and interval time measurement events can be used The combinatorial conditions of events are as follows Trace when one of the valid events is established OR condition Events occur in a specified order Sequential condition ATTENTION e To change an already set event to another event clear the currently set event in the EVENT area first before setting a new event e The combinatorial event condition of Sequential can be specified for only break events REJ10J1680 0100 Rev 1 00 July 1 2008 Page 76 2tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 6 1 Specify the Event To set events double click in the event setting area of the Event Setting Window This opens an event setting dialog box The type of event you specify can be changed by altering Event Type in this dialog box Event Type Break bd Break E PL Range faddr ddress1 If you set events in the Set Event Status dialog box they will be set as unused events Unused events are searched in the order shown below E7
144. ng The following designations are available as trace events e Branch trace e Data trace e Condition branch trace A mixed trace of branch and data traces can be performed A total of 8 events comprised of break events trace events and time measurement events in combination can be specified Trace events can be combined as below e Trace when one of the valid events is established OR condition 1 4 Time Measurement Function Execution time measurement This function measures all execution times Interval time measurement This function measures the minimum maximum and average execution time and the number of executions performed in a specified interval Measurements can be taken in up to three intervals at the same time 1 4 1 The Measurement Condition Execution time measurement Measuring the program execution time from when the program started to when it stops Interval time measurement The measurement condition of the zone time can specify the following e Time between two events 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 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 REJ10J1
145. nt 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 in 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 12 1 2 Area where software breakpoint can be set 1 2 2 Hardware Break This function causes the target program to stop upon detecting a data read write to memory and instruction execution Event breaks come in two types of breaks as shown below e Instruction Execution Break The instruction execution break is used to detect instruction execution and the target program is made to stop immediately before executing the instruction at a specified address e Memory Access Break A data write read to or from memory is detected when a specified address is accessed for data upon which the target program is made to stop post execution break A total of
146. nt to be set To set a trace event you need to specify a trace range Event setting conditions differ depending on mode specified for a trace range The specifiable trace range and event setting conditions are shown below e Specify Break or Full for the trace range for the trace event to be set Specify any address or address range as you set a trace event By default Break is set for the trace range and events for recording jump address information in the entire address range are set in E6 and E7 as the trace event Default setting r Event Status EVENT ADDRESS ACTION ACCESS RANGE OE0 0000000 BREAK EXECUTION addr 00000000 OE 00000000 BREAK EXECUTION addr 00000000 OE2 00000000 BREAK EXECUTION addr 00000000 OE3 oo000000 BREAK EXECUTION addr 00000000 OE4 oo000000 BREAK EXECUTION addr 00000000 OE5 ooo00000 BREAK EXECUTION addr 00000000 m Trace Area Event E5 BREAK ba F Assing to RAM monitor m Execution Time Measure PAE F Do Measure Trace Execution Kind of Trace Branch Data Access Pe N T Sequential Color Reset Save Load Lss Close Trace conditions branch trace data trace should be specified in the ACCESS area of the event used To specify an address range use range specification of the event The following shows a combination of events for which a range can be specified e Combination of EO and E1 e Combinat
147. of the RAM monitor area in the Start and the Size fields of this dialog box Set RRAM Area Start 400 Size p 4 blocks 000400 O007FF Area e Changing directly in the window Select the RAM monitor area you want to change from a list of RAM monitor areas and click again in its Start display column or Size display column Specify a new start address or a new size with which you want to be changed in the ensuing edit box Press the Enter key to confirm what you ve entered or the Esc key to cancel Start Size Area Start Size Area fim E 4 000400 000400 000400 000 GoTo 3 001000 001000 001000 0012 Changing the address Changing the 7 1 2 2 Adding RAM Monitor Areas Click the Add button The Set RRAM Area dialog box will appear Specify the start address and the size by a number of blocks of a new RAM monitor area in the Start and the Size fields of this dialog box 7 1 2 3 Deleting RAM Monitor Areas Select the RAM monitor area you want to delete from a list of RAM monitor areas and click the Remove button To delete all RAM monitor areas click the Remove All button 7 1 2 4 Setting the RAM monitor event To set the RAM monitor event select the below check box NM Event E5 is assinged to RAM monitor The RAM monitor event is set to the event E5 Please note that the RAM monitor function doesn t operate when the RAM monitor event is not set REJ10J1680 0100 Rev 1 00 July
148. oint 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 73 7CENESAS Chapter 7 Windows Dialogs R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 5 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 74 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 5 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 to 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
149. ontact a Renesas sales office if you have any questions regarding the information contained in this document Renesas semiconductor products or if you have any other inquiries 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 emulator E30A system Supported CPU This help explains the debugging function corresponding to the following CPUs e R82C 100 Series Note In this help the information which depends on this CPU is described as for R32C 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 For inquiries
150. pecifies and checks command alias definitions UnAlias Cancels the alias defined for a command UnAliasAll Cancels all aliases defined for commands Version VER Displays the version No Date Displays the date Echo Displays messages CD Window open REJ10J1680 0100 Rev 1 00 July 1 2008 Page 142 7CENESAS R32C 100 E30A Emulator Debugger Chapter 8 Table of Script Commands 8 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 symbols BreakAt Sets a software breakpoint by specifying a line No BreakIn Sets a software breakpoint by specifying a function CD Specifies and checks the current directory Clock CLK Checks the clock Coverage CV Specifies and displays coverage measurement 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 Dump Word DW Displays the contents of memory in 2 byte units Echo Displays messages EVent EV Sets and checks events Exec Executes external application Exit Exits the script file Ex
151. play the Cycle Handler Status In the MR window select Popup Menu Model gt Cyclic Handler Chapter 7 Windows Dialogs mi OPA ID Staaddr name interval count 0o uS doe B Status 1 2 3 4 5 6 7 8 OF1c56H OF1 C58H OF1C5AH OF1cS5SCH OF1C5SEH OF1Cc60H OF1c62H OFric64H _cyclel _cyclez _cyele3 _cycle4 _cycle5 _cycle6 _cycele _cycled 0064H O3E8H O1F4H 0258H OO0c8H 012CH 0190H 015EH 0064H O3E8H O1F4H 0258H OO0c8H 012CH 0190H O15EH TCY_ON TCY_OFF TCY_ON TCY_ON TCY_OFF TCY_ON TCY_ON TCY_ON 7 10 9 1 Display the Cycle Handler Status When the realtime OS is MRxx conformed to uITRON 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 132 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 9 2 Display the Cyc
152. played in the Dtqatr area TA_TFIFO Task wait queue is in FIFO order TA_TPRI Task wait queue is in task priority order REJ10J1680 0100 Rev 1 00 July 1 2008 Page 130 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 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 Itmo 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 tmolls e Upto 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 131 RENESAS R32C 100 E30A Emulator Debugger 7 10 9 Dis
153. press 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 Label Checks assembler labels Load L Downloads the target program LoadHex LH Downloads an Intel HEX format file 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 Module MOD Displays modules names Move g Moves memory blocks MoveLord MOVEL Moves memory blocks in 4 byte units MoveWord MOVEW Moves memory blocks in 2 byte units MR Displays status of realtime OS MRxx OverStep O Overstep execution of source lines OverStepInstruaction OI Overstep execution of instructions Path Sets and checks the search path REJ10J1680 0100 Rev 1 00 July 1 2008 Page 143 7CENESAS R32C 100 E30A Emulator Debugger Chapter 8 Table of Script Commands
154. r Chapter 9 Writing Script Files 9 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 9 1 2 Assign Statement Assign statement s define and initialize macro variables and assign values The following shows the format to be used smacro variable expression e You can use alphanumerics and the underscore _ 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 0h and FFFFFFFFh to be assigned in a macro variable If you specify a negative number it is processed as twos complement e You can use macro variables within the expression e Always precede macro variables with the sign 9 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 146 tENESAS
155. rds as data access information WR Write access Records as data access information e Jend The status 0 true or 1 false of the condition branch instruction REJ10J1680 0100 Rev 1 00 July 1 2008 Page 112 RENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 9 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 GUI IO Sample pnl Fii Fii Pop E Input Panel EEEE 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 113 tENESAS R32C 100 E30A Emulator Debugger 7 9 1 Extended Menus This window has the following popup menus that can be b
156. rought up by right clicking in the window Chapter 7 Windows Dialogs 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 114 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 10 MR Window Use the MR Window to display the status of the realtime OS You can only use the MR Window when you have downloaded a program that uses the realtime OS if the downloaded program does not use the MR nothing is displayed in the MR Window when it is opened MR x fm OP AwOSEO lt ORES Current Run Task 1 main ID Sta amp ddr name Pra Status wup count timeout flg ptn flg mode OFI7F8H _main 1 RUN 0000H OF1468H _task2 2 RDY 0000H OFIA76H _task3 sus 0000H OF1A84H _ task4 WAI
157. seeeesseeeesse 80 7 6 4 Setting the RAM monitor event cccccsccccccecsessssceeccecsesesaececececeessaeeeeececeessasaeeeeeeeenes 81 7 6 5 Select the Trace Range cccccssssccccecsesessececeeececsessscecececeeseaaeeecececsensssseeeceeeseneasaeeeeeees 81 7 6 6 Select the Trace Mode miraron ee a E E E E E EEE E 82 7 6 7 Setting the execution time measurement sssssseessssesesersesssssresstsssseseseesessesereeeesessene 82 7 6 8 Command Buttoisc a iaiteiaken E hit A OEE E EAE E E 83 7 6 9 Setting and Deleting a Break Points from Editor Source Window cccccsccseseseseees 84 7 6 10 Specify the Break Events ii 5 scccecdsccscsestons ccactsasessvstactvecs scssenvescscdsssseovdevcevocestebectveceevocdedte 85 7 6 11 Specify the Event Combination Condition 0cccccccccccsssscceececsesssseceeececeesesteseeeeeeeenes 89 7 6 12 Specify the Trace Event c cccccssssssssscccecscsssscccccecsessssaecececscesssaaeeececscesssaaeaeeececeenes 90 7 6 18 Specify the Time Measurement Event ccccccccccceceesesseceeececsessssececceeceessnsseeeeeeceenes 99 7 7 Time Measurement Window cccsccccccecessessncecececeesensnsecececsesenseaaesecececeeseaaececeeeeseseaaeaeeeeseeeees 102 7 7 1 Specify the Time Measurement Event ccccccccsssssccceceesessececeeececsesssaeceeececsessstsaeeeeeees 103 7 7 2 Time Measurement Condition ccccccccssccecssscecesssececseseececseeeecsssececsessecesseseeeesseeeesenaes 103 7
158. sessseceeececsesssaeeeecescsensseceeeeeeeenes 121 7 10 4 Display the Timeout Queue Status ccccccccccccssssssecccccsesesseseceeececsesssaeceeceecsensssaeeceeees 122 7 10 5 Display the Event Flag Status ccccccccccccccsssssseceeececsessaeeeeececsesessseeecceesessseeeeeeeesenes 124 7 10 6 Display the Semaphore Status cccccsccccccccsessssececececsesesssaececececsesssaeceecesesesssneeeeeeeees 126 7 10 7 Display the Mailbox Status cccccccccessssccccecsesessececececeesesssseceeececsesssaeceeceeesenssaeeeeeeeees 128 7 10 8 Display the Data Queue Status ccccccccccccecsesssssecececeesesseseseeeecesesssaeceeceeeeenssteeeeeeeees 130 7 10 9 Display the Cycle Handler Status c ccccccccssssscccccecsesssseceeececsessseeeeececsessstseeeeeeeeenes 132 7 10 10 Display the Alarm Handler Status 0 cccccccscsccccccecssssssececececsessaeeeeccecsessseeeeeeeeeenes 134 7 10 11 Display the Memory Pool StatuS ccccccccccccssssssecececeesessseseeececsesssaeceeceeesensseaeeeeeees 135 7 10 12 Display the Task Context ccccssceuccsscessenscencccccscsenscnscsscescsesseneesccescessenseeusceece sense 137 8 Table of Script Commands 139 8 1 Table of Script Commands classified by fUNnctiOn ccccceceeesceseesessccssesecssesscesescsseessesecaees 139 l Execution Commandin ase ilo ia as ee ee es 139 8 1 2 File Operation Commands ccccccccccecessesssseceeeceesesssseceeccecsesssaeceecceceenesseeeeesceesenssaeees 139 8
159. 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 tmol 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 s Display when in WAIT SUSPEND with time out 26 task26 tmolls 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 7 10 5 2 Display the Event Flag Status When the realtime OS is MRxx conformed to uITRON 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
160. splays 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 Not supported REJ10J1680 0100 Rev 1 00 July 1 2008 Page 116 7CENESAS R32C 100 E30A Emulator Debugger 7 10 2 Display the Task Status Chapter 7 Windows Dialogs In the MR window select Popup Menu Mode gt Task MR PERRETE OEM SO lt ORE Current Run Task 1 main ID Sta amp ddr OF17F8H OF1A68H OF1A76H OF1A84H OF1ABOH OF1ACAH OF1AE4H 1 2 3 4 5 OF1A9AH 6 7 8 9 OFIBOZH Einar tacas wup count timeout flg ptn flg mode _main 1 _task2 _task3 _task4 _task5 _task6 _task7 _task8 task9 RUN 0000H RDY 0000 sus 0000 WAI
161. stem REJ10J1680 0100 Rev 1 00 July 1 2008 Page 23 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger e Start Debugger while holding down the Ctrl key 5 1 1 MCU Tab The specified content becomes effective when the next being start MCU RSF64112_E304 mcu Serial No E30A ZKM0093 J Debug the program using the CPU Rewrite Mode J Use ECC for E2 Data Flash Work Area For Monitor Program First Address 0020 00 5 1 1 1 Specifying the MCU file MCU M30626 MCU 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 5 1 1 2 Setting of the Communication Interface The displayed data varies depending on the specified communication interface The available communication interface varies depending on the products The following shows the setting for each communication interface e Refer to 5 2 1 Setting of the USB Interface 5 1 1 3 Choosing to use or not to use CPU rewrite mode Specify whether or not you want to use CPU rewrite mode By default CPU rewrite mode is unused Debug the program using the CPU Rewrite Mode Select the above check box when you are debugging the target system that uses CPU rewrite mode This specification can only be set or changed when you start the deb
162. te for an eventflag suspended WAI SEM Waiting state for a semaphore resource WAI SEM SUS Waiting state for a semaphore resource suspended WAI SEM TMO Waiting state for a semaphore resource with time out WAI SEM TMO SUS Waiting state for a semaphore resource with time out suspended WAI MBX Receiving waiting state for a mailbox WAI MBX SUS Receiving waiting state for a mailbox suspended WAI MBX TMO Receiving waiting state for a mailbox with time out WAI MBX TMO SUS Receiving waiting state for a mailbox with time out suspended WAI SDTQ Sending waiting state for a data queue WAI SDTQ SUS Sending waiting state for a data queue suspended WAI SDTQ TMO Sending waiting state for a data queue with time out WAI SDTQ TMO SUS Sending waiting state for a data queue with time out suspended WAI RDTQ Receiving waiting state for a data queue WAI RDTQ SUS Receiving waiting state for a data queue suspended WAI RDTQ TMO Receiving waiting state for a data queue with time out WAI RDTQ TMO SUS Receiving waiting state for a data queue with time out suspended WAI VSDTQ Sending waiting state for an extended data queue WAI VSDTQ SUS Sending waiting state for an extended data queue suspended WAI VSDTQ TMO Sending waiting state for an extended data queue with time out WAI VSDTQ TMO SUS Sen
163. te module file and one or more machine language file in one session you can download all file in same time REJ10J1680 0100 Rev 1 00 July 1 2008 Page 163 tENESAS R32C 100 E30A Emulator Debugger Chapter 12 Attention 12 1 7 Synchronized debugging Synchronized debugging function is not available 12 1 8 Down load of Firmware The emulator must have the suitable firmware downloaded into it The debugger inspects the version of the emulator s internal firmware as it starts up If it is found that the emulator does not have the firmware files needed for it the emulator enters a mode in which the firmware is forced to be downloaded at the debugger startup 12 1 9 Check of ID Code Checks the ID code written in the flash memory at the debugger startup When the ID code is written in the flash memory a dialog box to input the ID code appears Enter the correct ID code in the dialog box If the ID code you have supplied does not match the debugger will not start 12 1 10 The start procedure of debugger To start the debugger follow one of the procedures described below e Turn on the power for the emulator and target gt Start the debugger gt Set up the Init dialog box gt Reset the target in hardware e Turn on the power for the emulator gt Start the debugger gt Set up the Init dialog box gt Turn on the power for the target If the target needs to be reset in hardware or the power for the target needs to be turned on
164. ted 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 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 111 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 8 6 Display of bus information on the R32C Debugger From left to right the contents are as follows e Src Dest The status of the address bus e Data The status of the data bus e Size The data access size Representation BIU status e Status The status between the memory and I O JMP Jump Return Records as branch information Src is branch instruction address Dest is jump address RD Read access Reco
165. tes of RAM monitor area which can be located in any contiguous address location or in 64 separate blocks comprised of 16 bytes each The RAM monitor area can be changed to any desired address range Refer to 7 1 2 Setting the RAM monitor area for details on how to change the RAM monitor area 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 ATTENTION 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 62 7CENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 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
166. time out suspended WAI DLY Delayed state due to dly_tsk WAI DLY SUS Delayed state due to dly_tsk suspended WAI FLG Waiting state for an eventflag WAI FLG SUS Waiting state for an eventflag suspended WAI FLG TMO Waiting state for an eventflag with time out WAI FLG TMO SUS Waiting state for an eventflag with time out suspended WAI SEM Waiting state for a semaphore resource WAI SEM SUS Waiting state for a semaphore resource suspended WAI SEM TMO Waiting state for a semaphore resource with time out WAI SEM TMO SUS Waiting state for a semaphore resource with time out suspended WAI MBX Receiving waiting state for a mailbox WAI MBX SUS Receiving waiting state for a mailbox suspended WAI MBX TMO Receiving waiting state for a mailbox with time out WAI MBX TMO SUS Receiving waiting state for a mailbox with time out suspended e 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
167. to the 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 4bytes 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 63 tENESAS R32C 100 E30A Emulator Debugger Chapter 7 Windows Dialogs 7 1 2 Setting the RAM monitor area Choose the popup menu RAM Monitor Area in the RAM monitor window The RAM monitor area setup window shown below will appear The currently set RAM monitor areas are listed in this window E RAM Monitor Area Setting E 15 xj
168. ton ATTENTION Offset Access size and Perform memory verify during download is ignored The offset is always set to 0 the access size is always set to 1 and the verification does not work REJ10J1680 0100 Rev 1 00 July 1 2008 Page 21 RENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 3 Starting the Debugger The debugging can be started by connecting with an emulator 4 3 1 Connecting the Emulator Connect the emulator by simply switching the session file to one in which the 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 E EY Debug M DefaultSession After the session name is selected the dialog box for setting the debugger is displayed and the emulator will be connected When the dialog box is not displayed select Connect from the Debug menu 0 8 208 4 3 2 Ending the Emulator The emulator can be exited by using the following methods 1 Selecting the Disconnect Select Disconnect from the Debug menu Im iS co IN 2 Selecting the DefaultSession Select the DefaultSession in the list box that was used at the time of emulator connection 3 Exiting the High performance Embedded Workshop Se
169. tor 3 2 Download of Firmware This debugger searches the version of the firmware downloaded to the emulator at start Also when the firmware downloaded to the emulator is of old version a mode which drives this debugger to download firmware is set When this debugger gets started while the emulator is set in the mode which drives the debugger to download firmware forcedly the following dialog is opened at start Click the OK button to download the firmware You need to download new firmware to use this debugger Cancel i REJ10J1680 0100 Rev 1 00 July 1 2008 Page 8 RENESAS R32C 100 E30A Emulator Debugger Chapter 3 Before starting the debugger 3 3 Setting before emulator starts 3 3 1 USB communication Connection of USB devices is detected by Windows Plug amp Play function The device driver needed for the connected USB device is automatically installed 3 3 1 1 Install of USB device driver The USB devices connected are detected by Windows Plug amp Play function The installation wizard for USB device drivers starts after the device had been detected The following shows the procedure for installing the USB device drivers 1 Connect the host computer and the emulator with USB cable 2 Then turn on the power to the emulator 3 The dialog box shown below appears Found New Hardware USB Device Installing Go on following the wizard and a dialog box for specifying the setup information fi
170. tor Configuration name Debuge_M16C_R8C_PC7501_Emulator Detail options Item Setting Modify lt Back Next gt Finish Cancel The default name is already set If it is not necessary to change please click the next button 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 19 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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_R8C_PC7501_Emulator z Target Options l DoSample0 Tareet m 6C R8C PC7501 Emulator 7 Default Debug Format IEEE695_RENESAS Me Download Modules Offset Address Format D work HEW4 Samples M16C Sample01 x30 00000000 TEEE6S j Cancel 1 Select the product name to be connected in the Target drop down list box Select the format of the load module to be downloaded in the Default Debug Format drop down list box Format Name Contents ITEEE695_RENESAS IEEE 695 format f
171. tting 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 13 2tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 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 New Project 5 Setting the Target System for Debugging MMIC R8C Compact Emulator MMI6C R8C FoUSB UART VJMI6C R amp C PC7501 Emulator IMI6C R8C Simulator External Debugger Target type m 60 60 x Next gt Finish Cancel 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 Check the box against the target platform And choose other target as required And click the Next button REJ10J1680 0100 Rev 1 00 July 1 2008 Page 14 tENESAS R32C 100 E30A Emulator Debugger Chapter 4 Preparation before Use 4 2 1 4 Step4 Setting the Configuration File Name Set the configuration file na
172. ugger Supplementary explanation When debugging in CPU rewrite mode is enabled the following limitations apply e No software breaks can be set in the internal ROM area REJ10J1680 0100 Rev 1 00 July 1 2008 Page 24 tENESAS R32C 100 E30A Emulator Debugger Chapter 5 Setup the Debugger 5 1 1 4 Choosing to use or not to use ECC in the E2 Data Flash Specify whether or not you want to use ECC in the E2 Data Flash By default ECC is unused Use ECC for E2 Data Flash Select the above check box when you use ECC in the E2 Data Flash This specification can only be set or changed when you start the debugger This setting is invalid for MCU that doesn t support the E2 Data Flash 5 1 1 5 Specifying the Start Address of the Debug Monitor Program Specify the start address of the area MCU s internal RAM area to be used by the debug monitor program Work Area For Monitor Program First Address 00 20 00 The debug monitor program will use approximately 1K bytes of area beginning with the specified start address Although no particular considerations need to be taken for it because the memory contents are saved in advance the following precautions should be observed e Only the start address consisting of 00xx00 xx arbitrary can be set By default the address 002000 is set e No areas that overlap the stack or the target area of DMA can be specified REJ10J1680 0100 Rev 1 00 July 1 2008 Page 25 RENESAS R32C 100 E30A
173. w will now also show the int type variable i CWatch xj Watch Local File Local Global Name Value Address Scope signed long 10 a 000414 Auto Signed int i 10 000462 Auto REJ10J1680 0100 Rev 1 00 July 1 2008 Page 51 1ZENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 6 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 a To step through the sort function select Step In from the Debug menu or click the Step In button ae on the toolbar The PC cursor moves to the first statement of the sort function in the Editor Source window Source p_sam gt s p_sam gt s8 p_sam gt s9 sort long ta long t int i j k gap gap il 5 e gap gt 0 i for k O k lt gap ktt for i ktgap i lt 10 ititgap for j i gap j gt k
174. wn below 15 x Vibl QQivieav Z Ev Range 32511 00000 Area Break File Cycle 19026 Address OFO161 Time 00 00 00054 423 Trace Cycle Address Obj code Label Mnemonic Databecess hr ma Ss ms us LOCAL C 42 for i 0 i lt 105 i 19026 OFO161 778BFD0400 CHP W 0004H 3H FB 00 00 00 054 423 OOO7E3 09 R 0007E4 OO R fed 19021 OFO166 7DC439 JGE FO1A1H 00 00 00 054 423 LOCAL C 43 char localScope char a 19019 0F0169 C661FF MOV B 61H 1H FB 00 00 00 054 423 LOCAL C 44 long localScope_long 0 19017 OF016C D905F9 MOV W 0H 7H FB 0007E5 61 U 00 00 00 054 423 19014 0F016F DOOBFB Nov W OH SH FB QO07DF_ 00w 00 00 00 054 423 f REJ10J1680 0100 Rev 1 00 July 1 2008 Page 108 RENESAS R32C 100 E30A Emulator Debugger 7 8 3 Configuration of Data Access Mode Chapter 7 Windows Dialogs 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 Trace 05007 05006 05001 05000_ 04995 04994 04989 04984 04977 04972 04971 04964 04963 04957 04949 04939 04938 04935 04929 _global_struct _global_ array OE 00047D 00047E 00047F 000480 000481 000482 000483 000484 000486 0007E4 0007E4 0007E2 0007E2 0007E4 0007E2 00
175. y specify amp variable_name REJ10J1680 0100 Rev 1 00 July 1 2008 Page 153 RENESAS R32C 100 E30A Emulator Debugger Chapter 10 C 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 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_cls 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 member 2 correctly checks the members REJ10J1680 0100 Rev 1 00 July 1 2008 Page 154 tENESAS R32C 100 E30A Emulator Debugger Chapter 10 C C Expressions 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 v
176. 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 REJ10J1680 0100 Rev 1 00 July 1 2008 Page 39 RENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 2 Usage Please follow these instructions 6 2 1 Step1 Starting the Debugger 6 2 1 1 Preparation before Use To run the High performance Embedded Workshop and connect the emulator refer to 4 Preparation before Use 6 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 5 Setup the Debugger After the setup of a debugger it will function as a debugger REJ10J1680 0100 Rev 1 00 July 1 2008 Page 40 RENESAS R32C 100 E30A Emulator Debugger Chapter 6 Tutorial 6 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 t
Download Pdf Manuals
Related Search
Related Contents
取扱説明書 - アイテックス Linak DESKLINE DL2 and CBD4 CBD5 Systems User Manual Buffalo II User Manual v1.0 Video Auto Switch RDR-GX120 pdf produits Candy GOF462S la guía del usuario - ImagesAttainment.com Kärcher Insect remover Mml16c GB-NL-FR-ES-D Copyright © All rights reserved.
Failed to retrieve file