Home

CE2000 User Manual - Renesas Electronics

image

Contents

1. 40 SEP INTEREACB u 4 USER SYSTEM INTERFACE u u y unun iu 42 TOTORA L uu us aun uuu 9010 0 060090509 98 0 0 0000508 46 Ign ce TI 46 46 HOW THE TUTORIAL PROGRAM WORKS 47 DS TOU TS HEV A 49 Opening FOV OF 49 SETTING UP THE HEW PURE DEBUGGER FOR 2000 85 2238 50 50 O T PT 51 DOWNLOADING THE TUTORIAL PROGRAM 53 Lodin the Download 9 Displayine Ihe Programi 53 Renesas System Solutions Asia Pte Ltd 7 7 UIING RE POU 54 Idal Selling a Program Count PC Breakpoltti 54 222 suis ee EE E E 22 7 7 3 ROOTES GAC PCH 56 7 7 4 E E 57 7 8 EXAMINING MEMORY AND V 58 7 8 1 58 7 6 2 lil puri TC 59 7 9 STEPPING THROUGH 61 4 9 4 RN sss n 61 7 10 BREA
2. 17 POWER UP THE EMULATOR 18 CHECKING THE SYSTEM STANDALONE MODEB 19 LED indicati OW 18 ACTIVATION OF THE EMULATION 19 S sss ei 19 CONFIGURE THE PLATFORM NR o 20 21 Operating Node SClCCHON 21 foe 2 User Signal Masking Control RESET NMI amp STBY 21 Downloading of Emulation Function Programmable Function Generator 21 MEMORY 22 CONNECTION TO TARGET SYSTEM 4 5 23 23 Types of User TAC AC irr or 23 OPTIONAL SODIMM MEMORY SELECTION 2 EMULATION FUNCTIONS 28 AT 28 Ji uuu unun ss 26 High performance Embedded Workshop HEW 28 PROGRAMMABLE FUNCTION GENERATOR PFO 30 J NJ
3. On Chip Eead w Status Target System Emulator Connected Target Device Configuration 00000000 to H OOOLFFFF On chip to H OOFFFFSF Internal H OOFFCOOO to H ODFFEFEF On chip RAM to Internal to H OOFFFFFF Un chip System Memory Resources Optional Memory Bankl Available Optional Memory Banke Available Optional Memory Banks Available Optional Memory Bank4d Available Program Mame Memory Loaded Area 4 Memory Platform Events Figure 2 26 Mapping of Optional Memory Shown in Status Window The Memory page of Status window in Figure 2 26 details the usage of the different banks of optional memory Please refer to Section 3 13 for the details in Memory Mapping setting BP Renesas System Solutions Asia Pte Ltd 24 NE SAS Blank Page Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 3 Emulation Functions 31 Overview 3 1 1 Emulation The CE2000 H85 2238 emulator operates in two modes Break and User modes To execute the user program user can either Single Step Run at current program counter or Reset Go This will cause it to operate in the User mode To terminate the User Run state a break condition has to be asserted to bring the emulator to the Break mode This can either be a preset condition eg PC Break Event Break or a forc
4. rs GGG GG OG GuGuG A SR GU GGG GG G o UGG SEG SEG GS R RE GU SR GGG BUG GE UG GGUS R GG GUN GGG GG GGUSR S GUERRE GG GS GU GGUS RR GUN GG GS EGGS RR SU GUERRE GS UGG RR NR GG RR GA Power Supply Input RUN Status LED RED Self Test Failed PC USB Connector POWER Status LED GREEN Run RED Power i ORANGE Self Test ORANGE PC Detection BLINK Self Test Cycle ended Figure 2 2 Compact Emulator Renesas System Solutions Asia Pte Ltd 434 NE SAS 22 Installing HEW software HEW Pure Debugger for CE2000 H85 2238 can be used alone as pure debugger which users can only do debugging on the download module If a user has HEW compiler package with Hitachi s Toolchain he can use HEW Pure Debugger for CE2000 H85 2238 with integration with the Toolchain This allows users to do debugging and compiling by using only 1 application To install HEW Pure Debugger for CE2000 H85 2238 only the installation is simple by just running the CE2000 exe In order to use HEW Pure Debugger for CE2000 H8S 2238 and H8S H8 300 Series C C Compiler a user need to install the hew package
5. 63 FEG Prootoni 63 V Ico 64 FOE GCA Q 64 ile VV INO c 65 Displaying Individual Elements an Array 65 J G DI A 66 Pen 67 Renesas System Solutions Asia Pte Ltd Table 1 1 Table 3 1 Table 4 1 Table 5 1 List of Tables CE2000 H8S 2238 Emulator Functions 4 Types of Breaks Encountered During Emulation 31 MCU Modes 36 Differences between H8S and Emulator 40 Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 1 Introduction 1 1 Overview The CE2000 H85 2238 Compact Emulator is one of the Renesas s Development Tool series It is produced as a cost effective easy to use support tools The 2000 85 2238 emulator has an easy to setup USB link and a common user friendly Windows based interface High performance Embedded Workshop HEW Its flexibility is evident in its Programmable Function Generator PFG which allows user to select and download different emulation features It has a built in Self T
6. E 30 GO RESET Go GO AT PC GOTO CURSOR 0 0 0 1 30 PU N 30 T 30 IONS 31 PAV S 32 Function E sanant seen 32 Renesas System Solutions Asia Pte Ltd 3 8 3 9 3 10 3 11 22 3 13 3 14 3 15 SECTION 4 4 1 4 2 4 2 1 4 2 2 4 2 3 4 2 4 4 3 4 3 1 4 3 2 4 11 4 12 4 13 4 14 SECTION 5 5 1 2 2 SECTION 6 SECTION 7 7 1 Kio 7 3 7 4 7 4 1 7 5 7 5 1 75292 7 6 7 6 1 7 6 2 RUN TIME NIEASUPEMENE 32 TRACE 22 MEMORY EON TION 33 PARALLEL ON THE FLY POTF 33 hasse edd P CR 33 CPUAND VO REGISTERS ACOESS 34 e eoe E MEIN I I RR RR Rem 35 C SOURCE LEVEL DEBUGGING 35 H8S FUNCTION SUPPORTELD 36 MCU OPERATING MODE 36 MEMORY AREA cccccscccscccscccsscsccsssenscenccesscesccuscesseuscenccesccesscesseessessenccesscesscesseessenseencs 36 INTER
7. Standalone Self POWER LED lights up in Orange denoting entering self Test test mode Adjacent RUN LED do not light up after the test Blinking POWER LED Clean the contact connector contacts Change the USB cable Is user supply provided to the target Has HEW been setup in the PC Cannot run Is clock set to target code on target Is there any clock signal input to the emulator Is mode set to target Is reset masked in the HEW configuration platform window Is STBY masked in the HEW configuration platform window NMI Is NMI masked in the HEW configuration platform window Is Target supplying power to the emulator Has HEW detected the Cable Is CABLE IN N tied to ground in the target system Is the target connection tight and secure Is the emulator pull up resistors driving the target system 69 Renesas System Solutions Asia Pte Ltd Blank Page 70 Renesas System Solutions Asia Pte Ltd 434 NE SAS Appendix A User Connector Pin Assignment User Connector 1 Pin Assignment Column Pin Description A 20 0 Column Pin Description A 22 AVSS A 20 B 20 PEMD 55 i O 39 AVSS B 89 B 19 PESDS B 38 AVSS 8 18 PED B 37 WDTOVV B 17 PED B J B POMBE A 1 3 3 3 A B 3 LA VCC B CC 0 0 3 3 3 3 A
8. As at the current date the available function is the Integrated 256 Cycles of Bus Trace and Two Event Breaks More functions will be generated later Please approach the relevant Renesas Sales Office for further information 3 3 Pin View Pin View module shows the pin state of device in graphical and text forms 3 4 Go Reset Go Go at PC Goto Cursor Real time execution im Debug Go by the H85 chip based on the user setting There is no cycle steal during the execution mode 35 Reset CPU When RESET CPU command is activated the following actions will take place PC Power on Reset vector value ER7 H FFEFBC ERO 6 H 0 CCR H 80 EXR H 07 The microcomputer is reset 3 6 Single Step There are four types of Single Step Step In Step Over Step out e Step Single Step executes the instruction at the current program counter If an interrupt is asserted the interrupt service routine will not be serviced unless a Go commands is issued Step In will execute a single instruction only For C source file a single step will execute a single C source code Whereas for an assembly file a single step will execute a single assembly instruction code Step Over executes multiple Step In to complete a function execution until it has reached the next instruction Renesas System Solutions Asia Pte Ltd 434 NE SAS Step out performs program stepping out of a function Step wil
9. Programmable Function Generator Trace Event Breaks PinView 512Kbytes internal ROM max 128Kbytes internal RAM max Provision of 4 banks of selectable optional memory block 2Mbytes SODIMM Not in Package Copy Search Fill Load and Save memory functions Memory can be edited and viewed in ASCII Byte Word Long Single Float Double Float format Memory viewing and modification during user program execution Step In Step Out otep Over PC breakpoints max 256 Reserved Access Break Write Protected Break User break by ESC key Two Events breaks address address mask access under development User configurable emulator functions Current function includes 256 cycles of Trace Buffer amp 2 channels of Address Data Mask Breakpoints Trace memory size 64 bit x 256 bus cycle Signals displayed of each bus cycle 24 bit address bus 16 bit data bus Displays mnemonics of instructions executed during emulation Save Trace data into ASCII format Two event breaks are provided to trigger on the following conditions e Address range Data with Masking Event counter Provides instant graphical package view of all the pins of selected microcomputer Provides an alternative view in text form Renesas System Solutions Asia Pte Ltd 434 NE SAS Items Specifications Clock selection Execution time measurement User Cable interface Voltage Follower Po
10. long lt age H 0015 Ox00fre028 1 short we name Midori Ox00ffe020 E 2 1 struct namelist E 3 1 0 03 struct namelist 4 ral ma 1 Figure 7 22 Displaying Individual Elements Array 7 9 Stepping Through a Program The 2000 85 2238 emulator provides a range of options for stepping through a program executing an instruction or statement at a time 7 9 1 Stepping e Step In F11 Set PC H 80C Execute Step In 2 times x g g sic sortisectionl AGE 0 00000924 count t eort sectionl ID 0 00000832 t x gd ds3a gu void sort list key struct namelist liszt sho
11. 04 OxO0000060 00 OxOo0000070 00 OxOO0000080 00 04 000030 00 00 04 OxO0000040 00 OxOOO000B0 00 04 Figure 7 17 Memory Window s Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 8 2 Watching Variables It is useful to be able to watch the values of variables as the program is being stepped For example set a watch on the struct variable sectionl which is declared at the beginning of the program using the following procedure Scroll up in the program window until you see the line sort section1 ID Inthe Program windows click once at the word section1 to position the blinking cursor on the word sectionl Within the Program Window Tutorial c perform a right mouse button click to display a pop up menu and choose Instant Watch The Instant Watch dialog will be displayed Instant Watch 0 Os00ffe01 2 struct nan 1 050082020 1 struct na 2 00 2 struct nan 31 1 k Figure 7 18 Instant Watch dialog e Click Add button to add the variable to the Watch Window section B 01 2 P I I k MEUS namelist E Figure 7 19 Watch Window A variable watch can be added to the Watch Window by specifying its name Use this method to add a Watch on the variable count as tollows e Click with the right mouse button within the Watch window and choose Add Watch
12. Note Select Toolchain Hitachi H8S H8 300 Standard Renesas System Solutions Asia Pte Ltd New Project Workspace Projects Workspace Mame mm lication Assembly Application 0000 ba Demonstration Project Hame Empty Application Import Makefile let Library Directory C Program Files HEW SO CE PURE DEBUG Browse Family H85 H8 3Ul Tool chain Hitachi H 5 H 87300 Standard Properties Cancel Figure 2 18 Creating new workspace 2 9 Configure the Platform Before any emulation can proceed user is advised to configure the platform for the desired application This will ensure a proper control over the targeted application All the following can be configured by selecting menu Options gt Emulator gt Systems Configure Platform LFU Control Device H8572214F M User Reset Enable User MMI Enable M de Ady with oe User STBY Enable Clock 0 000 MHz Illegal Access Break Enable Package 1006 hd PFG Unknown Hot Programmed Free running Timer Resolution Change Driver USB Driver L Cancel Figure 2 19 Configure Platform dialog Figure 2 19 shows the Configure Platform dialog for platform configuration ew Renesas System Solutions Asia Pte Ltd 434 NE SAS 2 9 1 Device and Package Selection User has to select the desired device
13. 4 3 Low Power Mode For reduced power consumption the H85 has medium speed sleep module stop hardware standby and software standby mode 4 3 1 Hardware Standby Mode Ihe hardware standby mode is switched by the STBY signal input This signal will initialise the emulator registers In default the STBY signal is masked in the Configure Platform dialog The status of the STBY signal from the user s target system can be monitored by HEW 4 3 2 Sleep and Software Standby Modes The sleep and software standby modes are switched using the SLEEP instruction These modes can be cleared with either the normal clearing function or with the break condition fulfilled including ESC key input The program will then be put to a stop Trace information is not acquired in sleep and software standby modes NOTE When restarting after a break the code after the SLEEP instruction will be executed 4 3 3 Medium Speed and Module Stop Modes These modes are switched by the setting of the I O registers in the MCU and not controlled by the emulator Renesas System Solutions Asia Pte Ltd 434 NE SAS 44 Interrupts During emulation the user can interrupt the 85 If an interrupt occurs while the emulator is in the break mode the interrupt is not processed However if an edge sensitive interrupt occurs while the emulator is in the break mode the emulator latches the interrupt and executes the interrupt processing routine when the GO c
14. Figure 7 3 Configure Platform dialog 3S Renesas System Solutions Asia Pte Ltd 7 5 2 Mapping the Memory The next step is to map the emulation memory of CE2000 H85 2238 emulator for the application you are developing 434 NE SAS e To display the current memory mapping choose Options gt Emulator gt Memory Resource menus The Memory Mapping dialog shown in the following figure Hemor Mapping x Type Memory Close 00000000 00020000 OOFFBOOO OOFFCOOO DUFFEFCD DFFF3800 DODIFFFF Add On Chip Read or External Guarde On Chip Guarder On Chip Read wi External Guarde On Chip Esad wi External Guard Edite Chip Esad wi Figure 7 4 Memory Mapping Dialog Click on the Close button to end the Memory Mapping configuration and open Status window under the View menu Select the Memory tab in Status window to show the Memory Mapping configured z Status E Target System Emulator Target Device Configuration 00000000 H O O0FFFS H OOFFCOOO Connected to H OOO1LFFFF to H OOFFFFSF to H OOFFEFEBF to H OOFFFFEF H OOFFFFCO to H OOFFFFFF Optional Memory Bankl Optional Memory Banke Optional Memory Banks Optional Memory Memory Loaded Area On chip ROM Internal I O On
15. Hes 2214F 10 000 HHz PC Break l1n03ms Connected Unconnected Figure 7 11 Platform page of Status Window The cause of last break line shows that the break was a PC Break en Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 7 8 Reviewing the Breakpoints The list of all the breakpoints set in the program can be viewed in the Eventpoints window e Choose Eventpoints from the View menu or click the Eventpoints Window button in the toolbar P ki Action Enable 0000080 2238 67 Stop by PC Break Figure 7 12 Eventpoints Window The Eventpoints window also allows user to perform the following e Define new breakpoints e Delete existing breakpoints e Disable existing breakpoints Do a right mouse click within the Eventpoints window to show the following pop up Edit Enable Disable Delete Delete All 50 bo Source Glose File rose All Files Allow Docking Hide Figure 7 13 Popup menus in Eventpoints Window 2e Renesas System Solutions Asia Pte Ltd QE NE SAS 7 7 4 Examining MCU Registers While the program is halted you can examine the contents of the H85 2238 Series MCU registers These are displayed in the Registers Window e Choose Registers from the View menu or click the Registers Window button in the toolbar E 7 Register Value 4 ERU ERI ERZ H OOOO000EF ERS H OOFFOO
16. from the pop up menu Renesas System Solutions Asia Pte Ltd The Add Watch dialog appears A xj Variable expression cound Cancel Figure 7 20 Add Watch Dialog e Type the variable count and click OK The Watch Window will show the content of the variable label count note that you might be getting different result of count PON EN Th Figure 7 21 Watch Window You can click on the symbol to the left of any symbol in the Watch window to expand it and display the individual elements in the array eu Renesas System Solutions Asia Pte Ltd X Mame Value al Em E 1 0 1 2 struct namelist 5 E 0 1 0 012 struct namelist E idcade 00000492 O DOffet c long age 0011 4 short He name Naoko D ffen2 8 l 1 1 20 struct namelist idcade 00002258 00 02
17. mette 2 a gt usai S entm tte Figure 6 1 E a 2 amp m 5 og e amp a 2 ee Of TX User Vcc 47 KO lt Analogue Pins User Vcc 47 lt STBY MD 0 2 lt Emulator Control User Microcomputer 47 KO lt EXTAL Emulator Control User Vcc User Vcc Emulator Supply CABLE IN N VCC AVCC AVREF AAA A AVSS Figure 6 2 Interfacing Circuitry Renesas System Solutions Asia Pte Ltd 24 NE SAS Blank Page s Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 7 Tutorial The following describes a sample debugging session designed to introduce the main features of the 2000 85 2238 emulator used in conjunction with the High performance Embedded Workshop HEW software The tutorial is designed to run in the 2000 85 2238 emulator s resident memory so that it can be used without connecting the CE2000 H85 2238 emulator to any external user system 7 1 Introduction The tutorial is written in C source code Before reading this chapter e Setup the 2000 85 2238 emulator and verify that it is working correctly with the HEW software The CE2000 H85 2238 emulator need not be connected to any us
18. Emulator Functions Items Specifications Supported H85 2214 series 85 2214 Microcomputers H85 2215 series H85 2215 H85 2238 series H8S 2236 R W 2238 R W 85 2237 series H8S 2233 2235 2237 H85 2227 series H85 2223 2224 2225 2227 85 2239 series 85 2239 Operating Frequency 2 MHz Min 16 MHz Max Operating Modes Mode 5 6 7 and 8 Target Supported Operating Voltage Range Host Machine Host Interface Supported File Formats Interface Software Emulation Functions 2 5 Volts 5 Volts Minimum Pentium or equivalent processor PC Microsoft Windows 2000 98 2 Edition Me USB Ver 1 1 12Mbps Motorola S type ELF Dwart ELF Dwarf2 HEW Pure Debugger 32 bit Windows based interface providing on line help Perform real time emulation of a target program at 2 16MHz C source level debugging e g C level step execution instant watch view labels Display MCU operating status e g Run Sleep and Standby during User run mode Display accessed address during execution Modity and display MCU registers Assemble instruction mnemonics Dis assemble memory contents Radix Bin Octal Dec Hex ASCII input Loading and saving of session Reset MCU Go at current PC Reset Go Go to Cursor Renesas System Solutions Asia Pte Ltd 434 NE SAS Items Specifications Emulation Memory Memory Functions Parallel On the Fly Single Step Functions Breaks
19. Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if y
20. MCU Thus the reading are valid during the execution and break state Connect the AVCC pin the VCC pin for the A D and the VREF reference voltage pin to the A D and D A conversion power supply and the reference power supply on the user s system NOTE AVCC and VREF pins must be connected to VCC pins when the A D and D A converters are not used The conversion precision on the emulator is lower than that of the actual MCU This is mainly due to the extra resistance and capacitance introduced in the cabling and printed circuit boards Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 5 Differences between H8S Microcomputer and Emulator 51 Power up and reset When the emulator initialises the system or resets the Microcomputer as a result of a command such as switching the clock or when the reset command is used note that the general purpose registers and part of the control registers are initialized Table 5 1 Differences between H8S and Emulator Status Register Emulator 85 Emulator Power on reset vector value Initialisation ERO to ER6 H 00000000 power on ER7 SP H FFEFBC Undefined The I mask is set to 1 and the The I mask is set to 1 and the CCR other bits are undefined other bits are undefined 71 bit is set to 0 and the Trace bit is set to 0 and the EXR interrupt bits are set to 1 interrupt bits are set to 1 B 0 111 B 0 111 Emula
21. Power Supply Adaptor Dimensions Weight Power Supply Adaptor Cable Length PC Interface Cable Length User Interface Cable Length Environmental Conditions Item Temperature Operating Relative Humidity non condensing Operating Corrosive Gas Electrical Characteristics CE2000 Item Maximum Operating Condition Supply voltage Supply current Target Supply voltage Power Supply Adaptor Item Input Output E 1 434 NE SAS Specification 145 x 120 x 60 mm w x h IKg 85x45x35mm lxwxh 0 2Kg 1 89M 1 0m 0 3m Specification 10 C to 35 C 30 to 85 None Specification 0 3 to 7 0V 2 6A maximum 0 3 to 7 0V Specification 110 230V 47 63 Hz 4 75 5 25 Volt 2 6A 596 overload Renesas System Solutions Asia Pte Ltd 434 NE SAS Appendix F Frequently Asked Questions WHY DIDN T THE CLOCK INPUT TOGGLE IN THE PINVIEW WINDOW CAN CE WORK WITH OTHER USB DEVICES WHAT IS POTF WHAT CAN IT DO HOW TO DISABLE THE POTF FUNCTION HOW TO MINIMIZE THE INTRUSION OF THE POTF HOW MUCH CURRENT WILL THE EMULATOR DRAW FROM THE TARGET SYSTEM Vs WHY IS THE PROGRAM HALTED AT AN ADDRESS THAT IS NOT SPECIFIED IN THE PRESET COMBINATION BREAKPOINT WHAT IS THE CABLE IN N SIGNAL USED FOR HOW ABOUT MODE CLOCK RES NMI amp STBY SIGNALS HOW DOES THE EMULATOR CONTROL THESE SIGNALS 10 WHY IS STBY PIN MASKED IN DEFAULT 11 WHY IS C LEVEL STEPPING NOT POSSIBLE 12 WHY MUST THE PROGRAMMABLE F
22. Software Components The software components included in the package are listed below 1 CD containing HEW Pure Debugger Installation user s manual and FAQ HEW Pure Debugger does not include Renesas s Toolchain of Compiler Before proceeding user has to check that all the items listed in the packing list Please contact the relevant Renesas Sales Office if any item is missing 1 2 3 Optional Components The following items can be purchased to further enhance the emulation capability e Actual footprint user cable 2Mbytes of SODIMM optional memory Renesas System Solutions Asia Pte Ltd 434 NE SAS 1 3 System Requirement The following items are not supplied but they are required to be used with the CE2000 H85 2238 emulator A minimum Pentium or equivalent based processor personal computer with USB version 1 1 Microsoft Windows 98 2 9 Edition Me 2000 Xp Memory capacity at least 128 Mbytes 256 Mbytes or more recommended Hard disk drive 100 MB or more capacity necessary for full installation 14 Supported MCU Series by CE2000 H88 2238 Emulator 85 2214 series 85 2214 85 2215 series H8S 2215 85 2238 series H8S 2236 R W 2238 R W H8S 2237 series H8S 2233 2235 2237 85 2227 series 85 2223 2224 2225 2227 85 2239 series H8S 2239 Renesas System Solutions Asia Pte Ltd 434 NE SAS 15 Summary of CE2000 H8S 2238 Emulator Functions Table 1 1 2000 85 2238
23. and package The selection will determine the mapping window setting The package selection will also determine the type of graphical display in the pinview window 2 9 2 Operating Mode Selection There are five mode selections Mode4 Mode5 e Mode 6 Default Mode7 Target Mode determined by USER Target system via user cable NOTE For ROMless mode operation user has to make sure that external memory is connected before any emulation can occur If user s target system is not ready user may map the area to the optional SODIMM memory for temporary usage 2 9 3 Clock Selection User can choose from two different sources Internal or External Target Clock For internal clock user can key in any frequency from 1MHz to 25MHz in the step of 100KHz in Options gt Emulator gt Systems The emulator will generate the requested clock for the running processor For external target clock user can either input an oscillating clock into the EXTAL pin or place a crystal at the actual footprint user cable EXTAL and XTAL pins 2 9 4 User Signal Masking Control RESET NMI amp STBY These signals can be masked by the emulator when user executes the programs At startup the RESET and NMI signals are not masked whereas STBY signal is masked in Options gt Emulator gt Systems Illegal access break can also be enabled in this dialog NOTE If STBY signal is asserted during user run mode the emulator will enter standby
24. any functions that can help user to debug their target system Please feedback your needs to the design group so that more effective functions can be developed IE Renesas System Solutions Asia Pte Ltd 434 NE SAS 13 Why is the state changes of port not reflected in the Pinview window The pinview module gives an snapshot of the microcomputer pins at constant interval It is not an ocsilloscope that can snap signal as fast as 2ns It is a tool used to help user to have a feel of the status of the microcomputer pins It will be very helpful when it is at static state User can track any discontinuity in the emulator to target connection 14 Why can t the two Mbytes of optional memory be utilized fully The two Mbytes of optional memory consists of 4 x 512Kbytes of memory Each memory is selected based on the upper address Thus if user intends to use the whole memory at a starting address that is not multiple of 512Kbytes user will not be able to utilize the full memory capacity e g if the external address begin at H 20000 However if external address begin at H 0 as in the ROMless mode user will be able to map the whole 2Mbytes space H 0 to H 1F FFFF 15 Why can t the OTP work as accordingly User has to note the differences as stated in the user manual such as the initialization of registers SP the delay of signals about 4ns of cabling delay the unused pins 5 1 5 2 CVCC the regenerated power s
25. display the last 256 cycles of information upon encountering a break condition In each trace cycle the available displayed data are 24 bit Address e 16 bit Data e Read Write e MCU status e The Executed Code C or assembly Renesas System Solutions Asia Pte Ltd 434 NE SAS 3 10 Memory Functions General functions such as fill copy search save and load memory are supported by means of clicking the mouse button Modification of memory can be made via byte word or long word access NOTE User has to set the bus state controller correctly before the external memory can be accessed These functions can be applied on all the three memory type of the emulator namely e On Chip Memory internal ROM RAM e Optional SODIMM Memory 2Mbytes SRAM e User Target Memory 3 11 Parallel On The Fly POTF feature can be observed in the Monitor window in HEW 3 12 Memory Mapping This functions as a traffic controller to direct the MCU to access the intended area of memory In general there are three types of memory area namely On Chip Memory e Optional Emulator Memory e External Target Memory Two more constraints are set to prevent user s program from running wild i e Write protect Access inhibit or Guarded These protections can be allocated to the memory area in minimum unit of 32 bytes resolution These constitute nine possible attributes setting On Chip Read Write e On Chip
26. mode and the emulator control registers are initialised 2 9 5 Downloading of Emulation Function Programmable Function Generator User has to download the selected function to the Programmable Function Generator before it can be used This has to be done once the emulator is switched off Please refer to section 3 for more details e Renesas System Solutions Asia Pte Ltd 2 10 Memory Mapping QE NE SAS After the selection of Device Package and Mode the default mapping will be generated This can be Type 00000000 00020000 0 000 UFFEFCU UFFFSUU Hemor Mapping DUDTIFFFFE DUFFAFFF On Chip Eead or External Guard On Chip Guardec On Chip Eead wi External Guarde On Chip Read wi External Guarde On Chip Read wi Figure 2 20 Memory Mapping dialog Usually user does not require to change this setting However it may be changed for the following reasons e Addition of target system with memory e Addition of optional SODIMM memory The nine available attributes are On Chip Read Write On Chip Read Only e On Chip Guarded e Emulator Read Write e Emulator Read Only e Emulator Guarded e External Read Write e External Read Only e External Guarded Renesas System Solutions Asia Pte Ltd To change the setting u
27. to H OOFFFFBF Internal 0 H OOFFFFCO to H OOFFFFFF n chip RAM System Memory JOptional Memory Bankl Available Optional Memory BankZ Available Optional Memory Bank3 Available Optional Memory Bank4 Available Program Name Memory Loaded Area 4 gt Debug Find in Files Version Control Ready Read write 67 153 INS cap NUM Figure 3 1 HEW desktop window The key features of HEW are described in the following sections Menus Gives user access to the HEW debugging commands for controlling CE2000 Emulator Toolbar Provides convenient buttons as shortcuts for the most frequently used menu commands Workspace Displays the list of source files Window Output window Displays the status of debugger building process etc Help Button Activates context sensitive help on any feature of the HEW user interface 29 Renesas System Solutions Asia Pte Ltd 434 NE SAS 3 2 Programmable Function Generator This allows user to download the desired emulation function during debugging in Options gt Emulator gt System At the power up state there is no function in the and user has to download the preferred function before emulation User can only change the function when the emulator is in break mode To access the function after downloading user has to open up the break or trace window The programmed function will remain in the emulator as long as it is not powered down
28. with tool chain first and then install HEW Pure Debugger for 2000 85 2238 at the same location directory Step 1 Install HEW package with tool chain High performance Embedded Workshop Setup Select Components Choose the components Setup will install 34586 K Toolchains Simulator Debugger Librarian Interface Stack Analysis Tool Online Manuals Description L Pragram Files HE Prowse Install hreld Space Available on C 14339640K lt Back Cancel Figure 2 3 Installing HEW package with Tool chain Note The location chosen for installation in this example 15 C Program Files HEW 2 Install HEW Pure Debugger for CE2000 H8S 2238 Notes Users have to install in the same location as in Step 1 thus Renesas System Solutions Asia Pte Ltd C Program Files HEW High performance Embedded Workshop Setup Select Components Choose the components Setup will install 20 B Debugger 11 363 4 Online Manuals 12058 Description L Pragram ETE Files HEwV TaalsRHienesassDrebuaComp sFlatrarmm E mulato CE 22 38 2 InstallShield Space Available on C 14242512 K Next gt Cancel Figure 2 4 Installing HEW Pure Debugger HEW Pure Debugger for CE2000 H8S 2238 can be uninstalled by using the Add Remove Programs wizard of Control panel Renesas System Solutions Asia Pte Ltd 434 NE SAS 23 Installing the USB Driver The two methods to in
29. 1 340 118 Printed Circuit Board Layout Component Side View 0 225 0 002 Recommended PCB Thickness 11 60 1940 0630 007 is number of contacts B 2 Renesas System Solutions Asia Pte Ltd Appendix C User Connector Pin Layout CON2 CONI x 2 E ED T T F gt AH x fia FE mU 38 06 82 4 33 331 2 ge ge gs gs ie e 45 jw 38 ae Bil aa ga 82 22 gel da m I I gt u Ug I Te LB 1 mx mx Tou Tou Dooooooos2000 g a a ta x 5 6 ep B4 F96 B5 BB B7 Ba B12 P77 B14 P73 16 VSS B18 P64 e e B28 F36 e E E34 P23 E35 21 B38 P14 xp ep D saa Gs DD 71 c Component View At Target C 1 24 NE S AS Compact Emulator Renesas System Solutions Asia Pte Ltd 424 NE SAS Appendix D Casing Assembly O2mm Screws 4x 3mm Screws For fastening daughter board to main board 1 1 For fastening to casing Connection to target system Connection to optional memory SODIMM 4x O3mm Screws For fastening cover to the base of the casing D 1 Renesas System Solutions Asia Pte Ltd Appendix E Technical Specification Physical Characteristics Item CE2000 main unit Dimensions Weight
30. 12 1 s ffef e 65 laria short char B short short short char char struct Displaying Individual Elements in an Array Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 12 Using the Trace Buffer The trace buffer allows us to look back over previous 85 2238 Series MCU operation cycles to see exactly what the 85 2238 Series MCU has been doing prior to a specified event break such as an Event breakpoint 7 12 1 Displaying the Trace Buffer The trace buffer will display the captured bus cycle and decode the data in the trace window e Open the Trace Window by choosing Trace from the View menu or click on the Trace Window button in the toolbar The Trace window is displayed as shown in the following figure Code Data OOOU0BAD D DDO0C2 F 0 0 00000650 pidt nnum Hloop4d 8 R2L BER6 1 ERS ERA Hloop4d 8 ERI ERO R2L BER6 1 next loop3 loop4 next looped next loops loop4 zd m onm m oH om m mcn m m m m Figure 7 31 Trace Window e Adjust the width of each column by dragging the column dividers on either side of the labels just below the title bar 57 Renesas System Solutions Asia Pte Ltd 434
31. 8S H8 300 Series C C Compiler Package Manual Installed with HEW High performance Embedded Workshop 2 help 85 Series Hardware Manual e SODIMM User s Manual CE2000 User Cable User s Manual Renesas System Solutions Asia Pte Ltd SECTION 1 1 1 1 2 152 4 1 2 2 1 2 3 1 3 1 4 1 5 1 6 SECTION 2 2 9 2 9 1 2 9 2 2 9 5 2 9 4 2 09 2 10 2 11 2 11 1 2 1 1 2 2 12 SECTION 3 ox 3 1 1 3 1 2 434 NE SAS Table of Contents INTRODUCTIONOX c 1 OY VX 1 t6 CO 2 Hardware ConponeniS ono tese teet 2 COMPONCTULS u 2 Bom S 2 SYSTEM REQUIREMENT SUPPORTED MCU SERIES BY CE2000 H8S 2238 EMULATOR 3 SUMMARY OF CE2000 H8S 2238 EMULATOR FUNCTIONS 4 PRECAUTIONARY NIP v 7 viui ll Lm 9 EXPRESS 9 INSTALLING HEW 10 INSTALLING THE USB 12 CE PROGRAMMER OS AND LOGIC 21 1 15 TINS TAA
32. Asia Pte Ltd 434 NE SAS 7 11 Watching Local Variables The localised variables within a function can be viewed using the Local Variables Window For example in order to examine the local variables in the function sort Open the Local window by choosing Local from the View menu Note The Local Window will be empty if there is no local variable declared or local variables have not yet been entered In another words user target program execution should halt within a function with local variables to show any variables within Locals Window In this tutorial once when the execution halts within the function sort the local variables within function sort will be shown in Locals Window 00 012 1 ERB 1 struct namelist 004 A1 short 0000 R4 1 shart available now 0000 R3 j short Mat available now name 0s00ffe012 1 Ox00ffefS0 char worklizt 1 s ffef e struct namelist 4 Figure 7 29 Locals Window e Click on the symbol in front of the variable worklist in the Locals window to display the individual elements of the array worklist 0 01 2 ERG 0 00 012 struct struct narnelist Figure 7 30 000004942 4 01 0011 4 Ox00ffe1 Naoko 2 004 1 1 0000 1 R4 7 Mat available now 0000 1 R3 j Mat available now 00 01 2 1 90 1 DO0ffeQ
33. D2 A 2 _ 2 8 A B 24 B A OA B 28 B B 2 NOTE When target is connected user has to ground the pin CABLE EXTAL Pin can only accept Oscillating Clock User Pins Not available FWE XTAL OSC1 OSC2 gt gt 14 8 Lx 6 2 Renesas System Solutions Asia Pte Ltd 434 NE S AS Appendix B User Connector Specification Part Number of User Connectors KEL 1 27mm 50mil PITCH Plug KEL Cable Assembly 8830 080 1705 8822 080 171 040 NOTE The pin assignement of the user connector in Appendix A refers to the definiation of the pins at the target side but not the Compact emulator side User is advised to refer to the cable assembly illustration to avoid confusion A1 Target a40 Compact Emulator A40 Target 1 Compact Emulator Cable 1 No 1 a Cable 1 No 2 n 60 68 80 100 pins Cable 1 No n a Hi Cable 2 No 1 Cable 2 2 Cable2 No n b E Bn An Bn Cable mark for 26 30 34 50 pins Component side view Paul m 1 w Polarity identification B 1 Renesas System Solutions Asia Pte Ltd 434 NE SAS Part Number 8830E 080 170S Unit mm inch X X Cross Section of 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 919919199092 12117121119 970 38
34. K TOT MUNERE TN NND 62 7 10 1 Rr a DI OIE NT 62 7 11 WATCHING LOCAL VARIABLES Eri ERAS EPIO IRE Ie EXER ERE PAS Fede 65 7 12 UING TIE NH EE 66 77241 L Tr pu T UMEN T 66 7 13 unu dis 67 7 4 UEM I CMM MU 67 SECTION 8 DIAGNOSTIC mr 68 8 1 STANDALONE ITL 68 SECTION 9 TROUBLE SHOO TING iepene sedisse 69 APPENDIX A APPENDIX APPENDIX APPENDIX APPENDIX APPENDIX F USER CONNECTOR PIN ASSIGNMENT A A 1 USER CONNECTOR SPECIFICATION B 1 USER CONNECTOR PIN BAY OU sscsssiiisssciessnssscedsssesssvsevassocsssedesssosnsscassessssssoeane C 1 CASING ASSEMBLY D 1 TECHNICAL SPECIEICA LION suu E 1 FREQUENTLY ASKED QUESTIONS F 1 RENESAS TECHNOLOGY ASIA SALES OFFICES Renesas System Solutions Asia Pte Ltd Figure 1 1 Figure 1 2 Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 2 5 Figure 2 6 Figure 2 7 Figure 2 8 Figure 2 9 Figure 2 10 Figure 2 11 Figure 2 12 Figure 2 13 Figure 2 14 Figure 2 15 F
35. NAL ROM AREA 36 J i IV x 36 SEEN 36 EXTERNAE 37 Low POWER T 37 Hardware Standby Mode 37 Sleep and Software Standby Modes KE kaS 37 Medium Speed and Module Stop Modes 37 INTERRUPTIS EET 38 CONTROL INPUT SIGNALS RES NMI STBY 38 WATCH DOG TIMER u a Eienenn ase eek 38 16 BIT TIMER PULSE UNIT TPU AND 8 BIT 38 SERIAL COMMUNICATIONS INTERFACE 5 02 0 0 0 38 PROGRAMMABLE PULSE GENERATOR 4 38 DMA CONTROLLER I E 38 DATA TRANSFER CONTROLLER 30 BUS STATE CONTROLLER 39 LOPOTT onn sn C MM LM E 39 PD S eg umasa 39 DIFFERENCES BETWEEN H8S MICROCOMPUTER AND 40 POWER UP AND
36. NE SAS 7 13 Pin View The Pin View window is displayed as shown in the following figure which has 2 types of display Text Tree view and Graphical Chip view It provides pin state information of the device when it is running a program or in the idle state Fin Stabe FF 11111111 01111111 11111111 11111111 40 01000000 00007111 FF 11111111 FF 11111111 J FF 11111111 J FF 11111111 J YF 01111111 TF 00011111 Figure 7 32 View Window 7 14 Save the Session Before exiting it is good practice to save the session so that debugging work can be resumed instantly with the same configuration at the next debugging session e Choose Save Session from the File menu Choose Exit from the File menu to exit from HEW What Next This tutorial has introduced the key features of the CE2000 H85 2238 emulator and their use in conjunction with the HEW By combining the emulation tools provided in the CE2000 H85 2238 emulator user can perform extremely sophisticated debugging to track down hardware and software problems very efficiently by precisely isolating and identitying the conditions under which they occur d Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 8 Diagnostic The 2000 85 2238 emulator is designed to have all possible protective measures but it is still subjected to damage by user system or other unforeseen means The 2000 85 2238 emula
37. OS ERA H DFFEUDU ERS H OOFFEQL2 H OOFFEQL2 ER H OOFFEFAC 00080 CCR EXE Figure 7 14 CPU Registers Window As expected the value of the program counter PC is the same as the highlighted statement H 80C The registers values can be changed from the Registers window For example change the value of the PC Double click on PC in the Registers window The Register PC dialogu allows you to edit the value Cancel whole Register Figure 7 15 Changing Register Value Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 8 Examining Memory and Variables The behavior of a program can be monitored by examining the contents of an area of memory or by displaying the values of variables used in the program 7 8 1 Viewing Memory The contents of a block of memory can be viewed in the Memory Window For example to view memory e Choose Memory from the View menu or click the Memory Window button in the toolbar e Enter values as below Cancel End 000000 Format Byte 1 Display As ansi character Bytes Count For One Line 16 Byte Figure 7 16 Open Memory Window e Click OK to open the Memory window showing the specified memory area aaaress to 41 2 s OxO0000000 00 04 0 000010 BC cs 37 0 000020 00 03 0 00000030 30 c OxOO0000040 00 OxO0000050 00
38. PD D15 VSS 11 9 9 25 PC6 A6 A A A A A 30 RESERVED B RESERVED A B 29 RESERVED 2 8 B 8 A VSS B 27 2 B 7 PBO A8 TIOCAS A 6 PBI A9 TIOCBS B 2 PG4JCSON 6 PB2 A10 TIOCC3 B 25 B 5 PB4 A12 TIOCAA B 24 PF2WATN B 4 PBSAM TIOCAS B 23 B 3 5 B 2 X JPFMASN _ _ O vss B 1 NOTE When target is connected user has to ground the pin CABLE EXTAL Pin can only accept Oscillating Clock User Pins Not available are FWE XTAL CVCC OSC1 and OSC2 A 1 Renesas System Solutions Asia Pte Ltd 434 NE SAS User Connector 2 Pin Assignment Colum Pin Description Column Pin Description B 40 1 20 B 2 P61 B 39 PIZTIOCCOTCLKAAZ2 B 19 P62 B 38 PITIOCAUIROON B 37 Ple TIOCAZIROT N 36 VSS P20 P70 TMRIO1 TMCIO1 CS4 15 P7O TMRIOT TMCIO1 CSA N 15 P7I TMRI23 TMCI23 CS5 14 P B P80 B PSZ SCKUSDAUIROAN B A B 29 P34RxDUSDAO 28 P36 7 B a 5 O 7 P A B 2 B gt 5 P43 AN3 gt P96 DA0 P97 DA1 VSS PA0 A16 PA1 A17 Tx
39. Read Only e On Chip Guarded e Emulator Read Write e Emulator Read Only e Emulator Guarded e External Read Write e External Read Only e External Guarded To change the setting user has to e Click on the Add button in Memory Mapping dialog e Key in the desired address at From and To amp e Select the attribute ee Renesas System Solutions Asia Pte Ltd Edit Hemor Mapping Memory Mapping Ta setting External Read write 22 Cancel Help Figure 3 2 Modification of Mapping Memory At startup when user select the Device Package and Mode in the Configure Platform dialog default mapping for the application will be generated This can be viewed under Memory Mapping dialog In default if the device has an external address space it will be set to be external guarded Upon connecting the emulator to a target system or accessing the optional SODIMM user has to change this default setting 1 To access external target memory oet External Guarded to External Read Write or External Read Only To access optional SODIMM memory Set External Guarded to Emulator Read Write or Emulator Read Only For the On Chip attributes user can only change the attributes from Read Write and Write to Guarded but not at any other possibilities In the case for the Emulator and External attributes user can set it to any combination 3 13 CPU and Registers Access User can access these registers dire
40. S Section 6 User System Interface The user target system is connected to the emulator via the interface cable Interface circuitry is inserted in between to remove noise and protect the emulator When connecting the user target system to the emulator user has to consider the adjustment of the user system hardware Compensation for FAN IN FAN OUT and propagation delays are necessary In general the one way propogation delay of the cabling is about 4ns However the user clock signal is delayed for approximately 25 ns All signals are connected to the MCU with no buffering with the exception of NMI RESET e STBY MD 2 0 e EXTAL The emulator does not detect the following signals FWE OSCI OSC2 e CVCC e XIAL All port signals are pulled up a 47K ohm resistor with the exception of all analogue pins Ports 4 and 9 All signals satisfy the MCU AC timing specification The illustration of the user interface circuitry will be as follows L Renesas System Solutions Asia Pte Ltd 434 NE SAS Renesas System Solutions Asia Pte Ltd Q E lt He denm 2 5 SE REE GIN AEN E E 2 A J gt u E Pd c bD E E 2 eN lt gt ss 9 Q Ww Mo at L e 2 T 1 4 m 1 E E
41. SS OT Fisa mmn PE Ciian Al TEDAOCOEITI Version 1 10 Figure 2 13 CEOS and Logic Programming e Click on the Close button once the programming has completed 5 Renesas System Solutions Asia Pte Ltd CE Programmer Caution This Program ig used to upgrade the Hardware functionality of CE 2000 22239 Emulatar Ensure 2000 H85 2238 Emulator is properly restarted before continuing this upgrade Operating System C Program Files HE w TaalszHenesas sD ebugCamp sPlatfarm E mulatar s Logic C Program Files HE w Taals amp Henesas sD ebugLemp sFlatharm Emulatars Load Configuration File Exit cade 0 Success gt Programming Complete Remember Restart Emulator E Version 1 10 Figure 2 14 End of Programming Restart the emulator Note 1 Make sure that there is no interruption during the programming Otherwise reprogramming will not be possible and user will need to send the emulator back for the upgrade work 2 The programming of the emulator Logic will fail if the SODIMM is attached 3 User can perform the upgrade at any time by executing the CE Programmer exe if necessary 25 Installation Details The installer creates the following icons in the program group 29 High performance Embedded Workshop 3 Help 2 High performance Embedded Workshop 3 Read shee Hera Manual Navigator 5 Renesas High performance Embedde
42. To our customers Old Company Name in Catalogs and Other Documents On April 15 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Henesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry 24 NE S AS 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 her
43. UNCTION GENERATOR PFG BE PROGRAMMED AT POWER UP WHAT IS THE PFG USED FOR 13 WHY IS THE STATE CHANGES OF PORT NOT REFLECTED IN THE PINVIEW WINDOW 14 WHY CAN T THE TWO MBYTES OF OPTIONAL MEMORY BE UTILIZED FULLY 15 WHY CAN T THE OTP WORK AS ACCORDINGLY 16 WHY IS THE SELECTION OF TARGET CLOCK NOT AVAILABLE IN THE SYSTEM SETUP WINDOW rome o i 1 Why didn t the clock input toggle in the PinView window The pinview window read the Pins status from the emulator at a constant interval Thus there is a possibility that it always snaps the same level from the chip 2 Can CE work with other USB devices CE can work with other USB devices If another hub is used CE must be the last device to be plugged in 3 What is POTF What can it do POTF stands for Parallel On The Fly It can read write memory while the user program is running In this way user can have the instant view of the outcome of the executing program In order to access these memory the emulator will stop the running program for a short interval approximately 150 ns for a word access 4 How to disable the POTF function As long as the user do not modify the memory contents or perform a refresh memory window command POTF function will not be activated to intrude the real time operation of the user program rel Renesas System Solutions Asia Pte Ltd 434 NE SAS 5 How to minimize the intrusion of the POTF POTF will be activated ba
44. a breakpoint at address H 80C as follows e Right click in the 2238 c file and select Toggle Breakpoint popup menu at the line containing address H 80C void sorti 000000800 0 0000080 count 0 0 00000938 tor 34 0 00000810 eort sectionl 0 00000916 countt x gd sic sortisectionl AGE 0 000008924 countt x d ggugs2a sortisectionl ID 0000008932 count Figure 7 9 Setting a Breakpoint The dot will be displayed there to indicate that a program breakpoint is set at that address Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 7 2 Executing the Program To run the program from reset e Choose Reset Go from the Debug menu The program is executed up to the breakpoint you inserted and the statement will be highlighted in the program window to show that the program has halted 00000800 0 00000805 0 00000838 0 00000810 0 00000816 0 00000815 0 00000824 0000092 int count void orti main 1 c count 0 for E sort sectionl NAME run t sort sectionl AGE sort sectionl ID Figure 7 10 Program Break The message Break PC Break is displayed in the status window to show the cause of the break This can be viewed under Last Break Cause in the Status window e Choose Status Window from the View menu or click the Status Window button in the toolbar CEZO00 Emulator for Hes 2235 Family
45. adueteesasadeasamencceieen 16 End ot P Or lilii 17 HEWN NL T E E E 17 Power supply PUG uu ull ll uu sananuasapasawaqunqayyaquyassqussuquwaqsupaqaqasawqusyaquyassqqasasah 18 Execute HEW Trom Start ik uuu u uuu 19 RRC ALIS New WORKS eai 20 Cons ure Plalloimi dialon 20 Memory Mapping dial g uuu u 22 the Memory uuu 23 User Interlace Cable Direet Cone CHOI 24 User Interface Cable Actual Foolpfint LLL 24 Addition of Optional Memory Address Range 25 Memory Mappe VY ANC uuu 26 HEW de sobole 20 Modification of Mapping Memotry 34 Basic Bus Cycle Timing Expanded mod e 43 i te ID P CI G u E tomum Urt E 44 Execute HEW TOn SPORE VIO 49 Open Tutor u unn 49 Configure Platform dialog T 50 Monon S pp PAN uyu uu nus 51 Memory page of Status wi
46. air wear and tear abnormal store condition incorrect use accidental misuse abuse neglect corruption misapplication addition or modification or by the use with other hardware or software as the case may be with which the product is incompatible No warranty of fitness for a particular purpose is offered The user assumes the entire risk of using the product Any liability of Renesas is limited exclusively to the replacement of defective materials or workmanship DISCLAIMER RENESAS MAKES NO WARRANTIES EITHER EXPRESS OR IMPLED ORAL OR WRITTEN EXCEPT AS PROVIDED HEREIN INCLUDING WITHOUT LIMITATION THEREOF WARRANTIES 5 MARKETABILITY MECRCHANTABILITY FITNESS FOR ANY PARTICULAR PURPOSE OR USE OR AGAINST INFRINGEMENT OF ANY PATENT IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY NATURE OR LOSSES OR EXPENSES RESULTING FROM ANY DEFECTIVE EMULATOR PRODUCT THE USE OF ANY EMULATOR PRODUCT OR ITS DOCUMENTATION EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES EXCEPT AS EXPRESSLY STATED OTHERWISE IN THIS WARRANTY THIS EMULATOR PRODUCT IS SOLD AS IS AND YOU MUST ASSUME ALL RISK FOR THE USE AND RESULTS OBTAINED FROM THE EMULATOR PRODUCT Renesas System Solutions Asia Pte Ltd 434 NE SAS State Law Some states do not allow the exclusion or limitation of implied warranty or liability for incidental or consequential damages so the above limitation or exclusion may not
47. apply to you This warranty gives you specific legal rights and you may have other rights which may vary from state to state The Warranty is Void in the Following Cases Renesas shall have no liability or legal responsibility for any problems caused by misuse abuse misapplication neglect improper handling installation repair or modifications of the emulator product without Renesas s prior written consent or any problems caused by the user system Restrictions 1 Earthing applies only to manual for Renesas hardware products This hardware is designed for use with equipment that is fully earthed Ensure that all equipments used are appropriately earthed Failure to do so could lead to danger for the operator or damaged to equipments 2 Electrostatic Discharge Precautions applies only to manuals for Renesas hardware products This hardware contains devices that are sensitive to electrostatic discharge Ensure appropriate precautions are observed during handling and accessing connections Failure to do so could result in damage to the equipment All Right Reserved This user s manual and emulator product are copyrighted and all rights are reserved by Renesas No part of this user s manual all or part any be reproduced or duplicated in any form in hardcopy or machine readable form by any means available without Renesas s prior written consent Other Important Things to Keep in Mind 1 Circuitry and other examples described herein ar
48. ard and optional SIMM memory module produced only by Renesas System Solutions Asia Pte Ltd excludes all subsidiary products The user system or a host computer is not included in this definition Purpose of the Emulator Product This emulator product 15 a software and hardware development tool for systems employing the 85 series microcomputer This emulator product must only be used for the above purpose Improvement Policy Renesas System Solutions Asia Pte Ltd hereafter collectively referred to as Renesas pursues a policy of continuing improvement in design performance and safety of the emulator product Renesas reserves the right to change wholly or partially the specifications design users manual and other documentation at any time without notice Target User of the Product This product should only be used by those who have carefully read and thoroughly understood the information as well as restrictions contained in the user s manual Do not attempt to use the product until you fully understand its mechanism It is highly recommended that first time users Be instructed by users that are well versed in the operation of emulator product Renesas System Solutions Asia Pte Ltd 434 NE SAS LIMITED WARRANTY Renesas warrants its products to be manufactured in accordance with published specifications and free from defects in material and or workmanship The foregoing warranty does not cover damage caused by f
49. cations equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions
50. chip Internal I O On chip RAM Available Available Available Available System Memory Resources Program 4 4 gt Memory Platiorn Everts Figure 7 5 Memory page of Status window al Renesas System Solutions Asia Pte Ltd 434 NE SAS e Target Device Configuration Display the memory configuration of the specific target device selected e System memory resources Display the optional memory resource available to user during their emulation process Loaded Memory Areas Display the memory space that the loaded program has occupied The CE2000 H85 2238 emulator allows you to configure the attribution of the mapped memory Please refer to Section 3 for more details of memory mapping For this tutorial user will be using the default mapping displayed To view the mapping double click the appropriate range in the Memory Mapping window The Edit Memory Mapping dialogue box is displayed An example is shown in the figure below Edit Memory Mapping x Memon Mapping From 000000 1 3FFFF setting Emulator Read write hd Cancel Help Figure 7 6 Edit Memory Mapping Dialog e Click OK to close the dialog box Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 6 Downloading the Tutorial Program Once the CE2000 H85 2238 emulator has been setup user can download the object program for debugging 7 6 1 Loading the Download Module e Specify the down
51. ctly through the Register and I O windows respectively during break mode only a Renesas System Solutions Asia Pte Ltd 434 NE SAS 3 14 Session User can retrieve the last emulation enviroment by saving and restoring session HEW will load the same session which comprises of the following e Mode settings e Window positioning e File loaded e Clock settings e Registers value settings function loading 3 15 C source Level Debugging If user compiles and links the code with the Debug option enabled the Renesas object format abs file with the debugging information is generated This enables user to debug the code in C source level i e e Display code in C source level e Step code in C source level e View label e Goto label address e View local e Add watches Bg Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 4 H8S Function Supported The 2000 85 2238 emulator can support the H8S series of microcomputer The various functions support for the H8S are detailed below 4 1 MCU Operating Mode Setting The 2000 85 2238 emulator supports the four operating modes of the 85 User can select the MCU operating mode via the Configure Platform dialog The following table shows the MCU settings Table 4 1 MCU Operating Modes Operating mode Advanced expanded mode w o internal EE Advanced expanded mode w o internal con Advanced expan
52. d subjecting the emulator to excessive vibration Protect the emulator from excessive impact and stresses Check the emulators specifications such as power output voltage and frequency before connecting the power supply When moving the emulator take care to package with good protective box or otherwise damage it Pay special attention to exposed parts such as power switch and I O connectors Never allow exposed power supply to come into contact with the emulator casing which is grounded Renesas System Solutions Asia Pte Ltd 24 NE SAS Blank Page Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 2 Setup 2 1 Express Setup Steps e Unpack and verify parts against the packing list e Power up PC e Install HEW by running setup file e Power up the CE2000 H85 2238 emulator Connect USB cable from PC to the emulator within 10 seconds Otherwise the 2000 85 2238 emulator will go into Self Test mode e HEW USB Interface Power Supply Compact Emulator Figure 2 1 Basic Setup of 2000 85 2238 Emulator following topics detail the essential steps before proper emulation can be started uesresusesresusesresusesresusesssresesssvesessssssenssusseseszesesessese n su ss assu usas i ER AR ARR R RSS GG GG g GG gI GG g GG y GG gGAGRR GG GG seen GU GOLIRR G UY U I R UU UA 33 pasa
53. d workshop Pure Debugger F A High performance Embedded Workshop 3 Development Kits k T CEZUDU Usi ocation C Program Files HEW30_CE PUR 2000 Read Me Figure 2 15 HEW Start up Menu These menu have the following functions High performance Embedded Workshop 3 HEW will be activated 2000 User Manual User manual for CE2000 2000 Read Me Read Me file for CE2000 17 Renesas System Solutions Asia Pte Ltd 434 NE SAS 26 Power Up the Emulator A power supply is included in the CE2000 H85 2238 emulator package It can accommodate 110 240V 50 60Hz AC supply The unit is capable of a regulated 5V 2 6A output The following diagram shows the polarity of the power supply plug CENTRE POSITIVE 2 1 mm Phone Jack GROUND 5V Figure 2 16 Power supply Plug Connect the plug to the power input of the emulator The Power LED lights up red colour 2 7 Checking the System Standalone mode If the emulator is powered up and USB link to PC is not established within 10 seconds it will go into self test mode The POWER LED changes its colour from RED to ORANGE when it has entered the self test mode This test takes about 1 2 minutes At the end of the test the POWER LED starts to blink If the test fails the adjacent RUN LED lights up in RED Otherwise it remains unlit For more details about this test please refer to section 8 After the confirmation of the condition of the e
54. ded mode with internal Mode 7 Advanced single chip mode 4 2 Memory Area The H85 has a maximum memory area of 16 Mbytes The four classification of memory are 4 21 Internal ROM Area The emulator has a substitute RAM for the H85 internal ROM Access to this substitute RAM is as follows e Access arising from user program execution Read only write disabled HEW R W enabled Therefore the user can modify the internal ROM area memory and load the object program 422 Internal RAM Area The emulator has a substitute RAM for the H85 internal RAM When user tries to access the internal RAM this substitute RAM is always accessed instead User can access the internal RAM area from the user program or with an HEW 42 3 Internal I O Area When the internal I O area is accessed the emulator accesses the internal I O User can read and write to the internal I O area from the user program or with HEW He Renesas System Solutions Asia Pte Ltd 434 NE SAS 4 24 External Area The external target area will be accessed as long as the area does not belong to e Internal ROM e Internal RAM e Internal I O e Mapped Emulator Optional Memory User has to set the area to be read write or write protected in order to access the area Otherwise the area will be treated as Access inhibited or Guarded The number of accessing states and type of access e g DRAM access will be determined by the 85 registers eg WCRI
55. dimensions and part number are detailed in the Appendices A B and C Renesas System Solutions Asia Pte Ltd For Direct Connection te SERRE RE ERR I SR RR RR SI RSS GI R3 SG y I Gg G Xy SR S G IN SR I GUV UYER ES eee se IS GG UG RGUG RP IA RR UGdISLSER SESS S E GG SESS UG DG UG E REGE EG ERE GE ER REG GU EG S GERA gG GG GG GU R GU RE GER UGG GR GG S S GER RE GER RE GR GG G GER E GG UG E GG NGA GR GG GG GR GR GGG R GGG RN GGL SS GG GUGLE RR GUURR GU GLEN RE GGUR GR GER GG GUN Gu GU ER UAR GG SER GUN SG GNE SR GG GG Go GS R G GU R G UGG Gg GGG RR GG GGUS RR GG GR GG GG GR GR GG GGG GR GG GGUSR RE GU GU SG S GG Target System CE2000 Figure 2 22 User Interface Cable Direct Connection NOTE User has to connect the signal CABLE IN N to ground For Actual Footprint CE2000 Target System Figure 2 23 User Interface Cable Actual Footprint en Renesas System Solutions Asia Pte Ltd 434 NE SAS 2 12 Optional SODIMM Memory Selection Optional SODIMM memory is used when user wants to access external memory area when the target system is not available If SODIMM is purchased user has to open the casing and fix the SODIMM in the correct socket Please refer to the SODIMM us
56. e break condition Hit ESC key During Break mode user can manipulate their target system amp memory by accessing the I O Memory Windows During Run mode information such as accessed address CPU states e g instruction fetch cycle sleep mode and run time can be observed User can also view and edit the memory contents in the internal ROM RAM or optional SODIMM area This process is named as Parallel On the Fly POTF 3 1 2 High performance Embedded Workshop HEW The following figure is a snap shot of the HEW desktop window ee Renesas System Solutions Asia Pte Ltd amp gt 08 2171 Etr ez mimi s ir AT e 26 Debua CE2000 H85_ 223 v 5 2000 85_ 22 2 s F 2 Et amp Gt 9 m 9 Ss xl main 5 6 Tutorial 2 0 00000800 El Tutorial 0x0000080c count 0 C header file 0 00000838 for jf iodefine 0x00000810 sort section1 0 00000816 count 0 0000081 sort sectionl 15 stacksct 0 00000824 Ea source file 0 0000082 sort sectionl ID 0 00000832 count Workspace windo B i i xi Target System Emulator Connected Target Device 00000000 to 0001 On chip ROM H OOFFF800 to H OOFFFFS3F Internal 0 00 000 to H OOFFEFBF n chip RAM DOFFFF60
57. e for CE2000 target by clicking menu File gt Open workspace in the installed directory Note On a first time loading of the tutorial a dialog box prompting the move of workspace from previous installed directory is displayed Please click YES and the workspace would be configured to the current installed directory permanently Open Workspace Look in Cy Tutorial _ Tutorial Tutorial his File name Tutorial hws Files of type Workspaces L ancel 2 Figure 7 2 Open Tutorial workspace Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 5 Setting up the HEW Pure Debugger for CE2000 H85 2238 Before downloading a program to the CE2000 H85 2238 emulator the following items need to be configured e device type memory map The following sections describe how to setup the 2000 85 2238 emulator for running the tutorial program 7 5 1 Configuring the Platform To setup the target configuration e Choose menu Options gt Emulator gt System to open Configure Platform dialog Configure Platform LFU Control Device H85 2214F 7 User Reset Enable User MMI Enable M de with SHE IS User STBY Enable Clock 0 000 MHz Illegal Access Break Enable Package 1006 PFG Unknown Hot Programmed Free running Timer Resolution Change Driver USB Driver Change Cancel
58. e meant merely to indicate the characteristics and performance of Renesas Technology s semiconductor products Renesas assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein 2 No license is granted by implication or otherwise under any patents or other rights of any third party or Renesas 3 MEDICAL APPLICATIONS Renesas Technology s products are not authorized for use in MEDICAL APPLICATIONS without the written consent of the appropriate officer of Renesas Technology Asia Sales company Such use includes but is not limited to use in life support systems Buyers of Renesas Technology s products are requested to notify the relevant Renesas Technology Asia Sales offices when planning to use the products in MEDICAL APPLICATIONS Figures Some figures in this user s manual may show items different from your actual system Limited Anticipation of Danger Renesas cannot anticipate every possible circumstance that might involve a potential hazard The warnings in this user s manual and on the emulator product are therefore not all inclusive Therefore you must use the emulator product safely at your own risk Renesas System Solutions Asia Pte Ltd 434 NE SAS PREFACE About this manual This manual explains how to setup the Compact Emulator for usage of the H8S series microcomputers Operation using High performance Embedded Worksh
59. eby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Renesa
60. er manual In order to use the SODIMM user has to enable the memory at the desired address Inthe Memory mapping dialog click on Add e Key in the desired address at From at To e Select the attribute i e Emulator read write Emulator read only or Emulator Guarded NOTE 2Mbytes Four banks of 512 Kbytes of Optional Memory purchase separately can be used in the CE2000 H85 2238 emulator User can map the memory minimum of 32 Bytes to a maximum of 2MBytes to any space except internal space e g internal ROM RAM peripherals If the target memory is present in the same area as the optional memory the optional memory will have a higher priority to be accessed e g user maps the address from H 20000 to H 80002 as Emulator Read Write HEW will allocate 2 banks of memory for the user to access from area H 20000 to H 8001F Edit Memory Mapping 00020000 00080002 Emulator Head write cms Figure 2 24 Addition of Optional Memory Address Range 29 Renesas System Solutions Asia Pte Ltd Memory Mapping xj moy 00000000 On Chip 0008001 Emulator Read 1 00080020 External Guarde UFFBFFF On Chip Guardec UFFEFBF On Chip Eead w External Guarde On Chip Read w 0 External Guard
61. er system when using this tutorial User has to be familiar with the architecture and instruction set of the 85 2238 Series MCU For more information please refer to the H85 2238 Series Programming Manual and H85 2238 Series Hardware Manual 7 2 Overview This program is an infinite loop that sort elements based on NAME in the alphabetical order and AGE and ID in the numerial ascending order The tutorial is provided on the installation disk as the file 2238 c A compiled version of the tutorial is provided in Motorola S Record in the file 2238 mot 5 Renesas System Solutions Asia Pte Ltd 434 NE SAS 7 3 How the Tutorial Program Works The first part of the program includes a series of header files include machine h include string h define NAME short O define AGE short 1 define ID short 2 define LENGTH 8 struct namelist char name LENGTH short age long idcode struct namelist section1 Naoko 17 1234 Midori 22 8888 Rie 19 7777 Eri 20 9999 26 3333 EUM 00 int count void sort count 0 for sort section1 NAME count sort section1 AGE count sort section1 ID count Renesas System Solutions Asia Pte Ltd The remainder of the program defines the functions called from main void sort list key struct namelist list short key short i j k long m
62. est module that will inform user of its working condition through the LED indicator Moreover it has integrated a PinView module that allow user to have an instant graphical view of the microcomputer pins status The 2000 85 2238 emulator can be used as a standalone unit for software development and debugging It can also be connected to a target system via a user interface cable for troubleshooting user s hardware It is an indispensable tool that caters to the needs of an embedded designer Figure 1 1 CE2000 H8S 2238 Emulator Renesas System Solutions Asia Pte Ltd 434 NE ESAS 1 2 Package Contents The CE2000 H85 2238 emulator is supplied in a package containing the following components CE2000 PC Interface Cable USB CD HEW User Manual FAQ CE2000 H8S SERIES Emulator CE Standard User Cable LI User Cable Header Power Supply Figure 1 2 2000 85 2238 Emulator Package 1 21 Hardware Components The hardware components included in the package are listed below e 1x 2000 85 2238 emulator 1 interface cable USB cable 1x 300mm user interface cable to connect to target system Part No 8822E 080 171 30 AC e 1x 400mm KEL user interface cable to connect to target system Part No 8822E 080 171 40 AC e 2xKEL connector plugs for the target system Part No 8830 080 1705 e 1x 5V 2 6A power supply adaptor Ratings 110 240V 50 60Hz 1 2 2
63. he power supply will be switched to follow the target power supply 9 How about Mode Clock RES NMI amp STBY signals How does the emulator control these signals Generally the emulator will control all the above signals The only uncontrollable item will be the target power supply The emulator will follow the target supply once the cable is detected User has to set the above signals in the Configure Platform dialog User can set the Mode amp Clock signal to follow the target system or any options that is available in the selection The RES amp NMI pins are set to follow the target in default User can choose to mask these signals in the configure window STBY is masked in default 10 Why is STBY pin masked in default STBY pin will initialise some of the emulator registers Thus user is advised not to use the signal unless necessary 11 Why is C Level Stepping not possible If the disassembly window is opened the step in instruction will command a single step execution of the assembly code User has to close the disassembly windows This will inform the system to perform C Level stepping of the loaded C code 12 Why must the Programmable Function Generator PFG be programmed at power up What is the PFG used for The PFG is implemented using a RAM based FPGA Thus it must be programmed at power up The PFG is implemented for its flexibilities A single chip FPGA is used to implement the PFG which can be programmed to
64. igure 2 16 Figure 2 17 Figure 2 18 Figure 2 19 Figure 2 20 Figure 2 21 Figure 2 22 Figure 2 23 Figure 2 24 Figure 2 25 Figure 3 1 Figure 3 2 Figure 6 1 Figure 6 2 Figure 7 1 Figure 7 2 Figure 7 3 Figure 7 4 Figure 7 5 Figure 7 6 Figure 7 7 Figure 7 8 Figure 7 9 Figure 7 10 Figure 7 11 Figure 7 12 Figure 7 13 Figure 7 14 Figure 7 15 Figure 7 16 List of Figures is OOO TS PASE iaie I 2000 85 2238 Emulator Packaee 2 Basic Setup of CE2000 H6SS 2258 Emulator neni 9 Colin Tin k RENT u t 9 Installing HEW package with Tool chaln 10 Installing HEW Pure DeDbugeger 11 JO ING m 12 Jo i rl e am baute stu etu in uisi Mu rtu 12 DEICeUBS tae USB Driver 13 WI 2E BIETET 13 WI u uum EMT 14 Selected Driver File W 14 Compact Emulator USB Driver Installed 15 CE 16 CE OS and Logic Pro sani soos csconsasaeescnssacseasanntanccetaasiodeassmanscpbsmeseacut
65. in char name struct namelist worklist switch key case NAME for i 0 list i name 0 i name list i name for j 1 1 list j name 0 j if stremp list j name name lt 0 name list j name worklist 115 1 list i list k list k worklist break case AGE for i 0 list i age 0 i min list i age for j 1 1 list j age 0 j if list j age lt min min list j age worklist list i list i list k list k worklist case ID for i 0 list i idcode 0 i min list i idcode k i for j i 1 list j idcode 0 j if list j idcode lt min list j idcode worklist list i list i list k list k worklist break 48 Renesas System Solutions Asia Pte Ltd QE NE SAS 7 4 Running HEW Execute HEW from start up menu 29 High performance Embedded workshop 3 Help High performance Embedded Workshop 3 Read ahead Nero Manual Navigator enesas High performance Embedded Workshop Pure Debugger High performance Embedded Workshop 3 9 p Kits CE2000 Usi ocation C Program Files HEW 30 PUR Microsoft Visual Studio 6 0 2000 Read Figure 7 1 Execute HEW from Start Menu 7 4 1 Opening Tutorial workspace Open the Tutorial workspac
66. l execute multiple Step in as specified by the user 3 7 Break Functions Breaks are events used to interrupt the normal program execution when a specific condition is matched There are six types of break in CE2000 These break functions are classified into two classes mainly hardware Event and software PC break For Hardware Event break the preset break condition will cause the break event to occur after an instruction is executed For Software PC break the break condition causes the break event to occur before the break condition Table 3 1 Types of Breaks Encountered During Emulation Types of Break Description A break occurs when the CPU matches with a condition specified in the Breakpoint Setting dialog or when the pre fetch cycle of the CPU agrees with the specified states Event Break 1 Hardware Break A break occurs when the CPU matches with a condition specified in the Breakpoint Setting dialog or when the pre fetch cycle of the CPU agrees with the specified states PFG Break 2 Hardware Break A break occurs at the program address specified in Breakpoint Setting dialog The instruction at this address is replaced with a system instruction before the execution of code If a PC breakpoint is detected the emulation stops at the specified address before executing the subsequent instruction 4 Pressing the ESC Key of the host PC generates a break A reserved area break occurs when user code reads from o
67. load module by selecting Options gt Debug Settings to open Debug Settings dialog as below SessionCE2000 H85 2238 Em Target Dptions 2 Tutorial Target 2000 552259 Emulator Default Debug Format EIFAD wart E Download Modules File Add C Program Filesshew2l 000 H DODOO Remove Modify Figure 7 7 Debug Settings Dialog e Click Add button to specify the download module e Click Debug gt Download modules menu to download the specified module 7 6 2 Displaying the Program Listing HEW allows user to debug a program at C Source and Assembly level Choose Reset CPU from the Debug menu resetprg c file will be opened as below Renesas System Solutions Asia Pte Ltd fendit section ResetPRG 0 00000400 entryfvect 0 void PowerON REezset void u DDD4D06 set imazsk ccr l 0 00000408 IHITSCTi Remove the cc 0 INIT IOLIBi Remove the cc Ti E Figure 7 8 resetprg c file after RESET CPU 7 7 Using Breakpoints The simplest debugging aid is the program breakpoint it causes execution to stop when a particular point in the program is reached You can then examine the state of the MCU and memory at that point in the program 7 7 1 Setting a Program Count PC Breakpoint The program window provides a very simple way of setting a program breakpoint For example set
68. mulator user has to insert the USB cable and power up the emulator in order to link the emulator to the PC 2 7 1 LED indication Indication RUN LED Power Up Nil Self Test in Process X Self Test Fail Red Self Test Pass Ni Running User Program Green PC Detection X X Don t Care 18 Renesas System Solutions Asia Pte Ltd QE NE SAS 28 Activation of the Emulation System To activate the emulation system user has to Ensure that the CE2000 H85 2238 emulator is powered up i e check that the POWER LED is illuminated and the colour is RED Ensure that the USB cable is linked between the emulator and PC e Select the HEW start up menu 29 High performance Embedded Workshop 3 Help zJ High perFarmance Embedded workshop 3 Read Me atem Ea Manual Navigator m Renesas High performance Embedded Workshop Pure Debugger T High performance Embedded Workshop 3 7 Development Kits CE2000 5 cation C Program Files HEW30_CE_ Microsoft Visual Studio 6 0 MA CE2000 Read Me Figure 2 17 Execute HEW from Start Menu 2 8 1 Creating new workspace A new project workspace can be generated for device of H85 2238 Series by clicking menu File gt New workspace as figure below Proceed with other steps and chose the CPU Series 2000 and the device supported by HEW Pure Debugger for CE2000 H8S 2238 And select Target CE2000 H8S 2238 Emulator in dialog New Project Step 7
69. ndow lt 51 Edit Memory Mapping Dialog 52 Set nes Dial c 53 eem anter RBSET 54 Ds ho lt DOU E E 54 lilii TTE 55 Platform page of Status WIndow 55 Eventpoints D 56 Popup menus in Eventpoints Window nennen 56 OS Regio VO OS uuu Sau 57 Car TR O uuu m 57 Open Memory WINdOW 58 Renesas System Solutions Asia Pte Ltd Figure 7 17 Figure 7 18 Figure 7 19 Figure 7 20 Figure 7 21 Figure 7 22 Figure 7 23 Figure 7 24 Figure 7 25 Figure 7 26 Figure 7 27 Figure 7 28 Figure 7 29 Figure 7 30 Figure 7 31 Figure 7 32 M 58 Jl nl e 59 NAV AUT n T 59 AN diio 60 T 60 Displaying Individual Elements in an Array 61 SO jis s 61 wc 62 Prea OE Di i
70. ng e Click oon the CE Programmer exe to activate the programmer Renesas System Solutions Asia Pte Ltd Programmer Caution This Pragram ig used to upgrade the Hardware functionality of CE 2000 22239 Emulatar Ensure 2000 H85 72238 Emulator is properly restarted before continuing this upgrade Operating System C Program Files HE w TaalsHenesas D ebugCamp sPlatfarm E mutator Logic C Program Files HE w Taalz amp Henesas sD ebugLemp sFlatharm Emulatars Load Configuration File Version 1 10 Program Close Figure 2 12 CE Programmer Window e Click on the Program button The OS is programmed first and it takes approximately 25 seconds This is followed by the Logic which takes approximately 40 seconds Programmer Caution This Program ig used to upgrade the Hardware functionality of CE 2000 HBS 22239 Emulatar Ensure 2000 H85 2238 Emulator is properly restarted before continuing this upgrade Operating System C Program FilesSHEW4 T ools Aenesas D ebuglompPlathormsE mutator Logic C Program Files HE w Taalz amp Henesas sD ebugLemp sFlatfarm Emulatars Load Configuration File Block wntten Device programmed in 25 22 seconds Programming JTAG chain wath C Documents and Settings wasimi Deskop ProgrammerCe2238 1 proces vali take approsimately 40 seconds Device 1 Silicon ID is ALTERASS01 Device 2 Siicon ID ALTERA
71. ommand is instructed again Interrupt request is masked during single step 4 Control Input Signals RES NMI STBY The H85 input signals RES NMI and STBY are controlled by the emulator These signals can masked by the HEW In default the STBY signal is masked The RES signal is valid only when emulator enters run mode 4 6 Watch Dog Timer WDT The WDT operates during run mode emulation and does not operate when the emulator is in the break mode The timer is disabled at a break and enabled when emulation resumes 4 7 16 bit Timer Pulse Unit and 8 bit Timer The TPU and the 8 bit timer operate during the break mode as well as the user mode i e the timer pins are valid even when the user program has stopped The user can rewrite the timer registers with the window or Memory window 4 8 Serial Communications Interface SCI The serial communications interface signals are connected to the user system directly from the H85 MCU in the emulator Therefore the interface is valid both in the break and run mode For example when writing data to the TDR transmit data register in the I O or Memory Window after the serial communications interface output has been initialized data is output to the TXD line 4 9 Programmable Pulse Generator PPG The PPG operates during break and run modes 4 10 DMA Controller DMAC The DMAC operates during emulation execution and in the break mode When a transfer request occu
72. op HEW as pure debugger is also detailed in the context Section 1 Section 2 Section 3 Section 4 Section 5 Section 6 Section 7 Section 8 Introduction Gives an introduction to the system package and specification It also highlights the precautionary measures when using the emulator Installation Explains how to install and configure the PC in order to operate the emulator Emulation Functions Usage Note 1 Describes the various functions used in the 2000 85 2238 emulator 85 Function Support Usage Note 2 Covers the emulation of the peripherals and features for the 85 microcomputer in the CE2000 H85 2238 emulator Differences between the H85 Microcomputer and the Emulator Usage Note 3 Highlights the differences between the usage of the emulator and the actual MCU User System Interface Usage Note 4 Details information about the user interface circuitry and memory access timing Diagnostic Performs a self diagnostic test with the standalone emulator Trouble Shooting Advises on some basic fault locating methods and commonly made mistakes Renesas System Solutions Asia Pte Ltd 434 NE SAS Assumptions This manual assumes that the user has a working knowledge of High performance Embedded Workshop Compiler Assembler and Linker H85 Architecture e General Hardware Interface Circuitry e General Personal Computer Operation e MS Window programs Related Manuals H
73. ou have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics 434 NE S AS Microcomputer Development Environment System C D m lt CO 2 C 2003 10 Blank Page 24 NE SAS User s Manual Published by Renesas System Solutions Asia Pte Ltd Date October 3 4 2003 Version 2 0 Copyright C Renesas System Solutions Asia Pte Ltd rights reserved Trademarks a General All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organizations b Specific Microsoft MS and MS DOS are registered trademarks Windows and Windows NT are trademarks of Microsoft Corporation Pentium is a registered trademark of Intel Renesas System Solutions Asia Pte Ltd 434 NE SAS IMPORTANT INFORMATION READ this user s manual before using this emulator product KEEP the user s manual handy for future reference Do not attempt to use the product until you fully understand its mechanism ALExxxx amp CExxxx Emulator Throughout this document the term ALExxxx emulator amp CExxxx emulator shall be defined as the ALExxxx or CExxxx emulator user system interface cable interface bo
74. r writes to prohibited area of the MCU memory map PC Break 3 Software Break 5 Reserved Area Break Write Protect Break When ROM in the MCU is specified a write protect break occurs when attempting to write to the ROM area under development d Renesas System Solutions Asia Pte Ltd 434 NE SAS 3 7 1 Event Breakpoint For the CE2000 H85 2238 emulator two event breakpoints are supplied permanently The conditions to determine the breaks are Address e Access Read Write The break condition occurs in a AND condition If the factors defined are not fulfilled the particular break condition will be ignored Each factor can be masked or ignored Since the event breakpoint is still under development user can use the PFG Breakpoints instead 3 7 2 PFG Function PFG Breakpoint Two PFG breakpoints can be downloaded into the PFG The PFG Event Breaks have the following conditions Address e Data e Access Read Write 3 5 Run Time Measurement The run time counter is set to measure the instances when the user program is executed The resolution of the timer is 50ns There is no time limit for this counter The runtime can be observed in the Status window during the run mode 3 9 Function Trace There is no permanent trace provided However user can download the Trace Function into the PFG to keep track of the program The Trace provided is a 256 cycle trace The Trace function will
75. rdware device The wizard found a driver for the following device p USB Device Windows found a driver For this device To install the diver SS indewis found click c program files hew stealssrenesassdebugecamp platf arm emulatarscez238 sdrversveun2k sslu lt Back Figure 2 10 Selected Driver File Window e Click on Next to install the driver Renesas System Solutions Asia Pte Ltd Found New Hardware Wizard Completing the Found New Hardware Wizard gt Compact Emulator Usb Interface Windows has finished installing the software For this device To close this wizard click Finish Back Figure 2 11 Compact Emulator USB Driver Installed e Click on Finish to complete the installation 24 CE Programmer OS and Logic Upgrade During the installation of the HEW the installer checks the OS and Logic version of the emulator if it is connected If it is outdated the CE Programmer can be activated to upgrade the OS and Logic through the USB interface Ensure that the optional memory SODIMM is disconnected User can also activate the CE Programmer at any time to upgrade the system The CE Programmer is located in the CE Programmer sub directory of the directory where HEW is installed Step e If HEW is connected to emulator Exit HEW Restart the emulator with USB connection to PC This is to ensure that the emulator is in the correct state before the upgradi
76. rs the emulator carries out DMA transfer oe Renesas System Solutions Asia Pte Ltd 434 NE SAS 4 11 Data Transfer Controller DTC The DTC operates during emulation execution and in the break mode When a transfer request occurs the emulator carries out DTC transfer The DTC RAM data is not accessable during run mode i e no is possible for DIC RAM NOTE The DTC is connected to the area from adress H FF EBCO to H FF EFBF in the internal RAM through a 32 bit bus Therefore for transfer between the high order 16 bits of the DTC and the internal RAM trace information cannot be acquired and no break can be generated 4 12 Bus State Controller The 85 bus state controller has a programmable wait mode and a WAIT pin input mode The programmable wait mode is valid when the emulation memory or user target or external memory is accessed but input to the WAIT pin is only valid when the user memory is accessed Input to the user WAIT pin is always valid during refresh cycles 413 Ports The 85 I O ports can be used as peripheral module I O pins or as an address data bus depending the operation mode or internal register settings The I O port pins are valid during execution amp break state User can access or modify the I O port pins multiplexed with peripheral module I O pins with the I O and MEMORY window 4 14 A D Converter The analogue I O pins are connected to the user system directly from the 85
77. rt key 00000946 short 1 1 long min char truct namelizt worklist Figure 7 23 Step In The program is now stop at address H 83A and step into function void sort list key e Step Over F10 Set PC H 80C Execute Step Over 2 times B Renesas System Solutions Asia Pte Ltd void sorti maini j 00000800 0 0000080 count 0 0000008939 tor i H 0 00000810 sortisectionl 000000916 0 0000081 eort sectionl AGE 0 00000824 000 2 sortisectionl ID 000000932 count Figure 7 24 Step Over The program is now stop at address H 816 and step over function void sort list key 7 10 Using the PFG Breakpoint The PFG Breakpoint allows user to halt the program based on several conditions matching at the same time such as address data 7 10 1 Defining a PFG Breakpoint Now detine a PFG Breakpoint to monitor this part as follows Choose Eventpoints from the View menu to display the Eventpoints Window or click the Eventpoints Window button in the toolbar Click Add to define a new breakpoint The Breakpoint Setting dialog allows you to define the properties of individual breakpoint 55 Renesas System Solutions Asia Pte Ltd Breakpoint Setting Type PC Break Address C Range Break C Break Data Compare Compare d Mask 0000 Cancel Fig
78. s Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office equipment communi
79. search locations Floppy disk drives CD ROM drives Specify a location Microsoft Windows Update Back Cancel Figure 2 6 Locate Driver Files Click Next to specify the Driver location Renesas System Solutions Asia Pte Ltd Found New Hardware Wizard Locate Driver Files Where da want Windows to search for driver files Found New Hardware Wizard Insert the manufacturer s installation disk into the drive selected and then click Copy manufacturer s files fram Browse Figure 2 7 Selecting the USB Driver Location e Click on Browse and select either e C ProgramFiles hew Tools Renesas DebugComp Platform Emulator CE2238 Driver Win2K directory or Look in Cy winzk amp c File name slusbak I My Network P Files of type Setup Information inf Cancel Figure 2 8 Win2K Driver Location Renesas System Solutions Asia Pte Ltd 434 NE SAS C Program Files hew Tools V Renesas DebugComp Platform Emulator CE2238 Driver Win9x Locate File 2 gt Look in wins T SEES S Computer gm a File name Usbce int Mehwork P WE Files of type Setup Information inf j Cancel Figure 2 9 Win 9x Driver Location Found New Hardware Wizard Driver Files Search Results The wizard has finished searching driver files for your ha
80. sed on the HEW commands such as memory edit or refresh If several memory windows are opened HEW will read back all the windows content Thus user is advised to open the memory window at minimal size in order to avoid unnecessary intrusion 6 How much current will the emulator draw from the target system The emulator will not consume the target system supply It will generate an user VCC for internal usage which has an identical level as the target system power supply 7 Why is the program halted at an address that is not specified in the preset combination breakpoint The emulator will break out of the user code execution once it has detected the preset condition However the emulator will not stop execution immediately as it has to complete its current tasks thus the code will not break at its preset address Another point to note is the prefetch condition if the preset condition matches the prefetch instruction the emulator will also enter the break mode The worst case scenario is if a break condition is set at the beginning of subroutine B which codes are stacking behind subroutine A A break condition will happen when subroutine A is called This is due to the prefetching of subroutine B code when subroutine A is returning to the main routine 8 What is the CABLE IN N signal used for This signal is used by the emulator to identify target connection When CABLE is lo the emulator will know that target is connected and t
81. ser has to e Clickon the Add button in the Memory Mapping dialog Key in the desired address at From and To e Select the attribute Edit Memory Mapping Memory Mapping From 0000 Setting Emulator Read write Y Cancel Help Figure 2 21 Editing the Memory Mapping For the details of the memory mapping please refer to section 3 2 11 Connection to Target System 2 11 1 Target Power Supply The CE2000 H85 2238 emulator has an automatic voltage follower Once target is connected target connector s signal CABLE Lo refer to the Appendix A the CE2000 H85 2238 emulator will operate at the user supply 2 5 5 Otherwise it will operate at 5V When target is connected HEW will indicate User Cable connected in the status platform window NOTE e Do not connect the user system interface cable to the emulator without user system connection i e without target user supply e Turnon the user system before powering up the emulator 2 11 2 Types of User Interface Cable There are two ways to connect the target system to the CE2000 i e e viaan actual footprint user cable purchase separately or direct connection using the KEL connectors supplied in the package For the actual footprint user cable user is advised to refer to the Microcomputer Hardware Manual for the footprint information For the direct connection method the connector information such as pin definitions layout
82. stall the USB drivers are as follows Select the Add Remove Hardware in the Control Panel e Another method is to link the emulator to the PC through the USB cable This will activate Windows auto detect feature Found New Hardware Wizard x Install Hardware Device Drivers device driver i software program that enables a hardware device to work with Sy an operating system This wizard wall complete the installation Far this device USB Device device driver is a software program that makes a hardware device work Windows needs driver files for your new device Ta locate driver files and complete the installation click Nest What da you want the wizard do Search a suitable driver for my device recommended Display a list of the known drivers for this device so that can choose a specific driver lt Back Cancel Figure 2 5 Found New Device e Click Next to search for a suitable USB driver Found New Hardware Wizard _ Locate Driver Files Where do you want Windows to search Far driver files Search for driver files Far the following hardware device USB Device The wizard searches for suitable drivers in its driver database on your computer and in any of the following optional search locations that specify To start the search click IF vau are searching on floppy disk or CO AOM drive insert the disk or CD before clicking Hest Optional
83. tor Power on reset vector value Power on reset vector value PC ERO to ER6 Undefined Undefined ER7 SP Undefined Undefined The I mask is set to 1 and the The I mask is set to 1 and the CCR other bits are undefined other bits are undefined command Trace bit is set to 0 and the Trace bit is set to 0 and the EXR interrupt bits are set to 1 interrupt bits are set to 1 B 0 111 B 0 111 Renesas System Solutions Asia Pte Ltd 434 NE SAS 5 2 User Interface User may have to adjust the target system as follows e The emulator s user system interface is provided with pull up resistors and or a buffer causing the signals to be delayed slightly e The pull up resistors will change high impedance signals to high level signals e The Analog to Digital conversion s resolution will have a slight degradation Load capacitance of the emulator as compared to the actual chip will be larger Crystal oscillator can only used if the actual footprint user cable is used there is an oscillating circuitry built on board If user uses the direct method of connecting to the target system the actual clock signal has to be connected to the EXTAL pin NOTE there is no XTAL pin f user uses the direct connection method the signal CABLE has to be connected to ground Please refer to section 6 for the details of user interface circuitry Renesas System Solutions Asia Pte Ltd 434 NE SA
84. tor has a built in test modes Standalone Test in which all the internal functions and pins are tested thoroughly 6 1 Standalone Self Test The test is implemented to allow user to have a quick check of the hardware before linking it to the PC This will help user to isolate the cause of the PC communication problem The testing steps are Power on the CE2000 H85 2238 emulator the POWER LED lights up in RED Ensure the USB cable is not connected between the PC and 2000 85 2238 emulator Wait for 10 seconds The emulator will enter Self Test mode POWER LED changes from RED to ORANGE colour After the tests are completed about 2 minutes the POWER LED will start to blink whereas the adjacent RUN LED will light up in RED if the self test fails However if the self test passes the RUN LED will not light up NOTE During the self test the RUN LED will be turned on to GREEN occassionally This merely indicates that the emulator is in RUN mode 68 Renesas System Solutions Asia Pte Ltd 434 NE SAS Section 9 Trouble Shooting The following are a few suggestions on how to perform a basic troubleshooting if the emulator does not respond to the user s commands Symptoms Checks Expected Observation amp Action Cannot link to Power Supply POWER LED lights up in Red PC PC Bios setup USB must be enabled Window Device USB do not have any contention Compact Emulator Manager must be detected instead of a USB device
85. upply for emulator the smoothed main clock signal 16 Why is the selection of target clock not available in the system setup window HEW will disallow the target selection if the target is not available The Signal CABLE IN N is Hi is Renesas System Solutions Asia Pte Ltd 24 NE SAS Renesas Technology Asia Sales Offices URL http www renesas com Renesas System Solutions Asia Pte Ltd CE2000 434 NE SAS Renesas System Solutions Asia Pte Ltd
86. ure 7 25 Breakpoint Setting Dialog e Select radio button Break e A message box will be displayed to allow user to program this function before it can be used as shown in Figure 7 26 Click Yes button Start Programming PF Else it would not be possible to activate PFS Feature Buk currently PRG is programmed For Trace This will de activate PFG Trace Mo Figure 7 26 Programming e Enter H 82A in the Address Lo edit box Click OK button The Eventpoints window shows the new Breakpoint you have defined eS Renesas System Solutions Asia Pte Ltd 2 State Condition Action BP Enable PC H n0 008n0Cc zZ238 c 67 Stop by PC Break Enable Address H n n sz A Stop by FFG Break Channel l Figure 7 27 Eventpoints Window e Run the program from the current position by choosing Go from the Debug menu or click the Go button in the toolbar Execution will stop as below 0 00000900 0 0000080 count 0 0 00000938 tor i J4 0 00000810 sortisectionl 0 00000916 count t 0 0000081 eort sectionl AGE 0 00000824 00 2 sortisectionl 0 00000832 0 0000083 void sortilist key struct namelizt liszt short key Figure 7 28 Break e The system status window will display Last Break Cause PFG Break to indicate the type of break that has occurred os Renesas System Solutions
87. wer Supply Environmental Field Upgrade Software selection of 2 types of clocks User system clock via user cable Emulator internal clock 2 16 MHz at 100KHz resolution Measure the start run till end break of an execution Resolution 50ns No upper limit Two fine pitch user cable assemblies KEL 8822E 080 171 040 AC are used to interface to two 1 27mm pitch plug KEL 8830E 080 170S on both sides of the emulator and user target Provided in package Selected actual footprint user cables for each microcomputer series are also available Not in package Automatic tracking of the target system supply voltage to ensure that the emulator draws no power Power Adaptor Input 100 240 Vac 50 60 Hz Emulator Voltage 5V Regulated Current consumption 2 6A max Operating Temperature 10 to 35 Humidity 30 to 85 RH No condensation corrosive gas Re programming of emulator logic and flash OS via USB interface Renesas System Solutions Asia Pte Ltd 434 NE SAS 1 6 Precautionary Measures The emulator must be handled with care Otherwise it may not work as intended Before Power On Check all components by referring to the packing list Never place heavy objects on the casing Observe the following conditions in which the emulator is to be used Keep out of direct sunlight or heat Use in an enviroment with constant room temperature and humidity Protect the emulator from dust Avoi

Download Pdf Manuals

image

Related Search

Related Contents

Scarica documento (PDF  Logitech Harmony 700  PRESS GRILL  Russell Hobbs Platinum Collection  Molecular Dynamics Simulation Program MARBLE User`s Manual  Mode d`emploi : Cartélie. - Ministère du Développement durable  User's Guide Pinless Moisture/Humidity Meter + IR Model MO290  iogear Mini DisplayPort - VGA  Whelen Install Manual  

Copyright © All rights reserved.
Failed to retrieve file