Home
R0E521500MCU00 User`s Manual Supported Devices: R8C Family
Contents
1. sseesseseseeeeeenenn nennen nennen 218 FAT odia zi DME 010 NERO 219 7 4 1 External Dimensions of the E100 Emulator eeeseeeeseeeeseeeeeeernnnennnn nne 219 7 4 2 External Dimensions of the Converter Board ROE53054ECFK690 esseeseusss 220 7 4 3 External Dimensions of the Converter Board ROE53036ACFKAO eeeeeseeeeeeess 220 7 5 Notes on Using the MOL nil otro mrt reputo trn n Ex Ua roni Reed xw esa rds nta Fe prac EASES 221 9 Mairtenance and Warrahly siisnnsesencnsusverewushvansnasessensideriidurseriveshanaeudivaesvanoiswrarosbunmendhvanediersancebitauneleustinudediurnsudaeraui 224 ONUS Minicie i i zii oi NONE ET TEE rn 224 9 2 MAMONI O csaseptexantdebastexdeitetiuc tan E a E t Rd c Un Pla TIERE E 224 omo cdi 224 8 4 Repair Provisions suvereteaensxie ss ricua npe rbv EYoZV eA ww EX RUEP anes Eus ve E E rid rS KaUFEV car Ue lx VR EVE dat ab ER park RE REOR PNE ri EU RRPM Da PN 225 8 5 How to Make Request for Repair ccccsssccccessececeeseeeceuseecceeseeecsaececseeeecseuseeseaueeessegseeessusseeessaseeessageees 225 R20UT0455EJ0101 Rev 1 01 RENESAS Page 13 of 228 Dec 16 2011 ROE521500MCUOO0 User s Manual User Registration User Registration When you install debugger software a text file for user registration is created on your PC Fill it in and email it to your local distributor If you ha
2. poaa DOD04 RAM Dono 08 RAM Daou0c RAM Dao 10 RAM mG Address Range Task Stack Figure 5 112 Data Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 169 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 pop up menu Data Coverage o sS m F Wt 000700 ODO8RE ss DO12kEB 001334 Ds i Percentage Add Range Address Label Area Data tate Esp 000700 RAM 000704 RAM 000708 RAM Dnon7nc RAM Dag 10 RAM A y Address Range Figure 5 113 Data Coverage window 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 If you do not save click the No button ecxdata hcoverage AN Coverage data For address ranges are not saved yet Do you want to save coverage data i Mo Cancel Figure 5 114 Confirmation of Edit Address Range dialog box 3 The address range you have selected will be removed Data Coverage mE uw itl zT Mt OOLZEBR 001334 Os RAM g0 73 di 17 DD 1ZzEB DD1ZzEkF RAM 45 b be hl OO12F3 RAM Od 4c OO 88 DDO1zr RAM
3. sss 91 5 2 5 Showing Assembly Language COde ccccccssseeeeccceeeeeeeesseeceeeeeeseaeeeeeeeeessaaeeeeeeeeeeeseseageeeeeesaaas 92 5 2 6 Correcting Assembly Language Codes ssessssssssssseeeeee eene 93 5 3 Displaying Memory Contents in Real Time sseeeesessssssseeeeee nennen nennen nnn nnne nsns rennen 94 5 3 1 Displaying Memory Contents in Real Time sseeesesessseseeenee nnne 94 5 9 2 Setting RAM Monitor Update Intervals sseeeeseessssssseeesseeeeeeeeeenn nennen nnne 95 5 3 3 Clearing RAM Monitor Access HiIStory cccccccsseeeceeeceeeeeeesaeeeeeeeeseeeeeeeeeesaeeeeeeeseaeeeeessaegeeeneeeas 95 5 3 4 Clearing RAM Monitor Error Detection Data ccccccceeccecceeseeeeeseeeeseeesaeaeseeeeaeaeeeeessaeeeeeeeeas 95 5 4 Showing the Current Status ccccccccsssseccceeeeeeeeeseeeeeeeeeeeeeeeseeceeeeeseeeeseeceeeeseeesseeeeeeeeeseuaeaseceeeeeesssssaaseeeeeeees 96 5 4 1 Showing the Emulator Status eesesssssssssessessseeeeennnnn nennen nennen nnne nsns n na nnns nnns nnns 96 5 4 2 Showing the Emulator Status in the Status Bar eeessssseessessseeseeeee nene 97 5 5 Periodically Reading Out and Showing the Emulator Status seeeeseeeesseesssseseeeeeeennennne 98 5 5 1 Periodically Reading Out and Showing the Emulator Information
4. Rom oe EA x e ue sm mi E R a Z 0 1 i 3 4 5 5 7 3 2 AAA a Aaa aa a a A wrateha A watch A watcha A Watch E E x000 e5 Ox0006e9 Ox0006ed OxO006 1 OxOQ006 5 OxO006 9 Ox0006fd 0x000701 0x000705 x00070 0x000715 0x0006e5 ee ee 0 ee ee ee Type signed signed signed signed signed signed signed signed signed signed signed signed long 10 long lona long long long longi long longi longi longi inti Current Scope Current Scope Figure 3 17 Watch window showing array elements R20UT0455EJ0101 Dec 16 2011 Rev 1 01 44 N SAS Page 48 of 228 ROE521500MCUOO User s Manual 3 Tutorial 3 12 Showing Local Variables Using the Locals 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 four local variables a J T and p_sam Choose Symbols gt Locasl 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 x Name Value Type ee a T ux n d6 amp es5 signed long 10
5. 4 af Figure 5 78 Code Coverage window 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 pop up menu Code Coverage RN ud eK Am OFE102 OFELBC BERR pee FEIBE FE218 100 NN ms amp dd Range Edit Range executed Pass addccos a_ Cee Rares UFE1I02 ENTER OFEIOS MOV W G OFE108 MOV W o gap 5 OFELOEB CHP W Q while gap 4 afr Figure 5 79 Code Coverage window 2 In the Edit Address Range dialog box that is displayed change the address range Edit Address Range ee NNNAN ze End Address FEXE Bl Cocal Figure 5 80 Edit Address Range dialog box R20UT0455EJ0101 Rev 1 01 AS Page 150 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 3 The address range you have changed will be displayed in the upper pane of the Code Coverage window Code Coverage ES ae e da d Address Range CO Coverage Cl Coverage DFE224 OFESTE j OFElBE OFEZ18 Jooo 1 00 NR Executed Pass _ Address Assembler Source E OFE224 ENTER j FE227 PUSH W p sam mal D FPE22B PUSH W FEZZF J3R A 4 af Figure 5 81 Code Coverage
6. oad Mods heervnte testli cov Os O0000000 Over wrte test cav Ox DO OOO 000 Les 13 cav Ox DIO DCDIOCDOD Figure 5 96 Load Coverage Data dialog box R20UT0455EJ0101 Rev 1 01 AS Page 160 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions Clicking on the Add button opens the Add Coverage Files dialog box shown below Add Coverage Files 3 xl File Mame b Browse Offset Jox000000 Coverage Data Load Mode Ovenarite Merge Cancel Figure 5 97 Add Coverage Files dialog box Use this dialog box to specify a coverage information file you want to load You can also specify a load mode and offset for each file you load The only file extension available is cov An error message will appear if any other file extension is entered The files you add will be listed in the Load Coverage Data dialog box The files will be 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 type you cannot specify an offset 5 11 19 Coverage Information File Load Modes Coverage information file load modes are schematically shown below 1 When Overwrite has been selected Coverage memory Before loading After loading Coverage file Ox 206060 The coverage memory is averwritten with the data ofthe loaded coverage file x2F
7. 00000051 rB2n4 co nz 16h O mara OG 2 1 1 noanaononoononoDn 00 00 00 001 646 960 O0000050 r8256 FCE 16h 0 WA OO RB 3 1 1 ooooooo0oooo0ooo 00 00 00 001 644 010 PB2DP5 ADD W Q 1H 4H FE O0000049 nO0070B OO ib O DW w OF cw 1 1 1 ooooo0o0oo000000 00 00 00 001 649 060 ay 00000043 007e 00 16b 1 rw w 0 PB CU 1 1 ooooooooooooN0oD 00 00 00 001 649 110 Figure 3 32 Trace window bus and disassemble mixed display R20UT0455EJ0101 Rev 1 01 AS Page 58 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 3 Tutorial 5 Furthermore choosing Display Mode gt SRC from the pop up menu you can disassemble and source mixed mode Trace evelse kE Sde alaaa Range 00007515 00000000 Fie Cycle 00000055 FBZBA Time 00200 00 001 549 760 display trace information in a bus Cyole Label Address Data BUS BHE BIU Rt AME Cea an BUSACC Debug EV Bn ano n035 OFB2BA O8CcO 16h O mW B O 1 1 ooooooo000000000 00000034 r8258A CO 16h 1 t ix 1 1 oooooodoooooo0ooOo 0000033 DrB2DA F27b 165 0 WR OO 2 1 1 ooooooo0oooo0ooo gorke G 64 o FB2DA EXITD 00000077 main rBzZp pc 1009 16b O WR OF CW 32 1 1 oo00o00000000000 00000021 rB2DE OGSA 165 0 IW R GO 4 1 1 oo00o00000000000 00000020 OO06EO 0717 18b U Ww R 0 4 1 1 DO00R00000000000 00000023 UDDSED 17 lob 1 L 4 1 1 ooooo0o00o000000 00000028
8. 2 3 Connecting the MCU Unit to and Disconnecting it 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 ROE521500MCUOO Push the MCU unit down to check it is attached properly E100 emulator main unit ROEO001000EMUOO Disconnecting Figure 2 3 Connecting the MCU Unit to and Disconnecting it from the E100 Emulator Main Unit N CAUTION Note on Connecting the MCU Unit to the E100 Emulator Main Unit Always shut OFF power when connecting the MCU unit to the EI00 emulator main unit Otherwise internal circuits may be damaged R20UT0455EJ0101 Rev 1 01 AS Page 26 of 228 Dec 16 2011 RENES ROE521500MCUOO0 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 2 4 Connecting the host machine R20UT0455EJ0101 Rev 1 01 AS Page 27 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 power of 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
9. 98 5 5 2 Selecting the Items to Be Displayed cccccccsseseeecceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeesssueaseeeeeeessssaageeeeenes 99 5 6 Using Software Breakpoints c ccccssseeceececcscessseeeeeeesecccesseeeenccsccesseeceeeeseaceeseeseeeeessscceseeneesaeeessscceeseeeeess 100 5 6 1 Using Software Breakpoints ccccccccsssssseecceeeeeeeeeesseceeeeeeseeeesseeeeeeeeueeeeeeeeeesseueaaeeeeeeeessaaasess 100 5 6 2 Adding Removing Software Breakpoints esses 100 5 6 3 Enabling Disabling Software BreakpoOints ccccccceeececcecceseeeseeeceeeeeeeeeeseeeeeeeeeeseeeeeeeeeeessaaaaeses 101 R20UT0455EJ0101 Rev 1 01 RENESAS Page 10 of 228 Dec 16 2011 ROE521500MCUOO User s Manual Contents SNAM iem m m m T m 103 5 7 1 Sem cR t m mU UT 103 5 7 2 Adang EVel eee E A O E E E TT 104 5 7 3 Herovinid VS NG ermenin EE a E aE Un snp M nU NNSUnU M TAREE EEEN SEE OEREN RS 109 5 7 4 Registering Events e sivwaervnssnecndenaneeawvatdiooleiaenimannshinedsdueniesaedeatwucueuaies 111 5 7 5 Entering Events Each Time or Reusing EVenitt cccccccseeeceeeeeeeeeeeeeeaeeeeeeeeeaaeeeeeesaaeeesessaaees 113 5 7 6 PATON EN EVN eeann cee tua EAER a E ROEE ETE EEE 114 5 9 Selling Hardware Break COMGINONS assascdtiaideum aveces oan asta a E a ania a E 115 5 8 1 Setting Hardware Break Condlillonis iiio ertet tees Riad cue gv au ain etos o Fa cuu o Vu a Eu Ru 115 5 8 2 oetung Hardware Break Ons ienseeeraekalasudtodn
10. BreakPoint Figure 5 39 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 the 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 R20UT0455EJ0101 Rev 1 01 AS Page 113 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functions 5 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 is 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 Wi Hardware Break Hardware Break OR man Function Ladd Delete Enable Disable Event used 1 Free15 Detal Registered events Figure 5 40 Applying the setting R20UT0455EJ0101 Rev 1 01 AS Page 114 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 8 Setting
11. Performance overflow Healtime profile overflow Trace memory overflow Jw Task stack access violation OS dispatch Checked items will display warning in a dialog balloon Cancel Help Do not show this dialog box again Figure 5 4 Configuration properties dialog box Exception Warning page The Violation of access protection Read from uninitialized memory and Stack access violation checkboxes are selected by default When a load module including OS has been downloaded the Task stack access violation checkbox is also selected by default Other items are not selected If you deselect a checkbox this item will be shown as in the Status window R20UT0455EJ0101 Rev 1 01 AS Page 86 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 1 6 Showing Progress in Boot up Processing You can confirm the progress of boot up processing by checking the Connecting dialog box 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 Setting of MCU signal latch timing in Selling of register data only for tool Selling of monitor CPU space data Setting of target MCL space data Setting af debugging information Setting of emulator generation cl
12. ccccceeeceeeceeeeeeeeeaeeseeeeeeeeeseeeesseeeeeeeeeaas 29 2 6 2 Turning the Power ON and OFF ssssssssesssseeeen eene n nan nnns sna n nnns nnne nn 29 ANA Se ECR ENTIER ETT CDU RERRETEN 30 2 6 SelOClING thie GIOCK SUDDLY srei EE ERa T EAE a a 31 2 8 1 ork OE NIENTE T 31 2 8 2 Using an Internal Oscillator Circuit BOard cccccccscececccceeeeeaeeeseeeeeeeaeesseeceeeeesseeeeeeeeeeesessaaaaaees 32 2 8 3 Using the Oscillator Circuit on the User SYStOM cccccccccsseeseeeeeeeeeeeaeeeeseeeeeseeeaeeeseeeeeessaeaseses 33 2 8 4 Using the Internal Generator Circuit cccccccccceecccseeseeeceeeeceeeeeeeceeeeeesueeseeceeeeesseeaseeeeeeeeessaaaaases 33 2 9 Connecting the User System sssssssssesisssssseseeee nennen nenne nnne nsns E ENA sias aan seen n sri nnns anne rens 34 2 9 1 Connecting to a 48 pin 0 5mm Pitch Foot Pattern ccccccccccccsssseeeeeeeeceeeeeeceeeeeeseeeeeeeeeeeeesaaas 35 2 9 2 Connecting to a 64 pin 0 5mm Pitch Foot Pattern ecccccccccsssssseceeeeseeeeeeeeeeeeesseeeeeeeeeeeeesaaas 36 CIIM 37 S gli cols dee pP m ee ee E eee E 37 3 2 Starting the High performance Embedded Workshop cccccccccceseeeeeeeeeeseeesaeeeceeeeeeeeeeeeeesseeeeeesesesseeees 38 I ONIN UNIO ME EMA O NER m T EE 38 3 4 Downloading the Tutorial PEOGFAITI uu incite taie erit nna ient nae nno etn tree aaia niente a dee 39 3
13. 000046 r 0o04 004e FB251 gap aap 2 oo00045 OF62 60 7 t 000050 OF62 70 g CharBuf char g IntBuf amp Ox FF pagi rFBE27D 1 000052 000053 change long a Figure 5 58 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 pop up 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 viewing a bus and disassemble mixed display choose Display Modes gt DIS from the pop up menu again E VE wSEXzuegmES 5b Go Range 00007515 nnnnnnnrn File Cycle 00000105 Address DFB2DO Time 00 00 00 001 649 150 Cycle Label Address Data BUS BHE BIU R W RWI CPU QN BUSACO Debug EV ELG ELCOVLAE TimeSteamp h m s ms us na 00000105 UFBZDDU 7367 16b IN R t RB 3 1 1 pBoopgpnappapnpaOonOODDU DOs00s00 BET 648 150 00000104 0006D E 16h DW R Ba l 1 gagaagaaaaagaaaadu 00 00 00 001 649 200 FBSZCF Moy 20 41 00000103 D00DEDE 16h 1 O0000102 FBZDPZ 16h IM o0000101 0006kg 16h DW R 0 E r8znpi MOV O2H AO U0ZH A1 00000100 000705 16b DW W CI oo000099 gag706 16h DW mW REB
14. 1 guuuuiusli 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 whole Register Cancel Figure 3 9 Set Value dialog box PC R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 44 of 228 ROE521500MCUOO User s Manual 3 Tutorial 3 9 Referencing Symbols The Label window permits you to display the symbol information included in a module Choose Symbols gt Label from the View menu or click the Label toolbar button The Label window shown below will be displayed Use this window to look at the symbol information included in a module OO0400 SB DOC SOL pool OO0406 memt 000414 og IntBuf OO0416 mnext DOE S 14 maize OOUU41E g CharBut DODT IE __ stack top OOUALF istack top DODLA Z EI heap area OFeO14 dummy int OFSO1A __brk OFs020 int3 OFS026 timer ba OFs0ec __ timer b4 OFsOs2 _ timer b3 0FS038 int x k Figure 3 10 Label window R20UT0455EJ0101 Rev 1 01 AS Page 45 of 228 Dec 16 2011 RENES ROE521500MCUOO 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 t
15. 00000012 00000011 O0000010 00000005 00000004 O000000T D0000006 DOU000005 o0000004 a 000003 00000002 O0000001 oooo0000 Label Addre FFFE OFFFES OFFFES OFFFEG OFFFE6 FEFE S OFFFES6 FPFFEG OFFPES OFFFE6 DFFPER FFFEb FFFE piris orige oono44 oon044 Da 00 f 02 z Dz a U02 D2 maf 07 Z 1Z 02 Ores rss5 3353 5353 Br art 165 1bb 1bb 165 ib ib 185b 15h 16h 15b l amp b 16h l amp hb 18b 165 165 16b i c c O C H HPH H 4 jr HHH Range 00007515 00000000 SS objet ET Bv nv eel cv v pusAv hebr Ev DB DE Option FE D P PB Fab pe Pb de PI Ge ea Bea Eee D DB BS Poe OrPOrPrrrrreeFPrePerer Ei 1 E oBL LB LE L iL x xL jii a C c D C D B d ee ER ERE x nogaoagogaocaoga6 aoagacaogo ooo oooooooooooooooO poanaopaoagoaOOOOO ponaonoaoocanoO00 DogacaoooonOOO00n DonocaooaoDoOO6n ponabonpoboaOGOOOOOD oo0ooo0000000000 ooo0od0000b000000 opooobo0000000000 mimmin imamin miaa acgaocagonacaonaon ooooooo0oooo0o00 aogacaogoacoaaao ponoonaoocOO0OOO0 ooooo0000o000000 ELCOVL Y Timestamp oo Oo i OO 0p t t OO z Da oo OO oO O05 OO OO OO oo oo oo 00 00 00 0a OO 0 na nu O00 oo oo 00 D 00 oo a a au il 0g 0g aug oo an ad au a au au oo him
16. 1 408 588 6130 Renesas Hectronics Canada Limited 1101 Nicholson Foad Newmarket Ontario L3Y 9C3 Canada Tel 1 905 898 5444 Fax 1 905 898 3220 Renesas Hectronics Europe Limited Dukes Meadow Millboard Foad Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 585 100 Fax 44 1628 585 900 Renesas Hectronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel 49 211 65030 Fax 49 211 6503 1327 Renesas Hectronics China Co Ltd 7th Foor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 PRChina Tel 86 10 8235 1 155 Fax 86 10 8235 7679 Renesas Hectronics Shanghai Co Ltd Unit 204 205 AZIA Center No 1233 Lujiazui Ring Fd Pudong District Snanghai 200120 China Tel 86 21 5877 1818 Fax 86 21 6887 7858 7898 Renesas Hectronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 852 2886 9318 Fax 852 2886 9022 9044 Renesas Hectronics Taiwan Co Ltd 7E No 363 Fu Shing North Maad Taipei Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Hectronics Singapore Pte Ltd 1 harbourFront Avenue 06 10 keppel Bay Tower Singapore 098632 Tel 65 6213 0200 Fax 65 6278 8001 Renesas Hectronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jin Persiaran Barat 46050 Petaling Jaya Selangor Darul Ensan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955
17. 3 Problem R20UT0455EJ0101 Rev 1 01 AS Page 213 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications 7 Hardware Specifications This chapter describes specifications of the MCU unit 7 1 Target MCU Specifications Table 7 1 lists the specifications of target MCUs which can be debugged with the MCU unit Table 7 1 Specifications of target MCUs for the ROE521500MCUOO Applicable MCU R8C Family R8C 5x Series MCUs Evaluation MCU R5E2E500NFP ROM size 4KB 128KB RAM size 20KB Applicable MCU mode Single chip mode Maximum ROM RAM capacity 1 Internal flash ROM 4KB 128KB 07000h 07FFFh 08000h 27FFFh 2 Internal RAM 20 KB 00400h 053FFh Power supply voltage Vcc 2 7 to 5 5V Operating voltage frequency Power supply voltage 2 7 to 5 5 V 32MHz R20UT0455EJ0101 Rev 1 01 AS Page 214 of 228 Dec 16 2011 RENES ROE521500MCUOO0 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 the MCU unit be careful about the following precautions 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 Oscillator circuit I
18. 7 CD m n lt a ROES21500MCU00 User s Manual Supported Devices R8C Family R8C 5x Series All information contained in these materials including products and product specifications represents information on the product at the time of publication and is subject to change by Renesas Electronics Corporation without notice Please review the latest information published by Renesas Electronics Corporation through various means including the Renesas Electronics Corporation website http www renesas com Renesas Electronics Rev 1 04 Dec 2011 www renesas com 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents c
19. 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 Ds can be registered In that case deselect the check boxes of unnecessary task IDs R20UT0455EJ0101 Rev 1 01 AS Page 184 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 13 9 Saving Task Profile Measurement Tasks You can 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 Save 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 rpf will automatically be added as the file extension 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 You can 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 TEI _ m mm m imr wrannn r 1 y mye I L T m Cam am a SaveData00i rpf a SaveDataloz rpf File name 5aveD ata l rpt Files of type FiealProfile Files rpf Cancel Ze Figure 5 134 Open dialo
20. Figure 3 22 Editor window Step Out The data of the variable a displayed in the Watch window will be sorted in ascending order R20UT0455EJ0101 Rev 1 01 AS Page 51 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 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 i5 ale 14 cid main ivoid j x i5 FB2DbC 1 16 Feebe while 41 1 F amp ZEU rurorialr 16 F amp ZES H 18 FR2ES 20 21 void tutorial woid da FG2E6 ad lang a 10 24 long j 25 int i 26 Struct Sample far p sam at 256 FGSGZES p same mallac siseockistreuct Sample 29 F Z F init p sam 30 31 FeI09 for i70 1410 i Jf 32 F314 j rana m 33 FB8320 ifi4 D Watch um NEN 3 34 FH325 j7 i 33 J 36 FSGJZE ali j a7 r Os000 be aig the d l ong 1 111 C urrent nudi once zog ie R Ox ODD amp eS F aigned Long 4n F 1 Ox0006e9 signed long 41 F8352 S Xp sam a20 a 0 R 2 Ox0006ed signed long Fe phil qoi E R 1 OxOO06f1 P signed long i p z m z2 m8 i aa Ferae P Dae STs R 4 x DDefS sig
21. R20UT0455EJ0101 Rev 1 01 AS Page 124 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Posible PP 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 exceptional events The OR condition other condition and the detection of exceptional 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 Exceptional events gt V Delay value Trace acquisition halted Figure 5 49 Outline of the trace
22. R20UT0455EJ0101 Rev 1 01 AS Page 152 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 11 8 Code Coverage in a Source File The Source sheet shows the code coverage information CO coverage and C1 coverage acquired 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 includes an area that has no coverage memory allocated can be specified However the coverage information on areas that have no coverage memory allocated is not updated Address lines where coverage information is not updated are displayed in gray An example display is shown below Code Coverage l Xx E me Bf NT va da tA 100 iii Conditional Br sort c sort o7 a 71 sort c change O EE OFEO14 ENTER OFEOL MOW W p sam IIFEU18 MOV Ti OFEOLB MOV Wi IFEU1E MOV Ti F Address Range j Source Figure 5 85 Code Coverage window source file specification The Code Coverage window is horizontally divided into two by the splitter The upper pane shows the address ranges to be measured file and function names CO coverage and C1 coverage Table 5 31 Contents shown in the upper pane of the Code Coverage window File File name Function CO Coverage CO coverage in percentage and graph C1 Coverage C1 coverage in percentage and graph The lower pane shows detailed informa
23. click on the Add pattern button The new setting will be added as the last line in the Output pattern list Up to 256 patterns can be added Double clicking on a line in the Output pattern list reflects the information on the line as the Output setting The order of the lines patterns can be changed by dragging and dropping To delete a pattern select the line and click on the Delete button 5 16 4 Setting for Output through Trigger Pins 20 to 16 The Event output page allows manual setting for output through trigger pins 20 to 16 BS Trizeer Output Conditions Manual output Event output Default setting No 23 Breakpoint is encountered No 2 Tracepoint is encountered No 21 Capture or Do Not Capture of trace data Trigger output event a Descriptions Ae ee Comment Address 000000 size WORD Tvpe Trigger Interrupt generate Address 000000 Registered events Help fpi Close E Figure 5 156 Trigger Output Conditions dialog box Event output page 1 Default setting Default setting indicates the trigger output conditions on pins 23 to 21 These pins are always enabled Signals are output through these pins when the respective conditions are satisfied Table 5 47 gives details on how the conditions control output Table 5 47 Trigger Output Conditions and Output No Condition fon aaoo A breakpoint is Continued output of a high level signal
24. 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 re opened by selecting Emulator gt System from the Setup menu after the emulator has been booted up Some options in this dialog 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 the progress of boot up processing R20UT0455EJ0101 Rev 1 01 AS Page 80 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Devre Group Device REF215W5E Bis 32k Poit mapping Control amp 4pin Comm ricsi Setting SE e E100 KAKI Refresh Start booting up on successful completion of selF checking Cancel Hale Da nct show this didog bow again Figure 5 1 Device setting dialog box Device page The target MCU you have set here cannot be changed after
25. 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 is 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 Main Emulator C Uses Generate 1 MHz Sub Emulator C Uses Tngger oe External tigger cable EXT O31 INPUT C Du BET Input biogerlevel C extast cmos CERTOS TIL Switching function Code coverage C Data coverage C Resl tine polle Code coverage mode CO coverage C CU C1 coverage Debug funchon Debug the program usmg the CPU ewe Mode Mask the terminal RESET Timer Function Stops all imer counts while the user program has hated ok Comet Hob Do mot show thi 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 cl
26. 5 10 5 Clearing Performance Measurement Conditions cccccccsseccecceeeceeceeeceeceeeeceseeeseeeeeeeeeessaaees 144 5 10 6 Clearing the Performance Measurement Result cccccceecceceeeeceeeeeeeeceeeeeeseeeeeeeseeeeeesaaeeeeas 144 5 10 7 About the Maximum Measurement Time of Performance cccccceceeeeeeeeeeeeeeeeeeeeeeeaaeeeeeeeees 144 5 11 Acquiring Code Coverage cccccccccccccceeeeeneesesseeeeeeeeeeeeeeeeeeaaaeassausdeeeeeeeeeeeeeeeeeeaeausaadeeeeeeeeeeeeeeeseseenanaaaags 145 5 11 1 Acquiring Code 10 6 0 nennen nennen nnns nnnnenai nnn nn nn nnne nns n neni sinn 145 5 11 2 Opening the Code Coverage Window eeseeessssessessessseeeseennen nennen nnne 145 5 11 3 Allocating Code Coverage Memory Hardware Resource cseeeeceeeseeeeeeeeaeeeeeeeeeaeeeeeeeeaas 146 5 11 4 Code Coverage in an Address RAnge cccccccccccccceceeeeesseseeeeeeeeeeeeeeeeaauaaaasseeeeeeeeeeeeseesaaaaags 148 Sito Adding Address RANGES serseri eR ubUE SEE cdd CodGo wiucta muvc vate a Fus g Vd s 149 S5116 Ghanging Address HOS ceca KON EEUU D Stud Vra CReSs cama ater casas Vect rhum uda Loon FubuRE ONE 150 511 7 Ahemovibg Address Halidebsscamsvnitaesad us oi da ferae C vaga esas d qud uio t onstin omuv cuan utrum rbv da dot KC dun 151 5 11 8 Code Coverage in a Source File ioi atender ya Ez eaa vvie Ee ast vob dux a vu yea ence 153 SM9 Adding Source FIOS sseni bcm dis opua Un aoro a Ma
27. 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 You can specify any of blocks 1 to 8 up to 1 Mbyte each beginning with a 128 Kbyte boundary as profile measurement areas Either contiguous or non contiguous blocks can be assigned With initial settings the profile memory is automatically assigned at addresses in the ROM and RAM areas 2 Automatic function detection When profile memory is assigned at addresses the E100 emulator automatically detects functions included that address range and registers those functions in the window R20UT0455EJ0101 Rev 1 01 AS Page 181 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 13 5 Saving Function Profile Measurement Ranges You can 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 rpf will automatically be added as the file extension 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 6 Loading Function Profile Measurement Ranges You can load a functio
28. Code Coverage rae T E C Coverage Cl Coverage sort c init sort c sort sort c change Executed Pass Address Assembler Source OFEO14 ENTER FEOUT1T MOV W mds OFEO19 MOV Wi OFEOQLIE MOV W FE IE MOV W FE UZ 1 STE W lal bh Address Ranae Source Figure 5 88 Code Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 154 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 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 pane of the Source sheet and while holding it selected choose Delete Range from the pop up menu Code Coverage i GC du File Function CO Coverage ci Coverage sort c init 100 ANNE m 4 Brar sort c sort cR 7 ENS sort c change 05 Add Range Edt Range Delete Range Executed OFEO14 ENTER 1 FEUTT MOV W p sem s 0 OFEOI9 MOV W FEDIB MOV W i FED1E MOV W OFEOZ1 STE W En Source Figure 5 89 Code Coverage window 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 3 xl Delete Source File Al
29. Memory allocation Before data coverage can be measured data coverage memory must be assigned to the target address range 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 this dialog box select Hardware Settings from the pop up menu of the Data Coverage window Allocation of Data Coverage Memory x Allocation of Coverage Memor 00000 OFFFF 1 10000 1FFFF 2 E0000 EFFFF 3 Clear F D D FFFFF 4 All Clear Default Help Cancel Figure 5 103 Allocation of Data Coverage Memory dialog box You can specify any of blocks 1 to 8 up to 512 Kbytes each beginning with a 64 Kbyte boundary as data coverage measurement areas Either contiguous blocks or non contiguous blocks can be assigned With initial settings the coverage memory is automatically assigned at addresses in the ROM and RAM areas R20UT0455EJ0101 Rev 1 01 AS Page 165 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions Pre CUVOT an e car Bre COVeTD age Can p ee NI ed FFOOUU re coverage Can FFFFFF i measured Figure 5 104 Schematic of data coverage memory allocation 2 Changing memory allocation If coverage memory allocation is changed the coverage data acquired from the addresses before being changed is retrieved from co
30. Select the EXT 0 15 INPUT EXT16 31 OUTPUT radio button for External trigger cable Configuration properties f Emulator User Generate 10 MHz C Emulator 0 hain cock divided by 256 External trigger cable C EXT 0 31 INPUT fe Sube OUTPUT EXT O 16 TTL Input trigger level v EXT 31 GMOS C Ev g 91 GMOS Figure 5 153 Configuration properties dialog box System page R20UT0455EJ0101 Rev 1 01 AS Page 204 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functions 5 16 2 Opening the Trigger Output Conditions Dialog Box Choose Event gt Trigger Output Conditions from the View menu or click on the Trigger Output Conditions toolbar button E rieger Output Conditions e he he fe fe fe fe fe AAE o Figure 5 154 Trigger Output Conditions dialog box Note that you cannot open the Trigger Output Conditions dialog box in either of the following cases EXT 0 31 INPUT has been selected on the System page of the Configuration properties dialog box An external trigger cable is not connected R20UT0455EJ0101 Rev 1 01 AS Page 205 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 5 16 3 Manual Setting for Output through Trigger Pins 31 to 24 Make the manual settings for output through trigger pins 31 to 24 on the Manual output page E Trizeer Output Conditions Manual output Event output Current trigger output 31
31. The exceptional event that is not checked on the Exception Warning page of the Configuration Properties dialog box is not shown y x W aming Exception event detection Access protection Addess U0710 Artmbulte VV RITE race memon overflow Figure 5 15 Example of warning display when exceptional events occur R20UT0455EJ0101 Rev 1 01 RENESAS Page 97 of 228 Dec 16 2011 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 5 Periodically Reading Out and Showing the Emulator Status 5 5 1 Periodically Reading Out and Showing the Emulator Information To monitor the changes in emulator information while the program is running or stopped 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 Extended Monitor from the View menu or click the Extended Monitor toolbar button ex 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 1 CPU Clock can be measured only when a user program is being executed 2 The display contents of the status differ depending on products Extended Monitor EI BEN aul E Item Value User System Connection DISCONNECT Disconnect CNN CNN1 CHW User System Power Source DISCONNECT Vcci 0 7 v Vcc2 0 5 wi User System
32. 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 R20UT0455EJ0101 Rev 1 01 AS Page 38 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 to which it is downloaded differ with each microcomputer used Read the strings etc on the screen as suitable for the microcomputer you are using Choose Download from Tutorial x30 of Download modules Zl zl AGS Tutorial ae digg Tutorial E ra C source file HoE fvectar c heap c s E initsct c ae Intprg c resetprg c z zorte NE Tutarial c 5 amp Download modules PEE 5 23 Dependencies Download cstartdel h Download Debug Data Only Initeck A Unload eM resetprg h m sfr amp 2a h Download 4 New Module bes sort h Remove Bee tepedefine h Debug Settings Configure View I Allow Docking Hide Properties Figure 3 2 Download display of the tutorial program R20UT0455EJ0101 Rev 1 01 AS Page 39 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 3 Tutorial 3 4 2 Displaying the Source Program In the High performance Embedded Workshop you can debug a program at
33. 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 R20UT0455EJ0101 Rev 1 01 AS Page 179 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 tasks 5 13 2 Setting Realtime Profile Measurement Modes Choose Set Ranges from the pop up 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 You can measure execution performance one function at a time Realtime Profile iz x BIS AZ s runction address size c rme statistic 2 init UFEO14 237 Z O0 00 00 039 175 980 00 00 00 019 597 980 4 sart UPR1LD 188 00 00 00 464 026 B 7D 00 00 00 242 013 430 2 S change rgisE 92 amp 00 00 00 132 180 050 00 00 00 066 090 020 2 Bain DFEZ21A amp 10 1 00 00 00 001 785 730 Os ENE 00 0
34. 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 69 of 228 Dec 16 2011 R0E521500MCUOO0 User s Manual 4 Preparing to Debug 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 E l 321 x MTEC E100 Emulator 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 1 31 x Target name MTEC E100 Emulate Configuration name Debug M1 6C_E100_ Emulator Detail options Walue Modit Hert gt 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 R20UT0455EJ0101 Rev 1 01 AS Page 70 of 228 Dec 16 2011 RENES ROE5215
35. p sa m 21 p sam 52 p s25m 23 p ss0m 24 p sam 25 o ey Rab Sit Breakpoints iila i 1 H on Wn tr L O 2 a 00O 0O A a a a ta Cu oa a Figure 5 18 Editor window Or you use the method described below to set a breakpoint Select Toggle Breakpoint from the pop up menu or press the F9 key on the keyboard R20UT0455EJ0101 Rev 1 01 Page 100 of 228 44 N SAS Dec 16 2011 ROE521500MCUO0O User s Manual 5 Debugging Functions 3 When a software breakpoint is set a red circle 9 is displayed at the corresponding position in the S W Breakpoints column of the Editor or the Disassembly window init struct Sample p sam p seam 50 0 p 3enr ral O p sam a2z 0 p sam 23 UO p sam s4 D p sam 55 OU pse Dj Si Breakpoints Figure 5 19 Editor window Double clicking one more time removes the breakpoint 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 Place the cursor at the line where a software breakpoint exists and then select Enable Disable Breakpoint from the pop up menu Or press the Ctrl and F9 keys together we sorb c lol x Y E B init struct Sample p sam a Fseocz2 1 10 Fsocs p sam s 0 11 F
36. 1530 Disable Disable Disable Disable Digable Cn s Un 63 amp S j C LO oss C Pu je Figure 5 65 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 pop up menu To redisplay any hidden column select that column from the pop up menu again R20UT0455EJ0101 Rev 1 01 AS Page 140 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions The contents displayed in this window are listed below Table 5 23 Columns and contents No Numbers assigned to 1 8 measurement sections set in the Performance Analysis Conditions dialog box Click Settings on the pop up menu to open the Performance Analysis Conditions dialog box 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 h m s ms us ns Shows the number of times measured Statistic Shows a ratio of cumulative execution time relative to Go Break execution time Ratio calculation formula Cumulative exec
37. 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 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 ini x Evenb Events Type Descriptions Count TaskID Comment F Address 00000 BreakPoint F Address 00000
38. 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 the emulator ON and OFF 2 USB cable connector This is a connector for connecting the USB cable of the emulator 3 Power connector This is a connector for connecting the DC cable of the AC power adapter of the emulator 4 External trigger connector This is a connector to connect the external trigger cable of the emulator R20UT0455EJ0101 Rev 1 01 AS Page 18 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 5 System Status LEDs The system status LEDs indicate the emulator E100 s power supply operating state of firmware etc Table 1 3 lists the definitions of each system status LED Table 1 3 Definitions of the system status LEDs POWER ON Emulator system power is turned ON LOom Emulator system power is turned OFF SAFE Emulator system is operating normally a Flashing Emulator system cannot communicate with the host machine Flashing The self checking is in progress even 2 seen OFF Emulator system is not operating normally system status error 6 Target Status LEDs The target status LEDs ind
39. 30 29 28 2 26 25 24 Output contents Mutpuk trigger settings Si aU 2S am ar ao 2 25 us BRAR Eo Add pattern Output pattern Delete Event used 0 Free 16 Detail Registered events Save Load Help fmi v Figure 5 155 Trigger Output Conditions dialog box Manual output page 1 Display of output states Output contents Output contents indicates the current signal levels on trigger pins 31 to 24 H High L Low 2 Output setting 5 Debugging Functions Output setting indicates the levels of signals to be output through trigger pins 31 to 24 Clicking on one of these buttons changes the state of the corresponding pin in the following order Lx s J L Low H High The previous setting is retained When the Trigger Output Conditions dialog box is opened the states of all signals in the Output setting section are always indicated as whether the previous setting was L or H 3 Starting output of signals Click on the Output button to validate the settings and start output of signals R20UT0455EJ0101 Rev 1 01 Dec 16 2011 44 NE SAS Page 206 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions 4 Saving output patterns You can save the settings on trigger pins 31 to 24 and reflect a saved setting as the Output setting This simplifies operations After making settings for an Output setting
40. 9510 Renesas Hectronics Korea Co Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2011 Renesas Electronics Corporation and Renesas Solutions Corp All rights reserved Colophon 1 0 ROE521500MCUOO User s Manual QE NESAS R20UT0455EJ0101 Renesas Electronics Corporation
41. ADD W G FO A0 00 00 00 001 651 000 00000066 Orgect T3B5TC Mov W G 4H FBE A1 20 00 00 001 651 100 00000063 OFBZCA E915 SHL W 2H AL O0 00 00 001 651 250 O00000060 OFezce ALBSFE ADD W G ZH FE A1 00 00 00 001 651 400 O0000057 O FBZCP T3651 Mov WW G 420 A1 00 00 00 001 651 550 O0000054 FBZD1l TAEI BOV Ws G DOzH A0 D2H A amp 1 00 00 00 001 631 700 op0000049 r amp zn5 CHIBFC ADD g 1H 4H FB 00 00 00 001 651 950 00000045 OFG2 D3 FEDS JME E F Z2B1H 00 00 00 001 652 150 00000040 O rBzBi T7TBBFCDAOD CME W G Gj 4000AH 4H FE 00 00 00 001 652 400 O0000036 rBzB TDCAZ3 JGE F 2DAH Bog 00 00 001 652 500 00000034 OrB8zpA TDF EXITD 00 00 00 001 652 800 Figure 5 57 Trace window R20UT0455EJ0101 Rev 1 01 AS Page 132 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 3 Source Display Mode From the pop up menu choose Display Modes gt SRC This display mode allows you to inspect the source program s execution path The execution path can be verified by stepping through the source within trace data forward or backward from the current trace cycle Lins Addres Mow Source a oo0ds7 OFG1EFE q IntHuf 4 pangs PBiri if 8 3 2a 3 g amp p 1 000029 rB214 t alj n Da OF6223 alj aljtgap 000041 OFre23c pogi DODO43 000044 oo0045
42. B ROE53036ACFK40 Za amp 3 HQPACKO64SD YQ GUIDE x4 not included e e F FLASH version These corners lo MCU etc are not round NQPACK064SD ND J lt lt l 1 64 pin 0 5mm pitch foot pattern Pd eta 7 No 1 pin x These four products are User system available in one package Figure 2 12 Connecting to a 64 pin 0 5mm pitch foot pattern N 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 ROE53036ACFKAO are guaranteed for only 50 insertion removal iterations For purchasing the HQPACKO64SD contact the following Tokyo Eletech Corporation http www tetc co jp e index htm R20UT0455EJ0101 Rev 1 01 AS Page 36 of 228 Dec 16 2011 RENES ROE521500MCUO0 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
43. ELG ELCOVLAP TimeStemp h m s 00000016 rFFE amp 00 lbh 1 DE R 1 2 1 1 naonaoGngonoonon OOn 00 00 00 001 650 710 O0000015 OPEFEFG 2 18h 1 DBA 0 2 1 1 ooooooooooooOOoOo 00 00 00 001 650 760 00000014 OFEFaES O2 ib 1 1 2 1 1 oooooooooooooooo 00 00 00 001 6350 810 O0000013 OFFFES 2 ib i 1 2 1 1 DogoGOO0ODODOO0D0 00 00 00 001 650 860 O0000012 OFFFEG 2 lobi 1 4 1 1 ooooooooooooNooD 00 00 00 001 650 910 00000011 OFRFFE6 2 16 i 1 4i 1 1 ooooooooooooOoOOoo 00 00 00 001 650 960 00000010 rveFEG z ib 1 1 42i 1 1 oooooooOoOooooOooo 00 00 00 001 6531 010 0000000 UFFFEG z lb i 1 i 1 1 DOOOR0O00R000000 00 00 00 001 651 060 000000038 OPFFE6 02 lob 1 Ll 4 l1 1 ooooo0o00o000000 00 00 00 001 651 110 0000000T UFETE amp UZ2 lel I ZZ 1 l oo00o00000000000 00 00 00 001 651 160 00000006 FFPE amp D2 ls 1 1 Z 1 1 nonapo onoDDODODU 00 00 00 001 651 710 o0000005 OPEPE 02 lb i 1 1 1 n onoononoDnOnODU 00 00 00 001 651 260 O0000004 PFFE amp 2 lbh 1 1 223 1 aonoaononoaOnOnO On 00 00 00 001 651 310 O0000003 OOp046 OF85 16h D TW w 1 2 1 0 ooooooooooooOooOo 00 00 00 001 651 360 O0000002 OOn046 OFS 15b O DW W 0 2 1 pogacgon DODOODODU 00 00 00 001 651 410 O0000001 OOp044 3353 16b O DW ww 1 23 1 oo0oooooooooOoooo 00 00 00 001 651 460 o
44. ES Record condition amp all Capture Do not capture IW Step execution is recorded Detail Event in use 0 Event used Free 16 Detail Registered events Save Load Help Apply E Figure 5 142 Trace conditions dialog box R20UT0455EJ0101 Rev 1 01 AS Page 192 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functions 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 Figure 5 143 Trace conditions dialog box 3 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 R20UT0455EJ0101 Rev 1 01 Page 193 of 228 Dec 16 2011 RENESAS ROE521500MCUO00 User s Manual 5 Debugging Functions 5 14 4 Detecting Initialization Omitted Reading from a non initialized area 1 e cases of reading from a memory location to which nothing has been written can be detected as 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 1s 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 Compare Whether accessed for read before
45. Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if you have any other
46. Hardware Break Conditions 5 8 14 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 i e a hardware breakpoint is encountered Up to 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 exceptional events The OR condition other condition and the detection of exceptional 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 Exceptional events gt Delay value Break Figure 5 41 Outline of the hardware break R20UT0455EJ0101 Rev 1 01 RENESAS Page 115 of 228 Dec 16 2011 ROE521500MCUO00 User s Manual 5 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 reen
47. Memory window 2 Access Data Clear or Error Detection Data Clear from the RAM Monitor window 3 Enabling automatic update from the Watch window 4 Checking memory contents from the Command line window Note on Accessing Addresses 00000h and 00001 h With the R8C Family MCUs when a maskable interrupt is generated the interrupt data interrupt number and interrupt request level 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 223 of 228 Dec 16 2011 ROE521500MCUO0 User s Manual 8 Maintenance and Warranty 8 Maintenance and Warranty This chapter covers basic maintenance warranty information provisions for repair and the procedures for requesting a repair 8 1 User Registration When you purchase our product be sure register as a user For us
48. O0000013 OFFFES 2 ib 1 Ll 1i 1 1 oooooooooOnOOOOoO 00 00 00 001 650 860 O0000012 rrFEG 02 ib 1 1 2 1 1 ooooooooooooOooo 00 00 00 001 650 910 00000011 FEFES Uz libi 1 1 1 oo00o00000000000 00 00 00 001 630 960 00000010 TEFES 02 16h 1 1 4i 1 1 oo00o00000000000 00 00 00 001 6531 010 0000000 PFFEG Uz2 16h 1 1 4i 1 1 oo00000000000000 00 00 00 001 651 060 00000008 UFFTEB 02 lb 1 L i4 1 1 ooo00o0000o000000 00 00 00 001 651 110 O0000007 OFFFEG U2 165b 1 1 1 1 DonopnonaponDonODU 00 00 00 001 651 160 00000006 OFFFES 02 l amp b 1 1 1 1 DoDODDODOODODODU 00 00 00 001 651 210 o0000005 FFFE 02 lb 1 1 82 1 1 DonoaononoonOnODU 00 00 00 001 651 260 o0000004 OFEFE6 2 16h i 1 823 1 nonaononoononaOn 00 00 00 001 651 310 O0000003 O0p046 OF85 16h D DW W 1 2 1 0 oooooooo0ooo0o0ooo0 00 00 00 001 651 360 O0000002 OOnp046 OF8S 16b D WwW 0 2 1 g oooooooooOnOoOOoOoO 00 00 00 001 651 410 O0000001 COn044 3353 16b PW w 1 Z 1 DogOGO0nO0OOOOOODD 00 00 00 001 651 460 oo0o0000 OOn044 8353 16b 0 rw w 0 Z 1 oooooooo0ooo0000 00 00 00 001 651 510 zi Figure 5 44 Trace window R20UT0455EJ0101 Rev 1 01 AS Page 119 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions The following items of information are displayed This applies for b
49. Prepago DE oio EET 68 4 1 Starting the High performance Embedded Workshop cccccccseeseeeeeeeeeeeeeceeeeeeeesaaaeceeeeseeseeesessaeseeeeneas 68 4 2 Creating a New Workspace Toolchain Unused ccccccseeeeeeeeceeeeeeeeeeeeeeeeeeseseeeesseeueeeeessaeseeeeessageeeeeeeas 69 4 3 Creating a New Workspace Toolchain Used cccccceeeeeeecceeeeeeeeeeeeeeeeeeeaaeeeeeeeeeeessaaaeeseceeeeessaaeeeeeeseeeesaaas 71 4 4 Opening an Existing Workspace ccccccssseeeeccceeeeeeccceusececccseueeeecccseusececseuaececeseuaeeeeessauseceesssageeseesssgeesessags 74 45 Connecting MG EID ALON sooocurseiacar iden dcen i eta oiee aside sd rins soos tare aiaei aa iai 75 4 5 1 Connecting the Emulator s2secceecacateccaacedesesecevssenctad oon erai lt anceccepsiesend riva ce s eedan odo tuta cetus ut ebsfucor estia oes 75 4 5 2 Reconnecting the Emulator RTT um 75 4 6 Disconnecting the Emulator eeesssssssssssssseseeee eene eene nnne nennen nnns nhanh n essa nnn nennen nnn 76 4 6 1 DISCONNECTING the EMULALOS cece ccseeececceeeeecseeeecaeeeeeeceeeeesaaueeeeeeaeeeessaueeesageeessaeeeesseeeessneeeeees 76 4 7 Quitting the High performance Embedded Workshop ccccssssessssseeeeeeeeceeeeceeeaaeeesseseeeeceeeeeeeeeeesseaaegsens 76 4 8 Setting Up the Debug ccc eeccccccccessseeeeeeeeeeeeeeseeeeeeeeeeeaeeeeeeeeeeeeesaeeaeeeeeeesesseeeeeeeeeeesseaeeeeeeeeeeeeessaeaeeeeeeeetsa
50. USB device and USB hub is not guaranteed for the USB interface 3 The 64 bit editions of Windows XP are not supported 4 The 64 bit editions of Windows Vista are not supported R20UT0455EJ0101 Rev 1 01 AS Page 22 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup 2 Setup This chapter describes the preparation for using the MCU unit 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 in Case of an Error page 209 1 Check the package components Refer to 1 1 Package Components page 16 2 User registration Refer to User Registration page 14 3 Install the included software etc Install them from the included CD ROM Connect the MCU unit to the E100 main Refer to 2 3 Connecting the MCU Unit to and Disconnecting it unit from the E100 Emulator Main Unit page 26 Connect the USB interface connector of the emulator and the USB Connect the host machine i port of the host machine 6 Connect the emulator power supply Connect an emulator power supply to the power connector UA Turn on the power supply Turn ON the power to the emulator Check that the system status LEDs are lighting When the user 8 Check
51. be sure the repeat mode is selected and that the source and destination registers are mapped to a free RAM area etc where they can be accessed without affecting the system 3 Set bit 7 TRBIE of TRBIR register to 1 to enable the timer RB2 interrupt Note on the Pin Assignment Select Register PMCSEL When the 48 pin product is selected the values for the pin assignment select bit are different between the R8C 5x Group actual MCU and this product R8C 5x Group This product actual MCU 48 pin product standard pin assignment PMCSEL 000b PMCSEL 011b 48 pin product communication function priority pin assignment PMCSEL 001b PMCSEL 100b Note on Power Supply Voltage of the User System To use this product the power supply voltage range of the user system must be 2 7 V Vcc 5 5 V A voltage of 2 7 V or lower makes the emulator uncontrollable Note on RAM Size With this product IKB or more addresses 400h 7FFh are assigned to the internal RAM When emulating a target MCU whose RAM size is 512 bytes addresses 400h 5FFh as this product assigned addresses 600h 7FFh to the RAM there is a difference from the actual MCU When emulating a target MCU whose RAM size is IKB or more there is no difference in RAM size between this product and the actual MCU 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 Comm
52. column Table 5 42 Details on each column Block number Task ID Task ID entry address Number of times a task is called Cumulative time of task execution The timestamp is displayed in the form shown below Hours minutes seconds milliseconds microseconds nanoseconds Statistic 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 R20UT0455EJ0101 Rev 1 01 AS Page 183 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 13 8 Setting Task Profile Measurement Ranges Choose Set Range from the pop up 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 x Realtime Profile Mode EM List Task List Task ID Entry Address 0 M 3T HB3D 8 of Idle 1 Iz 1 mam 1 Ie 2 task 1 3 _task 1 tasks 1 tasks 1 Enable All T ask tasky 1 IL Disable All Task Figure 5 133 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
53. debug functions listed below have no effect a Trace function b Break related functions c RAM monitor function When a specified routine is 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 is 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 accesses attempted after a specified routine is executed are reflected MCU peripheral Operation of the MCU peripheral functions performed after a specified routine is executed functions are continued 5 15 5 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 t
54. 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 120 of 228 Dec 16 2011 ROE521500MCUO00 User s Manual 5 Debugging Functions Shows the module number of the linked module destination in event link CAUTION is displayed with M16C 64 Group M16C 64A Group M16C 65 Group MI6C 50 Series and R8C 3x Series MCUs ELCOVLAP Shows if there is an overlap in event link CAUTION is displayed with M16C 64 Group M16C 64A Group M16C 65 Group M16C 50 Series and R8C 3x Series MCUs TimeStamp Shows an elapsed time since the target program started nd Each time the user program starts running the timestamp 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 EXT 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 the column you want to hide from the pop up menu 5 9 3 Setting Trace Information Acquisition Conditions The trace buffer is limited
55. downloading Violation of task stack access X W Automabicaly get address areas at downloading Address amas SE Byte Block 00000 FFF TasklD Label Start Address End Address mu 1 main STR TASKT ODODOAAA 00000469 2Ltak1 STE TASE2 ODODDAEA 00000489 Update 3 task2 STK TA SK3 UODODDASA 00000449 hdd 4 tasks STK TA SkK4 DDDDOSAS DOODOACS 5 tasks STR TASKS DODODDACA DOCCDLAES Wadi B tasks STE_TASKE OO0004E4 CODDCBOS T taku STK TA amp SK QO000804 00000829 B tasks STK TASKS 00000824 00000B43 Dae 9 Laskx STRE TASKS QO0008464 00000869 Delete all 10 _tasks STR TASKTO OO000864 00000889 11 tasku STK TA amp SKTT 00000334 DDOOUBAS 12 tasku STER TASK12 QO000844 0000509 DK 13 task STK TA amp SK13 QOU00BC4 COOD BES 14 taskx STR TASKT4 ODOD SEA OODDUCOS Cancel 15 tasku Slk TA amp SETS QO000C04 DODODCZ3 Help 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 access condition X T ask ID 0002 Start Address 00000488 zl End Address DOODDAEB El OF Cancel Figure 5 149 Task stack access condition di
56. e j H UnODDffs6 i x ndO07Ud signed longi H UO0a O0x000715 signed int s p sam Ox000az8 Ux DOT711 struct Sample Figure 3 18 Locals window Click the mark shown to the left of the array a in the Locals window to display the elements comprising the array a Look at the elements of the array a 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 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 R20UT0455EJ0101 Rev 1 01 AS Page 49 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 3 Tutorial 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 e amp l Source a init struct Sample p sam 9 FSGO0CZ 1 10 Fsocs p sam
57. 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 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 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 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 pn C All I Step execution is recorded Ee Between two events Detail Event in use Figure 5 53 Record condition group box Then click the Detail button A page in which you can set events will be displayed R20UT0455EJ0101 Rev 1 01 AS Page 129 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functio
58. 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 displayed 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 R20UT0455EJ0101 Rev 1 01 AS Page 178 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions e Relationship between Go execution start address and break address within a measurement range and th
59. 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 the right mouse button The dialog box shown below will be displayed Instant Watch a 1 Ox0006e5 signed long 1U Figure 3 13 Instant Watch dialog box Click the Add button to add a variable to the Watch window RR OM AKK um ubue Howe um Cf Address it OxOO00besS Current Scope AL E watchs 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 pop up menu The dialog box shown below will be displayed Add watch x Variable or expression LIE o Cad Figure 3 15 Add Watch dialog box R20UT0455EJ0101 Rev 1 01 AS Page 47 of 228 Dec 16 2011 RENES ROE521500MCUOO 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 0x000715 Os0006e5 Alb wrateha A watch A Watcha A Watch signed signed long 10 inti Current Scope Current Scope 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
60. point R20UT0455EJ0101 Rev 1 01 AS Page 125 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 is 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 Trace Made CET Fill around TP condition and combination setting v QR condition Eventim use 0 Detail Other conditions Trace anipcaccumulation E zr Fa 5 Event in use 0 Detail Sce Total O Event Exception Exceptional Delayicycle pail Pf M events Record condition al C Capture C Donotcapture Step execution is recorded Detail Event in use Figure 5 50 Trace conditions dialog box Table 5 20 OR condition L Type Description 0 O OR condition Trace point is encountered when any one of the set events occurs R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 126 of 228 ROE521500MCUO0O0 User s Manual 5 Debugging Functions 3 Other conditions You can select one of five choices available AND Accumulation AND Simultaneous Subrout
61. s 653 653 1 01 01 001 001 O01 O01 D01 O02 DU1 D1 001 O01 201 201 01 Ui MS ws 5 B00 650 DO to 80 B5 00 Bon 624 000 654 050 654 100 654 150 654 200 654 250 654 300 654 350 654 400 653 653 653 633 653 653 zi Figure 3 4 Trace window Auto Filter 6 That way the trace information for only R in the R W column can be displayed Trace Cycle h0000042 H0000041 00000034 00000034 00000037 O000003 6 00000025 00000023 0000003 0000003 1 O00000030 O000002T 00000026 O000002 4 0000023 00000016 00000015 pain eV wA4Ezim Range O0007515 00000000 Fie Cp Label Addre OFB2 51 OFG2 22 rB254 00l enc OFG2 Fo Or 2 n8 OF 2 BA OFG2 DA OFEZ DC OFE2 DE nonpez OD622 b n6s4 rB amp 352 rB amp 354 rFFE FFFE 16h ILC D Dono oO ccc ococtcuccdlcI m 3323232 IW Th DW DW DB IW DB DB E B B 0 0 D a B 0 1 id E 4 P cg aco D Do DB Di am aho ob ab e C CX D D DP DB CQ Ln HUSA Hi H H ee ER ERG E SS SS ee RE E Deb e ee ee ee ee RB EV i ooooo0o00o000000 Ooooooo0oooo0o00 Ooooooo0onOo0o00 poangaopaoaoanOOOO oo0oo00000000000 Oo0oo0000R000000 ooooo0000n000000 ponpaobcnpoOOOOOOOOD Donpacnpaoapdacpnoaaon pnopacoponpaobcpodoon oo00000000000000 pnonpacagogagsepoagaop aoagaoagonacagonao
62. s Manual Contents 5 12 Acquiring Data Coverage cccccccccssssseeececeeeeeeeseeceeeeeeeeesseeeeeeeessasausececeseessueeaseeeeeessuasaeeeeeeeeesssaaaeeeeeeess 164 5 12 1 Acquiring Data COVELaGe cccccccccssssseecceeeeeceeeeeeceeeeessaeeseeceeeeeeseeeaseceeeeesssuaeseeeeesssaaaseeeeeeeesees 164 5 12 2 Opening the Data Coverage Window eeeseesssssssseeeeeene nennen nennen nnne nnn nans 164 5 12 3 Allocating Data Coverage Memory Hardware Resource ccccseeeeeeeeeeeeeeeeeceeeeeeseeaeeeeeeeeeas 165 5 12 4 Data Coverage in an Address Range ccccccccccscssesseecceeeeeceueeeeeeeeeeseeeeseeeeeeeesseuaaseeeeessaaeageees 167 9 12 5 JAdelind Add ess Rangas ene eee eee eee SEU Ea ene SU EU 168 5126 Changmg PACS SAN cm TE TEE 169 942 7 RemovngAddess FSS ade ste setecies SatosineUt ct dosent E a e NP dU SUPE Eds 170 5 12 8 Data Coverage in a Section ccccccccccsesssscceeeeeeeeeeeeeeceeeeeeceeeeeeeeeeeeesaaeaseeeeeeessaaaaeeeeeeeeeseaeagegs 171 SS EE ee use T Tm 172 5 12 10 PAEMIOVINIG Sections METERS 173 5 12 11 Data Coverage in a Task Stack ccccccccsccceccceeeseesseeeeeeeeeseeeaeeeceeeeeesseeaeesceeeeeseaaeseeeeeesssaaagesss 174 5 12 12 Clearing Data Coverage Information lessen nnne 175 5 12 13 Updating Coverage Information ccccccccccccccceccseesseeceeeeeeeeeeeeeeeeeesseeeeeeeeeeeeessaaaaeeeeeeeessaaageses 175 5 12 14 Preventing Update of Coverage I
63. s0 11 FS UD p sam ss1 12 FS0ED p sam 5Z 13 F5105 p sam 53 14 FSG11D p sam s4 la PELS p_sam gt 35 16 F514D p sam 56 17 F6165 p sam 57 18 FG817D p sam 58 LS tet aL el p sam 59 20 FSlAD i al 22 f f int gq IntBuf 24 char g CharBut 25 f f 26 ar aort long a 28 F81B50 n 29 long t 30 int i j Kk gap anl 32 FSGlB6 gap 5 33 F159 while gap gt O jf 34 F81CZ2 fori k 0 k lt tgap k 35 FBi1CF fort i K gap izi0 i itgap jf 36 FG1DF for j i gap j k 4 j gap Si Pe g IntBut j 38 FS81F3 itf a 3 7 a 3J Tdgap 39 F8214 t alj 40 F6223 a 3 aljtgap 41 F823C a j dap t ae I 23 else 44 break 45 i 46 I 47 48 F6261 gap gap z 49 F626 I 50 F 270 g CharBuf char gq Int Buf amp OXxOOFF 51 Faz LD 4 oe Tutoriale 9 le sart c C I Figure 3 20 Editor window Step In ma ma ma ae m a a ma a cQogddcocodorcods d a The highlighting in the Editor window moves to the first statement of the sort function R20UT0455EJ0101 Rev 1 01 AS Page 50 of 228 Dec 16 2011 RENES ROE521500MCUOO 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
64. select a global variable that you want to be the object of a hardware break so that a program is 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 L1 X inl xi Hardware Break GP Event Dm uoces maed s EV LZ T tu Lr ti Add Delete Enable 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 outside scope cannot be registered Moreover when the local variable is set the break not intended outside scope might be generated R20UT0455EJ0101 Rev 1 01 AS Page 55 of 228 Dec 16 2011 RENES ROE521500MCUOO0 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 mmm E eVE Fre zz kE Adib Fliaa
65. sending your product to be repaired Carriage fees for sending your product to us for repair are at your own expense 8 5 How to Make Request for Repair If your product is found faulty fill in a Repair Request Sheet downloadable from the following URL And email the sheet and send the product to your local distributor http www renesas com repair N CAUTION Note on Transporting the Product 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 R20UT0455EJ0101 Rev 1 01 AS Page 225 of 228 Dec 16 2011 RENES E100 Emulator MCU Unit for R8C Family R8C 5x Series User s Manual ROE521500MCUOO Publication Date Dec 16 2011 Rev 1 01 Published by Renesas Electronics Corporation Edited by Renesas Solutions Corp CENESAS SALES OFFICES Renesas Electronics Corporation http www renesas com Refer to http www renesas com for the latest and detailed information Renesas Hectronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 U SA Tel 1 408 588 6000 Fax
66. source file in the Workspace window Right click in the source file and choose Open from the pop up menu a Tubarial c nae Um Smr E E S Smme E oid tutorial void b FE224 i ms 23 long a 10 ad long j 25 int i 26 struct Sample far p sam 2 28 FEZ227 p sam malloc siceof struct Sample 29 FEZ3B init p sam 30 21 FE247 a2 FE252 4 rand 33 FEZSE H i j3 O f 34 FEZ63 j j 35 36 FE26C LJ ali j ae H 36 FEZGe2 sort al Figure 5 6 Editor window Shown at left edge of this window are the line information consisting of the following R20UT0455EJ0101 Rev 1 01 AS Page 89 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 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
67. the LED th lator idi dace system 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 37 to the tutorial If the emulator debugger does not start follow steps 10 through 13 in this chart to perform a self checking v 10 Start up the High performance Embedded Workshop and create a Embedded Workshop project by following 4 Preparing to Debug page 68 v 1 Start up the High performance Embedded Workshop to launch the High performance Embedded Workshop emulator debugger by following 4 Preparing to Debug page 68 v Make settings on the Device page in the Device Setting dialog box Set up the operating environment of the of the emulator debugger and select the Start booting up on emulator debugger successful completion of self checking checkbox by following 4 Preparing to Debug page 68 v 13 Self checking Figure 2 1 Flowchart of starting up the emulator For the first time R20UT0455EJ0101 Rev 1 01 AS Page 23 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 14 Change the settings v 15 v 16 Turn on the power supply v 17 Check the LEDs on display of the emulator v 18 Start up the emulator debugger from the High performance Embedded Workshop v Set up the operating environment of the emulator debugger
68. the emulator is connected To change the target MCU you need to disconnect the emulator and connect it again 2 Selecting an operation mode The operation mode is fixed to the following option Single Chip mode CAUTION Options are different depending on the target MCU that you select 3 Selecting the port mapping control Specify the number of pins of the target MCU to be emulated CAUTION Options other than 48pin and 64pin are reserved and the pin counts are not provided for your target MCUs 4 Setting up communication You can select another target emulator connected via USB The USB Serial No list box shows unique identity information on the emulator connected via USB Clicking on the Refresh button updates the information 5 Performing self checking If you click on the OK button with the Start booting up on successful completion of self checking checkbox selected R20UT0455EJ0101 Rev 1 01 AS Page 81 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions hardware self checking proceeds after connection to the emulator has been made according to the communication condition you have set The results are shown on completion of self checking If the results are normal boot up processing continues If an error is found boot up processing stops R20UT0455EJ0101 Rev 1 01 RENESAS Page 82 of 228 Dec 16 2011 ROE521500MCUO0O0 User s Manual 5 Debugging Functions
69. the outlet Figure 2 5 Connecting the emulator power supply N 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 polarity shown below The included AC adapter has no power switch The AC adapter is always active while connecting to the AC power cable R20UT0455EJ0101 Rev 1 01 AS Page 28 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 the Power ON and OFF Turn ON OFF the power 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 Notes on Power Supply The emulator pin Vcc is connected to the user system in order to monitor user system voltage For this r
70. the upper pane of the Trace window ge DEA 2E g OFB2E0 H malloc OPE49A lt OFB2Fl lt Display form of function execution history gt init OFB0C2 OFa303 l G rand i FBO44 lt OFB314 Function name start address of function lt function caller address H rand OFB944 lt OF8314 Example main OF82DC lt OF8AB5 E rand FBS44 lt DOF8314 rm rand OFE944 lt OFd314 0000 bbb U00 Y1E 1 1 Ea 1 DOBDCOCDODCDICI CISCO OO 00 CILE LDIDEE 306 Sau 00006961 rBz BO R D 3 1 1 Blmadm aalala aia O0006960 OrB2gD F5 ib 1 1 PB 32 1 1 anongoGOnO0O0OGOOOODDO 00 00 00 001 307 080 000016959 OrB282 FEDO 16b O N H OF cK 3 1 1 OooooooU0oO000N0 00 00 00 001 307 130 00006953 rB282 00 16b 1 i FM i 1 1 ooooo0000R000000 00 00 00 001 307 180 00006957 rB2Hi 00 is 1 1 c U 1 1 paagaoGnonoaoDOOOO0 00 00 00 001 307 230 00006956 _tutori F ZEG PZTC ith 0 w R U di 1 DognocnonooDOOOOD 00 00 00 001 307 280 Figure 3 38 Trace window 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 Pre EEO s E feVeleez zi El main FB2DC lt OFBABS Fl tutorial FB2EE lt OFE2EO H malloc OPB49A lt OF82Fl init FBOC2 lt O
71. 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 that is started up from the High performance Embedded Workshop and controls the MCU unit and enables debugging Firmware This means a control program stored in the emulator This analyzes the contents of communications with the emulator debugger and controls the emulator hardware To upgrade the firmware download the program from 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 in which the MCU to be debugged is used User program This means the program to be debugged Evaluation MCU This means the MCU mounted on the emulator which is operated in a dedicated mode for use with tools This symbol indicates that a signal 1s active low e g RESET R20UT0455EJ0101 Rev 1 01 AS Page 15 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 1 Outline This chapter describes the package components the system configuration and the specifications of the emulator functions and operating environment 1 1 Package Components The ROE521500MCUOO package consists of the following items After you have unpacked the box check if your R0OE521500MCUODO contains all of these items Table 1 1 Package
72. waste in accordance with your national legislation R20UT0455EJ0101 Rev 1 01 AS Page 4 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual Important Usage restrictions The emulator has been developed as a means of supporting system development by users Therefore do not use it as an embedded device in other equipment Also do not use it to develop systems or equipment for use in the following fields 1 Transportation and vehicular 2 Medical equipment that has an involvement in human life 3 Aerospace 4 Nuclear power control 5 Undersea repeaters If you are considering the use of the 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 this user s manual may be changed without prior notice About 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 to patent rights or any other rights belonging to Renesas or to a third party 3 This user s manual and this emulator are copyrighted with all rights reserved by Renesas This user s manual may not be co
73. 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 pop up menu Code Coverage 02H 99 y NE DX da di Percenbage OFELBE FE218 100 EHHHHNN Add Range dik Pa Dak OFEZ24 ENTER i FEZZ27 PUSH W p sam mal DIFPEZ2ZB PUSH Wi FEZ22F JSR A ee 4 A by Address Range Source Figure 5 82 Code Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 151 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 gt Browse Figure 5 83 Delete Address Range dialog box 3 The address range you have selected will be removed Code Coverage j xi ARETE Address Range CO Coverage C1 Coverage OFEIBE OFF210 100 11 EN Executed Source FElBE ENTER FElCl MOV W G DFEICA MOV W o For i i OFEIc CHE Wi Gaa q TLD Address Range Source 7 Figure 5 84 Code Coverage window
74. ws VW ow AXxmrmEmS S icGcmGaao MH TaskID 0 oO2 Initialize Idle 2yztemstack El TaskID 1 _main __S SCALLI1 OFO441 s OF6229 SYSCALL1 OFO441 lt OF 6229 _ SYTSCALL r 3rF8 OF6232 SYSCALL r 03F8 OF6232 __ ENQ r 7DC lt OFLOFL SYSCALLI1 OFO441 DOF6Z3B Range 04194303 DODODOOD Fia pele 04168646 Address FOH42 Time O0 00 00 002 454 570 Label Address Data B ELCOVLAP TimeZtemp 0316F 64E 1 1 O4166645 OFO444 7304 16b D IW R O d 1 1 1 main EIL 00 00 00 002 4542 620 04168644 OFO444 O4 16h 1 1 EW 1 1 1 1 i main P 00 00 00 002 434 660 04166643 OFO446 DOlF 16h 0 Iw R 0 3 1 i 1 main Errem 00 00 00 002 4543 720 04168642 0F0446 1F ifb 1 1 c l1 1 i 1 main ud 00 00 00 002 4 54 770 O4166641 SB OO0400 O01 ibb 0 m w 0 1 1 i i main di 00 00 00 002 4 54 5820 04168640 DOFO 4E 7304 16b O IN R GO 3 1 1 1 main ED 00 00 00 002 454 870 Figure 5 64 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 R20U
75. 0 00 001 735 730 tutorial OFEZZ4 340 00 00 00 104 990 640 00 00 00 052 485 320 2 _abort OFEITE 1 0 00 00 00 000 000 000 asf 00 00 00 000 000 000 Figure 5 129 Realtime Profile window function profile The following shows detailed 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 timestamp is displayed in the form shown below Hours minutes seconds milliseconds microseconds nanoseconds Average Average execution time per measurement performed If located outside the profile memory allocated area address lines are displayed in gray The acquired profile measurement results are accumulated in memory until the user clears them R20UT0455EJ0101 Rev 1 01 AS Page 180 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 5 Debugging Functions 5 13 4 Setting Function Profile Measurement Ranges Choose Set Ranges from the pop up 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 List Allocation of Profile Memory Clear OOO00 1FFFF EDU FFFFF All Clear Default Save aad Help o Cancel Figure 5 130 Realtime Profile Setting dialog box 1 Memory allocation
76. 0005 Or zEt DODA 16b O amp 1 1 ooodoooooooo000on 00 00 00 004 650 150 0000008 4 patere 0000F ibb l a 4d 1 nonobDooonacooOOOD 00 00 00 001 650 200 00000083 DFB2B5 CATE 16b O amp d 1 aonabcaooooooOOOD 00 00 00 001 650 250 00000082 rB2588 7522 16h D amp il 1 nonobcpaonocnmoooon 00 00 00 001 650 300 D000006 1 DrB2BA O9CO 16b O 3 1 1 Dici Doo DoD O60 00 00 00 001 650 350 O0000080 DPB2BA CO 16b 1 z E l tw 1 1 1 ooo00o0000R000000 00 00 00 001 650 400 00000073 OFB2BC A900 16b 0 IN A DO 3 1 1 ooooc00000000000 00 00 00 001 650 450 00000074 OFe2a 00 16b 1 1 W 1 1 1 ooooo00000000000 00 00 00 001 650 500 00000077 DFPB28E PCBO lsh 0 IW B D 3 1 1 nonaogonaonanoon 00 00 00 001 650 550 00000076 FB2BE BO lih 1 1 W i 1 1 aogaoaonaonano n 00 00 00 001 650 600 Aa 0000 75 OFBZCO 10E9 16h IH R 0 BB Z2 1 1 Ooooooo0oo000000 00 00 00 001 650 650 O0000074 DO0 nc OOO9 i amp b Tw E O0 E 2 4d 1 pgaagaooagoagaoagano60 00 00 00 001 650 700 00000073 OF82c2 4BEB 16b O0 Iw R 0 cm 2 1 1 oodoooo0oRo00000 00 00 00 001 650 750 O0000072 rB2c4 Alp4 16b n IN E 1 1 ooooooo0oRo0000n 00 00 00 004 650 800 Figure 5 60 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 F
77. 00MCUO00 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 Welcome X T Administration ok Cancel Administration Z Figure 4 6 Welcome dialog box 2 Project Generator will start New Project Workspace lx Workspace Mame Project Name Directory US C source startup Appheation Fy Empty Application VE Import Makefile Library Debugger only M16C E100 E 7 Debugger only H16C Simuat CPU fareay in BC Tool chan Renesas WTEC Standard Pon ewe Figure 4 7 New Project Workspace dialog box R20UT0455EJ0101 Rev 1 01 AS Page 71 of 228 Dec 16 2011 RENES ROE521500MCUOO 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 En
78. 01 AS Page 109 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual When deleting an event from the Registered Events dialog box 5 Debugging Functions 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 8 x Events Address ini Address exit Address main Delete Delete al Ze Duplicate Add Save Load Figure 5 34 Registered Events dialog box R20UT0455EJ0101 Rev 1 01 Dec 16 2011 RENESAS Page 110 of 228 ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 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 Tammen BreakPoint Figure 5 35 Event dialog box 2 An event is added at
79. 0455EJ0101 Rev 1 01 AS Page 20 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 1 4 2 Regulatory Compliance Notices e European Union regulatory notices This product complies with the following EU Directives These directives are only valid in the European Union CE Certifications e Electromagnetic Compatibility EMC Directive 2004 108 EC EN 55022 Class A WARNING This is a Class A product In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures EN 55024 e Information for traceability e Authorised representative Name Renesas Electronics Corporation Address 1753 Shimonumabe Nakahara ku Kawasaki Kanagawa 211 8668 Japan e Manufacturer Name Renesas Solutions 2 Address Nippon Bldg 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan e Person responsible for placing on the market Name Renesas Electronics Europe GmbH Address Arcadiastrasse 10 40472 Dusseldorf Germany e Trademark and Type name Trademark Renesas Product name E100 Emulator MCU Unit Type name R0E521500MCU00 Environmental Compliance and Certifications e Restriction of the Use of Certain Hazardous Substances in Electrical and Electronic Equipment RoHS Directive 2002 95 EC e Waste Electrical and Electronic Equipment WEEE Directive 2002 96 EC e United States Regulatory notices This product complies with the following EMC regulation This
80. 1 1 g ongocgdonDoGDODODD 00 00 00 001 306 360 agdono11 000716 F 16b U E 1 4 1 1 DOUUOUDDORODOUOUDOU 00 00 00 001 906 420 oooo0012 000715 OF 16b 1 cw 23 1 1 oooooooooooOoOeoo 00 00 00 001 306 460 Ooo0o0013 DOrB2EA OOERZ 15b D I HR 0 4 1 1 BpogaoGnoO0O0OOOODOD 00 00 00 001 306 520 agng0014 DrB2HA E2 ib 1 1 4 j 1 BoonoonDOOOOOO0DOD 00 00 00 001 306 560 oo0o00015 D00717 OO ib 0 PW w 0 PB 3 1 1 oo0oo0000R000000 00 00 00 001 306 620 gt Figure 3 36 Trace window Fill around TP R20UT0455EJ0101 Rev 1 01 AS Page 61 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 pop up 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 function where p sam sO0 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 Fu
81. 101 Rev 1 01 AS Page 174 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 12 12 Clearing Data Coverage Information 1 Clearing the data coverage information of the specified range Selecting Clear Coverage Range from the pop up menu on the Address Range or Section sheet opens the Clear Coverage Range dialog box Start Address 000624 End Address jon eA Cancel Figure 5 124 Clear Coverage Range dialog box Enter the start and end addresses of the range to be cleared Clicking the OK button clears the coverage information of the selected range 2 Clearing all data coverage information Selecting Clear the Entire Coverage from the pop up menu clears all the data coverage information 5 12 13 Updating Coverage Information Selecting Refresh from the pop up menu updates the content of the Data Coverage window If Lock Refresh has been selected the information is not automatically updated when the program breaks To view the latest information therefore you need to update manually 5 12 14 Preventing Update of Coverage Information Selecting Lock Refresh from the pop up menu prevents update of the Data Coverage window while the user program execution is stopped R20UT0455EJ0101 Rev 1 01 AS Page 175 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 5 12 15 Saving the Data Coverage Information to a File You can save the data coverage information of the currently sele
82. 13 99 Se ab OO12FE RAM 14 fb ce bo mG Address Range Task Stack Figure 5 115 Data Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 170 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 12 8 Data Coverage in a Section The E100 emulator shows the access information it acquired from a user specified section Data Covrerage x s itl xm Wt eX OOO041i DDD71B stack 13 9 00i U DDAIB istack Ds a DOUO062s8 RAM d3 ff ie Yh OOD bAC RAM 60 b7 95 e DID S BU EAM a DDOD6B4 RAM DD 6B8 RAM nn Address Range Section Task Stack Figure 5 116 Data Coverage window section name specification The Data Coverage window is vertically divided into two by the splitter The upper pane shows the address ranges section names to be measured and access rates Table 5 37 Contents in the upper pane of the Data Coverage window Section Address range section in which coverage is measured Access Rate Access rate in percentage and graph The lower pane shows detailed information of the address range selected in the upper pane Table 5 38 Contents shown in the lower pane of the Data Coverage window Address Address value Label Label name Memory area FlashROM RAM SFR This column is blank when the area is unused The accessed data has its background displayed in purple If located outside the coverage memory allocated area address lines are dis
83. 1s only valid in the United States FCC Certifications This equipment has been tested and found to comply with the limits for a Class A digital device pursuant to Part 15 of the FCC Rules These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment This equipment generates uses and can radiate radio frequency energy and if not installed and used in accordance with the instruction manual may cause harmful interference to radio communications Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense This device complies with Part 15 of the FCC Rules Operation is subject to the following two conditions 1 this device may not cause harmful interference and 2 this device must accept any interference received including interference that may cause undesired operation CAUTION Changes or modifications not expressly approved by the party responsible for compliance could void the user s authority to operate the equipment R20UT0455EJ0101 Rev 1 01 AS Page 21 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 1 4 3 Operating Environment Make sure to use this emulator in the operating environments listed in Tables 1 6 to 1 8 Table 1 6 Operating environmental conditions Operating temperature 5 to 35 C no conde
84. 2 FGlBO gap 5 33 FG1B9 while gap gt O jf 34 FS81CZ fort k O E lt qap k i 35 FSGICF fort i k gap i lt 10 i i gdap jf 36 FSiDF for j i gap j 2k 4 J gapi 37 FGIEE g Int Buf j 38 FB1F3 if a j a i gap 1i 39 F8214 t ali 40 FB8223 alj alitgap 41 F823C alitgap t az i 23 else 44 break 45 f 46 i 2 i 45 Fo261 gap gap z 49 FSGzB5D 1 SO Faz u g CharBuf icharjug Int Buf amp OXxOOFF 51 FSzT7D 52 Sig change long a 54 Fs260 i 55 long tmp 10 56 Inr i1 57 58 F5286 Forfi O isl i if 59 FSz91 tmp i a i 60 1 6l F82 4AE Forfi O izi10 icc 62 F82B9 a i tmp 9 i 53 1 64 FSZzD 4 cO Tutoriale 9 c Figure 3 43 Editor window setting a software breakpoint Choose Reset Go from the Debug menu R20UT0455EJ0101 Rev 1 01 AS Page 66 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 3 Tutorial After a break choose Code Stack Trace from the View menu to open the Stack Trace window xj Kind Name Value F sort signed Of eldt j F tutoriali Ofes4h F main 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 corresponding row in the S W Breakpoints column again 3 19 What N
85. 4 1 Downloading the Tutorial Program cccccccccceeececeececeeeeeceeeeseceseeeceseueeeseueeeseeeessaeeesaueessaeeeseaes 39 3 4 2 Displaying the Source Program essssssssssseseesseeeeennne nenne nennen nenne nnn nnnna nnns rss n a nnn nnns 40 3 9 Seting SOMWare BEAK DOIN cssncaccasaseitocdnsasgesauaantcingedmaniteioansncdadasagetdsanaeduasseacedencasogatdeaneedeecasstdasinaestenereauecarers 41 3 6 Executing the Program NT m mm Tt 42 3 6 1 FASS UNI heL P U M M 42 3 6 2 Executing the Program oesdgns rd cubat Lat denen iancditecdund cu Ua tus xuubecs edi Bran EU QI vau pM Cer vRi mu RU Ge Vo es samen 42 ONG ole late B gore 0 9 n NERO EIE EE ES 43 3 7 1 Checking Breakpoints ccccccssccccccssssececcensececcceeeeeeeceesaueeeeceeeegeeeeeseuaeceeessueeeeesseageeeessseageeesessaas 43 3 9 Altering Register COHLeTIIS coi caet un Se qr nae R vnu oca tesis subeunt i ch Unc aesus a a u dua cii eba ne co a e pesi eua eiui 44 DROS FEMI ING 5 VITIDOIS ossassdonsisiposdinrtuid dio stve adis satqudic ine E snb E E Ora e onis sS EPcM UD eris DUET EE 45 3 10 Checking Memory Contents ssssssssssssesssssseeenne nennen nennen sss nnnaa rns nri sss ssna aan snis iss n naar nnn nnns 46 3 11 Referencing i e e m 47 3 12 Showing Local Variables cccccseescccecceeseeeeeeaeeeeeeeeeeeeeeeeeseaeeeeeeeeseeeeeeeseeaeeeeeseeaseeeeessaeseeceesssageeeeeess
86. 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 is 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 stopped is marked with an arrow 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 is 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 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 5 init struct Sample p sam l p sem gt s0
87. 5 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 10 x BKE 20 FOZ2E9 p sam malloc sizeof struct Sample 29 Fe2FD init p sam 30 31 Fe3s09 for 1 O i lt lO i ji 32 F6314 j randi 33 F8320 ifj Of 34 FG3z25 quee S5 36 FSOS3SZE ati j 317 38 F8344 H7 sortial 39 FG345 changera 40 41 FeasS2 p sam s0 a 0 dz F23 b p sam sl a l 43 Fa83765 p sam sz a z 4 Fro38c p sam ss3 a 35 Figure 3 27 Editor window setting a hardware breakpoint The source line that includes the sort function will be marked with H indicating that a hardware breakpoint that will cause a program to stop when it fetches an instruction has been set there R20UT0455EJ0101 Dec 16 2011 Rev 1 01 Page 54 of 228 44 N SAS ROE521500MCUO0 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
88. 6 Detecting a Performance Overflow cccccccccccscccsseeseecceeeseeeeeseceeeeeesseeaeeeeeeeeesesaeeseeeeeessaaaaaeess 196 5 14 7 Detecting a Realtime Profile Overflow sess 196 5 14 8 Detecting a Trace Memory Overflow lsseeesessssssssseeeeeeee nennen nnne 197 5 14 9 Detecting a Task Stack Access Violation seeeeseesssssssseseseeeeeeeennnnn nnne 197 5 14 10 Setting a Task Stack Area cccccccccccccccsssseececeeeeeeeeeceeeeeeseaesseeeeeeeesaeeaseeceeeeessuaaeseeeseessaaaaeeeess 198 5 14 11 Detecting an OS dispatch 00 ceccccccccccccsseeseeeceeeeeeeeeeeeceeeeeeeeeeeeseeeeeeessseeeseeeeeeesseeaeeeeeeeeessaggagas 201 9 195 Using the Stare Stop FUNCION ou os are once eus uds et duc ceret eae odiana expo rite ed usta bue dota uds on frrs epa anaiai 202 5 15 1 Opening the Start Stop Function Setting Dialog Box eeeeeesssesseeeeeenneernee 202 5 15 2 Specifying the Work ACCIreSS cccccccccssssecceceeseeeeeccsessecececeeseeceeeeeaaecesssaaaeeeessuaseeesessagseeeeeeas 202 5 15 3 Specifying the Routine to be executed cccccccccsssseecceeeeeeeeseeceeeeeeeseeeseeeeeeesesseaseeeeeeeessaaages 202 5 15 4 Limitations of the Start Stop FUNction ccccccssccsssscsssssssssceuscceusseusceussceusuensssceusucaususersresneausass 203 5 15 5 Limitations to the Statements written in a Specified Routine seeeeessssssss
89. AM 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 non initialized 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 displayed 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 pop up menu In this case the read and write accesses are not displayed Table 5 6 Access attribute and background color m Access attribute Background color Wrteaccess 0000000000000 access 3 When Non initialized memory an area not written Ln errors to has been read detected ere Uninspected memory an initialized area has Sky blue not been 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 t
90. BP Event in use 0 Detail Exception Total O Event VK Delavicvcle Ts Exceptional events Figure 5 43 Hardware Break dialog box Table 5 12 Other conditions O Type Description AND Accumulation Breakpoint is encountered when all of the set events occur irrespective of the time axis AND Simultaneous 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 6 steps forward direction reset point Breakpoint is encountered when a set event occurs in a specified order 3 steps 9 paths reset point Breakpoint is encountered when a set event occurs in a specified order CAUTION When a time out condition is set in State transitions Hardware break point dialog box the time to make transition from a set state to another then back to the original set state must be 10 us or more Transition time of less than 10 us will result in an incorrect timeout detection The events shown in the list of each condition can be deleted by the keys Ctrl Del R20UT0455EJ0101 Rev 1 01 AS Page 117 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 4 Detection of exceptional events Specify whether you want detection of following exceptional events to be used as a breakpoint Violation of access protection Read from unini
91. DDODOODODODU 00 00 00 001 651 160 00000006 OFFFEG 02 lih 1 1 2 1 1 ooooo000000000000 00 00 00 001 651 210 00000005 FFFE 02 16h 1 1 2 1 1 ooooo00000000000 00 00 00 001 651 260 oo0o0004 FEFE 2 15h 1 1 1 oooo0p0o000000000 00 00 00 001 651 310 5000000 OOp046 AFS 16h Iw w 1 ZZ 1 0 DogOOonODODGODOODDD 00 00 00 001 651 360 o00o0002 OOn046 OFS 10b O TW W O 3 1 0 BogOOon0O0DODODODOD 00 00 00 001 651 410 gn000001 OOp044 3353 160b rw uw 1 Z 1 ooooo0000o000000 00 00 00 001 651 460 ooooo000 DOpo44 3353 168b 0 w w GO Z 1 Ooooo00000000000 00 00 00 001 651 510 zi Figure 5 56 Trace window 2 Disassembled Display Mode From the pop up menu choose Display Modes gt DIS This display mode allows you to inspect the machine language instructions executed Trace B aJ vbE wtrzzitegli4 biv iaaemo DO 00 00 001 650 100 Curie Label Address Object Code Instruction TimeSteamp himis m ue ne O0000066 rBzH1 T7TBBFCDOAOD CMF W G amp U000AH 4H FB 00 00 00 001 650 100 d860083 OFG256 TDCAZ2 JGE F ZDAH 00 00 00 001 650 300 Oo0000080 Drzna 7VSc00900 Mov w c gf0000H FO 00 00 00 001 650 400 O0000076 rBZBD AQBOFC SUE W G AH FE R 00 00 00 001 6350 60l 00000073 rBzc E910 ZHL W 20 RO 00 00 00 001 650 750 O0000070 Oreece EBABD4 HOVA CH FB AO 00 00 00 001 650 900 O0000063 riscs A104
92. DUSEU 217 lb 1 I 4 1 1 DnonaonoDnOOGDODODD 00000027 0006ER 8352 16b D DW B 0 4 1 1 nonoaononaonoDODD O0000026 OOO6E4 OF 16h 1 DB B OF 4 1 1 nonaononaononODD 00000025 OO06R4 F lbh 1 1 DO 1 1 BonaononaGnOnOOn 0000004 0r8352 E473 165 D mW R 0 2 1 1 ooooooo0ooo000o0 00000023 OF6354 SFA 166 IN R OF E 2 1 1 DogaoaoOOOGOOUOOU O0000022 OPGIS2 FA ib i l1 2 1 1 ooooooooooooOooO O0000021 OTGI34 Fi ibi 1 435 1 1 ooooooooooooOooO Times m 00 00 00 001 649 of z oo t On OO Do Do oO oO oo E 00 On OO oo 2 00 00 00 D 00 na 00 oO oo oo 00 D 00 a a ag a od oo oo OO oo oo oo oo oo 001 001 01 201 UD1 Di 001 OO1 DOL 001 D A01 J01 D01 e 610 850 648 648 649 910 649 960 620 010 630 060 650 110 650 160 650 210 650 260 650 310 650 360 650 410 650 460 Figure 3 33 Trace window bus disassemble and source mixed display R20UT0455EJ0101 Dec 16 2011 Page 59 of 228 ROE521500MCUOO 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 is encountered This facility allows you to keep track of program flow from trace inf
93. E1cCC TGE ut DFE1CF MOV W empli DFE1D2 SHL W Enm Address Range Source j Figure 5 75 Code Coverage window address specification The Code Coverage window is vertically divided into two by the splitter The upper pane shows the address ranges to be measured CO coverage and Cl coverage Table 5 29 Contents shown in the upper pane of the Code Coverage window Address Range Address range in which coverage is measured CO Coverage CO coverage in percentage and graph C1 Coverage Cl coverage in percentage and graph The lower pane shows detailed information of the address range selected in the upper pane assembly language level Table 5 30 Contents shown in the lower pane of the Code Coverage window Executed 1 The instruction was executed 0 The instruction was not executed Condition for execution of a conditional branch instruction T The condition was satisfied F The condition was not satisfied T F The condition was satisfied in one case and not satisfied in another Instructions other than conditional branch instruction Address Assembler Disassembled program C C or assembler source program R20UT0455EJ0101 Rev 1 01 AS Page 148 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions The acquired coverage information is accumulated in memory until the user clears it When you double click Assembler code shown in the Addre
94. 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 is executed by CPU An event is detected not in the cycles prefetched by an instruction queue but in the cycles executed by the CPU Data access An event is detected when a specified address or specified address range is 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 lOR 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 Subroutine 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 wh
95. F8303 E FBOa434 lt OFa314 H rand OFE944 lt OFa314 n E rand OFES44 lt DF3314 rand OFE944 lt OFd314 Dabel Address Data BUE 00006193 UDUBE UF 1656 1 1 amp 1 1 DODOooOgcm ig UO sO 200 001 945 440 O0006192 Ores45 E 0 d 1 aalala aaia aaa i 00006191 r amp 94A 45SD 16b IN AR 0 ce 23 1 1 ponooooODOOOn0000 00 00 00 001 345 530 00006190 OO06HO 4ic 16b U WW w D Fu O 1 1 poanooooDOOGDODODO 00 00 00 001 345 580 00006149 nr894c FOTS 16b O w R 0 amp d 1 oooooooooooOOooo 00 00 00 0014 345 630 00006184 r amp S9gg 0410 ibd 0 IW R OF cw Z 1 1 pogoaoonoooooDOOO00 00 00 00 001 345 660 00006 167 DO056DE 4EGD i6b 0 pu w 0 Pu O 1 1 oDon0oooooooOoOOooo 00 00 00 001 345 730 Figure 3 39 Trace window function execution history R20UT0455EJ0101 Rev 1 01 AS Page 63 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 ac
96. FF Figure 5 98 Schematic of the overwrite mode R20UT0455EJ0101 Rev 1 01 AS Page 161 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 2 When Merge has been selected Coverage memory Before loading After loading Coverage file r1 Existing data is read Ox2000 Ox2000 Ox2000 d DEUM 2 The data ofthe coverage file is 2 merged with the existing data Ox2FFF Ox2FFF Ox2FFF a The merged data is written to the coverage memory 2 Figure 5 99 Schematic of the merge mode 3 Application example of merge mode Coverage memory Test A Test B Test C after loading in the merge mode coverage coverage coverage file file file Example Do put As the result of test m A B and C the CO Doro coverage is 7595 30 556 B0 FE 1 2 5 unuummummu Figure 5 100 Schematic of merge mode application Procedure 1 Open the Load Coverage Data dialog box To begin with select the Clear coverage RAM before loading check box 2 Add a coverage file for test A in the merge mode 3 Add a coverage file for test B in the merge mode 4 Add a coverage file for test C in the merge mode 5 Click the OK button You have now finished merging three files 5 Debugging Functions By calculating 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 dat
97. O aogacaonacaoda6 aogaogogaoOOOOOO pongoonoaoaocon0O0O0 paogocanooaoaonoon ELCOVL Timestamp 00 00 i00 DO DO na 00 0g DO oo 00 oO oo oo 200 DO 00 n a oo OO OD t t OO Do OO a oO OO oo Oi ia E OO oO oo oo 00 au aun ag gg oo g ag an oo Oo oo oo oo h m z D 1 001 001 001 001 O01 O01 UU1 GOL OO1 O01 00l O01 001 001 O01 001 mS US 0TA 300 652 350 652 450 652 500 bo2 350 ez BD bod bo 652 750 652 800 652 850 652 500 653 050 653 100 653 200 653 250 653 600 653 690 552 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 R20UT0455EJ0101 Dec 16 2011 Rev 1 01 44 N SAS Page 65 of 228 ROE521500MCUOO 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 Bs AT sort long a 28 FSGIBU 1 29 long t 30 int Wa ue Ke gapi 8 il 3
98. O0000098 OOO6BA 16h DW R 00000097F FB2D4 16b IM ER O0000096 FBZDB 16h IW ER 0 RE DFB82D5 ADD 1H 4H FB O0000095 0000F 16b DW W CI gaaagaaagaagagaadgaadau O0 00 00 001 649 650 oo0000094 gag708 16h D 0 gagaagaaaaagaaandu 00 00 00 001 649 700 Oo0000093 gagsnc 16h D gagaaagaaaaagaaaaou 00 00 00 001 649 750 O0000092 FBZ2D8 16h IW gaaagaagagagaadgaadau O0 00 00 001 649 800 oooo000000000000 00 00 00 001 649 250 adodoan 00 00 00 001 6489 300 oooo000000000000 GO SDODEDB DET BAH aU oaoa 00 00 00 001 649 400 obooooo0o000000000 BO T0200 001 659 43D paaaaogaagadaagaadau UD eps Dg DD s egg S booooo0o0o0o000u0000 BU 00500 001 643 550 pgaaaaoagagaagagagaadau O00 00 00 001 649 600 OM O C ee we oe Figure 5 59 Trace window R20UT0455EJ0101 Rev 1 01 AS Page 133 of 228 Dec 16 2011 RENES ROE521500MCUO00 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
99. PrmISE PET SUE ieaaieteanestuite 154 5 11 10 Removing Sour ce Flle5 cs ousmssestetai ni v quxauve fodunncsPammasals comeieeacnmceadsfumocetucndstndsiumetanncasuelodmencoonme 155 5 11 11 Showing Percentages and Graphs ssssessesssssssssssssseeeeeeennnnnnnn nennen nnns 156 5 11 12 Using ihe Sor FUlGllOPLasuse eesetuscurarebesns sese femore sosta E Rune rebua roodo ede dota ce test etos n femore eaii 157 5 11 13 Searching for Unexecuted LINES ccccccceeeeceeeeeeeceeeaaeeeusseeeeeeeeeeeeeeeesauaaaeasseeeeeeeeeeeeeeesaaaaaas 158 5 11 14 Clearing Code Coverage Information ccccccceceeeeeeeseeeeseeeeeeeeeeeeeeeeeeseuaaaaessseeeeeeeeeeeeeeees 159 5 11 15 Updating Coverage Information csssssssseeeeceeeceeeeeeeeeaaaeeeseeeeeeeeeeeeeeeeeeasaaaesssseeeeeeeeeeeeseeees 159 5 11 16 Preventing Update of Coverage Information esses 159 5 11 17 Saving the Code Coverage Information to a File seeeseessseeeeeneeene 160 5 11 18 Loading Code Coverage Information from a Fil ssesseeeeeeeeeeeeeeeeesaeeeeesseeeeeeeeeeeeeeeeeaaaaaes 160 5 11 19 Coverage Information File Load MOdeS cccccccccccceeeeeessseseeeeeeeeeeeeeeeeeeeeeaaaaeaaaseeeeeeeeeeeeeeeeees 161 5 11 20 Displaying Code Coverage Information in the Editor Window essere 163 R20UT0455EJ0101 Rev 1 01 RENESAS Page 11 of 228 Dec 16 2011 ROE521500MCUOO User
100. R 32H 7DE20D0D00 PUSH U G 00008 TDEZ2600 PUSH W G 00268 FDDSGE3UF JSR malloc TDB4 ADD B 4H SP 730BF HOV U G RO 6H FB 732BFC NOV U G R2 A4H FE 754BFC PUSH W G X 4H FB 754BF PUZH U G 6H FB FD143EQ0F JSR A init 7DB4 DD B Q 4H SP DSIOEFE 778BFEO0AD0 CMP V G SOOO0AH 2H FE 7DC 31 JGE FE282H FDSG2ESGOF JOR A rand 7CF3 EXTS W RO s LL Figure 5 9 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 E 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 R20UT0455EJ0101 Rev 1 01 AS Page 92 of 228 Dec 16 2011 RENES ROE521500MCUO0O 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 x Software break is set Tw 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 Assembl
101. RESETZ High User System NMI High User System CNVss J User System HOLDfZ High User System RDY High User System BYTE CPU Clock Main Clocki XIN Emulator 20 0 MHz Sub Clock ZCI Emulator 33 0 kHz OO000h Read Status Figure 5 16 Extended Monitor window R20UT0455EJ0101 Rev 1 01 AS Page 98 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 5 2 Selecting the Items to Be Displayed Choose Properties from the pop up menu of the Extended Monitor window and the Extended Monitor Configuration dialog box will be displayed Extended Monitor Configuration User System Cormechon DISCONNECT Disconnect NNO CNN Ch 7 User System Power Source DISCONNECT Vez1 0 B v VeezD 4 v E User System RESET High 9 User System NH High v User System CNV es 4 User System HOLD High e User System ADYH High User System BYTE Figure 5 17 Extended Monitor Configuration dialog box This dialog box permits you to set each item you want to be displayed in the Extended Monitor window R20UT0455EJ0101 Rev 1 01 AS Page 99 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 is a pre execution break function
102. S UD p sam s1 0 12 FSOED p sam sz O 13 F5105 m p sam 53 0 14 FGllD p sam s4 0 15 FB8135 p sam s5 0 Bookmarks d 16 F814D p sam s6 0 Templates Enable Disable Breakpoint Chrl F9 Figure 5 20 Editor window and pop up menu R20UT0455EJ0101 Rev 1 01 AS Page 101 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 2 The software breakpoint is enabled or disabled alternately we sor c Bos Y ea init struct Sample p sam 9 Fancz i E 10 Fsocs p sam s O 11 FsoD p sam s1 0 12 FS0ED p sam sz D i3 FB8i 05 t p sam 53 0 14 FS11D p sam s4 D 15 F38135 p sam as5 D 16 FSGl14D p sam 6 0 E 4 d x Figure 5 21 Editor window 2 From the Breakpoints dialog box 5 Debugging Functions 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 Breakpaoints H l H l r wv dsl T Ly IFI J w HEINE a Figure 5 22 Breakpoints dialog box R20UT0455EJ0101 Rev 1 01 Dec 16 2011 RENESAS Page 102 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 7 Using Events 5 1 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
103. SP and detects if the value points to a location outside the stack areas Detection circuit lt Compare gt USP value gt Whether the USP value Detected Stack range gt exceeded the set stack area gt gt Detection circuit ISP value Figure 5 145 Outline of the detection of a stack access violation lt Compare gt Whether the ISP value exceeded Detected the set stack area The emulator will detect the error if the value of the stack pointer is beyond the stack areas on 1 generation of an interrupt or return from an interrupt handler 2 calling of a function or return from a function or 3 the stack pointer pointing to a location outside reserved stack areas CAUTION Detection does not cover cases of corruption of data within a stack area 4 Actions taken when a stack access violation is detected The following actions can be set Display a warning Selecting the 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 stack access violation as a condition of a hardware breakpoint Set the detection of a stack access violation as a condition of a trace point R20UT0455EJ0101 Rev 1 01 AS Page 195 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions 5 14 6 Detecting a Performance Overflow A time in performance measure
104. T0455EJ0101 Rev 1 01 AS Page 139 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 the Performance Analysis window choose Performance gt Performance Analysis from the View menu or click the Performance Analysis toolbar button jm Performance Analysis E X 3m B Statistic Max h m s ms us ns Minih m s mea us ns Average h m z ma us ns 453 00 00 00 2 68 211 700 00 00 00 227 113 400 00 00 00 250 911 2320 AERE 00 00 00 514 026 900 00 00 00 472 836 250 00 00 00 495 617 970 i NN 00 00 00 2 68 311 700 00 00 00 227 113 400 00 00 00 250 911 230 Wo Condition Run time h m s ms Enable QD0 00 01 254 5565 150 Enable OOr007101 982 471 3960 Enable 00 00 01 254 5356
105. 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 is Fill until stop Fill until full or Fill around TP and the selected display mode 1s Bus or Disassembled 1 Auto filter function To use the filter function choose Auto Filter from the pop up menu of the Trace window When Auto Filter is turned on each column of the Trace window is marked with an auto filter arrow Tii Click any arrow um 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 such 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 EM LL B OT weVEIFSzEZz REF edb Pase Range 00007515 00000000 Fia Cycle 00000038 address OF S281 Time 00 00 00 001 650 000 cycle Label Addce Dar Be B7 Bef B7 ee cel 7 Busa Deb EV v B ELCOVL Timestemp him s ms us n7 o0000088 OF62B1 77 1 amp 0 EM i 4 1 aodaocaonaonano0n0 00 00 00 001 650 000 Hooo0067 FB282 PCHE 16b Wann 3 1 1 angacaonacagaon60 00 00 00 001 650 050 O00000686 rB2n2 8B 16b 1 Eoi 1 Dodoo oooRoo0ooo 00 00 00 001 650 100 000
106. 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 Non maskable Interrupts When using this product do not use the non maskable interrupts listed blow If one of these non maskable interrupts contends with another interrupt the occurrence of the intended non maskable interrupt may delay Note however that this does not apply for the actual MCU 1 Watchdog timer 2 Oscillation stop detection 3 Voltage monitor 1 4 Voltage monitor 2 R20UT0455EJ0101 Rev 1 01 AS Page 215 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 7 Hardware Specifications Note on Program Stoppage and Hardware Breaks If an operation to stop the program is performed or a hardware break occurs in the emulator debugger be aware that the program does not stop until after the period described below ends Providing that interrupts are enabled a period from when a request for an interrupt whose priority level selected by a register bit is higher than the IPL is generated till when the interrupt routine is entered Note If the above interrupt request is for an interrupt nested in another or disabled by clearing the I flag to 0 it will take a longer time than otherwise before the interrupt routine is entered In this case the timing with which
107. The only file extension available is cdv An error message will appear if any other file extension is entered The files you add will be listed in the Load Coverage Data dialog box The files will be loaded in the order in which they are listed If necessary use the Up or Down button to change the order R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 177 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 13 Viewing Realtime Profile Information 5 13 1 Viewing Realtime Profile Information The E100 emulator has code coverage data coverage and realtime profile functions usable exclusively to each other To use the realtime profiling function choose Realtime Profile in the Switching function section on the System page of the Configuration properties dialog box Realtime profiling 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
108. Timestamp Display The timestamp displayed in the Trace window can be switched to absolute time differential time or relative time In the initial state the timestamp is displayed in absolute time 1 Absolute time From the pop up menu choose Time Absolute Time or click the Absolute Time button in the toolbar The timestamp will be displayed by an absolute time since program execution started 2 Differential time From the pop up menu choose Time Differences or click the Differences button in the toolbar The timestamp will be displayed by a differential time from the preceding cycle 3 Relative time From the pop up menu choose Time Relative Time or click the Relative Time button in the toolbar The timestamp will be displayed by a relative time from a specified cycle R20UT0455EJ0101 Rev 1 01 AS Page 137 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 pop up 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 pop up menu or click the Analyze Execution History button in the toolbar the emulator starts analyzing the execution h
109. 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 FJ Bookmark is set Software break 1s set S PCpoition S R20UT0455EJ0101 Rev 1 01 AS Page 90 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 5 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 Define Column Format from the pop up menu 2 The Global Editor Column States dialog box will be displayed Global Editor Column States Iw Code Coverage Disassembly Address i Breakpaints MS Breakpaints ASM A Ill Figure 5 7 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 pop up 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 v Code Cov
110. a Cycle Label Address Dats BUS BHE BIU B W RWI CPU ON BUSACC Debug EV ELG ELCOVLAP TimeStemp himis ms us nsj Figure 3 29 Trace window The following describes the trace facility and its setting R20UT0455EJ0101 Rev 1 01 AS Page 56 of 228 Dec 16 2011 RENES ROE521500MCUOO0 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 break conditions Click the right mouse button anywhere in the Trace window and choose Acquisition from the pop up menu that is 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 m ier conditions piece z Detail DES VLCYGIET Figure 3 30 Trace conditions dialog box free trace 2 Set a software break in a line of the tutorial function where p sam s0 a 0 is written R20UT0455EJ0101 Rev 1 01 Page 57 of 228 Dec 16 2011 RENESAS ROE521500MCUO0 User s Manual 3 Tutorial 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 Trace i mV wA XzimmIESX i iagago Label Address Data BUS SHE BIU B W RWT CPU OH BUSACC Debug EV
111. a as a single file R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 162 of 228 ROE521500MCUO0 User s Manual 5 Debugging Functions 5 11 20 Displaying Code Coverage Information in the Editor Window When the Editor window is open in the source mode the results of coverage are displayed in its Code Coverage column Part of the Code Coverage column that corresponds to a source line where an instruction has been executed is highlighted If the user changes any setting regarding the coverage information in the Code Coverage window the content of the corresponding Code Coverage column will also be updated a Tutorial c oid tutorial void long a 10 long j int i struct Sample far p sam p sam malloc sizeof struct Samplel init p sam for i90 ici0 i J randi if j lt Of J j Figure 5 101 Example of code coverage results R20UT0455EJ0101 Rev 1 01 AS Page 163 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 12 Acquiring Data Coverage 5 12 1 Acquiring Data Coverage The E100 emulator has 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 page of the Configuration Properties dialog box Data coverage is the function to indicate what kinds of accesses have been made
112. a bag make sure to use the conductive plastic bag supplied with the product usually a blue bag If you use a different bag it may lead to further trouble with your product due to static electricity Caution to Be Taken for Disposal Qo Penalties may be applicable for incorrect disposal of this waste in accordance with your national legislation European Union regulatory notices The WEEE Waste Electrical and Electronic Equipment regulations put responsibilities on X producers for the collection and recycling or disposal of electrical and electronic waste Return of WEEE under these regulations is applicable in the European Union only This equipment gue including all accessories is not intended for household use After use the equipment cannot be disposed of as household waste and the WEEE must be treated recycled and disposed of in an environmentally sound manner Renesas Electronics Europe GmbH can take back end of life equipment register for this service at http www renesas eu weee R20UT0455EJ0101 Rev 1 01 AS Page 8 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual Contents Contents Page GUJEL 16 Tell Package JOM elo a MIENTO TT Eom 16 1 2 Other Tool Products Required for Development sseeeessesssssseseeseeeeeeeeennnn nennen nennen nennen nnn 16 Lo SION Ce OMIIOUIN AION MEET Em 17 1 3 1 System COPIE LOT cessie a
113. aas 77 4 8 1 Specifying a Download Module isssssssseseseesssseeseenne nennen nennen nna nnns nnn 77 4 8 2 Setting Up Automatic Execution of Command Line Batch Files seeeeesssssess 78 5 Debugging FUNCUONS RET u EEE 79 5 1 Setting Up the Emulation Environment cccccccssccccccsssseccceeeecececeeaeeeeeeeseaececessaaeeeesssaaeeeesseaegeeeeesssaneeeess 80 9 1 1 Setting Up the Emulator at Startup sssssesssssssssssseeee nennen nennen nnn nnns 80 5 1 2 sI miseldeai Jdu io 400m 81 9 1 9 Seting Up INS SYSIOM TO E TORTE 83 5 1 4 Seting Up Flash ROM EQUI ie esas enccicsssceacanoaceasouanatncsaenccansanwganectveaclesacenaceecuoidiavacteqzecanansndertee 85 5 1 5 Setting the Warning of Exceptional Events cccccccccccccssseeeeeeeeeeeeeeeeeeeeeeessaeeeeeeeeeessaaaeeeeeeees 86 5 1 6 Showing Progress in Boot up Processing cccccccccceccseeeeeeeeeaeeseeeeeseeeseeeseeeeeeeeeeseeeeeeessenseeeeeeas 87 5 2 Downloading a Program ssssssissssssssessesseee nennen nenne nnn nnns nna sinn siena annis sssa nire sisse a sese sss na nnns 89 5 2 1 D wnloadng a FF ON AU PTT T D OmU e a E E 89 5 2 2 Showing the Source Code cccccccccsseseeeeeeeececaaeseeeceeeeeaeeeeeeeeeeeeseeeuseeeceeeessesaeaeeeeeeessaaeeeeeeeees 89 5 2 3 Turning columns in all source files off nnns 91 5 2 4 Turning columns in one source file off
114. able 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 check box unselected disabled Hardware Break or condition and combination setting v OR condition Event in use 0 Detail Other conditions Janne Accumulation L Event in use 0 Detail Exception Break mM OF Point BP Total O Event ERE Delayicycle Tos Exceptional events Figure 5 42 Hardware Break dialog box Table 5 11 OR condition L Type Description 000000 OR condition Breakpoint is encountered when any one of the set events occurs R20UT0455EJ0101 Rev 1 01 AS Page 116 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 is unselected Hardware Break or AND Accumulation condition and combination setting v OR condition Event in use 0 Detail Other conditions Lal aD Accumulation T Sides
115. ageeeees 49 J13 omde Stepping a Progra saree eee OTT 49 3 13 1 SC UII p MN OMNI Nae E OOo UU 50 3 13 2 Executing the Step Out Command eeeissssssssesssseeeeeeeennn nennen nnne nnn nnns nna nnns 51 3 13 3 Executing the Step Over Command essesssssssssesseeeeeeeeeen nnne nennt n nnne nsns nana nnns 52 3 14 Forcibly Breaking a Program sssssseesssssseseseeseeeeen nennen nennen nnne nnne nnns nan n nns nan nnns nnn nna nnn nnn 53 R20UT0455EJ0101 Rev 1 01 RENESAS Page 9 of 228 Dec 16 2011 ROE521500MCUOO User s Manual Contents 3 15 Hardware Break Facilily EE 54 3 15 1 Stopping a Program when It Executes a Specified Address ccccccccecceeseceeeeeeeeeeeeeseeeeeeeeeas 54 3 16 Stopping a Program when It Accesses Memory ccccccsseeeeeececeeeceaesseceeeeeeeaaeeeseceeeeeesseaeseeeeeesssaaaseeeeeeeeees 55 SAri RR 56 3 17 1 Showing the Trace Information Acquired by Fill Until Stop sseeeeereeeeeee s 57 3 17 2 Showing the Trace Information Acquired by Fill around TP seeeeseeeeeeeeeees 60 3 17 3 Showing a Function Execution History ccccceeecccecceseeeceeeceeeeeeeseeeeeeeeeeeeeeeeeesseaeeeeeesaeeseesssaaees 62 owe Mauer mn T Q 64 EO aC TC meli M T TU Mm 66 MO TEST RSS S NER 67 2
116. al Check the LEDs on the emulator 1 Check the connection of power cable Normal See 2 5 Connecting the Emulator Power Supply iew the Device setting dialog box of the emulator debugger Not normal Error displayed Normal 1 Check the operating environment of the emulator debugger See 5 1 Setting Up the Emulation Environment 2 Re install the emulator debugger View the Configuration Not normal Error displayed properties dialog box of the emulator debugger Normal See 6 3 2 Configuration Properties Dialog Box Does Not Appear in Booting up of the Emulator Debugger View the Connecting dialog box of the emulator debugger Normal See 6 3 3 Errors Occur in the Connecting Dialog Box Not normal Error displayed Error displayed View the Editor window of the emulator debugger Normal See 6 3 4 Errors Occur in booting up of the emulator debugger The emulator debugger has started up Figure 6 1 Flowchart for remediation of trouble R20UT0455EJ0101 Rev 1 01 AS Page 209 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 6 Troubleshooting Action in Case of an Error 6 2 Error in Self checking When an error occurs in self checking check the following items 1 Re check the connection between the E100 emulator main unit and the MCU unit 2 Download the proper firmware again 3 Check the error log from self checking by the debug
117. al selected To select the measurement interval 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 20ns Approx 6 hours 06 minutes 30 seconds 4 Approx 48 hours 52 minutes 01 seconds l6 l6us o 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 R20UT0455EJ0101 Rev 1 01 AS Page 144 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 11 Acquiring Code Coverage 5 11 1 Acquiring 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 assembly language level This function allows the emulator to acquire instruction execution information from a program without causing it to break Therefore the realtime operation of the user program will not be affected The coverage result is updated upon a break The E100 emulator supports CO instruction coverage and C1 branch coverage Table 5 27 Code cove
118. alog 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 199 of 228 Dec 16 2011 ROE521500MCUO0O0 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 l t El x Trace on Exception Option P iM dels dala Fill around TP condition and combination setting v OR condition Eventinuse O Detail Other conditions Mine lo EE Event in use 0 Detail ception Total O Event Exceptional Detail events Delavievcle am Record condition f ol Capture Do not capture vw Step execution is recorded Event in use 0 Event used Free 16 Detail Registered events Load Help Apply Close Figure 5 150 Trace conditions dialog box E R20UT0455EJ0101 Rev 1 01 AS Page 200 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 IE X nl x Trace on Exception option Violation af access protection Detail Read fr
119. aluation 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 is 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 Generate 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 on Stopping the Flash Memory When debugging in the state that the flash memory is stopped do not operate windows until the program stops at the breakpoint by setting the breakpoint at the line of the program which will be executed after the state is cancelled Note on the Low current consumption Read Mode Do not stop the user program during the low current consumption read mode If the user program is halted during the low current consumption read mode values in the flash ROM area cannot be read correctly until the MCU is reset thereafter R20UT0455EJ0101 Rev 1 01 AS Page 221 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications Note on Stop and Wait Modes Do not single step an instruction shifting to st
120. and adapters are not covered by the aforementioned repair In the above cases contact your local distributor If your product is being leased consult the leasing company or the owner R20UT0455EJ0101 Rev 1 01 RENESAS Page 224 of 228 Dec 16 2011 ROE521500MCUO0 User s Manual 8 Maintenance and Warranty 8 4 Repair Provisions 1 Repairs not covered by warranty Problems arising in products for which more than one year has elapsed since purchase are not covered by warranty 2 Replacement not covered by warranty If your product s fault falls into any of the following categories the fault will be corrected by replacing the entire product instead of repairing it or you will be advised to purchase a new product depending on the severity of the fault Faulty or broken mechanical portions Flaws separation or rust in coated or plated portions Flaws 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 A wide range of faults that make replacement less expensive than repair Faults that are not locatable or identifiable 3 Expiration of the repair period When a period of one year has elapsed after production of a given model ceased repairing products of that model may become impossible 4 Carriage fees for
121. ardware Break dialog box 1 Select the Exception check box on the Hardware Break sheet and then click the Detail button Hardware Break Figure 5 137 Hardware Break dialog box 5 Debugging Functions 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 m CM I Realtime prone overhiow mie Detail evertused Seis Deni pestered vets i l i i Figure 5 138 Hardware Break dialog box R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 190 of 228 ROE521500MCUO00 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 02 ME MR top ODOFODDO OO0F1FFF Seales 03 BKE OOOF 2000 000F29E3 TE Delete 04 kB INT V DODFEDDU OO0FEOFF Read Only Delete the black 04 BkE ODOFFFDC ODOFFFFF Read Only Delete all Figure 5 139 Violation of access protection dialog box 4 Click the Update button and the access attributes will be updated according to the section information in a download module 5 To add an access attribute manually click the Add button The Access protect
122. button in the toolbar 3 6 2 Executing the Program zl 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 is reached An arrow will be displayed in the S W Breakpoints column to indicate the position at which the program has stopped loj x BKE a long a i 0 aii E long 3j 25 int i 26 struct sample far p sam 27 20 FazEsS p sam malloc sizeof struct Sample 29 FaGzFD initip sam 3 31 F5309 fori i 0 i cl1D i ji 32 Fa8314 J randi 33 F6320 iffj Of 34 Fa325 35 i 36 Fa3z2E alil 3 37 i 30 F6344 39 Fa342B Change al 40 41 Fa35z p Ssam gt Ss0 al O 42 FG362 p sam 2l1 a 1 43 F83785 p sam az a z 44 ra838c p sam s3 a 3 45 FG3 a2 p sam 4 a 4 6 FS83B8 p sam a5 a 5 47 FaG3CE p sam s6 a 6 45 FSO3E4d p sam s7 a 49 Fa83F p sam s8 a a8 50 F6410 p sam sS9 a 58 el gem S free p sam 52 Fad3z p sam NULL nd Figure 3 5 Editor window program at a break R20UT0455EJ0101 Rev 1 01 Dec 16 2011 Page 42 of 228 44 N SAS ROE521500MCUOO 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 a
123. called To exit the sort function choose Step Out from the Debug menu or click the Step Out button in the toolbar a Figure 3 21 Step Out button 14 oid maini void zi 15 F be 16 Fre while 41 1 17 FSGZEU rturoriali 18 FGZES k 18 F amp 2E5 z Zi moid Cutorial woid fe FGZE6 ao lang a 10 24 long j 25 int i 26 Struct Sample far p sam at zB FGSGZES p sme malloc sizeof struct Sample 29 66Fa eFo init p seam 30 31 F309 for i70 1410 i Jf 32 FGS14 3 rama 33 FB8320 ifi D ES 34 FH325 z ue CH R R OPA x om uo sm 36 FB32E ari 4 m type 2 j E i Ox000beS signed long 10 3B Fa8G344 sort ai E a E EE A ES E N aaa An uve e R Ox0006e5 signed Long a R Ox0006e9 signed long 41 F352 p sam a20 a 0 R Ox0006ed signed Long pa opi pe ea R Ox0006f1 signed Long i p sam s2 ma E i 1 44 Fm3mc i p m sjenriis R OxODDE 5 gigned long 45 F342 p snm 354 7a 4 R xOQDDS6f9 aigned Long 46 FEES p asam a5 a 5 R OxO006fd signed long s pere P sanata a R Ox000701 signed long p_sam S i i 48 FaarA ee ae R Oxd00705 signed long 50 Fe4 10 p sam 29 a 9 R Ox D07 059 aigned Long 51 F426 free p zai i Ox000715 signed int Current Scope a2 FB43Z p fam NULL tA EHE i wiateha A Watch A Watcha Lo tatatch l i EI
124. components Item ROES21500MCU00 Oscillator module 16MHz ROE001000FLX10 ROES21500MCU00 Release Notes ROES21500MCU00 Release Notes Repair Request Sheet English Repair Request Sheet CD ROM M16C R8C E100 Emulator Software M16C R8C E100 Emulator Debugger Included User s Manual Please keep the ROE521500MCUOO s packing box and cushioning materials at hand for later reuse in sending the product for repairs or for other purposes Always use the original packing box and cushioning material when transporting the MCU unit f you have any questions or are in doubt about any point regarding the packaged product contact your local distributor 1 2 Other Tool Products Required for Development To proceed with the development of a program for R8C Family R8C 5x Series MCUs the products listed below are necessary in addition to those contained in the package and listed above Procure them separately Table 1 2 Other tool products required for development Product Emulator main unit E100 ROEO001000EMUOO Converter board for a 48 pin 0 5mm pitch LQFP of the R8C 5x Series ROES3054ECFK60 Converter board for a 64 pin 0 5mm pitch LQFP of the R8C 5x Series ROES3036ACFK40 Converter board for R8C 36A 36C 36E 36F 36G 36H 36M 36W 36X 36Y and 36Z Groups To purchase the product contact your local distributor R20UT0455EJ0101 Rev 1 01 AS Page 16 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 1 3 S
125. 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 pop up menu The next instance of the trace record will be searched for 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 search 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 setti
126. cted sheet to a file Selecting Save Data from the pop up menu opens the Save Data dialog box ave Data Sections m File Name gt Browse Cancel vw Always save to this file when saving the session Figure 5 125 Save Data dialog box Enter a file name in which you want the information to be saved If a file extension is omitted cdv will automatically be added as the file extension If you specify an existing file name the file is overwritten 5 12 16 Loading Data Coverage Information from a File You can load a data coverage information file Selecting Load Data from the pop up menu opens the Load Coverage Data dialog box Load Coverage Data Load Mode eerte test ody Os OOO00000 Over wnte teste ody Ox OO 000000 Menge tesi 13 edv Ce DOOU0000 Clear coverage RAM before loading Figure 5 126 Load Coverage Data dialog box R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES 5 Debugging Functions Page 176 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions Clicking on the Add button opens the Add coverage data file dialog box shown below 2 x File Mame gt Browse Offset ox000000 Coverage Data Load Made wenwrite C Merge UF Cancel Figure 5 127 Add coverage data file dialog box Use this dialog box to specify a coverage information file you want to load You can also specify a load mode and offset for each file you load
127. d Address Range dialog box 3 The address range you have added will be displayed in the upper pane of the Data Coverage window Data Coverage Xx e 9 pm zy wt x QOOS12 ODS3E 000512 RAM 40 52 e3 fc OO0516 EAM al a8 18 e7 000514 RAM 3d 71 TE Oe 00051E RAM d Oa la fa 00052 EAM 10 19 7 35 mG Address Range Task Stack Figure 5 109 Data Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 168 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 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 pop up menu Data Coverage 1 Xx mx m Ef wt Percentage Edit Range Delete Range z OOOS512 OOOS516 RAM a ie i s OO00514 RAM 3d 71 Ff Z OOOS1E RAM d Oa la fa 000522 RAM i 19 f7 35 mG Address Range Task Stack Figure 5 110 Data Coverage window 2 In the Edit Address Range dialog box that is displayed change the address range Edit Address Range Start Address joo Bl Cx End Address t fal Cancel Figure 5 111 Edit Address Range dialog box 3 The address range you have changed will be displayed in the upper pane of the Data Coverage window DataCoverage u wi qu xf tx
128. d 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 pointis encountered Execution stop Figure 5 48 Differences between the trace modes Specifiable conditions vary depending on trace mode as summarized in the table below R20UT0455EJ0101 Rev 1 01 AS Page 123 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Dela
129. data to be sorted and calls the sort and the change functions in that order The sort function inputs an array that contains the random data generated by the tutorial function and sorts the input data in ascending order The change function inputs 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 R20UT0455EJ0101 Rev 1 01 AS Page 37 of 228 Dec 16 2011 RENES ROE521500MCUOO 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 is given below OS installed drive Workspace Tutorial E100 R8C Tutorial For the file specify the one that is shown below Open Workspace aed cy aah Look in c Tutorial d fe Tutorial hws File name Tutorial hws Files of type HEW Workspaces hws L ancel Figure 3 1 Open Workspace dialog box y 3 3 Connecting the Emulator When the debugger is connected to the emulator
130. de coverage information 5 11 15 Updating Coverage Information Selecting Refresh from the pop up menu updates the content of the Code Coverage window If Lock Refresh has been selected the information is not automatically updated when the program breaks To view the latest information therefore you need to update manually 5 11 16 Preventing Update of Coverage Information Selecting Lock Refresh from the pop up menu prevents update of the Code Coverage window while the user program execution is stopped R20UT0455EJ0101 Rev 1 01 AS Page 159 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 11 17 Saving the Code Coverage Information to a File You can save the code coverage information of the currently selected sheet to a file Selecting Save Data from the pop up menu opens the Save Coverage Data dialog box verage Data Address Ranges File name P Browse ENS v Always save to this file when saving the session Figure 5 95 Save Coverage Data dialog box Enter a file name in which you want the information to be saved If the file extension is omitted cov will automatically be added as the file extension If you specify an existing file name the file is overwritten 5 11 18 Loading Code Coverage Information from a File You can load a code coverage information file Selecting Load Data from the pop up menu opens the Load Coverage Data dialog box l oad Coverage Data
131. ditor 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 3 Adding events by dragging and dropping When dragging and dropping the variable and function names in the Editor window 1 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 gt 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 E 2 We Hardware Break lsorthlong a Hardware Break OR 28 FBlBO0 2 r Event 30 Event T Descriptions Count TaskID Comme 31 4 F Address sort 2 32 F81B6 rJ gt Address OO6DC Size WORD 33 FB81BS9 while gap gt O if 44 F81c2 Eor k O ktg 35 FBlCF for i kti Figure 5 31 Editor window and Hardware Break dialog box When dragging and dropping the address range in the Memory window Select memory content in the Memory window and drag and drop it into the Event column That way yo
132. duct damage Warnings to Be Taken for Handling this Emulator Do not disassemble or modify this emulator Personal injury due to electric shock may occur if G this emulator is disassembled and modified Disassembling and modifying the emulator 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 CN get wet Spilling water or some other liquid into the product may cause un repairable 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 R20UT0455EJ0101 Rev 1 01 AS Page 7 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual Important NCAUTION Cautions to Be Taken for the AC Adapter Use only the AC adapter included in this product Do not use the AC adapter for other equipment Cautions to Be Taken for Turning On the Power Qo Turn ON OFF the power of the emulator and the 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 Use caution when handling the emulator Be careful not to apply a mechanical shock Do not touch the connector pins of t
133. duxCivind ceno a Mars obi au te satia URN Md 115 5 8 3 Saving Loading the Set Contents of Hardware Breaks ccccccccssssseeeeeeeseeeeeeeeeeessseeeeeeeeeeees 118 5 9 Looking at Trace Information eeeeeeilsseeseeeeeeeeeeeeee seen nn nnn nnnn nnne nennen 119 5 9 1 Looking at Trace Information seesssssssssssssesseeeeeseee nennen nennen nnn nnne nnne senes 119 5 9 2 Acquiring Trace INfOrMAtION ccceeeceeceeeeeeeeeeeeeeeeeeeeaeaeeeeeeeaaaaeeeeeeeaeeeeeseaaeeeeeesaaeeeeessaaeeeeeess 119 5 9 3 Setting Trace Information Acquisition Conditions sseeeeessseeeeeseeeeeeee nnne 121 5 9 4 Setting Trace MOCES ccccccseeecccceccceeeeseeceeeeeceaeeseeceeeeeseeeeeseeeeeeesseeseeeeeeeesssaeseeeeeeeessssaaseeeeeeees 123 5 9 5 SEUNG Trace POMS ensesine Soa ines tindatee es Sea EEEE EEEE EEEE E 125 5 9 6 Setting Capture Do not Capture Conditions cccccccccseeecceceeseceeeeeeseceeeceeseceesseueeeeeesaaneeeess 129 5 9 7 Selecting the Content of Trace ACQUISITION cccccccccccsssseeeeeseeeeeeeeeeeeeeeeeseeaaaaaeaaseeeeeeeeeeeeeeeees 131 5 9 8 Showing Trace Results ccccccccccsssseeccceeeeececceeeeccecceeaueeeeeseeaeeeescsuaeeesssaasecessseageeeesssageeeeess 132 5 9 9 Filtering Trace Information lsssesssessssssssseseeeeeeen nennen nennen nennen nnn nnne rnnt 134 5 9 10 Searching for Trace RECOIS cccccccsssssssssssseeeeeee
134. e 203 5 16 Using the Trigger Output Function sseeeeeesssseeeeeseeeeeeeeennnnn nnne n nnn nennen nsns arn nnn nens 204 5 16 1 Using the External Trigger Cable for Output eeeeeeeessesseeeeeerneeeeenennn nmn 204 5 16 2 Opening the Trigger Output Conditions Dialog BOX eeeeeessssseeeeeennneenneennnn 205 5 16 3 Manual Setting for Output through Trigger Pins 31 to 24 eeseseeeeeeeeeeeeeeeeeeee 206 5 16 4 Setting for Output through Trigger Pins 20 to 16 ccccccccseeeeeeeeeeceeeeeeeeeeeeeeeaaaaceeeeeeeesaaaases 207 5 16 5 mum EE AEE E E 208 R20UT0455EJ0101 Rev 1 01 RENESAS Page 12 of 228 Dec 16 2011 ROE521500MCUOO User s Manual Contents 6 Troubleshooting Action in Case of an Error nennen nennen nnne nnn nnne nnn nnns nnn nnns 209 6 1 Flowchart for Remediation of HEOUDIG iieri eec roots Sape E Fr Ute ees 209 SEA m TOIT oe CMEC T Do ETE 210 6 3 Errors Reported in Booting up of the Emulator ccccceescccccsssseeeeceeeeeeecceeesseeeeceeeaeceeeseeaaeeessaaseesesessaaass 211 0 4 HowTo FRREGUCST SUDO TORRE E E ECT 213 7 Hardware SPSCIICATIONS ERNEUT TT segnnentdacoundeuersuncunaddasessenaestondecsensuceds 214 Fo Target MCU SPC e iei e ETE rm 214 7 2 Differences between the Actual MCU and Emulator sse 215 Hd COMME eie dB iof a e 218 7 9 Connection Diagram of the ROE521500MCUJOJO
135. e Measurement Tasks ccceeeeecccceeeceseeseeeeeeeeeceaeeseseeeeessuaaaeeeeeeeeessaaageses 185 5 13 10 Loading Task Profile Measurement Tasks cccccccceccseeeeeeeeeeeeeceeseeeeseeeeseseeeeseaeeeesaeeeesnaeees 185 5 13 11 Clearing Realtime Profile Measurement Re SUItS ccccccseeeceeeeeeeeeeeeeaeeeeeeeseeeeeeeeeesaeaeeeeeeeas 186 5 13 12 Saving Realtime Profile Measurement Results cccccccccsseseeeeeeeeeeeaeeeeeeeeeeeeeeeeeeeeeeeesesaeaeees 186 5 13 13 Setting the Measurement Interval suss ekucas ian Pe biv veto cocera Toskexupa a PisHPE CoU C beer FR FruiFE CRe Cr dran a Ege 186 5 13 14 Maximum Measurement Time of the Realtime Profile seeeeeseeesereeeerreee 187 5 14 Detecting Exceptional Events cccccccssseccceeeeecssececseseeecceeseeessaueeeceeeecseuseeessadeeessaaseesseseesssageeessageees 188 5 14 1 Detecting Exceptional Events ccccccccccssscecceseeccseseeeceeuseecceaseeessaueeeseaseeeeeaseeessageeessaneeesseaaes 188 5 14 2 Detecting an Access Protect Violation sees nnne 188 5 14 3 Setting an Access Protected Area sseesssssssssssesseeeeeeeeenennnn nennen nnn nnn nnne nsns nna nnns 190 5 14 4 Detecting Initialization Omitted 2lsseeeeeeeseseeseseeeeeeee nnne nnns 194 5 14 5 Detecting Stack Access Violation seeesssssesssssssessssseeeeee nennen nennen nennen nnne 195 5 14
136. e measurable range fiat Execution start from function a gH hiji kiji el jt h I 1 I Range that can be measured Figure 5 128 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 execution 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
137. e time measurement counter for a section has overflowed Realtime profile overflow An error is detected when the maximum measurable time or maximum measurable number of passes is exceeded during profile measurement of a function or a task Trace memory overflow An error is detected when the trace memory has overflowed Task stack access violation An error is detected when one task attempts writing to the task stack of another task OS dispatch An error is detected if a task dispatch has occurred 5 14 2 Detecting an Access Protect Violation Violations of access protection such as writing to a ROM area or access to an unused area for reading writing or execution of an instruction can be detected as 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 R20UT0455EJ0101 Rev 1 01 AS Page 188 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 3 Methods for setting protection There are fo
138. e user system is properly grounded GND Target Status RESET LED does Connected 1 Check that the reset pin of the user system is being 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 R20UT0455EJ0101 Rev 1 01 AS Page 211 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 6 Troubleshooting Action in Case of an Error 2 Configuration Properties Dialog Box Does Not Appear in Booting up of the Emulator Debugger Table 6 2 Points to check for errors in booting up of the emulator debugger 1 Point to check Communication initialize error Check all emulator debugger settings and the connection of the interface cable A communication error See 4 Preparing to Debug page 66 3 Error Occurs in the Connecting Dialog Box Table 6 3 Points to check for errors in booting up of the emulator debugger 2 Point to check MCU unit is not connected Re check the connection between the E100 and the MCU unit See 2 3 Connecting the MCU Unit to and Disconnecting it from the E100 Emulator Main Unit page 26 The system configuration of the E100 emulator The combination between the emulator software and the MCU unit is not is not corresponding to the content of the correct Refer to the release notes of the emulator software and confirm E100 ENV file the combination between the emulator software and the MCU unit Check
139. earing RAM Monitor Access History Choose Access Data Clear from the pop up 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 pop up menu of the RAM Monitor window The detected data of all uninitialized memory and unrefered memory of the RAM monitor area will be cleared R20UT0455EJ0101 Rev 1 01 AS Page 95 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 5 4 Showing the Current Status 5 4 1 Showing the Emulator Status 5 Debugging Functions 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 ae This window does not update the displayed status during program execution Status MEU status 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 Cause of last break EI Target Ready Po FOOOO TaskID OO 00 00 000 000 000 Figure 5 12 Status window The Status window has the following four sheets Table 5 7 sheet lis
140. eason 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 lt Nec E 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 29 of 228 Dec 16 2011 ROE521500MCUO00 User s Manual 2 Setup 2 7 Self checking Self checking is to check if the emulator functions operate properly To run the self check function of the emulator follow the procedure below While the self checking is in progress the states of the LEDs will change as shown in Figure 2 6 In case of ERROR because the states of the target status LEDs will change depending on the types of 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 self checking will start If the normal resu
141. ecifications 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 R20UT0455EJ0101 Rev 1 01 AS Page 219 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications 7 4 2 External Dimensions of the Converter Board ROE53054ECFK60 Figure 7 3 shows external dimensions and a sample foot pattern of the converter board ROE53054ECFK60 for a 48 pin 0 5mm pitch LQFP of R8C 5x Series LJ TP1 GE 100 CN1 a 51 C1 eo gt cO m Z c TU gt Z U o T D TP2 ROE53054ECFK60 HEV A Unit mm Figure 7 3 External dimensions and a sample foot pattern of the ROE53054ECFK60 7 4 3 External Dimensions of the Converter Board ROE53036ACFKAO Figure 7 4 shows external dimensions and a sample foot pattern of the converter board ROE53036ACFKAO for a 64 pin 0 5mm pitch LQFP of R8C 5x Series the same converter board for R8C 36A 36C 36E 36F 36G 36H 36M 36W 36X 36Y and 36Z Groups Unit mm Figure 7 4 External dimensions and a sample foot pattern of the ROES3036ACFK40 R20UT0455EJ0101 Rev 1 01 AS Page 220 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications 7 5 Notes on Using the MCU Unit Notes on using the MCU unit are listed below When you debug an MCU using the MCU unit be car
142. eeeeeeeaaaeeesseseeeeeeeeeeeeesseaaaaaeassseeeeeeeeeeeeeseeseaes 135 5 9 11 Saving Trace Information to Files cccsssesssssseeeeeeeeeeeeeeeaaeeeeeseeeeeeeeeeeeeeseesaaaaaeaseeeeeeeeeeeeeeeeees 136 5 9 12 Loading Trace Information from Files essere nnns 137 5 9 13 Temporarily Stopping Trace Information ACQUISITION cccccceeecccceeeceeeeeeeeeseeeeeeseaeeeesaeeeeeas 137 5 9 14 Restarting Trace Information ACQUISITION ccccsesccecseeeeeeeeeeeeeueeeeeeeeeeeseaeeessaeeeesaeseesaeeeeeens 137 5 9 15 Switching Timestamp Display cccccccccceecccecceeeseeeeeeeeeseeeeeseeeseeeeeeeeeeeesseaeeeeeesseeseeeeesseeseeeeaas 137 5 9 16 Showing the History of Function Execution ce ceeeeccececeeeeeeeeeeeeeeeeeaeaeeeeeeeeeeesaaaaeeeeeeeseaeaaeees 138 5 9 17 Showing the History of Task Execution sessi 139 el OIC AS UIE lt OFM VAIAG REPRE EE Em 140 5 10 1 Measuring Pertormialie 6s sexecsirsesermatuanecesiecaiacivecicananninctiaacuenti dice so ieadenindenpeirtaanetsnamdusacocoulancetstvaninastneads 140 5 10 2 Showing the Result of Performance MeaSuremMent ccceeseeeeeeeeceeeeeeeeeeeeeeeaaeaceeeeeeeeseaeaaees 140 5 10 3 Setting Performance Measurement COnditions cccccccccessecceeseeeceeeceesseceeeeeeeeeeseeeegeeeeeeeas 141 5 10 4 Starting Performance Measurement cccccccccccccecceeeeeeesseeeeeeeeeeeeeeeeeesaaaeaegeeeeeeeeeeeeeeeesssaaaas 143
143. eful about the following precautions Note on the Version of the Emulator Debugger Be sure to use this product with the following emulator debugger M16C R8C E100 Emulator Software V 1 03 Release 02 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 re download the firmware Disconnect the MCU unit from the user system before you start downloading the firmware Notes on Self checking If self checking does not result normally excluding target status errors the product may be damaged Then contact your local distributor Disconnect the MCU unit from the user system before you start self checking Note on Quitting the Emulator Debugger To restart the emulator debugger always shut off the emulator power supply and then turn it on again Note on Display of MCU Status Status you can view in the Connecting dialog box of the emulator debugger shows pin levels of the user system Make sure that proper pin levels are selected according to the mode you use Note on Clock Supply to the MCU A clock supplied to the ev
144. en an event occurs under the condition specified in a state transition diagram State transitions R20UT0455EJ0101 Rev 1 01 AS Page 103 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functions 5 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 1 Creating a new event When creating an event from any setup dialog box 1 Click the Add button or choose a line where you want to input and double click Hardware Break elete Enable Disable Figure 5 23 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 wo i zi othar value Figure 5 24 Event dialog box R20UTO455EJ0101 Rev 1 01 Page 104 of 228 Dec 16 2011 RENESAS ROE521500MCUO0O User s Manual 5 Debugging Functions 3 An event will be added at the specified position Hardware Break OP Event TaskID_ Comment mevo F Address _main Figure 5 25 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 When adding an event from the Registered Events dialog box 1 Click the Add button in the Registered Events dialog b
145. en two events Detail Event in use Figure 5 46 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 Record condition group box Record condition f al C Capture Da not capture i Step execution is recorded T Detal Event in usa 0 Figure 5 47 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 R20UT0455EJ0101 Rev 1 01 AS Page 122 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Stopmode fBesmp on oo o oo 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 specifie
146. er registration refer to User Registration page 14 of this user s manual 8 2 Maintenance 1 If dust or dirt collects on this product wipe it off with a dry soft cloth Do not use thinner or other solvents because these chemicals can cause the surface coating to separate 2 When you do not use this product for a long period disconnect it from the power supply host machine and user system 8 3 Warranty 1 This product comes with a one year warranty after purchase Should the product break down or be damaged while you re using it under normal condition based on its user s manual it will be repaired or replaced free of cost 2 However if the following failure or damage occurs to the product under warranty the product will be repaired or replaced at cost a Failure or damage attributable to the misuse or abuse of the product or its use under other abnormal conditions b Failure or damage attributable to improper handling of the product after purchase such as dropping of the product when it is transported or moved c Failure or damage to the product caused by other pieces of equipment connected to it d Failure or damage attributable to fire earthquakes thunderbolts floods or other natural disasters or abnormal voltages etc e Failure or damage attributable to modifications repairs adjustments or other acts made to the product by other than Renesas Electronics Corporation 3 Consumables e g sockets
147. erage m Disassembly Address Turn Header OnJ Off Saat E SN IMEEM ven Instant Watch Y Label i30 To Cursor Hn 7 v Obj code Set Pc Here a Display PC Iw Sw Breakpoinks Y SI W Breakpoints ASM view Disassembly m Source Address Figure 5 8 Pop up menu window 3 Clicking a column name lets you enable or disable the column alternately R20UT0455EJ0101 Rev 1 01 AS Page 91 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 pop up menu The Disassembly window will be displayed The display start address in the Disassembly 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 sa 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 m E Oj x 7CF232 tutorial ENTE
148. ercial Sample version MCU R20UT0455EJ0101 Rev 1 01 AS Page 217 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications 7 3 Connection Diagram 7 3 1 Connection Diagram of the ROE521500MCUOO Figure 7 1 shows a partial circuit diagram of the connections of the ROE521500MCUOO This diagram mainly shows the circuitry to be connected to the user system Other circuitry such as that for the emulator s control system has been omitted R20UT0455EJ0101 Dec 16 2011 VDD1 7481053 _ PO 0 E S 33Q P2 0 P5 0 P5 0 P7 0 P7 0 P9 0 P9 7 PAO PA 7 eeen P9 0 PB 0 PB 0 PB 7 l PD 0 VDD1 PD_0 PD_7 PE_0 PE 6 PF 0 7491053 PF 0 PF 2 gt 0 T 22Q P4 2 VREF P4 2 VREF C L V 7481053 gt 33 Q P4_3 XCIN P4_3 XCIN gt o 000 guo VDD1 74910953 gt 33 Q P4_4 XCOUT P4_4 XCOUT D gt 74910953 gt 33 2 P4 5 1 VDD1 7481053 ie gt 33Q System P4 6 XIN XCIN P4 6 XIN XCIN D ia VDD1 777 77 7481053 gt 33 0 P4 7 XOUT XCOUT P4 XOUT XCOUT is ugue VDD1 7491053 gt 09 22Q MODE vop VDD1 RESET RESET VCC AVCC xo i NXCC AVCC CC2 VCC2 VCC3 AVCC VCC3 AVCC VSS AVSS VSS AVSS VSS2 VSS2 VSS3 AVSS3 VSS3 AVSS3 R8C 5X EVA CHIP H5E2bE500NFP Rev 1 01 Connected to the inside of the emulator Figure 7 1 Connection diagram for the ROE521500MCUOO partial 44 N SAS Page 218 of 228 R0E521500MCUO0 User s Manual 7 Hardware Sp
149. est and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas
150. ext 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 R20UT0455EJ0101 Rev 1 01 AS Page 67 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Welcome x DK Cancel Administration C Browse to another project workspace du 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 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 e
151. fetch condition is eel Sous 14 oid main void tutorial oid tutorial void 15 FBZDC 16 Fe2DCc while i FBZEU 16 FBSZzE3 HW Break Point 19 FS8Z2E5 t 21 22 FBZES5 g zs long a 10 i long J 25 int i 2 6 mom 4 US Tutoriale nal eor Figure 5 29 Editor window struct Sample far p sam 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 R Event Event Type Descriptions Count TaskID Comment i aed F Address FA2E0 Figure 5 30 Hardware Break dialog box R20UT0455EJ0101 Rev 1 01 Dec 16 2011 44 N SAS Page 107 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions When adding a trace point 1 Select the Trace Point from the pop up 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 E
152. form selected 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 6 After starting the High performance Embedded Workshop connect the E100 Emulator R20UT0455EJ0101 Dec 16 2011 Rev 1 01 RENESAS Page 73 of 228 ROE521500MCUO0 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 3 xl W elcame r3 Create a new project workspace Cancel Open a recent project workspace E Administration du Figure 4 10 Welcome dialog box 2 The Open Workspace dialog box shown below will appear Open Workspace Look in Cy E100 er E100 hws 2 x i Eg File name E1 OU hws Files of type HEW Workspaces hws L ancel zi 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 o
153. g box Enter a file name you want to load The only file extension available is rpf An error message will appear if any other file extension is entered 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 box are switched to function mode R20UT0455EJ0101 Rev 1 01 AS Page 185 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 13 11 Clearing Realtime Profile Measurement Results Choose Clear from the pop up 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 You can save the current realtime profile measurement results in text format Choose Save To File from the pop up 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 ex
154. ge 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 Cl 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 Cl level coverage The 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 Debugging the program using the CPU Rewrite Mode Select whether you want to debug the program using the CPU Rewrite Mode 7 Masking the terminal RESET Select whether you want the input signal to the RESET pin of the user system to be masked 8 Stopping all timer counts while the user program is halted Select whether you want to stop all timer counts while the user program is halted CAUTION The option Stops all timer counts while the user program has halted is inactive grayed out with M16C 64 Group M16C 64A Group M16C 65 Group M16C 50 Series and R8C 3x Series MCUs R20UT0455EJ0101 Rev 1 01 AS Page 84 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Funct
155. ger software and refer to the instructions given therein see Figure 6 2 Error occurred during the self check test dialog is displayed Click the OK button Check the log in the self check dialog box Refer to any instructions in the log Figure 6 2 Flowchart for checking of an error in self checking Notes on the Self checking Disconnect the MCU unit from a converter board and the user system before you start self checking If the results of self checking are not normal excluding status errors of the target system the product may have been damaged Contact your local distributor R20UT0455EJ0101 Rev 1 01 AS Page 210 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 6 Troubleshooting Action in Case of an Error 6 3 Errors Reported in Booting up of the Emulator 1 States of the LEDs on the E100 are incorrect Table 6 1 Points to check for errors indicated by incorrect states of the LEDs on the E100 Connection to Error Point to check the user system Check that the USB cable is connected See 2 4 Connecting the Host Machine page 27 SAFE LED does not light up MEM Re check the connection between the E100 and the MCU unit SAFE LED remains lit See 2 3 Connecting the MCU Unit to and Disconnecting it from the E100 Emulator Main Unit page 26 Target Status POWER LED Connected Check that power Vcc is being correctly supplied to the user does not light up system and that th
156. gt Detected write access do l being write accessed not exist Figure 5 144 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 R20UT0455EJ0101 Rev 1 01 AS Page 194 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 14 5 Detecting Stack Access Violation Setting the size of the stack too small in software development raises the possibility of a program going out of control or malfunctioning The E100 emulator actively detects abnormal access by the stack pointer 1 Setting a stack range By selecting a stack section it is possible to automatically set a stack range or you can enter any address range you want 2 Initial settings at startup At startup stack sections are automatically set However because address information is nonexistent those stack sections do not work until a program is downloaded 3 Detection method The emulator monitors the values of USP and I
157. han the user program as when memory is rewritten directly from external I O are not reflected in the displayed memory content R20UT0455EJ0101 Rev 1 01 AS Page 94 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 3 Detecting reading from non initialized areas If a memory area that has not been written to is read the emulator detects reading from a non initialized area and outputs an error To view errors of this type choose Error Detection Display from the pop up menu Non initialized memory areas are shown in yellow This error detection can be an exceptional event used as a condition of a hardware breakpoint or trace point also refer to Detecting exceptional events 4 Detecting uninspected areas If an initialized memory area has not been read the emulator detects an uninspected area and outputs an error To view errors of this type choose Error Detection Display from the pop up menu Uninspected memory areas are shown in sky blue 5 3 2 Setting RAM Monitor Update Intervals Choose Update Interval Setting from the pop up menu of the RAM Monitor window The Update Interval Setting dialog box shown below will appear Update Interval Setting 3 x Interval 10 10000mzec 10m unit 100 Msec Cansel Figure 5 11 Update Interval Setting dialog box The Update Interval can be specified separately for each window The initial value is 100 ms 5 3 3 Cl
158. he 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 emulator is connected signal ground with frame ground If your developing product is transform less not having isolation transformer of AC power this may cause electric shock Also this may give an un repairable damage to this emulator and your developing product While developing connect AC power of the product to commercial power through isolation transformer in order to avoid these dangers 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 is 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 outlet Do not use this as it is because of the danger of electric shock and or fire In this case contact your local distributor Before setting up this emulator and connecting it to other devices turn off power or remove a power cable to prevent injury or pro
159. he IC15 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 IC15 see Figure 2 7 EPSON TOYOCOM SG 8002DC DB Series power voltage 2 7 to 3 6V PC SC RUSSERT OUNETIET c SERRE ARROARRRORORIR ETE i 100 CN6 51 11 ja ON1 40a la CN2 40a p MEL POLQANRRPOSDUCUPUDQPDPDEPEPERES o H i Figure 2 7 Replacing the oscillator module CAUTION Notes on Replacing the Oscillator Module and Oscillator Circuit Board Always shut OFF power when replacing the oscillator module Otherwise internal circuits may be damaged When replacing the oscillator module remove it with a tool such as an IC extractor so as not to damage the board If the board is damaged the pattern on the board may be cut and the emulator may not be able to operate R20UT0455EJ0101 Rev 1 01 AS Page 32 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Xoyr And pin Xw should be open Choose User in the emulator debugger to use this clock Evaluation MCU Xour XIN Oscillator Oscillator output J circui
160. he data can be sorted by the file name Lines in the same file are sorted by function name Example File Function C0 Coverage filel cpp funcl 40 mmmm filel cpp func2 10 filel cpp func3 80 mmmmmmmm filel cppfunct 70 mmmmmmm file2 cpp funcl 20 mm file2 cpp func 60 mmmmmm file2 cpp func3 90 BEEEREEEEN file3 cpp funcl 096 file3 cpp func 30 mmm file3 cpp func3 10 m 2 Clicking on the CO Coverage column The data can be sorted by coverage rate First clicking on the column sorts the values in decreasing order Clicking on the column again sorts the values in ascending order Example File Function C0 Coverage file2 cpp func3 90 MERBEREEEEN filel cpp func3 80 mmmmmmmm filel cppfunct 70 mmmmmmm file2 cppfunc2 60 mmmmmm filel cpp funcl 40 mmmm file3 cpp func 30 mmm file2 cpp func 20 mm filel cpp func2 10 m file3 cpp func3 10 m file3 cpp funcl 096 R20UT0455EJ0101 Rev 1 01 AS Page 157 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 3 Clicking on the CO Coverage and the File columns in this order The data for each file is sorted by the coverage rate in descending order Example File Function C0 Coverage filel cpp func3 80 mmmmmmmm filel cppfunct 70 mmmmmmm filel cpp funcl 40 mamm filel cpp func2 10 m file2 cpp func3 90 mmmmmmmum file2 cppfunc2 60 mmmmmm file2 cpp funcl 20 mm file3 cpp func 30 mmm file3 cpp func3 10 m file3 cpp funcl 096 5 11 13 Sea
161. he emulator main unit and the target MCU connector pins directly Static electricity may damage the internal circuits When attaching and removing the cable hold the plug of the cable and do not touch the cable Do not pull the 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 Do not tape the flexible cable or apply adhesives to secure the cable The shielding material on the surface of the cable may come off Caution to Be Taken for System Malfunctions If the emulator malfunctions because of interference like external noise do the following to remedy the trouble 1 Exit the emulator debugger and shut OFF the emulator and the user system 2 After a lapse of 10 seconds turn ON the power of the emulator and the user system again then launch the emulator debugger Note on Transporting the Product When sending your product for repair use the packing box and cushioning material supplied with the product when it was delivered to you and specify caution in handling handling as precision equipment If packing of your product is not complete it may be damaged during transportation When you pack your product in
162. he 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 R20UT0455EJ0101 Rev 1 01 AS Page 203 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 16 Using the Trigger Output Function The trigger output function allows output of signals through an external trigger cable Trigger pin numbers 31 to 16 can be used for output Note however that operation of a trigger pin depends on its pin number Table 5 46 lists the trigger pin numbers and how they operate Table 5 46 Trigger Pin Numbers and Operation 31 to 24 These pins constantly output a signal either high or low can be selected A high level signal is output when a breakpoint is encountered A high level signal is output when a trace point is encountered A high level signal is output when specific trace data 1s extracted or discarded 20 to 16 An event can be specified for each of the signals and a high level signal is output when that event occurs Output is at the power voltage level of the user system If the MCU in use has two power supplies the level on VCCI will be applicable 5 16 1 Using the External Trigger Cable for Output You can specify input and output through the external trigger cable on the System page of the Configuration properties dialog box
163. he window is automatically updated Data Coverage X uw uo mu Ux OOOEO OOOESF TaskID 11 Entry task ll 0 DODA24 ODDAS7 TaskID 1 Entry main 4089 001000 Udi063 TaskID 16 Entry task i5j Ds OOOFS OOOFFF TaskID 15 Entry task l5 a8 EJ OOOAEC OOOB4F TaskID 3 Entry task n3 08 z OO0A40 RAM a OO0A44 RAM 000448 RAM OO0A4C RAM ad Bh Ja all mE Address Range Task Stack Figure 5 123 Data Coverage window task stack specification The Data Coverage window is vertically divided into two by the splitter The upper pane shows the automatically registered task stacks and access rates Table 5 39 Contents shown in the upper pane of the Data Coverage window Task Task stacks task ID task entry label Access Rate Access rate in percentage and graph The lower pane shows detailed information of the task stack selected in the upper pane Table 5 40 Contents shown in the lower pane of the Data Coverage window Address Address value Label This column is blank when the area is unused 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 the coverage information will not be updated by program execution The acquired coverage information is accumulated in memory until the user clears it R20UT0455EJ0
164. hen the main function is executed Trace conditions 0 x Trace OR Option Event DM MEME LL LL LU Add Delete Enable Disable Event used 1 Free15 Detail Registered events Figure 3 35 Trace conditions dialog box OR page 4 Choose Reset Go from the Debug menu A trace point will be reached and the trace content shown below will be displayed in the Trace window CCAP ZZ EP ear e E E Range O0000001 04194302 Fie Cyce 00000001 address OO07IE Time D0 00 00 001 305 820 Address BHE EIU B W RWE CPU QN BUSACC Debug EV 00000001 O00718 OF 16 I 00 00 001 305 620 oooo0001 OrBz BO 0 E oO a 1 1 Oooo ooooonoooooO oooooon2 DrBagDU F5 ib 1 1 FE 2 1 1 oooooooU0oOO00No 00 00 00 001 305 960 oo0o0003 Ors2H2 FEDO 165b D I R OF E 3 1 1 oo00o0000o000000 00 00 00 001 306 010 oo0o0004 DrBiH2 00 16b 1 1 EM 1 1 1 Dogaonoo0OOGDOOOOO 00 00 00 001 306 060 OO0G0005 rB2HE2 00 16b 1 1 c U 1 1 Dogacno0oOGDOOOOD 00 00 00 001 306 120 QUOODUO06 tutori FBZEG F27 ibb U IM A U i 1 DOOOR00000000000 00 00 00 001 3706 160 O000000T OFEBZES THIZ 16h U IM R U 4 1 1 oo00000000000000 00 00 00 001 706 220 no000003 0007193 E3 1b U DW H 4 1 1 DooooocoOoROOO000 00 00 00 001 706 260 o0000009 OOOT1A 82 165 1 DW W a d 1 pDonoabcnponocDODODD 00 00 00 001 704 320 apadopo1 DOD 1B OF 16b U DB W E E 4
165. icate operating state 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 being supplied to the user system OFF Power is not being supplied to the user system RESET Target MCU is being reset or reset signal of the user system 1s held low Target MCU is not being reset RUN User program is being executed User program has been halted Note on the Target Status POWER LED If your MCU has two or more Vcc pins the LED does not light up unless power is supplied to all the pins R20UT0455EJ0101 Rev 1 01 AS Page 19 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 1 4 Specifications 1 4 1 Product Specifications Table 1 5 lists the specifications of the ROE521500MCUOO Table 1 5 Specifications of the ROE521500MCUO00 Applicable MCU R8C Family R8C 5x Series MCUs Applicable MCU mode Single chip mode Maximum ROM RAM capacity 1 Internal flash ROM 4KB 128KB 07000h 07FFFh 08000h 27FFFh 2 Internal RAM 20KB 00400h 053FFh Maximum operating frequency Power supply voltage 2 7 to 5 5 V 32MHz Software break 4096 points realized by embedding the BRK instruction Hardware break 16 points Execution address bus detection interrupt external trigger signal Combination pass count Cumulative AND OR simultaneous AND status transition 255 pass counts Detection of except
166. ilter is deselected R20UT0455EJ0101 Dec 16 2011 Rev 1 01 Page 134 of 228 44 N SAS R0E521500MCUO0 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 ETE lw Dw Exclusion of the specified condition Cancel Figure 5 61 Option dialog box 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 pop up menu of the Trace window or click the Find button in the toolbar zx Dombnaliorr Fired tem Cycle D Address v Data BUS x Exclusion of the specilied condition F Find Setting Contents Data 10 RAY Mei Delete Delete All Histan im CPU RE 02 EIU IB JRAv R Figure 5 62 Find dialog box R20UT0455EJ0101 Rev 1 01 AS Page 135 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 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
167. in size so that when the buffer 1s filled the old trace data is 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 pop up menu of the Trace window 1 Setting trace modes First select a trace mode Trace Option Shep _ __ Trace Mode Fill until stop condition anc Fill until Full IP 1M delay sin Fill around TP IP gp ip D T 1 i I Repeat Fill until stop Repeat Fill until Full Figure 5 45 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 exceptional events For Fill around TP furthermore you can set a delay value R20UT0455EJ0101 Rev 1 01 AS Page 121 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 EE uev Betwe
168. in which coverage is measured Access Rate Access rate in percentage and graph The lower pane shows detailed information of the address range selected in the upper pane Table 5 36 Contents shown in the lower pane of the Data Coverage window Address Address value Label Label name Memory area FlashROM RAM SFR This column is blank when the area is unused 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 the coverage information will not be updated by program execution The acquired coverage information is accumulated in memory until the user clears it R20UT0455EJ0101 Rev 1 01 AS Page 167 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions 5 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 pane of the Address Range sheet and choose Add Range from the pop up menu Data Coverage il ox Wt O amp K Percentage Add Range Edit Range Date Delete Range mG Address Range Task Stack Figure 5 107 Data Coverage window 2 In the Add Address Ranges dialog box that is displayed enter an address range Add Address Range zl x a ja a afra a Figure 5 108 Ad
169. ine 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 Eventinuse O Detail v Other conditions aD Accumulation E Event in use 0 Detail Ses Total O Event Exception Exceptional Delavicvcle alf ap events Record condition f al Capture C Do not capture Step execution is recorded ka Detail Event in use Figure 5 51 Trace conditions dialog box Table 5 21 Other conditions L Tp Description AND Accumulation Trace point is encountered when all of the set events occur irrespective of the time axis AND Simultaneous Trace point is encountered when all of the set events occur at the same time 3 Subroutine Trace point is encountered when a specified event occurs within a specified address range subroutine or function 6 steps forward direction reset point Trace point is encountered when a set event occurs in a specified order 3 steps 9 paths reset point Trace point is encountered when a set event occurs in a specified order CAUTION When a time out condition is set in State transitions Trace dialog box the time to make transition from a set state to another then back to the original set state must be 10 us or mo
170. inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics ROE521500MCUOO User s Manual Preface Preface The ROES21500MCU00 is a full spec emulator for MCUs of the R8C Family R8C 5x Series This user s manual mainly describes specifications of the ROES21500MCU00 and how to setup it All components of the ROES21500MCU00 are listed under 1 1 Package Components page 16 If you have any questions about the ROES21500MCU00 contact your local distributor The manuals relevant to usage of the ROES21500MCUO00 are listed below You can download the latest manuals from the Renesas Tools homepage http www renesas com tools Related manuals Accessory C C Compiler Package for M16C Series R8C Family C Compiler User s Manual C C Compiler Package for M16C Series R8C Family Assembler User s Manual R20UT0455EJ0101 Rev 1 01 AS Page 3 of 228 Dec 16 2011 RENES R0E521500MCUO0 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 Emulator in this document collectively refers to the following products manufactured by Renesas Electronics Corporat
171. ion 1 E100 emulator main unit 2 MCU unit 3 Pitch converter board for connecting the user system Emulator herein encompasses neither the customer s user system nor the host machine Purpose of use of the emulator This emulator is a device to support the development of systems that use the R8C Family R8C 5x Series 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 other than for 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 basic knowledge of electric circuits logical circuits and MCUS When using the emulator 1 2 3 4 5 6 7 This emulator is a development support unit for use in your program development and evaluation stages When a program you have finished developing is to be incorporated in a mass produced product the judgment as to whether it can be put to practical use is entirely your own responsibility and should be based on evaluation of the device on which it is installed and other experiments In no event shall Renesas Electronics Corporation be liable for any consequence arising from the use of this emulator Renesas Electronics Corporation strives to provide worka
172. ion 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 R20UT0455EJ0101 Rev 1 01 AS Page 196 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions 5 14 8 Detecting a Trace Memory Overflow Overflows of the trace memory 4 M cycles can be detected as errors 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 9 Detecting a Task Stack Access Violation This facility is only available when a load module that includes an OS has been downloaded The emulator detects an error when one task attempts writing to the task stack for 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 ta
173. ion condition dialog box shown below will appear Specify any address range and access attribute Access protection condition X Start Address E000 t End Address FFFF tj attribute Figure 5 140 Access protection condition dialog box R20UT0455EJ0101 Rev 1 01 AS Page 191 of 228 Dec 16 2011 RENES R0E521500MCU00 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 v Automatically set address areas at downloading Address Areas 2 1MB MB top DOOFDODD OOOF1FFF Head Only Delete 03 BkB DODF 2000 OO0F 39E 3 Head Only Delete the Black Delete all 04 SkB ANT v OOOFEOOO OO0FE OFF 04 BKB 0OOFE100 OQOFFFDE Disable 04 BKE QOOFFFDC ODOFFFFF Read Only ak Cancel Read Only Help Figure 5 141 Violation of access protection dialog box 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 O x Trace on Exception Option Trace Mode erm alee Fill around TP d condition and combination setting v OR condition Eventinuse Q Detail Other conditions ma a m Event in use Detail v Total O Event z E Delavy cycle xceptiana events Petal 4M
174. ional events 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 Real time tracing 192bits x 4M cycles Address data status CPU status bus status target status task ID timestamp 32 external trigger inputs Fill until stop fill until full fill around TP repeat fill until stop repeat fill until full Extraction deletion of trace data Extracting or deleting data by specifying events or extracting the instruction that accesses the specified data Extracting data before and after trace points 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 number of passes through eight specified sections Clock used to count times 10ns to 1 6us Coverage measurement CO 2 Mbytes 256 Kbytes x 8 blocks Cl 1 Mbyte 128 Kbytes x 8 blocks MB 128 KB x 8 blocks Connection to user system Converter board for a 48 pin 0 5mm pitch LQFP of the R8C 5x ROES3054ECFK60 Series Converter board for a 64 pin 0 5mm pitch LQFP of the R8C 5x ROES53036ACFK40 Series Converter board for R8C 36A 36C 36E 36F 36G 36H 36M 36W 36X 36Y and 36Z Groups EMC Japan VCCI Class A EU EN 55022 Class A EN 55024 USA FCC part 15 Class A R20UT
175. ions 5 1 4 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 X System Internal flash memory overwrite Exception Warning Address O i 003000 0033FF 003400 OCESZFF O 03 003600 OOSBFF O 4 DO COL DOSFFF O 05 004000 OOBFFF O 06 Damon OOD FFF Clear all Selected blocks will be overwritten rather than deleted when the user program iz downloaded Ungelected blacks will be overvuithen after deleted OF Cancel Help Do not show this dialog box again Figure 5 3 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 The blocks selected by placing a check mark in the respective check boxes are overwritten merged without being erased when a program is downloaded R20UT0455EJ0101 Rev 1 01 Dec 16 2011 44 N SAS Page 85 of 228 ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 1 5 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 X Read from uninitialized memory Stack access violation
176. is started encountered A trace point is A high level signal is output only during cycles in which the encountered trace point condition is satisfied 21 Specific trace data is A high level signal is output only in cycles where trace data is extracted or deleted being extracted or discarded R20UT0455EJ0101 Rev 1 01 AS Page 207 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 2 Trigger output event You can specify an event for trigger pins 20 to 16 A high level signal will only be output while the event is occurring CAUTION The actual trigger output follows event detection after some delay The number of cycles of delay varies with the product The delay for trigger output in the ROE521500MCUOO is 8 cycles 5 16 5 Events For details on the setting of events see section 5 7 Using Events page 103 R20UT0455EJ0101 Rev 1 01 AS Page 208 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 6 Troubleshooting Action in Case of an Error 6 Troubleshooting Action in Case of an Error 6 1 Flowchart for Remediation of Trouble Figure 6 1 shows the flowchart for remediation of trouble arising between activation of the power supply to the emulator system and the emulator debugger starting up Go through the checks with the user system disconnected For the latest FAQs visit the Renesas Tools Homepage http www renesas com tools Turn on the power to the emulator Not norm
177. istory from the end of the trace result and shows the result in a tree Structure E BM main OFB2DC lt FAABS a E tutarial OFS82E6 OFB2EO H malloc OFB49A lt OFE2F1 init FBOc2 Or8303 rand OFE944 DF8314 r amp nd OFE944 lt OFS8314 rand OFE994 lt OFd314 rand OFE944 lt OFd314 E 8 4 Range 00007515 00000000 Fie Cyce 00006962 address OOOTIE Time 00 00 00 001 206 980 Cycle Label Address Data BUS BHE BIU B W RWI CPU ON BUSACC Debug EV ELG ELCOVLAP TimeZtamp h m s ms us nsi I 0000 6S B5 UU SLE 0F bh 1 _ 1 CM oZ 1 1 LIDIEETSEDIHEIE EIESEIENEIEN S 00 00 00 O01 406 SEU i 00006961 OrB2g OSFS 16b oO w R OF CB 3 1 1 oooooooooooOoOooooO 00 00 00 001 307 030 00006960 FE F5 ib i 1 RE i 1 1 oo0oooo00o000000 00 00 00 001 307 080 00006954 FG2E2 FEDO 15b 0 WAR 0 C8 3 1 i oo00o00000000000 00 00 00 001 307 1390 00006934 Or zn2 DO 16b 1 1 Pw 1 1 1 oooooooooOoOOOOoo 00 00 00 001 307 180 00006957 rB2H2 00 16b 1 1 ux D i 1 ooooooo00oo00000 00 00 00 001 307 230 00006956 tutori FBZEG F270 ith 0 Iw R 0 2 1 1 oo00G00000000000 00 00 00 001 2307 280 Figure 5 63 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 disassemb
178. ken when a task stack access violation 1s 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 R20UT0455EJ0101 Rev 1 01 AS Page 197 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functions 5 14 10 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 Hardware mm E 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 m m im m m m Figure 5 147 Hardware Break dialog box R20UT0455EJ0101 Rev 1 01 Page 198 of 228 Dec 16 2011 RENESAS ROE521500MCUO0O 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
179. l functions in the same source file vall be deleted Coverage data has not been saved Figure 5 90 Delete Source File dialog box R20UT0455EJ0101 Rev 1 01 AS Page 155 of 228 Dec 16 2011 RENES R0E521500MCUOO0 User s Manual 5 Debugging Functions 3 All functions included in the selected source file will be removed Code Coverage fie oe C Coverage Cl Coverage Executed Pass Address Assembler Source ST Ey Address Range A Source Figure 5 91 Code Coverage window 5 11 11 Showing Percentages and Graphs After the program has stopped right click in the upper pane of the Code Coverage window and choose Percentage from the pop up menu The emulator will start calculating CO instruction coverage and C1 branch coverage for each address range When the calculation is completed coverage information is displayed in the upper pane as percentages and graphs Code Coverage xj Cl Coverage Percentage 0FE224 OFE376 Add Range Edit Range Delete Range Code Coverage A OFE1BC EU rj ET FE224 OFE376 25 HN i Figure 5 92 Code Coverage window R20UT0455EJ0101 Rev 1 01 RENESAS Page 156 of 228 Dec 16 2011 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 11 12 Using the Sort Function Clicking on a header column in the upper pane of the Code Coverage window allows the coverage data to be sorted 1 Clicking on the File column T
180. le 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 R20UT0455EJ0101 Rev 1 01 AS Page 138 of 228 Dec 16 2011 RENES RO0E521500MCUO0 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 pop up menu of the Trace window To show the history of function execution from the acquired trace information choose Show Function Execution History from the pop up 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 Execution History from the pop up 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
181. llowing 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 protection again Access attribute Read Only Detected Write Only Detected Write access Read access Read access Write access Figure 5 136 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 R20UT0455EJ0101 Rev 1 01 AS Page 189 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 5 14 3 Setting an Access Protected Area Follow the procedure described below to set an access protected area 1 From the H
182. lt is displayed in about 60 seconds self checking has ended Emulator turned on Self checking has started or Self checking is in progress ON OFF ON or OFF Indefinite QO Flashing Self check error Note See the error message on the debugger Figure 2 6 LED displays during the self checking R20UT0455EJ0101 Rev 1 01 AS Page 30 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup 2 8 Selecting the Clock Supply 2 8 1 Clock Source You can choose the clock source supplied to the evaluation MCU in the Configuration properties dialog box of the emulator debugger Table 2 1 shows the clock sources and their default settings Table 2 1 Clock supply to the MCU Clock Mic An MM Description Default setting emulator debugger IC15 mounting oscillator module Oscillator circuit on the user system meme OM oot 1 0 to 20 0 MHz Internal oscillator circuit Sub XCIN XCOUT 32 768 kHz Oscillator circuit on the user system pe Note on Changing the Clock Supply The clock supply can be set by the Configuration properties dialog box when starting up the emulator debugger or by an input of the emulator clock command on the Command Line window R20UT0455EJ0101 Rev 1 01 AS Page 31 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup 2 8 2 Using an Internal Oscillator Circuit Board Kinds of Oscillator Circuit Boards An oscillator module 16MHz is mounted on t
183. memory during user program execution 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 Trace 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 VI wAxxaiEm4 bimagg Range O0007515 00000000 Fie Cycle 00000015 address OFFFES Time D0 00 00 001 650 710 Cycle Label Address Dats BUS BHE BIU B W RWI CPU ON BUSACC Debug EV BELG ELCOVLAP TimeStamp h m s ms us ne 4 00000016 PFFE amp 00 16h 1 DB A 1 23 1 1 ooooo0o0000000000 00 00 00 001 650 710 00000015 OPEPFG 02 165 1 DB R 2 1 1 DonaoO0OnODODnOnDDn 00 00 00 001 650 760 00000014 OFEFEG f2 16h 1 21 2 1 1 ooo0oooo00o000000 00 00 00 001 6350 810
184. ment coming to exceed the maximum value can be detected as an error Timeout case in a performance measurement is 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 timeout phenomenon occurred is marked with a string overflow 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 7 Detecting a Realtime Profile Overflow A time or number of passes in realtime profile measurement coming to exceed the maximum value can be detected as an error Timeout 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 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 timeout or count out phenomenon occurred is marked with a string overflow Selecting the Realtime Profile Overflow check box on the Except
185. moving 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 pop up menu Data Coverage XJ SE qu sf St x DB0D4i1C OOO71B stack 13 MER OFSO14 OF897F program ns Percentage Add Range Edit Range ETE Figure 5 120 Data Coverage window Address Range p Section 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 ecxdata_hcoverage Figure 5 121 Confirmation of Removing Section dialog box 3 The section name you have selected will be removed Data Coverage I X E sf wt fx oo041 ODD71B stack 13 4 OFS980 FBAAE interrupt of mG Address Range f Section Task Stack Figure 5 122 Data Coverage window R20UT0455EJ0101 Rev 1 01 Dec 16 2011 stENESAS Page 173 of 228 ROE521500MCUOO0 User s Manual 5 Debugging Functions 5 12 11 Data Coverage in a Task Stack The Task Stack sheet shows the access information acquired 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 t
186. n profile measurement range Click the Load button of the Realtime Profile Setting dialog box and the Open dialog box will be displayed 2 x Look in E Debug amp ef Es TEI Jm m m imr wrannn r 1 y mye I L T m Cam am a SaveData00i rpf a SaveDataloz rpf File name 5aveD ata l rpt Files of type FiealProfile Files rpf Cancel Ze Figure 5 131 Open dialog box Enter a file name you want to load The only file extension available is rpf An error message will appear if any other file extension is entered When a file load is complete the list in the Realtime Profile Setting dialog box 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 182 of 228 Dec 16 2011 ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 13 7 Measuring Task Profiles You can measure execution performance one task at a time Realtime Profile a Bc d d Task 1D Time DU MiT MR30 4 or Idle 1 00 00 00 577 565 090 ct 00 00 00 577 565 090 l main L D0 00 00 084 891 850 2 4 00 00 00 084 891 850 task 38 00 00 00 272 308 480 235 NS EN 00 00 00 025 587 060 teski 25 00 00 00 541 255 350 153 00 00 00 021 650 610 Figure 5 132 Realtime Profile dialog box task profile The following shows detailed information in each
187. n 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 Xcour 4 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 Notes on Voltage Detection Circuit This product does not support the function of voltage monitor 0 reset Evaluate it with an actual MCU This product differs from the actual MCU because there is a pitch converter board etc between the evaluation MCU and user system Final evaluation of interrupts generated by the voltage detection circuit 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
188. nction Execution History from the pop up menu that is displayed Trace NEEEHEEEEEEEEEEEREREEEEEEEEEEE La ISMILLLLLLLCLBLOLQZOOP 2 ALLPLA LL L LdkALALAE ALALALLLQLILLLLLLLLLLLCLLLLLLLLLLLOLL2 eVE F2zzie edb igilaaa Cycle Label Address Date BUS EHE EIU B W RWT CPU OH BUSACC Debug EV ELG ELCOVLAP TimeZtamp h m s ms us ne 4 O0000006 PFFE amp z lob i 1 3 1 1 oooooooooooo0ooDO 00 00 00 001 654 770 O0000005 OPEFEG z 16h 1 1 2 1 1 ooo0oooo0oooo0ooo 00 00 00 001 654 820 00000004 rPFHG 02 ib 1 1 2 1 0 oo0oooo00o000000 00 00 00 001 634 870 O0000003 O On046 DFES 15b O rw ww 1 1 DogagGODODOOOUODOU 00 00 00 001 654 920 O0000002 OOn046 OF85 168b O rw w 0 Z 1 Dogaoan0nGDOOOOOO 00 00 00 001 654 970 00000001 DOpOJ4 3353 16b O Im w 1 33 1 0 oo00o00000000000 00 00 00 001 6353 020 ooooo000 opOJ4 3253 165 0 rw w Q0 1 0 oo00o0o00R000000 00 00 00 001 653 070 zi Figure 3 37 Trace window function execution history before analysis R20UT0455EJ0101 Rev 1 01 AS Page 62 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 3 Tutorial 5 Click the right mouse button anywhere in the displayed function execution history window and choose Analyze Execution History from the pop up menu A function execution history will be displayed in
189. nd check Item Status MCU 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 a bli Memory Platform A Events Target 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 5 Debugging Functions 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 will be displayed Breakpoints E E m Cancel Edit Code Remove Remove All Lilek Figure 3 7 Breakpoints dialog box Use this dialog box to remove a breakpoint or enable or disable a breakpoint R20UT0455EJ0101 Rev 1 01 AS Page 43 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 DD DO Due Dam OTL FS8344 FFDOO N6ES AIF
190. ne in which it was connected to the emulator the workspace is automatically connected to the emulator If 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 1 Connecting the Emulator R20UT0455EJ0101 Rev 1 01 AS Page 74 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 R20UT0455EJ0101 Rev 1 01 AS Page 75 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 4 Preparing to Debug 4 6 Disconnecting the Emulator 4 6 1 Disconnecti
191. ned Long 415 FEIAZ p sump s4 a 4 KR 5 Ox D 6f9 aigned Long 46 FEES p asam a5 a 5 R 6 OxO006fd signed long sw pere Eripe a R 7 Ox000701 signed long Ean gt A i 49 FEFA india Me cy R 8 Ox000705 signed longs 50 FB410 p sum s9 a 9 E 9 OxG0070S feigned long 51 F8426 free p sai i Ox000715 signed int Current Scope pad peas S o E ster Cwatt A was Aw 0000 Il ay Ld n Figure 3 24 Editor window Step Over The data of the variable a displayed in the Watch window will be sorted in descending order R20UT0455EJ0101 Rev 1 01 AS Page 52 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 E Figure 3 25 Go button Since the program is executing an infinite loop process choose Stop Program from the Debug menu or click the Stop button in the toolbar Figure 3 26 Stop button R20UT0455EJ0101 Rev 1 01 AS Page 53 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 1
192. nformation cccccccccccccceseseeeeeeeeceseeseeeeeeeesesuaeeeseeeeeessaaeses 175 5 12 15 Saving the Data Coverage Information to a File eeeeeseeeeeeeene 176 5 12 16 Loading Data Coverage Information from a File seeeeeeesssssseeeeeeeneeenennnn 176 5 13 Viewing Realtime Profile Information eesssesssssssseseeeeeneeeen nennen nnn nnns 178 5 13 1 Viewing Realtime Profile INformation cccccccccsseeeeeeeeeeeceeeeeeeeeeeeeseeeeeeeseaseeeseeeeseneneeessaeeeeeeas 178 5 13 2 Setting Realtime Profile Measurement Modes ccccccccsssessseeeeeeeeeaeeeeeeeeeeesaeaaeeeeeeeeseaaaeeses 180 5 13 3 Measuring Function Profiles ccccccccccsssecccesecccceesceccesceeceauseecseuseessageeessaueeesseuseeessaseeessageees 180 5 13 4 Setting Function Profile Measurement Ranges cccccccsssseeeceeeeeeeeaeeeeeeeeeeeeesueaeeeeeeeeesaaaeses 181 5 13 5 Saving Function Profile Measurement Ranges cccccccssssseeceeeeeeeeaeeseeceeeeeeeeaeaeeeeeeeeeesaaaeses 182 5 13 6 Loading Function Profile Measurement Ranges ccccsesccccseeeeeeceeeeeceeeeeeceeeeeeeseaseeessaeeeesaneees 182 5 13 7 Measuring TASK Profiles axvesiicnsakansebitevEorppid d sstUP SPUR rd Fay MF ua tnis dd Ka Fascia dri aa M eannan 183 5 13 8 Setting Task Profile Measurement Ranges sssessssssssssseeeeeeee nennen nnne nennen nnns 184 5 13 9 Saving Task Profil
193. ng 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 5 9 11 Saving Trace Information to Files To save trace information to a file choose File gt Save from the pop up 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 pop up menu When saved in binary format all cycles are saved This type of file can be loaded 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 pop up 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 R20UT0455EJ0101 Rev 1 01 AS Page 136 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 9 12 Loading Trace Information from File
194. ng the Emulator To disconnect the emulator while it is active follow one of the procedures described below 1 Choose Disconnect from the Debug menu 2 Click the Disconnect tool button B 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 R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 76 of 228 ROE521500MCUOO 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 x DefaultSession Target Options Target Default debug format JIEEEB95_RENESAS Download modules Offset Address Format CONFIGDIRJS PROJ DODCODCCU IEEEB35 RENE5 Cancel 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 f
195. nge 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 is reenabled The count is incremented by one each time an interrupt is 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 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 measurement interval This setting is applied in common to all of 8 sections The measurement interval can be selected from the following options 10 ns default 20 ns 40 ns 80 ns 160 ns 1 6 us The maximum measurement time varies with the measurement interval 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 pr
196. nooonooOODOOOOOO 00 00 00 001 653 800 00000011 FEFESB 02 i amp 5b 1 1 i amp 1 1 nonooooooOGOOOO0DO 00 00 00 001 653 850 00000010 OFFFE6 2 15b 1 E 1 il 1 Do O aoOoOgOOOOOUO S 00 00 00 001 653 400 f0000009 OFFFEG Oz 16b 1 1 amp a 1 DoDooOoOOQODODOUDO 00 00 00 001 653 950 00000008 OFPFE6 02 16b 1 l amp a 1 nonoonponDoaocnpoDODD 00 00 00 001 654 000 0000000T OFFPRE D7 16b 1 1 z 1 noanocnbomonagppnamgbonD 00 00 00 001 654 050 D0000006 OFFPEFG Dz 16b 1 H 1 Z 1l 1 nonocnonopDODODDU 00 00 00 001 654 100 DO000005 DFFPR amp Dz 16b 1 1 Z 1l 1 uncnoacnonmoaGDODODDU 00 00 00 001 654 150 0000004 UFFFEB z lbb 1 1 d D UDOUDOUUUDDOUUOUDO 00 00 00 0001 654 200 00000003 n0pO46 OrB5 16b DW W 1 2 1 i oo0aooo08o000800 00 00 00 001 654 250 o0000002 0n046 OF S lbb O pa w D i 04 0 oo0aoooooooooOnoo 00 00 00 001 654 300 00000001 OOn044 3353 i amp b 0 Du W 1 2 3 nogogoonooOOOOOOOO 00 00 00 001 654 350 oo000000 O0n044 3353 i amp b O w w O0 x z 1 0 OO0oooooooooOOoo 00 00 00 004 6534 400 E Figure 3 40 Trace window Auto Filter R20UT0455EJ0101 Rev 1 01 AS Page 64 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 3 Tutorial 5 Click the button in the R W column and choose R from the pop up menu Li Cocle Aa dg860016 Oo0000015 a 000014 00000013
197. ns CAUTION 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 CPU DTC Figure 5 54 Event dialog box R20UT0455EJ0101 Rev 1 01 Page 130 of 228 Dec 16 2011 RENESAS ROE521500MCUO00 User s Manual 5 Debugging Functions 5 9 7 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 B x Selecting the type of trace information Event number C Task ID C External trigger Event used O Free 186 Detail Registered events Jave Load Help Apply Ze Figure 5 55 Trace conditions dialog box Select the signal you wish to acquire from three choices available Event Number Task ID or External trigger By default the Event number is selected 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 R20UT0455EJ0101 Rev 1 01 AS Page 131 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 5 Debugging Functions 5 9 8 Showing Trace Results To check trace results look at the Trace window T
198. nsation 10 to 60 C no condensation Table 1 7 Operating environment of the host machine Windows XP os wmdowseXPSbbtelWom T ES CPU Pentium 4 running at 1 6 GHz or more recommended Pointing device such as mouse Mouse or any other pointing device usable with the above OS that can be connected to the host machine Needed to install the emulator debugger or refer to the user s manual Table 1 8 Operating environment of the host machine Windows Vista or Windows 7 IBM PC AT compatible Windows Vista 32 bit editions 1 4 Windows 7 32 bit editions 64 bit editions 1 Pentium 4 running at 3 GHz or Core 2 Duo M S S at 1 GHz or more recommended Interface USB 2 0 USB 1 1 USB 2 0 USB LIJ OO Memory 2 Gbytes plus 10 times the file size of the load module or larger recommended 32 bit editions 3 Gbytes plus 10 times the file size of the load module or larger recommended 64 bit editions Pointing device such as mouse Mouse or any other pointing device usable with the above OS that can be connected to the host machine CD drive Needed to install the emulator debugger or refer to the user s manual Notes Windows and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries All other company or product names are the property of their respective owners 2 Operation with all combinations of host machine
199. o _main in byte units 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 Display Address 2 x Display Address main iral Scroll Start Address nonoa Fl Scroll End Address FFFFF iral Cancel Figure 3 11 Display Address dialog box Click the OK button The Memory window will be displayed showing a specified memory area Address i 2 6 T8 9 4 5 dC FBZDC Do 10 6A TO Fa 32 Fo2ke 00 FD Ez JA OF Dp B4 73 UB FSZFEC FC 75 4B FA ca 0 OF YD p4 FS3 C Ty 8B FE CA FD 44 69 OF C FB31c Fo 73 UB CF OA 73 7B F8 735 Foa2c EB Fo 73 10 45 CE Al O4 73 FB33C BB Fs Ue FE EB 1B CE FD Bl F834c 1B CE FD Ta FA YS BS FC 35 Foot 7 ES 73 FA 73 BS FO CB FB3BC 2B De ES 26 D4 73 B4 FA Fos fc 44 086 TI De cB 24 77 E35 Fogg 3 B4 FA TF Oe OO 77 ES 735 Fage 7 EJ 73 FA YS BS FC Fi FS3AC 7 ES 75 a4 ES 75 2456 EQ 3 Figure 3 12 Memory window R20UT0455EJ0101 Rev 1 01 AS Page 46 of 228 Dec 16 2011 RENES ROE521500MCUOO 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
200. o0o0000 OOn044 3353 168b 0 rw w 0 23 1 podati 00 00 00 001 651 510 zi Figure 3 3 Trace window free trace 4 A mixed display of bus disassemble and or source display is possible Choosing Display Mode gt DIS from the pop up menu you can display trace information in a bus and disassemble mixed mode r sVE razz teed gt eaaa Range O0007515 00000000 Fia Cycle 00000060 address OFEZCC Time 00 00 00 001 648 510 Cyole Label Address Data BUS SHE EIU B W RWT CPU ON BUSACC Debug EV ELG ELCOVLAP TimeStemp h m s PB2CC ADD Wr ZH FB A1 O0000060 OPB2CE FE 16h 1 1 cwmdz 1 1 ooooooooooooOoooO 3 00 00 001 648 510 000059 OF62D0 7367 10b 0 mW E OO RB 3 1 1 BDoganoOOnOOGODnOnDn 00 00 00 001 646 560 O0000053 DO06pE O6ES 15b0 rw R 0 3 1 1 gangaopoOngOOGODOODD 00 00 00 001 648 610 FB2CFE MOV N g AO A1 O00000037 D06DE E5 16b 1 1 cw 1 1 1 oooooooooooooOoo 00 00 00 001 648 660 00000056 OFEZDZ 0289 165 0 IM R O 3 1 1 oo00o00000000000 00 00 00 001 648 710 000000553 OOOGB4 OFFE lbh U PW R 0 3 1 1 DOOOR0O0OR000000 00 00 00 001 618 760 UFEZD oy Wee OZ H AQ OZH AL 00000054 000709 P amp 15b D W W OF W 1 1 1 UDDODOUODODUDDODU 00 00 00 001 648 810 00000053 DOD7DA OF 16b 1 IW W OF RB D 1 1 DOBODDODODDODODDU 00 00 00 001 648 860 00000052 s OOOO 16h D IN B O HB 1 1 onaononaonOnODD 00 00 00 001 648 910
201. ock Base l F Black Rey RHEV B 4 Status EV Comb Black Rew E HEV E EV Detect Bev _ REY B IER SYSTEM DISCONNECT Series Name R amp C Tiny Disconnect CANO CAAT CHEN G M RACs E EV Deep Bev REA POWER SOURCE DISCONNECT External Trigger Cable Info 0 5 Cable Connect Status 2 NUT C Power On Test RESETH High Iz Bus Access Check 2 UK Mon CPU SSRAM Check Dk MIB er Mon CPU USB Check 2 OK ENEs J TAG chain initialization Setting af MCU supply clock HIER Iain Clock Emulator SubClock Emulator Hb rs Selling of information on individual t EYTE Selling of debugging option MODE Clock CPU Clock Main Clack sIMN 16 0 MHz 20 0 MHz 33 0 kHz Sub Clock CIN Setting of emulator generation clack frequency v Close the dialog bos when the connection is completed Cancel Figure 5 5 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 his
202. ock 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 1s 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 R20UT0455EJ0101 Rev 1 01 AS Page 83 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 default EXT 0 15 INPUT EXT 16 31 directed for OUTPUT 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 default 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 covera
203. ogram 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 R20UT0455EJ0101 Rev 1 01 AS Page 143 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 pop up menu to display the Performance Analysis Conditions dialog box In the Performance Analysis Conditions dialog box disable the condition you want to clear on ee 2 5 6 7 Registered events Figure 5 70 Performance Analysis Conditions dialog box 5 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 pop up menu The measurement result of the selected section will be cleared To clear all measurement results choose Clear All Data from the pop up 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 measurement interv
204. om a uninitialized memory Detail Stack access violation Detail Performance overflow Realtime profile overflow Task stack access violation Detai Q5 dispatch Event used Free 16 Detail Registered events Load Help Apply Close Figure 5 151 Trace conditions dialog box A 3 The Violation 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 11 Detecting an OS dispatch This facility is only available when a load module that includes an OS has been downloaded The emulator detects the generation of task dispatch as an error 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 R20UT0455EJ0101 Rev 1 01 AS Page 201 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 synchroni
205. on time in up to 8 Content of measurement sections and pass counts Timeout detection Performance 10 ns to 1 6us Between two events Event period and Interrupt disabled range between two events 512 bytes x 32 blocks 7 RAM monitor Shows last read write accesses performed Comes with initialization omitted detect function os mue RB ites los Mye sp 256 Kbytes x 8 blocks 2 Mbyte space Coveri 128 Kbytes x 8 blocks 1 Mbyte space Data coverage 64 Kbytes x 8 blocks 512 Kbyte space Address range section specification and task stack R20UT0455EJ0101 Rev 1 01 AS Page 79 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 1 Setting Up the Emulation Environment When the emulator is 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
206. op 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 PO direction 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 PO direction register is set 3 Setting PRC2 to I by the Memory window or Command Line window Note on Breaks The following break functions are available in the emulator debugger 1 Software break This is 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 of 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 Note on P
207. opyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not
208. ormat in the Download modules list box CAUTION At this point in time no programs are downloaded yet For details on how to download refer to 5 2 1 Downloading a Program R20UT0455EJ0101 Rev 1 01 AS Page 77 of 228 Dec 16 2011 RENES R0E521500MCUO0 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 ied fed SessionM16C_E100_Ermulator Target Options Command babch fle load timing Command jine batch processing Iadfu Hemsve Up Download modules after build v Remove breakpoints on download Disable memor access until after target connection command file execution Umt disassembly memory access Donat perform automatic target connection v Reset CPU ater download module Disable memory access by GUI when larget 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 78 of 228 Dec 16 2011 ROE521500MCUO00 User s Man
209. ormation 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 O X aml x Trace OR i IF 1 Trace Mode 1M delay alee Fill around TP condition and combination setting v OR condition Eventinuse O Detail Other conditions anD Accumulation E Event in use 0 Detail Exception Trace Dee eee ae ee on Point pos TP Total O Event Delavicvcle 4M Record condition sl Capture Do not capture Step execution is recorded Event in use 0 Event used Free 16 Detail Registered events Load Help Apply Close Figure 3 34 Trace conditions dialog box Fill around TP Exceptional events fi R20UT0455EJ0101 Rev 1 01 AS Page 60 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 3 Tutorial 3 Next set a 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 w
210. ote 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 R20UT0455EJ0101 Rev 1 01 AS Page 187 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 14 Detecting Exceptional Events 5 14 1 Detecting Exceptional Events The E100 emulator permits you to detect various exceptional events that have occurred during user program execution Exceptional 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 exceptional event can be set as a condition of a breakpoint or trace point 1 Exceptional events The E100 emulator detects the exceptional 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 An error is detected when the value of the stack register is beyond a boundary of the stack area Performance overflow An error is detected when th
211. otes on Debugging in CPU Rewrite Mode If you check Debug the program using the CPU Rewrite Mode in the System tab of the Configuration properties dialog box of the emulator debugger you cannot use the following functions Setting software breakpoints 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 While executing the program that rewrites the CPU do not perform the following operations new setting or change of the settings of the RAM monitor area or erase of any data Otherwise the CPU rewrite operation may not be properly executed To reference data after executing CPU rewrite stop the program at other than a rewrite control program area and use the Memory window etc When erasing blocks or programming using DTC in CPU rewrite mode do not refer to the memory of the blocks in the internal ROM area program ROM and data flash to be erased or written from the following windows If you refer to the memory contents of the internal ROM area to be erased or written during program execution CPU rewrite may not be properly executed Although the program is stopped while DTC is activated CPU rewrite by DTC is continued Therefore make sure to operate windows after CPU rewrite is complete 1 Checking memory contents from the
212. ox Registered Events TaskID Comment Delate Help Clase Delete amp ll He Figure 5 26 Registered Events dialog box R20UT0455EJ0101 Rev 1 01 AS Page 105 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 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 Se hmm Xj Condition Count and Task ID Comment Condition Count and Task it Comment Event type firstruction fabch Comment main Function Address condition Specified value i Start main End Teri Fe Add this erent ba the Is Figure 5 27 Event dialog box 3 An event will be added to the list of registered events Registered Events Events Type beseiptons coure TaD comment F Address main main Function 4 IEJ Delete All Figure 5 28 Registered Events dialog box R20UT0455EJ0101 Rev 1 01 AS Page 106 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 2 Adding an event from the event column of the Editor window When adding a hardware breakpoint 5 Debugging Functions 1 Select the HW Break Point from the pop up 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
213. pied duplicated or reproduced in whole or part without prior written consent from Renesas About diagrams Some diagrams in this user s manual may differ from the objects they represent R20UT0455EJ0101 Rev 1 01 AS Page 5 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual Important Precautions for Safety This chapter by showing the relevant diagrammatic symbols and their meanings describes the precautions which should be taken in order to use this product safely and properly Be sure to read and understand this chapter before using this product Contact us if you have any questions about the precautions described here WARNING indicates a potentially dangerous situation that will cause death or heavy AN WA H N N G wound unless it is avoided N CAUTION indicates a potentially dangerous situation that will cause a slight injury or CAUTION a medium degree injury or property damage unless it is avoided In addition to the two above the following are also used as appropriate A means WARNING or CAUTION Example AN caution AGAINST AN ELECTRIC SHOCK means PROHIBITION Example i PROHIBITED means A FORCIBLE ACTION Example QS unetuc THE POWER CABLE FROM THE RECEPTACLE R20UT0455EJ0101 Rev 1 01 AS Page 6 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual Important WARNING Warnings for AC Power Supply If the attached AC power cable does not fit the receptacle do not alter t
214. played in gray Although the existing coverage information of those addresses is retained the coverage information will not be updated by program execution The acquired coverage information is accumulated in memory until the user clears it R20UT0455EJ0101 Rev 1 01 AS Page 171 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 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 pane of the Section sheet and choose Add Range from the pop up menu DataCoverage o ex np Sf wt DX Percentage Add Range Bait Range Delete Range Data nt Address Range Section Task Stack Figure 5 117 Data Coverage window 2 In the Add A Section dialog box that is displayed enter a section name Add 4 Section Section stack m Figure 5 118 Add A Section dialog box 5 Debugging Functions 3 The address range section name you have added will be displayed in the upper pane of the Data Coverage window DataCoverage d SS mp sy wtf OOOU41 O OD71B stack OOO41 RAM OO OO OO OO0420 RAM OO OO OO OO OO042 4 RAM OO OO OO mG Address Range P Section Task Stack Figure 5 119 Data Coverage window R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES Page 172 of 228 ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 12 10 Re
215. quired 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 pop up 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 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 pop up menu of the Trace window The columns for which filtering can be applied will be marked by a I button Range 00007515 00000000 Fia Cycle 00000015 address OFFFES Time 00 00 00 001 653 600 Cycle Label Addre Darl BY ar BY pF Re cv BUSAY Deb EY BY ELCOVL Timestamp h m s ms us n D0000016 OFFFFE 00 165 1 DH R l A 1 1 oooaooo0oo000000 00 00 00 001 653 600 60000015 FEFRG z 166 1 DB R 0 2 14 1 oo0eooo0oo000ao00 00 00 00 001 653 650 000000 i4 OFFFER 02 i amp 6b 1 1 i amp d 1 paongoDo OnOOoOOOOOOUO 00 00 00 001 653 700 00000013 OFFFE6 02 ib 1 1 1 1 ponooooogao ono n00 00 00 00 001 653 750 00000012 FFFE6 02 ib 1 1 2 d 1 pno
216. race results can be shown in one of the following display modes These display modes can be switched using Display Modes on the pop up 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 From the pop up menu select Display Modes gt BUS Bus information on each cycle traced are displayed Default display mode Trace LLLLLRLEABEBGQOLDDDDDDDDDODDLA Cis m4 idiot bya id lil ale aaa C Label oor EE E HE BIU ESO Gur cpi qu OW BUSACC TU Debug EV ELG ELCOVLAP TimeStamp h m s ms us ns o0000016 OFEFEG 16h uL l EX 1 aonaGnonoGnOnO0O 00 00 00 001 650 710 a 000015 PFFEG f2 lth 1 DB R 0 2 1 1 ooooooooooooO0ooo 00 00 00 001 650 760 00000014 OFEFEG 0U2 ib i 1 23 1 1 ooooooo0ooooO0ooo 00 00 00 001 650 810 00000013 OFEFEG z ib i 1 23 1 1 ooooo0o0oooo000o 00 00 00 001 650 850 00000012 FEFE6 D ib 1 1 2 1 i oo0oooo0ono000000 00 00 00 001 650 910 00000011 OFEFEG UZ lh i 1 Z 1 1 Ono0000000000000 00 00 00 001 650 960 00000010 FFFES 2 lf i 1 Z 1 1 Do00o00000000000 00 00 00 001 651 010 00000007 rfFEG U02 ith 1 1 1 1 oo00o00000000000 00 00 00 001 651 060 0000000 UFFFEG 0Z teh 1 2d 1 1 oo00000000000000 00 00 00 001 651 110 o0000007 OFFPEG D2 16b 1 1 1 1 Dono
217. rage definition CO Instruction coverage All statements within the code are executed at least once C1 Branch coverage All branches within the 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 Code Coverage from the View menu or click the Code Coverage toolbar button iE The Code Coverage window initially appears is initially empty Code Coverage ENS l e 58 wf N px ig Address Range CO Coverage Cl Coverage Executed Assembler Source Oo Address Range Figure 5 71 Code Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 145 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 1 Measurement method The Code Coverage window consists of two sheets Table 5 28 Sheets of the Code Coverage window Sheet name Description Address Range sheet Measurement is performed on any address range 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 Re
218. rano Ea ANEA EEE IS DRE Mesum senensosesatee tances 17 1 3 2 Names and Functions of Each Part of the Emulator eeeeseeeseeeeeeeeeeerrne 18 1 4 Specifications RT u 20 1 4 1 Product ake 0 161 1 6r 11 0 S nennen nnns nnna nnns nnns nnns a enne rrr n nnns annis 20 1 4 2 Regulatory Compliance Notices sseessssssesssseeeeee nennen nennen nnne nennen nnn nnns 21 1 4 3 Operating ENVIrONMEN ccccccccssseeeeececeeeeeaeeeeceeeeeeaseeeseeeeeeeeseeeaeeeceeeeesseeeseeeeeeesssaaeeeeeeseeeessaaas 22 2 UD 23 2 1 Flowchart of Starting Up the Emulator sessesssesssssssseseseeeeeeeeennnnnnn nennen nennen nsn nans nnns 23 2 2 Installing the Included Software seeeessssssssesessesssssseeeee nennen nennen nnne nnns nan n nnns nnns nsns na ann nnn 25 2 3 Connecting the MCU Unit to and Disconnecting it from the E100 Emulator Main Unit 26 2 4 Connecting the Host Machine ssssssessessssseeennne nnne nenne nnnnnaa nnn sss sn naa nnns inrer nnns a enin 27 2 5 Gonnec ng the Emulator Power SUDDIV uan csssctupuneco cu este npn a vest Nace cuota esti cuPr OU osa m NUM 28 2 6 Turning ON the POW ETE dara taicone Teaia A RAAR 29 2 6 1 Checking the Connections of the Emulator System
219. rching for Unexecuted Lines d Search for unexecuted lines in a selected address range or function When you click the Find button in the toolbar the Find dialog box shown below appears Find What Unexecuted Line End Unexecuted Line Figure 5 93 Find dialog box Following three search options are available Table 5 33 Search options Unexecuted Line Instructions not executed yet Branch T Branch instructions only tested as TRUE Branch F Branch instructions only tested as FALSE Clicking the Find Next button E starts a search When a matching instruction is found the line of that instruction is highlighted When no matching instructions are found a message is displayed R20UT0455EJ0101 Rev 1 01 AS Page 158 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 11 14 Clearing Code Coverage Information 1 Clearing the code coverage information of the specified range Selecting Clear Coverage Range from the pop up menu opens the Clear Address Range dialog box Clear 4ddress Range 3 xJ Start Address qqcoyv2 iral OF End Address JO0C11E al Cancel Figure 5 94 Clear Address Range dialog box Enter the start and end addresses of the range to be cleared Clicking the OK button clears the coverage information of the selected range 2 Clearing all the code coverage information Selecting Clear the Entire Coverage from the pop up menu clears all the co
220. re Transition time of less than 10 us will result in an incorrect timeout detection R20UT0455EJ0101 Rev 1 01 AS Page 127 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 4 Detection of exceptional events Specify whether you want detection of following exceptional 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 M 1M 2M 3M or 4M bus cycles default 0M Select your desired delay value in the delay value setting column Figure 5 52 Trace conditions dialog box R20UT0455EJ0101 Rev 1 01 AS Page 128 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 MEL ve Between two
221. rogram Stoppage and Hardware Breaks If an operation to stop the program is performed or a hardware break occurs in the emulator debugger be aware that the program does not stop until after the period described below ends A Providing that interrupts are enabled a period from when a request for an interrupt whose priority level selected by a register bit is higher than the IPL is generated till when the interrupt routine 1s entered Note If the above interrupt request is for an interrupt nested in another or disabled by clearing the I flag to 0 it will take a longer time than otherwise before the interrupt routine is entered In this case the timing with which the program is halted is delayed that much Note however that this does not apply to software breaks 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 Notes on Power Supply to the User System Vcc pin is 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 lt Vee E 5 5 V R20UT0455EJ0101 Rev 1 01 AS Page 222 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications N
222. rounds for and correct trouble with products malfunctions with some free and some incurring charges However this does not necessarily mean that Renesas Electronics Corporation guarantees the provision of a workaround or correction under any circumstances The emulator covered by this document has been developed on the assumption that it will be used for program development and evaluation in laboratories Therefore it does not fall within the scope of applicability of the Electrical Appliance and Material Safety Law and protection against electromagnetic interference when used in Japan Renesas Electronics Corporation cannot predict all possible situations and possible cases of misuse that carry a potential for danger Therefore the warnings in this user s manual and the warning labels attached to the emulator do not necessarily cover all such possible situations and cases The customer is responsible for correctly and safely using this emulator The emulator covered by this document has not been through the process of checking conformance with UL or other safety standards and IEC or other industry standards This fact must be taken into account when the emulator is taken from Japan to some other country Renesas Electronics Corporation will not assume responsibility of direct or indirect damage caused by an accidental failure or malfunction in this emulator When disposing of the emulator Penalties may be applicable for incorrect disposal of this
223. ry into a coverage only buffer OOOO Buffer for coverage 40000 Area where coverage can be measurer 0 FFFF 7 Data acquisition 2 ADU m 1 Allocation change Figure 5 74 Schematic of coverage memory allocation 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 Code Coverage window includes the content of the coverage only buffer R20UT0455EJ0101 Rev 1 01 AS Page 147 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions 5 11 4 Code Coverage in an Address Range The Address Range sheet shows the code coverage information CO coverage and Cl coverage acquired 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 the coverage information on areas that have no coverage memory allocated is not updated Areas where coverage information is not updated are displayed in gray An example display is shown below Code Coverage Zz L xj e mf E d om Address Range CO Coverage C1 Coverage OFELBE OFEZi8 i19 253 FE224 rE376 26 NEP cs O o n Executed OFE1BE ENTER 1 OFEIC1 MOV W D FE1C4 MOWV W for i 0 FE1CT7 CMP W F
224. s To load trace information from a file choose File gt Load from the pop up 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 is displayed when you choose Acquisition from the pop up 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 pop up menu of the Trace window or click 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 pop up menu of the Trace window or click the Restart button v in the toolbar 5 9 15 Switching
225. source 1 Memory allocation Before code coverage can be measured code coverage memory must be allocated to the addresses where it 1s 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 pop up menu of the Code Coverage window Allocation of Code Coverage Memory X Allocation of Coverage Memory Add OOOO 1FFFF EQOUD FFFFF 2 Clear All Clear Default ee 3 oma Figure 5 72 Allocation of Code Coverage Memory dialog box When using the CO level coverage and Cl 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 Either contiguous or non contiguous blocks can be set With initial settings the coverage memory is allocated to addresses in the ROM and RAM areas R20UT0455EJ0101 Rev 1 01 AS Page 146 of 228 Dec 16 2011 RENES R0E521500MCUOO0 User s Manual 5 Debugging Functions FSI here coverage c FOOOOU Figure 5 73 Schematic of coverage memory allocation 2 Changing memory allocation If coverage memory allocation is changed the coverage data acquired from the addresses before being changed is retrieved from coverage memo
226. ss Range sheet the corresponding source code is shown in the Editor window Be sure that source code is 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 5 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 pane of the Address Range sheet and choose Add Range from the pop up menu Code Coverage Wd Ej op S9 mf wt Oe da d Percentage Add Range Exil Ramie Executed Fass Address Balsis itty e mnm Address Range Figure 5 76 Code Coverage window 2 In the Add Address Range dialog box that is displayed enter an address range Add Address Range Figure 5 77 Add Address Range dialog box R20UT0455EJ0101 Rev 1 01 AS Page 149 of 228 Dec 16 2011 RENES ROE521500MCUO0O User s Manual 5 Debugging Functions 3 The address range you have added will be displayed in the upper pane of the Code Coverage window Code Coverage HE ANER di th Address Range CO Coverage Ci Coverage DFE102 OFE1BC Executed Source 3 OFE102 ENTER ss i FE105 MOV W 6 O0FE108 MOV W 0 gap 5 OFE10E CMP W d while dap
227. sses made 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 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 the instruction queue buffer from the next cycle after an occurrence of software break is not displayed correctly When memory access is performed by a debugger operation during user program execution shows 0 while the emulator is occupying the MCU bus CAUTION Execution of the user program is temporarily stopped during such access to memory When memory access is performed by a debugger operation during user program execution shows 0 while the emulator is occupying the MCU bus CAUTION Execution of the user program is temporarily stopped during such access to memory The event No when a set event occurred 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 Task ID when RTOS is used Example display A task ID task entry label is
228. system with an oscillator whose frequency is the same as that of the oscillator module or oscillator circuit emulator for final evaluation purposes R20UT0455EJ0101 Rev 1 01 AS Page 33 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup 2 9 Connecting the User System Figure 2 10 shows how to connect this product to your user system Flexible cable 0 5mm pitch 0 5mm pitch LQFP LQFP R8C 54E 54F 54G 54H R8C 56E 56F 56G 56H Group Group ROE53054ECFK60 ROES53036ACFK40 Figure 2 10 Connecting this product to the user system 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 R20UT0455EJ0101 Rev 1 01 AS Page 34 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup 2 9 1 Connecting to a 48 pin 0 5mm Pitch Foot Pattern The following is a procedure of connecting to a 48 pin 0 5mm pitch foot pattern on the user system using the ROES53054ECFK60 not included For details on the ROES3054ECFK60 not included refer to its user s manual 1 Attach the NOPACKOASSD included with the ROES3054ECFK60 to the user system 2 Attach the YOPACKOASSD included with the ROES3054ECFK60 to the NQPACKO48SD and secure it with the YQ GUIDEs 3 Attach the ROES3054ECFK60 to the YQPACKO48SD 4 Attach the CNI side of the converter board to the CN1 side of the flexible cable Eval
229. t 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 Xm 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 Xcj and Xcour 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 choose 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 X of the MCU Notes on Using the Internal Generator Circuit The internal generator circuit is provided for temporary debugging purposes Temperature characteristics of frequencies are not guaranteed Be sure to evaluate your
230. t 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 R20UT0455EJ0101 Rev 1 01 Dec 16 2011 2tENESAS Page 96 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 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 v TaskID v BreakCondition ExecutionTime Exception Normal Software break UUeERD 001 306 220 A Figure 5 13 Status bar Table 5 8 Items list of the emulator status shown in the status bar PC PC value During execution PC value During Break Normal Task ID 1 When more than one break factors occur When you click on the status bar area where the break factor is shown a balloon is shown You can check the type of break factors in the balloon Break cause Software break Hardware break OR EVz1 Normal H Some Factors exist Click here 00 00 00 001 396 200 Figure 5 14 Example of break factors display when break factors occur 2 When an exceptional event occurs When an exceptional event occurs a warning is displayed in a status bar balloon
231. t 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 at a ao 30 zu a2 3 3 at 35 36 3 38 nl 40 dy qz F3 ta 5 46 qu 40 45 at Su aye 53 zu S55 56 F 2E9 FoeFD Fesog F 314 rFa3zu u FoOa3z5 Fa3Z2E ro344 FoO34B ra35z roa35z Fea Fase Fas he FO3B8 FASCE FASET Fears Fe4i10 Fe4e26 ee are FoO438 Peas a 1 O x ae p sam malloc sizeof struct Sample init p sam i 0 i lt 10 randi it j OF NL for i i if a i j i Sort al change al p sam s a u p sam sl a l p sam sz a z p sam s3 a 3 p sam s4 a 4 p sam s5 a s5 p sam sb5 a b5 p sam s a p sam sSo a o8 p sam sS a 9 free p sam p sam NULL aid abort void 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 R20UT0455EJ0101 Dec 16 2011 Rev 1 01 RENESAS Page 41 of 228 ROE521500MCUO0 User s Manual 3 Tutorial 3 6 Executing the Program The following describes how to run the program 3 6 1 Resetting the CPU Bi To reset the CPU choose Reset CPU from the Debug menu or click the Reset CPU
232. tart event EN F Address FELBC Figure 5 67 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 Figure 5 68 Event cycle counting Measurement is taken of periods in which an event occurs Namely measurement is taken of an event occurrence period and execution count 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 R20UT0455EJ0101 Dec 16 2011 Page 142 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions Table 5 25 Measurement condition modes Continued Interrupt disabled range between two events Details Start event OR Ta IET F Address sart End event OR Event T jDescipions co Ta Comm VSEM Address FELBC Figure 5 69 Interrupt disabled ra
233. tension is omitted txt will automatically be added as the file extension 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 Measurement Interval Choose Properties from the pop up 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 135 Properties dialog box The measurement interval 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 measurement interval is changed the measurement results hitherto accumulated are cleared R20UT0455EJ0101 Rev 1 01 AS Page 186 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 measurement interval selected To select a measurement interval 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 Approx 3 hours 03 minutes 15 seconds Approx 6 hours 06 minutes 30 seconds 4 6 lous Approx 488 hours 40 minutes 18 seconds CAUTION N
234. ter 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 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 MTBE E100 Emulator Target type All Targets lt Back Met Frish Came 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 R20UT0455EJ0101 Rev 1 01 AS Page 72 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 5 Set a configuration name Setting the Debugger Options Target name MIEC E100 Emulatar Configuration name Debug M1BC ETUU Emulator Detail options Value Modity Hest Finish Cancel Figure 4 9 Setting the Debugger Options dialog box 2 x 4 Preparing to Debug If you have selected two or more target platforms click the Next button and then set a configuration name for each target plat
235. the oscillation of the oscillator module mounted on the MCU unit Is system reset issued and confirm that the oscillator module is properly mounted halted Is system reset issued the MCU Is system reset issued A timeout error The power supply to the MCU Check that power is being correctly supplied to the user system and that is off Is system reset issued the user system is properly grounded 4 Errors Occur in booting up of the emulator debugger Table 6 4 Points to check for errors in booting up of the emulator debugger 3 Point to check A timeout error 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 R20UT0455EJ0101 Rev 1 01 AS Page 212 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 6 Troubleshooting Action in Case of an Error 6 4 How to Request Support After checking the items in 6 Troubleshooting Action in Case of an Error contact us from the following URL http www renesas com inquiry For a prompt response please fill in the following information 1 Operating environment Operating voltage V Operating frequency MHz User system Connected Disconnected Clock supply to the MCU Emulator User system 2 Condition The emulator debugger starts up does not start up The error is detected not detected in the self checking Frequency of errors always frequency
236. the program is halted is delayed that much Note however that this does not apply to software breaks Note on the Processor Mode Register 0 PMO The R8C 5x Group actual MCU and this product differ in the initial value of the processor mode register 0 PMO address 0004h This product 02h R8C 5x Group actual MCU 00h When using this product be sure that bit 1 of PMO remains 1 as initially set If bit 1 of PMO is cleared to 0 the emulator will become uncontrollable Also when using this product please be sure that only a bit manipulating instruction is used for a write to bit 3 PMO3 of processor mode register 0 PMO address 0004h Note on the Peripheral Clock Select Register 1 PCLKR1 In order to rewrite the peripheral clock select register 1 PCLKRI address 0000Fh while using this product you need to first set bit O of the protect register PRCR address 00007h and bit 5 of the protect register EPRR address 0025Fh to 1 Once the rewrite on PCLKRI is complete set bit O of PRCR and bit 5 of EPRR back to 079 The actual MCU does not have the protect register EPRR the setting of which however does not affect the actual operation Bit O of the protect register PRCR address 00007h controls whether to enable or disable writing to the PCLKRI register on the actual MCU 2 Bit 5 of the protect register EPRR address 0025Fh controls whether to enable or disable writing to the PCLKRI register on this prod
237. the source level Double click Tutorial c of C source file x EQ Tutorial Bala E Tutorial S eak Source e Pectore La os 2 heap c 14 oid mainivaid m initsct c 15 F82DC 1 3 intpra c 16 FBzDC while 1 4 n E resetprg c 17 FS2E0 tutoriali sorte 18 FB2E3 j BESSE Titorial c 19 F82kE5 H E Download modules 20 0 1 Tutorial x30 00000000 21 oid tutorial void A 2 Dependencies 22 F82E6 cstartdef h Z3 long a 10 B initscth 2d long j s E resetpra h Zn int i s E sft6Zah 26 struct Sample far p sam amp orth tupedefine h 26 FBZES p sam malloc sizeof struct Sample 29 FozFD init p sam 30 31 Fa8309 fori i 0 i 10 i ji 32 F8314 j randi 33 F8320 it j UJ 34 Fo3z5 q mem 35 i 36 FaG3zE ali j af i 3d F5344 sort al 4 _ Giri ee tile fo Figure 3 3 Editor window displaying the source program If necessary you can change the font and font size to make the text easier to read 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 R20UT0455EJ0101 Rev 1 01 AS Page 40 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 3 Tutorial 3 5 Setting Software Breakpoints Software breakpoints are one of simple debug facilities The Editor window permits you to se
238. the specified position while at the same time registered in the Registered Events Hardware Break OP Registered Events l iB x Evenb aa Events Type Descriptions Count TaskID Comment F Address 00000 BreakPoint vent T L Descriptions count Tesian comment ME F Address 00000 BreakPaint Figure 5 36 Hardware Break dialog box and Registered Events dialog box R20UT0455EJ0101 Rev 1 01 AS Page 111 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 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 OF Registered Events Bl x Even T Events Type Descriptions Count TaskID Comment F Address 00000 BreakPoint F Address 00000 BreakPoint Figure 5 37 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 _ Delete amp ll Dupicabe Figure 5 38 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 R20UT0455EJ0101 Rev 1 01 AS Page 112 of
239. 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 R20UT0455EJ0101 Rev 1 01 RENESAS Page 202 of 228 Dec 16 2011 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 15 4 Limitations of the Start Stop Function The Start Stop function is 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 executed the 4 byte value pointed to by the interrupt stack is used under control on the emulator side The general purpose registers and flags used in a specified routine are subject to the following limitations 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
240. tialized 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 default 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 If 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 R20UT0455EJ0101 Rev 1 01 AS Page 118 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 5 Debugging Functions 5 9 Looking at Trace Information 5 9 1 Looking at Trace Information A trace is the function to acquire bus information every cycle and store it in trace
241. tion of the address range selected in the upper pane assembly language level Table 5 32 Contents shown in the lower pane of the Code Coverage window Executed 1 Instructions was executed 0 Instructions was not executed Condition for execution of a conditional branch instruction T The condition was satisfied F The condition was not satisfied T F The condition was satisfied in one case and not satisfied in another Address Assembler Disassembled program C C or assembler source program The acquired coverage information is accumulated in memory until the user clears it R20UT0455EJ0101 Rev 1 01 AS Page 153 of 228 Dec 16 2011 RENES R0E521500MCUO0 User s Manual 5 Debugging Functions 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 pane of the Source sheet and choose Add Range from the pop up menu Lode Coverage xj m we NE OK n od A EMI 177 NICE RN ST RN Percentage Edi Ragen Ueta Range Executed Pass Address Assembler ere Hn Source Figure 5 86 Code Coverage window 2 In the Add Source Files dialog box that is displayed enter a file name mr FEE File Figure 5 87 Add Source File dialog box 3 The source file you have added and the function names included in it will be displayed in the upper pane of the Code Coverage window
242. to the data area This function allows the emulator to acquire access information per byte without causing a program to break Therefore the realtime operation of the user program will not be affected 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 automatically assigned at 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 Sa The Data Coverage window initially is initially empty Data Coverage S gw sof St OK iiy mE Address Range Task Stack Figure 5 102 Data Coverage window R20UT0455EJ0101 Rev 1 01 AS Page 164 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 Description Address Range Measurement is performed on any address range Measurement is performed on a specified section Task Stack Measurement is made of all task stack areas The respective sheets permit multiple ranges to be registered The Task Stack sheet supports 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
243. tory 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 R20UT0455EJ0101 Dec 16 2011 Rev 1 01 Page 87 of 228 44 NE SAS ROE521500MCUOO User s Manual 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 R20UT0455EJ0101 Rev 1 01 AS Dec 16 2011 RENES 5 Debugging Functions Page 88 of 228 ROE521500MCUO00 User s Manual 5 Debugging Functions 5 2 Downloading a Program 5 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 pop up 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 8 Setting Up the Debug 5 2 2 Showing the Source Code Follow the procedure described below to show the source code Double click a
244. u can set a data access event based on the address range of the selected memory content as a condition gt Data access condition 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 Instruction fetch condition R20UT0455EJ0101 Rev 1 01 AS Page 108 of 228 Dec 16 2011 RENES ROE521500MCUOO0 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 Event LT Desciptons I count Taske comment EVOL Fo Te start Evo Address _initsct EvOS Address exik Delete Enable Disable Figure 5 32 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 D s bip stark E 2 d uus e Figure 5 33 Hardware Break dialog box R20UT0455EJ0101 Rev 1
245. ual 5 Debugging Functions 5 Debugging Functions The E100 emulator supports the functions listed in the table below Table 5 1 List of Debug Functions I T ln Item Specification No Interrupt generation exit detection Number of times an event occurred Content of event 2 Event Maximum 255 times Violation of access protection Stack access violation Read from uninitialized memory Performance overflow 3 Exception detection f P Realtime profile overflow Trace memory overflow Task stack access violation OS dispatch OR AND Accumulation AND Simultaneous subroutine sequential and state transition Fili around TP Stops o traces after retarded for delay cycles from when trace point is reache Hardware Event combination breakpoints Hardware break Trace mode 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 5 Trace Eventeoiibinadon OR AND Accumulation AND Simultaneous subroutine sequential and Trace point state transition Exception detection Maximum 4M bus cycles 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 executi
246. uation with actual MCU HQPACK048SD not included e FLASH version MCU etc These corners are not round J 48 pin 0 5mm pitch foot pattern These four products are Zeer voem available in one package Figure 2 11 Connecting to a 48 pin 0 5mm pitch foot pattern 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 ROES3054ECFK60 are guaranteed for only 50 insertion removal iterations For purchasing the HQPACKOASSD contact the following Tokyo Eletech Corporation http www tetc co jp e index htm R20UT0455EJ0101 Rev 1 01 AS Page 35 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup 2 9 2 Connecting to a 64 pin 0 5mm Pitch Foot Pattern The following is a procedure of connecting to a 64 pin 0 5mm pitch foot pattern on the user system using the ROE53036ACFKAO not included For details on the ROES3036ACFK40 not included refer to its user s manual 1 Attach the NOPACKOOASD ND included with the ROE53036ACFKAO to the user system 2 Attach the YOPACKOO64SD included with the ROES3036ACFK40 to the NQPACKO64SD ND and secure it with the YQ GUIDEs 3 Attach the ROE53036ACFKAO to the YOPACKOOGASD 4 Attach the CN1 side of the converter board to the CNI side of the flexible cable Evaluation with 4 actual MCU
247. uct 3 When using this product note that the PCLKRI register is rewritable if bit 5 of EPRR is 1 even if bit 0 of PRCR is 0 Make sure to set bit 5 of EPRR back to 0 Note on the PLL Clock When using this product be aware that the high speed on chip oscillator cannot be used as the clock source for the PLL frequency synthesizer Note on the Low speed On chip Oscillator Oscillation Stop Bit CM14 When the low speed on chip oscillator is selected for the operating clock the low speed on chip oscillator oscillation stop bit CM14 bit 4 at address 0009h in the actual MCU is disabled from being set to 1 stop In this product however this bit can be set to 1 stop Note on Oscillation Stop Detection at WAIT Time When using this product leave oscillation stop detection turned off during WAIT mode This is because this function may not work normally during WAIT mode R20UT0455EJ0101 Rev 1 01 AS Page 216 of 228 Dec 16 2011 RENES ROE521500MCUOO0 User s Manual 7 Hardware Specifications Note on the timer RB2 To use the output event of timer RB2 along with the event link controller ELC in this product follow the procedure described below 1 If interrupt handling based on timer RB2 is unnecessary set bits 2 0 IVL2 IVLO bits of TRB2IC 0 and 1 registers to 000b to disable interrupts 2 Setup the DTC related registers so that DTC transfers based on underflow of timer RB2 are executed At this time
248. us display Table 5 13 Display items ul B US HE IU R W RWT CPU QN BUSACC 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 Addresses of the address bus Data of the data bus Displayed in hexadecimal Shows the data bus width indicated as 8b when the bus is 8 bits wide or 16b when 16 bits wide Shows the state 0 or 1 of BHE Byte High Enable signal When this signal is 0 it means that an odd address is 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 and DTC 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 66 Shows the data bus state indicated as R when in a read state W when in a write state or when no acce
249. ution time Go Break cumulative execution time 100 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 5 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 pop up menu The Performance Analysis Conditions dialog box will be displayed Performance Analysis Conditions 3 m Registered events Condition REL ve Between two events Details Start event 2R A F Address not 00000 1 Delete Enable gt Disable End event OR Event TaskID Con Add F Address 00000 0 1 Disable Event used 2 Free 14 Detail Time unit 10ns Jave Load Help Apply E Figure 5 66 Performance Analysis Conditions dialog box R20UT0455EJ0101 Rev 1 01 AS Page 141 of 228 Dec 16 2011 RENES ROE521500MCUOO User s Manual 5 Debugging Functions 1 Setting measurement conditions 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 1s handled as 1 Table 5 24 Measurement condition modes Disabled Not measured Between two events Details S
250. v 20 Debug a program with various functions of the emulator debugger 2 Setup Change the settings of the power supply to MCUS or clock supply according to the conditions on use Connect the user system as occasion demands Turn ON the power to the emulator and the user system as simultaneously as possible Check that system status LEDs and POWER and RESET of the target status LED are lighting When the user system is not connected the POWER LED does not light up Start up the High performance Embedded Workshop to launch the emulator debugger Check the contents set in the step 12 in Figure 2 1 Do not select the Start booting up on successful completion of self checking checkbox Refer to the High performance Embedded Workshop and 5 Debugging Functions page 79 Figure 2 2 Flowchart of starting up the emulator After the self checking R20UT0455EJ0101 Rev 1 01 Dec 16 2011 44 N SAS Page 24 of 228 ROE521500MCUO00 User s Manual 2 Setup 2 2 Installing the Included Software If you have Windows 7 Windows Vista or Windows XP on the host machine this installation must be executed by a user with administrator rights Note that users without administrator rights cannot complete the installation Place the CD ROM in the CD ROM drive and follow the instructions to install the software R20UT0455EJ0101 Rev 1 01 AS Page 25 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual 2 Setup
251. ve replaced an emulator main unit or emulation probe rewrite an emulator name and serial number in the text file you filled in earlier to register your new hardware products 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 R20UT0455EJ0101 Rev 1 01 AS Page 14 of 228 Dec 16 2011 RENES ROE521500MCUO00 User s Manual Terminology Terminology Some specific words used in this user s manual are defined below MCU unit R0E521500M CU00 This means the E100 emulator for the R8C Family R8C 5x Series Emulator system This means an emulator system built around the MCU unit ROES21500MCU00 The emulator system is configured with an emulator main unit ROE001000EMUOO MCU unit ROES521500MCUOO 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
252. verage memory into a coverage only buffer 000000 coverage D TO a whe T P nez MIE Can 1FFFF he Ii Igas ure ai 7 Data acquisition i z 1 Allocation change 240000 i ES a Ls E J CHL Eh rare Can perc rm Area Where coverage Can je measured ASUTE ed FFFFFF He meas Figure 5 105 Schematic of data coverage memory allocation change The acquired coverage information is accumulated in the coverage buffer until the user clears it However the coverage information on areas that have no coverage memory allocated is not updated The coverage information shown in the Data Coverage window includes the content of the coverage only buffer R20UT0455EJ0101 Rev 1 01 AS Page 166 of 228 Dec 16 2011 RENES ROE521500MCUO0O0 User s Manual 5 Debugging Functions 5 12 4 Data Coverage in an Address Range The E100 emulator shows the access information it acquired from a user specified address range Data Coverage x a SS it e wt OK ggscg OOOBAS s RAM e t8 lh U3 OO04SCO Dpmnscs RAM de 6f ac Z4 OOO RAM i3 d bd e addice RAN cy bo di Ue DD RAM 99 bY do 30 mG Address Range Task Stack Figure 5 106 Data Coverage window address specification The Data Coverage window is vertically divided into two by the splitter The upper pane shows the address ranges to be measured and access rates Table 5 35 Contents in the upper pane of the Data Coverage window Range Address range
253. warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office equipment communications equipment t
254. xisting workspace This is the option available to choose when the workspace you opened has no history recorded R20UT0455EJ0101 Rev 1 01 AS Page 68 of 228 Dec 16 2011 RENES ROE521500MCUO00 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 se Create a new project workspace Cancel L Open a recent project workspace we F Administration E C Browse to another project workspace Figure 4 2 Welcome dialog box 2 Project Generator will start New Project Workspace Projects Workspace Mame Project Mame Directory fc WorkSpace T est CPU family MIEC Tool chain None Project Types Debugger only M16C E100 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 workspace name is good you do not
255. y Language Codes Double click an instruction you want to correct in the Disassembly window or choose Edit from the pop up menu and a dialog box labeled Assemble will be displayed Use this dialog box to correct assembly language Assembler x Address Code Fa2F5 DSUBFE di Mnemonic MOY WL O0H 2H FE Figure 5 10 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 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 R20UT0455EJ0101 Rev 1 01 AS Page 93 of 228 Dec 16 2011 RENES ROE521500MCUO0 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 R
256. y specification Capture Do not Capture Step execution recording condition Se Possible Possible 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 setting possible j 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 M Possible 4 Repeat fill until stop Each time a trace point is encountered a total of 512 cycles before and after that point are acquired and 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 setting Possible PP
257. ystem Configuration 1 3 1 System Configuration Figure 1 1 shows the configuration of the emulator system 4 USB interface cable 1 MCU unit ROES21500MCU00 2 Flexible cable a 7 Pitch converter board for zd I connecting to the user system ie Ge Gs Ge be be oe ga a Ga A Vg V1 Tad p 1 p 4 Bak 0 AE DA Ind ace ee fn o asi ER PA cu 5 AC adapter power x supply for the emulator 6 Host machine 3 E100 emulator 8 User system and main unit user system power supply Figure 1 1 System configuration 1 MCU Unit ROE521500MCUOO this product This is an MCU board for the R8C Family R8C 5x Series MCUs and contains an evaluation MCU 2 Flexible cable ROE001000FLX10 included 3 E100 Emulator main unit ROE001000EMUOO This is the E100 emulator main unit 4 USB interface cable This is an interface cable for the host machine and emulator 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 ROE53054ECFK 060 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 R20UT0455EJ0101 Rev 1 01 AS Page 17 of 228 Dec 16 2011 RENES ROE521500MCUO0 User s Manual 1 Outline 1
258. zation 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 function setting from the menu Start Stop Function setting 3 i x Work address rj a The specihed routine i executed immediately before exection of the user s program Starting address El The specified routine ts executed immediately after the stop of the user s program Starting address xj Ej cancel Heln Figure 5 152 Start Stop function setting dialog box 5 15 2 Specifying the Work Address Use this command to specify the address of a work area stack area for use by a routine to run before the user program execution is started or after user program execution is stopped CAUTION The specified address must be in the RAM area and not used by the user program 5 15 3 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 is 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
Download Pdf Manuals
Related Search
Related Contents
MODEL DIE9 DE Betriebsanleitung FR Manuel d'utilisation - V-Zug 823 0064 000 UM NILFISK Extreme EU 1.indb Sandisk CF ULTRA II 8 GB KESSEL-Pumpstation Aqualift® S LW 600/LW 1000 für Fisher-Price M9970 User's Manual Automatisation des OST : l`expérience américaine Istruzioni montaggio 参考資料2 vedi scheda tecnica Copyright © All rights reserved.
Failed to retrieve file