Home
Renesas M16C/64 User's Manual
Contents
1. sees nennen nennen nnns nhe nn nasna at asea arra sa sarai saa r assai nnns 169 9 12 2 Opening the Data Coverage Window sessssesssssseseneeenen nennen nnns 169 5 12 3 Allocating Data Coverage Memory Hardware Resource eeessseeeeeeenreeeee 170 0 12 4 Measuring an Address Range ssssssssssssssseseesee nennen nnne nnne nnne nnne nnne nnn 172 9 12 5 Adding Address Ranges cccccsccccsseccseseccseseecseeecsaseeceaeeeseueceneuecesageeeeageesseeessaeeensuesenueessaas 173 5 12 6 Changing Address Ranges ccccccssccccssseeccseseeeccesscecceuseecceageeecsauseeesaaseeessaneeeesaseesssaseeessaeees 174 0 12 7 Removing Address Ranges cccsccccsseccseseecseececesececeuecesaseeeseeeseueeeneueceeageeeeaeeesseeeessueeenneeens 176 o Pr MEE AS UNIV SC eile Mm Ea 178 9 12 9 Addilig CIONS ass ee ee ene ten M IDEM RM DIM MAMMA IEEE MM ee ere ee 179 9 122100 REMON OCUS eene E aU ides iced RO eH E onu DEM NNUS Ud 180 51211 Measunng Task Stak TT 182 5 12 12 Clearing Data Coverage Information sese 183 5 12 13 Updating Coverage InfOEITidllOll sus scien can baeo a ptu vug aduana Ru cv fint iu Ra o RC HU LR ua Eu M Rc ba En cu ERE sax aua 183 5 12 14 Inhibiting Updating Of information sisestati neee ag adea au Sa ha dE aam dta aspe cuc 183 5 12 15 Saving Data Coverage Information to Files
2. eeeeseesessssesesseseeeneeeene nennen 184 5 12 16 Loading Data Coverage Information from Fil S ccccccccccseeseeeceeeeecaeeeeesseeeeeeseeeeeesaeeeeesaeeeees 184 5 13 Viewing Realtime Profile Information cccccecccceceeeeeseeeeeeseeeeeeseeeeeeeseeeeeeseeeeeeseeeeeeeeeeessaeeeeeesaeeeesaees 186 9 13 1 Viewing Realtime Profile INfOrmation cccccsccccceeececeesscecceuececceaeeeceaseeesueeessageeessageeesseass 186 9 13 2 Setting Realtime Profile Measurement Modes cccccceeeeeeeeeeeeeeeeaeeeeeseeeeeeseeeeeesaeeeeseaaeeees 188 5 13 5 Nieasu nng Funcom Proe Seimis e e 0 TS 188 5 13 4 Setting Function Profile Measurement Ranges cccccececcseeeeeeeeeeeeeeaeeeeeeeeeeeesseeeeesseeeeesaaes 189 9 13 5 Saving Function Profile Measurement Ranges cccceccceseeeeeeeeeeeeeeaeeeeeeeeeeesseeseeesaaeeeesaaees 190 5 13 6 Loading Function Profile Measurement Ranges c ccccccccseeeeeeeeeeeeeaeeeeeeseeeeeseeueeeseaeeeesaeees 190 5 13 7 Measuring Task Profiles cccccccssscecceesececesseecceseeecseseeecseseecseageeessageeessaeeessuseesssaseesssaeenes 191 5 13 8 Setting Task Profile Measurement Ranges ccccecccccseeeeeeeeeeeeecaeeeeeseeeeeeeseeseeeseeeeesaeeeesaaneees 192 5 13 9 Saving Task Profile Measurement Tasks ccccccecccecseeeeeeneeeeeecaeeeeesaaeeeeseeeeeeseaeeeesaeeeeesaaeeees 193 5 13 10 Loading Task Profile Measurement Tasks
3. cccceccccceeceeeeeeeeeeeeeseeeesaeeeesaeeeeeaes 119 5 9 Looking at Trace Information PRO m mo 120 5 9 1 Looking at Trace Information cccccccssseccceeececceseeccseseeeceeseecseaseeessaseeesseeeessuseeessaeeeeseageeess 120 5 9 2 Acquiring Trace Informattion cccccscccccssscccceseeeceeseeeceauseecceaseeeseaeeecseeeeeseuseeessageeessageeessagees 120 5 9 3 Setting Trace Information Acquisition CONCITIONS ccccceeceeceeeeeeeeeeeeeseeeeesaeeeeeseeeeeeesaeeeenens 122 5 9 4 Setting Trace NICK SS c 124 5 9 5 Soung Trace do eee ee a eee ene er een te eee ee 126 5 9 6 Setting Capture Do not Capture Conditions ccc cccccceeccceeceeceeceeseecesseeeesseeeeseueeseueeeseeeesenes 130 5 9 7 Selecting the Content of Trace ACQUISILION ccccccseeceeceeeeeeeeeeeeeeseeeeeesaeeeeeeaeeeeeeseeeeeeaeeeeeas 132 5 9 8 SNOWING Trsce esbllls os eee ee ne ere eee a aia ee 133 5 9 9 Filtering Trace Information seseriai aaa aiea a ina iaid Naa ea 135 5 9 10 Searching for Trace Records erroe tasc esae suc exea eins beuweatedsedseestuneduaduletisteavenseusnvtncnexe 137 0 9 11 Saving Trace Information to FileS sssrinin c eon ape vua QE hd e oa Un e Coa FUR ARIA ia d RR a I andit a 138 5 9 12 Loading Trace Information from Files sess 139 5 9 13 Temporarily Stopping Trace Information Acquisition cccccccccceeeeeseeeeeaeeeeceeeeeseeeesse
4. heap c s E initsct c vm i intprg c m resetprg c me zort c Tutorial c EE Download modules Ls al EE 3l E Dependencies Download n cstartdef h Download Debug Data Only mE Initsck h Unload a resetprg h e sfr amp 2a h Download 4 New Module a sort h Remove ini typedetine h Debug Settings Configure view I Allow Docking Hide Properties Figure 3 2 Download display of the tutorial program REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 38 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 4 2 Displaying the Source Program In the High performance Embedded Workshop you can debug a program at the source level Double click Tutorial c of C source file z xl EQ Tutorial aE lle Tutorial Ga C sourco fe Source o ivectarc 13 ie heap c 14 oid mainivoid initsct c 15 FB8ZDC i n E intprg c 16 FSz2DC while i i1 j resetprg c 17 F8zE tutoriali sorte 18 FB2E3 j E TENE 19 FB2ES5 Download modules aU NET Tutorial x30 00000000 21 oid tutorial void El Dependencies s FG2E6 i E cstartdef h 23 long a 10 amp initsct h 24 long j amp resetprg h 25 int i x sfr amp 2a h 26 struct Sample far p sam E sorth av tupedefine h 26 FGZES p sam malloc sizeof struct Samplel 29 FazFD initi p sam 30 31 F8309 for i i 0 i lt 1l0O i ji 32 FB314 j randi 33 F8320 iri lt Oi 34
5. A A Address Range A Source Figure 5 89 Code Coverage window 5 11 10 Removing Source Files Delete source files by the following methods 1 From the Source sheet of the Code Coverage window 1 Select a function you want to remove in the upper area of the Source sheet and while holding it selected choose Delete Range from the context menu Code Coverage eo SO xt NE DC dh dg File Function co coverage c1 Coverage sort c init 100 z Brar sort c sort wE E 77 7 sort c change ny Executed OFEO14 ENTER OFEOL MOV We we p sam s OFEO19 MIW Wi FEQ1E MOV UW OFEOIE MOV Wi OFEOZ 1 AIE W APT Address Range A Source Figure 5 90 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 159 of 229 QEN ESANS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 A dialog box prompting for your confirmation will be displayed Choose to save or not save coverage data To save specify a file name and then click the OK button If you do not save simply click the OK button Delete Source File All functions in the same source file vall be deleted Coverage data has not been saved C Save coverage data to file 4 gt Browse ai Figure 5 91 Delete Source File dialog box 3 All functions included in the selected source file will be removed Code Coverage o S et E DX ae Fil
6. 1 Choose Disconnect from the Debug menu 2 Click the Disconnect tool button 3 Enter the disconnect command in the Command Line window 4 7 Quitting the High performance Embedded Workshop Choosing Exit from the File menu lets you close the High performance Embedded Workshop itself Before it closes a message box will be displayed asking you whether you want to save the session To save the session click the Yes button REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 75 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debug 4 8 Setting Up the Debug Register download modules set up automatic execution of command line batch files and set download options etc 4 8 1 Specifying a Download Module Choose Debug Settings from the Debug menu to open the Debug Settings dialog box Debug Settings DefaultSession Target Options 2 Target MISC E100 Emulator Default debug format JIEEEB95_RENESAS Download modules Offset Address Format Add S ICDMFIBDBIRISIPROJ OODODOCOCL IEEEB35 HENHES m Madity Remove Cancel d Figure 4 12 Debug Settings dialog box In the Target drop down list box select the product name you want to connect In the Default debug format drop down list box select the format of the load module you want to download Then register the load module corresponding to the selected format in the Download modules list box
7. 1 3 1 1 QO00000D000000000 00 00 00 001 577 090 00000004 DPFFE amp 02 16bl1 1 3 1 O QO000000000000000 00 00 00 001 577 140 00000003 OODO46 OFES lth Oo m w 1 3 1 Q0 OO00000000000000 00 00 00 001 577 190 00000002 0pn46 OFES lh DW w O 31 Q0 OO000000000R0000 00 00 00 001 577 240 oo000001 OOr044 8271 10680 PW ww i 31 Q0 OO00000000000000 D0 00 00 001 577 230 agaoooo n B271 16080 IH ww 31 Q0 OOD0O00R000000000 00 00 00 001 DOrDp042 ST 340 Figure 5 45 Trace window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 120 of 229 2 NC S AS ROE530640MCUOO User s Manual 5 Debugging Functions The following items of information are displayed This applies for bus display Table 5 13 Display items Cycle Cycle numbers stored in trace memory The last cycle acquired is numbered 0 and the older cycles are assigned smaller numbers 1 2 etc sequentially retracing the past If a delay count is set the cycle in which a trace stop condition is met is numbered 0 and the cycles that were executed until the condition is met cycles during a delay period are assigned larger numbers 1 2 etc sequentially toward the last cycle acquired Labels corresponding to addresses displayed only when labels are set Address Addresses of the address bus CAUTION When using 4M mode the address b31 will be 1b when bank 0 6 is accessed b30 28 shows the bank being accesse
8. oj x Evenb aa Events Type Descriptions Count TaskID Comment Address 00000 z BreakPoint F Address 00000 BreakPoint Figure 5 37 Hardware Break dialog box and Registered Events dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 112 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions When registering an event by dragging and dropping The event you have created can be registered in the Registered Events by dragging and dropping it into the list Hardware Break OR Registered Events ioj x Evenb Events Type Descriptions Count TaskID Comment F Address 00000 BreakPoint F Address 00000 BreakPoint Figure 5 38 Hardware Break dialog box and Registered Events dialog box When registering an event from the Registered Events dialog box Click the Add button to create an event The events you create here are added to the Registered Events Registered Events Events Type Descriptions Count Taskin Comment Delete Al Duplicate Figure 5 39 Registered Events dialog box 2 Attaching comments Attach a comment to the registered event as necessary Check the Registered Events dialog box to know the registered contents and comments REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 113 of 229 RENESAS ROE530640MCUO00 User s Manual 5 Debugging Functions
9. 213 6 4 Howto Request TOF SUDDOLE aseessa saia ea E a vain quaes uu Eds cota paite sd iiub dd unit ae su Esci s ene de cps 215 Ts FARO WANE Oe CIN a WOINS ansa utEaHe m qs eee E ER mM I PME iR edm M MM EM IE 216 7 1 Target MCU SDSCGITICaHOFIS uentos caitainives a ord wd ot Da nhu se Fa rua Vd Ra cir s avit Grade RE E V sU 216 7 2 Differences between the Actual MCU and Emulator eeesssesssesssssessseeeneeenn nennen nnns 217 7 3 Connection DIAGrAM cccccseecccceesececceeseeccuaeeecseuseeessaeeecsuaeeecseuseesssaueeecsauseessueeeessageeesssaseeessaseeessageessseaes 218 7 3 1 Connection Diagram for the ROESS0640MCUO0 ee eecccceseeeeeeeeeeeeseeeeeeseeeeeesaeeeeesseeeeeees 218 1 4 External DIMENSIONS o scSeeccisudcicncnsdensainetewncauaselenwaindueocnacienenacaind salon atesetcmeneh geainacumeciencomadalenntietcisbamme iaioneuendeimeciayeeucien 219 7 4 1 External Dimensions of the E100 Emulator ccc cccccecccceeeeeceeeeeseeeeeeeesesaeeeesaeeeeeeeeeeeeeees 219 7 4 2 External Dimensions of the Converter Board ROEO100TNPF4JOO eeeeeesees 220 7 4 3 External Dimensions of the Converter Board ROEO100TNPFKOO eseseeesees 221 7 9 Notes on Using This Product sssssssssssssssssseseseeee enne nnne nnne nnne nnn a ren nsn nn sre nnne nnns 222 8 Maintenance and Guarantee cccceecccceececceececcucecceeceeeeseeceaeeeceaeeeseu
10. Note on Final Evaluation Be sure to evaluate your system with an evaluation MCU Before starting mask production evaluate your system and make final confirmation with a CS Commercial Sample version MCU REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 217 of 229 RENESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 3 Connection Diagram 7 3 1 Connection Diagram for the ROE530640MCUOO Figure 7 1 shows a connection diagram of the ROE530640MCUOO0 This connection diagram mainly shows the circuit to be connected to the user system The circuits not connected to the user system such as the emulator s control system are omitted Table 7 2 shows IC electric characteristics of this product for reference purpose PO 0 PO 7 P1 0 P4 7 PO 0 PO 7 P1 0 P1 7 p2 0 P2_7 P3_0 P3_7 4 P20 P2_7 P3 0 P3 7 4 0 P4 7 P5_0 P5 1 P4_0 P4_7 P5_0 P5_7 P2 Q P42 7 P413 0 P13 7 VDD4 1 P12 0 P12 7 P13 0 P13 7 P6 0O P6 7 P7 0 P7 7 POR P6 0 P6 7 P7_0 P7_7 P8 0 P8 7 P9 0 P9 7 P8 0 P8 7 P9 0 P9 7 P10 0 P10 7 P11 0 11 7 P10 0 P10 7 P11 0 P11 7 P14 0 P14_ oo Ye P14 0 P14 1 AVCC AN lt lt lt lt AVCC P8_7 XCIN d P8 7 XCIN 74HC4066 P8 6 XCOUT P8 6 XCOUT 74HC4066 7491053 rbi P8 5 NMI T x 74HC4066 74HC4066 V 7481053 V 7481053 VDD1 74810953 i gt P5_5 HOLD H P5_5 HOLD P5_7 RDY CLKOUT t a P5_7 RDY
11. ROE530640MCUOO User s Manual 2 Setup 2 8 3 Using the Oscillator Circuit on the User System To operate this product with an external clock construct the oscillator circuit as shown in Figure 2 8 in the user system and input the oscillator output at 50 duty within the operating range of the evaluation MCU into pin Xw And pin Xour should be open Choose User in the emulator debugger to use this clock Evaluation MCU XIN XouT Oscillator Oscillator output circuit Figure 2 8 External oscillator circuit Make note that in the oscillator circuit shown in Figure 2 9 where an oscillator is connected between pins Xw and Xour oscillation does not occur because a converter board and other devices are used between the evaluation MCU and the user system It is the same for sub clock oscillator circuits Xci and Xcou1 Evaluation MCU XIN XOUT Figure 2 9 Circuit in which oscillation does not occur 2 8 4 Using the Internal Generator Circuit The dedicated circuit in the E100 can generate any arbitrary frequency specified by the emulator debugger and it can be supplied as a main clock It does not depend on either the oscillator circuit board in the MCU unit or the oscillator circuit on the user system If you want to debug programs without the user system or change a frequency temporarily you can check its operation before purchasing an oscillator If you want to use the internal generator circuit in the E100 as a main clock cho
12. CAUTION At this point in time no programs are downloaded yet For details on how to download refer to 5 2 Downloading a Program REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 76 of 229 2 NC S AS ROE530640MCUOO User s Manual 4 Preparing to Debug 4 8 2 Setting Up Automatic Execution of Command Line Batch Files Click the Options tab of the dialog box Debug Settings i i _ Le Aix IY Download modules alter build v Remove breakpoints on dowrioad Disable memor access until after target connection command file execution Linvt disassembly memory access Do not perfar automatic target connection v Reset CPU after download module Digable memo access by GUI when banget is executing Figure 4 13 Debug Settings dialog box Here register a command chain that is automatically executed with specified timing Select your desired timing from the following four choices When the emulator is connected Immediately before download Immediately after download Immediately after reset In the Command batch file load timing drop down list box select the timing with which you want a command chain to be executed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 77 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 9 Debugging Functions The E100 Emulator supports the functions listed in the table below Table 5 1 List of Debug Functions Item Item Specification
13. REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 6 of 229 2CENESAS ROE530640MCUOO User s Manual Precautions for safet WARNING Warnings for AC Power Supply e If the attached AC power cable does not fit the receptacle do not alter the AC power cable and do not plug it forcibly Failure to comply may cause electric shock and or fire Use an AC power cable which complies with the safety standard of the country Do not touch the plug of the AC power cable when your hands are wet This may cause electric shock This product is connected signal ground with frame ground If your developing product is transformless not having isolation transformer of AC power this may cause electric shock Also this may give an unrepairable damage to this product and your developing one While developing connect AC power of the product to commercial power through isolation transformer in order to avoid these dangers e If other equipment is connected to the same branch circuit care should be taken not to overload the circuit When installing this equipment insure that a reliable ground connection 1s maintained The rated voltage for this cable is 125 volts When you connect to a power supply of more than 125V use an appropriate cable for the voltage If you smell a strange odor hear an unusual sound or see smoke coming from this product then disconnect power immediately by unplugging the AC power cable from the
14. Task ID Exception detection NM OR AND Accumulation AND Simultaneous subroutine Hardware Event combination Hardware sequential and state transition 4 breakpoints 2 3 break Exception detection Stops collecting traces after retarded for delay cycles from when trace point is reached Repeat fill until stop Collects a total of 512 cycles before and after trace point Repeat fill until full Collects a total of 512 cycles before and after trace point OR AND Accumulation AND Simultaneous subroutine 5 Trace Event combination i Trace point sequential and state transition Exception detection See item No 3 Maximum 4M bus cycles Trace mode Fill around TP Capture Do not Capture by event Between two events Trace Capture Do not Capture Duration of an event Duration of an event occurring in a subroutine Data access instruction extraction Measures maximum minimum and average execution time in up to 8 sections and pass counts Time out and count out detection Content of measurement Performance 10 ns to 1 6 us Measurement We Between two events Event period and Interrupt disabled range Event combination mode between two events l 512 bytes x 32 blocks 7 RAM monitor Shows last read write accesses performed Comes with initialization omitted detect function 128 Kbytes x 8 blocks 1 MB space Profile ET 7 Cumulative time and pass count overflow detection 256 Kbytes x 8
15. User program This means the program to be debugged Evaluation MCU This means the MCU mounted on the emulator which is operated in the specific mode for tools This symbol is used to show Low active e g RESET Reset signal REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 15 of 229 2CENESAS ROE530640MCUOO User s Manual 1 Outline 1 Outline This chapter describes the package components the system configuration the specifications of the emulator functions and the operating environment 1 1 Package Components The ROE530640MCU00 package consists of the following items When unpacking it check to see if your ROE530640MCUO00 contains all of these 1tems Table 1 1 Package components Quanti ROES30640MCU00 MCU mounting board Oscillator module 2OMHz mounted on the IC17 socket ROE001000FLX10 flexible cable R0E530640MCUO00 Release Notes English R0E530640MCUO00 Release Notes Japanese Repair Request Sheet English Repair Request Sheet Japanese CD ROM M16C R8C E100 emulator debugger User s Manual Please keep the ROE530640MCUOO s packing box and cushion material in your place for reuse at a later time when sending your product for repair or other purposes Always use this packing box and cushion material when transporting this product If there is any question or doubt about the packaged product contact your local distributor 1 2 Other Tool Products Required for Development To bring forw
16. ree om t We PNE Gm H 20 mb aid tutorial void 22 FSRZE6 i long a i0 24 long j 25 ine i lt 26 struct Sample far p sam 2T 26 FG2ES8 p sam malloc sizeof struct sample 29 FazFD init p saml 30 31 F8309 tori i O i lt 10 i if 32 F amp 8314 j randi 33 FB3z if j lt of 354 FB325 j7 34 2S 1 36 FB3ZE afi 4 ener 37 1 i 38 FB344 e sort al Ox0006eS signed 39 F834B B H DDO0D15fb OxOO006e9 signed 40 H OOOU0167e OxO000b6ed signed ee lee a ee H DODicfb Ox0006 1 signed 42 F6362 p sam gt sl a 1 43 FB376 p sam s2 a 2 H OOO002 781 OxOO06f5 signed 44 FB838C p sam s3 a 3 H OOOO3 54 OxO006f9 signed 45 FG3 Z p sam sd a 4 H 000041c6 OxO006fd signed ae oe ee Paame Al H 0000446b Ox000701 signed 47 FG3CE p sam sb5 a 65 4B8 FB3E4 p sam s7 a 7 H OQO00S59e2 OxO00705 signed 49 FS3F p sam s8 a 8 H ODOD794b OxO00709 signed 50 F8410 p_sam s9 9 i H O00a x 00715 signed i 51 FB8426 free p sam 5a Fa8a3z p sam NULL 53 F8438 I Figure 3 22 Editor window Step Out The data of the variable a displayed in the Watch window will be sorted in ascending order REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 50 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 13 3 Executing the Step Over Command The Step Over command executes the whole of a function call as one step and then
17. 01 2008 Page 95 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 5 4 Showing the Current Status 5 4 14 Showing the Emulator Status To know the current status of the emulator display the Status window To open the Status window choose CPU gt Status from the View menu or click the View Status toolbar button E This window does not update the displayed status during program execution Status MCU status Ready Po FOOOO lIaskID iolation of access protection Read from uninitialized memory Stack access violation Performance overflow Realtime profile overflow Trace memory overflow Task stack access violation OS dispatch Run time count OO 00 00 000 000 000 Cause of last break EI Target Figure 5 13 Status window The Status window has the following four sheets Table 5 7 sheet list of status window Shows information relating to memory resources Platform Shows information relating to the emulator and debugging Shows information relating to events Shows information relating to the target MCU REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 96 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 0 4 2 Showing the Emulator Status in the Status Bar The status of the emulator can be displayed in the status bar By right clicking on the status bar the items are shown Check the items you want to show in the status bar m Debugger v Appl cabo
18. 49 Fa83F p sam s8 a 8 SO F8410 p sam sS8 a 59 51 Fadz268 free p sam 52 Faad3z2 p sam NULL 53 F6436 54 55 oid abort iwoid 56 F8433 j T Figure 3 4 Editor window setting a software breakpoint The source line that includes the sort function will be marked with a red circle indicating that a software breakpoint has been set there REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 40 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 6 Executing the Program The following describes how to run the program 3 6 1 Resetting the CPU To reset the CPU choose Reset CPU from the Debug menu or click the Reset CPU button in the toolbar 3 6 2 Executing the Program To execute the program choose Go from the Debug menu or click the Go button in the toolbar The program will be executed continuously until a breakpoint 1s reached An arrow will be displayed in the S W Breakpoints column to indicate the position at which the program has stopped 10 x BRE 2d long a 10 aii E long 3j ao int i 26 struct sample far p sam 27 20 FazEsS p sam malloc sizeof struct Sample 29 FazFD init p sam 30 31 F309 for i 0 iclO i ji 32 FB8314 j rand 33 F5320 ifij Of 34 F5325 a e 35 i 36 FR32E ala Js 37 i 38 F8344 c 39 Fa342B change al 40 41 Fa35z p sam as a u 42 Fa356z2 p sam 2al1 a 1 43 Fa3768 p sam az a z 44 Fa3aac
19. Area where cover aje can FFFFFF He measured Figure 5 105 Schematic of data coverage memory allocation 2 Changing memory allocation 5 Debugging Functions If coverage memory allocation is changed the coverage data acquired from the addresses before being changed is retrieved from coverage memory into a coverage only buffer 000000 coverage Do T0600 Figure 5 106 Schematic of data coverage memory allocation change 240000 Area where coverage can here coverage can 1 Allacation change The data accumulated in a coverage only buffer is retained until the user clears it However data is not updated for the areas that have no coverage memory allocated The coverage information shown in the Data Coverage window includes the content of the coverage only buffer REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 171 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 12 4 Measuring an Address Range The E100 emulator shows the access information it collected from a user specified address range Data Coverage l x eS SS qm zx wt X adst g006A2 s FAM e f8 ib U3 gooien Doimscs OOO addice QOOSDO RAM de 6f ac 24 RAM 23 d hd be RAN c bO di Ue RAM 99 bY d 30 i4 Address Range Task Stack Figure 5 107 Data Coverage window address specification The Data Coverage window is vertically divided into halves by a splitter The upper area shows
20. Check that power is properly supplied to the user system and that the user system is properly grounded Target is in HOLD state The MCU 1s either in stop mode or wait mode Either reset the MCU or cancel the mode with an interrupt See MCU specifications Target clock is stopped When the clock is supplied from an external oscillator check that the oscillator circuit in the user system 1s oscillating properly Target MCU is not receiving power Check that power is properly supplied to the user system and that the user system is properly grounded 4 Errors Occur at Emulator Debugger Startup Table 6 4 Checkpoints of errors at debugger startup 3 Checkpoint Target MCU is uncontrollable 1 Check that the NQPACK etc mounted on the user system is soldered properly 2 Check that the connector is installed properly to the user system REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 214 of 229 RENESAS ROE530640MCUOO User s Manual 6 Troubleshooting Action on Error 6 4 How to Request for Support After checking the items in 6 Troubleshooting Action on Error fill in the text file which 1s downloaded from the following URL then send the information to your local distributor http tool support renesas com eng toolnews registration support txt For prompt response please specify the following information 1 Operating environment V Operating frequency MHz Operating voltage EE Clock supply to the MC
21. Page 124 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 1 Fill until stop The trace memory can hold up to 4M bus cycles When the buffer is filled the oldest data of the acquired trace information is overwritten with new data That way the emulator continues acquiring trace information Table 5 15 Specifiable conditions Fill until stop Trace point setting Delay specification Capture Do not Capture Step execution recording condion setting 2 Fill until full When the trace memory of the emulator main unit overflows during trace acquisition the emulator stops acquiring trace information Table 5 16 Specifiable conditions Fill until full Trace point setting Delay specification Capture Do not Capture Step execution recording condition Possible 3 Fill around TP Trace acquisition is halted a specified number of cycles delayed after a trace point is encountered In this mode the user program continues running and only trace acquisition is halted Sophisticated conditions can be set using a maximum of 16 event points A delay value can be chosen to be 0 1M 2M 3M or 4M cycles Table 5 17 Specifiable conditions Fill around TP Trace point setting Delay specification Capture Do not Capture Step execution recording condition LT Possbe 4 Repeat fill until stop Each time a trace point is encountered a total of 512 cycles before and after that point are acquired a
22. REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 194 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 13 14 Maximum Measurement Time of the Realtime Profile 1 Maximum measurement time The timer used for performance measurement is comprised of a 40 bit counter The maximum measurement time varies with the unit of measurement selected To select a unit of measurement specify it in the Measurement interval drop down list of the Properties dialog box The measurable maximum times are listed below Table 5 43 Maximum measurement time No Resolution Maximum measurement time Approx 3 hours 03 minutes 15 seconds 2 20ns Approx 6 hours 06 minutes 30 seconds Approx 12 hours 13 minutes 00 seconds Approx 24 hours 26 minutes 00 seconds j Approx 48 hours 52 minutes 01 seconds 6 1 6us Approx 488 hours 40 minutes 18 seconds CAUTION Note that performance measurement produces an error of 2 resolution 100 ns when resolution 20 ns 140 ns whenever entering functions If the resolution is 20 ns and you enter functions 10 times 1400 ns error occurs 2 Maximum measurement count Execution counts of the realtime profile are measured using a 16 bit counter Measurement can be taken of up to a count of 65 535 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 195 of 229 2CENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 9 14 Detecting Exception Events 5 14 1 Detecting Exc
23. Type DBDesmpio 000 0 OR condition Trace point is encountered when any one of the set events occurs REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 127 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 3 Other conditions You can select one of five choices available AND Accumulation AND Simultaneous Subroutine Sequential and State Transition To set any condition select the check box to the left of Other Conditions By default other conditions are disabled the check box to the left of Other Conditions is unselected condition and combination setting v OR condition Eventim use O Detail v Okher conditions aD Accumulation Event in use 0 Detail E Total O Event Exception Exceptional Delavicvcle nS 4M events Record condition f all Capture C Do not capture Step execution is recorded Event in use 0 Figure 5 52 Trace conditions dialog box Table 5 21 Other conditions Type Description Trace point is encountered when all of the set events occur irrespective of the time axis Trace point is encountered when all of the set events occur at the same time Subroutine Trace point is encountered when a specified event occurs within a specified address range subroutine or function Trace point is encountered when a set event occurs in a specified order 3 steps 9 paths reset point Trace point is enco
24. a ial x Trace on Exception Option IF Trace Mode iude dee Fill around TP condition and combination setting v OR condition Eventinuse 0 Detail Other conditions CCC MEE Event in use Detail v Total O Event E MER Delavy cycle xceptiana events Detail 4m T Record condition f all Capture Do not capture w Step execution is recorded Detail Event in use 0 Event used O Free 16 Detail Registered events Save Load Help Apply E Figure 5 143 Trace conditions dialog box 2 The Exception page shown below will appear Click the Detail button to the right of the Violation of access protection check box Trace conditions l nl x Trace OR Exception option violation of access protection Read from a uninitialized memory Detail Stack access violation Detail Performance overflow Realtime profile overflow Task stack access violation Detail QS dispatch Event used Free 16 Detail Registered events Save Load Help Apply Ze Figure 5 144 Trace conditions dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 201 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions The Violation of access protection dialog box will be displayed The rest is the same as you opened it from the Hardware Break dialog box 5 14 4
25. 00 Apr 01 2008 Page 35 of 229 RENESAS ROE530640MCUOO User s Manual 3 Tutorial 3 Tutorial 3 1 Introduction The E100 emulator has a tutorial program available This program is provided as a means for presenting to you the main features of the emulator as will be explained in this document This tutorial program is written in C language and is created to sort 10 pieces of random data in ascending descending orders The following outlines the processing performed by the tutorial program The main function calls the tutorial function repeatedly in order to execute a sort process repeatedly The tutorial function generates the random data to be sorted and calls the sort and the change functions in that order The sort function accepts as its input an array that contains the random data generated by the tutorial function and sorts the input data in ascending order The change function accepts as its input an array that was sorted in ascending order by the sort function and sorts the input data in descending order The tutorial program is a program designed to help user to understand how to use the functions of the emulator and the emulator debugger When developing user systems and user programs refer to the user s manuals of the target MCUs CAUTION If the tutorial program is recompiled the addresses in a recompiled program may not be the same as those described in this chapter REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page
26. 0100 Rev 1 00 Apr 01 2008 Page 58 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 17 2 Showing the Trace Information Acquired by Fill around TP The point amp delay facility stops acquiring trace information a specified number of cycles after a trace point 1s encountered This facility allows you to keep track of program flow from trace information without having to break the user program 1 If any break conditions are set clear all of them 2 Choose Fill around TP for trace mode in the Trace conditions dialog box In the Delay Value Cycles column specify 4M Up to 4M cycles of trace information from where a trace point is encountered will be acquired Trace conditions Trace OR Trace Made ro bir Fill around TP condition and combination setting v OR condition Eventinuse O Detail Other conditions anoGAccumulation L Event in use 0 Detail Trace e eae J on Paint pu TP Exception Total O Event Exceptional Detail events Delayicycle mE de oz Record condition f al Capture Do not capture Step execution is recorded Event in use Event used O Free 186 Detail Registered events Load Help Apply Close Figure 3 34 Trace conditions dialog box Fill around TP E REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 59 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 Next set a
27. 16 events can be specified as hardware breakpoint conditions 5 8 2 Setting Hardware Breakpoints 1 Setting Hardware Breakpoints For hardware breakpoints you can set an OR condition other condition AND Accumulation AND Simultaneous subroutine sequential or state transition and detection of exception events The OR condition other condition and the detection of exception events can be set all at the same time or only one at a time Program execution Y OR condition gt Other conditions AND Accumulation AND Simultaneous gt Hardware Breakpoint is met Subroutine Sequential State transitions Exception event gt Delay value Break Figure 5 42 Outline of the hardware break REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 116 of 229 RENESAS ROE530640MCUOO User s Manual o Debugging Functions 2 Setting OR conditions You can choose to enable or disable the OR condition By default the OR condition is enabled To disable the OR condition deselect the check box to the left of OR Condition If you add an event by double clicking in the Editor window while the OR condition is disabled the OR condition is automatically enabled If you reenable the OR condition when it is disabled the previously set event is restored with its OR condition check box selected However if a maximum of 16 events is exceeded when you have reenabled for an event the event is restored with its OR condition chec
28. 190 O0006536 OPSATE 0649 16b 0 IW R OF 3 1 1 OO00000000000000 00 00 00 000 955 960 00006535 OFSATS 48 l6b 1 1 cw 1 1 1 OO0COOROO00R0000 00 00 00 001 019 130 00006534 OOo0o 7 20 l6b DB W i i 1 1 OOOOOOROONORO000 00 00 00 001 083 530 l6b 0 DB WM OQ E 1 00 00 00 001 147 Figure 5 61 Trace window If after filtering records in bus display mode you switch to disassemble only or source only display Auto Filter is deselected Similarly when after filtering records in disassembled display mode you switch to bus only or source only display Auto Filter is deselected REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 135 of 229 QEN ESANS ROE530640MCUOO User s Manual 5 Debugging Functions If there are multiple items you can specify in the Option dialog box these items can be used as an OR condition with which to filter Exclusion of the specified condition Cancel Figure 5 62 Option dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 136 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 9 10 Searching for Trace Records You can search the acquired trace information for a specific trace record To search for trace records use the Find dialog box To open it choose Find Find from the context menu of the Trace window or click the Find button in the toolbar Doembnalionr Find Item Cycle D Address w Data BUS O BHE Find Setting Corterts New
29. 1s the function to detect an access protect violation such as a data write to the ROM area or an access to an unused area for read write or instruction execution and outputs an error 1 Access attributes Following attributes can be specified in word units for any area Read Write Accessible for both read write Read Only Accessible for read only Write Only Accessible for write only Disable Access prohibited Disable OS Any access except from OS is prohibited this attribute is automatically assigned when a program including an OS is downloaded 2 Protected areas Any area in the entire memory space may be access protected At emulator startup the whole area is by default assigned a Read Write access attribute REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 196 of 229 2CENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 3 Methods for setting protection There are following two methods of specification Automatic setting by section information in a download module Specifying the access attribute of any area individually 4 Detection method An access protect violation is detected by the emulator s internal resources blocks 1 16 The blocks are automatically allocated by the emulator s exclusive algorithm CAUTION Since the emulator s internal resources are limited not all blocks can be access protected In that case reduce the amount of used blocks by removing blocks before setting
30. 3 tmk2 STK TASK3 00000424 0000449 Add 4 Laskx STK TASK4 QO000444 0000508 5 Laskx STK TASKS QO000404 Q00004E9 Wadi B taskx STK TASKS OO0004E4 00000809 T takx STK TASK7 OO000808 00000629 B tasky STK TASKS 00000824A 00000643 Delete 9 bask STRE TASKS QO0008464 00000869 Delete all 10 Ltaskx STK_TASK10 OO000664 00000689 11 L tesku olk TASKTT 00000854 O0000B49 i2 tek _ STK TASK12 000008AA 00000BC9 Lisa CSTKCTASKI DODDOECA GoOUDEES 14 Ltasks STK TASK14 OD D BEA QO000C09 Cancel I5ptekw STK TASE1S OD DDCAA O0000C29 Ei a Figure 5 148 Violation of task stack access dialog box 4 Click the Update button and the task stack ranges will be automatically set 5 To add a task stack range manually click the Add button The Task stack access condition dialog box shown below will appear Specify any task ID and the address range of a task stack Task stack ac Task ID 0002 Start Address 00000488 zl End Address O0000AE8 El cess condition OF Cancel Figure 5 149 Task stack access condition dialog box 6 The task stack ranges you have added will be displayed in the Address Areas list of the Violation of task stack access dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 206 of 229 QEN ESANS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 From the Trace conditions dialog box 1 In the Trace
31. 36 of 229 QEN ESNS ROE530640MCUOO User s Manual 3 Tutorial 3 2 Starting the High performance Embedded Workshop Open a workspace following the procedure described in Section 4 4 Opening an Existing Workspace For the directory specify the one that 1s given below OS installed drive Workspace Tutorial E100M 16C For the file specify the one that is shown below Open Workspace Look in E Tutorial d fe Tutorial hws File name Tutorial hws Files of type HEW Workspaces hws L ancel Figure 3 1 Open Workspace dialog box rs 3 3 Connecting the Emulator When the debugger is connected to the emulator a dialog box for setting up the debugger is displayed In this dialog box make initial settings of the debugger When you have finished setting up the debugger you are ready to debug REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 37 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 4 Downloading the Tutorial Program 3 4 1 Downloading the Tutorial Program Download the object program you want to debug Note however that the program to be downloaded and the address in the microcomputer to which downloaded differ with each microcomputer used Read the display of strings etc on the screen as suitable for the microcomputer you are using Choose Download from Tutorial x30 of Download modules By Tutorial El digg Tutorial E Dex L source file Prectar c
32. 5 7 5 Entering Events Each Time or Reusing Events There are following two methods to set events in any function concerned One method is to create events in the respective setting dialog boxes each time The other method is to choose one condition you want to use from the registered event list and drag and drop it into the condition area in which you want to set the event The former method is referred to here as entering events each time and the latter as reusing events Entering events each time This is the condition used only once The event you created is used without ever being registered After the event is used 1 e changed or removed its setting becomes nonexistent The events you create by only double clicking in the Event column of the Editor window are the one that is entered each time Reusing events Any event registered in the Registered Events dialog box can be reused by dragging and dropping it into the condition setting area of any function concerned Hardware Break OF Registered Events iB x Evenb aa Events Type Descriptions Count TaskID Comment F Address 00000 BreakPoint F Address 00000 BreakPoint Figure 5 40 Schematic of event reuse 1 Dragging and dropping into multiple functions One event in the Registered Events can be dragged and dropped into multiple functions If the content of an event is altered after being dragged and dropped th
33. 6 2 Error occurred during the self check test dialog is displayed Click the OK button Check the log in the self check dialog Refer to instructions described in the log Figure 6 2 Flowchart to check the self check error IMPORTANT Notes on the Self check 0 Be sure to execute the self check without connecting to a converter board and the user system When the self check does not result normally excluding the target status error the product may be damaged Contact your local distributor REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 212 of 229 RENESAS ROE530640MCUOO User s Manual 6 Troubleshooting Action on Error 6 3 Error at Debugger Startup 1 When the LEDs of the E100 Do Not Display Normally Table 6 1 Checkpoints of errors when the LEDs do not display normally Connection to Error Checkpoint the user system Check that the power cable is connected See 2 4 Connecting the Host Machine page 26 SAFE LED does not light up MEM Recheck the connection between the E100 and this product SAFE LED remains lit See 2 3 Connecting Disconnecting the MCU Unit to from the E100 Emulator Main Unit page 25 Target Status POWER LED Connected Check that power Vcc and GND is properly supplied to the user does not light up system and that the user system is properly grounded Target Status RESET LED does Connected 1 Check that the reset p
34. Be EVE Detail events 0 Event used O Free 16 Detail Registered events SELAT Load Help Apply Zi Figure 5 146 Hardware Break dialog box 2 The Exception page shown below will appear Click the Detail button to the right of the Task stack access violation check box Hardware Break DL x amp 8l xl Hardware Break OR Exception Violation of access protection Detail Read from a uninitialized memory Detail Stack access violation Detail Performance overflows Realtime profile overflow Trace memory overflow Task stack access violation Detail os dispatch Event used Free 16 Detail Registered events Save Load Help Apply E Figure 5 147 Hardware Break dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 205 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 3 The Violation of task stack access dialog box shown below will be displayed To have the task stack ranges automatically set when a program is downloaded select the check box labeled Automatically set address areas at downloading Yiolation of task stack access Iv Automabicaly get address areas at downloading Address areaz SEByte Block 00000 TFFF TasklD Label Start Address End Address dh 1 main STK TA amp SK 1 0000444 00000469 2 taxl STK TASE2 OO000464 00000489 Update
35. Delete Delete All Histan i02 SIU IS RAWA R ma Figure 5 63 Find dialog box Select the conditions you want to search for in the Combination column and select the check boxes In the Find Item column you can select the items that correspond to the selected conditions If you checked more than one condition in the combination column set items for each condition The items you have set are searched for as multiple AND conditions The conditions you have set are shown in the Find Setting Contents After setting search conditions click the Find Previous or the Find Next button to start a search Trace records are searched in forward or searched in reverse from the line you have clicked in the Trace window the line highlighted in blue When a matching trace record is found by a search the relevant line in the Trace window is highlighted If no matching trace records are found a message dialog box is displayed When an instance of the trace record was successfully found choose Find Previous or Find Next from the context menu The next instance of the trace record will be searched for REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 137 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 1 Search history The conditions once searched are left as a history in the history column while the High performance Embedded Workshop remains active The next time you perform a search choose the line you want to sear
36. Fa83z25 qom ce 35 i 36 FesS2E ali j af t 30 Feas44 sortial 4 insi Sowas fo Figure 3 3 Editor window displaying the source program If necessary you can change the font and font size to make text more easily readable For details on how to change refer to the High performance Embedded Workshop User s Manual The Editor window initially shows the beginning of a program Using the scroll bar you can look at another part of a program REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 39 of 229 QEN ESNS ROE530640MCUOO User s Manual 3 Tutorial 3 5 Setting Software Breakpoints Software breakpoints are one of simple debug facilities The Editor window permits you to set software breakpoints easily For example you can set a software breakpoint at a place where the sort function is called Double click a row in the S W Breakpoints column corresponding to the source line that includes a sort function call 10 x BKE ar 20 FazES8 p sam malloc sizeof struct sample 29 FazFD initip sam 30 31 F309 fori i i ci1D i ji 32 F8314 j randi 33 F320 ifij aif 34 Fa3z25 q es eqs 35 i 36 Fa3zE ali Jj 37 I 38 Fa324 sort al 39 Fa342B Change al 40 41 Fa35z p sam as a u 42 Fa3asez p sam sl a 1 23 F376 p sam asz a z 4 Fa3ac p sam s3 a 3 45 Fa3A z p sam 4 a 4 6 Fa3Ba8 p sam a5 a 5 47 FSG3CE p sam s6 a 6 45 FB3Ed p sam a a T7
37. Main Unit page 25 v Connect the USB interface connector of the emulator and the USB 5 Connect the host machine port of the host machine v 6 Connect the emulator power supply Connect an emulator power supply to the power connector v 7 Turn on the power supply Turn ON the power to the emulator v Check that the system status LED is lighting When the user system 8 Check the LED display of th lator l e spese R is not connected the POWER LED does not light up v When using the emulator debugger for the first time try to use the 9 Try to use the emulator debugger according emulator functions referring to 3 Tutorial page 36 to the tutorial If the emulator debugger does not start follow steps 10 through 13 in this chart to perform a self check v 10 Start up the High performance Embedded Workshop and create a Embedded Workshop project by following 4 Preparing to Debug page 67 v j Start up the High performance Embedded Workshop to launch the High performance Embedded Workshop emulator debugger by following 4 Preparing to Debug page 67 v Set Device Setting dialog box of the emulator debugger and check Set up the target MCU and system Start booting up on successful completion of self checking by following 4 Preparing to Debug page 67 v 13 Execute self check Figure 2 1 Flowchart of starting up the emulator For the first time REJ10J1733 0100 Rev 1 00 Apr
38. Note that users without administrator rights cannot complete the installation When you insert the included CD ROM to a CD ROM drive a message will appear Install the software following a displayed message A dialog for entering the user information user company address install destination will appear The entered information will be formatted in the user registration sheet by mail REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 24 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setu 2 3 Connecting Disconnecting the MCU Unit to from the E100 Emulator Main Unit Figure 2 3 shows the procedure for connecting the MCU Unit to the E100 Emulator Main Unit Connecting MCU Unit ROE530640MCU00 Push the MCU unit down to check it is attached properly E100 emulator main unit ROEO001000EMUOO Disconnecting Figure 2 3 Connecting Disconnecting the MCU Unit to from the E100 Emulator Main Unit A CAUTION Note on Connecting the MCU Unit to the E100 Emulator Main Unit Always shut OFF power when connecting the MCU unit to the E100 emulator main unit Otherwise internal circuits may be damaged REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 25 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setup 2 4 Connecting the Host Machine USB interface is used for connecting the emulator to the host machine The USB cable is connected to the USB cable connector of the emulator and the USB port of the host machine Figure
39. ROEO100TNPFKOO air REV A I 1 Unit mm Figure 7 4 External dimensions and a sample foot pattern of the ROE0100TNPFK00 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 221 of 229 RENESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 5 Notes on Using This Product Notes on using this product are listed below When debugging the MCU using the emulator be careful about the following precautions IMPORTANT Note on the Version of the Emulator Debugger Be sure to use this product with the following emulator debugger M16C R8C E100 Emulator debugger V 1 00 Release 00 or later Notes on Downloading Firmware Before using this product for the first time it is necessary to download the dedicated firmware emulator s control software installed in the flash memory in the E100 If you need to download at debugger startup a message will appear Download the firmware following the message Do not shut off the power while downloading the firmware If this happens the product will not start up properly If the power is shut off unexpectedly redownload the firmware Download the firmware with the user system not connected Notes on Self check If the self check does not result normally excluding user system errors the product may be damaged Then contact your local distributor e Run the self check with the user system not connected Note on Quitting the Emulator Debugger 0 To restart the emulator deb
40. Sub Clock CIN 33 0 kHz Setting of debugging mformation v Close the dialog box when the connection is completed Cancel Figure 5 6 Connecting dialog box 1 Showing the history of processing The history display area on the left hand side of the dialog box shows the history of completed processing The contents shown here are recorded in a trouble report To check the content of a trouble report select Technical Support gt Create Bug Report from the Help menu 2 Showing the pin states The pin states are displayed after the completion of the emulator s startup process If the contents set in the Device setting dialog box and the pin states shown here do not match a warning message is displayed in the history display area 3 Showing the clocks The clocks are displayed after the completion of the emulator s startup process Only the actually operating clocks are displayed here REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 87 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 4 Showing progress with progress bars The upper progress bar shows the progress of the entire boot up processing The lower progress bar shows the progress of each individual processing The content of the currently executed processing is displayed below the bar 5 Aborting a connection Clicking the Cancel button aborts boot up processing REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 88 of
41. Use caution when handling the main unit Be careful not to apply a mechanical shock Do not touch the connector pins of the emulator main unit and the target MCU connector pins directly Static electricity may damage the internal circuits Do not pull this emulator by the communications interface cable or the flexible cable And excessive flexing or force may break conductors Do not flex the flexible cable excessively The cable may cause a break Do not use inch size screws for this equipment The screws used in this equipment are all ISO meter size type screws When replacing screws use same type screws as equipped before Caution to Be Taken for System Malfunctions Qo e If the emulator malfunctions because of interference like external noise shut OFF the emulator once and then reactivate it REJ10J1733 0100 Rev 1 00 Apr 01 2008 page Oley RENESAS ROE530640MCUOO User s Manual Contents Contents Page wil ate 3 HUY AIM NERO NN 4 miserie me diei MN m Es 6 COPT eea e UI E NE 9 SE SI SU QU OU RETO Om 14 FTI OGY m 15 de UVES seta es O H 16 1 1 Fackage Components MT E E 16 1 2 Other Tool Products Re
42. User s Manual 5 Debugging Functions 5 9 4 Setting Trace Modes 1 Setting trace modes Following five trace modes are available Table 5 14 Trace modes Stopmod Desmp on O o Fill until stop Trace acquisition continues until the program stops running 2 Fill until full Trace acquisition stops when the trace memory is filled 3 Fill around TP Trace acquisition stops a specified number of cycles after a trace point is encountered A delay value can be specified in a range of up to the maximum value of trace capacity Repeat fill until stop Each time a trace point is encountered acquisition is made for a total of 512 cycles before and after that point and acquisition continues that way until the program stops running 5 Repeat fill until full Each time a trace point is encountered acquisition is made for a total of 512 cycles before and after that point and acquisition continues that way until the trace memory is filled CAUTION Recording is made in units of total 512 cycles consisting of 1 cycle at the line where a trace point is met and 255 cycles before that point and 256 cycles after that point Execution start trace paint is encountered Delay trace paint is encountered trace paint is encountered Execution stop Figure 5 49 Differences between the trace modes Specifiable conditions vary depending on trace mode as summarized in the table below REJ10J1733 0100 Rev 1 00 Apr 01 2008
43. 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 other product characteristics Renesas shall have no liability for
44. an instruction cue but in the cycles executed by the CPU Data access An event is detected when a specified address or specified address range 1s accessed under a specified condition Interrupt Detection is made of an interrupt generation and interrupt termination Trigger input An event is detected when the signal fed in from external trigger signal input cable is in a specified state 2 Event combination One of the following combinatorial conditions can be specified using two or more events in combination Table 5 10 Event combinations list Condition is met when any one of the specified events occurs AND Accumulation Condition is met when all of the specified events occur irrespective of the time axis AND Simultaneous Condition is met when all of the specified events occur at the same time Condition is met when a specified event occurs within a specified address range Sequential Condition is met when a specified event occurs in a specified order Condition is met when an event occurs under the condition specified in a state transition State transitions diagrami 5 7 2 Adding Events Follow one of the following methods to add events Create a new event Add by dragging and dropping from another window Add from the command line REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 104 of 229 RENESAS ROE530640MCUOO0 User s Manual 5 Debugging Functions 1 Creating a new event When creating an event fro
45. and Showing the Emulator Status 5 5 1 Periodically Reading Out and Showing the Emulator Information To know the changing emulator information whether the user program is running or remains idle use the Extended Monitor window The extended monitor function only monitors the signals output from the user system or MCU and does not affect execution of the user program To open the Extended Monitor window choose CPU gt Extended Monitor from the View menu or click the Extended Monitor toolbar button it The displayed items are updated at an interval of about 1 000 ms during user program execution or about 5 000 ms during a break CAUTION CPU Clock can be measured only when a user program is being executed Extended Monitor N x E Item Value User System Connection DISCONNECT Disconnect CHN CNHN1 CNNZ User System Power Source DISCONNECT Vccil 0 6 v Vcc2 0 4 v User System RESET High User System NMIZ High User System CNY ss User System HOLD High User System RDY High User System BYTE User System MODE Not support CPU Clock Can not measure Main Clock XIN Enulator 20 0 MHz Sub Cloek ZC1IN Emulator 33 0 kHz Figure 5 17 Extended Monitor window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 98 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 5 2 Selecting the Items to Be Displayed Choose Properties from the context menu of the Extended Monitor window and the Ext
46. cccccccccseeeeeeeeeeeeeeaeeeeesaeeeesseeeeeeseaeeeesaaneeesaaeees 193 5 13 11 Clearing Realtime Profile Measurement ReSUItS ceccccccseeeeeceeeeeceeeeeeeeeeeeeeseeeeeesaaeeeesneeees 194 9 13 12 Saving Realtime Profile Measurement Results eesssseessseseseneeeenennnene 194 5 13 13 Setting the Unit of Measurement essssssssssssssssssesee senem nnne nnne nnns 194 5 13 14 Maximum Measurement Time of the Realtime Profile sseeeeeseeeeeeeeeeee 195 5 14 Detecting Exception Events uires sexwalundmwneedssdeausiadawnadundanundiscosuelans inndtamennaeidasaveclus bbeswddddavuin uU S uM I paEU A 196 5 14 1 Detecting Exception Events ccccccccseceesseeeeeeeeeceeeeeseeeeeseeeeeseeeesseeeseeeseaeeeseneesseneesseeeesaeeeeees 196 9 14 2 Detecting an Access Protect Violation cccccccccecseeeeceeeeeseeeeeseeeeeaeeeeeeeeessaueesaaeeesseeeeseaeensaes 196 5 14 3 Setting an Access Protected Area ccccccccccecseeeeeceeeeeeeseeeeeeeeeseesseeseeesaeeeeeseeeeeseeeeessaneeesnaeeees 198 0 14 4 Detecting Initialization Omitted lsseeessssssssseseseseeeeeneennn nennen nnns 202 5 14 5 Detecting a Performance Overflow sssssssssssssseseseeeenee nenne nnne nnn nnns 203 5 14 6 Detecting a Realtime Profile Overflow ssesssssseesseseseenneeenennennnnm nnne 203 5 14 7 Detecting a Trace Memory Overflow ssssss
47. converter board for connecting the user system The emulator herein does not include the customer s user system and host machine Purpose of use of the emulator This emulator is a device to support the development of a system that uses the M16C Family M16C 60 Series M16C 64 Group of Renesas 16 bit single chip MCUS It provides support for system development in both software and hardware Be sure to use this emulator correctly according to said purpose of use Please avoid using this emulator for other than its intended purpose of use For those who use this emulator This emulator can only be used by those who have carefully read the user s manual and know how to use it Use of this emulator requires the basic knowledge of electric circuits logical circuits and MCUs When using the emulator 1 This product is a development supporting unit for use in your program development and evaluation stages In mass producing your program you have finished developing be sure to make a judgment on your own risk that it can be put to practical use by performing integration test evaluation or some experiment else 2 In no event shall Renesas Technology Corp be liable for any consequence arising from the use of this product 3 Renesas Technology Corp strives to renovate or provide a workaround for product malfunction at some charge or without charge However this does not necessarily mean that Renesas Technology Corp guarantees the renovation
48. corresponding row in the S W Breakpoints column again 3 19 What Next In this tutorial we have introduced to you several features of the E100 emulator and how to use the High performance Embedded Workshop The emulation facility that the E100 emulator provides allows you to perform advanced debugging Once the conditions that cause hardware or software problems to occur are exactly separated and identified by that debugging you can examine those problems effectively REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 66 of 229 QEN ESNS ROE530640MCUOO User s Manual 4 Preparing to Debug 4 Preparing to Debug 4 1 Starting the High performance Embedded Workshop Follow the procedure described below to start the High performance Embedded Workshop 1 Connect the host machine and the E100 Emulator and user system Then turn on the power to the E100 Emulator and user system 2 From Programs on the Start menu choose Renesas gt High performance Embedded Workshop gt High performance Embedded Workshop The Welcome dialog box shown below will appear W elcame A1 x OK ca es te oc Wr IT eee OF F3 Cancel C Open a recent project workspace Administration C Browse to another project workspace c3 Figure 4 1 Welcome dialog box Select a startup method from the following Create a new project workspace Open a recently used project workspace Select this option when you
49. dq oH CE FEl1BC m LUE DFEIBE FE218 i100 ENNN s Add Range Edit Range OFE 102 ENTER i OFEIO5 MOY Wi Gaan DFElUB MOV VW o gap 5 OFEIOB CMP W d while gap 4 Alb Address Range Source Figure 5 80 Code Coverage window 2 In the Edit Address Range dialog box that 1s displayed change the address range Edit Address Range Start Address f El Lx Enden afta poses Figure 5 81 Edit Address Range dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 154 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 3 The address range you have changed will be displayed in the upper area of the Code Coverage window Code Coverage eS er OC dy d DFE224 FE376 OFEIBE OFEZ16 100sm 100 e ERR Executed Pass Address Assenbler_ Source E OFEZZ4 ENTER FEZ27 PUSH W p sane mal UIFEZZB PUSH W OFEZZF JSR A 4 A Hf Address Range Source Figure 5 82 Code Coverage window 5 11 7 Removing Address Ranges Follow the procedure described below to remove address ranges 1 From the Address Range sheet of the Code Coverage window 1 Select an address range you want to remove in the Address Range sheet and while holding it selected choose Delete Range from the context menu Code Coverage ee ee UFES76 3059 ra EE DFEIBE FE218 ot DUSUU Add Rang
50. i i 1 OO00000000000000 00 00 00 001 622 530 Figure 3 32 Trace window bus and disassemble mixed display REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 57 of 229 RENESAS ROE530640MCUOO User s Manual 3 Tutorial 5 Furthermore choosing Display Mode gt SRC from the context menu you can display trace information in a bus disassemble and source mixed mode V B Saxa kE Edp aaa Range 00007514 00000000 File Cycle 00000061 1A ddress OF82CE T Time 00 00 00 001 629 030 tuu Label Address Data BUS m a u WT c CPU ME m ug EV imeStamp o0000061 OF82CE T3FE 16b ooooo00000000000 TE 00 00 001 629 030 00000060 OF82CE FE 16b i i ooooo00000000000 O00 00 00 001 629 080 62 ali tmp 9 i ADD W G ZH FB Al 00000059 OF82CE FE 16b 00000058 OF82D0 7367 16b 00000057 OOO6DE O6E5 16b id oooo000000000000 IW R ooo0o00000000000 DW R 0 oooo000000000000 MOV T G 00000056 OOO6DE E5 16b 00000055 OF82D2 0289 16b 00000054 0006B4 OFF6 16b DW R sort c 62 ali tmp 9 i OF82D1 MOY W G OZH AQ 02H A1 00000053 000709 F6 15b 0 DW W 0 ooooo00000000000 00 00 00 001 629 430 00000052 000704 OF 16b 1 DW w 0 o00000g0g0g0g0000000 00 00 00 001 629 480 gt A0 A1 1 oo00o000000000000 IW R 0 oooo000000000000 0 ooo0000000000000 1 0 0 62 ali tmp 9 i 1 0 0 Figure 3 33 Trace window bus disassemble and source mixed display REJ10J1733
51. in which you want a workspace to be created Or you can click the Browse button and select a workspace directory from the ensuing list CPU family Select the CPU family of the MCU you are using Toolchain To use a toolchain select the appropriate toolchain here If you do not use select None The other list boxes are used for setting up a toolchain If no toolchains are installed the information specific to the CPU family is displayed here Click the OK button 3 Set the CPU and options for the toolchain and make other necessary settings 4 Select the debugger target Setting the Target System for Debugging M16C E100 Emulator Target type All Targets TOW EETON E mE Figure 4 8 Setting the Target System for Debugging dialog box Select the target platform you use by placing a check mark in its check box and click the Next button REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 71 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debu 5 Set a configuration name Setting the Debugger Options a x Target name MIEC E100 Emulata Configuration name Debug M1BC ETUU Emulator Detail options Value Madity Mes Finish Cancel Figure 4 9 Setting the Debugger Options dialog box If you have selected two or more target platforms click the Next button and then set a configuration name for each target platform selected When you have finished setting configurat
52. it or replace it with new one with extra charge Misuse abuse or use under extraordinary conditions Unauthorized repair remodeling maintenance and so on Inadequate user s system or misuse of it Fires earthquakes and other unexpected disasters In the above cases contact your local distributor If your product is being leased consult the leasing company or the owner 8 4 Repair Provisions 1 Repairs not covered by warranty The products elapsed more than one year after purchase are not covered by warranty 2 Replacement not covered by warranty If your product s fault falls in any of the following categories the fault will be corrected by replacing the entire product instead of repair or you will be advised to purchase new one depending on the severity of the fault Faulty or broken mechanical portions Flaw separation or rust in coated or plated portions Flaw or cracks in plastic portions Faults or breakage caused by improper use or unauthorized repair or modification Heavily damaged electric circuits due to overvoltage overcurrent or shorting of power supply Cracks in the printed circuit board or burnt down patterns Wide range of faults that makes replacement less expensive than repair Unlocatable or unidentified faults REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 226 of 229 QEN ESAS ROE530640MCUOO User s Manual 8 Maintenance and Guarantee 3 Expiration of the repair period When a period of
53. no dew Table 1 7 Operating environment of the host machine IBM PC AT compatibles OS Windows XP 1 Windows 2000 Pentium IV 1 6 GHz or more recommended Interface USB 2 0 2 USB20 9 0 recommended connected to the host machine Needed to install the emulator debugger or refer to the user s manual Notes 1 Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries 2 USB interface does not guarantee the operations with all combinations of host machine USB device and USB hub REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 21 of 229 2CENESAS ROE530640MCUOO User s Manual 2 Setup 2 Setup This chapter describes the preparation for using this product the procedure for starting up the emulator and how to change settings 2 1 Flowchart of Starting Up the Emulator The procedure for starting up the emulator is shown in Figures 2 1 and 2 2 For details refer to each section hereafter If the emulator does not start up normally refer to 6 Troubleshooting Action on Error page 211 l Check the package components Refer to 1 1 Package Components page 16 v 2 Refer to User Registration page 14 v 3 Install the included software etc Install them from the included CD ROM v Connect the MCU unit to the E100 main Refer to 2 3 Connecting Disconnecting the MCU Unit to from the 4 on unit E100 Emulator
54. of task stack access dialog box will be displayed The rest is the same as you opened it from the Hardware Break dialog box 5 14 10 Detecting an OS dispatch This function becomes valid when a load module including an OS is downloaded It detects that task dispatch occurred 1 Actions taken when an OS dispatch is detected The following actions can be set Display a warning Selecting the OS dispatch check box on the Exception Warning page of the Configuration properties dialog box you can display a warning in the Status window and in a status bar balloon Set the detection of an OS dispatch as a condition of a hardware breakpoint Set the detection of an OS dispatch as a condition of a trace point REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 208 of 229 QEN ESNS ROE530640MCUOO0 User s Manual 5 Debugging Functions 5 15 Using the Start Stop Function The emulator executes the specified routine of the user program immediately before starting and immediately after halting program execution This function is used to control the user system in synchronization with execution and halting of the user program 5 15 1 Opening the Start Stop Function Setting Dialog Box The routine executed immediately before starting and immediately after halting the user program execution is specified in the Start Stop function setting dialog box To open the Start Stop function setting dialog box choose Setup gt Emulator gt Start Stop fun
55. only automatic registration Up to three instances of the Data Coverage window can be opened at the same time 5 12 3 Allocating Data Coverage Memory Hardware Resource 1 Memory allocation Before data coverage can be measured data coverage memory must be allocated to the addresses at which to be measured Coverage data can be obtained from only the address range that has had memory allocated To allocate data coverage memory use the Allocation of Data Coverage Memory dialog box To open it choose Hardware Settings from the context menu of the Data Coverage window Allocation of Data Coverage Memory i x Allocation of Coverage Memory Address 0000n OFFFF l H Add 10000 1FFFF 2 E DDDO EFFFF 4 Clear 4 FOOOO FFFFF Figure 5 104 Allocation of Data Coverage Memory dialog box The emulator permits any of 1 8 blocks maximum 512 Kbytes each beginning with the 64 Kbyte boundary to be specified as a data coverage measurement area Contiguous blocks or noncontiguous blocks either one can be set With initial settings the coverage memory is allocated to addresses in the ROM and RAM areas REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 170 of 229 QEN ESAS ROE530640MCUOO User s Manual DOLO CODI D TODO D1FFFF 240000 age can 2 4F FFF FEQ000 a where coverage can ured he meas FFOOOU P P ABlbuJULET J L LPL RLE LAEL JUL ULOESR
56. or the provision under any circumstances 4 This product has been developed by assuming its use for program development and evaluation in laboratories Therefore it does not fall under the application of Electrical Appliance and Material Safety Law and protection against electromagnetic interference when used in Japan 5 Renesas Technology Corp cannot predict all possible situations or possible cases of misuse where a potential danger exists Therefore the warnings written in this user s manual and the warning labels attached to this emulator do not necessarily cover all of such possible situations or cases Please be sure to use this emulator correctly and safely on your own responsibility 6 This product is not qualified under UL or other safety standards and IEC or other industry standards This fact must be taken into account when taking this product from Japan to some other country REJ10J1733 0100 Rev 1 00 Apr 01 2008 Paden Olrey RENESAS ROE530640MCUOO User s manual Important Usage restrictions This emulator has been developed as a means of supporting system development by users Therefore do not use it as a device used for equipment embedded applications Also do not use it for developing the systems or equipment used for the following purposes either 1 Transportation and vehicular 2 Medical equipment where human life is concerned 3 Aerospace 4 Nuclear power control 5 Undersea repeater If you are consid
57. p sam aa3 a 3 45 FaG3A z p sam a4 a 4 6 Fa3B8 p sam s5 a 5 47 F83CE p sam s6 a 6 48 F amp 3E4 p sam s 7 a 49 F83F p sam s8 a 8 50 F6410 p sam gt s9 al 9 51 F6426 free p sam 52 Faa3z p sam NULL Figure 3 5 Editor window program at a break REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 41 of 229 2 NC S AS ROE530640MCUOO User s Manual 3 Tutorial The Status window permits you to check the cause of the break that last occurred Choose CPU gt Status from the View menu or click the View Status toolbar button Fal When the Status window is displayed open the Target sheet in it and check EL 03 Status Ready PC FB344 TaskID iolation of access protection Read from uninitialized memory Stack access violation Performance overflow Realtime profile overflow Trace memory overflow Task stack access violation OS dispatch Run time count 0 00 00 001 396 700 Cause of last break software break Figure 3 6 Status window CAUTION The contents displayed in this window differ with each product For details about the displayed contents of each product refer to Chapter 3 Debugging or online help 3 7 Checking Breakpoints Use the Breakpoints dialog box to check all software breakpoints set 3 7 1 Checking Breakpoints Press the keys Ctrl B on the keyboard of your PC The Breakpoints dialog box shown below wil
58. s1 0 13 FSG ED p sam sz D i3 FB8i1 05 ce p sam 53 0 14 FS511D p sam s4 D 15 F28135 p sam s5 D 16 FSl14D p sam 6 D m 4 d we Figure 5 22 Editor window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 102 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 From the Breakpoints dialog box 1 Select Source Breakpoints from the Edit menu to bring up the Breakpoints dialog box In this dialog box you can alternately enable or disable a currently set breakpoint as well as remove it Breakpoints 3 x Cancel Edit Code Remove Lilek Remove All Figure 5 23 Breakpoints dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 103 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 7 Using Events 5 7 1 X Using Events An event refers to a combination of phenomena that occur during program execution The E100 emulator permits you to use the event you have set as a condition of the break trace or performance function Events can be set at up to 16 points at the same time These 16 points can be located at any desired positions The events you have created can be registered for reuse at a later time 1 Types of events There are following types of events Table 5 9 Event types list Instruction fetch An event is detected when an instruction at the specified address 1s executed by CPU An event is detected not in the cycles prefetched by
59. source display is possible Choosing Display Mode gt DIS from the context menu you can display trace information in a bus and disassemble mixed mode mw m F2zz relied bi alaaa Cycle Label Address Data BUS BHE EIU B W RWI CEU ON BUE Deb EV 1 4 1 000000 60 UFBZCH FE 1l6b 1 1 QOOOUUUUDUOUODUDOO UO 00 00 001 621 9390 UPBZCC ADD W G H FE Al 00000058 OPS2cH FE lb i i cw 2 1 1 OO00000000000000 00 00 00 001 621 950 00000054 pFB2pPO0 7367 i168 0 IM R O RE 3 1 1 OODO000000000000 00 00 00 001 622 030 00000057 OO06Pe O8BS i166 0 rm E 0 3 1 1 unoDODOOGDODOODODO 00 00 00 001 622 0830 IF 2 CEF BOV HiG A0 A1 00000056 OO0ePe E5 ibi 1 cw 11 1 OODO000D00000000 00 00 00 001 6223 130 00000055 FB2Dz 0269 ib O IM R 0 3 1 1 un onagdOODODODDODO 00 00 00 001 622 130 00000054 OO06B4 PfG ith 0 w R 0 3 1 1 ug aUODOODODDOODO 00 00 00 001 622 230 DFB2D1 HOV Wri OZH AO OZH AL 00000053 000709 FB l6b U Du W 0 cH 1 1 1 OO00O0R000000000 00 00 00 001 622 2390 O0000052 UDO TOA 0F l b 1 Dg M D RB D 1 1 OOOCO0R000000000 00 00 00 001 622 330 QO0000051 DDSB6 OOOO l6b U DW EB U 1 l QOOODOU0D0U00D000000 DO 00 00 001 622 390 o0000050 FB2D4 c 16b 0 IM R O 2 1 1 O800000000000000 00 00 00 001 622 430 o0000049 FB2D6 FCIB lth mW E O RB 3 1 1 O800000000000000 00 00 00 001 622 4390 JFo b3 ADD W Q I IH 4H EB z 00000044 no 08 OO ith 0 m xw OO cw
60. stops at the next statement of the main program To execute all statements in the change function at a time choose Step Over from the Debug menu or click the Step Over button in the toolbar P Figure 3 23 Step Over button f Tutorial c l E x e Sle 14 oid mainivoid E 15 Faznhc 1 16 FaGzLnhCc while Lif 17 FGzEU turtorialil 1 amp 5 F82E3 t 3LE ONE WS H 20 zi aid tutorial void 22 UTES IgE 1 23 long a 10 Er long j oo i e i 26 struct Sample far p sam 2T 260 FG2ES8 p sam malloc sizeof struct sample 29 F62FD init p saml 30 31 F309 tori i O ici10 i if 32 FB8314 j randi 33 F8320 ifti lt Oli 34 FB8325 j j 35 1 36 FB32E afi j UxDO06es 37 i 38 FB8344 sort aj H OOOO794h OxO0006e5 38 FB834B change aj H 000059e2 Ox0006e9 signed 40 H OOO0446h OxO006ed signed ee cee gt H OOO041e6 OxO006f1 signed 42 F6362 p sam gt sl a 1 43 FB376 p sam s2 a 2 H OOOO3 54 OxOO006fS signed 44 F838C p sam s3 a 3 H 00002781 OxO006f9 signed 45 FG3 Z p sam sd a 4 H O0001efh xOD0D amp 6fd signed pud eee poe ea H O000167e OxO00701 signed 47 FG3CE p sam sb5 a 65 48 FB3E4 p sam s7 a 7 H nngistfh OxO00705 signed 49 FS83F p sam 58 a 8 H ODODDff amp Ox000709 signed 50 Fa410 p sam sS a S j H OO0a OxOOO71S signed int 51 F8426 free p sam 5a Faad3z p sam NULL 53 F8438 H Figure 3 2
61. task stack was attempted from another task 1 Initial settings at startup At startup the check box labeled Automatically set address areas at downloading is selected flagged by a check mark However because address information is nonexistent the function does not work until a program is downloaded 2 Actions taken when a task stack access violation is detected The following actions can be set Display a warning Selecting the Task stack access violation check box on the Exception Warning page of the Configuration Properties dialog box you can display a warning in the Status window and in a status bar balloon Set the detection of a task stack access violation as a condition of a hardware breakpoint Set the detection of a task stack access violation as a condition of a trace point REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 204 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 14 9 Setting a Task Stack Area Follow the procedure described below to set a task stack area 1 From the Hardware Break dialog box 1 Select the Exception check box on the Hardware Break sheet and then click the Detail button nl x Hardware Break Hardware Break on Exception condition and combination setting wv OR condition Event in use 0 Detail Other conditions anDtAccumulation MUERE TET Event in use 0 J amp Earil Total O Event Del le Exceptional
62. the exit of the function where return statement is written as an end event If there are more than one exit set fetch conditions as an end event for each exit 2 Selecting the unit of measurement This setting is applied in common to all of 8 sections The unit of measurement can be selected from the following options 10 ns 20 ns initial value 40 ns 80 ns 160 ns 1 6 us The maximum measurement time varies with the unit of measurement you set 5 10 4 Starting Performance Measurement When the user program is run performance measurement is automatically started according to the performance measurement conditions set When the user program is halted the measurement result is displayed in the Performance Analysis window When the user program is rerun without changing measurement conditions after being halted the measured time in this instance is added to the previously measured value To perform a measurement over again clear the measurement result before running the program REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 145 of 229 RENESAS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 10 5 Clearing Performance Measurement Conditions Select the measurement condition you want to clear in the Performance Analysis window and then choose Set from the context menu to display the Performance Analysis Conditions dialog box In the Performance Analysis Conditions dialog box disable the condition you want to clear ZEIBS
63. the user system using the ROEOI00TNPFJOO not included For details on the ROEO0100TNPFJOO not included refer to its user s manual 1 Attach the NOPACKIOORB included with the ROEO100TNPFJOO to the user system 2 Attach the YOPACKIOORB included with the ROEO0100TNPFJOO to the NQPACKIOORB and secure it with the YQ GUIDEs 3 Attach the ROEO1OOTNPFJOO to the YOPACKIOORB 4 Attach the CN2 side of the ROEOIOOTNPFJOO to the CN2 side of the flexible cable 5 Attach the CN1 side of the ROEOIOOTNPFJOO to the CN1 side of the flexible cable Evaluation with y RN actual MCU HQPACK100RB168 YQ GUIDE x4 not i YQPACK100RB c These corners FLASH version are not round NQPACK100RB MCU etc 100 pin 0 65mm pitch PRQP0100JD B foot pattern No 1 pin These four products are User system available in one package Figure 2 11 Connecting to a 100 pin 0 65mm pitch foot pattern A CAUTION Notes on Connecting the User System Take care not to attach a converter board in a wrong direction It may cause a fatal damage to the emulator and user system The connectors of the ROE0100TNPFJOO are guaranteed for only 50 insertion removal iterations For purchasing the HQPACK100RB168 contact the following Tokyo Eletech Corporation http www tetc co jp e index htm REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 34 of 229 RENESAS ROE530640MCUO0 User s Manual p Setup 2 9 2 Connecting to a 100 pin 0 5mm Pitch F
64. use an existing workspace A history of the workspace you open will be displayed Browse another project workspace Select this option when you use an existing workspace This is the option available to choose when the workspace you opened has no history recorded REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 67 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debug 4 2 Creating a New Workspace Toolchain Unused The procedure for creating a new project workspace differs depending on whether you use a toolchain or not The E100 Emulator has no toolchains included in it You can use a toolchain in an environment in which the C C compiler package is installed Follow the procedure described below to create a new workspace 1 In the Welcome dialog box select the radio button titled Create a new project workspace and click the OK button Welcome 2 x Administration Cancel E Figure 4 2 Welcome dialog box 2 Project Generator will start Mew Project Workspace x Projects Workspace Mame _ ooo Project Hame p M Directory C works pace Test CPU family MIEC Tool chain Hone Project Types P Debugger only M16C E100 E Properties Figure 4 3 New Project Workspace dialog box Workspace Name Enter a workspace name here Project Name Enter a project name here If the same name as a
65. window to display the elements comprising the class instance p sam Look at the elements of the class instance p sam before and after the sort function is executed to confirm that random data is sorted in descending order 3 13 Single Stepping a Program The High performance Embedded Workshop provides various step commands that will prove useful in debugging a program Table 3 1 Step Options Step In Executes a program one statement at a time including statements in a function Step Over Executes a program one statement at a time by stepping over a function call if any Step Out After exiting a function stops at the next statement of a program that called the function Single step a program a specified number of times at a specified speed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 48 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 13 1 Executing Step In Command The Step In command steps in a called function and stops at the first statement of the called function To enter the sort function choose Step In from the Debug menu or click the Step In button in the toolbar m Figure 3 19 Step In button Bot g init struct Sample p sam Bg Faoce 1 10 Fsocs 11 FsoD le FOOED 13 F8105 14 Fa8llD LS P3 15 F814D 17 F3165 18 F81 LD 19 F8195 20 FaGlAD S il 22 di p sam s0 p sam ss1 p sam 5Z p sam 53 p sam s4 p sam 55 p sam 56 p sam 57 p sam 58 p sa
66. xODDS5fl signed long R 4 H OOOO794h UxOO06fS P signed long m R 5 H DDO15fb xO DD5f9 signed long pu R 6 H OOO00S9e2 x DD5fd signed long 9 R 7 H O DDO1cfb xODD70U1 signed long s R 8 H DBDOSfIS4 xO DD7US signed long R 3 H DDODfIfS5 xODD7OUS signed long num R i H O00a 0x000T1S Signed int AI Eh watcha Figure 3 17 Watch window showing array elements REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 47 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 12 Showing Local Variables Using the Local window you can display the local variables included in a function As an example let s check the local variables of the tutorial function This function declares three local variables j 1 and p sam Choose Symbols Local from the View menu or click the Locals toolbar button to display the Locals window The Locals window shows the local variables and the values of the function indicated by the current program counter PC If no variables exist in the function no information is displayed in the Locals window fli wm 8 z Mame Value Type 2m a xt d 6 amp 6es5 signed long 10 Hoe 7 H OOOOOfTS xDDOD7OUd signed long j H OD0a i Oxooo0715 signed inti nii p sam Ox000az8 x dbgd711 struct Sample Figure 3 18 Locals window Click the mark shown to the left of the class instance p sam in the Locals
67. 0 00 00 00 001 628 240 E Figure 3 40 Trace window Auto Filter REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 63 of 229 2 NC S AS ROE530640MCUOO User s Manual 5 Click the I button in the R W column and choose R from the context menu m V E sazz tel Edr eaaa Fanga Q0n07514 00000000 Fia Cycle 00000016 Address OF E54 OD DO DO 001 627 440 3 Tutorial cycle Label Addre Dat 7 B7 ox ex 87 57 cel Brf oe ev TimeSteamp h m s ms us nv O0000016 FB354 FA l h 1 JALIL E 1 l Oo0o00R000000000 O0 O00 00 001 627 4840 00000015 FFFE amp 2 165 1 DB lOptaen 3 1 1 oOb 0000000ODOODO 00 00 00 001 627 490 00000014 FFFE6 02 16h 1 POE i 1 o000000000000000 00 00 00 001 627 540 00000013 FFFE amp 02 ibi w 2 i 1i dOD0000000000000 00 00 00 001 627 590 00000012 OFFFES 02 ibi 1 3 1 1 D00DDODODDODODOO 00 00 00 001 627 640 00000011 OFFFES 02 ibi 1 3 1 1 D0000000DDODODDO 00 00 00 001 627 690 00000010 FFFE amp 02 ibi 1 3 1 1 D000000000ODODDO 00 00 00 001 627 740 00000009 FFFE amp 02 igh 1 1 3 1 1 QgO00000000000000 00 00 00 001 627 790 00000003 OPFPES 02 igh 1 1 3 1 1 D0DO0DODDODODDODO 00 00 00 001 627 840 00000007 OPFPES 02 lsh l 1 3 1 1 gO00000000000000 00 00 00 001 627 890 Q0000006 OPFFF6 2 lb 1 1 3 1 1 OO00O0R000000000 00 00 00 001 627 940 Q0000005 UF
68. 00 001 2765 940 oooo0005 rSG2EZ 00 16b 1 1 Qc U i1 1 OODONOR0OO0O0000 00 00 00 001 276 990 QOOOGDO06 tutor PBZEG6 PFP27C leb U Iw P 0 amp od 1 OOOGOOR0R00R0000 00 00 00 001 277 040 oO000007 PBZEB 7p32 L6b U Tw R 0 4 1 1 OO0G00R000000000 00 00 00 001 277 030 nnapononsa 000719 E3 i16b U bw WwW D 47 1 1 apcnonopmnomoconoapmna 00 00 00 001 27TT 140 ooo0o00009 00071A B2 l b 1 Dg W 0 4 1 1 OO0D000R000000000 00 00 00 001 27T7T 190 OO0000010 DODTIB UP l b O DB WW 4 1 1 QOUODOR0D00000000 00 00 00 001 2 77 240 HUOUUU11 UDU lE L P 16s U 1 4 1 1 DOLDDOLDODBDOOBOODOUOOO 00 00 00 001 2 i 290 JFo Ee EubEoESal ENTER Ead H oooo0o12 000715 OF 6b O 1 cu i 1 OOooooROoOoo0o00 00 00 00 001 477 340 oooo0013 OFSZER DRA Ltb 0 IW R O 1 1 OOOoNOROOOOoOOOO 00 00 00 001 277 390 Figure 3 36 Trace window Fill around TP REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 60 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 17 3 Showing a Function Execution History A function execution history can be displayed from the acquired trace information 1 Clear all break conditions Click the right mouse button anywhere in the Trace window and choose Acquisition from the context menu that is displayed The Trace conditions dialog box will be displayed Switch the trace mode to Fill until stop and click the Apply button Then click the Close button 2 Set a software break in a line of the tutorial
69. 0000 00 00 00 001 626 540 O0000032 PBZDA F270 dlob U IM R U 42 1 1 O000000000000000 00 00 00 001 626 540 O0000031 main DPSZDC 1007 16b O IM R D cw Z 1 1 O000000000000000 DO ODGsOD DDI 6z6 690 o00000030 PB2ZDE O864A 16h O IN F 0 4 1 l OO0OCO0R000000000 00 00 00 001 626 740 Oo0000029 DOO amp EO OF1F 16h U DW BR 0 4 1 1 OOO0OO0R000000000 00 00 00 001 626 790 O0000026 000E 452 lbb U DH BR 4 1 1 OOUOODDO000R0000 00 00 00 001 626 940 00000025 OOO 8E4 OF lth 1 DB E OF 4 1 1 O000000000000000 00 00 00 001 626 990 O0000023 OFS352 B400 16b w R DB 21 1 OO00000000000000 00 00 00 001 627 090 O0000022 OFS354 73FA 16h O w E OF CB 3 1 1 OO00000000000000 O00 00 00 001 627 140 O0000015 OFFFE6 02 ith 1 PE E OF 3 1 1 OO0OO0R000000000 00 00 00 001 627 490 E Figure 3 42 Trace window Auto Filter Notes 1 The filter function does not affect the trace memory so that its content remains intact 2 The filter can be used when the selected trace mode is Fill until stop Fill until full or Fill around TP REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 64 of 229 RENESAS ROE530640MCUOO User s Manual 3 Tutorial 3 18 Stack Trace Facility Using stack information it is possible to show which function is the caller to the function where the current PC exists Set a software breakpoint in any line of the sort function by double clicking at its corresponding row in the S W Breakpoints column s A aso
70. 000000000 00 00 00 001 576 7830 00000010 FFFEG6 ii 1 31 1 ODODOD0R000000000 00 00 00 001 576 8640 00000007 OPFFEG Oe 1651 1 31 1 OODODOR0D00000000 00 00 00 001 576 690 00000003 FFFEG Oe 266 12 1 31 1 OODODOR000000000 00 00 00 001 576 940 DODDOD D PFFEG 02 16b 1 1 3 1 1 gDODOOGDODODODOOUQ 00 00 00 001 576 930 O0000006 OPFFEG 02 lth 1 1 3 1 1 ODUDODODDODODDOUO 00 00 00 001 577 040 00000005 DPFFE amp D2 l bl 1 3 1 1 QO00000D000000000 00 00 00 001 577 090 00000004 DPFFE amp 02 l b 1 1 3 1 0 QO000000000000000 00 00 00 001 577 140 00000007 OODO46 OFBS lth oO DW W 1 3 1 n0 O0000R000000000 00 00 00 001 577 190 00000002 OOr046 OFES 168 O TW w O 31 Q0 OO0000R0000000000 00 00 00 001 577 240 oo000001 OOr044 8271 1080 TW ww i 31 OO OO0000R0000000000 00 00 00 001L 577 2390 oooooo00 OOP044 8271 16080 rs Ww O 31 QU OODOD0R0000R0000 DO 00 00 001 577 340 E Figure 5 57 Trace window 2 Disassembled Display Mode From the context menu choose Display Modes gt DIS This display mode allows you to inspect the machine language instructions executed Trace OOOO wig FAxz kE EII ela Range DO006550 00000000 Fia Cycle 00006543 Address OFAGA Time 00 00 00 000 127 320 cycle Label Address Object Cod Instruction L0008549 start OFZ ABE EEZOIIF R Lic HUAIFH ISF DO 00 00 000 12 7 320 0000547 OFS AGA c7O30A00 MOV B 83 80 3 OOO
71. 01 2008 Page 22 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setup Change the settings of the power supply to MCUS or clock supply according to the use condition 15 Connect the user system Connect the user system as occasion demands Turn ON the power to the emulator and the user system as simultaneously as possible Change the settings 16 Turn on the power supply v Check that system status LEDs and POWER and RESET of the Check the LED display of the emulator target status LED are lighting When the user system is not connected the POWER LED does not light up Start up the emulator debugger from the Start up the High performance Embedded Workshop to launch the High performance Embedded Workshop emulator debugger v Check the contents set in the step 12 in Figure 2 1 Do not check Set up thet t MCU and system Serup tho urget MCU and system Start booting up on successful completion of self checking Debug a program with various functions of Refer to the High performance Embedded Workshop and 5 the emulator debugger Debugging Functions page 78 19 20 Figure 2 2 Flowchart of starting up the emulator After the self check REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 23 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setup 2 2 Installing the Included Software If you have Windows XP or 2000 on the host machine this installation must be executed by a user with administrator rights
72. 0100 Rev 1 00 Apr 01 2008 Page 69 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debug When you have finished setting configuration names emulator related settings are completed Click the Finish button and the Summary dialog box will be displayed Clicking the OK button in it starts the High performance Embedded Workshop 5 After starting the High performance Embedded Workshop connect the E100 Emulator 4 3 Creating a New Workspace Toolchain Used Follow the procedure described below to create a new workspace 1 In the Welcome dialog box select the radio button titled Create a new project workspace and click the OK button uy come Figure 4 6 Welcome dialog box 2 Project Generator will start New Project workspace Pes N x Workspace Mame n Appkcatior C LOUCE startup Appkeatioe Project Name C3 Empty Application a 3 Import Makefile Library Directoy Debugger only M16C E100 E 7 Debugger only 16C Simuat CPU larmly Im GC Tool chan Renesas HITEC Standand Figure 4 7 New Project Workspace dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 70 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debug Workspace Name Enter a workspace name here Project Name Enter a project name here If the same name as a workspace name is good you do not need to enter it Directory Enter a directory
73. 0MCUOO User s Manual 5 Debugging Functions 2 In the Edit Address Range dialog box that 1s displayed change the address range Edit Address Range Start Address 000700 z Bl End Address JUUUSEE Cancel Figure 5 112 Edit Address Range dialog box 3 The address range you have changed will be displayed in the upper area of the Data Coverage window Data Coverage eS SS m mx Wt OK DOO EAM aoig RAN OOO OS RAM DOO OC RAM DD 10 RAM i4 Address Range Task Stack Figure 5 113 Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 175 of 229 QEN ESAS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 12 7 Removing Address Ranges Follow the procedure described below to remove address ranges 1 From the Address Range sheet of the Data Coverage window 1 Select an address range you want to remove in the Address Range sheet and while holding it selected choose Delete Range from the context menu Data Coverage x s mp xf Wt ex RESSEESESSSEESEAESSEEESRSASSEEESESSESEERSSSSEESRARSSESSESRSASSESESESRASEERRSSHRERARSENEURRSRERRRSRSRRRRRSSGRERRARESRERRERZSRSRRRSRGRRR Rr OOIZEB 001334 Percentage Add Range Edit Range OOOO FAM DODU O RAM DOD US RAM OOO OC FAM DOO 1 RAM mE Address Range Task Stack Figure 5 114 Data Coverage window 2 A dialog box prompting for your confirmation will be displayed Choose to save or n
74. 1733 0100 Rev 1 00 Apr 01 2008 Page 134 of 229 QEN ESANS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 9 9 Use the filter function to extract only the necessary records from the acquired trace information The filter function filters the Filtering Trace Information trace information in software that was acquired by hardware Unlike the Capture Do not Capture conditions where you set acquisition conditions before getting trace information this function permits you to change filter settings for the acquired trace information any number of times Therefore the necessary information can be extracted easily with data analysis significantly facilitated The filter function does not affect the trace memory so that its content remains intact The filter can be used when the selected trace mode 1s Fill until stop Fill until full or Fill around TP and the selected display mode is Bus or Disassembled 1 Auto filter function To use the filter function choose Auto Filter from the context menu of the Trace window When Auto Filter is turned on each column of the Trace window is marked with an auto filter arrow mh Click any arrow Eh and select the necessary condition from the ensuing drop down list That way you can easily filter the records to get those that meet the condition Selecting Option in the drop down list brings up the Option dialog box In this dialog box you can set detail conditions Some columns s
75. 2 4 Connecting the host machine REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 26 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setup 2 5 Connecting the Emulator Power Supply Power is supplied from the included AC adapter to the emulator The following shows how to connect the AC adapter 1 Turn OFF the emulator 2 Connect the DC cable of the AC adapter to the emulator 3 Connect the AC power cable to the AC adapter 4 Connect the AC power cable to the outlet Figure 2 5 Connecting the emulator power supply A CAUTION Cautions for AC Adapter Use only the AC adapter included in the E100 package The included AC adapter is exclusively for the E100 emulator main unit Do not use it for other products Before installing this product or connecting it to other equipment disconnect the AC power cable from the outlet to prevent injury or accident The DC plug of the included AC adapter has the below polarity The included AC adapter has no power supply switch The AC adapter is always active while connecting to the AC power cable REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 27 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setup 2 6 Turning ON the Power 2 6 1 Checking the Connections of the Emulator System Before turning the power ON check the connection of the interface cable with the host machine emulator and user system 2 6 2 Turning ON OFF the Power Turn ON OFF the pow
76. 2008 Page 146 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 11 Measuring Code Coverage 5 11 1 Measuring Code Coverage Code coverage is the function to indicate the digestion degree of test 1 e to what degree tests have been carried out on software code pass Instruction execution information is displayed at C C and assembler levels This function collects instruction execution information from a program without causing it to break Therefore the realtime capability of the user program will not be lost The coverage result is updated upon a break The E100 emulator supports CO Instruction coverage rate and C1 Branch coverage rate Table 5 27 Code coverage definition CO Instruction coverage rate All statements within code are executed at least once C1 Branch coverage rate All branches within code are executed at least once The E100 emulator comes with up to a 2 Mbyte code coverage memory when using the CO C1 level coverage and up to a 1 Mbyte code coverage memory when using the C1 level coverage With initial settings the code coverage memory is allocated automatically to addresses in the ROM and RAM areas in this order 5 11 2 Opening the Code Coverage Window Choose Code gt Code Coverage from the View menu or click the Code Coverage toolbar button iE The Code Coverage window initially appears in a blank state REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 147 of 229 RENES
77. 229 QEN ESNS ROE530640MCUO00 User s Manual 5 Debugging Functions 9 2 Downloading a Program 0 2 1 Downloading a Program Download the load module to be debugged To download a program choose Download from the Debug menu and select your desired load module from the ensuing list or right click a load module in Download modules of the Workspace window and then choose Download from the pop up or context menu CAUTION Before a program can be downloaded you must have it registered as a load module in the High performance Embedded Workshop For details on how to register refer to 4 7 Setting Up the Debug 9 2 2 Showing the Source Code Follow the procedure described below to show the source code Double click a source file in the Workspace window Right click in the source file and choose Open from the context menu lolx DE lie sou E els swe id tutorial void 23 FEzz4 1 23 long afin long j 25 int i 26 struct Sample far p sam Ze 26 FE227 p sam malloc sizeof struct Sample 9 FEZ3B init p sam 30 31 FEZ47 32 FE252 rand 33 FEZ5E H i j U 34 FE2 63 j j 35 J 36 FEZ6C E ali j ae H 536 FEZ amp 2 sortial Figure 5 7 Editor window Shown at left edge of this window are the line information consisting of the following REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 89 of 229 QEN ESAS ROE530640MC
78. 29 2 NC S AS ROE530640MCUO00 User s Manual 5 Debugging Functions 3 Adding events by dragging and dropping When dragging and dropping the variable and function names in the Editor window m Dragging and dropping a variable name into the Event column you can set an event based on an access to that variable as a condition Data access condition At this time the size of the variable is automatically set to be a condition of a data access event Only global or static variables of 1 or 2 bytes in size can be registered as an event Static variables in functions cannot be registered as an event 2 Dragging and dropping a function name into the Event column you can set an event based on an instruction fetch to the start address of that function as a condition f f Hardware Break a lsorthlong a Hardware Break OR 28 FBIBO 29 r Event 30 Event T Descriptions Comme 31 32 EO F Address sort 32 F81B6 Address OO6DC Size WORD 33 FS81BS9 while gap gt O if 34 FB8lca for k O kzg 35 FBICF t ri i kKtt Figure 5 32 Editor window and Hardware Break dialog box When dragging and dropping the address range in the Memory window Select a memory content in the Memory window and drag and drop it into the Event column That way you can set a data access event based on the address range of the selected memory content as a condition Data access conditi
79. 29 2 NC S AS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 9 16 Showing the History of Function Execution To show the history of function execution from the acquired trace information choose Function Execution History gt Function Execution History from the context menu or click the Function Execution History button in the toolbar An upper pane of the window will be displayed Initially this window is blank When you choose Analyze Execution History from the context menu or click the Analyze Execution History button in the toolbar the emulator starts analyzing the execution history from the end of the trace result and shows the result in a tree structure V B w amp X z EH Ed eb Taaa o omain OFEZDC lt OFSABS El tutorial OF62E6 F E W malloc OPB49A lt OFS2P1 init OFBOc2 lt OrF8303 e rand OFBS44 z DF3314 F rand FBOJ4 e DF8314 _rand OFBS44 lt OFS314 rand OFE944 z OFS314 UD HOOTIE Bl 1l E 1 DOOOOROOOOROoOE D 00 00 001 27 td 00005996 DrB2gD O85F5 16b O mw R OF cB 3 1 1 O0000000000000 00005995 DFg2z0 F5 6b tb 21 RE 32 1 1 QOO000D00000000 00 00 00 001 277 590 00005994 OrBzBg2 FEO 16b Iw R OF cB 3 1 1 OO0000000000000 00 00 00 001 277 540 00005993 rB2E7 00 lbh il i W 1 1 1 O00000000000000 00 00 00 001 277 590 O0005992 rB2g2 00 16b 1 1 a oOo l 1 o00000000000000 00 00 00 001 277 740 00005991
80. 4 Editor window Step Over The data of the variable a displayed in the Watch window will be sorted in descending order REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 51 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 14 Forcibly Breaking a Program The High performance Embedded Workshop permits you to forcibly break a program Clear all breakpoints To execute the rest of the tutorial function choose Go from the Debug menu or click the Go button in the toolbar i Figure 3 25 Go button Since the program is executing an infinite loop process choose Stop Program from the Debug menu or click the Halt button in the toolbar Figure 3 26 Halt button REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 52 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 15 Hardware Break Facility Hardware breaks cause the program to stop when it executes a specified address instruction fetch or reads or writes to a specified memory location data access 3 15 1 Stopping a Program when It Executes a Specified Address The Editor window permits you to set an instruction fetch event easily For example you can set an instruction fetch event at a place where the sort function is called Double click a row in the Event column corresponding to the source line that includes a sort function call f Tukorial c iBl x B Sle tine Se E C S Sowe lt FazEkSg p sam malloc size
81. 68 4 3 Creating a New Workspace Toolchain USEd ccccecccceceeeeeeceeeeeeeeeeeeesaeeeeeeaeeeeeeseaseeesaaeeeessegeeesaneeeeess 70 4 4 Opening an Existing Workspace ssssssssssssesesesen nennen nnne nn enhn nnns nnns sna rn nennen enne nnn 73 A3 Connecung the EMAL OM sireisas eaa dew ue iaaiiai eiia 74 4 5 1 Connecting the Emulator E 74 4 5 2 Reconnecting the Emulator cccccecccceeeeceeeeeseeeeeeeeeeseeeeesaeeeseeeeeseeeeeseeeeeseeeesaueeeseeesseeeesaeeeenes 14 4 5 Discontiecting the EIMUNAIOR iocos og dir hada du a dtl da eE aE EEREN ean 19 4 6 1 Disconnec ng TNE EmulatOr oi ie abusu open anra nre aav ane a eR ve dar Reo Pak RES od RR ERR OVE pax DERE EK V 75 4 7 Quitting the High performance Embedded Workshop ccccssccceeeeeeeeeeeeeeeeseeeeeeseeeeeeseeseeessaeeeesaeeseesanss 75 s roe o8 enigdB ole 76 4 8 1 Specifying a Download Module ssessssssesssssssseeeeeee nnne nenne nnn nnns nnns 76 4 8 2 Setting Up Automatic Execution of Command Line Batch FileS ce cccccecceceeceseeeeeeeeeeeeeeees 77 oM DEBUG IAG E UNCON S xU e 78 5 1 Setting Up the Emulation Environment cccccccccesseeceeeeeeeeeaeeeeeeseeseeeeaeeseeeaeeeeeeseeeeeeseeeeesseeeeeeeaeeeeesaaneees 19 5 1 1 Setting Up the Emulator at Startup ccc cccccesceceeeeeceeeeeseeeeeseaeeeseeeeseaeeeseaeessaeessaeeesea
82. 6C 60 Series M16C 64 Group MCUs with 512 KB ROM Applicable MCU mode Single chip mode memory expansion mode microprocessor mode Maximum ROM RAM capacity 1 Internal flash ROM 8KB 16KB 512KB QEO00h OFFFFh 10000h 13FFFh 80000h FFFFFh 2 Internal RAM 31KB 00400h 07FFFh Power supply voltage 2 7 5 5V 25 MHz with PLL Emulation memory Owait 12MHz lI wait or more 25MHz 255 pass counts Violation of access protection task stack access violation OS dispatch initialization omitted Real time trace 192bits x 4M cycles Address data status CPU status bus status target status task ID time stamp 32 external trigger inputs Trace extract delete Capture Do not Capture by events or Specified data access instruction extraction trace extraction before and after point Real time RAM monitor 16 384 bytes 512 bytes x 32 blocks Data last access Time measurement Execution time between program start and stop Maximum minimum average execution time and pass counts of specified eight sections Count clock Equal to MCU Clock or 10ns 1 6us Connection to user system REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 20 of 229 QEN ESAS ROE530640MCUOO User s Manual 1 Outline 1 5 Operating Environment Make sure to use this emulator in the operating environments listed in Tables 1 6 and 1 7 Table 1 6 Operating environmental conditions Operating temperature 5 to 35 C no dew Storage temperature 10 to 60 C
83. AS ROE530640MCUOO User s Manual 5 Debugging Functions mnt Coverage a E wt itat i d Address Range CO Coverage Cl Coverage U Executed Assembler Source d P T Address Range A Source Figure 5 72 Code Coverage window 1 Measurement method The Code Coverage window consists of two sheets Table 5 28 Sheets of the Code Coverage window Address Range sheet Measurement is performed on any address range Source sheet Measurement is performed on a specified source file The respective sheets permit multiple ranges to be registered Up to two instances of the Code Coverage window can be opened at the same time 5 11 3 Allocating Code Coverage Memory Hardware Resource 1 Memory allocation Before code coverage can be measured code coverage memory must be allocated to the addresses at which to be measured Coverage data can be obtained from only the address range that has had memory allocated To allocate code coverage memory use the Coverage Memory Allocation dialog box To open it choose Hardware Settings from the context menu of the Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 148 of 229 QEN ESAS ROE530640MCUOO0 User s Manual 5 Debugging Functions Allocation of Code Coverage Memory X Allocation of Coverage Memory Add OOOO 1FFFF EQOOU FFFFF 2 Clear All Clear Default e 3 oma Figure 5 73 Allocation of Code Coverage Memory
84. Bri br EV TimeStemp h m s ms us n 00000016 DFS354 FA lbb 1 1 3 1 1 QOOUOQUUDDOOOROUOUO DO 00 00 001L 627 440 O0000015 FFFEb 02 l6b 1 DB ER 1 1 OOOG00G000000000 00 00 00 001 627 490 O0000014 FFFEb 165 1 1 i 1 OOOO00R000000000 00 00 00 001 627 540 O0000013 OFFFE6 16b 1 1 3 i OOO000R000000000 00 00 00 001 6247 590 O0000012 FFFEb 0O2 16b 1 1 3 1 1 OO0000R000000000 00 00 00 001 62T 640 O0000011 OFFFE6 2 16b 1 ES 1 3 1 1 OOO000R000000000 00 00 00 001 627 690 O0000010 OFFFE6 2 1b 1 1 ij 1 1 OOOO0OO000000000 00 00 00 001 627 740 000000 OFTFE6 O2 16b 1 1 i i 1 OO0O0OR0O00R0000 00 00 00 001 627 730 00700000A OFFFE6 04 16b 1 1 z 3 1 l OOOCOOROO00R0000 00 00 00 001 6247 840 0000000T OPFFE6 02 leb 1 1 3 1 1 OO0G00R000000000 00 00 00 001 627 890 00000006 PFFE amp 02 16b 1 1 3 1 1 oacnopnocpnogobppnono 00 00 00 001 627 940 00000005 UPFFE amp 02 l amp b 1 1 3 1 1 oacnonocpnopnoppnono 00 00 00 001 627 990 O00000004 FFFE amp 02 l b 1 1 3 1 acgpnoanoacpnopnoappnono 00 00 00 001 628 040 0000000 OPD 46 amp OFBS Ll6b O DH W 1 3 1 OOUODOORODD00R0000 00 00 00 001 628 090 Oo000002 dri OPBS lbh DE WW 0 1 i OOOO00R000000000 00 00 00 001 628 140 O0000001 OOD044 8353 lbh DE X 1 3 1d 0 OOOO00R000000000 00 00 00 001 628 190 OOo QOnp 0448 8353 lbh O DE M 0 3 d OO0000R00000000
85. CLKOUT VSS M16C 64 65 EVA CHIP R5F3640DD EVA Connected to the inside of the emulator Figure 7 1 Connection diagram Table 7 2 Electrical characteristics of the 74HC4066 nid Standard values a Rw ONmsr 4s 9 mlag re et lor Leak curret O 120V o Lu Leak current On output open 120v 100 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 218 of 229 RENESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 4 External Dimensions 7 4 1 External Dimensions of the E100 Emulator Figure 7 2 shows external dimensions of the E100 emulator D 184mm H 132mm Figure 7 2 External dimensions of the E100 emulator REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 219 of 229 RENESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 4 2 External Dimensions of the Converter Board ROE0100TNPFJOO Figure 7 3 shows external dimensions and a sample foot pattern of the converter board ROE0100TNPFJOO for a 100 pin 0 65mm pitch QFP CJ REV B Unit mm Figure 7 3 External dimensions and a sample foot pattern of the ROE0100TNPFJOO REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 220 of 229 QEN ESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 4 3 External Dimensions of the Converter Board ROE0100TNPFKOO Figure 7 4 shows external dimensions and a sample foot pattern of the converter board ROEO100TNPFKOO for a 100 pin 0 5mm pitch LQFP
86. Configuration properties dialog box Memory map page The MCU group box displays the device selected in the Device setting dialog box You cannot change it on this page The Memory map page does not appear when single chip mode has been selected 1 Allocating emulation memory You can allocate emulation memory for up to 4 areas Select a check box of the area to be used and enter the start address and end address The addresses can be set in a unit of 4AKB Therefore the low 12 bits of the start address and end address are fixed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 84 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 1 5 Setting Up Flash ROM Overwrite On the Internal flash memory overwrite page of the Configuration properties dialog box set up the overwriting of flash ROM blocks block by block Configuration properties EM X System Memory map Internal flash memory overwrite Exception Waning Option board No Address DL 00w maFFF o 0ED00O 0EFFFF O 08 aro ooO 0FFFFF Selected blocks will be overwritten rather than deleted when the user program tt downloaded Lnselected blacks will be ovenvitten after deleted OF Cancel Help Donat show this dialog box again Figure 5 4 Configuration properties dialog box Internal flash memory overwrite page Block by block settings matched to the selected target MCU are automatically displayed in the list T
87. D B4 D9 OB FE uK uk Plaan Fazie 77 8B FE A 7D cCA 31 FD 44 59 F 7C F3 73 ZB w 1 1 D l s Fas le Fo 73 UB F6 YE BB CF 64 OA YS 7B F8 75 SB FR 77 8 j ut u w FB83ZC EB F8 73 BO FE E 10 EB 456 CE Al O4 73 BE F6 73 8 E 8 8 F833C B8B F8 D2 C9 1B FE FE C9 EB 1B CE FD BO 81 OF EB Fiag 1B CE FD 80 82 OF 73 B4 FA 73 B5 FO 75 3B CE CH Bora us FB835cC 24 77 ES 75 256 DU 73 B4 FA 73 BS FO 9 44 77 ES S m ut 8 8 Dw FB83B5C 75 ZB De cH 24 77 ES 75 zB D4 73 BS FA 73 BS FC ut S m ut 83 8 Fas fC 1 44 08 O00 77 ES 75 ZB DE cH z4 7T ES 75 ZB D wD w ut w ut FB83BC To B4 FA 73 BS FO 77 44 Oc OO TY ES YS 2B DA CH s s3 wD m ut Fasc 24 77 ES 75 25 DC 73 B4 FA 73 B5 FO FY 44 10 OO S mw ut s 5 wD E FB3AC 1 E585 75 ZB DE CH 24 77 ES 75 zB EU 73 B4 FA 73 mw ut m ut s 8 gt Figure 3 12 Memory window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 45 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 11 Referencing Variables When single stepping a program you can see how the values of the variables used in the program will change as you step through source lines or instructions For example following the procedure described below you can look at the long type array a that is declared at the beginning of a program Click the left hand side of the array a displayed in the Editor window and place the cursor there Select Instant Watch with th
88. DODORD00O00 OO 00 00 001 624 130 00000015 OFFFEG 02 lbh 1 DE k 3 1 1 doO0000R000000000 00 00 00 001 624 130 O0000014 OFFFE6 02 lbh i 1 3 1 1 OO0OO0O0OGOOOODOOOO 00 00 00 001 624 230 00000013 OFFFE6 2 ith i 1 3 1 i ODODOOGODOOODODO 00 00 00 001 624 230 O0000012 FFFE amp 2 ii 1 3 1 i gOnDoDOOOOOOODODO 00 00 00 001 624 330 00000011 OFFFEG 0 ibi i 3 1 1 OO0O00O0D00000000 00 00 00 001 624 330 00000010 OFFFEG 0 ibi 1 3 1 1 OO00000000000000 00 00 00 001 624 430 O0000009 DFFFEG O2 ith i 10 3 1 1 OO00000000000000 00 00 00 001 624 490 O0000008 DPTFEG 02 ith 1 1 3 1 1 OO00000000000000 DO OUD OD DD1 624 530 O000000T DPFFEG D2 16h 1 1 3 l 1 gnDonaocnDoDODDODO 00 00 00 001 624 5390 O00000006 OPFFF6 02 l6b 1 E 1 3 1 l OO0G000000000000 00 00 00 001 624 630 O0000005 UPFFE amp D2 Il6b 1 1 3 1 l OO0DO00R000000000 00 00 00 001 624 640 000 0004 UPFFEb D2 Ilbtb 1 1 E 3 1 QOOUOOOR0D00000000 00 00 00 001 624 730 0000000 Ddp 46 OPES lth 0 DM M 1 3 1 n0 OnOB0000000000000 OO O00 O0 001 624 780 Oo0 00002 OOD046 OPES lth 0 WwW OF 3 1 Q0 OBGO0000D0O0OODODO 00 00 00 001 624 630 00000001 OOD044 8353 lth 0 PW 9 1 3 1 0 00000000000000 00 00 00 001 624 8630 nooooo00 npo4a 8353 16860 Im ww O 31 0 ODODODOROOODOOOOO 00 00 00 001 624 930 zi Figure 3 31 Trace window free trace 4 A mixed display of bus disassemble and or
89. Detecting Initialization Omitted This is the function to determine the case where an access for read is performed before being write accessed when both histories of read access and write access do not exist to be initialization omitted and output an error In the emulator the blocks 0 31 maximum 16 Kbytes can be specified as a detection area of the initialization omitted 1 Detection method An initialization omitted is detected by the RAM monitor function Allocate a RAM monitor area to a given address range and enable error detection in that area Detection circuit Both histories of read access and lt Compare gt lt gt Whether accessed for read before gt Detected write access do being write accessed not exist Figure 5 145 Outline of the initialization omitted 2 Actions taken when an initialization omitted is detected The following actions can be set Display a warning Selecting the Read from uninitialized memory check box on the Exception Warning page of the Configuration properties dialog box you can display a warning in the Status window and in a status bar balloon Color display in the RAM Monitor window Set the detection of an initialization omitted as a condition of a hardware breakpoint Set the detection of an initialization omitted as a condition of a trace point REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 202 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Funct
90. FBHBZES i ad long a amp 10 24 long j s int i 26 struct Sample far p sam aj zi sobe c Tutoriale Figure 5 30 Editor window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 107 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 2 If there is room for event counts the event you have added from the Editor window is added to the other events as an OR condition If there is no room an error message is displayed CAUTION If you are doing some editing work in the Hardware Break dialog box you cannot set hardware breaks from the event column of the Editor window Hardware Break OR Ewent Event Type Descriptions Count Taskib Comment F Address FB2EO Figure 5 31 Hardware Break dialog box When adding a trace point 1 Select the Trace Point from the popup menu displayed by double clicking or right clicking anywhere in the event column of the Editor window You can set a trace point based on a fetch to that address as a condition gt Instruction fetch condition Double click the instruction fetch event in the Event column of the Editor window to delete it CAUTION No trace points can be set from the event column of the Editor window in the following cases While editing the contents in the Trace conditions dialog box When selecting the Fill until stop or Fill until full of the trace mode REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 108 of 2
91. FFE amp 2 l amp b 1 1 3 1 l QOO0O0R000000000 00 00 00 001 627 990 LDO00004 UFFFE amp 2 l amp b 1 1 3 1 D QOOUOUUDUOODODRDUOOO DO 00 00 001 628 040 oooo0003 OOnO46 OFBS lth Oo IW W 1 3 1 0 dO00000000000000 o0 00 00 001 628 090 0000000 0p046 OFS 16b 0 mw w 0 31 20 ODODDODODOODODOO 00 00 00 001 628 140 00000001 OOn044 6353 16b 0 IW W 1 3 1 O ODODDODODOODODOO 00 00 00 001 628 190 ono000000 D0p044 58353 16b 0 mw w oOo 31 O ObDDDDODODDODODOO OQO QOD 00 001 628 240 zi Figure 3 41 Trace window Auto Filter 6 That way the trace information for only R in the R W column can be displayed mw V p See mmm Range 00007514 00000000 ier Kcyce onnnmpts eem SNNT Cycle T Label Addre Date Br B7 Br B7 57 c7 7 Brf or Ev TimeStemp hzm s ms us n OU000044 UFBZDA FZ D 16b U IH ER 0 CB s 1 1 ancnonoononoGOODnO 00 00 00 001 626 040 00000041 OFS2B1 77 16b O IB R O 1 i 1 OO0000R000000000 00 00 00 001 626 190 O0000040 OFS2B2 FCBB lth O w R D 3 1 1 O 00O000000000000 00 00 00 001 625 240 D0000033 OFS2B4 000A 16b N R OF PRE 23 1 1 O 0DO0OODODODODOD 00 00 00 001 626 340 00000037 OO0erc 00A 16 PH E OF Z2 1 1 OOODOODO0D00000000 00 00 00 001 626 290 O0000036 OFSZB6 CATD 165 O i E OF PW 2 1 1 OOOODDO000000000 00 00 00 001 626 440 00000025 OFSZBS 7522 10b O mR OO md 1 1 OODOD00000000000 00 00 00 001 626 490 O0000034 OPS2BA O9C0O 165 U Iv R 0 RE 3 1 1 OO0000000000
92. H 00 00 00 000 254 700 00006545 rdAGE B 0400 MCOV Biz 0 0004H 00 00 00 000 382 140 00006541 OFSATL cTezooToo MOV B 82 i 20g 000TH 00 00 00 000 637 160 00006535 OFS ATS c 48308600 MOV B 5 dl42 00D5H 00 00 00 001 019 730 O0006529 r3A79 c 0a0860n MOV B 5 03 mu 00058 00 00 00 001 242 850 O000652 4 r3ATD B nco MOVY B Z 0 000CH 00 00 00 001 431 140 00006220 OFS ARO ByOA00 MOY Bid 0 DODAH 00 00 00 001 431 340 00006516 OFS ABR EE2UEDO Lec HOOFOK FLG 00 00 00 001 2431 340 00006510 OFS ART EBSOLPO Loc HOT LPH SP 00 00 00 001 251 840 O0006506 OF AEB EESODDDS Loc aDA4nox 58 00 00 00 001 252 040 D0006502 OFG AEP EERZODEPDU Loe HOOOFH INTEH 00 00 00 001 252 240 Dgo 0068483 FSgSABSj EEIOUUFD Loe HFDOOH INTEL DO 00 00 001L 252 440 00006495 OFS AGT FDS4690F JSR A nitsct 00 00 00 001 252 590 O0006465 3 initact rgo04 B4 MCOV Biz WO ROL 00 00 00 001 253 090 O0006464 rg505 AAQOO A MOV 13 8 WO4A00H AL 00 00 00 001 253 140 0000643 OFg993 Taca ghat MOv uwic gW ODO0DNH RI 00 00 00 001 253 240 Figure 5 58 Trace window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 133 of 229 QEN ESANS ROE530640MCUOO User s Manual 5 Debugging Functions 3 Source Display Mode From the context menu choose Display Modes SRC This display mode allows you to inspect the source program s execution path The execution path can be verified by stepping through the source within trace data forwar
93. Mode drop down list of the Trace sheet select Fill around TP Select the Exception check box and then click the Detail button Trace conditions Ioj x Trace or Exception Option P T i TN Fill around TP condition and combination setting v OR condition Eventinuse O Detail Other conditions UE EET il Event in use 0 Detail ception Total O Event Exceptional Detail events Delavievcle am Record condition f ol Capture Do not capture IW Step execution is recorded Detail Event in use 0 Event used O Free 16 Detail Registered events Load Help Apply Close Figure 5 150 Trace conditions dialog box E REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 207 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 The Exception page shown below will appear Click the Detail button to the right of the Task stack access violation check box Trace conditions B x Trace on Exception option Violation af access protection Detail Read from a uninitialized memory Detail Stack access violation Detail Performance overflow Realtime profile overflow Task stack access violation Detail QS dispatch Event used O Free 16 Detail Registered events Load Help Apply Close y Figure 5 151 Trace conditions dialog box 3 The Violation
94. Progra uictus edax vob cuc o Pap sud eb E aaea a du adus 38 3 4 2 Displaying Wie Source miei o E 39 3 5 Setting Software Breakpoints cccccecceccseececceececceuseeccsseeecsagececseugeeessueeecsaseeessaeeeessgeeeessagseeessaneeessagenes 40 9 0 Execulirig Ne Progra i scream vidas Dress nium vau EA R UC TU Va tbe ata wa can vd GR Sw rat d Ew RIC a E 41 3 6 1 KESAR EE 5c 41 3 6 2 Executing Ne Progra NOI E o 0T E 41 al MOCKING Break 09 Emm 42 3 7 1 Checking BreakbOIntsissa bosco sme tota dint cor oe iu an iana iR Gn eu tnt bow n ut b dps ai 42 3 9 Altering Register Contents iacit path an tuno Van su a de nes bula ds vua sU ER de EER MURAT VU da sul b DU Ta NRE Er duh EERDERE c dal rud 43 OF IRETEVCRICING Sy INOONS RR Y 44 3 10 Checking Memory Contents cccccsssccccseececcsesececseaseeecsegeeecegeeeeseaseeessaueeecsagseeeseseeessageeeesagseesssaseesssageees 45 3 11 Relerencing i e en ee ee er i eie aeae eo eer een en ere ee eee eee 46 3 12 Showing Local Variables ssssssssssssssssssssesese nennen enne nnne nnne nennt nnn nnne nnns nnns nna nnns nnns 48 REJ10J1733 0100 Rev 1 00 Apr 01 2008 page Oleey RENESAS ROE530640MCUOO User s Manual Contents 2 19 Ihgles5Ie BDIDO aA Frodi AT saeara a o addu ad te docta me ae E E EEE EEEE 48 3 13 1 EXE Cin Step MC OM NG issaraen m 49 3 13 2 Executing the Step Out Command ssssssss
95. REJ10J1733 0100 T Everywhere you imagine g 2 NESAS ROE530640MCUOO User s Manual E100 Emulator MCU Unit for M16C 64 Group Rev 1 00 Apr 01 2008 Renesas Technology WWNW renesas com 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 product data diagrams charts programs algorithms and applicati
96. ROE530640MCUOO User s Manual 3 Tutorial 3 17 4 Filter Facility Use the filter facility to extract only the necessary cycles from the acquired trace information The filter facility does this by filtering the trace information in software that was acquired by hardware Unlike the Capture Do not Capture conditions where you set acquisition conditions before getting trace information this facility allows you to change filter settings for the acquired trace information any number of times without having to reexecute Therefore the necessary information can be extracted easily 1 Clear all break conditions Click the right mouse button anywhere in the Trace window and choose Acquisition from the context menu that is displayed The Trace conditions dialog box will be displayed Check to see that the selected trace mode is Fill until stop Click the Close button 2 Set a software break in a line of the tutorial function where p sam gt s0 a 0 is written 3 Choose Reset Go from the Debug menu Processing will be halted by a break and the trace information from start to break will be displayed in the Trace window 4 Choose Auto Filter from the context menu of the Trace window The columns for which filtering can be applied will be marked by a I button eVEF Range 00007514 DODODOOD File Cycle 00000016 Address OFESS4 Time O0 00 00 001 627 440 Cycle Label Addre Dat BY B7 EF Hmi Hv cv Fl
97. S C EXT1E 3 CMOS S wibehing Iunction Code coverage f Data coverage C Bealtime profile Code coverage made f CO coverage C CO C1 coverage Debug funetion Debug the program using the CPU Rewrite Made Mask the terminal RESET cancel Hep De not show this dialog box again Figure 5 2 Configuration properties dialog box System page 1 Selecting the operating clock In the Clock section on the System page select the clocking sources supplied to the main clock and sub clock The main clock can be selected from three choices Emulator User and Generate By default Emulator is selected Select Emulator when the main clock is supplied from an internal source or User when the main clock is supplied from an external source To use a user defined clock select Generate and set the clock frequency to be used in the frequency input text box The clock frequency can be set in the range 1 0 to 99 9 MHz in 0 1 MHz increments The clock frequency for Generate can be set only once at startup Selection of the sub clock is displayed only when sub clocks are supported It can be selected from Emulator or User By default Emulator is selected CAUTION The frequency accuracy for Generate is 5 Please make sure that final evaluation is performed using a resonator or oscillator module of the frequency used for the actual target board that is mounted on board REJ10J1733 0100 Rev 1 00 Apr 01 2008 Pag
98. SEEENBES 5 6 7 Registered events Figure 5 71 Performance Analysis Conditions dialog box 0 10 6 Clearing the Performance Measurement Result Select the section you want to clear in the Performance Analysis window and then choose Clear Data from the context menu The measurement result of the selected section will be cleared To clear all measurement results choose Clear All Data from the context menu 5 10 7 About the Maximum Measurement Time of Performance 1 Maximum measurement time The timer used for performance measurement is comprised of a 40 bit counter The maximum measurement time varies with the unit of measurement selected To select the unit of measurement use the Measurement Unit list box of the Performance Analysis Conditions dialog box The measurable maximum times are listed in the table below Table 5 26 Measurable maximum time Approx 3 hours 03 minutes 15 seconds Approx 6 hours 06 minutes 30 seconds 4 Approx 24 hours 26 minutes 00 seconds Approx 48 hours 52 minutes 01 seconds Approx 12 hours 13 minutes 00 seconds l6 l6s Approx 488 hours 40 minutes 18 seconds CAUTION Note that performance measurement produces an error equal to 1 resolution when resolution 20 ns 20 ns 2 Maximum measurement count Execution counts are measured using a 32 bit counter Measurement can be taken of up to a count of 4 294 967 295 REJ10J1733 0100 Rev 1 00 Apr 01
99. U Internal oscillator External oscillator 2 Condition The emulator debugger starts up does not start up The error is detected not detected in the self check Frequency of errors always frequency 3 Problem REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 215 of 229 RENESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 Hardware Specifications This chapter describes specifications of this product 7 1 Target MCU Specifications Table 7 1 lists the specifications of target MCUs which can be debugged with this product Table 7 1 Specifications of target MCUs for the ROES30640MCU00 Applicable MCU M16C 60 Series M16C 64 Group MCUs with 512 KB ROM or less Evaluation MCU R5F650MNFG EVA ROM size 8KB 16KB 512KB RAM size 31KB Applicable MCU mode single chip mode memory expansion mode microprocessor mode Maximum ROM RAM capacity 1 Internal flash ROM 536 KB OE000h 0FFFFh Data flash 10000h 13FFFh Program 1 ROM 80000h FFFFFh Program 2 ROM 2 Internal RAM 31 KB 00400h 043FFh Power supply voltage Vecl Vcc2 2 7 5 5V Operating voltage frequency Power supply voltage 2 7 5 5V 25MHz with PLL REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 216 of 229 RENESAS ROE530640MCUOO User s Manual 7 Hardware Specifications 7 2 Differences between the Actual MCU and Emulator Differences between the actual MCU and emulator are shown below When debugging the MCU using this product be careful about the foll
100. UOO User s Manual 5 Debugging Functions 1 Line column Shows the line numbers corresponding to lines in the source file 2 Source Address column When a program is downloaded this column shows the addresses corresponding to lines in the current source file This function will prove convenient when you determine where you want the PC value or breakpoint to be set 3 Event column This column shows the following Table 5 2 Event column list Hardware breakpoint is set Eg Trace point fetch condition is set A hardware breakpoint can be inserted by double clicking in the event column Trace points are displayed when fetch conditions are set after the title on the title bar of the dialog boxes of Hardware break Trace conditions or Performance Analysis Conditions shows that some setting is under editing If you are doing some editing work you cannot set change the settings from the event column of the Editor window 4 Code Coverage column Shows CO code coverage information graphically 5 S W Breakpoints column This column shows the following Table 5 3 Software breakpoint column list am Bookmark is set Software break 1s set Le PCposion REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 90 of 229 QEN ESNS ROE530640MCUO00 User s Manual o Debugging Functions 5 2 3 Turning columns in all source files off 1 From the Editor window 1 Right click in the Editor window and choose Def
101. When you specify extraction or deletion conditions you cannot select DIS disassemble display and SRC source display from Display Modes in the Trace window When you use a data access event for extraction or deletion be sure to specify the MCU bus for the access type poo UNES Condition Count and Task ID Comment Event type pata access Condition settings Access type UE ToU level wonp M CPU DIMAC Address condition specified value Start End x E Data condition Specified value valuel Value Mask F Enabled Masking value ARE Readiwrite Read write o ome Figure 5 55 Event dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 131 of 229 QEN ESANS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 9 Selecting the Content of Trace Acquisition Select the content of trace information you want to be captured into trace memory Use the Options page of the Trace conditions dialog box to make this selection Trace conditions O X inl x Selecting the type of trace information f Event number C Task ID C External trigger Event used Free 16 Detail Registered events Jave Load Help Apply Ze Figure 5 56 Trace conditions dialog box Select which signal you want to be acquired from three choices available Event Number Task ID or External trigger By default the Event number is sele
102. addresses the E100 emulator automatically detects functions included that address range and registers those functions in the window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 189 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 13 5 Saving Function Profile Measurement Ranges Save the current task mode and function profile measurement range memory allocation state Click the Save button of the Realtime Profile Setting dialog box and the Save As dialog box will be displayed Enter a file name in which you want function profile measurement ranges to be saved If a file extension is omitted the extension rpf is automatically attached If you specify an existing file name a message is displayed asking you to confirm whether you want the file to be overwritten 0 13 6 Loading Function Profile Measurement Ranges Load a function profile measurement range Click the Load button of the Realtime Profile Setting dialog box and the Open dialog box will be displayed ci EJ Look in E Debug e t a SaveData00i rpf a SaveDatalte rp File name SaveD ata rpt Files of type RealProfile Files rpf Cancel E Figure 5 132 Open dialog box Enter a file name you want to load Only the files bearing the extension rpf can be loaded If you enter any other file extension an error message is output When a file load 1s complete the list in the Realtime Profile Setting dialog bo
103. alog box select an option board REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 86 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 1 8 Showing Progress in Boot up Processing You can confirm the progress of boot up processing by checking the Connecting dialog box 5 Debugging Functions The Connecting dialog box continues displaying progress information from when boot up processing starts till when it ends While the Device setting and the Configuration properties dialog boxes are displayed you cannot manipulate this dialog box Connecting Trace Block Ver 2REVB Base I F Block Rev HEV B EV Comb Block Aew REVE B Status USER SYSTEM DISCONNECT EV Detect Fev REY Disconnect CHNO CHH1 CHM pes M MIBL E n Ap ern POWER SOURCE DISCONNECT EV Detect Rev REV B Vcc1 0 3 v Vcc2 0 3 v External Trigger Cable Into Cable Connect Status NDT C RESET High Power On Test l2 Bus Access Check OK NMI High Mon CPU SSRAM Check OF CNVss Men CPLI LISB Check OK a TAG chain initialization HOLDH High Setting of MICU supply clock MainClock Emulator AB High SubCheck Ermulator BYTE Selling of information an individual k yn Setting of debugging option MOLE Setting of MCU signal latch timing in Clock Selling of register data only for tool T Setting of monitor CPU space data CPU Clock 16 0 kHz Setting of target MCU space data Setting of debugging information Main Clock XIN 20 0 MHz
104. alog box can have their settings changed after startup The changeable options are displayed as in active use while the unchangeable options are inactive grayed out with their set contents only displayed 3 Connecting dialog box This dialog box shows progress of boot up processing REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 79 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 1 2 Setting Up the Target MCU 1 Selecting the target MCU On the Device page of the Device setting dialog box specify the target MCU to be emulated For details refer to the hardware manual supplied with each product Device Group Device RSF S64065_ 125 Made Sirgle C hip Extemal data bus vadth 1 bbe Ml Memory space expansion Mormal mode PM13 is used by 1 b3 of Ox000005 PM1Qis used by 1 BO of Ox000005 PRG2CO is used by 1 BO of 04000010 Lommurscalion Setting use ew TEST O e hes C eril Ho E100 TEST Refresh Start booting up on successful completion of sel checking TENET Donat show this dialog box again Figure 5 1 Device setting dialog box Device page The target MCU you have set here cannot be changed after the emulator is connected To change the target MCU you need to disconnect the emulator and connect it again 2 Selecting an operation mode Select one from the following options single Chip mo
105. an elapsed time since the target program started Each time the user program starts running the time stamp starts counting from 0 CAUTION When the counter overflows the time is not displayed correctly The unnecessary columns in the Trace window can be hidden To hide a column right click in the header column and select the column you want to hide from the context menu 5 9 3 Setting Trace Information Acquisition Conditions The trace buffer is limited in size so that when the buffer is filled the old trace data 1s overwritten with new data sequentially beginning with the oldest Setting trace information acquisition conditions you can acquire only the useful trace information making effective use of the trace buffer To set trace information acquisition conditions use the Trace conditions dialog box that is displayed when you choose Acquisition from the context menu of the Trace window 1 Setting trace modes First select a trace mode Trace Option zd Trace Made Fill until stop id condition anc Fill until Full Fill around TP T T I Repeat Fill until stop TF 3p Te IP Hh I T I Repeat Fill until Full Event in use E Figure 5 46 Trace conditions dialog box 2 Setting trace points If you selected Fill around TP Repeat fill until stop or Repeat fill until full for the trace mode set a trace point For trace points you can set event based on conditions and ex
106. and program branched F Condition not met and program not branched T F Condition met and condition not met Address Instruction address Assembler Disassembled display Source C C or assembler source The acquired coverage information is accumulated in memory until the user clears it 5 11 9 Adding Source Files Follow the procedure described below to add source files 1 From the Source sheet of the Code Coverage window 1 Right click in the upper area of the Source sheet and choose Add Range from the context menu Code Coverage a8 o Sat tx d cO Coverage Cl Coverage Percentage Bad Range Edk Rangen ASEE SEDE Executed Pass Address Assembler ye nnm Address Range A Source Figure 5 87 Code Coverage window 2 In the Add Source Files dialog box that is displayed enter a file name Add Source File Figure 5 88 Add Source File dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 158 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 3 The source file you have added and the function names included in it will be displayed in the upper area of the Code Coverage window Code Coverage os S2 xo wt OX d dr File Function _ CO Coverage Cl Coverage sort c init sort c sort sort c change OFE014 OFEOL OFEOI9 FEDIB FE IE ENTER 1 MOV W p seam s0 MIW Wisaa MIW Wises MOV Wi OFEOZ 1 STR
107. any questions regarding the information contained in this document Renesas semiconductor products or if you have any other inquiries ROE530640MCUOO User s Manual Preface Preface The R0E530640MCUOO is a full spec emulator for M16C 60 Series M16C 64 Group MCUs This user s manual mainly describes specifications of the ROE530640MCUO00 and how to setup it For details on the emulator debugger included in this product refer to the product s user s manual All the components of this product are shown in 1 1 Package Components page 16 If there is any question or doubt about this product contact your local distributor The related manuals for using this product are listed below You can download the latest manuals from the Renesas Tools homepage http www renesas com tools Related manuals C Compiler Package for R8C Tiny M16C 60 30 Tiny 20 and 10 Series C Compiler User s Manual C Compiler Package for R8C Tiny M16C 60 30 Tiny 20 and 10 Series Assembler User s Manual REJ10J1733 0100 Rev 1 00 Apr 01 2008 Paea ONAA RENESAS ROE530640MCUOO User s manual Important Important Before using this product be sure to read this user s manual carefully Keep this user s manual and refer to it when you have questions about this product Emulator The emulator in this document refers to the following products that are manufactured by Renesas Technology Corp 1 E100 emulator main unit 2 MCU unit 3 Pitch
108. ard program development on an M16C 60 Series M16C 64 Group MCU the products listed below are necessary in addition to those contained package above Get them separately Table 1 2 Other tool products required for development Emulator main unit E100 ROE001000EMUOO 100 pin 0 65mm pitch QFP PRQPO100JD B Previous code 100P6F A ROEO100TNPFJO0O 100 pin 0 5mm pitch LQFP PLQPO100KB A Previous code 100P6Q A ROEO100TNPFKOO For purchasing these products contact your local distributor REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 16 of 229 2CENESAS ROE530640MCUOO User s Manual 1 Outline 1 3 System Configuration 1 3 1 System Configuration Figure 1 1 shows a configuration of the emulator system 4 USB interface 1 MCU unit ROE530640MCU00 2 Flexible cable 7 Pitch converter board for connecting to the user system _ 7 17 117 160 0001 orit a fic qe ia Aa Wa o i a de E ETA EZA EIA LA LHA A G A DA BS BE Se 5 AC adapter power supply for the emulator 6 Host machine 3 E100 emulator 8 User system main unit Figure 1 1 System configuration 1 MCU Unit ROE530640MCUO0 this product This is an MCU mounting board for the M16C 60 Series M16C 64 Group MCUs with 512 KB ROM and contains an evaluation MCU 2 Flexible cable ROE001000FL X10 included 3 E100 Emulator main unit ROE001000EMUOO This is the E100 emulator main unit 4 USB interface cable This 1s an interface cable for the host machine and em
109. art event occurs and end with the next to last end event occurs the cycle where an end event occurs is not extracted Duration of an event Only cycles where a specified event occurred are extracted Duration of an event Only cycles where a specified event occurred in a specified occurring in a subroutine address range subroutine or function are extracted Instruction accessing Instructions that accessed specified data are detected specific data Deletion JEW Between two events Cycles extracted begin when a start event occurs and end with the next to last end event occurs the cycle where an end event occurs is not extracted moo Duration of an event Only cycles where a specified event occurred are deleted Duration of an event Only cycles where a specified event occurred in a specified occurring in a subroutine address range subroutine or function are deleted Select the conditions you want to set from the list box that is displayed when you select Extract or Delete in the Record condition group box of the Trace conditions dialog box Record Sp aes C All I Step execution is recorded Between two events Detail Event in use Figure 5 54 Record condition group box Then click the Detail button A page in which you can set events will be displayed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 130 of 229 2CENESAS ROE530640MCUOO User s Manual 5 Debugging Functions CAUTION
110. asks 5 13 2 Setting Realtime Profile Measurement Modes Choose Set Ranges from the context menu that is displayed when you right click in the present window The Realtime Profile Setting dialog box will be displayed In the Profile Mode list box of this dialog box you can select Function profile or Task profile When profile modes are changed all measurement results are cleared 5 13 3 Measuring Function Profiles Measure execution performance one function at a time Realtime Profile u Hrs Aw mrunction address size c Time _ Statistic e Xnit UFEO14 237 Z O0 00 00 039 175 960 4 00 00 00 019 5897 960 2 sort OFE102 188 2 00 00 00 384 026 870 405 ECHEEENH 00 00 00 242 013 430 Schange rFBi5E 9 2 00 00 00 132 180 050 13 00 00 00 066 090 020 eo main FEZ1A 10 1 00 00 00 001 785 730 o8 00 00 00 001 785 730 2 tutorial OFE224 340 2 00 00 00 104 990 640 310 0 00 00 00 052 495 320 abort rg37B8 1 0 O00 00 00 000 000 000 gs 00 00 00 000 000 000 Figure 5 130 Realtime Profile window function profile The following shows detail information in each column Table 5 41 Details on each column Number of times a function is called Time Cumulative time of function execution The time stamp is displayed in the form shown below Hours minutes seconds milliseconds microseconds nanoseconds Average Average execution time per measurement performed If located outside the
111. assigned to 1 8 measurement sections set in the Performance Analysis Conditions dialog box Click Settings on the context menu to open the Performance Analysis Conditions dialog box Condition Indicated as Enable when measurement conditions are set in the Performance Analysis Conditions dialog box Otherwise indicated as Disable Run time Cumulative execution time It shows a cumulative time of measured execution time a m s ms us ns Cout ss Shows the number of times measured 00000000000 the number of times measured Statistic Shows a ratio of cumulative execution time relative to Go Break execution time Ratio calculation formula Cumulative execution time Go Break cumulative execution time 100 Max h m s ms us ns Maximum execution time per measurement performed Min h m s ms us ns Minimum execution time per measurement performed Average h m s ms us ns Average execution time per measurement performed 0 10 3 Setting Performance Measurement Conditions In the Performance window select a line of the section No in which you want to set conditions and choose Set from the context menu The Performance Analysis Conditions dialog box will be displayed Performance Analysis Conditions m Registered events Condition MEL Ev Between two events Details Start event Event used 2 Free 14 Detail Time unit 10ns Save Load Help Apply E Figure 5 67 Performa
112. ave As dialog box will be displayed Enter a file name in which you want task profile measurement tasks to be saved If a file extension is omitted the extension rpf is automatically attached If you specify an existing file name a message is displayed asking you to confirm whether you want the file to be overwritten 5 13 10 Loading Task Profile Measurement Tasks Load task profile measurement tasks Click the Load button of the Realtime Profile Setting dialog box and the Open dialog box will be displayed ci EJ Look in E Debug e t a SaveData00i rpf a SaveDatalte rp File name SaveD ata rpt Files of type RealProfile Files rpf Cancel E Figure 5 135 Open dialog box Enter a file name you want to load Only the files bearing the extension rpf can be loaded If you enter any other file extension an error message is output When a file load is complete the list task list in the Realtime Profile Setting dialog box is updated If any loaded task IDs are nonexistent although they are displayed once in the list task list in the Realtime Profile Setting dialog box it is only the existing task IDs that are registered as measurement tasks when you click the OK button Reopening the Realtime Profile Setting dialog box you can check the currently registered measurement tasks If function profile information is included in the loaded file modes in the Realtime Profile Setting dialog b
113. ayed Load Coverage Data es Load tode Fie Hame Offset Add hverwnte testi edv Od ODDO OIOLO Overwnte test ody Ox OOOO 000 Merge testtI3 cde D DODODDUD Remove Move Up Move Down Clear coverage RAM before loading E Figure 5 127 Load Coverage Data dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 184 of 229 QEN ESAS ROE530640MCUOO User s Manual Click the Add button and the Add coverage data file dialog box shown below will be displayed 2 xX File Name gt Browse Offset o 000000 Coverage Data Load Mode Overwrite C Merge UF Cancel Figure 5 128 Add coverage data file dialog box Use this dialog box to enter a coverage information file you want to load You can specify a load mode and offset for each file you load 5 Debugging Functions Only the files bearing the extension cdv can be loaded If you enter any other file extension an error message is output The files you added are listed in the Load Coverage Data dialog box The files are loaded in the order in which they are listed If necessary use the Up or Down button to change the order REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 185 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 13 Viewing Realtime Profile Information 5 13 1 Viewing Realtime Profile Information The E100 emulator has its code coverage data coverage an
114. blocks 2 MB space 128 Kbytes x 8 blocks 1 MB space Coverage Data coverage 64 Kbytes x 8 blocks 512 Kbytes space Address range section specification and task stack REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 78 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 1 Setting Up the Emulation Environment When the emulator 1s connected the Device setting and the Configuration properties dialog boxes are displayed Here select the general options associated with the emulator Note that the target MCU to be debugged etc can be set only once at startup 5 1 1 Setting Up the Emulator at Startup When the emulator starts the following three dialog boxes are displayed 1 Device setting dialog box Use this dialog box to select the target MCU and establish communication This dialog box can be redisplayed by selecting Emulator gt Device setting from the Setup menu after starting the emulator In this case however be aware that changes of the settings after starting the emulator are not reflected immediately and will be set as the initial value when reconnecting the emulator 2 Configuration properties dialog box This dialog box is displayed after the Device setting dialog box Use this dialog box to make settings related to the emulator and debug functions This dialog box can be redisplayed by selecting Emulator gt System from the Setup menu after starting the emulator Some options in this di
115. breakpoint can be inserted by double clicking in the event column Trace points are displayed when fetch conditions are set REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 92 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 2 S W Breakpoints ASM column This column shows the following Table 5 5 Software breakpoint ASM column list e Software break is set 9 PC position 3 Disassembly Address column Shows disassembly addresses Double clicking here brings up an Address Specification dialog box In this dialog box enter the address from which you want a disassembly display to start 4 Obj code column Shows object codes 5 Label Shows a label This column is unusable unless any module is downloaded 5 2 6 Correcting Assembly Language Codes Double click an instruction you want to correct in the Disassembly window or choose Edit from the context menu and a dialog box labeled Assemble will be displayed Use this dialog box to correct assembly language Assembler 2 x Address Code Fa2F5 DSUBFE di Mnemonic MOY WL H H zZH FB Figure 5 11 Assembler dialog box The dialog box shows the address instruction code and mnemonic of a selected instruction Enter a new instruction or edit the old instruction in the Mnemonic edit box When done hit the Enter key The memory content will be overwritten with the new instruction code and the pointer is moved to the
116. cceeeeeeceeseeecceueeeseaeeecseseeessageesesageeessaneeeeees 99 5 6 Using Software Breakpoints cccccccccsssecccesececceeseeeceeuececseuseeeceueeecsegseeeseuseeessaueeesseseesssseseeesseeeessaaes 100 5 6 1 Using Software Breakpoints ccccccccccseeceeceeeeeeeseeeeeeeaeeeeeeseeeeeeeeeeeesseeeesseaseeesaaeeeessaeeeeesaaees 100 5 6 2 Adding Removing Software Breakpoints ccccccceecceceeeeeeeeeeeeesaeeeeesseeseesseeeeeeseeeeesaeeeesaaeeees 100 5 6 3 Enabling Disabling Software Breakpoints ccccccecceecseeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeseeeessaneeeeaaeeees 102 SVAMES SEI CEMETERIES DTmmm R 104 5 7 1 U NIC EVO e E E E A E EE 104 5 7 2 AdO E IER TE TII 104 5 7 3 Br MO MUNN EVONIS era panoends 110 5 7 4 Registering EVOM c nat terern peneudan eienn eE E EA E E EE A eE E aaa EENE 112 5 7 5 Entering Events Each Time or Reusing EVents cccccccecseeeeceeeeeeeeeeeseeeeeseeeeseeeesaneeeseneeesaaees 114 5 7 6 ADDETTO EYON RENT E UT 115 5 8 Setting Hardware Break Conditions ccccccccecccecseeeeeeeeeeeeeeeeeeeseeeeeeseeeeeeseeeeeesseeeeeeseeeeesseeseessaeeeeeeaaaes 116 5 8 1 Setting Hardware Break Conditions sess 116 5 8 2 Setting Hardware Breakpoints ccccccscccccssseecceeseeceesececceaseeecsaueeecseaseeeseaseeessageeessageessegeeeeses 116 5 8 3 Saving Loading the Set Contents of Hardware Breaks
117. ception events For Fill around TP furthermore you can set a delay value REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 122 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 3 Setting Capture Do not Capture If the selected trace mode is Fill until stop Fill until full or Fill around TP you can specify Capture Do not Capture conditions in the Record condition group box Record condition I Step execution is recorded ioe Between two events Detail Event in use Figure 5 47 Record condition group box You can choose to extract only the necessary portions of trace information specified by events or delete the unnecessary portions 4 Recording step execution If the selected trace mode is Fill until stop you can record step execution To record step execution select the Step execution is recorded check box in the Recording condition group box Record condition f al C Capture Bo not capture i Step execution is recorded Event in usa 0 Figure 5 48 Recording step execution The recordable modes of step execution are Step In Step Over and Step Out 5 Setting trace acquisition methods Use the Options page of the Trace conditions dialog box to set the acquisition method associated with the entire trace By default External Trigger is selected for trace acquisition REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 123 of 229 QEN ESAS ROE530640MCUO00
118. ception events can be set all at the same time or only one at a time Trace acquisition Y OR condition gt Other conditions AND Accumulation AND Simultaneous gt Trace point encountered Subroutine Sequential State transitions Exception event gt V Delay value Trace acquisition halted Figure 5 50 Outline of the trace point REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 126 of 229 RENESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 OR condition You can choose to enable or disable the OR condition By default the OR condition is enabled If you reenable the OR condition when it 1s disabled the previously set event is restored with its OR condition check box selected However if a maximum of 16 points is exceeded when you have reenabled for an event the event is restored with its OR condition check box unselected disabled Trace oR Option IF Trace Made CET dim Fill around TP condition and combination setting wv QR condition Eventin use 0 Detail Other conditions Trace anDGAccumulatian gt MEMMMSSJJ ncm Fant Event in use 0 Detail _ Total O Event ception Exceptional Delayicycle cal JP Jom events Record condition al C Capture C Donotcapture Bep execution is recorded Detail Event in use Figure 5 51 Trace conditions dialog box Table 5 20 OR condition L
119. ch from this history and click the Add button That way you can search trace information with that condition again The search history contains a history of up to 10 last searches performed 2 OR search You can perform a search using two or more search conditions as OR conditions To set OR conditions begin by setting the first condition shown on the first line in the search content setting column and then click the New button Then enter the second condition At this time the second condition is added to the second line in the search content setting column In this case the conditions on the first and second lines in the search content setting column can be used as OR conditions for a search performed Up to 16 conditions 16 lines can be set CAUTION The conditions set on one and the same line in the search content setting column comprise AND conditions 0 9 11 Saving Trace Information to Files To save trace information to a file choose File gt Save from the context menu or click the Save button in the toolbar The trace information displayed in the Trace window is saved in binary or text format 1 Saving in binary format To save trace information in binary format choose Trace Data File Memory Image rtt in the Save As Type list box of the dialog box that is displayed when you choose File gt Save from the context menu When saved in binary format all cycles are saved This type of file can be loaded
120. cl file3 cpp func2 file3 cpp func3 CO Coverage 40 aon 10 m 50 MEEEEEEN 70 mnmmmmm 20 mm 60 mnmmmm 90 Emann nnn n 0 30 mum 10 m 2 Clicking the C0 Coverage column The data can be sorted by coverage rate When you click a first time the data is sorted in order of decreasing percentage When you click a second time the data is sorted in order of increasing percentage Example File Function file2 cpp func3 filel cpp func3 filel cpp func4 file2 cpp func2 filel cpp funcl file3 cpp func2 file2 cpp funcl filel cpp func2 file3 cpp func3 file3 cpp funcl CO Coverage 90 mnmmmmmmm 50 MEEEEEEN 70 mnmmmmm 60 mnmmmm 40 mmmm 30 mum 20 mm 1095 m 1095 m 0 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 162 of 229 RENESAS 5 Debugging Functions ROE530640MCUO00 User s Manual o Debugging Functions 3 Clicking the CO Coverage and the File columns in that order The data is sorted in order of decreasing coverage separately for each file Example File Function C0 Coverage filel cpp func3 80 mmmmmmmm filel cpp funct 70 mmmmmmm filel cpp funcl 40 mmaa filel cpp func2 10 m file2 cpp func3 90 munmmmmmum file2 cpp func2 60 mm anan file2 cpp funcl 20 am file3 cpp func2 30 mum file3 cpp func3 10 m file3 cpp funcl 0 5 11 13 Searching for Unexecuted Lines f Search a selected address range or function for unexecuted lines When you click the Find button in the toolba
121. cted CAUTION If you want a history of trace execution to be displayed in trace acquisitions carried out by running a realtime OS program be sure to select Task ID REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 132 of 229 QEN ESAS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 9 8 Showing Trace Results To check trace results look at the Trace window Trace results can be shown in one of the following display modes These display modes can be switched using Display Modes on the context menu of the Trace window There are five trace result display modes Bus Display Disassembled Display Source Display and Mixed Display 1 Bus Display Mode In the context menu select Display Modes gt BUS Bus information on each cycle traced are displayed Default display mode Trace Tazz relied iglaaa Range D0006550 OOO00000 File Cycle 00000018 address OFEZ72 Time 00 00 00 001 576 540 we VE Cycle Label Address Data BUS BHE EIU B W RWI CEU ON BUE Deb EV 00000016 DP8272 04 lbi 1 3 1 1 OGO00000000000000 00 00 00 001 576 540 00000015 OFFFE6 02 16h 1 DE R D 3 i 1 dOo00000000000000 00 00 00 001 576 530 00000014 OPFFE6 O2 160581 1 31 1 OO00000000000000 00 00 00 001 576 640 00000013 OFFFEG i 1 1 31 1 OoO00000000000000 00 00 00 001 576 690 00000012 OFFFE6 ii 1 31 1 OO00000000000000 00 00 00 001 576 740 00000011 FFFEG ii 1 31 1 OOD0000
122. ction setting from the menu Start Stop Function setting Wok address The specihed routine i executed immediately before exection of the user s program Starting address E The specified routine is executed Immediately after the stop of the user s program Starting address 4 Ei cancel Hep Figure 5 152 Start Stop function setting dialog box 5 15 2 Specifying the Routine to be executed It is possible to specify the respective routines immediately before starting and immediately after halting the user program execution When The specified routine 1s executed immediately before execution of the user s program check box is selected the routine specified in the Starting address combo box which is below this check box is executed immediately before starting user program execution When The specified routine is executed immediately after the stop of the user s program check box is selected the routine specified in Starting address combo box which is below this check box is executed immediately after halting user program execution 5 15 3 Limitations of the Start Stop Function The Start Stop function 1s subject to the following limitations While the Start Stop function is in use do not use the debug functions listed below a Memory setting and download into the program area of a specified routine b Breakpoint setting in the program area of a specified routine While a specified routine is ex
123. cution History from the context menu that is displayed when you right click in the upper pane or click the Analyze Execution History button in the toolbar the emulator shows the history of task execution When showing the history of task execution note that the functions called from within tasks are not displayed in a tree structure Only the order in which the functions were executed is displayed vh vaxz k9 545 mae WI TaskID D M3T ME3 4 or Idle x H T amp skID 1 main _ E TaskIbD 2 taskl INS T DEDISTIS SYSCALL FD368 lt OFISDE DEOH DF125C OFOFC4 Hi TaskID 3 _task2 EH TaskIb 2 taskl l _ Range 00036085 0000000 Fle Cycle 00026466 address OFOG4A Mme 00 00 00 670 329 550 Cycle Label Address Date BUS BHE BIU R W ENT CPU ON BUSA Debug 0002 6466 OFOS6A 0400 R OF cw zi i 1 Time stamp ih SSS SS Se IEW OU ba un H ES 000z 6465 DEUS 6c a 2 1 1 2 taskl 00 O002 6464 OFOS6E BOTB l6b 0 IM R OF Cw 3 1 i amp taskl O0 00 00 670 456 940 g0z6463 SB QO00400 0034 165b O Dw w OF 3 1 1 amp i taski O0O 00 00 670 520 630 0002 6452 DFOS7D OFT 16b O IM R OF wed i 1 2 taskl O0 00 00 670 584 400 D0002 6461 OOOASZ 0032 16b O Cth W 0 Cw OU 1 1 tamsklj OO 00 00 670 648 150 00026460 OFOSTZ 041A 16b O Iki F 4 i 1 Z tmsklj O D DOD DD 670 711 B9D0 00026459 DOFOZT4 3073 16b Ii ER 0 Rw Z 1 l tms
124. cution time and count in its executed portion can be measured Thus the above is the relationship between break addresses and the measurable range Even after the program returned to a high order function execution counts of the function from which program execution started cannot be measured f Function measurement To measure functions accurately you need to be in a function to be measured for 100 ns or more after entering the function Otherwise the execution time and count may not be measured properly g Debug information option To get execution time and execution count of functions you need to specify a source file that includes the functions for measurement or an option that outputs debug information to the library during compiling When not specifying the Debug information option you cannot measure execution time and execution counts of the function h Maximum execution time and minimum execution time With the realtime profile you cannot measure the maximum and minimum execution time of a function To measure the maximum and minimum execution time of a function use the Performance Analysis window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 187 of 229 RENESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 Task profile Execution performance is measured one task at a time The Realtime profile window shows task IDs counts and the cumulative execution time execution rate and average execution time of t
125. d is marked with an arrow zl in the S W Breakpoints column CAUTION When a break occurs the program stops immediately before executing the line or instruction at which a software breakpoint is set If Go or Step 1s selected after the program has stopped at that software breakpoint the program restarts from the line marked with an arrow 5 6 2 Adding Removing Software Breakpoints Follow one of the following methods to add or remove software breakpoints From the Editor or the Disassembly window From the Breakpoints dialog box only removing From the command line REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 100 of 229 2 NC S AS ROE530640MCUOO User s Manual 5 Debugging Functions 1 From the Editor or the Disassembly window 1 Check to see that the Editor or the Disassembly window that is currently open includes the position at which you want to set a software breakpoint 2 In the S W Breakpoints column double click the line where you want the program to stop ini xi init struct Sample p sam p sem s0 0 p sam sl1 U p sam 22 0 p sam a3 0 p sammn s4 D p sam 55 D 25e U m i ETT Brea noite Figure 5 19 Editor window Or you use the method described below to set a breakpoint Select Toggle Breakpoint from the context menu or press the F9 key on the keyboard 3 When a software breakpoint is set a red circle is displayed at the corresponding
126. d or backward from the current trace cycle zarz temer alaaa Range DOODESS0 00000000 Fle resetprg c cycle 00006549 Address OFGAGE Time 00 00 00 000 127 320 Source 000041 void start void p004 Dogagq3 E E seb interrupt OO00S4 PEAGA PEGE x03 change protect mode register o00045 OFSAGE Im yen 0x00 get processor mode register single chip 000046 OFeaAyi cml 0x20 set syatem clock 1 register O00047 OFSATS cum 0x49 get system clock 0 register Daoagagg OFSATS cam 0x09 get system clock 0 register Dagaoga DFBATD cme 0x00 ff get system clock 2 register 000050 DFEABU pret 0x00 change protect mode register nanmas1 DPBA B3 flq _ F valu set fleg register Fif STACESIZB 0 FBABT spe amp stack top seb user stack pointer endif OFEASE In xb O0x400 400H fixation De not change Ss set variable veetor s address Figure 5 59 Source Display screen 4 Mixed Display Mode This display mode provides a mixed display of bus disassemble or source display After choosing Display Modes gt BUS from the context menu select Display Modes gt DIS That way you can produce a bus and disassemble mixed display In the same way you can produce a bus and source a disassemble and source or a bus disassemble and source mixed display To revert to a bus only display after vie
127. d realtime profile functions usable exclusively to each other To use the realtime profile function choose Realtime Profile in the Switching function section on the System page of the Configuration properties dialog box Realtime profile is the function to measure execution performance within an area allocated to addresses in the profile range one function or one task at a time It will help you find the locations and causes of performance degradation in an application program Measurements are carried out without obstructing user program execution The measurement results are updated when the program breaks 1 Function profile Execution performance is measured one function at a time The Realtime profile window shows function names the start addresses of functions function sizes counts and the cumulative execution time execution rate and average execution time of functions The function profile of the E100 emulator does not include the execution time of subroutines in its cumulative display of function execution time CAUTION The function profile is subject to the following limitations a About the areas to be measured The E100 emulator can acquire profile information on all functions in areas up to 8 blocks each in 128 KB units Each block you set can be comprised of a contiguous or noncontiguous address area No functions can be set that are outside the range of block addresses In that case the functions or tasks are d
128. d when b31 is 1b Data of the data bus Displayed in hexadecimal Shows the external data bus width indicated as 8b when the bus is 8 bits wide or 16b when 16 bits Shows the state 0 or 1 of BHE Byte High Enable signal When this signal is 0 it means that an odd address 1s being accessed Shows the state between the BIU Bus Interface Unit and the memory and I O No change DMA Data access such as DMA etc requested from other than the CPU INT INTACK sequence start IB Instruction code read in bytes requested from the CPU DB Data access in bytes requested from the CPU IW Instruction code read in words requested from the CPU DW Data access in words requested from the CPU ee 39 Shows the data bus state indicated as R when in a read state W when in a write state or when no BHE R W accesses made RWT The signal indicating the valid position of bus cycle When valid this signal is 0 The Address Data and BIU lines are valid when this signal is 0 CPU Shows the state between the CPU and the BIU Bus Interface Unit No change CB Op code read in bytes RB Operand read in bytes QC Instruction queue buffer clear CW Op code read in words RW Operand read in words Shows the number of bytes stored in the instruction queue buffer Displayed in the range from 0 to 4 CAUTION When stopping the user program by using software break QN the number of bytes stored in t
129. dated according to the section information in a download module 5 To add an access attribute manually click the Add button The Access protection condition dialog box shown below will appear Specify any address range and access attribute Access protection condition X Start Address E000 a End Address FFFF tj attribute Cancel Figure 5 141 Access protection condition dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 199 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 6 The protected area you have added will be displayed in the Address Areas list of the Violation of access protection dialog box vw Automatically set address areas at downloading Address Areas AOA Hea rite ddress Access Att 2 1MB MR top OOOFOOOO OOOF1 FFF Read Only mem 03 BkB DODF20D0 DDOF39E3 Read Only Delete the Black 4 BkB INT v OOOFEOOO OOOFE OFF Read Only Helia l UD4 BkB OOOFE100 OOOFFFDE Disable 4 SKB OOOFFFDC OOOFFFFF Read Only DK Cancel Help Figure 5 142 Violation of access protection dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 200 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 2 From the Trace conditions dialog box 1 In the Trace Mode drop down list of the Trace sheet select Fill around TP Select the Exception check box and then click the Detail button Trace conditions
130. de Memory expansion mode Microprocessor mode CAUTION Options are different depending on the target MCU that you select 3 Selecting an external data bus width You can set this when the operation mode you have selected is Memory expansion mode or Microprocessor mode Select one from the following options 8 bits 16 bits initial value REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 80 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 4 Selecting a memory expansion space You can set this when the operation mode you have selected is Memory expansion mode or Microprocessor mode Select one from the following options Normal Mode initial value 4MB Mode 5 Using PM13 b3 of 0x000005 as set to 1 To switch the setting of the CS2 area specify the PM13 third bit of processor mode register 1 setting When using the user program with PM13 set to 1 select this check box 6 Using PM10 b0 of 0x000005 as set to 1 To expand the internal reserved area specify the PM10 zeroth bit of processor mode register 1 setting When using the user program with PM10 set to 1 select this check box 7 Using PRG2CO b0 of 0x000010 and PM10 b0 of 0x000005 as set to 1 To enable or disable the program ROM 2 area specify the PRG2CO zeroth bit of program 2 area control register setting When using the user program with PRG2CO set to 1 select this check box 8 Setting up communication Select the other party to
131. dialog box When using the CO level coverage and C1 level coverage you can specify any of 1 8 blocks maximum 2 Mbytes each beginning with the 256 Kbyte boundary and any of 1 8 blocks maximum 1 Mbyte each beginning with the 128 Kbyte boundary as a code coverage measurement area respectively Contiguous blocks or noncontiguous blocks either one can be set With initial settings the coverage memory is allocated to addresses in the ROM and RAM areas OOOO00 e coverage can 040000 f FFFF be measure 240000 Area where coverat Je Can ECC he measu FSI FLOOD FFFFFF be measured Figure 5 74 Schematic of coverage memory allocation REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 149 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 2 Changing memory allocation If coverage memory allocation is changed the coverage data acquired from the addresses before being changed is retrieved from coverage memory into a coverage only buffer oiii Buffer for coverage D aO Area where coverage can TFFFF be measured 1 Allocation change Area where coverage can FCOUDI he measured Area where coverage can FFFFFF be measured Figure 5 75 Schematic of coverage memory allocation change The data accumulated in a coverage only buffer is retained until the user clears it However data 1s not updated for the areas that have no coverage memory allocated The coverage infor
132. e Edit Ra Bak Delete Range Executed Pass address ANM y OFE224 ENTER i OFEZ2 7 PUSH Wi p sam mal OFEZZB PUSH Wi OFEZZF JSR A ee 4 A e fy Address Range Source Figure 5 83 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 155 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 2 A dialog box asking for your confirmation will be displayed Choose to save or not save coverage data To save specify a file name and then click the OK button If you do not save simply click the OK button Delete Address Range C Save coverage data to file Caneel Figure 5 84 Delete Address Range dialog box 3 The address range you have selected will be removed Code Coverage S ay Wt p dd odi FElBE FE218 1003 100 RRNRRRRSSEEEEEN Executed Source DFElBE ENTER f FElC1l MOV W G DFE1C4 MOV W Q for i 0 i OFE1C CHP Wig 14 A e fi Address Range Source Figure 5 85 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 156 of 229 QEN ESANS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 11 8 Measuring Source Files The Source sheet shows the code coverage information CO coverage and C1 coverage collected by the emulator from a user specified source file Multiple source files can be registered A source file exceeding 2 Mbytes in size or even a file that i
133. e Function CO Coverage Cl Coverage Source Executed Address Assembler AE Address Range A Source Figure 5 92 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 160 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 11 11 Showing Percentages and Graphs When the program has stopped right click in the upper area of the Code Coverage window and choose Percentage from the context menu The emulator will start calculating the CO instruction coverage rate and Cl Branch coverage rate for each address range When the calculation is completed coverage information is displayed in the upper area by a percentage value and a graph Lode Coverage x Percentage FE376 Add Range Edit Range Delete Range Code Coverage foreio orsisc sae s OFE224 OFE376 250 75 NNNNHENHNEE 3 Figure 5 93 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 161 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 11 12 Using the Sort Function Clicking a header column in the upper area of the Code Coverage window you can sort coverage data 1 Clicking the File column The data can be sorted by file name Lines of one and the same file are sorted by function name Example File Function filel cpp funcl filel cpp func2 filel cpp func3 filel cpp func4 file2 cpp funcl file2 cpp func2 file2 cpp func3 file3 cpp fun
134. e 5 108 Data Coverage window 2 In the Add Address Ranges dialog box that is displayed enter an address range Add Address Range Start Address 512 gl End Address b3E Cancel T Figure 5 109 Add Address Range dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 173 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 3 The address range you have added will be displayed in the upper area of the Data Coverage window xj 9S SS qm x Wt X addi OOOBSE 000512 Ja 65 QOO0S516 RAM i ad 18 DEOS 14 RAM 3d 71 Yr Oe QOOS1E RAN d Ua la fa 000522 RAM 10 18 fF 35 nN Address Range Task Stack Figure 5 110 Data Coverage window 5 12 6 Changing Address Ranges Follow the procedure described below to change address ranges 1 From the Address Range sheet of the Data Coverage window 1 Select an address range you want to change in the Address Range sheet and while holding it selected choose Edit Range from the context menu Data Coverage 7 Xx 96 s mp sy Wt EX D00512 OU653iE psec bibs asic a Wea REUS EE RR MUST cae tU nash TUE TT Ian Percentage Edit Range Delete Range 000512 234 ej 000516 RAM al ad 18 e DIOS 14 RAM 3d 71 Yt Oe DDDS TIE RAM ds Ua la fa 000522 RAM 10 19 7 35 mG Address Range Task Stack Figure 5 111 Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 174 of 229 2 NC S AS ROE53064
135. e 82 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 2 Selecting the direction of external trigger cable For External trigger cable select whether EXT pins 16 31 are directed for input or output EXT pins 0 15 are fixed for input Select this option from the following EXT 0 31 INPUT initial value EXT 0 15 INPUT EXT 16 31 directed for OUTPUT The setting of this option is reflected at only startup If you set this option again in the present dialog box after startup what you have set has no effect 3 Selecting a trigger input level For Trigger input level select CMOS level or TTL level Select this option from the following EXT 0 31 chosen to be CMOS initial value EXT 0 15 chosen to be TTL EXT 16 31 chosen to be CMOS 4 Selecting a switching function The code coverage data coverage and realtime profile functions cannot be used at the same time Select one function from them Initially code coverage is selected The setting of this option can be changed even after startup When the code coverage function is selected measurements are performed at the coverage level selected in Code coverage mode 5 Selecting a code coverage mode Select a code coverage mode CO Instruction coverage rate CO CI Instruction coverage rate Branch coverage rate You can measure up to 2 Mbytes when using the CO level coverage and up to 1 Mbytes when using the CO C1 level coverage Th
136. e Performance Analysis window choose Performance gt Performance Analysis from the View menu or click the Performance Analysis toolbar button im Performance Analysis TEN x Ya S u H r8 Eo Condition Run time him s ms C Statistic Max h m s ms us ns Min h m s ms us ns Average h m s ma us ns 1 Enable Q0 00 01 254 556 150 5 aS 00 00 00 268 211 700 00 00 00 227 113 400 00 00 00 250 911 230 2 Enable Dn n0 01 982 471 8B80 4 ERR 00 00 00 514 026 500 00 00 00 472 836 250 00 00 00 495 617 970 3 Enable 00 00 01 254 556 150 5 45 ARN 00 00 00 268 311 700 00 00 00 227 113 400 00 00 00 250 911 230 4 Disable OT iy 5 Disable 0 ENNNNNNNNI 6 Disable os EE T Disable OSEE 8 Disable 0 NNI Figure 5 66 Performance Analysis window The Performance Analysis window shows a ratio of execution time conforming to the conditions you set in the immediately preceding program execution numerically as percentage and graphically The unnecessary columns in this window can be hidden To hide any column right click in the header column and select the column you want to hide from the context menu To redisplay any hidden column select that column from the context menu again REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 142 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions The contents displayed in this window are listed below Table 5 23 Columns and contents Numbers
137. e alteration you made is not reflected on the registered event list side 2 Registering duplicates in the registered event list Even the events that have the same contents set can be registered in the list overlapping one another REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 114 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 7 6 Applying Events To enable the setting of an event after you have created it click the Apply button The content of what you have set has no effect until you click the Apply button after the title on the title bar of the dialog boxes of Hardware break Trace conditions or Performance Analysis Conditions shows that some setting 1s under editing If you are doing some editing work you cannot change the settings from the event column of the Editor window or the command line Hardware Break Hardware Break OR Event EVOL F Address main z main Function Delete Enable Disable Event used 1 Free i5 Detal Registered events Figure 5 41 Applying the setting REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 115 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 8 Setting Hardware Break Conditions 5 8 1 Setting Hardware Break Conditions A hardware break causes the user program to stop running a specified number of cycles after a set event or phenomenon is detected 1 e a hardware breakpoint is encountered Up to
138. e initial value is CO coverage The setting of this option is reflected at only startup This option is available only when the Code coverage is selected in Switching function If you use the code coverage function select the mode in this option at startup 6 Enabling Debug the program using the CPU Rewrite Mode Select whether you want to debug the program using the CPU Rewrite Mode 7 Masking the target system s RESET pin input Select whether you want the input signal to the RESET pin of the target system to be masked REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 83 of 229 QEN ESNS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 1 4 Creating a Memory Map On the Memory map page of the Configuration properties dialog box set a lending memory allocation You can specify 4 areas In a unit of 4KB Configuration properties II 1 in x System Memor map intemal flash memor averat Exception w aming MEU Group lt Device R5F35406_128K Mode MemoyExpanson Emulation Memor Allocation Amal 9 ooo a FFF Aea an 000 a FFF Caa 1o rer Ta Ooo r This setting amp effective oniy in the area C33 D52 CS17 and DSL Non allocated areas are set ac extemal The maps of SFR intemal RAM and internal AOhl are set automatically cancel Hob Do not show this dialog box again Figure 5 3
139. e mode Fill until stop In free mode at the same time the user program starts running the emulator starts tracing bus cycles to get trace information and when the user program stops the emulator stops tracing The acquired trace information is displayed in the Trace window Trace o COE D gt 00 m VE Farz Read bl Flaa Ranga O0006550 OO000000 File Cyce CO0000I6 Address OFB2T2 Tima OO DO 0D 001 576 540 Cycle Label Address Data BUS BHE EIU B W RWI CEU ON BUE Deb EV TimeStemp hzm s ms us ns 00000016 OPe272 04 16b1 1 3 1 1 OGO00000000000000 00 00 00 001 576 540 00000015 FFFE amp 02 16h 1 DB R 3 1 1 dOo00000000000000 00 00 00 001 576 530 00000014 OPFFFE6 O2 106581 1 31 1 OO00000000000000 00 00 00 001 576 640 00000013 OFFFEG ii 1 31 1 OO00000000000000 00 00 00 001 576 690 00000012 OFFFE6 ii 1 31 1 OO00000000000000 00 00 00 001 576 740 0000001 OFFFE6 ii 1 31 1 OODO00R0000000000 00 00 00 001 576 7830 00000010 OPFFFE6 Ue ibi 1 31 1 ODODO00R0000000000 00 00 00 001 576 640 00000009 OPFFEG 0 1651 1 31 1 OODODOR0DO0000000 00 00 00 001 576 8690 00000007 FFFEG Oe 266 12 1 31 1 OODOD0R000000000 00 00 00 001 576 940 DODDOD PFFEG O2e 16b 1 1 3 1 1 DDODODOODODDODO DOSQODG QOU QUI 5 76 990 O0000006 DPFFEG 02 lth 1 1 3 1 1 ODUDDODDODODDOUO 00 00 00 001 577 040 00000005 DPFFE amp D2 l bl
140. e right mouse button The dialog box shown below will be displayed Instant Vvakch Gla 4 Ox0006e5 signed lana 1U Figure 3 13 Instant Watch dialog box Click the Add button to add a variable to the Watch window acta e a ipa Figure 3 14 Watch window array display Or you can specify a variable name to add a variable to the Watch window Click the right mouse button in the Watch window and choose Add Watch from the context menu The dialog box shown below will be displayed Add Watch Variable or expression LIE o Ead Figure 3 15 Add Watch dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 46 of 229 QEN ESNS ROE530640MCUOO User s Manual 3 Tutorial Enter a variable 1 in the Variable or Expression edit box and click the OK button An int type variable 1 will be displayed in the Watch window Watch E x R EBIEM BOX eB we uU Name value sd type gE R i Ox0006e5 signed long 10 I Foi H oO0a x JJg715 signed int AI Eh watcha Figure 3 16 Watch window showing a variable Clicking the mark shown to the left of the array a in the Watch window you can look at each element of the array a LC MEN EI IR I i Ox0006eS signed long 10 R 0 H OD004ie6 OxD006eS signed long R 1 H ODUdgi67e x d6ss5 signed long R 2 H BDOZ781 Ox0006ed signed long 2 R 3 H OOO0446b
141. ecting Assembly Language Codes cccccssscecceeseeecesseecceseeeceaueeecseeeecseuseeessageeessageeeseaes 93 5 3 Displaying Memory Contents in Real Time eessssssssssssessseese eene nennen nn nnne nnn nnn nns 94 5 3 1 Displaying Memory Contents in Real Time cccccccseeceeceeeeeeeseeeeeeeeeeeeseeeeeeeeeeeeesaeeeesaeeeeeeas 94 5 3 2 Setting RAM Monitor Update Intervals 0 0 0 0 cccccccccecsseeeeeeeeeeeeseeeeeesaeeeeeeeeeeeseeeeeeeseeeeesseeeeeseaes 95 99 9 Clearing RAM Monitor Access HiStory ccccccccseecceceeeeeeeeeeeeecaeeeeesseeeeeeeeeeeeeseaeeesseeeeesaaeeeesaees 95 5 3 4 Clearing RAM Monitor Error Detection Data ccccceccccceeeeeeeeeeeeeeaeeeeeseeeeeeeaeeeeeeaeeeeesaeeeeens 95 54 Showing the C ment eS dcesriaiuapssmbsiaamuade jebtneeeuamnnean AA duos OS Sa hades deheeaaatetaetevedaneeeateniensushde 96 5 4 1 Showing the Emulator Stat 96 0 4 2 Showing the Emulator Status in the Status Bar sessessesesseeeeenerneennennem nnns 97 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 10 of 229 RENESAS ROE530640MCUOO User s Manual Contents 5 5 Periodically Reading Out and Showing the Emulator Status cc cccccccccccseceeeeeceeeeeeeseeeeeseeeeeseeeeseeeeeas 98 5 5 1 Periodically Reading Out and Showing the Emulator Information ss 98 5 9 2 Selecting the Items to Be Displayed cccccccessce
142. ecuted the 4 byte value pointed to by the interrupt stack 1s used under control on the emulator side The general purpose registers and flags used in a specified routine are subject to the following limitations REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 209 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions Table 5 44 Limitations to the registers and flags Register flag Name ISP register When a specified routine has ended the value of this register must be restored to one that it had when the specified routine started When a specified routine has ended the value of this flag must always be set to 0 Interrupts are disabled while a specified routine is executed When a specified routine is executed the debug functions listed below have no effect a Trace function b Break related functions c RAM monitor function When a specified routine 1s executed non maskable interrupts are always disabled The table below shows which state the MCU will be in when the user program starts running after a specified routine 1s executed Table 5 45 MCU Status at start of the user program MCU Resource MCU general purpose These registers are in the state in which they were when the user program last stopped or registers the MCU registers that were set in the register window by the user The register contents changed after a specified routine is executed are not reflected Memory in MCU space Memory acc
143. eeeeseees 139 5 9 14 Restarting Trace Information ACQUISITION ccccceeceecceeeeeecaeeeecseeeeeesaeeeeesaeeeeeeseaeeeesaaseessasees 139 9 9 15 Switching Time Stamp DiISplay uus ccce onte ne den aeu aUa anaana rue md iau uad aditu us Jae dde EERE 139 9 9 16 Showing the History of Function Execution sseeeessssessssseeseeeeeeee nennen 140 5 9 17 Showing the History of Task Execution sseeessssssssssesseeeeeee nennen nenne 141 5 19 Measuting PerforislGO uussxsecesperoxs asusta ter Era v FP OU edat Mr o x ESE EU ao tu Et a RE Ea dun SR a i rara DR duh v S AM RE Er dal gu 142 5 10 1 Measuring iz qienine PP m 142 9 10 2 Showing the Result of Performance Measurement cccccccceeceeeeecseeeeeeeeeeeeeeeeeeeeeaeeeeesaaeeees 142 5 10 3 Setting Performance Measurement Conditions seeesseessssesseeeeeeennennenn nnne 143 5 10 4 Starting Performance Me aSuremMentt cccccscccccssseecceececcseseeccceuseecsseseeecsageeecsauseesssaseeesageees 145 9 10 5 Clearing Performance Measurement Conditions ccccccseeeeeeceeeeeeeaeeeeeeeeeeeeeseeseeesaaeeeesaeeees 146 5 10 6 Clearing the Performance Measurement Result ccc cccccseeeeeeeeeeeeeeeeeeeeeeeseesseaseeesaeeeeesaaaees 146 5 10 7 About the Maximum Measurement Time of Performance cccccecseeeeeeseeeeeeseeeeeeaeeeeeeaeeeees 146 5 11 Measuring Code Covera
144. eeesaees 79 5 1 2 Setting Up the Target MCU cccccceccccssseeeceesececeeeeeceeaseeeseaeeessageeecseuseeessageeessaesesseneeeesees 80 9 129 Setting Up the System essssesssssesesseeeee nennen nennen nn nase atas sni arra snae sas sa sanas sna sanare 02 5 1 4 Creating a Memory Map cccccccseeeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeseeeeeesaeeeeeeseeeeeesaeeessaeeeeesaeeeesaeeeenseeas 84 5 1 5 Setting Up Flash ROM Overwrite ssssessssssssssssessee eene nnne nnn nennen nans 85 5 1 6 Setting the Warning of Exceptional Events seessssesssssesseeeeeen nennen 86 9 1 7 Setting Option board cccccccscccccesseeceeseeeceaseeecceseeccsagececseseeeeeaseeessaeesseaseeessaseeesseneessssgeeereess 86 5 1 8 Showing Progress in Boot up Processing cccceeecceceeeeeeeeeeeeeeceeeeeeeeeeeeesaeeeeesseeeeesseeeeeeeaeeeeeeas 87 95 2 D w nloading a Program E Tm 89 5 2 1 D wnloading a OA RERO MEER 89 9 2 27 Showing the Source Coda E 89 5 2 3 Turning columns in all source files Off cccccsseccccsseeeceseeecceueecceuseecssageeeeseaseesssaseeessaseesseases 91 0 2 4 Turning columns in one source file Off cccceeccecceeeeeeceeseeeceeseecceuseecsaeeecsaseeeseseesssaseeessaees 91 5 2 5 Showing Assembly Language Code ccccscccccssseecceeseecccesseecceeeecsaseeeceegeeeceeseeessgeeessgeesseaes 92 0 2 6 Corr
145. eessaeessaeeessaueessaeeeseueeeseageessaeeessgeeeseneessaases 226 MEE ROJS TANO PERMET m t these plone ican elit ct novia cade m 226 8 2 Maintenance gt ERI Emm m 226 BORED III NERONI MOTHER 226 oA Repar TPEFOUWSIODS ceteeiiuicesont Eorecii dott ier bosse d pb e fae brescia joten der Lussmit e eaa E a Lond 226 8 5 How to Make Request for Repair ccccseccccseeecceeceeceeeececeeseececeseeseaeeeseueeeseaeeseasesseeessaseeessueeesenseesaaees 227 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 13 of 229 2CENESAS ROE530640MCUOO User s Manual User Registration User Registration Customer Registration Sheet is included with this manual fill it in and FAX or email it to your local distributor If you register it by email you can use a text format for user registration created when installing the software in the following folder Your registered information is used for only after sale services and not for any other purposes Without user registration you will not be able to receive maintenance services such as a notification of field changes or trouble information So be sure to carry out the user registration For more information about user registration please contact your local distributor Text format for user registration C Program Files Renesas Hew Support REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 14 of 229 2CENESAS ROE530640MCUOO User s Manual Terminology Terminology Some specific words used
146. eleting an event from the Registered Events dialog box To remove one point select a line you want to remove in the Registered Events dialog box and then click the Delete button You can use the keys Ctrl Del instead of clicking the Delete button The selected event will be removed from the list of registered events To delete all events click the Delete All button Registered Events Ioj x Descriptions F PERE ini F Address p F Address main Delete Delete al y Duplicate Add Save Load Figure 5 35 Registered Events dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 111 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 7 4 Registering Events Registering an event refers to placing an event into the list of registered events A registered event can be reused at a later time Follow one of the following methods to register an event Up to 256 events can be registered 1 Registering events When creating an event from the Event dialog box 1 Display the Comments page of the Event dialog box and select the Add this event to the list check box Then click the OK button CREE 5x Conditian Count and Task Ip Comment Cep BreakPoint Figure 5 36 Event dialog box 2 An event is added at the specified position while at the same time registered in the Registered Events Hardware Break GR Registered Events
147. ement Ranges from the context menu Code Coverage 1m A x o S3 xe t ox et A Address Range CO Coverage Cl Coverage Percentage dd Range E Ib H ang E 1 Ono Address Range Source Figure 5 77 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 152 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 2 In the Add Address Range dialog box that is displayed enter an address range Add Address Range Stat Address Figure 5 78 Add Address Range dialog box 3 The address range you have added will be displayed in the upper area of the Code Coverage window Code Coverage Address Range CO Coverage Cl Coverage i FEl102 FEIEBC Executed Source FElUZ ENTER OFE105 MOV W G 0FE108 MOY W O gap 5 FEIUB JCHP W o while gap A bf Address Range j Source Figure 5 79 Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 153 of 229 QEN ESAS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 11 6 Changing Address Ranges Follow the procedure described below to change address ranges 1 From the Address Range sheet of the Code Coverage window 1 Select an address range you want to change in the Address Range sheet and while holding it selected choose Edit Range from the context menu ETITIT OENENEENNNNSSSBNARAAEFKAREAWSS 00H 5 is Tf WP
148. en in order to use this product safely and properly Be sure to read this chapter before using this product AN A DANGER A WARNING AN CAUTION CAUTION IMPORTANT This symbol represents a warning about safety It is used to arouse caution about a potential danger that will possibly inflict an injury on persons To avoid a possible injury or death please be sure to observe the safety message that follows this symbol DANGER indicates an imminently dangerous situation that will cause death or heavy wound unless it is avoided However there are no instances of such danger for the product presented in this user s manual WARNING indicates a potentially dangerous situation that will cause death or heavy wound unless it is avoided CAUTION indicates a potentially dangerous situation that will cause a slight injury or a medium degree injury unless it is avoided CAUTION with no safety warning symbols attached indicates a potentially dangerous situation that will cause property damage unless it 1s avoided This is used in operation procedures or explanatory descriptions to convey exceptional conditions or cautions to the user In addition to the five above the following are also used as appropriate means WARNING or CAUTION Example means PROHIBITION Example JN CAUTION AGAINST AN ELECTRIC SHOCK pIsasseMBLy PROHIBITED means A FORCIBLE ACTION Example uNPLuc THE POWER CABLE FROM THE RECEPTACLE
149. ended Monitor Configuration dialog box will be displayed Extended Monitor Configuration La User System Connechbon DISCONNECT Disconnect NNO CHNT Ch User System Power Source DISCONNECT Weel 0 6 v VeezD 4 v User System RESET High User System MMIS High User System CNVss User System HOLD High User System ADH Hagh User System BYTE te e m e Figure 5 18 Extended Monitor Configuration dialog box This dialog box permits you to set each item you want to be displayed in the Extended Monitor window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 99 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 6 Using Software Breakpoints 5 6 1 Using Software Breakpoints A software break causes the user program to stop running by rewriting the instruction code at a specified address with a BRK instruction to generate a BRK interrupt In that sense this 1s a pre execution break function 4096 breakpoints can be set If multiple software breakpoints are set the program breaks at any one of those breakpoints reached 1 When stopped at a software breakpoint When the program you have created is run and the address you have set as a software breakpoint 1s reached a message Software Break is displayed on the Debug sheet of the Output window with the program made to stop there At this time the Editor or the Disassembly window is updated and the position at which the program has stoppe
150. eption Events The E100 emulator permits you to detect various exception events that have occurred during user program execution Exception events include an abnormal behavior of the user program as well as an overflow of the measurement counter of any function involved etc Detection of a specified exception event can be set as a condition of a breakpoint or trace point 1 Exception events The E100 emulator detects the exception events listed below Violation of access protection An error is detected when an access other than a specified access attribute was attempted Read from uninitialized memory An error is detected when uninitialized area not write accessed was accessed for read Stack access violation It is detected that the value of the stack register exceeded the stack area Performance overflow It is detected that during time measurement in a specified section of the program some section exceeded the maximum measurement time or maximum measurement count Realtime profile overflow It is detected that during profile measurement some function or task exceeded the maximum measurement time or maximum measurement count Trace memory overflow It is detected that trace memory overflowed Task stack access violation It is detected that a write to the relevant task stack was attempted from another task OS dispatch It is detected that a task dispatch occurred 9 14 2 Detecting an Access Protect Violation This
151. er of the emulator and user system as simultaneously as possible When the SAFE LED of the system LEDs is flashing check that the USB cable is connected to the host machine When each of the target status LEDs is flashing check that the MCU unit is connected When turning ON the power again after shutting OFF the power wait for about 10 seconds IMPORTANT Notes on Power Supply The emulator pin Vcc is connected to the user system in order to monitor user system voltage For this reason the emulator cannot supply power to the user system Supply power to the user system separately The voltage of the user system should be as follows 2 7 V Vccl Vec2 lt 5 5 V When you start the emulator without the user system do not attach a converter board When starting with a converter board the MCU will be in a reset status When you start the emulator without the user system take care that metallic pieces are not touched to the connector at the head of the flexible cable Do not leave either the emulator or user system powered on The internal circuits may be damaged due to leakage current REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 28 of 229 QEN ESAS ROE530640MCUOO User s Manual 2 Setup 2 Self check The self check is to check the emulator functions operate properly To run the self check function of the emulator follow the procedure below While the self check is in progress the LEDs will change as shown i
152. ering the use of this emulator for one of the above purposes please be sure to consult your local distributor About product changes We are constantly making efforts to improve the design and performance of this emulator Therefore the specification or design of this emulator or its user s manual may be changed without prior notice About the rights 1 We assume no responsibility for any damage or infringement on patent rights or any other rights arising from the use of any information products or circuits presented in this user s manual 2 The information or data in this user s manual does not implicitly or otherwise grant a license for patent rights or any other rights belonging to us or third parties 3 This user s manual and this emulator are copyrighted with all rights reserved by us This user s manual may not be copied duplicated or reproduced in whole or part without prior written consent of us About diagrams The diagrams in this user s manual may not all represent exactly the actual object REJ10J1733 0100 Rev 1 00 Apr 01 2008 page Oley RENESAS ROE530640MCUOO User s Manual Precautions for safety Precautions for Safety Definitions of Signal Words In both the user s manual and on the product itself several icons are used to insure proper handling of this product and also to prevent injuries to you or other persons or damage to your properties This chapter describes the precautions which should be tak
153. esses attempted after a specified routine is executed are reflected MCU peripheral Operation of the MCU peripheral functions performed after a specified routine 1s executed functions are continued 5 15 4 Limitations to the Statements written in a Specified Routine The statements written in a specified routine are subject to the limitations described below If a stack needs to be used in a specified routine always be sure to use the user stack To terminate the processing of a specified routine write a return subroutine instruction Make sure that one session of processing performed by a specified routine is terminated within 10 ms If for example the clock is turned off and kept inactive within a specified routine then the emulator may become unable to control program execution The values stored in the registers at the time a specified routine starts running are indeterminate Be sure that the register values are initialized within a specified routine REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 210 of 229 RENESAS ROE530640MCUOO User s Manual 6 Troubleshooting Action on Error 6 Troubleshooting Action on Error 6 1 Flowchart to Remedy the Troubles Figure 6 1 shows the flowchart to remedy the troubles from when power to the emulator is activated until the emulator debugger starts up Check this while the user system is disconnected For the latest FAQs visit the Renesas Tools Homepage http www renesas com to
154. et Range from the context menu that is displayed when you right click in the present window The Realtime Profile Setting dialog box will be displayed In this dialog box set a profile measurement range Task mode Realtime Profile Setting l x Realtime Profile Mode MERMA List Task List Task ID Entry Address 0 M3T MASO 4 of Idle 1 Iz 1 mam E 2 task 3 _task tasks tasks taska i l ol Enable All Task m Disable All Task Save loa He ok Cancel Figure 5 134 Realtime Profile Setting dialog box 1 Automatic task detection If you have downloaded a load module that has the OS included in it the E100 emulator automatically detects a task list 2 Selecting tasks Select the check box of a task ID you want to measure By default all check boxes are selected The selected tasks will automatically be assigned block numbers 1 8 CAUTION If measurement blocks are lacking block numbers become blank so that no more task IDs can be registered In that case deselect the check boxes of unnecessary task IDs REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 192 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 13 9 Saving Task Profile Measurement Tasks Save the current task mode and measurement tasks task IDs and enabled disabled states Click the Save button of the Realtime Profile Setting dialog box and the S
155. f an execution of an instruction at a specified address as a break event The program will break after the instruction at the specified address is executed 3 Exceptional event This is a debugging function which stops a program by an abnormal operation of the user program or overflow of each function s measurement counter etc Notes on Software Breaks The BRK instruction can be used for the emulator only You cannot use it in a user program As BRK instruction interrupt vector is used by the emulator system the read data is different from expected value You can neither set nor cancel a software breakpoint in the internal ROM area of an MCU during user program execution while you can set or cancel it in the internal RAM area of an MCU REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 223 of 229 QEN ESAS ROE530640MCUOO User s Manual 7 Hardware Specifications IMPORTANT Notes on Power Supply to the User System Pins Vccl and Vcc2 are connected to the user system to observe the voltage Therefore the power is not supplied to the user system from the emulator Design your system so that the user system is powered separately The voltage of the user system should be as follows 2 7 V Vccl Vec2 5 5 V Notes on Internal Flash ROM of the MCU Because the number of write erase cycles of the internal flash ROM of the MCU is limited it must be replaced at the end of its service life e If the following errors occur
156. f omitted the extension hev is automatically attached 2 Loading the set contents of hardware breaks Click the Load button of the Hardware Break dialog box The Load dialog box will be displayed Specify the file name you want to load When you load a file the hardware break settings you had before you have loaded the file are discarded and the hardware breaks are reset with the loaded settings Click the Apply button of the Hardware Break dialog box to confirm the hardware break settings you have loaded REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 119 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 9 Looking at Trace Information 5 9 1 A trace is the function to acquire bus information every cycle and store it in trace memory during user program execution Looking at Trace Information Using a trace you can track the flow of application execution or examine the points at which problems occurred The E100 emulator allows you to acquire up to 4M bus cycles When program execution stops for an exception break forced halt or breakpoint the contents stored in trace memory at the time the program has stopped are displayed as the trace result even when no trace points are encountered yet 5 9 2 Acquiring Trace Information The E100 emulator operates in such a way that when no trace information acquisition conditions are set it by default traces all bus cycles to get trace information unconditionally Trac
157. frequently when downloading a program replace the MCU board 1 Flash ROM erase error occurred ERROR 16258 2 Flash ROM verify error occurred ERROR 16259 Notes on Debugging in CPU Rewrite Mode When you debug an M16C 60 Series MCU in CPU rewrite mode do not change the block 0 area FFOOOh FFFFFh of the flash memory Otherwise the emulator will be uncontrollable If you check Debug the program using CPU Rewrite Mode in the System tab of the Configuration properties dialog box of the emulator debugger you cannot use the following functions 1 Setting software breakpoints in an internal ROM area 2 Executing COME in an internal ROM area In CPU rewrite mode and erase suspend mode do not stop the program And do not single step an instruction shifting to CPU rewrite mode or erase suspend mode The emulator will be uncontrollable in CPU rewrite mode and erase suspend mode To reference data after executing CPU rewrite stop the program at other then a rewrite control program area and use the Memory window etc As the following interrupt vectors are used by the emulator system the read data is different from expected value Single step FFFECh FFFEFh As the user boot function cannot be debugged do not enter the user boot mode Note on Accessing Addresses 00000h and 00001h e With the M16C 60 Series MCUs when a maskable interrupt is generated the interrupt data interrupt number and interrupt request leve
158. function execution history after analysis 6 Double click any function in the displayed function execution history and the trace information corresponding to that function will be displayed in the lower pane of the Trace window E main 0FBZDcC lt OFSABS El tutorial OFPS2E6 OFBZRB 1 malloc OPB49A lt OFAZF1 init FBOC2 OF8303 DE rand OFED44 TET F rand OFB944 lt DF8314 E rand OFE994 lt DF8314 F rand OFB944 lt DF8314 ms v E Fazzt Pied erlag Range 00007514 OO000000 Fie Cycle O0006092 Address OO06E4 m 00 00 00 001 317 670 Cycle Label Address Data BUS BHE BIU B W RWI CPU ON BUS Deb EV Timestemp h m s ms us na 00006192 O006E4 F ifh 1 1 cw z 1 1 Q000000000000000 00 00 00 001 317 670 00006191 pr8845 Belip ib 0 mW E O FW 2 1 1 DODOOGDODOOGDODO 00 00 00 001 317 720 aod 00006190 DFS94A 4EbD lib 0 mW R O cw 2 1 1 DODOODODOOGDODO 00 00 00 001 317 770 00006169 OO06EO 4ic 16b 0 mw w O PRW O 1 1 DDODODDODODDODO 00 00 00 001 317 620 O0006183 Deso4e FOTI leb U I R 0 2 1 1 OODOD0R0000R0000 00 00 00 001 317 B70 DDOD61B7 DPBB4g 0410 16b0 WR OF CW F 1 1 ODOODODDODODDOUO 00 00 00 001 317 920 00006166 D O amp pR 4F6b lth O DW W OF RW O 1 1 ODDODODDODnODDODO OD OD OD D01 317 97D Figure 3 39 Trace window function execution history REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 62 of 229 2 NC S AS
159. function where p sam s0 a 0 is written 3 Choose Reset Go from the Debug menu Processing will be halted by a break and the trace information from start to break will be displayed in the Trace window 4 Click the right mouse button anywhere in the Trace window and choose Function Execution History gt Function Execution History from the context menu that is displayed wv E wxzjrmiz4 biisiaam Range 00007514 DOO0000 Fie Cycle Q0000004 Address OFFFES Time 00 06 00 001 626 960 Cycle Label Address Data BUS BHAE EIU B W RW CPU ON BUS Deb EY Timestamp h m s ms us na O0000006 OFFFEG 2 ibi a I 1 OO0000O0D000R0000 00 00 00 001 626 960 O0000005 OFFFEG O2 ith i L 3 1 1 OO0000O0000R0000 00 00 00 001 627 010 O0000004 OFrFEG O2 ith i 1 3 1 0 DODODDODOODODO 00 00 00 001 627 060 O0000003 DOpD46 OF amp S 1660 Ww w 1 3 1 OO oDODODDODOODDODO 00 00 00 001 527 110 00000002 DOpD46 OFES 16D W 0 3 1 Q0 a oDODODDODOQGDODO 00 00 00 001 527 160 00000001 OODO44 353 16h U Du s 1 3 1 D OO0G00R000000000 00 00 00 001 627 210 n0000000 OODO44 E353 l6b O bh M 0 x 3 1 0 OO0O000000000000 00 00 00 001 627 260 E Figure 3 37 Trace window function execution history before analysis REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 61 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 5 Click the right mouse button anywhere in the displayed function execution
160. g three files Recalculating percentages in the Code Coverage window you can view the coverage in percentage of those tests as a whole Furthermore the merged data can be saved to a file so that you can manage those data as a single file REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 167 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 11 20 Showing Code Coverage Results in the Editor Window When the Editor window 1s displayed in source mode coverage results are displayed in its code coverage column The positions corresponding to the source lines that have had instructions executed are highlighted in yellow If coverage related settings are changed in the Code Coverage window the display of the corresponding code coverage column is also updated x 4 a Tutorial c long a 10 long j int i struct Semple far p sam p sam malloc sizeof struct Samplel init p sam for i90 i lt 10 i j randi if lt Of j j j Figure 5 102 Example of code coverage results REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 168 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 12 Measuring Data Coverage 5 12 1 Measuring Data Coverage The E100 emulator has its code coverage data coverage and realtime profile functions usable exclusively to each other To use the data coverage function choose Data Coverage in the Exclusive Functions section on the System
161. ge cccccccccssccccesceceeeeeceeeeeceeeesaeeeceeceesacesseeeesseeessaeeeseaeeesaueessueessaeeeesaasessaaees 147 5 11 1 Measuring Code Coverage ccccccssccccssccccesceceeececeeececeaeeeseeeeseeeeseeeesseneessaeeessaeeessaeesseneeesaeeeas 147 9 11 2 Opening the Code Coverage Window sessssesssseseseneeeee nennen nnn nnn nnn nnns 147 5 11 3 Allocating Code Coverage Memory Hardware Resource ssessseeseeeeeneeeee 148 5 11 4 Measuring an Address Range ccccsccccesececesecceeseeceaeeesasceseaeseceueceuaseeeeageeesaceeeaeeensueseneeeens 151 5 11 5 Adding Address IRANGES i iniscsuaiecdndadsaiiiecay donsteldhceudedanaucaweiapbsudeladsavdeduadsbawauh davdainpiwedeibhadweddansvbateduits 152 5 11 6 Changing Address RANGES sectiessicntutdncresssaceudasandodaciubdewbedap omteb kb coiere dde bub dexibe dum bnaseaddedvedeiaasqnclanus 154 5 11 7 Removing Address Ranges ccccscccsseccssseecsesceceseceneueeceaseeesaeeeseaeeeneueceeageceeageeseaseessuesensgeeens 155 5 11 8 Measuring Source Files RHE 157 5 11 9 Adding Source FilesS cccccccssscccceeseeeceesceceeseeccsuseeecsageeecseeeeeseuseeessageessegeeessauseeessaseessseageees 158 5 11 10 Removing Source FIIOS ccc cecccccssececceseeecceseecceuseeecsageeecseaseecseaseeessageeessegeeessegeeesssanenessageees 159 5 11 11 Showing Percentages and Graphs ssssssssssssssss
162. h C1 Coverage Shows C1 coverage by a percentage and graph REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 151 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions The lower area shows detail information of the address range selected in the upper area Assembler level Table 5 30 Contents displayed in the upper area of the Code Coverage window Executed 1 Instructions executed 0 Instructions not executed Pass Displays execution condition of conditional branch instruction T Condition met and program branched um F Condition not met and program not branched T F Condition met and condition not met Address Disassembled display C C or assembler source The acquired coverage information 1s accumulated in memory until the user clears it When you double click Assembler code shown in the Address Range sheet the corresponding source code is shown in the Editor window Be sure that source codes are not displayed in the cases listed below A source file that corresponds the assembler line does not exist A source line that corresponds the assembler line does not exist Where no debug information is included such as where the assembler line is a library 9 11 5 Adding Address Ranges Follow the procedure described below to add address ranges 1 From the Address Range sheet of the Code Coverage window 1 Right click in the upper area of the Address Range sheet and choose Add Measur
163. he Emulator System cccccecseeceeeaeeeeeeeeseeeeeeeeeesaeeeesaeeeeeesnees 28 2 6 2 T rnig ON OFF De POW ssi icsncsneceivnciiehinsnttidauanlspansensiadueteniia cienttel p i Darse paa U veta a t dena ni bata tiir ninos 28 PEE E EE E E OT T REN 29 20 Sle cung COCK SUPPIY eee en see ane ne enn ee eee ee eee ee ee ee ne ene ee ee eee 30 2 8 1 Gun cm 30 2 8 2 Using an Internal Oscillator Circuit Board sseeesssssseseseeeeeeeeeenneeennm nennen 31 2 8 3 Using the Oscillator Circuit on the User System seeeessssesseseeeenneeenm nmn 32 2 8 4 Using the Internal Generator Circuit llseeeeessesesseseseeeeeeee nennen nnn nnns 32 2 9 Connecting te ASE SY StS NI omososuct iv brune bm d ia apii Fax moves ui upd vM c uim For M Gn bdou USC NE 33 2 9 1 Connecting to a 100 pin 0 65mm Pitch Foot Pattern ccc ccccccccseeeeeseeeeeeseeeeeeseeeseseeeeeeeaees 34 2 9 2 Connecting to a 100 pin 0 5mm Pitch Foot Pattern cccceccceeseeeeeeeeeeeeseeeeeesaeeeeesaeeeeseees 35 SEU rp 36 Sm Mle CIC OW NENNT RR RC 36 3 2 Starting the High performance Embedded Workshop cccccceccceceeeeeeceeeeeeeaeeeeeseeeeeeeseeseeeseeeeesaeeeeeaeeeees 37 3 3 GOMMECTING the EMIUIALON m 37 3 4 DOWnlOaGInG the Tutonal oem E o o 0 70 0 0D S DTE 38 3 4 1 Downloading tme Futorial
164. he blocks selected by placing a check mark in the respective check boxes are overwritten merged without being erased when a program is downloaded REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 85 of 229 QEN ESAS ROES530640MCUO00 User s Manual 5 Debugging Functions 5 1 6 Setting the Warning of Exceptional Events On the Exception Warning page of the Configuration properties dialog box set whether or not to display warnings of exceptional events in the Status window and status bar balloon Configuration properties B x System Memory map Internal flash memory overwrite Exception Waring Option board Iw Read from urinitialized memory E Black access violation Peformance overilo Healimepralie averti Trace memon overflow b Task stack access violation B I5 GERE ET T Checked items vall display waming in a dialog balloon OF Cancel Help De nat show this dialog box again Figure 5 5 Configuration properties dialog box Exception Warning page The initial settings of Violation of access protection and Read from uninitialized memory are effective When downloading the load module including OS the initial setting of Task stack access violation is also effective Other items are not selected If you deselect the check box the item in the Status window will be displayed as 5 1 Setting Option board On the Option board page of the Configuration properties di
165. he content of the Code Coverage window to the latest Choose Refresh from the context menu of the Code Coverage window If the coverage information is inhibited from getting updated the information is not automatically updated when the program breaks To view the latest information therefore you need to update manually 5 11 16 Inhibiting Updating of Information The content of the Code Coverage window is not updated when for example the user program has stopped running Choose Lock Refresh from the context menu of the Code Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 164 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 11 17 Saving Code Coverage Information to Files Save the code coverage information of the currently selected sheet to a file Choose Save Data from the context menu of the Code Coverage window and the Save Coverage Data dialog box shown below will be displayed verage Data Address Ranges File name P Browse E Iv Always save to this File when saving the session Figure 5 96 Save Coverage Data dialog box Enter a file name in which you want the information to be saved If a file extension is omitted the extension cov is automatically attached If you specify an existing file name the file 1s overwritten 5 11 18 Loading Code Coverage Information from Files Load code coverage information files Choose Load Data from the context menu of the Code Co
166. he instruction queue buffer from the next cycle after an occurrence of software break is not displayed correctly BUSACC When memory access is performed by a debugger operation during user program execution shows 0 during the emulator is occupying the MCU bus CAUTION The user program is suspended during memory access is performed Debug When memory access is performed by a debugger operation during user program execution shows 0 during the emulator is occupying the MCU bus CAUTION The user program is suspended during memory access is performed EV The event No when a set event occurred um To show EV column you need to select the EV number on the Option page of the Trace conditions dialog box displayed from the menu of the Trace window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 121 of 229 RENESAS ROE530640MCUO00 User s Manual 5 Debugging Functions Task ID when RTOS is used Example display A task ID task entry label is displayed like 1 Task1 To show Task ID column you need to select the Task ID on the Option page of the Trace conditions dialog box displayed from the menu of the Trace window Shows the signal fed in from the external trigger cable indicated as 1 when the signal is high or 0 when the signal is low To show EXT column you need to select the External trigger on the Option page of the Trace conditions dialog box displayed from the menu of the Trace window TimeStamp Shows
167. history window and choose Analyze Execution History from the context menu A function execution history will be displayed in the upper pane of the Trace window EI s VE Farz teld erla main UFES TC lt UFSABS _tutorial OPB2E6 lt OFBZB H malloc PB4GA lt OF82F1 lt Display form of function execution history gt r init OFBOC2 OF8303 Function name start address of function lt function caller address m d 0F6944 lt OF8314 pou Example main 0F82DC lt OF8ABS F rand OFE944 lt DFB8314 H rand OFB9494 lt OF8314 H rand OFE944 lt OF8314 A 00007514 00000000 Fle Cycle 00006961 Address O0071E T 00 00 00 001 279 200 cycle Label Address Data BUS BHE BIU R W AMT CPU OH BUS Deb EV Timestamp h m is ms us na 000p o1 DDOTILIE 0F 165 1 1 ch Z 1 1 OO00O0RDOOORDOOL DO 00 00 001 2 79 221 j 00006960 OFSZEO OSFS 1b n IU E OQ CB 3 1 1 OOOOO0OOOO0R0000 00 00 00 001 279 270 00006955 OFSZEO FS 16b 1 1 RB 1 1 OOOO0OR0O00R0000 00 00 00 001 279 320 00006954 OFS2 E2 FEDO l6hb U IM P 0 CB 3 1 1 OO0C00R0O00R0G00 O0 O00 00 001 279 3 70 00006957 DPBZEZ DO leb 1 1 BR 1 1 1 OOOGO0R0000R0000 00 00 00 001 279 420 00006956 DPBZEZ DO0 16b 1 1 0 1 1 OODODDR0D00D000000 00 00 00 001 279 470 00006955 tutor FBzE amp F27C l16bU WR D zz 1 1 OD ODODDODODOODO 00 00 00 001 279 520 Figure 3 38 Trace window
168. ick the Stop button m in the toolbar Trace acquisition will be aborted with the trace display updated Use this function when you only want to stop acquiring trace information and check the trace information without stopping program execution 5 9 14 Restarting Trace Information Acquisition If after temporarily stopping acquisition of trace information during user program execution you want to start acquiring trace information again choose Trace gt Restart from the context menu of the Trace window or click the Restart button v in the toolbar 5 9 15 Switching Time Stamp Display The time stamp displayed in the Trace window can be switched to absolute time differential time or relative time In the initial state the time stamp is displayed in absolute time 1 Absolute time From the context menu choose Time gt Absolute Time or click the Absolute Time button in the toolbar The time stamp will be displayed by an absolute time since program execution started 2 Differential time From the context menu choose Time gt Differences or click the Differences button in the toolbar The time stamp will be displayed by a differential time from the preceding cycle 3 Relative time From the context menu choose Time gt Relative Time or click the Relative Time button in the toolbar The time stamp will be displayed by a relative time from a specified cycle REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 139 of 2
169. in of the user system is pulled up not go out 2 When using the emulator without the user system check to see if a converter board is disconnected from the emulator REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 213 of 229 RENESAS ROE530640MCUOO User s Manual 6 Troubleshooting Action on Error 2 Configuration Properties Dialog Box Does Not Appear at Emulator Debugger Startup Table 6 2 Checkpoints of errors at debugger startup 1 Checkpoint Communication error occurred Check all emulator debugger settings and interface cable settings Data was not sent to the target See 4 Preparing to Debug page 67 3 Errors Occur at Connecting Dialog Box Table 6 3 Checkpoints of errors at debugger startup 2 Checkpoint User system cannot be properly built 1 Download the proper firmware See 4 Preparing to Debug page 67 2 Recheck the connection between the E100 and this product See 2 3 Connecting Disconnecting the MCU Unit to from the E100 Emulator Main Unit page 25 Emulator s version is not the same version as Download the proper firmware the firmware in the target See 4 Preparing to Debug page 67 Target MCU is in the reset state 1 Check the reset pin of the user system is pulled up 2 Check the reset pin of the user system has changed from L to H level Target MCU cannot be reset 1 If the reset circuit of the user system has a watchdog timer disable the watchdog timer 2
170. in this user s manual are defined as follows MCU unit ROE530640MCU00 This means the E100 emulator for M16C 64 Group Emulator system This means an emulator system built around the MCU unit ROES530640MCUO0 The emulator system is configured with an emulator main unit ROE001000EMUOO MCU unit ROES30640MCU00 emulator power supply USB cable emulator debugger and host machine Integrated development environment High performance Embedded Workshop This tool provides powerful support for the development of embedded applications for Renesas microcomputers It has an emulator debugger function allowing the emulator to be controlled from the host machine via an interface Furthermore it permits a range of operations from editing a project to building and debugging it to be performed within the same application In addition it supports version management Emulator debugger This means a software tool starting up from the High performance Embedded Workshop to control this product and enable debugging Firmware This means a control program stored in the emulator This analyzes contents of communication with the emulator debugger and controls the emulator hardware To upgrade the firmware download the program form the emulator debugger Host machine This means a personal computer used to control the emulator Target MCU This means the MCU to be debugged User system This means a user s application system using the MCU to be debugged
171. ine Column Format from the context menu 2 The Global Editor Column States dialog box will be displayed Global Editor Column States IM Code Coverage i SM Break points S Breakpaints ASM A Ill Figure 5 8 Global Editor Column States dialog box 3 Deselect the check box of the column you want to turn off Click the OK button and the new column settings you have set will take effect 5 2 4 Turning columns in one source file off 1 From the Editor window 1 Right click in the Editor window and choose Columns from the context menu 2 Cascaded menu items will be displayed The currently enabled columns have a check mark attached to the left of the respective names Columns d m Code Coverage m Disassembly Address Turn Header COnJ ofF 7 ne CENSUM RM Coo ven Instant Watch Y Label i30 To Cursor 2 is F v Obj code Set Pc Here a Tilsclew FE vw Sw Breakpoinks Y SI W Breakpoints ASM view Disassembly m Source Address Figure 5 9 Popup menu window 3 Clicking a column name lets you enable or disable the column alternately REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 91 of 229 QEN ESAS ROE530640MCUOO0 User s Manual 5 Debugging Functions 5 2 5 Showing Assembly Language Code While a source file is open click the right mouse button in the Editor window and choose View Disassembly from the context menu The Disassembly window will be displayed The display start address in the Disassembly
172. into the Trace window 2 Saving in text format To save trace information in text format choose Text Files Save Only txt in the Save As Type list box of the dialog box that is displayed when you choose File gt Save from the context menu When saved in text format a range of cycles to be saved can be specified This type of file can only be saved and cannot be loaded into the Trace window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 138 of 229 2 NC S AS ROE530640MCUOO User s Manual 5 Debugging Functions 5 9 12 Loading Trace Information from Files m To load trace information from a file choose File gt Load from the context menu or click the Load button in the toolbar Specify a trace information file saved in binary format The current trace result is overwritten Before loading a file saved in binary format switch to the trace mode in which mode you saved trace information Do this switching in the Trace conditions dialog box that 1s displayed when you choose Acquisition from the context menu of the Trace window If the current trace mode differs from the one in which mode you saved trace information an error results Trace information files saved in text format cannot be loaded into the Trace window 5 9 13 Temporarily Stopping Trace Information Acquisition To temporarily stop acquiring trace information during user program execution choose Trace gt Stop from the context menu of the Trace window or cl
173. ion dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 179 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 3 The address range section name you have added will be displayed in the upper area of the Data Coverage window Data Coverage x is i ey wt OOOU41ie DUDTIB stack E OO041 OO OO OO OO DOO z D RAM OO OO OO OO a044 FANM OO OO OO OO i4 Address Range Section Task Stack Figure 5 120 Data Coverage window 5 12 10 Removing Sections Follow the procedure described below to remove sections 1 From the Section sheet of the Data Coverage window 1 Select a section name you want to remove in the Section sheet and while holding it selected choose Delete Range from the context menu Data Coverage x oo04ic ODD71B stack 133 OF8014 OF897F program ns Percentage Add Range Edit Range Data mG Address Range Section Task Stack Figure 5 121 Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 180 of 229 QEN ESANS ROES530640MCUO00 User s Manual 5 Debugging Functions 2 A dialog box prompting for your confirmation will be displayed Choose to save or not save coverage data To save click the Yes button and specify a file name If you do not save click the No button Figure 5 122 Confirmation of Removing Section dialog box 3 The section name you have selected will be removed Data Coverage w s mp s
174. ion names emulator related settings are completed Click the Finish button and the Summary dialog box will be displayed Clicking the OK button in it starts the High performance Embedded Workshop 6 After starting the High performance Embedded Workshop connect the E100 Emulator REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 72 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debug 4 4 Opening an Existing Workspace Follow the procedure described below to open an existing workspace 1 In the Welcome dialog box select the radio button titled Browse to another project workspace and click the OK button W elcame p C Create a new project workspace Open a recent project workspace Figure 4 10 Welcome dialog box 2 The Open Workspace dialog box shown below will appear Open Workspace Look in Cy E100 4n 5 x SE Eg E100 hwis File name E1 00 hws Files of type HEW Workspaces hws L ancel y Figure 4 11 Open Workspace dialog box Specify the directory in which workspaces are created select a workspace file extension hws and click the Select button 3 The High performance Embedded Workshop will start and the state of the selected workspace in which it was saved will be restored If the saved state of the selected workspace is one in which it was connected to the emulator the workspace is automatically connected to the emulator If
175. ions 5 14 5 Detecting a Performance Overflow This is the function to detect that the time or count being measured by the performance function has exceeded the maximum measurement time or maximum measurement count and output an error Time out and count out count expired cases in a performance measurement are collectively referred to as a performance overflow 1 Actions taken when a performance overflow is detected The following actions can be set Display a warning A warning is displayed in the Performance window The result display line of a program section in which a time out or count out phenomenon occurred is marked with a string Time out or Count out Selecting the Performance Overflow check box on the Exception Warning page of the Configuration properties dialog box you can display a warning in the Status window and in a status bar balloon Set the detection of a performance overflow as a condition of a hardware breakpoint Set the detection of a performance overflow as a condition of a trace point 5 14 6 Detecting a Realtime Profile Overflow This is a function to detect that the time or count being measured by the realtime profile function has exceeded the maximum measurement time or maximum measurement count and output an error Time out and count out count expired cases in a realtime profile are collectively referred to as a realtime profile overflow 1 Actions taken when a realtime profile overflow
176. is detected The following actions can be set Display a warning A warning is displayed in the Realtime Profile window The function or result display line of a task in which a time out or count out phenomenon occurred is marked with a string overflow Selecting the Realtime Profile Overflow check box on the Exception Warning page of the Configuration properties dialog box you can display a warning in the Status window and in a status bar balloon Set the detection of a realtime profile overflow as a condition of a hardware breakpoint Set the detection of a realtime profile overflow as a condition of a trace point REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 203 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 5 14 7 Detecting a Trace Memory Overflow This is a function to detect that trace memory capacity 4MB cycle overflowed and output an error 1 Actions taken when a trace memory overflow is detected The following actions can be set Display a warning Selecting the Trace memory overflow check box on the Exception Warning page of the Configuration properties dialog box you can display a warning in the Status window and in a status bar balloon Set the detection of a trace memory overflow as a condition of a hardware breakpoint 5 14 8 Detecting a Task Stack Access Violation This function is enabled when a load module that includes the OS is downloaded It detects that a write to the relevant
177. isplayed in gray b Limit to the number of functions Measurement can be taken of up to 8K 1 8 191 functions If the number of functions measured exceeds 8K 1 8 191 the extra functions are excluded from the subject of measurement In that case those functions are displayed in gray Function names address and function sizes are displayed in gray c In line expansion The functions that are expanded in line for optimization by the compiler are not displayed in the Realtime Profile window d Recursive functions Although the execution time of recursive functions can be measured correctly they are executed only once REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 186 of 229 2CENESAS ROE530640MCUOO User s Manual 5 Debugging Functions e Relationship between Go execution start address and break address within a measurement range and the measurable range fiat Execution start from function g gH HO kiji el jt h i I I Range that can be measured Figure 5 129 Measurable range Measurable range when the program breaks at the location of a black dot e Execution time and execution count of functions h and k Measurable range when the program breaks at the location of a red dot e Execution time and execution count of functions h and k Measurable range when the program breaks at the location of a blue dot e Execution time and execution count of functions h and k For the function g the exe
178. k box unselected disabled Hardware Break OR condition and combination setting v OR condition Event in use 0 Detail Other conditions Break Point BP ANDE Accumulation Event in use 0 Total O Event DNE Delavicvcle Ts Exception Exceptional events Figure 5 43 Hardware Break dialog box Table 5 11 OR condition L Te Desmpio 00 OR condition Breakpoint is encountered when any one of the set events occurs REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 117 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 3 Setting other conditions You can select one of five choices available AND Accumulation AND Simultaneous Subroutine Sequential and State Transition To set any condition select the check box to the left of Other Conditions By default other conditions are disabled the check box to the left of Other Conditions 1s unselected Hardware Break or AND Accumulation condition and combination setting v OR condition Event in use 0 Detail Other conditions Lal aD Accumulation a BP Event in use 0 Detail Exception Total O Event FEDES Delavicvcle m Exceptional events Figure 5 44 Hardware Break dialog box Table 5 12 Other conditions Tye Description Breakpoint is encountered when all of the set events occur irrespective of the time axi
179. k conditions Click the right mouse button anywhere in the Trace window and choose Acquisition from the context menu that 1s displayed The Trace conditions dialog box shown below will be displayed Check to see that the selected trace mode is Fill until stop Click the Close button Trace conditions mi x Trace Option im Trace Mode M Fill until stop condition and combination setting OR condition Eventinuse 0 Detail Other conditions atyoGAccumulation L Event in use 0 Detail Exception Total O Event Exceptional Detail events Delayicvcle OM T Record condition sl Capture Do not capture Step execution is recorded Detail Event in use 0 Event used O Free 16 Detail Registered events Help aC i Close Zi Figure 3 30 Trace conditions dialog box free trace REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 56 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 2 Set a software break in a line of the tutorial function where p sam s0 a 0 is written 3 Choose Reset Go from the Debug menu Processing will be halted by a break and the trace information from start to break will be displayed in the Trace window I race xj m VE Farz tE Sdh Flaa Cyele Label Address Data BUS BHE BIU B W RWI CEU ON BUE Deb EV 00000016 UFB3548 FA A Ilbb 1 1 i l1 1 OOOUUDUDO
180. klj 00 00 00 670 775 370 Figure 5 65 Trace window The lower pane of the window shows the trace result beginning with the cycle in which the task selected in the upper pane was called The lower pane of the window can show trace results in disassemble source or mixed mode CAUTION If trace extraction or deletion conditions are specified the task execution history cannot be displayed If repeat free or repeat full mode is specified the task execution history cannot be displayed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 141 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 10 Measuring Performance 5 10 1 Measuring Performance The performance function measures a maximum minimum average and total execution time and a pass count in each of up to eight specified sections of the user program and then shows a time ratio relative to the total execution time Go Break numerically as percentage and graphically Since the performance function uses the emulator s performance measurement circuit to measure the execution time it does not obstruct the execution of the user program Performance measurement conditions cannot be manipulated during program execution 5 10 2 Showing the Result of Performance Measurement Measurement results are displayed in the Performance Analysis window To open th
181. l OO0408 ment DOC 14 _g IntBut OO0416 mnext DOE 14 maize OOU41E g CharBut OOO TE __ stack top DODATE istack top DOC AZ E heap area OFeo14 dummy int OFSO1A __brk OFSsOzZ0 ints OFSO2Z6 _ timer ba ranzc timer h4 DFS8D03z timer b3 DF8038 int5 4 Figure 3 10 Label window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 44 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 10 Checking Memory Contents Specifying a label name you can check in the Memory window the content of memory where the label is registered For example you can check the content of memory corresponding to main in byte size as shown below Choose CPU gt Memory from the View menu or click the Memory toolbar button to display the Display Address dialog box Enter main in the edit box of the Display Address dialog box 3 xl Display Address main iral Scroll Start Address nonoa iral Scroll End Address FFFFF iral Lancel Figure 3 11 Display Address dialog box Display Address Click the OK button The Memory window will be displayed showing a specified memory area x e n ons zz i6 1040 G 2 jab jm od5 de de a ae 22 j Address 0 1 2 3 4 5 6 7 5 9 4 E 0 D E F ASCII m FB8ZDC pH 10 64 U6 FS 053 OO FE F8 FS Yo F2 32 7D EZ OO j oe eee FBZEC UO YD EZ 26 OO FD YA 64 OF YD B4 73 OR FR VS 2B l l l 8 8t F82FC FC 75 4B FC 75 4B FA FD C2 80 OF 7
182. l stored in addresses 00000h and 00001h are read out Also the interrupt request bit 1s cleared when address 00000h or 00001h is read out Consequently when the address 00000h or 00001h readout instruction is executed or when address 00000h or 00001h is read out in the cause of a program runaway a malfunction occurs in that the interrupt is not executed despite the interrupt request because the request bit of the highest priority interrupt factor enabled is cleared For this malfunction when the reading out to address 00000h or 00001h is generated excluding the interrupt an expansion monitor window will appear At that time check the user program There is a possibility of wrong access REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 224 of 229 QEN ESAS ROE530640MCUOO User s Manual 7 Hardware Specifications IMPORTANT Memory Space Expansion Function 4Mbyte mode When using the memory space expansion function 4Mbyte mode a memory that the evaluation MCU accesses 1s different depending on each setting Refer to the tables below Access area of the evaluation MCU when using the memory space expansion function 4Mbyte mode mu on ere mae l 0 40000h7FFFFh EXT EXT MAP 1 40000h 7FFFFh EXT EXT MAP Memory Expansion mode i 30000n BFFFFh ExT ext mein 1 5T 5n C0000h FFFFFh MAP 80000h BFFFFh EXT EXT Microprocessor mode Sho
183. l be displayed Breakpaoints Cancel Edit Code Remove DEERE Remove All Figure 3 7 Breakpoints dialog box Use this dialog box to remove a breakpoint or enable or disable a breakpoint REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 42 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 8 Altering Register Contents Choose CPU gt Registers from the View menu or click the Registers toolbar button The Register window shown below will be displayed 0 BANK Register x Duz a Dau oaod DO NN DO 717 FS8344 FFDOO OBES AIF i1uounngui uli Figure 3 8 Register window The content of any register can be altered Double click the line for the register you want to alter The dialog box shown below will be displayed so enter a new value with which you want to alter the register PC Set value Set As whale Register Cancel Figure 3 9 Set value dialog box PC REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 43 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 9 Referencing Symbols The Labels window permits you to display the symbol information included in a module Choose Symbols gt Labels from the View menu or click the Labels toolbar button I The Labels window shown below will be displayed Use this window to look at the symbol information included in a module Label 7m Pu X TER BP Address Name z 000400 o 55 DOC SOL _ poo
184. l information of the task stack selected in the upper area Table 5 40 Contents in the upper area of Data Coverage window Address Address value Label This column is blank for unused areas The accessed data has its background displayed in purple REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 182 of 229 QEN ESAS ROE530640MCUOO User s Manual o Debugging Functions If located outside the coverage memory allocated area address lines are displayed in gray Although the existing coverage information of those addresses is retained updating of coverage information by program execution does not apply The acquired coverage information is accumulated in memory until the user clears it 5 12 12 Clearing Data Coverage Information 1 Clearing a specified range of data coverage information Choose Clear Coverage Range from the context menu of the Address Range or the Section sheet The Clear Coverage Range dialog box shown below will be displayed Start Address 000624 z OF End Address DOT 257 Cancel Figure 5 125 Clear Coverage Range dialog box Specify the start and end address of the range you want to clear Click the OK button and the specified range will be cleared 2 Clearing all data coverage information Choose Clear the Entire Coverage from the context menu and all data coverage information will be cleared 5 12 13 Updating Coverage Information Update the content of the Data Coverage window to the
185. latest Choose Refresh from the context menu of the Data Coverage window If the coverage information is inhibited from getting updated the information is not automatically updated when the program breaks To view the latest information therefore you need to update manually 9 12 14 Inhibiting Updating of Information The content of the Data Coverage window is not updated when for example the user program has stopped running Choose Lock Refresh from the context menu of the Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 183 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 50 12 15 Saving Data Coverage Information to Files save the data coverage information of the currently selected sheet to a file Choose Save Data from the context menu of the Data Coverage window and the Save Data dialog box shown below will be displayed OF File M ame p Browse Cancel IY Always save to this file when saving the session Figure 5 126 Save Data dialog box Enter a file name in which you want the information to be saved If a file extension is omitted the extension cdv is automatically attached If you specify an existing file name the file 1s overwritten 5 12 16 Loading Data Coverage Information from Files Load data coverage information files Choose Load Data from the context menu of the Data Coverage window and the Load Coverage Data dialog box shown below will be displ
186. m 59 a ma a a n ae ae ae ae Mmoooonon oo oo ae 23 int g IntBuf 24 char g CharBut 25 ry ab Em aort long a 28 FB81BD n 29 30 31 32 FB1B6 33 FB1B9 34 FB1C2 35 FB1CF 36 FB1DF 37 FB1EE 38 FB81F3 39 F8214 40 F8223 31 F823C 42 43 44 45 46 47 38 FB8261 48 FBSZ26D 50 F8270 51 Foe7D 4 long t int i j K gap gap 5 while gap gt 0 jf fori k O kzgap k fort i E tgqap it1l0 i itgap ii for j i gap j gt k j j gap i g IntBut j ifia j gt a j tgap ii t a 3 a i alit gapl a jtdgap t i else break i I gap gape i g CharBuf char gq Int Buf amp OxOOFF c Tutonalo zL sote M Figure 3 20 Editor window Step In The highlighting in the Editor window moves to the first statement of the sort function REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 49 of 229 2 NC S AS 3 Tutorial ROE530640MCUOO User s Manual 3 Tutorial 3 13 2 Executing the Step Out Command The Step Out command exits a called function by executing it quickly and stops at the next statement of a program from which the function was called To exit the sort function choose Step Out from the Debug menu or click the Step Out button in the toolbar F Figure 3 21 Step Out button i 02 ini xi jam lit oid mainivoid P 15 dg ee DC 1 16 FaGzDnhc while Lif 17 FGZzEU tutorialil 15
187. m any setup dialog box 1 Click the Add button or choose a line where you want to input and double click r Event Enable Figure 5 24 Hardware Break dialog box 2 The Event dialog box shown below will be displayed In this dialog box set detail event conditions and then click the OK button x x Condition Count and Task ID Comment Condition Count and Task 10 Comment Event type Instruction fetch Count 1 255 Condition settings iit Address condition Specified value v Task ID Start 00000 E End 00000 El S ID number Select Specify a Function name NUM File name z WOWSE Function name 7 E Cancel Figure 5 25 Event dialog box 3 An event will be added at the specified position Hardware Break OP Event Event Td esrintons cot Jr TaskID_ Comment mevo F Address main Figure 5 26 Hardware Break dialog box 4 If events exceed 16 points when you created an event an error is displayed If you created an event exceeding 16 points the event you have added has no effect REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 105 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions When adding an event from the Registered Events dialog box 1 Click the Add button in the Registered Events dialog box Registered Events Events Type Descriptions Comment E fa D
188. 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 contact a Renesas sales office if you have
189. mation shown in the Code Coverage window includes the content of the coverage only buffer REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 150 of 229 2CENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 11 4 Measuring an Address Range The Address Range sheet shows the code coverage information CO coverage and C1 coverage collected by the emulator from a user specified address range Multiple address ranges can be registered An address range exceeding 2 Mbytes or even an area that has no coverage memory allocated can be specified However data is not updated for the areas that have no coverage memory allocated The areas whose data are not updated are displayed in gray An example display is shown below Code Coverage xj o S3 om NE GX d og FElBE FE218 10 n S2 FE224 FE376 260m iii Executed jJ FEIBE ENTER i FEICI MOY Wi OFE1 C4 MOV W for i 0 DFE1cCT CMP W FElCC TGE re DFE1CF MOV W Emp i DFE1D2 SHL W mO Address Range Source j Figure 5 76 Code Coverage window address specification The Code Coverage window is vertically divided into halves by a splitter The upper area shows the address ranges to be measured CO coverage and C1 coverage Table 5 29 Contents displayed in the upper area of the Code Coverage window Address Range Address ranges in which coverage is measured CO Coverage Shows CO coverage by a percentage and grap
190. n wv pc v TaskID v BreakCondition m ExecutionTime v Exception Normal Software break 001 306 220 E Figure 5 14 Status bar Table 5 8 Items list of the emulator status shown in the status bar PC value During execution PC value During Break Normal 1 When more than one break factors occur When you click on the status bar area where the break factor 1s shown a balloon is shown You can check the break factors being occurred in the balloon Break cause Sollee break Hardware break OR EY 1 Normal Figure 5 15 Example of break factors display when break factors occur Some Factors exist Click here 00 00 00 001 396 200 2 When an exception event occurs When an exception event occurs a warning is displayed in a status bar balloon The exception event that is not checked on the Exception Warning page of the Configuration Properties dialog box is not shown d W aming Exception event detection Access protechon Addess 007 1L Attibute RITE Trace memon overflow Figure 5 16 Example of warning display when exceptional events occur REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 97 of 229 QEN ESAS ROE530640MCUOO0 User s Manual 5 Debugging Functions 5 5 Periodically Reading Out
191. n Figure 2 6 In case of ERROR because the target status LEDs will change depending on errors check the system status LEDs 1 If the user system is connected disconnect the converter board and the user system 2 Turn on the emulator 3 Launch the emulator debugger and select the Start booting up on successful completion of self checking check box in the Device Setting dialog box 4 When you click OK the self check will start If the normal result is displayed in about 60 seconds the self check ends normally Emulator turned on Self check started Self check or terminated normarlly Self check executed on OFF SC Flashing ON or OFF Indefinite Self check error Note See the error display of the debugger Figure 2 6 LED displays during the self check REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 29 of 229 QEN ESANS ROE530640MCUOO User s Manual 2 Setu 2 8 Selecting Clock Supply 2 8 1 Clocks You can choose a clock supplied to the evaluation MCU by the Emulator tab in the Configuration properties dialog box of the emulator debugger Table 2 1 shows the clocks and their initial settings Table 2 1 Clock supply to the MCU Display of l IC17 mounting oscillator module Main Xm Xour Oscillator circuit on the user system EE Generate Internal generator circuit 1 0 20 0 MHz Pubs Internal oscillator circuit Yes Sub XcIN XCOUT 32 768 kHz Oscillator circuit on the user sy
192. n Stop and Wait Modes Do not single step an instruction shifting to stop or wait mode It may cause communication errors Note on the Watchdog Function If the reset circuit of the user system has a watchdog timer disable it when using the emulator Note on Protect Register The protect is not canceled when bit 2 of protect register PRCR PRC2 which enables writing into the port P9 direction register and the SI Oi control register is changed with the below procedure 1 Step execution of an instruction setting PRC2 to 1 2 Setting a break point between an instruction setting PRC2 to 1 and a point where the port P9 direction register or the SI Oi control register is set 3 Setting PRC2 to I by the Memory window or Command Line window Note on Access Prohibited Area You cannot use internally reserved areas Write signals to the areas will be ignored and values read will be undefined Note on Breaks The area displaying break points in the program window of the emulator debugger shows the following breaks 1 Software break This 1s a debugging function which generates a BRK interruption by changing an instruction at a specified address to a BRK instruction 00h to break a program immediately before the system executes an instruction at a specified address The instruction at the preset address will not be executed 2 Hardware break This is a debugging function which breaks a program by setting the detection o
193. nce Analysis Conditions dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 143 of 229 QEN ESAS ROE530640MCUOO User s Manual 1 Setting measurement conditions 5 Debugging Functions A measurement condition can be selected from the following four modes Select one measurement condition for one section Use events to set a section Event counts are fixed to 1 Even when an event count is set to other than 1 it is handled as 1 Table 5 24 Measurement condition modes Disabled Not measured Between two events Details Start event End event OR Figure 5 68 Between two events Measurement is taken of time from when a start event occurs to when an end event occurs Specifically measurement is taken of an execution time and execution count in the range set by a start event and an end event The measurement of time starts when a start event occurs and is aborted when an end event occurs The execution count is incremented by one each time a start event and an end event occur in pairs within the set range Start event One or multiple events can be set End event One or multiple events can be set Event cycle counting Details Ewent Descriptions a GENE F Address change Figure 5 69 Event cycle counting Measurement is taken of periods in which an event occurs Namely measurement is taken of an event occurrence period and execution c
194. ncludes an area that has no coverage memory allocated can be specified However data is not updated for portions that have no coverage memory allocated The address lines whose data are not updated are displayed in gray An example display is shown below Code Coverage Xx i me BY NE C a d cO Coverage 1 Coverage sort c init LOO EE conditional Br sort c sort CoU 71 Sort c change O s IFEU14 ENTER FE UI MOW W qu Dac IFEU18 MOV FE 1E MOY Wisa UFEULE MOY Wi F Address Range Source Figure 5 86 Code Coverage window source file specification The Code Coverage window is vertically divided into halves by a splitter The upper area shows the address ranges to be measured file and function names CO coverage and C1 coverage Table 5 31 Contents displayed in the upper area of the Code Coverage window File File names Function CO Coverage Shows CO coverage by a percentage and graph C1 Coverage Shows C1 coverage by a percentage and graph REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 157 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions The lower area shows detail information of the address range selected in the upper area Assembler level Table 5 32 Contents E in the lower area of the Code Coverage window o Instructions not executed Displays execution condition of conditional branch instruction T Condition met
195. nd acquisition continues that way Acquisition continues until it is halted by a break or forced stop The positions where trace points are encountered can be checked in the Trace window Table 5 18 Specifiable conditions Repeat fill until stop Trace point setting Delay specification Capture Do not Capture Step execution recording condition DL Possible REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 125 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 Repeat fill until full Each time a trace point is encountered a total of 512 cycles before and after that point are acquired and acquisition continues that way When the trace memory overflows acquisition is halted The positions where trace points are encountered can be checked in the Trace window Table 5 19 Specifiable conditions Repeat fill until full Trace point setting Delay specification Capture Do not Capture Step execution recording condition setting CAUTION If trace points are encountered in consecutive cycles in the repeat fill until stop or repeat fill until full mode only one first cycle is highlighted in yellow as a trace point 5 9 5 Setting Trace Points 1 Setting trace points For trace points you can set an OR condition other condition AND Accumulation AND Simultaneous subroutine sequential or state transition and detection of exception events The OR condition other condition and the detection of ex
196. nesas Solutions Corp All rights reserved Printed in Japan ROE530640MCUOO Users Manual 24 NE SAS Renesas Technology Corp 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan
197. next instruction Clicking the OK button overwrites the memory content with the new instruction code and closes the dialog box CAUTION Assembly language codes are displayed from the current memory content When you correct memory contents new assembly language codes are displayed in the Disassembly window and the Assembler dialog box However the source file being displayed in the Editor window remains unchanged The same applies when the source file includes assembler language REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 93 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 5 3 Displaying Memory Contents in Real Time 5 3 1 Displaying Memory Contents in Real Time To monitor memory contents while the user program is running use the RAM Monitor window The RAM monitor function permits the memory content and access status in an allocated monitor area to be recorded and inspected in real time without obstructing execution of the user program The RAM Monitor window shows access statuses read write uninitialized or uninspected in different colors 1 Allocating a RAM monitor area A 16 Kbyte RAM monitor area is provided This RAM monitor area can be allocated to selected contiguous addresses or divided 32 blocks in 512 byte units With initial settings a maximum 16 Kbytes of area from the beginning address of the internal RAM is allocated as a RAM monitor area 2 Monitor display The access statuses are di
198. of struct sample a FazFD init p sam 30 31 F83209 for i 0 i z10 i jf 32 Fa8314 J randi 33 Fes20 i1f j lt Of Sici gere e J etes 35 i 36 FG3ZE ali Jj 37 i 38 F5344 H sortial 39 FG342B change al 40 41 Fes52 p sam s0 a 0 42 F362 p sam gt si a i 43 FS83 765 p sam sz a z 4 F35 p sam s3 a 35 Figure 3 27 Editor window setting a hardware breakpoint The source line that includes the sort function will be marked with Hf indicating that a hardware breakpoint that will cause a program to stop when it fetches an instruction has been set there REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 53 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 16 Stopping a Program when It Accesses Memory To stop a program when it reads or writes a value to a global variable set up a hardware break as described below Choose Event gt Hardware Break from the View menu to display the Hardware Break dialog box Open the OR page of the Hardware Break dialog box In the Editor window select a global variable that you want to be the object of a hardware break so that a program 1s made to stop when it reads or writes a value to the variable and drag and drop the selected variable into the OR page Then click the Apply button When you run a program it will stop running when a value is read or written to the global variable you have set Hardware Break ol x Hardware B
199. ols Turning on emulator Not normal LED display of emulator Normal 1 Check the connection of power supply cable See 2 5 Connecting the Emulator Power Supply Device setting dialog box Not normal Error displayed of emulator debugger 1 Check the operating environment etc of the emulator debugger See 5 1 Setting Up the Emulation Environment Normal 2 Reinstall the emulator debugger Configuration properties dialog Not normalError displayed box of emulator debugger See 6 3 2 Configuration Properties Dialog Box Does Not Normal Appear at Emulator Debugger Startup Connecting dialog box of Not normal Error displayed emulator debugger Normal See 6 3 3 Errors Occur at Connecting Dialog Box Error displayed Editor window of emulator debugger displayed Normal See 6 3 4 Errors Occur at Emulator Debugger Startup Emulator debugger startup completed Figure 6 1 Flowchart to remedy the troubles REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 211 of 229 RENESAS ROE530640MCUOO User s Manual 6 Troubleshooting Action on Error 6 2 Self check Error When an error occurs in the self check check the following 1 Recheck the connection of the E100 emulator main unit and MCU unit 2 Redownload the proper firmware 3 Check the self check error log of the debugger software and refer to the instruction described in it See Figure
200. on When dragging and dropping the label in the Label window You can set an event based on a fetch to that label as a condition gt Instruction fetch condition REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 109 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 5 3 Removing Events Follow one of the following methods to remove events When deleting an event from any setting dialog box 1 To remove one point select a line you want to remove in the event setting area and then click the Delete button You can use the keys Ctrl Del instead of clicking the Delete button The selected event will be removed from the event setting area Hardware Break OR Event i EVOL F MT start E jn Ev z Address initsck EvOS Address exit Delete Enable Disable Figure 5 33 Hardware Break dialog box 2 To remove multiple events hold down the Shift or the Ctrl key while you select lines you want to remove in the event setting area and then click the Delete button You can use the keys Ctrl Del instead of clicking the Delete button The selected events will be removed from the event setting area Hardware Break OR Event Aa e i e a Address start Address inibscE Address E B it Delete Enable Disable Figure 5 34 Hardware Break dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 110 of 229 RENESAS ROE530640MCUO00 User s Manual 5 Debugging Functions When d
201. on 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 malfunction of which may cause a direct threat to human life or create
202. on of a hardware breakpoint or trace point Refer to Detecting exception events 4 Uninspected memory detect function If a write accessed area is never once accessed for read this function assumes such a case to be uninspected and outputs an error To display uninspected memory detection choose Show Error Detection from the context menu Uninspected memory is displayed in sky blue 5 3 2 Setting RAM Monitor Update Intervals Choose Update Interval Setting from the context menu of the RAM Monitor window The Update Interval Setting dialog box shown below will appear Update Interval Setting 2 x Interval 10 10000mzec 10me unit 100 Mec Cansel Figure 5 12 Update Interval Setting dialog box The Update Interval can be specified separately for each window The initial value is 100 ms 5 3 3 Clearing RAM Monitor Access History Choose Access Data Clear from the context menu of the RAM Monitor window The history of all accesses made to the RAM monitor area will be cleared CAUTION If this function is executed while the user program is running the user program s realtime capability may be lost because a memory dump occurs 5 3 4 Clearing RAM Monitor Error Detection Data Choose Error Detection Data Clear from the context menu of the RAM Monitor window The detected data of all uninitialized memory and unrefered memory of the RAM monitor area will be cleared REJ10J1733 0100 Rev 1 00 Apr
203. one year elapses after the model was dropped from production repairing products of the model may become impossible 4 Transportation fees at sending your product for repair Please send your product to us for repair at your expense 8 5 How to Make Request for Repair Fill in the Repair Request Sheet included with this product then send it along with this product for repair to your local distributor Make sure that information in the Repair Request Sheet is written in as much detail as possible to facilitate repair CAUTION Note on Transporting the Product Qo When sending your product for repair use the packing box and cushion material supplied with this product when delivered to you and specify handling caution for it to be handled as precision equipment If packing of your product is not complete it may be damaged during transportation When you pack your product in a bag make sure to use conductive polyvinyl supplied with this product usually a blue bag When you use other bags they may cause a trouble on your product because of static electricity REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 227 of 229 QEN ESAS E100 Emulator Main Unit for M16C 64 Group User s Manual ROE530640MCUOO Publication Date Apr 01 2008 Rev 1 00 oales Strategic Planning Div Published by Renesas Technology Corp Microcomputer Tool Development Department Edited by Renesas Solutions Corp 2008 Renesas Technology Corp and Re
204. oot Pattern The following is a procedure of connecting to a 100 pin 0 5mm pitch foot pattern on the user system using the ROEO100TNPFKOO not included For details on the ROE0100TNPFKOO not included refer to its user s manual 1 Attach the NQPACK100SD ND included with the ROEOIOOTNPFKOO to the user system 2 Attach the YOPACKIOOSD included with the ROEO1OOTNPFKOO to the NQPACKIOOSD ND and secure it with the YQ GUIDEs 3 Attach the ROE0100TNPFKOO0 to the YOPACKIOOSD 4 Attach the CN2 side of the ROE0100TNPFKOO to the CN2 side of the flexible cable 5 Attach the CN1 side of the ROE0100TNPFKOO to the CNI side of the flexible cable 4 Evaluation with OEO100TNPFKOO actual MCU HQPACK100SD YQ GUIDE x4 not included T YQPACK100SD l 5 lt gt 3 These corners FLASH version are not round MCU etc 100 pin 0 5mm pitch PLQP0100KB A foot pattern x These four products are User system available in one package Figure 2 12 Connecting to a 100 pin 0 5mm pitch foot pattern A CAUTION Notes on Connecting the User System Take care not to attach a converter board in a wrong direction It may cause a fatal damage to the emulator and user system The connectors of the ROE0100TNPFKOO are guaranteed for only 50 insertion removal iterations For purchasing the HOPACKIOOSD contact the following Tokyo Eletech Corporation http www tetc co jp e_index htm REJ10J1733 0100 Rev 1
205. or E100 s power supply firmware operating status etc Table 1 3 lists the definitions of each system status LED Table 1 3 Definitions of the system status LEDs POWER Emulator system power supply is turned ON OFF Emulator system power supply is turned OFF SAFE Emulator system 1s operating normally Flashing Flashing Emulator system cannot communicate with the host machine Flashing The self check is being executed ve 2 Seconcs OFF Emuator system is not operating normally system status error 6 Target Status LEDs The target status LEDs indicate operating status of the target MCU and power supply of the user system Table 1 4 lists the definition of each target status LED Table 1 4 Definitions of the target status LEDs POWER Power is supplied to the user system I Power is not supplied to the user system RESET Target MCU is being reset or reset signal of the user system is held low o Target MCU is not being reset RUN User program is being executed NE NM User program has been halted IMPORTANT Note on the Target Status POWER LED e If your MCU has two or more Vcc pins the LED does not light unless power is supplied to all the pins REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 19 of 229 2CENESAS ROE530640MCUOO User s Manual 1 Outline 1 4 Specifications Table 1 5 lists the specifications of the ROES30640MCU00 Table 1 5 Specifications of the ROE530640MCUO00 Applicable MCU M1
206. ose Generate in the emulator debugger and specify a frequency you like to use this clock Although you can change a frequency between 1 0 and 99 9 MHz by 0 1 MHz for the E100 do not specify a value exceeding the maximum input frequency 20 MHz of the Xy of the MCU IMPORTANT Note on Using the Internal Generator Circuit The internal generator circuit is equipped for temporary debugging purposes Temperature characteristics of frequencies are not guaranteed Be sure to evaluate your system with an oscillator whose frequency is the same as that of the oscillator module or oscillator circuit emulator for final evaluation purposes REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 32 of 229 QEN ESANS ROE530640MCUOO User s Manual 2 Setu 2 9 Connecting the User System Figure 2 10 shows how to connect this product to your user system Flexible cable 100 pin 0 65mm pitch 0 5mm pitch ROEO100TNPFJOO ROEO100TNPFKOO 100 pin QFP 100 pin LQFP Figure 2 10 Connecting this product to the user system A CAUTION Note on Connecting the User System Take care not to attach a converter board in a wrong direction It may cause a fatal damage to the emulator and user system REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 33 of 229 QEN ESNS ROE530640MCUOO0 User s Manual p Setup 2 9 1 Connecting to a 100 pin 0 65mm Pitch Foot Pattern The following is a procedure of connecting to a 100 pin 0 65mm pitch foot pattern on
207. ot save coverage data To save click the Yes button If you do not save click the No button Figure 5 115 Confirmation of Edit Address Range dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 176 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 The address range you have selected will be removed gizEB U0133A Data Coverage I m m z7 Wt X o 001ZEE OOU1AEF OO1Z FS OO12F OO1Z FB EAM EAM EAM 45 d 13 14 Bh be b 4c OO 88 99 5e ab fh ce hH mHE Address Range Task Stack Figure 5 116 Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 177 of 229 2 NC S AS 5 Debugging Functions ROE530640MCUOO User s Manual 5 Debugging Functions 5 12 8 Measuring Sections The E100 emulator shows the access information it collected from a user specified section Data Coverage x eS SS it zx wt OK DOD41C OOO71B stack 138g DO0071c DODALE istack og D OO06A8 RAM dH ff 4e Yh DOO SAC RAM 60 b7 95 Ue LOO S BU RAM a LOO 6B RAM rr LOO 6BS8 RAM mE Address Range Section Task Stack Figure 5 117 Data Coverage window section name specification The Data Coverage window is vertically divided into halves by a splitter The upper area shows the address ranges section names to be measured and access rates Table 5 37 Contents in the upper area of Data Coverage window Section Address ranges sections in which coverage 1s measu
208. ount The time from when an event occurs to when the next event occurs is measured as one instance of measurement The execution count is incremented by one each time an event occurs Event Only one event point can be set REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 144 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions Table 5 25 Measurement condition modes Continued Interrupt disabled range between two events Details Start event End event OR ZU F address FEIBC Figure 5 70 Interrupt disabled range between two events Measurement is taken of an interrupt disabled section from when a start event occurs to when an end event occurs Specifically measurement is taken of an interrupt disabled time and an interrupt disabled count within the range set by a start event and an end event The measurement of time starts at the same time an interrupt is disabled and is aborted at the same time the interrupt 1s reenabled The count is incremented by one each time an interrupt 1s disabled Start event One or multiple events can be set End event One or multiple events can be set CAUTION To measure an execution time of a function maximum minimum or average execution time of a function use Between two events Set a fetch to the beginning address of the function as a start event and a fetch to
209. outlet Do not use this as it 1s because of the danger of electric shock and or fire In this case contact your local distributor Before setting up this emulator and connecting it to other devices turn off power or remove a power cable to prevent injury or product damage Warnings to Be Taken for This Product Do not disassemble or modify this product Personal injury due to electric shock may occur if this product is disassembled and modified Disassembling and modifying the product will void your warranty Make sure nothing falls into the cooling fan on the top panel especially liquids metal objects or anything combustible Warning for Installation Do not set this product in water or areas of high humidity Make sure that the product does not get wet Spilling water or some other liquid into the product may cause unrepairable damage Warning for Use Environment This equipment is to be used in an environment with a maximum ambient temperature of 35 C Care should be taken that this temperature is not exceeded REJ10J1733 0100 Rev 1 00 Apr 01 2008 page Olen RENESAS ROE530640MCUOO User s Manual Precautions for safety A CAUTION Cautions to Be Taken for Turning On the Power Turn ON OFF the power of the emulator and user system as simultaneously as possible When turning on the power again after shutting off the power wait about 10 seconds Cautions to Be Taken for Handling This Product
210. owing precautions IMPORTANT Note on Differences between the Actual MCU and Emulator Operations of the emulator system differ from those of actual MCUs as listed below 1 Reset condition Set the time for starting up 0 2 Vcc to 0 8 Vcc 1 us or less 2 Initial values of internal resource data of an MCU at power on 3 Interrupt stack pointer ISP after a reset is released 4 Capacities of the internal memories ROM and RAM The evaluation MCU of this product has RAM of 31 KB 00400h 07FFFh and flash ROM of 8 KB 0E000h 0FFFFh 16 KB 10000h 13FFFh and 512 KB 80000h FFFFFh 5 Oscillator circuit In the oscillator circuit where an oscillator is connected between pins Xy and Xoyr oscillation does not occur because a converter board is used between the evaluation MCU and the user system It is the same for pins Xci and Xcout 6 A D conversion The characteristics of the A D converter differ from those of actual MCU because there are a converter board and other devices between the evaluation MCU and the user system Note on RESET Input A low input to pin RESET from the user system is accepted only when a user program is being executed only while the RUN status LED on the E100 upper panel is lit Note on Voltage Detect Circuit This product differs from the actual MCU because there is a pitch converter board etc between the evaluation ECU and user system Final evaluation of the voltage detect circuit vol
211. ox are switched to function mode REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 193 of 229 QEN ESNS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 13 11 Clearing Realtime Profile Measurement Results Choose Clear from the context menu of the Realtime Profile window and all measurement results will be cleared Unless you choose to Clear measurement results are accumulated in memory 5 13 12 Saving Realtime Profile Measurement Results Save the current realtime profile measurement results in text format Choose Save To File from the context menu of the Realtime Profile window and the Save As dialog box will be displayed Enter a file name in which you want the measurement results to be saved If a file extension is omitted the extension txt is automatically attached If you specify an existing file name a message is displayed asking you to confirm whether you want the file to be overwritten 5 13 13 Setting the Unit of Measurement Choose Properties from the context menu that is displayed when you right click in the present window The Properties dialog box will be displayed Properties x Measurement interval Measurement interval Figure 5 136 Properties dialog box The unit of measurement can be selected from the following options 10 ns 20 ns 40 ns 80 ns 160 ns 1 6 us CAUTION When the currently set unit of measurement is changed the measurement results hitherto accumulated are cleared
212. page of the Configuration Properties dialog box Data coverage is the function to indicate what kinds of accesses have been made to the data area This function collects access information every byte without causing a program to break Therefore the realtime capability of the user program will not be lost The coverage result is updated upon a break The E100 emulator comes with 512 Kbytes of data coverage memory With initial settings the data coverage memory is allocated automatically to addresses in the ROM and RAM areas in this order 5 12 2 Opening the Data Coverage Window Choose Code gt Data Coverage from the View menu or click the Data Coverage toolbar button m The Data Coverage window initially appears in a blank state Data Coverage l x ae fil ay W OX Percentage Data NG Address Range Task Stack Figure 5 103 Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 169 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 1 Measurement method The Data Coverage window consists of three sheets Table 5 34 Sheets of the Data Coverage window Sheet name Description Address Range sheet Measurement is performed on any address range Section sheet Measurement is performed on a specified section Task Stack sheet Measurement is made of all task stack areas The respective sheets permit multiple ranges to be registered The Task Stack sheet supports
213. position in the S W Breakpoints column of the Editor or the Disassembly window init struct Sample p sem 5U0 J p S3am 31 O p sam s2z i p sam 23 p samm s4 D p sam 55 UD sii Breakpoint Figure 5 20 Editor window Double clicking one more time removes the breakpoint REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 101 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 6 3 Enabling Disabling Software Breakpoints Follow one of the following methods to enable or disable software breakpoints From the Editor or the Disassembly window From the Breakpoints dialog box From the command line 1 From the Editor or the Disassembly window 1 Place the cursor at the line where a software breakpoint exists and then select Enable Disable Breakpoint from the context menu Or press the Ctrl and F9 keys together P sorb c Ioj x e amp ii a B init struct Sample p sam a Feocz2 1 10 Fsocs p sam s O 11 FS UD p sam s1 0 12 FG ED p sam sz O i3 F8105 e p sam 53 0 14 FGllD p sam s4 0 15 FB8135 p sam s5 0 Bookmarks d 16 FS814D p sam s6 0 Templates d Enable Disable Breakpoint CEri Fa Figure 5 21 Editor window and popup menu 2 The software breakpoint is enabled or disabled alternately lg amp 5 T m init struct Sample p sam 9 jFaucaz i Is 10 Fsocs p sam s Q 11 FS D p sam
214. profile memory allocated area address lines are displayed in gray The acquired profile measurement results are accumulated in memory until the user clears them REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 188 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 5 13 4 Setting Function Profile Measurement Ranges Choose Set Ranges from the context menu that is displayed when you right click in the present window The Realtime Profile Setting dialog box will be displayed In this dialog box set a profile measurement range Function mode Realtime Profile Setting X Realtime Profile Made im fe AR EN List Allocation of Profile Memory Clear OOO00 1FFFF EDO FFFFF AII Clear Default Save aad Help o Cancel Figure 5 131 Realtime Profile Setting dialog box 1 Memory allocation Before function profiles can be measured profile memory must be allocated to the addresses at which to be measured Profile data can be obtained from only the address range that has had memory allocated The emulator permits any of 1 8 blocks maximum 1 Mbyte each beginning with the 128 Kbyte boundary to be specified as a profile measurement area Contiguous blocks or noncontiguous blocks either one can be set With initial settings the profile memory is allocated to addresses in the ROM and RAM areas 2 Automatic function detection When profile memory is allocated to
215. protection again Access attribute Read Only Detected Write Only Detected Write access Read access Read access Write access Figure 5 137 NG patterns of detection methods 5 Actions taken when an access protect violation is detected The following actions can be set Display a warning Selecting the Access Protect Violation check box on the Exception Warning page of the Configuration properties dialog box you can display a warning in the Status window and in a status bar balloon Make the detection of an access protect violation a condition of a hardware breakpoint Make the detection of an access protect violation a condition of a trace point REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 197 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 14 3 Setting an Access Protected Area Follow the procedure described below to set an access protected area 1 From the Hardware Break dialog box 1 Select the Exception check box on the Hardware Break sheet and then click the Detail button Hardware Break I _ Ol x Em inl xl Hardware Break on Exception condition and combination setting v OR condition Event in use 0 Detail Other conditions anDtAccumulation Y Event in use 0 Detail Total O Event Delavicvcle Exceptional uie Detail events 0 Event used O Free 186 Detail Registered events Save Load Help Appl
216. quired for Development cccceecccceececeeeeeeeeeecaeececaeeeeseeeesseeeesseeeesseeeeseeeeesseeeesees 16 1 3 System Configuration isso de va iasierte codices es 17 1 3 1 Tuae niece 17 1 3 2 Names and Functions of each part of the EMUlatOl ec ccecccceeeeeceeceeeeeeesaeceseeeeeseeeeeseeessees 18 TA ee elei MWe een ee een ae ee E eee ene ne E ee ee eee ee ne te ee eee ena 20 1 5 Operating ENViIrONMeEN ccccceeccce ce eeeeeeeeeeeeeeeeeeeeeseeeeeeeaeeeeeeseeeeeeseeeeeesaeeeeeaeeeeeesaeeeeesaaeeeesseeseeeaegeeeesaeeeeeeas 21 PEE E U o ESE esse se eee vee ce cies EAA E 22 2 1 Flowchart of Starting Up the Emulator sseslsssssssssssssseeee eene nennen nennen nnne nnn nnns 22 2 2 Installing the Included Software sssssssssssssssssssssese nennen nennen nennen nnn nnn nnne nnn nsns nnn nnn 24 2 3 Connecting Disconnecting the MCU Unit to from the E100 Emulator Main Unit 25 24 Connecting the Best WAC MNS eseesseseabadeiont dcin uptetiereipras so abr acid sip atce non m Ier AE AS doc rH R d apad E iSe 26 2 5 Connecting the Emulator Power Supply sssssssssssesssesseeeeee nennen nennen nenne nnn nnns nnn nnne 27 26 TUNING ON Me OW secre cei 28 2 6 1 Checking the Connections of t
217. r the Find dialog box shown below is displayed Fired what Unexecuted Line T Firid Unexecuted Line Branch T Branch jF Figure 5 94 Find dialog box Following three search options are available Table 5 33 Search options Unexecuted Line Instructions not executed yet Branch T Branch instructions that passed on only TRUE side Branch F Branch instructions that passed on only FALSE side Clicking the Search button starts a search When a matching instruction is found the line of that instruction 1s highlighted When no matching instructions are found a message is displayed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 163 of 229 QEN ESNS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 11 14 Clearing Code Coverage Information 1 Clearing a specified range of code coverage information Choose Clear Coverage Range from the context menu and the Clear Address Range dialog box shown below will be displayed Clear 4ddress Range 3 xJ Start Address qqcoyv2 al OF End Address JO0C11E al Cancel Figure 5 95 Clear Address Range dialog box Specify the start and end address of the range you want to clear Click the OK button and the specified range will be cleared 2 Clearing all code coverage information Choose Clear the Entire Coverage from the context menu and all code coverage information will be cleared 5 11 15 Updating Coverage Information Update t
218. reak OF Event SE Tat ka te Add Delete Enable Disable Event used 1 Free iS Detail Registered events Jave Load Help Apply E Figure 3 28 Hardware Break dialog box Notes 1 Only the global variables that are 1 byte or 2 bytes in size can be set 2 Local variables cannot be set REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 54 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 17 Trace Facility The trace facility of the E100 emulator has a special memory known as trace memory that can hold an execution record of up to 4M bus cycles which is always updated during program execution The content of trace memory is displayed in the Trace window Choose Code gt Trace from the View menu or click the Trace toolbar button The Trace window shown below will be displayed eV Farz tE Sdr elana Range File Cycle Address Times cycle Label Address Data BUS BRE BIU B W RwWI CPU ON BUS Deb EV TimeZtemp himis ms us n Figure 3 29 Trace window The following outlines the trace facility and describes how to set REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 55 of 229 QEN ESAS ROE530640MCUOO User s Manual 3 Tutorial 3 17 1 Showing the Trace Information Acquired by Fill Until Stop The free trace facility acquires trace information successively from when the user program starts running till when it breaks 1 Clear all brea
219. red Access Rate Shows access rates by a percentage and graph The lower area shows detail information of the address range selected in the upper area Table 5 38 Contents in the lower area of Data Coverage window Address Address value Label Label name Area Memory area FlashROM RAM SFR This column is blank for unused areas Data Memory data The accessed data has its background displayed in purple If located outside the coverage memory allocated area address lines are displayed in gray Although the existing coverage information of those addresses is retained updating of coverage information by program execution does not apply The acquired coverage information 1s accumulated in memory until the user clears it REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 178 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 12 9 Adding Sections Follow the procedure described below to add sections 1 From the Section sheet of the Data Coverage window 1 Right click in the upper area of the Section sheet and choose Add Range from the context menu Data Coverage o amp o5 mx mp Wt DX Percentage Add Range Bait henge Delete Range Data Ai Address Range Section Task Stack Figure 5 118 Data Coverage window 2 In the Add A Section dialog box that is displayed enter a section name Add Section Sector stack Cancel Figure 5 119 Add A Sect
220. rt long a ag FailiB i a long t 30 int i J Kk gap 31 32 FGl1B6 Gap 5 33 FSG1B9 whilei gap gt O jf 34 F61C2 fort k 0 kzgap kt i 35 FG1CF fort i k gap i lt 10 i i gdap ji 36 FB1DF for j i gap j k j j gapii 37 FG1EE g IntBuf j 38 FS1F3 ifia i gt a j tgap ii 39 F8214 t alj 40 F8z223 a i alitgap 41 F8z3cC alitqap t 42 23 else ag break 45 I 46 47 I 48 Fe261 gap gap z 49 F626D 1 SO Fe270 g CharBuf charjq Int Buf amp OXxOOFF 51 Faz 7D 52 cod change long a 54 F6260 i 55 long tmp 10 56 int 1 5 58 FazB86 for i 0 i lt 10 i 59 F6291 tmp i a i 60 1 61 FazLE for i 0 i xi0 icti 62 FazB9 all tmp 9 i 53 1 64 FazDA 4 oe Tubornale i gt Figure 3 43 Editor window setting a software breakpoint Choose Reset Go from the Debug menu REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 65 of 229 QEN ESNS ROE530640MCUOO User s Manual 3 Tutorial After a break choose Code gt Stack Trace from the View menu to open the Stack Trace window x Kind Name Value F sort signed Of ldt j F tutoriali Ofes4h F mair i i f8ze3 Figure 3 44 Stack Trace window You will see that the current PC exists within the sort function and that the sort function is called from the tutorial function Clear the software breakpoint that you have set in a line of the sort function by double clicking at its
221. s Breakpoint is encountered when all of the set events occur at the same time 3 Subroutine Breakpoint is encountered when a specified event occurs within a specified address range Subroutine function Table 5 r steps forward direction reset point Breakpoint is encountered when a set event occurs in a specified order Breakpoint is encountered when a set event occurs in a specified order The events shown in the list of each condition can be deleted by the keys Ctrl Del REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 118 of 229 RENESAS ROE530640MCUOO User s Manual o Debugging Functions 4 Detection of exception events Specify whether you want detection of following exception events to be used as a breakpoint Violation of access protection Read from uninitialized memory Stack access violation Performance overflow Realtime profile overflow Trace memory overflow Task stack access violation OS dispatch 5 Specifying a delay value The program breaks a specified number of cycles after a breakpoint is encountered A breakpoint delay value can be set in the range from 0 to 65 535 bus cycles Initial value 0 5 8 3 Saving Loading the Set Contents of Hardware Breaks 1 Saving hardware break settings Click the Save button of the Hardware Break dialog box The Save dialog box will be displayed Specify a file name to which you want break settings to be saved The file name extension is hev I
222. s are schematically shown below 1 When selecting Overwrite Coverage memory Before loading After loading Coverage file 02000 The coverage memory is averwritten with the data ofthe loaded coverage file x2FFF Figure 5 99 Schematic of load modes when selecting overwrite REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 166 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 2 When selecting Merge Coverage memory Before loading After loading Coverage file 1 Existing data is read Oc 20D 032000 02000 NET adn 2 The data af the coverage file is a merged with the existing data x2FFF x2FFF Ox2F FF 3 The merged data is written to the coverage memory 2 Figure 5 100 Schematic of load modes when selecting Merge 3 Example application of merge mode Coverage memory Test A Test B Test C after loading in the merge mode coverage coverage coverage file file file Example as As the result of test A B and C the co coverage is 75 30 50 BO 1 2 i E Figure 5 101 Schematic of merge mode applications Procedure 1 Open the Load Coverage Data dialog box To begin with select the check box labeled Clear coverage RAM before loading 2 Add a coverage file for test A in merge mode 3 Add a coverage file for test B in merge mode 4 Add a coverage file for test C in merge mode 5 Click the OK button With the above you are finished mergin
223. sesseee nennen nennen nnn n annees 161 5 11 12 Using the Sort FUhGCHOLL sicco usi coat tuns vus aeq mu etos eS n Xaee ca usu e cture tud eaun fu Runs amu sduxue eas PrresuEi URCU UE 162 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 11 of 229 RENESAS ROE530640MCUOO User s Manual Contents 5 11 13 Searching for Unexecuted LINGS cccccccccceseeecsesseecceseeececeecseuseecseuseeessaneeecseseesseeeeessageees 163 5 11 14 Clearing Code Coverage Information cccccccceeceeceecseeeeeeneeeeeeeaeeeeesseeeeseeeeeeseeeeeesaaeeeesaaeeees 164 5 11 15 Updating Coverage Information ccccecccccseeeeeeeeeeeecseeeeeeeeeseeeseeeeesseeeeeseeeeeseeeeesaeeeeessaeeees 164 5 11 16 Inhibiting Updating of Information ccc ccceeeeceeceeeeeeeeeeeeeeeeeeeesaeeeeeeaeeeeeeseeeeeesaaeeesaeaeeeesaees 164 5 11 17 Saving Code Coverage Information to Files eesseesseeeeseseeeneeeen nnne 165 5 11 18 Loading Code Coverage Information from Files eeeessseeeseeeeeeeeeeennnnne 165 5 11 19 About Coverage Information File Load Modes ccccccccccseeeeeeeeeeeeeaeeeeeeseeeeeeeeeeeesaeeeeesaeeees 166 5 11 20 Showing Code Coverage Results in the Editor WINdGOW ccccccceceeeeeeseeeeeeseeeeeeaeeeeeaaeees 168 5 12 Measuring Data Coverage cccccccsssccccceseeccsencecceeseeeceeeeecseueeesaaueeecsaeeesseaseeecueeecsaeeeessaseeeessegseessaaes 169 0 12 1 Measuring Data Coverage
224. splayed in different background colors depending on access attributes as listed below The background colors are customizable The read and write accesses show the last accesses made Error detection can be displayed by choosing Show Error Detection from the context menu In this case the read and write accesses are not displayed Table 5 6 Access attribute and background color Access attribute Background color 2 Write access Red When Uninitialized memory Area not yet write Yellow errors accessed is accessed for read d aoe Uninspected memory A write accessed area Sky blue is not yet accessed for read CAUTION The contents shown in the RAM Monitor window are the data acquired from bus accesses Therefore changes made by accessing memory via other than the user program as when memory is rewritten directly from external I O are not reflected in the displayed memory content REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 94 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 3 Initialization omitted detect function If an area not yet write accessed is accessed for read this function assumes such a case to be initialization omitted and outputs an error To display initialization omitted detection choose Show Error Detection from the context menu Uninitialized memory is displayed in yellow The initialization omitted detection can be used as an exception event comprising a conditi
225. ssssssseseee nennen nnne nn nnn nnns 204 5 14 8 Detecting a Task Stack Access Violation seesssssesssseseseeeeeeennenne nennen 204 5 14 9 Settinga Task Stack AVC ees calc innein s vaca i p van aso uu don usta avro rna riti du ei dad 205 5 14 10 Detecting an OS dISDalCeli uuo iain tb org iara at D rato vu rana nbn aai e Da nn od eR adu d 208 5 15 USING TGS rat FAY OD uersa senses aont nAn ETO Ea US EEA o RERUM AR IUE eoi 209 5 15 1 Opening the Start Stop Function Setting Dialog BOX cccccceecceeseeeeeeseeeeeeaeeseeeneeeeeeeaaeeeeens 209 5 15 2 Specifying the Routine to be executed sessessssesessseseeseeeeee enne 209 0 15 3 Limitations of the Start Stop Function seeeesseessssesssseeeeeee nennen enne nnne 209 5 15 4 Limitations to the Statements written in a Specified Routine c cece ceeceseeceeeeeeeseeeeeeeeeeees 210 REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 12 of 229 2CENESAS ROE530640MCUOO User s Manual Contents 6 Troubleshooting ACTION Or ETFOF uuusus cocoa anaa aka neninn sepu amit aca ta Fu Cosa sio past a Uu xia nah pe Ea Di eoa Gu e Ses pez ud deus iras pd Ua eai 211 6 1 Flowchart to Remedy the ITOUDIGBS iistensuscscseianontes PguM uo pYwFU LE MURUS CE sUrE VILE peau DUCI abawoues tci ug E a Ea bene Forv uas CUIU 211 oS aw mero p MT dene E deere ides 212 6 3 Error at Biz elles s dieit gii oT
226. sssssssssesesee nennen nnne nnne nnn nnn nnns 50 3 13 3 Executing the Step Over Command ssesssssssssssssssesesee eene nnne nnne nnn nnn nn nnn 51 3 14 PORGIDIY Breaking a Progr eise sesutiasrsvtrav ipd mutas axe uaa ka uad va aEER FEAR OG i tua SR QI CAR RIUA RAT BR A RUE rakawian es 52 J19 Hardware Break FACY NR TIE ODE E o3 3 15 1 Stopping a Program when It Executes a Specified Address cccccccceececeececeececeeeeeeeeeeseaeees o3 3 16 Stopping a Program when It ACCESSES Memory sssssssssssssseseeeeeen nennen nennen nnn nn nnns 54 OMFEIe AgelliMe RU S 99 3 17 1 Showing the Trace Information Acquired by Fill Until Stop 0 0 0 0 ceceesseeeeeeeeeeeeeaeeeeeeneeeeeeens 56 3 17 2 Showing the Trace Information Acquired by Fill around TP ccceceeeceeeeeeeeeeeeeeeseeeeeesaeeeeeens 59 3 17 3 Showing a Function Execution History cccccccsseececcsseecceeseeecseeecseseeeseseeessageeessegseeseaeeeeess 61 CRF Ede em 63 3 19 Stack Fraco FACING E 65 AS AG te 1 bs 4 i gehen eee ree enn eae me E E ee nee ee AEE eee ee eee 66 aM PrOD AMIN O PERU m 67 4 1 Starting the High performance Embedded Workshop ccccseecceeeeeeeeeeeeeeeeseeeeeeseeeeeeseeseeessaeseesaeeeeesaess 67 4 2 Creating a New Workspace Toolchain UNUSE ccccceeecceceeeeeeeeeeeeeesaeeeesaeeeeeeseaseeesaaeseesaegeeeeseeeeeeens
227. stem IMPORTANT Notes on Changing the Clock Supply The clock supply can be set by the Configuration properties dialog box when starting up the emulator debugger or inputting emulator clock command on the Command Line window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 30 of 229 QEN ESNS ROE530640MCUOO User s Manual 2 Setup 2 8 2 Using an Internal Oscillator Circuit Board Kinds of Oscillator Circuit Boards An oscillator module 20MHz is mounted on the IC17 at factory setting If you change the frequency replace the oscillator module 1 Replacing the Oscillator module Remove the MCU unit from the E100 emulator main unit and replace the oscillator module of the IC17 see Figure 2 7 EPSON TOYOCOM SG 8002DC DB Series power voltage 2 7 3 6V PC SC EN Hann JSG 8002DC EN EN SG 8002DB 1a 2 40a 4 4 40a 1 REL 0r V JARRHHAOOCCUUDPCCPPPPPEPPP 2 i H 7 i H P EN dee fA den A 5 3 un e Ahhh TTA TARTAR innon Pie S VRRRRRRRRRRRRRRNARINNWRRRE 2 1 1 joo VRBARRRRARRRARRRARRRRURRRSARE 37 1 ie d Ea d e EEEE ri LE BSCPEEHCDRPEHCDPELUDALELUU 1 1 esi hrepeni HE e b Figure 2 7 Replacing the oscillator module A CAUTION Note on Replacing the Oscillator Module and Oscillator Circuit Board Always shut OFF power when replacing the oscillator module Otherwise internal circuits may be damaged REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 31 of 229 2 NC S AS
228. tage down detect interrupt voltage down detect reset etc should be executed with the actual MCU Notes on Maskable Interrupts Even if a user program is not being executed including when run time debugging is being performed the evaluation MCU executes a debug control program Therefore timers and other components do not stop running If a maskable interrupt is requested when the user program is not being executed including when run time debugging is being performed the maskable interrupt request cannot be accepted because the emulator disables interrupts The interrupt request is accepted immediately after the user program execution is started Take note that when the user program is not being executed including when run time debugging is being performed a peripheral I O interruption is not accepted Note on DMA Transfer With this product the user program is stopped with a loop program to a specific address Therefore if a DMA request is generated by a timer or other source while the user program is stopped DMA transfer is executed However make note of the fact that DMA transfer while the program is stopped may not be performed correctly Also note that the below registers have been changed to generate DMA transfer as explained here even when the user program is stopped 1 DMAO transfer count register TCRO 2 DMA transfer count register TCRI 3 DMA2 transfer count register TCR2 4 DMA3 transfer count register TCR3
229. the address ranges to be measured and access rates Table 5 35 Contents in the upper area of Data Coverage window Range Access Rate Address ranges in which coverage is measured Shows access rates by a percentage and graph The lower area shows detail information of the address range selected in the upper area Table 5 36 Contents in the lower area of Data Coverage window Address Address value Label Label name Area Memory area FlashROM RAM SFR This column is blank for unused areas Data Memory data The accessed data has its background displayed in purple If located outside the coverage memory allocated area address lines are displayed in gray Although the existing coverage information of those addresses is retained updating of coverage information by program execution does not apply The acquired coverage information 1s accumulated in memory until the user clears it REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 172 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 0 12 5 Adding Address Ranges Follow the procedure described below to add address ranges 1 From the Address Range sheet of the Data Coverage window 1 Right click in the upper area of the Address Range sheet and choose Add Range from the context menu Data Coverage o amp o em inl sy wt DX Percentage Add Range Edit Range Date Delete Range mG Address Range Task Stack Figur
230. the saved state of the selected workspace is one in which it was not connected to the emulator and you want to connect it refer to 4 5 Connecting the Emulator REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 73 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debug 4 5 Connecting the Emulator 4 5 1 Connecting the Emulator There are following methods for connecting the emulator 1 Setting up the emulator at startup before connecting Choose Debug Settings from the Debug menu to open the Debug Settings dialog box In this dialog box you can register download modules and the command chain to be automatically executed When you are finished filling in the Debug Settings dialog box the emulator will be connected 2 Loading a session file Switching to the session file that has emulator usage settings preregistered in it helps you connect the emulator easily 4 5 2 Reconnecting the Emulator While the emulator is disconnected you can reconnect it following one of the procedures described below 1 Choose Connect from the Debug menu 2 Click the Connect tool button L 3 Enter the connect command in the Command Line window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 74 of 229 2 NC S AS ROE530640MCUOO User s Manual 4 Preparing to Debu 4 6 Disconnecting the Emulator 4 6 1 Disconnecting the Emulator To disconnect the emulator while it 1s active follow one of the procedures described below
231. trace point at which the debugger starts acquiring trace information Open the OR page of the Trace conditions dialog box Select the main function in the Editor window and drag and drop it into the OR page Click the Apply button and then the Close button Thus the debugger will start acquiring trace information from when the main function is executed Trace conditions lol x lolx Trace OR Option me ilee e re Tome liz EVOl Add Delete Enable Disable Event used 1 Free iS Detail Registered events Save Load Help Apply A Figure 3 35 Trace conditions dialog box OR page 4 Choose Reset Go from the Debug menu A short time after a trace point is reached the trace content shown below will be displayed in the Trace window syp saxz tE Edhi allaga Ranga 00000001 094302 Fia Cyce 00000001 lAddrass OD0TIE Mima 00 00 00 001 276 630 Cycle Label Address Data BUS AHE EIU B W nwi CPU QH BUS Deb EV TimeStemp h m s ms us nz DU000001 RID LB SLE e lbs 1 1 4 1 1 gDODCODOUODOO gODOOD DO 002 00 001 2 fb H30 nanaonon1 FB82ED OSFS 16b IH R O cB 3 i 1 aonoanannnonoOOOO 00 00 00 001 276 790 ooooooo2 OFS2EO FS 16b 1 1 RB 23 1 1 OODodOoOoOOOROOOD O00 00 00 001 276 640 IFS EO JIE W utoria oooo0003 FB2E2 FEOO 16b D w E 0 CB 3 1 1 nonoanoannnnonopoDO 00 00 00 001 276 690 oo000004 rS2EZ 00 ibb 1 1 Fu 1 i 1 OODONOR0000R0000 00 00
232. tutori OFBZE6 FeTc 16b O Ih R 2 12 1 onongaoocpnogoaocpnoga O0 00 00 001 277 790 00005990 FBZBH 7 17 l amp b O The 4 1 1 DOOOOO0000G0000 00 00 00 001 2 77 840 Figure 5 64 Trace window The lower pane of the window shows the trace result beginning with the cycle in which the function selected in the upper pane was called The lower pane of the window can show trace results in disassemble source or mixed mode CAUTION If trace extraction or deletion conditions are specified the function execution history cannot be displayed If repeat free or repeat full mode is specified the function execution history cannot be displayed REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 140 of 229 QEN ESAS ROE530640MCUOO0 User s Manual 5 Debugging Functions 5 9 17 Showing the History of Task Execution The history of task execution can only be displayed when you are debugging a realtime OS program Furthermore to show the history of task execution you need to select Task ID on the Options page of the Trace conditions dialog box that is displayed when you choose Acquisition from the context menu of the Trace window To show the history of function execution from the acquired trace information choose Show Function Execution History from the context menu click the Show Function Execution History button in the toolbar An upper pane of the window will be displayed Initially this window is blank When you choose Analyze Exe
233. uch as Address and Data have only Option provided in the drop down list because they do not have other inherent items Selecting All returns you to a non filter state mvp Farz tEn raaa Ranga O0006550 00000000 Fia Cycle 00006549 Address OFBAGS Time 00 00200 000 127 320 0006533 00007 oooooonoOooOo0000 cycle x Label Addre Dat 7 Br ox eel pe nel cv 7 Brf n7 xv Timsstemp him s ms us n 00006549 OPGAGE OAIP lth 0 PONE CU 2 1 1 o000000000000000 00 00 00 000 127 320 00006543 FBA6A O3CT 6b E Z2 1 1 OoOo00R0o0000000 00 00 00 000 191 000 00006547 OFSAGC OOA Lobb D CN 2 1 1 OOO0OOOROOOORO00O 00 00 00 000 254 700 O0008546 OFSAGE O47 Lobb D E 2 1 OOOOUODOO00R0000 00 00 00 000 318 430 O00006545 OFSATO cYOO lbh CB 3 1 1 OOOCOOROO00R0000 D00 00 00 000 382 130 00006544 QDODOA 03 16b 1 EF 1 i 1 OOOOOOROON0R0000 00 00 00 000 445 950 00006 543 OQDODOA 03 16b 1 1 1 1 OOOOOOROON0R0000 O0 00 00 000 509 720 00006542 rSA7Z OFZO l6b U 3 1 1 QOOOOOOROON0R0000 00 00 00 000 573 4240 00006541 OPSAT2 20 l6b 1 1 cu 1 1 1 acnponpaocoopocDoOO 00 00 00 000 637 160 00006540 O00004 00 16b 1 DB W 1 1 1 1 Oo00000000000000 00 00 00 000 700 900 000065329 O00009 00 16b 1 DB W OF 11 1 O0DODODDODODDOUO 00 00 00 000 764 630 00006538 DPBA74 C700 lth oOo WR 0 3 1 1 OQODO0D0D000000000 00 00 00 000 928 410 00006537 DPBA74 00 lf 1 1 EW 1 1 1 OO00000000000000 00 00 00 000 a92
234. ugger always shut off the emulator power supply and then turn on it again Note on Display of MCU Status MCU status you can refer to in the MCU tab of the MCU Setting dialog box of the emulator debugger shows pin levels of the user system Make sure that proper pin levels are specified according to the mode you use Note on Processor Mode Register 0 Do not set the BCLK output disable bit PM07 to 1b not output If you set to it the internal clock in the evaluation MCU stops and the emulator cannot operate normally REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 222 of 229 QEN ESAS ROE530640MCUOO User s Manual 7 Hardware Specifications IMPORTANT Note on Clock Supply to the MCU A clock supplied to the evaluation MCU is selected by the Emulator tab in the Init dialog box of the emulator debugger 1 When Emulator is selected A clock generated by the oscillator circuit board on the MCU unit is supplied It 1s continually supplied regardless of the status of the user system clock and that of the user program execution 2 When User is selected A clock generated by the oscillator in the user system is supplied It depends on the status of the oscillation on off of the user system 3 When Generated is selected A clock generated by the dedicated circuit in the E100 is supplied It is continually supplied regardless of the status of the user system clock and that of the user program execution Note o
235. ulator 5 AC adapter supply for the emulator 6 Host machine A personal computer to control the emulator 7 Pitch converter board for connecting the user system ROE0100TNPFJOO etc 8 User system and user system power supply User system is your application system This emulator can be used without the user system The user system power supply is power supply for the user system This emulator cannot supply power to the user system Get a power supply separately REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 17 of 229 QEN ESAS ROE530640MCUOO User s Manual 1 Outline 1 3 2 Names and Functions of each part of the emulator Figure 1 2 shows the names of each part of the emulator 5 System status LEDs 4 External trigger connector 1 Power switch 2 USB cable connector USBI F 3 Power connector DC 12V Q 9 O 6 Target status LEDs Figure 1 2 Names of each part of the emulator 1 Power switch This is a switch to turn ON OFF the emulator 2 USB cable connector This is a connector to connect the USB cable of the emulator 3 Power connector This 1s a connector to connect the DC cable of the AC adapter power of the emulator 4 External trigger connector This 1s a connector to connect the external trigger cable of the emulator REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 18 of 229 QEN ESAS ROE530640MCUOO User s Manual 1 Outline 5 System Status LEDs The system status LEDs indicate the emulat
236. untered when a set event occurs in a specified order REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 128 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 4 Detection of exception events Specify whether you want detection of following exception events to be used as a trace point Violation of access protection Read from uninitialized memory Stack access violation Performance overflow Realtime profile overflow Task stack access violation OS dispatch 5 Specifying a delay value The program breaks a specified number of cycles delayed after a trace point is encountered A trace point delay value can be selected from 0 1M 2M 3M or 4M bus cycles Initially OM cycle Select your desired delay value in the delay value setting column Figure 5 53 Trace conditions dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 129 of 229 RENESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 9 6 Setting Capture Do not Capture Conditions If the selected trace mode is Fill until stop Fill until full or Fill around TP you can specify Capture Do not Capture conditions You can choose to extract only the necessary portions of trace information specified by events or delete the unnecessary portions 1 Capture Do not Capture conditions There are following types of conditions Table 5 22 Capture Do not Capture conditions Extraction EV Between two events Cycles extracted begin when a st
237. upicate dd jelata Delete amp ll Figure 5 27 Registered Events dialog box 2 The Event dialog box shown below will be displayed In this dialog box set detail event conditions Enter a comment if any necessary Then click the OK button Condition Count and Task ID Comment Condition Count and Task iD Comment Event type Insteuction fetch Comment min Function Condition settings Address condition Specitiad value i start man Er Erd ooo Fr Gd Chis ereit bo te bet Figure 5 28 Event dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 106 of 229 QEN ESAS ROE530640MCUOO0 User s Manual 5 Debugging Functions 3 An event will be added to the list of registered events Registered Events Events F Address main mam Function Dupicate Figure 5 29 Registered Events dialog box 2 Adding an event from the event column of the Editor window When adding a hardware breakpoint 1 Select the HW Break Point from the popup menu displayed by double clicking or right clicking anywhere in the event column of the Editor window You can set a hardware breakpoint based on a fetch to that address as a condition gt Instruction fetch condition Une _ Sour E ET S Source 14 roid main void 15 FBHZDC 16 FS82zDc while 1 17 FBZEL tutoriali 18 F82E3 HV Break Paint 19 F82ES5 Trace Port FAN 21 oid tutorial void a
238. verage window and the Load Coverage Data dialog box shown below will be displayed Ee e e Mame i Add heer vnte test cas Os DODOOCIO Dhverwrmte teste cov CO DOC DIO Merge tesll 3 cav OxDOO00000 Remove Clear coverage RAM before loading Figure 5 97 Load Coverage Data dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 165 of 229 QEN ESAS ROES530640MCUO00 User s Manual 5 Debugging Functions Click the Add button and the Add Coverage Files dialog box shown below will be displayed Add Coverage Files 3 xl File Hame o gt Browse Offset Jox000000 Coverage Data Load Mode f wvernarite Merge Cancel Figure 5 98 Add Coverage Files dialog box Use this dialog box to enter a coverage information file you want to load You can specify a load mode and offset for each file you load Only the files bearing the extension cov can be loaded If you enter any other file extension an error message is output The files you added are listed in the Load Coverage Data dialog box The files are loaded in the order in which they are listed If necessary use the Up or Down button to change the order CAUTION If the coverage information file you are loading is of a source file specification type you cannot specify an offset when you load 5 11 19 About Coverage Information File Load Modes Coverage information file load mode
239. which your system is connected via USB The USB serial No list box shows a list of the unit identification information of USB connected emulators Clicking the Refresh button refreshes the unit identification information 9 Performing self diagnostics By selecting the Start booting up on successful completion of self checking check box and clicking the OK button it connects your system and the emulator under the communication conditions you have set to perform hardware self diagnostics When diagnostics is complete the result is displayed If diagnostics terminated normally the system continues to perform boot up processing If diagnostics terminated in error the system aborts boot up processing REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 81 of 229 RENESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 1 3 Setting Up the System On the System page of the Configuration Properties dialog box set up the entire emulator system This dialog box 1s displayed following the Device setting dialog box at startup Although this dialog box can be redisplayed after startup you cannot change some settings in it These settings can only be changed at startup Configuration properties x Internal Hash memory overwrite Exception W aming Option board System Menon map Clock M n G Eia Cue C Genet 10 MHz Ingger Extemal wigger cable EXT 0 31 INPUT C ES anor EXT O15 TTL Input tage level EXT 031 CMO
240. window is the one that corresponds to the cursor position in the Editor window You also can use the Disassembly View button in the Editor window to display disassembled codes If no source files exist one of the following methods may be used to display disassembled codes S Click the Disassembly toolbar button E Choose Disassembly from the View menu Use the Ctrl D accelerator In this case the Disassembly window opens at the current PC position Mixed mode display where all source lines are displayed beginning with that address is also supported as an option To display disassembled codes in mixed mode click the Show in Mixed Mode button w Disassembly T T Il Oj x TCF232 _tutorial ENTER 52H A FDEZOO00 PUSH G 00008 TDEZ2Z600 PUSH W G 0026H FODSES0F JSA malloc 7DB4 ADD B Q 4H SP 730BF HOV WG RO 6H FB 732BFC HOV W G R2 4H FB 7 54BFC PUSH W G 4H FB TS4EBFA PUSH W i 6H FHSB FDI4E00F JSR a init 7DB4 DD B Q 4H SP DOOEBFE 778BFEOADD CMP W G SODOOAH 2H FB FDC ASL JGE FEZBZH FDSZESOF JSR A _rand TOF EXIS W RO st Figure 5 10 Disassembly window Shown at left edge of this window are the line information consisting of the following 1 Event column This column shows the following Table 5 4 Event column list Hardware breakpoint is set m Trace point fetch condition is set A hardware
241. wing a bus and disassemble mixed display choose Display Modes gt DIS from the context menu again Cycle Label Address Data BUS BHE EIU B W RWI CEU ON BUE Deb EV JFEABES ztart LI H AIFH IZE 0068654329 FBA6BS Ai1F 16b IH R cm X 1 1 OoOo00R0o00R0000 00 00 00 000 127 320 50006543 FSAGA O3C7 1b D W R E 2 1 1 OODOOOROOOORO00O 00 00 00 000 191 000 UPS A ba MOV B 3 UH ODOAE n 0 0065237 DESAT OOOA Lob D w E OF cw 2 1 1 OOOOOOROOO0R0000 00 00 00 000 254 700 N00006546 OFSAGE O4B7 Lob D IU E OQ RE Z 1 1 OOOOOOROON0R0000 00 00 00 000 318 430 JFBABE Moy Bra 0 00048 00006545 JESA70 C700 lbh D IN R OQ CBE 3 1 1 QOOOCOOOOON0R0000 00 00 00 000 382 130 O0006544 000008 03 16b 1 DB W 1 E 1 1 1 acnponpococoopooDoDO 00 00 00 000 415 950 00006543 000008 03 lbk 1 DB Ww D 1 1 1 acnonpaocoopocDondo 00 00 00 000 509 720 O00006542 OPBATZ OFTz0 l6b U IM R 3 1 1 apnaonmoagnpnongoppgonmgo 00 00 00 000 573 420 IFBATI FY a AS 204 0007H 00006541 UFHA 2 z lb 1 1 CM 1 1 l QOU0D00R0D000D0000 00 00 00 000 637 160 00006540 odada 00 Ilbtb 1 DB W 1 1 2 1 OO0000R0000R0000 00 00 00 000 700 900 O0008535 o00004 00 Lbb 1 DB Ww Oo 1 1 1 OO0COOROO00R000O 00 00 00 000 764 590 n 0 0056533 rFSA 73 C700 lbh IU E 1 1 OOO0OOOROOOORO000 00 00 00 000 428 410 i i EH i 1 1 00006537 OFSATS 0 165b OOCOOODOOOOO0ON0 00 00 00 000 492 190 Figure 5 60 Trace window REJ10J
242. workspace name is good you do not need to enter it Directory Enter a directory in which you want a workspace to be created Or you can click the Browse button and select a workspace directory from the ensuing list CPU family Select the CPU family of the MCU you are using REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 68 of 229 QEN ESAS ROE530640MCUOO User s Manual 4 Preparing to Debu The other list boxes are used for setting up a toolchain If no toolchains are installed the information specific to the CPU family is displayed here Click the OK button 3 Select the debugger target Setting Ehe Target System for Debugging i ajx M16C E100 Emulator Target type All Targets E Finish Cancel Figure 4 4 Setting the Target System for Debugging dialog box Select the target platform you use by placing a check mark in its check box and click the Next button 4 Set a configuration name Configuration refers to the file in which the High performance Embedded Workshop status other than the emulator is saved Setting the Debugger Options Target name MIEC E100 Emulator Configuration name Debug_M16C_E100_Emulator Detail options Madii Hes Finish Cancel Figure 4 5 Setting the Debugger Options dialog box If you have selected two or more target platforms click the Next button and then set a configuration name for each target platform selected REJ10J1733
243. ws bit 3 of address 00005h 2 Shows bit 2 of address 0000Bh 3 Shows a memory access on the user system 4 MAP shows the area access according to the Emulation Memory Allocation setting on the Memory map page of the Configuration properties dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 225 of 229 QEN ESAS ROE530640MCUOO User s Manual 8 Maintenance and Guarantee 8 Maintenance and Guarantee This chapter describes how to perform maintenance warranty information repair provisions and the procedures for requesting a repair 8 1 User Registration When you purchase our product be sure to register as a user For user registration refer to User Registration page 14 of this user s manual 8 2 Maintenance 1 If dust or dirt collects on any equipment of your emulation system wipe it off with a dry soft cloth Do not use thinner or other solvents because these chemicals can cause the equipment s surface coating to separate 2 When you do not use this product for a long period for safety purposes disconnect the power cable from the power supply 8 3 Guarantee If your product becomes faulty within one year after its purchase while being used under good conditions by observing IMPORTANT and Precautions for Safety described in this user s manual we will repair or replace your faulty product free of charge Note however that if your product s fault is raised by any one of the following causes we will repair
244. x is updated If task profile information is included in the loaded file modes in the Realtime Profile Setting dialog box are switched to task mode REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 190 of 229 QEN ESNS ROE530640MCUOO User s Manual 5 Debugging Functions 5 13 7 Measuring Task Profiles Measure execution performance one task at a time Realtime Profile count Time O M3T MR30 4 or Idle 1 00 00 00 577 565 090 00 00 00 577 565 090 L main L D0 00 00 084 891 350 00 00 00 084 891 350 2 taskl 38 00 00 00 972 308 460 00 00 00 025 587 060 3 taski 25 00 00 00 541 265 350 00 00 00 021 650 610 Figure 5 133 Realtime Profile dialog box task profile The following shows detail information in each column Table 5 42 Details on each column Block Block number Task ID Task ID entry address Count Number of times a task is called Cumulative time of task execution The time stamp is displayed in the form shown below Hours minutes seconds milliseconds microseconds nanoseconds Ratio of task Time to Go Break execution time Average execution time per measurement performed Disabled tasks are displayed in gray The acquired profile measurement results are accumulated in memory until the user clears them REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 191 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 5 13 8 Setting Task Profile Measurement Ranges Choose S
245. y E Figure 5 138 Hardware Break dialog box 2 The Exception page shown below will appear Click the Detail button to the right of the Violation of access protection check box Hardware Break l _ L1 x Em ici xl Hardware Break OR Exception violation of access protection Read from a uninitialized memory Stack access violation Performance overflow Realtime profile overflow Trace memory overflow Task stack access violation QS dispatch Event used O Freel Detail Registered events Save Load Help Apply E Figure 5 139 Hardware Break dialog box REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 198 of 229 QEN ESAS ROE530640MCUO00 User s Manual 5 Debugging Functions 3 The Violation of access protection dialog box shown below will be displayed To have the access attributes automatically set according to the section information in a download module when a program is downloaded select the check box labeled Automatically set address areas at downloading Violation of access protection Modify 02 ME MR top OOOFOOOO DDOFTFFF SERIE 03 8kB OOOF 2000 DBBF33E 3 Read Only Delete D4 BkB INT V DODFEDDD O00FEOFF Read Only Delete the black Delete all Cancel Help 4 SkB DOFFFDC O0FFFFF Read Only Figure 5 140 Violation of access protection dialog box 4 Click the Update button and the access attributes will be up
246. y Wt EX OoOo41 OOD71B stack 13 5 OF8980 OFSAAE interrupt of z mG Address Range Section Task Stack Figure 5 123 Data Coverage window REJ10J1733 0100 Rev 1 00 Apr 01 2008 Page 181 of 229 QEN ESAS ROE530640MCUOO User s Manual 5 Debugging Functions 5 12 11 Measuring Task Stack The Task Stack sheet shows the access information collected from a task stack Task stacks are automatically registered You cannot add remove or change any task If tasks are changed pursuant to alterations of the user program for example the window is automatically updated Data Coverage l x o sx m e Wt X Task 1 1 1 O Access Rate D DEDUC O DOE6F TaskID 1l Entry task llj NE 000424 UdUA amp S7 TaskID 1 Entry main 40 001000 dil63 TaskID 16 Entry taskl lbj O OOOFSc OOOFFF TaskID 15 Entry taskO15 O _I OOOAEC OO0B4F TaskID 3 Entry task003 08 DoD RAN m DIODLA 3 4 RAN OOUA4S RAN OOUAAC RAN a8 8b Ya all i4 Address Range Section Task Stack Figure 5 124 Data Coverage window task stack specification The Data Coverage window is vertically divided into halves by a splitter The upper area shows the automatically registered task stacks and access rates Table 5 39 Contents in the upper area of Data Coverage window Task Task stacks task ID task entry label Access Rate Shows access rates by a percentage and graph The lower area shows detai
Download Pdf Manuals
Related Search
Related Contents
ふじさわ防災ナビ Seagate Barracuda LP SATA 1.5TB Hard Drive American Dynamics VideoEdge ADNSNVR-CL1 User's Manual L`accompagnement thérapeutique : réflexions sur un HI 93124 nettoyage et désinfection en 1 seule opération INSTRUCTION MANUAL E)使用方法: 【サンドペーパー使用時のご注意】 サンドペーパーは必ず水 Copyright © All rights reserved.
Failed to retrieve file