Home

Win68 - ICE Technology

image

Contents

1. Figure 2 2 EMUL68 PC Title Bar Setting The Paths The next item in the Config menu is Paths which opens the dialog box shown in Figure 2 3 Paths Dialog Box The emulator uses the paths identified in this box to find the files it needs Each of these fields can hold up to 1024 characters and contain multiple specific paths that will be searched in the order they appear Multiple paths in one field must be separated by a semi colon similar to the MS DOS PATH environment variable Copyright O 1997 ICE Technology 2 3 EMUL68 PC Chapter 2 Software User Interface Default paths and filename extentions Lx Load path quu C WIN68 EXAMPLES AO Source paths c WIN68 v Also search Load path for source files default ext le Path to internal emulator files c WIN68 str_sym Figure 2 3 Paths Dialog Box Object Files The Load path will be searched for Motorola S record files and binary object files to be loaded into the emulator The field labeled ext specifies the default file extension for the files that will be listed in the Load code dialog box Each time a file is loaded this field is changed to the extension of the file that was last loaded Source Files With many compilers the full path name of each source file is contained within the binary output file produced by the linker If path names appear for source files in the binary object file that EMUL68 PC Windows i
2. PC Chapter 4 Trace Board Trace Speed Bar Stopped Trace Setup OM trig ud EE Figure 4 15 Trace Speed Bar for rapid access to trace setup and display The Trace Speed Bar allows quick access to the most common trace functions This bar is enabled by using the local menu item Toggle trace speed bar from the Trace Buffer window s local menu At the far left of the bar the current trace status is shown in the example shown tracing is Stopped This indicates the status of the trace board i e tracing stopped and not the emulator With tracing started you must also Run the emulator to collect information In the rightmost box is shown the frames counter this is the number of frames collected that meet the trace filter conditions Next to this are the current values for setup parameters trig delay and loop count The Trace button starts and stops the trace feature Tracing may be started and stopped without breaking emulation The Setup button brings up the Trace Setup dialog box which is covered in detail earlier in this chapter Program Performance Analyzer PPA What part of your application uses most of the CPU cycles Where should you concentrate optimization efforts These are the type of questions that Performance Analysis is designed to answer by showing you where your program spends it s time You set up bins which describe address ranges run your program and then watch the results to see how much relative time
3. 2 16 User Defined Bins Adding 4 24 V View Assembly code 2 25 Source window 2 24 View edit bits 2 27 View Edit Menu 2 16 Menu 2 13 View Edit Inspect 2 41 W Watch Window 2 41 Watch local menu 2 41 Window Call Stack 2 42 Colors 2 14 Copyright 1997 ICE Technology Index Data 2 36 Inspect 2 40 List Open 2 33 Menu 2 32 Next 2 32 PPA 2 44 Program 2 38 Registers 2 35 Source 2 39 SpecialRegs 2 35 Trace 2 44 Types 2 34 Watch 2 41 Window Open a new window 2 34 Window Open a new window watch points 2 41 Window Toggle help line 2 46 Windows Cascade 2 32 Tile 2 32 Windows 95 2 1 Write 2 43 Write Protection 2 6 Write without readback 2 13 2 16 Z Zoom 2 32 eIndex 6
4. Enable Val E a ES Connect Reset To Target INIT2 Override COP Kicking Enabled Enable fof Value v Cycle Stretching Disable Figure 2 6 Hardware Configuration Dialog Box The Emulator port field contains the hexadecimal address of the emulator in the PC s I O space The value entered in the Emulator Port field must agree with the jumper settings for I O port address on the emulator board If they do not agree the Win68 software will not be able to communicate with the emulator board and a warning will automatically be displayed as a reminder that communication has failed and some change is needed Please refer to Section 2 of the EMUL68 PC User s Manual for a detailed description of how to set the I O port address jumpers Note There are several other reasons why the PC may not be able to communicate with the emulator Check that the cards cable and POD are all connected correctly and securely If you check these and the jumpers on the emulator board and they are consistent with the Emulator Port field on the Hardware Configuration dialog box and you still get error or warning messages please contact technical support for assistance support icetech com The Crystal Freq field specifies the frequency in Megahertz of the crystal being used It must correspond to the crystal frequency you are using This field does not refer to the ECLK frequency which is the crystal frequency divided by 4 If you change the pod s crystal select
5. Game Adapter Expansion Unit Sound Blaster common Bus mouse alternate bus mouse Parallel Printer Port 2 EGA GPIB adapter AT Asynchronous Adapter COM4 Async Adapter COM2 Prototype Card many Network cards use 300 308 Hard Disk Controller XT some sound cards use this in addition to 220 IBM Reserved Parallel printer adapter SDLC or BiSync 2 Adapter some sound cards Binary Synchronous Communications Adapter 1 Monochrome Display Parallel printer port on monochrome adapter Reserved EGA Color Graphics Adapter Async Adapter COM3 Floppy Disk Controller Async Adapter COM1 Copyright 1997 ICE Technology 4 3 EMUL68 PC Card Installation Chapter 4 Trace Board With the address jumpers in place and after you have inspected the boards for any damage it is time to install the trace board into your PC Perform the following steps in the order shown 1 Turn power off 2 Insert the trace board into an 8 bit slot near the emulator card with the short ribbon cable connected on to it Be sure the edge fingers are securely inserted in the PC motherboard connector 3 Connect the ribbon cable to the emulator board Use care not to skew the connector or bend any pins 4 Attach the bracket to the PC frame with a screw Other Miscellaneous Jumpers There is one additional jumper on the trace board located in the upper left corner of the card It corresponds to the cards frame size 4K
6. Inspect window sees nennen nennen remm enne tenerte trennen trennen 2 28 Local Menu Trace Window oer NS 2 29 Localimenus Call Stacks a terrre enr PER eret ERE E E REPE ket E Ei RS 2 31 jUnnn 2 32 Help Men aieo EE 2 34 Child Window Types The Details eee eerie eene seen eene ee einen sinn tn aestu seta suse ta sensn sesso sees toss ta snue 2 34 Registers WINdOW ARRAS 2 35 SpecialRegs WindOW nto ten ete e 2 35 Data Windows 1 e eet eiie REC ERU be ee eere ER e e eer No da 2 36 Editing Memory with a Data Window sse nennen trennen neon neon rennen enne 2 36 Program Windows hoe eben ite e Dr te eret toten edere 2 37 Soiree WIndOWS eee cites ote ien edet deed ede ende ede etie deor cedet du dede 2 39 High Level Language Debugging Windows sess nennen trennen 2 40 Inspect WindOW 5 5 Ren Ue noe NEQUE RU n RU 2 40 Watch Window se terr EET ERN EE ERR e PUERO REEF S rire rr M ken Ee eee RES 2 41 Call Stack WandOW iie Biete rtt to ii 2 42 Other Dialog Boxes and Windows 4 eee eee e eese eee ee seen ette sete setas a toss eo seta setas e ease ease ease ta seta stessa 2 42 Evaluate dialog box screen dd eet eue i oed 2 42 Special Conditions Class 2 breakpoints dialog box seen 2 43 Trace WII Mii 2 44 PPACWIDdOW cit reir RU Rr e PER DOO o n OP RE ED ene as 2 44 Debug
7. Window Config Registers Project name Paths Memory map Banking Setup Convert cycles to time Emulator Hardware Miscellaneous Color Trace PPA Figure 2 12 Configuration Menu Menu Commands HotKey Project name Paths Memory map Banking setup Convert cycles to time Emulator hardware Miscellaneous Color Trace Copyright 1997 ICE Technology Chapter 2 Software User Interface The Config menu is used to tailor the emulator to your specific hardware setup and project preferences The Project name and Paths selections are used to tell the emulator software what files you are using and where to find them The Memory map Banking Setup and Emulator Hardware selections are used to configure the emulator hardware to match your environment The trace and PPA Program Performance Analyzer selections are discussed in detail in Chapter 4 Trace Board The Config menu is discussed in detail at the beginning of this chapter Description Creates a new project or select from a list of existing projects Projects store software configuration settings and definitions The last project opened is reopened by default when WIN68 is started Sets default paths for finding object source and emulator files Opens a dialog box for assigning memory space in blocks to either emulation RAM or the target Applicable to bankswitching emulators only Configures the emul
8. eere e eee esee eite eese eene enatis tn anat ts tatus enata SEKON TN sensn sn rak 2 10 Additional Options s ei ESSE dit 2 11 Copyright 1997 ICE Technology eiv Miscellaneous Configuration 4 eese esee eese esee esee ee enses etna ta seta seta seta attese te sete sss so se eo setas etas etas e easet 2 12 jnnnn 2 14 MENUS 2 14 Bile MGI p NO 2 15 UU 2 16 Run Un 2 17 Breakpoints VEU voesociovanonicsnni ncona cnn ccocc ne S 2 19 Class T Break points cirio ir OU e EE 2 19 Class2 Breakpoints 4 eee A Aid 2 19 Confis Men eee ECC EE EE 2 22 U 2 23 Local Menu Program Window s 2 eere itte rrr eene re Tti ree PER ERE PEDE E 2 24 Local Ment Source windo Winnie 2 24 Local Menu Data WIndOoW iiec Ie ie ete rie e te eere ie eee eee Eze dle 2 25 Local Menu Registers window essent tenete entren tren nein neon nena rennen enne 2 26 Local Menu Special Registers window ooocococcconccononononnncononannnnnonnncnnoconoco rene en eene ener nenne 2 21 Local Menu Watch window sierra tte eee dee i eet e eee di eagle ti eee ode 2 28 Local Menu
9. 1 61A1 R 1 1 1111 1111 1000 0111 D3 is O 61D3 R 1 1 1111 1111 1000 0111 17 1 21E7 W 1 1 1111 1111 1000 0111 A2 2 21E6 uU 1 1 1111 1111 1000 0111 61 3 61D3 F 1 1 1111 1111 1000 0111 17 TBA 4 61D4 R 1 1 1111 1111 1000 0111 39 5 61D4 F 1 1 1111 1111 1000 0111 39 RTS 6 61D5 R 1 1 1111 1111 1000 0111 37 T 21E5 R 1 1 1111 1111 1000 0111 BA 8 21E6 R 1 1 1111 1111 1000 0111 61 9 21E7 R 1 1 1111 1111 1000 0111 A2 F 1 1 1111 1111 1000 0111 31 INS R 1 1 1111 1111 1000 R 1 1 1111 1111 1000 Chapter 4 Trace Board Probe data from external hardware inputs on pod displayed in binary format Figure 4 13 Trace buffer Show all frames and Show probes options selected Trace Local Menu Y Toggle trace speed bar Go to Begining of Trace buffer Go to End of Trace buffer Go to Frame number Search Search Next Search Previous Find Trig point Ctrl B Ctrl E Ctrl F Ctrl A CTRL X CTRL P Ctrl O v Show misc data Y Show probes v Show all frames Show time stamps Absolute cycle Save trace as text Synchronize source Animating Relative cycle Absolute time v Relative time Trace Setup Figure 4 14 Trace buffer local menu Copyright 1997 ICE Technology This pop up local menu opens in response to a right mouse click in the trace buffer window or from the main menu Trace when the trace buffer window is selected It is used to navigate and control the trace buf
10. Copyright 1997 ICE Technology 4 22 EMUL68 PC Stop Reset Delete Save o 3 Ia 3 9 i S 7 Chapter 4 Trace Board This button stops the PPA from collecting bus cycle information The next time the analyzer Run button is clicked the Time Elapsed counter will be reset to zero You must stop the PPA to modify the user defined bins Other than stopping updates this button does not affect any fields and has no effect on emulation This button resets the PPA logic and zeros the bin counts bin percentages Time Elapsed and Total counters The PPA status will change to Just Reset This button has no effect on emulation the microcontroller or your program You should generally use this button after you modify add delete change addresses change active status the bin parameters so that the statistics reflect the current settings Opens the Address Range dialong box shown in Figure 4 17 You may also open this dialog box by double clicking in the PPA window on the next available blank line This dialog box is used to define the address ranges used for bins and place them in the PPA window The PPA must be stopped to Add bins You may also change a bin from active to inactive using this dialog box Deletes the bin highlighted in the PPA window from the window To restore the bin address range to the window use the Add button To remove a bin from the current statistics without deleting it change it s
11. Copyright 1997 ICE Technology e 2 20 EMUL68 PC 4 func1 len foo 5 amp foo Chapter 2 Software User Interface a range of addresses from the first address of func1 to the address defined by func1 the value of foo 1 a single address the address of variable foo 6 func1 to func2 1 a range of addresses from the first address of Menu Commands HotKey Toggle F2 At Alt F2 Setup Disable all Delete all Special Conditions Break now lt Ctrl gt C Copyright 1997 ICE Technology func1 to the address one before func2 Assuming that func1 and func2 were adjacent in memory compiler dependent see your map file this would evaluate to contain all of the addresses of func1 Description Enable or disable a Class 1 breakpoint at the cursor Set a Class 1 breakpoint at an address You are prompted for the address Opens a dialog box that allows set reset or deletion of Class 1 breakpoints Disables all Class 1 breakpoints Deletes clears all existing Class 1 breakpoints Manipulates Class 2 breaks only Allows specification of the address range bus cycle type and external EO signal as part of the break condition Note that breakpoints set in this dialog box do not show up in other dialog boxes and are not highlighted in Program or Source windows Stops execution immediately Also available as a button on the tool bar 2 21 EMUL68 PC Config Menu
12. Time stamps 2 30 4 18 Soft reset get vector 2 18 Software 2 34 Configuration Initial 1 4 Configuring 2 1 Installation Instructions Detailed 2 1 User Interface 2 1 Source Files 2 4 Windows 2 39 Special Conditions 2 21 Special Conditions Class 2 breakpoints Dialog box 2 43 SpecialRegs Window 2 35 Speed Buttons 2 7 Step 2 45 Into 2 17 Over 2 45 Over 2 17 STR version 2 44 Symbols In address expressions use of 2 20 4 13 Copyright 1997 ICE Technology Index Synchronize Source 4 18 Synchronize source 2 30 System Requirements 1 2 T Tab size 2 13 Test Mode After Reset 2 11 the Breakpoint Special Conditions 2 19 Tile Windows 2 32 Time Elapsed 4 21 Time Stamp 4 5 4 7 Time stamp Prescaler 4 18 Timestamping Sub menu 4 18 Toggle 1 5 2 21 Breakpoint 2 24 2 25 Help line 2 32 Trace speed bar 4 19 Trace speed bar 2 30 4 17 Total 4 21 Trace Board 2 34 Board Installation Requirements 4 1 Board Introduction 4 1 Buffer 4 5 Buffer Display 4 15 Local Menu 4 16 Setup 4 6 Setup 4 18 Setup Buttons Other 4 11 Setup 2 31 Speed Bar 4 19 Speed Bar 2 46 Terms 4 4 Window 2 44 Trace Qualifier Adding 4 12 Trace 2 22 Trigger 4 5 4 9 Logic 4 9 Triggering and Filtering Conditions 4 11 eIndex 5 EMUL68 PC U User Defined symbols
13. as described below Opens a dialog box for saving the contents of the trace buffer to an ASCII text file The user can choose a file name and starting and ending frame numbers The information is saved in the same format as the current trace buffer display Clicking this positions the Source and Program windows cursors to the highlighted frame in the trace buffer window Scrolls the trace buffer highlighting one line at a time for review The Program window cursor is updated to synchronize with the trace display Opens the Trace setup dialog box The dialog box can also be opened from the Trace speed bar or the main menu by clicking on Config Trace This sub menu available within the trace local menu by selecting Show Time stamps controls how time stamps are displayed in the trace buffer window There are four choices the current selection is indicated by a check mark Note that the values in the display are affected by the Time stamp Prescaler value see page 4 7 both cycles and time are divided by the programmed value before being recorded in the trace buffer and displayed Menu Commands HotKey Absolute cycle Relative cycle Absolute time Relative time Copyright 1997 ICE Technology Description Shows the number of bus cycles from the start of tracing Shows the bus cycles between each displayed frame Shows the time from the start of tracing Shows the elapsed time between frames 4 18 EMUL68
14. assignment statement i e var 0x33 then each time the emulator stops the expression will be evaluated and the variable will be updated var will be set to 0x33 Even if your application modifies the value when running the variable will appear as though your application is not changing it There are three methods available to open an Inspect window 1 Double click on the name of the variable in the Source window 2 Press lt Ctrl gt l 3 Use the View Edit Inspect menu selection In the latter two cases if the cursor in the Source window is at a variable name an Inspect window will open with the variable at the cursor highlighted press Enter to display it If the cursor is not at a legitimate symbol name the Inspect window will open and wait for you to type in the name of the desired variable followed by Enter Note that symbol names are case sensitive If a symbol cannot be found try the same name with a different case Also note that some assemblers shift all symbols to uppercase so you may need to enter the variable name in all uppercase letters even though it appears in the source window in lower or mixed case Hint To inspect an entire structure use the struct name without the or gt operators i e time To inspect a single structure member use the struct and member names i e time minutes Likewise with an array you may inspect a single element or the entire array by using the array name with or witho
15. from the cursor backwards Run Menu Breakpoints Config Register The Run menu is the control center for Step into F the emulator It provides several different Sispuver F8 ways to reset the emulator the microcontroller being emulated or both It Mask interrupts on step also controls starting and stopping of Animate Ctr F emulation as well as single stepping Go F9 through your code Many of the important Go to cursor F4 features of this menu are available n l Cato Chi F9 through hot keys offering speedier l Gotoretumaddress ALT F9 access to these functions which you will use often Go FOREVER Break Emulation F9 Execution is always at full speed with the exception of the Animate selection which Reset Emulator runs the user application program at Reset and Go Ctrl G reduced speed to make program flow Soft reset get vector Reset Chip more visible Figure 2 10 Run menu Menu Commands Step into Step over HotKey F7 F8 Copyright 1997 ICE Technology Description Single step including calls and jumps In a Program window this executes one instruction If a Source window is selected this executes all of the instructions for one source line of C Similar to Step into above but executes functions at full speed and breaks at the next instruction or source line following the call When stepping over at the assembly language instruction level it is i
16. or Click twice on the desired instruction in any Program window or Click once on the address in any Program window or Highlight click once on the desired instruction and select Toggle from the Breakpoints menu shortcut lt F2 gt or 5 Select At from the Breakpoints shortcut lt Alt gt lt F2 gt menu then enter an address in the dialog box Copyright 1997 ICE Technology 1 5 EMUL68 PC Introducing EMUL68 PC Windows To make a breakpoint inactive 1 Click once on the line number in the Source window or an address in the Program window or 2 Click on the desired breakpoint in any Program or Source window then press F2 or 3 Select Setup from the Breakpoints menu click on the breakpoint click on the Toggle button or 4 Highlight click once on the breakpoint and select Toggle Breakpoint from the Program or Breakpoints menus To delete a breakpoint 1 From the Breakpoints menu Select Setup click on the breakpoint click on the Delete button or 2 Select Delete All from the Breakpoints menu To use the in line assembler to add program statements 1 Scroll a Program window until it shows the address to be changed or press lt Ctrl gt A and type in the desired address Highlight the instruction to be changed with the cursor or arrow keys 3 Type the desired mnemonic and operands this will open an Enter new instruction dialog box and press lt Enter gt To change a RAM value 1
17. with updated values after a value in that window has been changed by the user effectively verifying writes To change a value in a memory dump window select the value to change using the mouse or arrow keys type a new value and press lt Enter gt Disabling this feature can be useful to prevent reading a location where reading causes an undesirable side effect The Write without readback item in the View Edit menu performs the same operation Tab size specifies the number of spaces that a tab character expands to when displaying source code in the source window The default is 8 spaces Enable Code Space Limits when checked will not allow breakpoints to be declared outside of the defined address range Enter the high and low addresses in hexadecimal Copyright 1997 ICE Technology 2 13 EMUL68 PC Chapter 2 Software User Interface Override at Reset Program Counter when checked will load the specified address into the processors Program Counter when the emulator resets the device If you have patched your startup code or if you want to only test a certain subroutine the ability to reset the chip and start at an arbitrary address can be quite helpful Override at Reset Stack Pointer accomplishes the same function for the stack pointer Be certain to enter a valid RAM address for the stack if this feature is enabled Window Colors The Config Colors dialog box allows you to customize the appearance of EMUL68
18. 1 5 41 61E3 F 1 1 ECOB LDD 0B X 1 5 46 61E5 F 1 1 C30001 ADDD 0001 2 5 50 61E8 F 1 1 EDOB STD 0B X 2 0 y Figure 4 12 Trace display window This view shows the trace buffer after capturing the desired information Note that frame numbers do not appear contiguous this is because the Show all frames option available by right clicking in the Trace buffer window is off All bus cycles were captured but using this view reduces the clutter and allows focusing on instructions For more detailed timing and bus activity turn Show all frames on as shown below This is a portion of the same data as shown above in Figure 4 12 but broken down cycle by cycle In this view each bus cycle is shown on a separate line Note that the instruction frames shown above as cycle type F opfetch actually consist of a Fetch often followed by Read or Write cycles Also note the RTS instruction the first 2 frames are internal 68HC11 cycles during which the data bus is ignored this is followed by popping the return address 61A2 from the stack into the PC Also shown in this view is the PROBEO 1 data from the hardware inputs available on many pods Copyright 1997 ICE Technology 4 15 Trigger frame EMUL68 PC E trace buffer 2888 8192 frame address CYC EO El PROBEO PROBE1 data instruction 4 619F R 1 1 1111 1111 1000 0111 BD 3 619F F 1 1 1111 1111 1000 0111 BD61D3 JSR putchar 2 61A0 R 1 1 1111 1111 1000 0111 61
19. 16K and is preset at the factory to the correct position The user should not modify the position of this jumper Trace terms Address Cycle Data Filter Frames Probe 0 The microcontroller s 16 bit address bus The type of bus cycle Opcode Fetch Read Write Don t care Opcode Fetch OpFetch is defined as the first cycle of an instruction fetch while the LIR signal is active low The microcontroller s 8 bit data bus The A or B condition may be set to filter out unwanted frames based on the address data probe value or cycle type Frames hold the captured information and are 64 bits wide The trace card records 4K model TR4 or 16K TR16 frames 16 address bits 8 data bits 4 Miscellaneous bits cycle type 8 Probe 0 bits 8 Probe 1 bits 16 time stamp bits 4 internal use bits not user accessible 8 hardware bits available on the pod for connecting logic signals By default these are connected to Port D on most pods with removable jumpers The user may remove these jumpers and connect suitable logic level signals here for monitoring in the trace buffer display Copyright 1997 ICE Technology 4 4 EMUL68 PC Chapter 4 Trace Board Probe 1 8 additional hardware bits available on the pod for connecting logic signals By default these are connected to Port A or Port E on most pods with removable jumpers Trace Buffer The memory that holds the captured frames The memory is configured
20. Bargraph Delete Done Save Figure 4 16 Program Performance Analysis window When you select Config PPA you will see a window similar to that shown above which is displaying results captured from the demo example included with Win68 This window is used to both set up and display the results of the Program Performance Analyzer The application and the data collection will automatically be started every time you open the PPA window The six buttons at the top of the window control the running of the program and the statistics collection process separately Each bin is really a user defined address range If the address range corresponds exactly to the address range of a function that function name will be displayed next to the address A bus cycle from an address that doesn t fall within any user defined address range will be counted in the Miss bin A cycle within an existing but inactive address range bin will not be counted at all that is it will not count in the inactive range and it also will not be counted within the Miss bin Statistics will not be kept for that inactive bin at all PPA Fields Bins This is the assigned bin number A bin is a defined address range You may define bins using the Add button the number of bins is limited by your available memory If you define more bins than can be displayed at one time a scroll bar will appear for navigation of the list There is also a default Miss
21. Computer facility select the floppy drive containing the installation diskette and double click on the Setup icon After SETUP EXE is started a dialog box will ask for a directory for the EMUL68 PC software Either accept the suggested directory or enter a different one SETUP will create the directories as needed decompress and copy the files from the installation floppy to the hard disk and change the paths in the emul1 1 ini file When installed there will be a NOHAU program group containing the EMUL68 icon Double clicking on this icon will start the EMUL68 PC Windows application A readme txt text file and possibly others is also copied to the specified installation directory These files contain important information about the latest revisions of the software and known errata Please take the time to read these files Initial Software Configuration Hint We recommend that prior to connecting to your target for the first time that you setup and operate the emulator using the included demo programs to verify correct emulator operation This requires that you install the emulator boards and optional trace board if you have one connect the pod and possibly configure the pod The pod should be configured for internal operation by insuring that the crystal and power jumpers or switches are set to internal It may be necessary to further configure some pods please see Chapter5 POD Boards for specific pod information Using
22. Information eH 2 44 Button Bar scccsssssssssssersessssessessssessessssessessssessssssessessssessessssessessssessessssessessssessesessessassssessesessessessesesees 2 44 CASA AA 2 46 Copyright O 1997 ICE Technology ev Trace Speed NIC 2 46 CHAPTER 3 EMULATOR BOARD rene c euenire rana canus serai v canas sacos 3 1 CHAPTER 4 TRACE BOARD cua 4 1 Trace Board Blut 4 1 Detailed Installation Instructions e eerie eret esee eene seen tenentis tassa stes tn seta sse ta sonata sees ense ta sonata an 4 1 Installation Requireients nenien eren E rtr inerte e E E epe D eei 4 1 MOLA TES Sie tini a rr UR ER NOE EO PEERS A RH I Ree 4 2 Common PC I O address usage ied du ee ean tit 4 3 Cardinal ti ae etu vti uS 4 4 Other Miscellaneous Jumpers 0 0 eee eee eecesecesecesecssecssecaeecseseseseaeeeeeeeeeeeesseceecsaecaecsaecsaecseeeaeseaeseeeees 4 4 A NN 4 4 PACE SOUP ON ONO 4 6 Port ddress and model rrisin eerie emet eee tite de recor peus e deed n edet 4 7 CPUS peed ites ques ope be E repel ete A E a 4 7 Time Stamp eee p ie tes a ene Une eee EE Epis 4 7 Break Emulation orent RR E cae E PER PECES trata 4 8 TIHggetz utes dene one pen S eU en tipen ten e rie EE 4 9 Trigger MOBIC d ida 4 9 Blt tc ee eere Ree terree pee eui 4 10 Filter CON OMS gt cass i ii tt re Rn D agere EE EE ERRARE CERERI eT eS 4 10 Other Trace Set p Buttons ciccccsessssosesscs
23. PC Windows to suite your tastes For example all Program windows can be set to have a dark blue background with white text to differentiate them from other kinds of windows At the same time all Data windows can be green with Black text and all Source windows set to have white background and red text It is possible to make the screen quite attractive or conversely garish enough to keep others from looking over your shoulder while you re working Choose the window class you wish to modify from the drop list While that class name is showing in that field the colors you select will be assigned to that class of windows After setting all of the colors the way you want them you can name your creation color scheme by typing the name in the Color scheme field and then clicking the Save button This color scheme can then be recalled in the future Note Not all combinations of background and foreground colors are possible due to constraints imposed by MS Windows and your video configuration Menus The primary means of controlling the debugger and thus emulation is through menus EMUL68 PC Windows menus conform to the Microsoft MDI standard Only those menu items that have meaning or can be used with the current selection will highlight when the mouse is pointing to them Menus are organized to hide items that are out of context Menu items which are not available in the current context will be grayed out Most menu items have Hot Ke
24. Speed Bar Local menu Call Stack v Parameters in hex Show function Available when the Call Stack window is selected Figure 2 21 Call Stack window local menu Menu Commands HotKey Description Parameters in hex When checked all passed parameters are displayed in hexadecimal format The default unchecked is to show parameters formatted by type i e floats as float char as ASCII int as hex Show function Positions the cursor in the Source window to the highlighted function in the Call Stack window Alternately double click on the function in the Call Stack window Copyright 1997 ICE Technology 2 31 EMUL68 PC Chapter 2 Software User Interface Window Menu CENA Help The Window menu is used to manipulate the Open anew window gt display You may open new windows close Toggle help line existing windows select windows and arrange windows on the screen There are Repaint Cu nine different types of windows available Tile windows Program Source Data Registers Special Registers Trace Buffer Watch Inspect and Call Stack These windows are updated when emulation is stopped Each window may be Cascade windows Arrange icons Zoom F5 custom sized and have user selected colors Next window Ctrl F6 Window configurations are saved as a part of Close Ctrl F4 the project information automatically when Win68 is closed 1DATA 2 demo c The current window is selected by clicking on the window
25. Windows 1 1 J Jumpers Miscellaneous 4 4 Load Copyright O 1997 ICE Technology Index Code 2 15 Default CPU Symbols 2 15 Load code 1 5 Loop Count 4 9 LUT 2 44 M Manual Conventions 1 2 Manual How to Use 1 1 Mapping Memory 2 5 Mask interrupts on step 2 18 Memory Editing with a Data Window 2 36 Map 2 22 Mapping 2 5 Menu Breakpoints 2 19 Config 2 22 File 2 15 Help 2 34 Local Trace 4 16 Run 2 17 View Edit 2 16 Window 2 32 Menus Local 2 23 Local Call Stack 2 31 Local Data window 2 25 Local Inspect window 2 28 Local Program window 2 24 Local Registers window 2 26 Local Source window 2 24 Local Special Registers window 2 27 Local Trace window 2 29 Local Watch window 2 28 Microsoft Windows 1 1 Miscellaneous 2 22 Configuration 2 12 Controls 4 23 Module 2 24 2 25 Monitor mode 2 12 Multiple Document Interface Standard 1 1 My Computer Properties 4 2 Index 3 EMUL68 PC N Next window 2 32 No 4 8 No Trigger 4 9 O Object Files 2 4 On B Cond ition 4 8 Trig 4 8 Open A new window 2 32 Opfetch amp EO 0 2 43 amp EO 1 2 43 8 EO don t care 2 43 Origin at program counter 2 24 2 25 Original address 2 25 Overflow flag 4 7 Override at Reset Program Counter 2 14 Stack Pointer 2 14 P Parameters in h
26. a single chip mode pod such as POD 11S POD 11KS etc the processor actually runs in expanded mode with the lost ports reconstructed using either a Motorola supplied part such as the 68HC24 port replacement unit or a gate array Connect Reset To Target when checked connects the processor s RESET pin to the target s reset signal via a CMOS switch If the box is checked any reset Copyright 1997 ICE Technology 2 11 EMUL68 PC Chapter 2 Software User Interface initiated by the emulator will cause the RESET signal on the target to be driven low active and vice versa If you have an external watchdog device on the target which will drive reset low when not serviced regularly we recommend that you do not enable this option This will prevent the processor from being forced into RESET after the emulator stops at a breakpoint leaving the emulator in a confused and unusable state COP Kicking Enabled when checked requests the EMUL68 PC to regularly kick reset the HC11 s internal COP circuitry while in monitor mode Monitor mode is defined as the state the emulator is in when not executing the user s program i e stopped as opposed to running If this box is not checked then COP kicking in monitor mode is disabled If the COP on the HC11 is enabled by writing a zero to the NOCOP bit in the CONFIG register and this box is not checked then the emulator will not function when the chip is operating in expanded mode This is not a p
27. actually used are significant and bit positions corresponding to unused signals should be set to zero The pattern fields for unused logical banks should be set to the period character Note For the current release of WIN68 when used with the bankswitched emulator board whether or not banking is enabled after opening the Memory Map Setup dialog box and subsequently closing it by clicking on the OK button you must do a full emulator reset reload your program and reinstall all breakpoints This is required even if you didn t change the memory mapping before clicking on OK If you closed the memory map setup screen by clicking on CANCEL then no action is required A full emulator reset can be performed by doing one of the following a exit the interface software and restart it b open the emulator hardware configuration dialog box and then click on OK or c open the emulator hardware configuration dialog box and click on Reset Emulator then click on OK or CANCEL Copyright 1997 ICE Technology 2 9 EMUL68 PC Chapter 2 Software User Interface Emulator Hardware Configuration The Config Emulator Hardware menu item opens the hardware configuration dialog box which configures the software to correctly control and communicate with the hardware Hardware Configuration x Emulator port Crystal Freq Processor Pod Class 120 8 000 mHz ssHciiEg Single Chip NN d eee BERDDOverde Test Mode After Reset
28. and colors are saved to the current project file wnen EMUL68 PC Windows exits and will be automatically restored when the software is started Registers window The Registers window displays the 68HC11 CPU registers in hex Program Counter Stack Pointer 6000 PC accumulators A B Index X Index Y and Q4B7T SP Condition Codes Also displayed in binary are the 6B A CCR flags Sign X Interrupt Mask Half carry C4 B Interrupt Mask Negative Zero Overflow and 9620 IX Carry Right clicking brings up the Registers local 3108 IV menu You may edit the value of a register by using F8 cc the local menu or highlighting a value and typing 111 SXH a dialog box automatically opens Register values 11 IN that have changed since the last time the emulator 0 ZUC stopped are highlighted Figure 2 25 CPU Registers display window SpecialRegs Window In addition to the Registers window dl SpecialRegs Pale ES Win68 has a customizable window 0 PORTA 00h 0000 0000 for special function registers I O 2E SCSR coh 1100 0000 ports timers and other control 2 PIOC 1 EGA registers This window is empty when initially opened The local menu for this window allows you to add registers to the window by picking from a list specific to the processor you are using Figure 2 26 Special registers window You may also edit or delete items in the window You may add the entire register to the window or in some ca
29. as a FIFO buffer and by default captures all microcontroller activity unless a Filter or Trigger condition is set and matched Time Stamp The trace board captures as part of each frame a 16 bit time stamp which may then be viewed as a part of the buffer The resolution of the timer is controlled by the trace setup CPU Speed and Prescaler fields Trigger When triggered by an A or B condition and following a user programmed delay the trace card stops recording frames This is useful to discover what the program did prior to or subsequent to a given condition The trace trigger can also be used to break emulation Copyright 1997 ICE Technology 4 5 EMUL68 PC Chapter 4 Trace Board Trace Setup A condition ADDRESS EQ El CYCLE DATA PROBED PROBE1 B condition ADDRESS EQ El CYCLE DATA PROBED PROBE1 The trace board by default records all microcontroller activity While this is occasionally useful you will often wish to restrict what is recorded to just frames of interest for a particular debugging situation The Trace Setup dialog box allows you to setup the trace board to capture just those frames meeting certain conditions The result of this is that the trace buffer holding the captured frames contains more information that is pertinent to the problem you are trying to solve The following paragraphs describe the options selectable from the Trace Setup dialog box and follow with some examples for setting up the trace bo
30. associated with the instruction such as immediate data are Read cycles Write Any valid Write cycle Opfetch An opcode fetch Opfetch cycle is defined as active when LIR is 8 E0 don t care driven low as the processor fetches the first byte of an instruction For multi byte instructions this is only true during the fetch of the first byte This is similar to the action of a Class 1 type breakpoint Opfetch 8 EO 1 Same as Opfetch above AND the external signal EO must be high The EO signal is available as a pin on most pods and is useful as a hardware qualification in addition to software conditions necessary for a break Opfetch amp E0 0 Same as Opfetch above AND the external signal EO must be low Copyright 1997 ICE Technology 2 43 EMUL68 PC Chapter 2 Software User Interface Trace Window For information about the Trace window and using the optional trace board please refer to Chapter 4 Trace Board PPA Window The Program Performance Analyzer requires the optional trace board For information on using the PPA please refer to Chapter 4 Trace Board Debug Information The Debug information dialog box available from the Help Debug Information menu displays internal emulator information This information is provided primarily for the technical support staff to help in diagnosing problems you may encounter The dialog box displays the following fields Field Contents STR version The versio
31. buffer display i e instead of F R W for Fetch Read Write you will see FO RO WO The overflow recording can be very useful when the trace filter setup results in infrequent frame recording but you still need the time stamp value in cycles Settable Prescalar Divide by 1 to 65535 Counter 16 bit Time Stamp e Y Overflow Flag To Trace Buffer Figure 4 5 Time stamp block diagram Break Emulation Break Emulation No gt On Trig gt On B Condition The Break Emulation box controls whether or not the emulator stops when a trace trigger occurs or B condition is satisfied The three choices are mutually exclusive Figure 4 6 Trace Break emulation control Setting No On Trig On B Condition Action Emulation does not stop as a result of trace conditions Emulation may still be stopped at an active Source Program or Special conditions window breakpoint or manually This is very useful when it is desirable to let the processor run but snapshot conditions or code flow using the trace feature Emulation stops when a trace trigger occurs as set by the A and B conditions and the Trigger logic setting Note that due to internal logic the break occurs one instruction after the actual instruction generating the trigger event Emulation stops when the B condition is true Copyright 1997 ICE Technology 4 8 EMUL68 PC Trigger Trigger AthenB
32. can free run or be triggered by events in your code and then capture n cycles before or after the trigger event It can be setup to capture all bus cycles or just ones meeting certain user criteria filtering You can find difficult to diagnose problems such as stack overflow random writers null pointer assignments interrupt conflicts and failures that only occur at speed with relative ease as compared to tracking down these bugs without trace The EMUL68 PC Windows trace provides RAM and logic to capture frames of information Frames trace records are 64 bits wide the trace card captures either 4 096 TR4 or 16 384 TR16 frames depending on the model Each frame records 16 address bits 8 data bits 16 probe bits which are jumper connected to I O ports on most pods 4 miscellaneous bits that capture cycle type 16 bits of time stamping and 4 bits for internal use The captured frames provide a history of your code execution and the binary levels on the probes Detailed Installation Instructions Installation Requirements Warning Turn off power to the target and the PC before installing the trace board The emulator board has the logic and connector necessary to support a trace board No additional connection to your target is required The trace board is a full length ISA style bus card It may occupy any available 8 bit slot as long as the ribbon cable can reach from the emulator card to the trace card A block of Copyrig
33. describes selections available in the Config menu Use these menu items to examine the software configuration in detail and to change it as needed Copyright 1997 ICE Technology 2 1 EMUL68 PC Projects Santee Registers Window Project name Paths Memory map Banking Setup Convert cycles to time Emulator Hardware Miscellaneous Color Trace PPA Chapter 2 Software User Interface A project is a collection of software configuration settings that are associated with a specific person target or software development project The Config Projects menu item opens a dialog box that allows you to set up named configurations or projects This is first in the menu and described first because all of the other Config menu item settings will be stored as settings for the current project in a file with an extension of PRO There is an INI file called EMUL11 INI and those settings are used if there is no current project But if the file EMUL11 INI contains the name of the current project all software settings are taken from PRO file for that project Projects behave differently than say a word processing document All software configuration settings are written to disk every time you change projects or whenever you exit the emulator software There is no exit without saving changes option Once you make a change to the configuration it is immediately effective and will unless you manua
34. filter or trigger Another way to think of this is to imagine each trace condition list A and B as a separate spreadsheet where each field in each qualifier is a cell The cells are organized so that the seven fields are in columns and the 8 rows represent qualifiers First each cell is evaluated to TRUE or FALSE blank cells are ignored Then cells are OR ed by columns The result of this is a single row sum of TRUE or FALSE for each field This row is then AND ed across to give a single logic result of TRUE or FALSE for the entire A or B condition field The subsequent trace actions then depend on the user s Trigger Logic see page 4 9 and Filter Conditions see page 4 10 selections Adding a Trace Qualifier Trace qualifier x Address Data PROBE 0 PROBE 1 Figure 4 11 Trace qualifier dialog box This dialog box is opened by clicking on the Add or Edit buttons in the Trace setup dialog box and allows you to configure one qualifier at a time Each field is explained in detail below The Y shown in some fields denotes binary notation is used for displaying the value Values written into the fields without the ending Y are assumed to be hex When this dialog box opens the Address field is highlighted Enter a suitable value then use the Tab key or mouse to move to the Data field if you wish to also set a data value as a part of the qualifier After entering a value use the Tab key or mouse to move to each fi
35. microcontrollers EMUL68 PC consists of an emulator plug in board a five foot 1 5 m long cable various pod boards and an optional trace board The EMUL68 PC Windows also referred to as Win68 software interface is a Microsoft Windows 3 x 95 application It follows the MS Windows Multiple Document Interface Standard resulting in the same look and feel as applications produced by Microsoft and others for MS Windows The EMUL68 PC Windows user interface is consistent with most other MS Windows applications and includes dynamically changing menus moveable and scrollable child windows function key shortcuts for menu items and context sensitive help Anyone familiar with MS Windows applications will be able to use EMUL68 PC Windows with little or no other assistance The EMUL68 PC hardware is modular The software user interface implements an effective high level debugger showing the user s source code and supporting local and global variables C typedefs and C structures The trace board option adds bus cycle tracing triggering and filtering functions How To Use This Manual Note This manual was written with different kinds of users in mind All users should have MS Windows installed and have learned the basic skills taught in the Basic Skills chapter of the Microsoft Windows 3 x User s Guide or in the Windows 95 tutorial It also assumes a basic familiarity with the chip you are using Many of EMUL68 PC s features are design
36. of the first instruction that function generates 2 If you enter the name of a C or assembly language variable the ampersand symbol amp must precede the name to obtain its address 3 If a symbol name appears without a preceding ampersand then the symbol s current value at the time of evaluation will be used 4 Expressions are evaluated each time the trace setup dialog box is closed by clicking on the OK button Note It is important to remember that if you use a symbol name in an expression the value of the symbol used in the expression is evaluated each time the trace setup is changed If you change the trace setup it is possible for the value of a previously defined expression which evaluates to a range or location to also change For example suppose that func1 and func2 are functions in your program and foo is a variable The following examples will help to clarify the rules Expression in Example address field Definition of expression 1 1000 a single address at 1000 2 func1 to amp foo 1 a range of addresses from the first address of func1 to the address of foo 1 location 3 func1 len 1000 a range of addresses from the first address of func1 to the address defined by func1 FFF Copyright 1997 ICE Technology 4 13 EMUL68 PC 4 func len foo 5 amp foo 6 func to func2 1 Copyright 1997 ICE Technology Chapter 4 Trace Board a range of addresses from the first address of func
37. pins on the pod labeled BO and B1 respectively instead of soldering the signals to the cable connector Pins BO and B1 on the pod are routed to connector pins 38 and 29 respectively obviating the need to solder one or both high order signals to the connector The Bank Signal Specification area contains 16 fields one for each active bank The term logical bank number is a value that appears in bits 16 19 of an address in the binary file loaded into WIN68 using the program load facility A 20 bit logical address is a 4 bit logical bank number and a 16 bit address All addresses shown in the WIN68 interface are logical addresses The term physical bank number is defined as a 4 bit value that appears on the 4 bank select lines connected to the pod Under most circumstances physical and logical bank number are equal and that greatly simplifies working with the emulator It is strongly suggested that you try to arrange for this to be the case If not the Bank Signal Specification area allows you to define the precise relationship between logical and physical bank numbers Numbers in the shaded area under the heading Bank are logical bank numbers For each of the 16 possible logical banks there is a corresponding field under the heading of Pattern where you can enter the associated physical bank number i e the pattern that appears on the 4 bank select signals attached to the pod Please enter the pattern in hexadecimal Only those bits that are
38. the Config Emulator hardware menu selection check the following and set the options to match your configuration Due to the large number of possible configurations the defaults may not be appropriate for your emulator 1 The emulator port address This defaults to the same address that emulators are configured for at the factory 2 The crystal frequency This should be set to the operating frequency not the E clock rate If the pod is set for internal operation this should be the same as the crystal on the pod If you are using an HC11 variant such as the P2 or PH8 with an on chip PLL set this field to 4 times the maximum PLL output frequency E clock source 3 The processor type This is selected from a drop down list to match your target device The pod you are using must support your intended target many pods support more than one target device Do not select a processor type not supported by the pod you are using 4 The Pod Class This is set to Single Chip or Expanded and must match your hardware pod class Copyright O 1997 ICE Technology 1 4 EMUL68 PC Introducing EMUL68 PC Windows If you did not use the default emulator suggested installation directories verify and set as needed the Config Paths for emulator and user files Also use the Config Memory Map item to insure that all memory is mapped to the emulator and not write protected Follow the instructions below to load the demo program and r
39. the new location of the STR and SYM files Mapping Memory ROM and RAM memory on the target can be emulated by RAM on the emulator board called emulation RAM or emulation memory The entire 64K address space of the HC11 processor can be mapped to either the target s or emulator s memory in 4K byte blocks for the standard emulator board or in 64 byte blocks for the bankswitched emulator board The Config Memory map menu item opens the Memory Map Configuration dialog box that controls the mapping of addresses to emulator RAM or target space If a particular address is mapped to emulation RAM on the emulator board all memory cycles at that address will reference emulation RAM in the emulator and the user s target board will see an ECLK that is low for the entire bus cycle and thus will not respond during that cycle Conversely for a bus cycle at an address mapped to target memory the target will see a normal ECLK but the emulator s memory will see an ECLK that is low for the entire cycle and thus will not respond If your target has a memory mapped I O device within a block mapped to emulation RAM such mapping will prevent your application from accessing that device To avoid this be sure to map memory blocks that contain target devices to the target Copyright 1997 ICE Technology 2 5 EMUL68 PC Chapter 2 Software User Interface Memory map configuration Ea Map To Write Map to Write Target Protect Target Protect 000
40. to expr2 arange from expr1 to expr2 3 expri len expr2 a range from expr1 of length expr2 The rules for the use of symbols in address expressions is as follows 1 The name of a C function represents the address of the first instruction that function generates 2 If you enter the name of a C or assembly language variable the ampersand symbol amp must precede the name to obtain its address 3 If the symbol name appears without a preceding ampersand then the symbol s current value at the time of evaluation will be used 4 Expressions are evaluated each time the Special conditions setup is modified Note It is important to remember that if you use a symbol name in an expression the value of the symbol used in the expression is evaluated each time the Special conditions dialog box is closed by clicking the OK button When that occurs it is possible for the value of a previously defined expression which evaluates to a range or location to also change For example suppose that func1 and func2 are functions in your program and foo is a variable The following examples will help to clarify the rules Expression in Example address field Definition of expression 1 1000 a single address at 1000 2 func1 to amp foo 1 a range of addresses from the first address of func1 to the address of foo 1 location 3 func1 len 1000 a range of addresses from the first address of func1 to the address defined by func1 FFF
41. to write into program code or data stored in EPROM Since the interface software cannot load programs into a write protected block the write protected blocks should be protected after program loading is completed Copyright 1997 ICE Technology 2 6 EMUL68 PC Chapter 2 Software User Interface For your convenience these four speed buttons are provided Map List to Emul cil Maps all listed address ranges to emulator Mop To Tage Maps all listed address ranges to target E WP Lit Write protects all listed blocks No WP Li i Ben e Removes write protection from all listed blocks When this dialog box is completed to your satisfaction click on the OK button Note If you use the bankswitched emulator board after pressing OK to exit the memory configuration dialog box it is necessary to reset the emulator by opening the emulator hardware configuration dialog and clicking on OK reload your application and reinstall all existing breakpoints after clicking on the OK button Setting Up Bankswitching The Banking Setup selection on the Config menu opens the Bank Switching Logic dialog box This dialog box enables the user to define the bank switching configuration of the target so that EMUL68 PC can successfully emulate it This box does not apply if you have the standard non bankswitched emulator board Copyright 1997 ICE Technology 2 7 EMUL68 PC Chapter 2 Software User Interface Ban
42. window list Opens a C Source code window Opens a CPU Hegister window Opens a Trace Buffer window Chapter 2 Software User Interface Close the current window Alternately use the icons in the title bar at the top of the window you wish to close This list shows open windows with a check mark next to the current window Selecting a window name from this list will restore it and make it the current window Opens a Program Window assembly code source code Opens a Data window memory dump registers Opens a CPU special registers Special Registers window race buffer Opens a Watch watch points window Figure 2 23 Open Window sub menu Copyright 1997 ICE Technology e 2 33 EMUL68 PC Chapter 2 Software User Interface Help Menu Index F1 f This menu provides on line help for commands Emulator board emulator setup and emulator operation Help is Software provided in standard Microsoft Windows help style Trace board and should be familiar to MS Windows users See Using help the documentation provided with your version of Windows for further information on using the Display debug info Windows help system Info Figure 2 24 Help menu Menu Commands HotKey Description Index Fl Opens an alphabetical index of help topics Emulator Board Help on emulator setup Software Help on the EMUL68 PC Windows software and user interface Trace board Help on using the op
43. with the mouse typing pOr lt Ctrl gt lt Tab gt or lt Ctrl gt lt F6 gt You may have multiple windows of any type open at the v 8 Program same time except the Call Stack window 6 Registers only one of which is permitted Windows may be easily sized by dragging with the mouse at Figure 2 22 Window menu the window corners or edges or by using the minimize maximize restore icons in the title bar at the top of each window Windows may be closed using the icons in the title bar of each window just like the windows in other MS Windows applications Menu Commands HotKey Description Open a new window Opens a new window the type is selected from the Open Window sub menu see Figure 2 23 below The nspect and Call Stack windows are opened from the View Edit menu Toggle Help line Displays or hides the command help line at the bottom of the display Repaint lt Ctrl gt R Redraws the screen Tile windows Resize and arrange the displayed windows without overlapping them Cascade windows Resize and overlap the displayed windows Arrange icons Line up any closed EMUL68 PC Windows icons at the bottom of the main window Zoom Fb Expand the current window to fill the main Win68 background window Next window lt Ctrl gt Make the next window the current window F6 Alternately just point and click with the mouse Copyright 1997 ICE Technology 2 32 EMUL68 PC Ctrl F4 Close Open
44. 0 3E 2F 37 BD 66 FA E4 AS are dls iayed while Dis 2028 8E TE 89 DE EG 1C 96 00 Toe 2030 AC 7A B3 BF 27 65 F5 3E emulation stops Data can 2038 C4 4D FF 1E E1 FF 6D D4 s be displayed or modified in various formats Figure 2 27 Data display window memory dump shown in hex Right clicking any Data window displays the Data local menu which supports the following items memory fill block move positioning address space selection and display format Display formats include hex 8 16 and 32 bit decimal binary ASCII float double and custom The Custom Display Format option opens a dialog box that lets you input a C printf syntax format specifier string All standard C formats are allowed including the newline character Editing Memory with a Data Window Changing a value at any memory location is as easy as selecting the byte word long word or float to change with the mouse or arrow keys and then typing the new value The first character you type will open a quick data entry dialog To avoid confusion always enter the new data in the same format that the data is displayed If the Data window is displaying ASCII characters type the new character not a string in ASCII If the Data window is displaying signed integers enter the new value as a decimal number The number of bytes written to memory corresponds to the displayed format If you display the data in bytes only a byte will be written to memory for each update In ot
45. 0 00FF i 1000 103F Note Addresses not specified will be mapped to emulator without write protection Map List to Emul WP List Map List To Target No WP List Figure 2 4 Memory Map Dialog Box pag do Un SES LS TC l S EA esi E TE TN EE TS eds xil The standard emulator divides memory into 4K byte blocks the bankswitched emulator divides memory into 64 byte blocks The block size is not adjustable Each block can be mapped to either emulation default or to target memory Blocks can also be write protected Addresses are entered in hexadecimal as a range using the form START END For each range checkboxes indicate if that range is to be mapped to emulator or target memory and whether or not the range is to be write protected By default memory is mapped to emulator without write protection Thus it is only necessary to list blocks in the Memory Map Configuration dialog box which must be mapped to target and or require write protection All blocks not listed in this dialog box will be mapped to the default condition emulator memory without write protection Individual blocks can be write protected If a write cycle occurs to any address within a write protected block an immediate emulation break will occur and a warning box will appear to notify the user that the program attempted to write to a write protected address This feature is useful to detect program errors whereby the processor attempts
46. 1 to the address defined by func1 the value of foo 1 a single address the address of variable foo a range of addresses from the first address of func1 to the address one before func2 Assuming that func1 and func2 were adjacent in memory compiler dependent see your map file this would evaluate to contain all of the addresses of func1 4 14 EMUL68 PC Chapter 4 Trace Board Trace Buffer Display In the following two screens the trace was set for no filtering trigger on A condition The A condition had a single qualifier with the address field set for the entry to the putchar function at 61D3 the cycle type set to x don t care and all other fields set to x don t care The code is from the demo a07 example included with Win68 The time stamping is set for relative mode with the prescaler set to 1 giving maximum resolution Address Time stamp R oe a Bus cycle s in hex ae uC bus ee broken down by Frame number External hardware NSHUCHORS all bus cycles inputs Disassembled are counted instructions E trace buffer 52 8192 frame address CYC EO El data instruction TimeR us 619F F 1 1 BD61D3 JSR putchar 1 6 5 61D4 F 1 1 39 RTS 1 0 10 6142 F 1 1 31 INS 2 5 13 6143 F 1 1 39 RTS 1 5 18 6213 F 1 1 38 PULX 2 5 23 6214 F 1 1 30 TSX 2 5 26 6215 F 1 1 6COG INC 06 X 1 5 32 6217 F 1 1 2602 BNE 621B 3 0 35 621B F 1 1 20C5 BRA 61E2 1 5 38 61E2 F 1 1 30 TSX
47. Active status from yes to no using the Add dialog box as explained above Quits the PPA window and ends the PPA session When the PPA window is reopened all counters statistics and fields are reset to zero Saves the current PPA bin definitions as part of the emulator startup file This does not save the PPA statistics Only one set of PPA definitions is saved not one per project Miscellaneous Controls v Bargraph When checked this control displays a horizontal bar histogram of the relative bin percentages It gives you a quick graphical feel for where your program is spending its cycles The bars are displayed in the Address Range field of the PPA window Copyright 1997 ICE Technology 4 23 EMUL68 PC Code only Chapter 4 Trace Board This field is not currently operational Adding User Defined Bins Active bins are counted in statistics bins that are defined but inactive are not counted Address ranges are displayed as Start and length in place of the End address when checked the default is Start and End address The starting usually of a function address for a range in hexadecimal Shows the last address of a range or the size of the range if the Length box is checked List of functions in your program Double click to select then click Add Copyright 1997 ICE Technology Address Range This field is always set to 1 for the EMUL68 PC Sta
48. Chapter 4 Trace Board The trace board stops capturing frames after the trigger condition is met and a programmable Delay 8192 el Delay The A and B conditions Figure 4 7 Trace trigger setup and options are explained below To disable triggering select the Trigger No Trigger option as explained below The Delay is the number of frames recorded after the trigger condition is met The example shown 8192 is set to use half of the available buffer from a 16K board to record the events before the trigger and half to record the events after the trigger For a 4K TR4 board set this field to 2048 to achieve the same result Set a higher number to record more frames after the trigger event set a smaller number to record more pre trigger event frames The Loop Count is the number of times the trigger condition must be met before the programmed delay begins Note that if the Loop Count is set higher than the actual number of times the trigger event occurs the board will not trigger Trigger Logic No Trig No Trig A B Athen H A loop B loop A loop then B A then B loop Figure 4 8 Trace trigger condition qualifiers This sub menu selects the trigger logic There are two programmable conditions A and B explained below one or both of which must be met to cause a trace trigger The selection No Trigger prevents trace triggering and may be used as a quick enable disable of triggering This in combination with the co
49. Config Emulator hardware dialog box Button Help Reset Step Step Over Go Break Pos Clock 0 Function This button opens the MS Windows Help application to the page with help for the current Win68 context This button resets the microcontroller Same as Run Reset chip This button emulates one source line or one instruction depending upon which window was last active Source or Program respectively This button is the same as Step except that interrupt handlers and functions called are run at full speed with emulation stopping at the following source line in the Source window or instruction in the Program window depending on which window is selected This toggle button starts full speed emulation that will continue until a break occurs After starting emulation the Go button changes to Break This toggle button halts emulation When emulation is stopped this button becomes the Go button This button acts just like typing lt Ctrl gt A and will open a dialog box that lets you jump the window cursor to a specified address Resets the cycle count or displayed time Resetting the microcontroller see above also resets the count Copyright 1997 ICE Technology 2 45 EMUL68 PC Chapter 2 Software User Interface Help Line At the bottom of the Win68 window is a line of text that depending upon the context explains what the selected item under the mouse pointer is what it does or ke
50. Ctri Ins User defined symbols Default CPU symbols C call stack Evaluate Ctrl E Write without readback Inspect Ctrl Add a watch point Ctrl Search Ctrl 5 Search Next Ctrl x Search Previous Figure 2 9 View Edit Menu Menu Commands HotKey Copy to clipboard Ctr ns User defined symbols Default CPU symbols C call stack Evaluate lt Ctrl gt E Write without readback Copyright O 1997 ICE Technology Chapter 2 Software User Interface The View Edit menu allows quick inspection of variables the C language call stack where am and how did get here the user s symbol list or the processors default symbol internal I O or control registers values You may also change the value of variables or add them to a watch window for monitoring An expression evaluator is built in for quick programming calculations You may also search the current window for text such as variable names or values an instruction etc Description Copies the text without font or formatting information of the entire active window to the Windows clipboard Opens a dialog box that allows selecting a source module for which all symbolic information may be viewed and optionally copied to the clipboard Displays internal CPU I O and control registers symbolically Displays the C call stack and passed parameters required to reach the current Program Counter value program address Only one copy of this wi
51. D Address space lt Ctrl gt lt space gt Local Menu Registers window Edit Figure 2 17 Local menu Registers window Copyright 1997 ICE Technology Chapter 2 Software User Interface automatically opened Moves a block of data specified by start address and either end address or length Fills a block of data specified by start address and either end address or length with a user supplied value Changes display format via a sub menu of data to one of 13 supported formats including binary hex ASCII integer and float A custom format selection is also available which allows the user to enter a C format specifier using standard printf syntax Allows user to switch between display of DATA default Special Function CPU Registers where data window address 0000 is first SFR address regardless of SFR offset in physical address space and BREAK RAM reserved for support diagnostic use only You may use this button to edit a register value in the register window or simply highlight the value to change with the mouse and type in a new value a dialog box will automatically open for entry 2 26 EMUL68 PC Chapter 2 Software User Interface Local Menu Special Registers window Add Ins Remove Del Edit Enter View Edit bits Figure 2 18 Local menu Special Registers window Available when the Special Registers window is selected Menu Commands HotKey Description A
52. Scroll a Data window until it shows the data to be changed then highlight the data to be changed with the cursor or arrow keys or 2 Select the Data window then press lt Ctrl gt A then enter the hex address or symbol name in the dialog box C variable and function names may be entered directly assembly language symbols must be preceded by an ampersand amp 3 Type the desired value this will open an Enter data dialog box and hit Enters Warning Always turn on the PC before applying power to the target Always turn off the target power before turning off the PC power Copyright 1997 ICE Technology 1 6 EMUL68 PC Chapter 2 Software User Interface Chapter 2 Software User Interface Detailed Software Installation Instructions Before installing the software it is important to have a basic understanding of how to operate MS Windows For help mastering MS Windows please refer to the Microsoft Windows User s Guide for the version you are using The EMUL68 PC Windows installation diskette includes an MS Windows compatible SETUP EXE installation program To install this software from Windows 3 1 3 11 run SETUP EXE by typing WIN A SETUP at the DOS prompt before entering Windows or from within Windows by selecting the RUN item in the Program Manager File menu and typing A SETUP as the file to run If you installation disk is not in drive A then replace the letter A with the letter corresponding to the a
53. TECHNOLOGY NOHAU EMULO6S8 PC Windows User Guide We would appreciate any feedback about the product including the manual ranging from simple software defects to suggestions on how to improve the examples Thank you EMUL68 PC Windows User Guide Copyright 1997 ICE Technology URL http www icetech com E Mail support icetech com All rights reserved worldwide Development Team Documentation Chris Boehr Chris Boehr Peter Zou Bob Shoemaker Nils Johansson Jolinda Pizzirani Per Nothagen Copyright O 1997 ICE Technology ii Warranty Information The EMUL68 PC Emulator board Trace board pods Emulator Cable Serial Box and LanICE hardware are sold with a one year warranty starting from the date of purchase Defective components under warranty will either be repaired or replaced at ICE Technology s discretion Each optional adapter cable and extender is sold with a 90 day warranty except that it may be subject to repair charges if damage was caused by the user s actions The EMUL68 PC Windows Emulation software is sold with no warranty but upgrades will be distributed to all customers up to one year from the date of purchase ICE Technology makes no other warranties express or implied including but not limited to the implied warranties of merchantability and fitness for a particular purpose In no event will ICE Technology be liable for consequential damages Third party software
54. TI ReTurn from Interrupt so that you may recognize the code returned to Filter Conditions Filtering is a key feature of the trace board The Filter ALL E Conditions field controls what frames are recorded by A the trace board allowing you to limit the captured frames to only those in which you are interested For B instance you may only wish to see the characters read A amp B from the serial port Setting a condition A or B and enabling the filter for that condition s will reduce the Figure 4 10 Filter amount of information collected and help you to conditions pinpoint problems faster Filter Action All All frames are captured There is no filtering A Only frames which match the A condition are recorded B Only frames which match the B condition are recorded A amp B Frames which meet both A and the B conditions are captured Filtering is a key feature of the trace board The Filter field controls what frames are recorded by the trace board Record filtering means that the trace buffer will contain ONLY the records you are interested in You may not need to visually scan through thousands of records to find the one you want Copyright 1997 ICE Technology 4 10 EMUL68 PC Chapter 4 Trace Board Other Trace Setup Buttons Use this button to add a new qualifier to the A or B condition boxes Click in the A or B box then click Add Add to open a dialog box Alternately double click on the next available line in t
55. ard Port Trigger No Trig M Em F Buffer Size None gt 4K 16k Delay 8192 LoopCount 2 post view NN Break Emulation CPU Speed 8 000 Mhz No On Trig LN Time Stamp Prescalar P Rec Overflow Yes S On B Condition Resolution 0 50000 us Add Edit Detet Initialize Hardware Figure 4 1 Trace setup dialog Copyright 1997 ICE Technology 4 6 EMUL68 PC Chapter 4 Trace Board Port address and model The Port address setting in hex must agree with Port 130 the address set on the trace board hardware via Buffer Size the jumpers The default trace address is 130 Set the buffer size according to the frame depth None 4K 16K you have 4K for model TR4 16K for model TR16 and None if you do not have a trace card installed Figure 4 2 Trace address CPU Speed The CPU speed should be set to the actual CPU Speed 8 000 Mhz crystal frequency used on your target crystal jumpers switches set to Ext or the pod Resolution 0 500000 us crystal jumpers set to Int This rate is divided by 4 to get the E clock rate The E Figure 4 3 Trace CPU speed clock period determines the maximum field resolution of the Time Stamps Time Stamp E gt The trace board hardware includes a 16 Time Stamp bit counter that is used as an execution Prescalar timer For each frame recorded in the trace buffer the current value of th
56. ator banking scheme sizes hardware etc This toggles between displaying the number of elapsed cycles or alternately the elapsed time the emulator has run code at the right side of the toolbar The displayed time is an arithmetic conversion of the measured E cycle count Sets up the emulator hardware See Emulator Hardware Configuration on page 2 10 at the beginning of this chapter for more detailed information Sets up miscellaneous default conditions See the Miscellaneous section on page 2 12 for more information Allows the user to configure the window colors to suit his her tastes Only applicable if optional real time trace card e 2 22 EMUL68 PC Chapter 2 Software User Interface PPA installed Opens a dialog box to set trace conditions See Chapter 4 Trace Board for further details Only applicable if optional real time trace card installed Opens a dialog box to setup Program Performance Analyzer See Chapter 4 Trace Board for further details Local Menus Local menus are a special type of menu that is specific to the window currently selected such as the Program window Source window Data window etc The next position on the menu bar is reserved for the local menus The menu and sub menu in this position will change depending on which window is currently selected There are nine local menus corresponding to the Program Source Data Registers Special registers Watch Inspect Trace buff
57. bin which records all bus cycles which fall outside the range of any user defined bins The Miss bin cannot be deleted edited or made inactive Load the file demo a07 located in the examples directory from the File Open menu Copyright 1997 ICE Technology 4 20 EMUL68 PC Chapter 4 Trace Board Active This field shows whether or not a defined bin is counted in the statistics When a bin is active yes it is counted as a part of the current statistics When inactive no the bin is not counted This allows the user to quickly see or ignore the effects of a bin without removing or adding it to the display Address Range This is the user defined address range for the bin and is displayed as hex in FROM TO format If a complete function is exactly defined by the range the function name is shown in parentheses This field is also used to display the histogram if the Bargraph box is checked Count Shows the bus cycle count for the bin during the current PPA run A bus cycle whose address falls within the address range defined for the bin is counted The count is cumulative across multiple Run Stop commands and may be reset to 0 by clicking the Reset Analyzer button 96 Shows the percentage of the counted cycles that the program spent accessing addresses within a defined bin The sum of the percentages of all bins user defined and the Miss bin is always equal to 100 Time Elapsed Displays the
58. ception the Reset and Go selection on the Run menu OK button resets the emulator and trace boards completely and closes the dialog box Reset Emulator also resets the emulator and trace boards completely but without closing the dialog box Miscellaneous Configuration The Miscellaneous item in the Config menu opens a dialog box that controls special features of EMUL68 PC Windows 1 when and if automatic resets occur Copyright 1997 ICE Technology 2 12 EMUL68 PC Chapter 2 Software User Interface 2 optional startup address and stack pointer values that would override values set during reset 3 the source code address range for limiting where breakpoints are set 4 tab size for expanding tabs in the source window By default the emulator resets the controller when the EMUL68 PC Windows software is started and after an object file is loaded The Reset chip at start up and the Reset chip after load file radio buttons can disable either of those resets and may be helpful during particularly difficult or unusual debugging circumstances Reset chip at startup Yes No Reset chip after load file Yes No Enable memory readback Yes No Tab Size 8 Enable code space limits Low 0 High FFFFFFFF Override at Reset Program Counter Stack Pointer vx Figure 2 7 Miscellaneous Setup Options Enable memory readback when enabled requests the software interface to redraw any memory dump window
59. code executed out of external EPROM or EEPROM This menu is very useful to disable or delete all Class 1 breakpoints at once Class 1 breaks are defined deleted or toggled between active and inactive states by clicking on an address in the program window clicking on a line number in the source window or using any selection on the Breakpoints pull down menu except Special Conditions A Class 1 break is an opcode fetch type break at a single address usually the first byte of an instruction opcode An opcode fetch type break is active when LIR is driven low as the processor fetches the first byte of an instruction On this type of break emulation always stops before the instruction at the breakpoint is executed The Breakpoint Disable All Breakpoint Delete All and Breakpoint Setup dialog box menu items only operate on Class 1 breaks and not on Class 2 Hint To quickly toggle a Class 1 breakpoint active inactive using the mouse In a Program window click in the address field In a Source window click on or to the left of the line number on any executable line you can only break on lines which produce code i e you cannot break on a comment Class 2 Breakpoints Class 2 breaks are defined toggled or removed only through the Breakpoint Special Conditions dialog box The methods described above for Class 1 breaks do not work for setting clearing or toggling Class 2 breakpoints Class 2 breaks are more flexible than Clas
60. dd dns Opens a list of special I O and control registers that may be added by clicking to the Special Registers window Remove Del Removes a register from the SpecialRegs window Edit Enter Opens a dialog box to modify the value of a register Alternately double click on the register name in the window View edit bits Opens a dialog box to modify individual bits in registers that allow it Copyright 1997 ICE Technology e 2 27 EMUL68 PC Chapter 2 Software User Interface Local Menu Watch window Add Ins Edit Enter Available when the Watch window is Remove Del selected Figure 2 19 Watch window local menu Menu Commands HotKey Description Add lt Ins gt Add a variable to the Watch window Watch variables are updated when the emulator stops Edit lt Enter gt Modify a Watch variable Alternately double click on the variable in the Watch window or select the variable and then begin typing a new value to open the same dialog box Remove Del Remove a Watch variable from the Watch window Local Menu Inspect window This feature is not implemented in the current software release Copyright 1997 ICE Technology 2 28 EMUL68 PC Chapter 2 Software User Interface Local Menu Trace window Y Toggle trace speed bar Go to Begining of Trace buffer Ctrl B Go to End of Trace buffer Ctrl E Go to Frame number Ctrl F Search Ctrl A Search Next CTRL X Searc
61. e User Interface Chapters skim the section that describes the pod you are using and then begin using EMUL68 PC referring to on line help when needed After a few days of use skimming the Reference chapters may highlight useful features Manual Conventions Type the words shown in double quotes exactly as shown but without the quotation marks Single keys which have multi character names are shown inside angle brackets i e Enter Ctrl Tab Del Ins and Alt keys Function keys are shown as F1 Use the Alt and Ctrl keys like shift keys Hold them down while you press the key that follows them in the text For example if the text instructs you to type lt Alt gt F press down and hold down the Alt key then press the F key Control key combinations are shown as either lt Ctrl gt X press and hold the Ctrl key while pressing the X key or alternately X Where you see lt Alt gt RF as the keyboard shortcut you should type lt Alt gt R hold the Alt key down while you then press the R key to open the Run menu then press the F key without the Alt key to activate the feature of EMUL68 PC Windows that starts emulation without enabling defined breakpoints Holding down the Shift key or turning on lt CapsLock gt is not necessary Even though the keyboard shortcuts are all shown in capital letters the shortcuts are not case sensitive Window names and labels that appear on the screen ar
62. e printed in bold to set them apart from the rest of the text Notes and hints are printed in italics and warnings have a box around them to set them apart from the rest of the manual text Please pay careful attention to them Quick Installation Instructions System requirements EMUL68 PC requires a personal computer with at least one free ISA or EISA bus slot The PC must also have at least four megabytes of RAM 8MB Copyright 1997 ICE Technology 1 2 EMUL68 PC Introducing EMUL68 PC Windows recommended for Win95 an 80386 80486 or Pentium compatible CPU a hard disk with at least 3 megabytes of unused space and Microsoft Windows 3 1 3 11 or Windows95 installed A mouse is not required but is strongly recommended Quick setup instructions The hardware and software are designed to be easily installed and quickly running on most personal computer systems Users can normally begin using their emulator without yet connecting to the target after following these initial steps However if you are new to personal computers if you are unsure about what to do after reading the quick installation instructions or if your emulator does not work after you follow these instructions follow the steps for installing and configuring each board and the software as outlined in their respective chapters in this or the EMUL68 PC DOS Users Manual Warning Always turn on the PC before applying power to the target single b
63. ed around the features of the supported chips Being familiar with the chip is a prerequisite to understanding how to use the emulator productively This manual does not include detailed installation instructions for EMUL68 PC or the many pods available For detailed installation information please refer to Section 2 of the EMUL68 PC User s Manual and also to Section 9 if you have a bankswitched emulator board Detailed information about pods can be found in Section 6 If you did not receive the EMUL68 PC User s Manual with your purchase please contact customer support support icetech com and request one If you are new to emulators of any kind read both this manual and the EMUL68 User s Manual completely including the reference chapters You may skip the sections in the EMUL68 User s Manual that describe pods you do not have and the sections on trace or bankswitching if you not have a trace board or a bankswitched emulator board Copyright 1997 ICE Technology 1 1 EMUL68 PC Introducing EMUL68 PC Windows If you have used emulators with other microprocessors but are not familiar with the specific HC11 family member being emulated you are strongly encouraged to review the features of the chip you have then thoroughly read the section in the EMUL68 User s Manual that describes the applicable pod before running the emulator If you are familiar with emulators MS Windows and the chip read the Emulator Board and Softwar
64. elapsed time since the start of the last PPA run up to 1000 days total The time is reset when the Analyzer Run or Reset buttons are clicked on The time is not reset by starting and stopping the emulator Total Shows the total cycles counted in the user defined and Miss bins along with the percentage total which is always equal to 100 PPA Controls The PPA controls are divided into four sections emulator control buttons and status analyzer PPA control controls for bins and two miscellaneous check boxes as shown in Figure 4 16 above The emulator control buttons are located at the top left of the PPA window next to the Emulation status The analyzer controls are located at the top right of the PPA window to the right of the Analyzer status The bin control buttons are located at the bottom of the window with the miscellaneous check boxes to their left The emulator and the PPA are controlled independently that is the emulator can run with PPA stopped and vice versa although running the PPA while the emulation is stopped has little practical utility To record bus cycles for PPA analysis you must have both the emulator and the PPA running Copyright 1997 ICE Technology 4 21 EMUL68 PC Chapter 4 Trace Board Emulation Status and Controls Emulation This box shows you the current emulator status Running your Running program shown at left Stopped not executing your code or Just Reset which indicates the Re
65. eld in turn as needed When all fields are set to your requirements click on the OK button to return to the Trace setup dialog box The number of qualifiers per A or B condition is limited only by memory available Copyright 1997 ICE Technology 4 12 EMUL68 PC Chapter 4 Trace Board This dialog box can also be opened by double clicking inside the A or B condition sub window of the Trace setup dialog box If you double click on an existing qualifier this box will open to modify that qualifier If you instead double click on the next available line within the sub window the dialog box will open to enter a new qualifier The address sub field can specify a single address or a range of addresses and can be expressed in one of three acceptable forms as shown below The terms expr1 and expr2 represent C expressions involving operators symbols and or hexadecimal constants There are two other key words permitted to is used to describe a from to range between two numbers and len used to describe a length No spaces are permitted in the expressions between symbols operators and constants but spaces are required on each side of the words to or len 1 expri a single address specified by expr1 2 expri to expr2 arange from expr1 to expr2 inclusive 3 expri len expr2 a range from expr1 of length expr2 The rules for the use of symbols in address expressions is as follows 1 The name of a C function represents the address
66. ences for how this information is loaded At the bottom is a short list of most recently loaded files in order from most recent to least Exit DEMO A0 ALT X This list allows rapid access to the files you are currently working with Figure 2 8 File Menu Menu Commands HotKey Load Code F3 Load Default CPU Symbols Save Code As Remove symbols Show Load Info Preferences Exit Alt X recently used file list Copyright 1997 ICE Technology Description Loads a supported binary hex Intel or Motorola or object file Loading of code and symbolic information is controlled by the File Preferences menu item See whatsnew txt file for supported object formats Note This selection is not required in the current release to access the default CPU symbols The user should ignore this selection Writes memory contents to disk in Motorola S1 file format Deletes symbolic information from the symbol table stored in emulator memory Displays summary information for the file loaded last Allows user control over file loading The default is to load code and symbolic information using Motorola formats for integers and floats Exits the emulator application after saving project information This list shows the most recently loaded files Clicking on the file name will load the file for debugging 2 15 EMUL68 PC View Edit Menu kar Run Breakpoints Com Copy to clipboard
67. enerated by a source line When a Source window appears blank with the window title Source it usually means that the program counter is pointing to instructions in your code derived from a module with no debugging information such as a module stored in a library supplied by the compiler vendor The absence of debugging information can also be the result of compiling with incorrect compiler switches or options The source window may also be blank when your code is stopped outside of any C modules i e in a portion of your program written in assembly language As soon as the PC points to an instruction from a C module or assembly module with line number symbolic information the Source window will update to show that text and the title on the window will change from Source to the name of the source file being displayed Hint The simplest way to find the first line of source text is to reset the controller use the Reset button on the Button Bar click on the Source window title bar to select it and then execute a single step by pressing the F7 key or by clicking on the Step button on the speed bar When the Program window is selected a single step means a single instruction The same is true for animated execution a pause occurs after every instruction is executed When the Source window is selected a single step means execute a single source line Animation will execute faster when the Source window is selected than when the Program wind
68. enu Commands HotKey Description Address lt Ctrl gt A Position the window to the specified address Origin at program Ctl O Position the window at the current program counter counter value Set new PC value at lt Ctrl gt N Set the program counter to the address at the cursor cursor Module lt F3 gt Opens a dialog box that allows quickly positioning the cursor at the start of any module Function lt Ctr gt F Opens a list of all functions loaded selecting one immediately positions the cursor at the function View source window lt Ctrl gt V Opens or shifts focus to a Source window Toggle breakpoint lt F2 gt Sets resets a breakpoint at the cursor Local Menu Source window Address Ctrl A Origin at program counter Ctrl O Set new PC value at cursor Ctrl N Available when the Source window is Module Ctrl F3 selected Function Ctrl F Call stack View assembly code Ctrl Toggle breakpoint F2 Figure 2 15 Local menu Source window Copyright 1997 ICE Technology 2 24 EMUL68 PC Menu Commands Address Origin at program counter Set new PC value at cursor Module Function Call stack View assembly code Toggle breakpoint HotKey lt Ctri gt A Ctrl 0 Ctrl N F3 Ctrl F Ctrl V F2 Local Menu Data window Address Ctrl A Original address Ctrl O Edit Enter Block move Ctr B Fill Ctrl F Display as Ctr
69. ept for the last frame recorded which is frame zero Opens a dialog box for searching in the trace buffer The search is qualified by address data cycle type etc and can find the n occurrence by entering a loop count Finds the next occurrence of the data meeting the search criteria by searching forwards in the buffer Finds the previous occurrence of the data meeting the search criteria by searching backwards towards the beginning in the buffer Positions the cursor on the frame containing the trigger event If the trigger event did not occur or triggering is disabled the last frame in the buffer is displayed When checked displays in the trace buffer window the cycle type F R W and EO E1 pin data When checked displays the data for the hardware probe bits in binary PROBEO 1 are connected to I O ports A and D with jumpers on many pods the jumpers may be removed and the pins connected to any valid logic signal for viewing in the trace buffer See the detailed section for your pod for further information Shows each bus cycle on a separate line frame when checked Instruction cycle type details are also broken out 4 17 EMUL68 PC Show time stamps Save trace as text Synchronize source Animating Trace setup Timestamping Sub menu Chapter 4 Trace Board Adds time stamp information on the far right of the trace buffer window The information can be displayed in four different formats
70. er and Call Stack windows File View Edit Run Breakpoints Config Registers Window Help Figure 2 13 Menu bar LE This selection changes local menu positions depending on the current window Registers shown Local menus are very handy they offer commands specific to the current window that are most often used They are a shortcut to working with the data displayed in the window While many of the commands available in local menus have shortcut keystrokes also the right mouse button is a handy way to access these features until the shortcuts you use the most have been memorized Just point the mouse cursor to the desired window and right click To select a window thereby choosing the local menu displayed use the Window selection from the menu bar explained below with the arrow keys or simply click the mouse in the desired window A left click will select the window a right button click will select the window and automatically open the local menu applicable to that window A right button click is the shortcut method to open a local menu Copyright 1997 ICE Technology 2 23 EMUL68 PC Chapter 2 Software User Interface Local Menu Program window Address Ctrl A Origin at program counter Ctrl O Available when the Program Set new PC value at cursor Ctrl N window is selected Module Ctrl F3 Function Ctrl F View source window Ctrl Toggle breakpoint F2 Figure 2 14 Local menu Program window M
71. ex 2 31 Path Setting 2 3 Paths 2 22 PIOC EGA bit 2 36 PIOC INVB bit 2 36 Pod Class 2 11 POD Boards 5 1 Port Address and model 4 7 PORTA 2 36 Pos 2 45 Post View 4 10 PPA Controls 4 21 Copyright O 1997 ICE Technology Index Fields 4 20 Window 2 44 PPA 2 23 Preferences 2 15 Probe 0 4 4 Probe 1 4 5 Processor field 2 11 Program Windows 2 37 Program Performance Analyzer PPA 4 19 Program statements add 1 6 Project 2 2 Creating 2 2 Name 2 22 0 Quick Start Instructions 1 5 R RAM value change 1 6 Read 2 43 Recently used file list 2 15 Registers Window 2 35 Relative Cycle 4 18 Time 4 18 Remove 2 28 Symbols 2 15 Remove 2 27 Repaint 2 32 Reserved 2 44 Reset 2 45 And Go 2 18 Chip after load file 2 13 Chip at start up 2 13 Chip 2 18 Emulator 2 12 Emulator 2 18 Reset and GO 1 5 2 12 Run Menu 2 17 Index 4 EMUL68 PC S Save Code As 2 15 Trace as text 2 30 4 18 SCSR 2 36 Search 2 17 Next 2 17 Next 2 30 4 17 Previous 2 17 Previous 2 30 4 17 Search 2 30 4 17 Set New PC value at cursor 2 24 2 25 Setup Instructions Quick 1 3 Setup 2 21 SFR 2 44 SFR space 2 37 Show All frames 2 30 4 15 4 17 Function 2 31 Load Info 2 15 Misc data 2 30 4 17 Probes 2 30 4 17 Time stamps 4 18
72. fer display window Also shown is the Show time stamps sub menu used to control the display format for time stamping frames The check marks indicate active display format controls See the following table for details 4 16 EMUL68 PC Trace Menu Commands Toggle trace speed bar Go to Beginning of trace buffer Go to End of trace buffer Go to Frame number Search Search next Search previous Find trigger point Show misc Data Show probes Show all frames HotKey Ctrl B Ctrl E Ctrl F Ctrl A Ctrl X Ctrl P Ctrl 0 Copyright 1997 ICE Technology Chapter 4 Trace Board Description Turns the trace speed bar at the top of the window below the button bar on or off The speed bar allows quick access to common trace functions and shows current trace status Positions the cursor highlighted line at the first frame captured in the trace buffer This is the oldest frame in the execution history Positions the cursor highlighted line at the last frame captured in the trace buffer This is the newest frame in the execution history Positions the cursor highlighted line at the requested frame Frames that are captured before the trigger event are negative post trigger frames are positive The trigger frame is frame number O f triggering is disabled or the trigger did not occur all frames are pre trigger and have negative frame numbers exc
73. h Previous CTRL P Find Trig point Ctri O Show misc data Show probes Show all frames Show time stamps Save trace as text Synchronize source Animating Trace Setup Figure 2 20 Trace Buffer window local menu Copyright 1997 ICE Technology Available when the Trace buffer window is selected Refer to Chapter 4 Trace Board for additional information on items available in this local menu e 2 29 EMUL68 PC Menu Commands Toggle trace speed bar Go to beginning of trace buffer Go to end of trace buffer Go to frame number Search Search next Search previous Find trigger point Show misc data Show probes Show all frames Show time stamps Save trace as text Synchronize source Animating Copyright 1997 ICE Technology HotKey lt Ctrl gt B lt Ctri gt E lt Ctrl gt F lt Ctri gt A lt Ctrl gt X lt Ctri gt P Ctrl 0 Chapter 2 Software User Interface Description Displays or hides the trace speed bar at the top of the screen The speed bar allows quick access to trace setup and shows current trace status Positions the cursor to the start of the trace memory buffer Positions the cursor to the end of the buffer Positions the cursor at the specified frame number in the buffer Searches the trace buffer for an address data cycle type or probe usually an I O port value Searches for next occurrence of search string fo
74. he A or B condition box See Figure 4 11 for a description of the box to add or modify a trace qualifier Use this button to edit an existing qualifier Highlight Edit the qualifier then click on Edit Alternately double click on the qualifier you want to edit Removes the selected qualifier Highlight the Delete qualifier then click Delete Resets the trace hardware Clears the trace buffer resets the counter and prescaler to zero and resets any pending loop counts to zero You should use this if you are using a loop count for triggering and have stopped the trace or emulator prior to the trace triggering This will clear the internal loop condition found count to zero and prevent the trace from appearing to trigger early due to accumulated loop counts Initialize Hardware I Conditions for Triggering and Filtering Each machine cycle of the 68HC1 1 s execution will present different address data and port information to the trace board We call the information from one such cycle a frame The largest features in the Trace Setup dialog box are the A and B conditions These are lists of qualifiers values to look for in each frame as it is collected The number of qualifiers that may be placed in each condition list is limited only by the memory available on your computer Each qualifier in list A or B includes bits for the address and data buses the external EO and E1 bits two groups of 8 bits for the probes and cycle ty
75. her words updating one byte uses a single bus cycle that is one byte wide If you display signed decimal ints two bytes are written for each value entered Copyright 1997 ICE Technology 2 36 EMUL68 PC Chapter 2 Software User Interface Symbols are supported but their type is ignored You may use symbol names in some operations such as positioning the data window cursor To locate the cursor to a user variable named timer sec you would right click in the DATA window to open the local menu then click on Address and enter amp timer sec in the dialog box This would position the cursor to the first byte of structure element timer sec EMUL68 PC Windows can access three address space types in the Data window Data SFR and Break Data space is where your code and user variables are stored The SFR space contains the CPU Special Function Registers for control of on board peripherals such as I O ports timers SCI SPI etc The SFR space also contains the INIT OPTION and similar CPU control registers When SFR space is displayed in the Data window it is shown relative to the current SFR starting address That is address 0 always refers to the first lowest SFR regardless of the physical starting address of SFR space Even if you relocate SFR space using the INIT register or you are using a CPU that maps the SFR space at a non zero location by default the SFR registers are always shown as beginning at 0 in the Data window
76. ht 1997 ICE Technology 4 1 EMUL68 PC Chapter 4 Trace Board 16 consecutive I O addresses see below is required No hardware interrupts or DMA is required The trace board typically requires 1 3A from the PC s 5 volt supply Before proceeding check that the PC s 5V power supply is sufficient most are to deliver the necessary current If it can t a larger power supply will have to be purchased from your dealer and installed VO Address Jumper s W5 configure the trace board s address in the PC s I O space The trace board address jumpers have been factory preset to 130 hex 130 while the emulator is factory preset to 120 This setting is appropriate for a typical system and was chosen to work without modification in most computers If your system is presently using any locations from 130 to 13F an alternate I O address location must be selected Once you have decided on an address change the W5 jumpers to select the new address and also be sure to change the trace board address field using the menu choice Config Trace to match your new hardware configuration Each pair of pins in the address header W5 represents one bit in the 10 bit address Address bits 0 3 do not have jumpers and restrict the user to selecting blocks of 16 10 consecutive required addresses The remaining upper 6 address bits are set with the jumpers A4 through A9 Shorting two pins represents a 0 in the address A pair of pins with no jum
77. in the 68HC11 data and reference books and replace the former opcode s and data with the new opcode s and data Note that the assembler will write as many bytes as required for the new instruction This may overwrite part or all of subsequent instructions causing unexpected results Be sure to examine the subsequent instructions as well as the new instructions for correctness Copyright 1997 ICE Technology 2 38 EMUL68 PC Chapter 2 Software User Interface Source Windows Current line next l for execution S set shown by triangle dies highlighted multi Cursor under m line statement Line number ae file 45 Pmain 46 strepy status TICKING 48 while 1 49 timer_delay 50 timer_func printf Time is d d d Zs timer hour timer min timer sec timer am_pm Figure 2 29 Source code window C source code shown The Source window displays the C source code of the current module The current module is the one into which the Program Counter PC currently points Assemblers which support Source Line Debugging many do not may also have their assembly source code not the disassembled code from memory as shown in the Program window displayed in this window Like a Program window a Source window displays the source text line numbers a cursor in this case a blinking underline and a small arrow between the line numbers and the source text to indicate the curren
78. ion jumpers you may need to change the value in this field The value defaults to 8 000 MHz corresponding to the crystal shipped with most pods The pod crystal is selected with the jumpers in the internal positions Copyright 1997 ICE Technology 2 10 EMUL68 PC Chapter 2 Software User Interface The Processor field chooses from a long list of supported controllers Select the entry for the HC11 processor installed in the pod See the POD Chapter in the EMUL68 PC User s Manual for a description of the various pods their jumpers and special instructions e f you have purchased a POD 11KE or POD 11KS and have replaced the chip in the processor socket on the pod with a socket adapter containing an HC11KA4 chip then you should select 68HC11KA0 4 not 68HC11K0 4 which would apply if you had not changed processors e Users of pods POD 11PS and POD 11PE should take care to use one of the two selections 68HC11P2 or 68HC11PA PH8 not 68HC11K0 4 even though the pod shows POD 11KE or POD 11KS The 11PE PS pods are modified versions of the KE KS pods Additional Options Pod Class selects between E expanded mode and S Single chip mode Expanded mode refers to using designated processor port pins for address and data bus signals In Single chip mode these pins are used for I O functions and there is no external address data bus The E S is contained in the middle of the pod part number i e POD 11E PLCC 3 0 This setting
79. is Rec Overflow Yes counter is saved as part of the frame and referred to as the Time Stamp for the Figure 4 4 Time Stamp setup frame Time stamps are optionally displayed in the Trace Buffer window as Absolute time or cycles or Relative time or cycles The maximum Time Stamp resolution is equivalent to the E clock period 4 foso The prescaler is used to reduce the resolution and thereby extend the maximum range of the Time Stamp counter to prevent overflow of the counter Increase the prescaler value to extend the maximum recording time of Time Stamps without overflowing the counter i e set the Prescaler to 32 to record with 16uS resolution 8 0MHz fosc and extend the overflow period from 33mS to 1 05S Note If you plan to use the time stamp feature be sure to set the prescale factor on the trace setup screen to something other than zero otherwise all time stamps will show as zero A value of one is the normal setting and provides maximum resolution The Overflow flag is used to detect and record Time Stamp counter overflow each time the counter wraps around from 65 535 to 0 When this flag is checked an overflow frame is recorded in the trace buffer and this extra frame is recorded regardless of the current filter settings The frames recorded as a result Copyright 1997 ICE Technology 4 7 EMUL68 PC Chapter 4 Trace Board of an overflow are marked with an O in the memory access type field of the
80. is subject only to the manufacturer s warranty Warning Always turn on the PC before applying power to the target Always turn off the target power before turning off the PC power Copyright 1997 ICE Technology e iii Table of Contents CHAPTER 1 INTRODUCING EMUL68 PC WINDOWS 1 1 Introduction to EMUL68 PC Windows e eere eese esses e esee enses enata enses ense ta sonata sesta sees tosta ro none sensns 1 1 How To Use This Manual P 1 1 If you are new to emulators of any Kind sessseseeesseseeeeeeee ener nennen enne enne 1 1 If you have used emulators with other microprocessors seeeseeeeeeeeeeeeeeee nee 1 2 If you are familiar with emulators MS Windows and the chip eere 1 2 Manual Conventions RR 1 2 Quick Installation Instructions ccssccccssssscssssscccssssccssssscccssssccsessccccscsscccesssaccsessceessssecscesssscseessseecess 1 2 System requirements oie eee oes Rees ee its Reseed eos Soo eerste See ae eee ae 1 2 Quick setup INSU CH ONS oer decent e RE GP ERE ERE REC E sessed ER ET CHE PE EUER E RRe deer tr ese 1 3 Installing The Emulator RR 1 3 Installing The Softwar e ccsscssscssscssscscscscssssssccsscssscssssssccsssesssesscsseceneessessnessecsseesscssscsssesssscsssessseees 1 3 Initial Software Configuration e sessesoessescosoesessoesesoessesoesossessossesoossesoessesee
81. k switching logic x v Banking Enabled Bank Signal Specification Bank Pattern Bank Pattern Bank add address area 0 0 7 8 rom 8000 g 11 Bank Select Byte 12 Address 90 13 Mask 7 14 15 Pod Signals Used For Bank ID BSW3 _ BSW2 vi El v EO v OK x Cancel aon c N Help Figure 2 5 Bankswitching Dialog Box shown with typical 4 bank setup The Banking enabled checkbox is used to enable bankswitching If this box is not checked then only 64K of non banked emulation memory is available similar to a non bankswitched emulator and the remaining fields on this dialog box are meaningless The Bank address area region of the dialog box allows you to define the range of the banked area within the 64K address space of the HC11 processor The From and To fields specify the lowest and highest address of the bank area respectively in hex Enter values from 0 to FFFF For example if you have a 16K bank area starting at 8000 you would enter 8000 in the From field and BFFF in the To field The bank area must start on an 8K boundary and must be a multiple of 8K in length in the range from 8K to 56K The Bank Select Byte region allows the user to define the address and individual bits whereby the user s program selects a particular bank This feature allows the user to display the contents of an arbitrary bank that was not selected when emulation stopped if the bank is located in target memory These shou
82. l D Address space Ctrl Space Figure 2 16 Local menu Data window Menu Commands Address Original address Edit HotKey lt Ctri gt A Ctrl 0 Enter Copyright 1997 ICE Technology Chapter 2 Software User Interface Description Positions the window to the specified address Positions the window at the current program counter value Sets the program counter to the address at the cursor Opens a dialog box that allows quickly positioning the cursor at the start of any module Opens a list of all functions loaded selecting one immediately positions the cursor at the function Displays the C call stack and passed parameters required to reach the current Program Counter value program address Only one copy of this window is allowed open at one time Opens or shifts focus to a Program window and positions the cursor at the current program counter value which may not be the code equivalent to the source line at the cursor Sets resets a breakpoint at the cursor Available when a Data window is selected Description Position the cursor to the specified address Scroll the selected Data window to the last address used in an Address menu command Edits the data under the cursor You may alternately position the cursor over the data and begin typing a new value a dialog box is e 2 25 EMUL68 PC Block move lt Ctrl gt B Fill lt Ctrl gt F Display as lt Ctrl gt
83. l in Chapter4 Trace Board Copyright 1997 ICE Technology 2 46 EMUL68 PC Chapter 3 Emulator Board Chapter 3 Emulator Board Please refer to the EMUL68 PC DOS User s Manual for details on the emulator hardware Copyright 1997 ICE Technology 3 1 EMUL68 PC Chapter 4 Trace Board Chapter 4 Trace Board Trace Board Introduction The EMUL68 PC emulator provides visibility into your code and the CPU It also gives you the ability to inspect watch and modify memory set breakpoints and view peripherals giving you total control over the debugging process However it does so only when emulation is stopped The EMUL68 PC optional trace board enhances these abilities by providing the ability to capture bus transactions in real time It captures a snapshot of your code as it executes showing such details as where your code was when an interrupt occurred the results of interrupt processing multiple interrupts of the same kind such as all of the characters in a serial packet interrupt execution order updates to variables execution times histograms of time spent in specific sections of code probe I O port values and loop iterations It does all of this in real time as your code executes at full soeed Moreover the trace conditions can be changed new data captured and the trace buffer viewed all without breaking emulation allowing multiple peeks into your code while it is running non stop The trace
84. ld only be set to non zero values if all or part of the bank switched memory area is in target memory The four checkboxes under Pod Signals Used for Bank ID are to identify which of the four possible bank signal inputs on the pod are actually connected Check the boxes associated with the signals on the pod that are connected to your bank select lines Chapter 9 of the DOS EMUL68 User s Manual describes how the Note This feature is not implemented in the current software release Set both the Address and Mask fields to zero for correct operation Copyright 1997 ICE Technology 2 8 EMUL68 PC Chapter 2 Software User Interface user must connect from 1 to 4 digital signals to the pod in order for the emulator to be able to correctly select banks in its own emulation memory while the user s program is running These signals are called BSWO BSW1 BSW2 and BSW3 from lowest to highest order and you must connect enough signals to uniquely identify each bank For example if you have only 4 banks then you would need only 2 signals BSWO and BSW1 must connect to pins labeled EO and El that appear on every EMUL68 PC pod The two high order signals BSW2 and BSWS are required if you have more than 4 banks and are usually soldered to pins 38 and 29 respectively on the pod s 50 pin cable connector Note If you use a POD 11KE POD 11NE or POD 11PE and you have more than 4 banks then signals BSW2 and BSW3 may be connected to external
85. lly undo the change be saved to the disk in the project file Creating a Project Users who change the software settings and THEN change the name of the project may believe the old project will remain unchanged In fact the moment a new project is created the current settings will be saved to the old project not the new project The new project will be saved when exiting the debugger or when changing projects again Copyright 1997 ICE Technology 2 2 EMUL68 PC Chapter 2 Software User Interface Set project name LX project defines a complete setup Delete item Figure 2 1 Project Name Dialog Box To add a project open the Set Project Name dialog box and type the new project name over the current name Because the project name is used as the root of a file name do not use characters in the name that cannot be used in a file name like a space character The new project will inherit all the settings from the old project Projects are deleted by highlighting the project name you want to be deleted and then clicking on the Delete item button Note The sample project myprojct is used throughout this manual EMUL amp 8 by NOHAU Corporation Proj MYPROJCT File View Edit Run Breakpoints Config Registers Window Help Figure 2 2 EMUL68 PC Title Bar The name of the current project appears in the main window s title bar which appears at the very top of the WIN68 background window See
86. lt CPU symbols 2 16 Delay 4 9 Delete 4 11 All 2 21 Dialog Boxes Other 2 42 Disable Copyright 1997 ICE Technology Index All 2 21 Display Debug info 2 34 Display as 2 26 E Edit 2 25 4 11 Edit 2 27 2 28 EEPROM 2 44 Emulation Status and Controls 4 22 Emulator Board 2 34 Default 1 5 Files 2 5 Hardware Configuration 2 10 Port field 2 10 Emulator hardware 2 22 Enable Code Space Limits 2 13 Enable memory readback 2 13 Evaluate 2 16 Dialog box 2 42 Exit 2 15 F File Menu 2 15 Fill 2 26 Filter 4 4 4 10 Conditions 4 10 Find Trigger point 2 30 4 17 Frames 4 4 Function 2 24 G Go 2 18 2 45 FOREVER 2 18 To beginning of trace buffer 2 30 4 17 To cursor 2 18 To end of trace buffer 2 30 4 17 To Frame number 4 17 To frame number 2 30 eIndex 2 EMUL68 PC To return address 2 18 To 2 18 H Hardware 1 1 Hardware Emulator Configuration 2 10 Help 2 45 Line 2 46 Menu 2 34 High Level Language Debugging Windows 2 40 Hot Keys 2 14 I I O Address 4 2 Usage Common PC 4 3 Icons Arrange 2 32 Index 2 34 Info 2 34 INIT 2 44 INIT2 Override 2 11 In line Assembler 2 38 Inspect 2 17 Window 2 40 Install Emulator 1 3 Software 1 3 Installation Instructions Quick 1 2 intRAM 2 44 Introduction EMUL68 PC
87. may have one or more variables displayed in contrast to an Inspect window which is limited to a single variable but do not permit expressions The second important difference is that you may change the value of a variable in an Inspect window but Watch windows are for display only Call Stack Window The Call Stack window displays the list of functions called to reach the current point in the application and the current value of parameters passed to them By default parameters are shown in the format appropriate for the variable type chars are shown in ASCII ints as decimal signed or unsigned as required and floats or doubles in floating point format Using the local menu you may select all parameters shown in hexadecimal format Clicking on the local menu item Show function will position the cursor in the source window on the function body for the function highlighted in the Call Stack window Other Dialog Boxes and Windows Evaluate dialog box This dialog box provides a handy programming aid It is opened from the View Edit menu using lt Alt gt VE or by the shortcut key combination lt Ctrl gt E The dialog box evaluates C syntax expressions Expressions may contain arithmetic operators 7 variable names indices address operator amp and structure operators gt Assignment expressions such as var 33 may be used to change the value of a variable including struc
88. mplex conditions set in the A and B dialogs permits very complex selective information capture Note that triggering will occur based solely on the A or B conditions and the Trigger Logic regardless of any filtering setup Condition Action No Trigger Disables triggering A Triggers when the A condition is met B Triggers when the B condition is met A then B Triggers after A condition followed by B condition are each met in turn in that order A loop Triggers after A condition is met n programmable times as set in Loop Count field Copyright 1997 ICE Technology 4 9 EMUL68 PC Chapter 4 Trace Board B loop A loop then B A then B loop Filter Filter ALL Post View Figure 4 9 Trace filter setup Triggers after B condition is met n programmable times as set in Loop Count field Triggers after A condition is met Loop Count times followed by B condition one time Triggers after A followed by B condition is met in turn Loop Count times The Filter dialog box selects what frames are captured Only frames meeting the conditions specified in the Filter field see below are recorded in the trace buffer The Post View field sets the number of extra bus cycles captured after each match of the trace filter The frame meeting the filter parameter and n more are recorded This is useful for recording multi byte instructions It is also very useful for recording a few frames after a R
89. mportant that the subroutine 2 17 EMUL68 PC Mask interrupts on step Animate Go Go to cursor Go to Go to return address Go FOREVER Break Emulation Reset emulator Reset and Go Soft reset get vector Reset Chip Ctrl F7 F9 F4 Ctrl F9 Alt F4 F9 lt Ctrl gt G Ctrl F2 Chapter 2 Software User Interface actually return to the address immediately following the JSR instruction or emulation will continue forever When checked the effect is to mask interrupts during single stepping to prevent unintentionally stepping into interrupt code when an interrupt is pending and enabled This flag has no effect while running Continuously single steps instructions or source lines updating all open windows after each step In the program window it steps an instruction at a time In the Source window it steps a source line at a time Begin execution from the current PC until a breakpoint is reached Begin execution from the current PC to the current cursor position or until a breakpoint is reached Execute from the current PC to the specified address Execute from the current PC to the next return instruction This is normally found at the end of a subroutine or function Execute instructions from the current PC after disabling all breakpoints Suspend execution as if a breakpoint was encountered Resets the emulator to i
90. must agree with the type of pod you are using BPROT Override when checked will attempt to write the specified 8 bit hex value into the processor s BPROT register within the first 64 cycles after a reset caused by the emulator This feature applies only to processors that have an internal EEPROM and a BPROT register to control it such as the F1 K4 and P2 Note Because of the default cycle stretching enabled after reset in expanded mode for the K family the emulator is not able to write to the BPROT register for the K family within the first 64 cycles To change EEPROM values from the emulator for the K family start the processor in test mode by clicking on the Test Mode After Reset checkbox The BPROT override option will work in test mode as the 64 cycle limit is not imposed You will then be able to modify EEPROM by entering a new value for EEPROM locations that appear in a DATA Window INIT2 Override field only applies to those processors that have an INIT2 register such as the K KA N and P families If your program writes to the INIT2 register to move the locations of the internal EEPROM then enable the INIT2 Override feature by clicking on the Enable checkbox Also enter the value that your program writes to the INIT2 register in the Value field Test Mode After Reset when checked places the processor in Test Mode after a Reset If the box is not checked the processor will enter expanded normal operating mode Note that if you have
91. n number of the emulator s internal STR file LUT A lookup table used by the emulator to find memory blocks that have no internal memory Reserved This field is reserved SFR The range where the emulator has determined that the SFR s are located intRAM The range where the emulator has determined that the internal RAM is located EEPROM The range where the emulator has determined that the EEPROM is located A range from 0 to 0 implies the EEPROM is not enabled INIT The emulator s latched copy of the low order 4 bits of the INIT register which define the 4 high order address bits of the SFR registers locations Button Bar Ready Help Reset Step StepOver Go Pos Clock 0 1351 cy Figure 2 31 Emulator Button Tool Bar Just below the menu bar is the Tool Bar containing icons or buttons that like Hot Keys execute frequently needed menu options when clicked At the far left the current emulator status is shown At the far right is the cycle count which is the total number of E clock cycles since emulation was started or the cycle counter was reset by the user This count may be changed to display elapsed Copyright O 1997 ICE Technology 2 44 EMUL68 PC Chapter 2 Software User Interface time rather than cycles by choosing the Config Convert cycles to time menu option The displayed time is computed from the cycle count and depends on the user correctly setting the Crystal Frequency field from the
92. ndow is allowed open at one time Opens a dialog box that evaluates C syntax expressions Expressions may contain arithmetic 3 6 6 kI G operators variable names indices address operator amp and structure operators gt Assignment expressions such as var 33 may be used to change the value of a variable including structure and array members Opens a dialog box that writes a value to a memory address but does not perform a read back to verify the action Normally values written to memory are read back for verification This feature prevents errors if poking a value to a peripheral device or register that does not return the identical value just written when read 2 16 EMUL68 PC Chapter 2 Software User Interface Inspect lt Ctri gt Open a dialog box that displays the contents of a single variable structure or array in detail An inspect window can also be opened by double clicking on the name of a variable or structure member in the source window Add watch point lt Ctri gt W Open a child window that displays groups of variables that are updated every time emulation stops Search lt Ctrl gt S Allows searching the active window for the kind of data displayed in that window Search Next Ctl X Find the next occurrence of the search string from the cursor forward Search Previous Ctl P Find the next occurrence of the search string
93. ne 1 6 2 38 At 2 21 Copyright 1997 ICE Technology Index INDEX B B condition 4 9 4 10 B loop 4 10 Bank Address area 2 8 Select Byte 2 8 Signal Specification 2 9 Banking enabled 2 8 Banking setup 2 22 Bankswitching Setting Up 2 7 Bin Controls 4 23 Bins 4 20 Block move 2 26 BPROT Override 2 11 Break 2 45 Emulation 4 8 Now 2 21 Break Emulation 2 18 Breakpoint Delete 1 6 Make inactive 1 6 Breakpoints Class 1 2 19 Class 2 2 19 menu 1 5 2 19 Breakpoints Special Conditions 2 19 Button Bar 2 44 Buttons Speed 2 7 C C call stack 2 16 Call stack 2 25 Call Stack Window 2 42 Card Installation 4 4 Cascade eIndex 1 EMUL68 PC Windows 2 32 Clock 0 2 45 Close 2 33 Color 2 22 Config Menu 2 22 Menu 2 1 Config Bankswitching 1 5 Config Colors 2 14 Config Convert cycles to time 2 45 Config Emulator Hardware 2 10 2 45 Config Memory Map 1 5 Config PPA 4 20 Config Trace 4 2 Connect Reset To Target 2 11 Controls Miscellaneous 4 23 Convert cycles to time 2 22 COP Kicking Enabled 2 12 Copy To clipboard 2 16 Count 4 21 CPU Speed 4 7 Crystal Freq 2 10 Crystal Frequency 2 45 Custom Display Format 2 36 Cycle 4 4 Cycle Stretching Disable 2 12 D Data 4 4 Windows 2 36 Debug Information 2 44 Defau
94. oard computer device under test etc Always turn off the target power before turning off the PC power Installing The Emulator Installing the emulator board is much like installing most other AT style boards 1 Turn off the power 2 Remove the PC cover 3 Remove the slot cover if present for an available 8 bit slot 4 Insert the emulator board into the slot and use a screw to secure the emulator 5 If optional trace board is present insert the trace board into an adjacent 8 bit slot then connect the supplied short ribbon cable between the two boards Unless you will be installing a trace board you can now close the PC s cover 7 Attach the ribbon cable to the emulator and the pod observing correct orientation of the connector keys 8 Remove any anti static foam from the pins on the bottom of the POD and or adapter before applying power 9 Before attaching the pod to your target it is a good idea to power up the PC install the WIN68 software and run one of the supplied example files in the Examples subdirectory Installing The Software To install this software under MS Windows 3 x run SETUP EXE by typing win a setup at the DOS prompt or from within MS Windows by selecting the RUN item in the Program Manager File menu and typing a setup as the file to run Copyright 1997 ICE Technology 1 3 EMUL68 PC Introducing EMUL68 PC Windows To install this software under Windows 95 Open the My
95. ow is selected because most source lines compile into multiple machine instructions If the animation is running faster or slower than you expect or if single stepping executes more or fewer instructions than you expect visually confirm that the selected window is the one you want to be selected If in doubt about which window is selected click on the title bar of the window you wish to be selected High Level Language Debugging Windows Three more child windows used for high level debugging in C are available the Inspect window the Watch window and the C Call Stack window These windows are opened by selecting their respective items in the View Edit menu Like the other child windows selecting or opening one of these windows will bring a corresponding unique local menu selection up between the Config and Window menus Local menus may also be activated with a right mouse click in the corresponding window Inspect Window The Inspect window displays a single variable and allows you to modify it Inspect windows may be left open during emulation and are updated each time emulation stops The variable being displayed may be part of an expression written using C syntax and following the rules of C that produces a single scalar answer or the name of a structure union or array Copyright 1997 ICE Technology 2 40 EMUL68 PC Chapter 2 Software User Interface Note If you have an open Inspect window with an expression that includes an
96. pe Each bit is either a 1 0 or don t care For each machine cycle executed by the HC1 1 the trace board compares the recorded 64 bits for the current frame with the conditions in lists A and B These comparisons produce boolean results either a true or a false Each qualifier in the condition list consists of seven separate fields ADDRESS EO E1 CYCLE DATA PROBEO and PROBE1 On all pods except POD 11S PROBEO is connected to PORTD and PROBE1 is connected to PORTA with jumpers see the appropriate description for your pod in the EMUL68 PC User s Manual for further details By removing the jumpers the user can connect any Copyright O 1997 ICE Technology 4 11 EMUL68 PC Chapter 4 Trace Board logic signals to the trace PROBE bits and they will be sampled at the same time the other trace signals are captured Comparisons are made for each field of each qualifier within a given condition list A or B separately Bits are either 0 1 or x don t care The result of each comparison is by definition TRUE or FALSE To be true each field comparison has to match exactly with the current data from the active machine cycle The result of the comparison within each field is OR ed with the result of comparisons for that field in the other qualifiers in the given condition list A or B The result of this comparison is a TRUE or FALSE for each field All fields must then also be TRUE for the condition to be met and result in a
97. per represents a 1 Settings from 100 to 3FF are possible but many addresses are predefined in the PC either by IBM originally or by convention see table below The table below shows how a typical PC system uses its I O address locations Your PC configuration will have some but rarely all of the devices listed below allowing you to configure the emulator and trace boards in your system If you are unsure of the locations available there are several commercial software utility programs available to assist you in identifying the hardware and resources in your system On systems with MS DOS V6 0 or greater Microsoft supplies a DOS based diagnostics utility msd that will aid you Windows 95 users can use the My Computer Properties facility to discover addresses of installed hardware components Copyright 1997 ICE Technology 4 2 EMUL68 PC Chapter 4 Trace Board Common PC I O address usage Most installations can use the factory set default address 130 Use this table to help in choosing an appropriate alternate I O address if required for the trace card Hex Location 000 OFF 1FO 1F8 200 207 210 213 220 22F 238 23F 278 27F 2B0 2DF 2E0 2E7 2E8 2EF 2F8 2FF 300 31F 320 323 330 331 360 36F 3458 3E 380 38F 3A0 3AF 3B0 3BB 3BC 3BE 3C0 3CF 3D0 3DF 3E8 3EF 3F0 3F7 3EF8 3EE Typical Use Used by system Hard Disk
98. ppropriate drive From Windows 95 start the My Computer facility by double clicking on the My Computer desktop icon select the disk drive that contains the installation disk by double clicking on the drive icon then double click on the Setup icon Alternatively you may select Run from the Start menu button then Run from the list then enter A setup in the dialog box that appears When SETUP EXE has started a dialog box will ask for a directory for the EMUL68 PC Windows software Either accept the suggested directory C WIN68 or enter a different one SETUP will copy files from the floppy to the hard disk directory specified and modify the configuration information stored in the file EMUL1 1 INI as needed For windows 3 1 users the installation program will install the WIN68 icon in the NOHAU program group Double clicking on the emulator icon will start the emulator application You may move the icon to another group if desired by using the Move menu item in the Program Manager s File menu or alternately by dragging the icon to the new group For Windows 95 users the setup program will add a NOHAU menu selection item to the Programs list available from the Start button The NOHAU menu selection will open a sub list of available applications programs Click on the WIN68 item to start the EMUL68 PC Windows application In other words click Start select Programs select NOHAU click on WIN68 Configuring The Software This section
99. roblem in test mode because the COP is then automatically disabled even if NOCOP is set to zero It is recommended that this box be checked when using a D family processor or whenever the NOCOP bit in the processors CONFIG register is set to zero Cycle Stretching Disable when checked disables cycle stretching in processors that support it All K family parts except KA The KA family does not have this feature and if you have replaced the K processor in a POD 11KE or POD 11KS with a KA part this checkbox does not apply After reset in expanded mode K family processors effectively double the length of each bus cycle that accesses memory outside the chip Such cycle stretching can be disabled by writing a zero to the clock stretch control register CSCSTR at location 5A The emulator will work with cycle stretching enabled but response time for operator commands and emulator initialization are effectively doubled This may result in uncomfortable delays depending on the emulator type and crystal speed Note For the current release if you use a POD 11KE with a KO K1 K3 or K4 processor in the pod as is the default shipping configuration and enable bankswitching you must check the Disable Cycle Stretching checkbox in the Emulator Hardware Configuration dialog box Note For 68HC11K0 4 users only When checked the emulator will write a zero to CSCSTR to disable cycle stretching after each reset that it initiates with one important ex
100. rt timer func timer delay main check timer v Active End Not operational Adds the specified address range bin to the PPA window small write Figure 4 17 Adding bins to PPA display This dialog box pops up when you select the Add button in the PPA window It allows you to assign user selected address ranges to PPA bins and specify whether the range is active or inactive The specified address range is used for the next available PPA bin in the PPA display window The example shown is from the demo a07 program A list of the functions in your program is automatically displayed when this dialog box opens Note that you must stop the PPA to Add or modify a bin in the PPA display The Length field controls how the End field is used When checked the End field displays the length Without a check in the Length field the End field displays the end address in hexadecimal notation The Active field determines whether or not a defined bin is counted in the statistics By making a bin inactive you can ignore it for a PPA run without deleting and then adding again later it permitting quick temporary PPA configuration changes 4 24 EMUL68 PC Chapter 4 Trace Board Example Adding a PPA Bin As an example to add a bin corresponding to the main function double click on main in the function list then click on the Add button Note that clicking once on main will highlight it but not update the Sta
101. rt and End fields with the values for main Also note that double clicking does not actually add the bin You must click on the Add button to add the bin to the PPA window display With the Address Range dialog box open you may add as many bins as you like before clicking on the Done button to close it Copyright 1997 ICE Technology 4 25 EMUL68 PC Chapter 5 POD Boards Chapter 5 POD Boards POD boards are used to adapt the EMUL 68 in circuit emulator card to specific 68HC11 target processors Information on POD boards is not included in this manual at this time Please see Chapter Six of the EMUL 68 DOS User s Manual for information on pods for the 68HC11 processor Copyright 1997 ICE Technology 5 1 EMUL68 PC Chapter 6 Accessories Chapter 6 Accessories This section is incomplete Please refer to the EMUL68 PC DOS manual for further details Copyright 1997 ICE Technology 6 1 EMUL68 PC 4 21 A then B loop 4 10 A A amp B condition 4 10 A condition 4 9 4 10 A loop 4 9 A loop then B 4 10 A then B condition 4 9 Absolute Cycle 4 18 Time 4 18 Accessories 6 1 Active 4 21 Add 2 27 4 11 Watch point 2 17 Add 2 28 Address 4 4 Range 4 21 Address space 2 26 Address 2 24 2 25 Addresses 2 6 All 2 43 4 10 Analyzer Status and Controls 4 22 Animate 2 18 Animating 2 30 4 18 Assembler In li
102. rward from cursor Searches for previous occurrence of search string backwards from cursor Positions cursor at trigger condition trigger frame in buffer Displays or hides time stamp counter overflow and EO E1 pin data in frames Displays or hides probe data in frames Probes are by default connected to I O ports see pod documentation for details When off default instructions which produce multi byte reads writes or fetches are shown on one line When on each frame bus cycle is shown as a separate line Displays or hides timestamp information in frames Timestamps may be displayed in Absolute cycles Absolute time Relative cycles or Relative time from the sub menu displayed Opens a dialog box where you specify a file name and starting and ending frame numbers then saves the selected portion of the trace buffer to the file in ASCII text format suitable for printing Synchronizes cursors in the Program and Source windows to the highlighted instruction in the Trace Buffer window Scrolls slowly through the trace buffer This allows an instant replay of the execution history just captured If Synchronize Source is checked the Program and Source windows will track the e 2 30 EMUL68 PC Chapter 2 Software User Interface instruction currently highlighted in the trace buffer window Trace setup Opens the Trace Setup dialog box This dialog box may also be opened by clicking on Setup on the Trace
103. s 1 breaks in that they can specify an address or address range and one of six combinations of cycle type and the signal on the EO pin Class 2 breaks will cause emulation to stop before the instruction at a breakpoint is executed only if the breakpoint specifies an opcode fetch type breakpoint and if it is detected during the fetching of the first byte of an 3 This is the type of break defined using the current EMUL68 DOS software when the user presses F10 or clicks the mouse on a source line or disassembled instruction in the code window Copyright 1997 ICE Technology 2 19 EMUL68 PC Chapter 2 Software User Interface instruction Note that only Class 1 type breaks are highlighted in the Source and Program windows See the description of the Special Conditions dialog box on page 2 42 of this manual for further information The address sub field of a Class 2 break can specify a single address or a range of addresses and can be expressed in one of three acceptable forms as shown below The terms expr1 and expr2 represent C expressions involving operators symbols and or hexadecimal constants There are two other key words permitted to is used to describe a from to range between two numbers and len used to describe a length No spaces are permitted in the expressions between symbols operators and constants but spaces are required on each side of the words to or len 1 expri a single address specified by expr1 2 expri
104. s loading the debugger will first look in the path specified in the binary file for source files when updating the Source window The second field Source paths identifies other directories to search for missing source files not identified in the object file or files moved since the compile The directories in this field must be entered by the user Once entered directories will stay here until removed by the user The small check box when checked will tell WIN68 to look for source files in the Load path directory as well Simple projects may have all the source and object files in the same directory the Load path and may not need any directories in the Source paths field Note The ext field specifies the source file extension If your C modules have the extension c enter that To see assembler source asm in the Source window enter asm Copyright 1997 ICE Technology 2 4 EMUL68 PC Chapter 2 Software User Interface Emulator Files The Path to internal emulator files field will contain the path where the emulator s internal program and data files STR and SYM are installed By default this field is set during the installation process to the STR_SYM subdirectory below the directory where WIN68 is installed on your hard disk and will probably not need to be changed If you copy or move the EMUL68 PC Windows software to a new directory or drive you must change this field accordingly to reflect
105. ses just a single bit The register or bit names placed in the window for display are saved as a part of the project file and restored when the emulator is started Each eight bit register is displayed with its address mnemonic and current value in hexadecimal and binary Individual bits are displayed in binary only Note that the address is the offset from the start of the Special Registers space not the absolute physical address For instance the SCSR register is always shown as address offset 2E although in many HC11 variants the physical address of this register is 102E by default This is true even if the user has relocated the starting address of the register space by reprogramming the INIT register in processors that support this feature Copyright 1997 ICE Technology 2 35 EMUL68 PC Chapter 2 Software User Interface Shown in the example above are the following registers Register name Address Value shown in example above PORTA 0000 00 I O port A SCSR 002E CO Serial Comm Status Reg PIOC EGA bit 0002 0 binary Parallel 1 O Control Reg PIOC INVB bit 0002 1 binary Parallel I O Control Reg Data Windows EDATA TET xd The Data window provides 2000 OA OF 1E 64 2D OA 11 00 a awol ne eee E memory space Use Data 2008 64 2E 54 49 43 4B 49 4E windows to examine or 2010 47 00 00 00 C1 A4 D5 08 modify emulation or target 2018 86 TF HE 75 FB TF 2B OC memory directly Asterisks 202
106. set button was the last one clicked resetting the microcontroller and waiting for you to begin emulation by clicking on Run Starts the emulator running your program The emulator must be running to collect cycles for analysis Does not effect the elapsed time or total cycle counters Halts program execution by stopping emulation Does not effect the Stop elapsed time or total cycle counters If the Analyzer is running the Time Elapsed counter will continue to run but no bus cycle information is collected and the count and percentage fields will not change Resets the microcontroller and waits for you to begin emulation by Reset clicking on the Run button Same effect as Run Reset Chip Emulation status will change to Just Reset Analyzer Status and Controls Analyzer This box shows you the current Program Performance Analyzer status Running the PPA is collecting bus cycles for analysis and updating the Time Elapsed and Total fields Stopped the PPA is not collecting bus cycle information and bins and other fields are not being updated or Just Reset shown which indicates the analyzer Reset button was the last one clicked which resets all bin counts percentages and other PPA fields to zero Just Reset Starts the PPA running and collecting bus cycles The collected Pun information is analyzed and used to update the bin counts percentages and other PPA fields Starting the PPA will reset the Time Elapsed counter
107. soesessossesossseseessesessossesssssesoesse 1 4 Quick Start Instr ctioris 5 i ede eese eee sa teet eee ee oboe A A AN 1 5 To load and execute a programines ionen o e ee EEEN nen anar one none enne eterne enne enne entere tenen 1 5 To seta breakpotnt ere ep RERO EE ERROR a De tp rie i Dr REIHE e steeds 1 5 Tomake a breakpoint In ctiVe six eoe Ui ii 1 6 To delete a Breakpoint ias ienero eriei e i Uie EU Rt Ite cd ee oe alae 1 6 To use the in line assembler to add program statements sess 1 6 To change a RAM value ecce obe e D UH SR TDI Rh E stesbcodeeescpheseysbcnssedseseaseess 1 6 CHAPTER 2 SOFTWARE USER INTERFACE c creeeeeeeeee 2 1 Detailed Software Installation Instructions eee eee eee esee entente tnn n stata ansia satiata sine to tasas 2 1 Configuring The Software sssssssssssessessssessessssessessssessessssessessssessessssessessssessesessessesessessesessessesessesees 2 1 A tissosa n asesi a rensas aeetis eaS seare Sco seevae Seseo basoa Sosse s asee eissi esa toas 2 2 Creating a Project icissesscenssessiasssvassosisecesore sess sonseasseassuscovessussudsenvddesesnoaswad seas sodessoosadoenseasdonsseassavasvastessensesons 2 2 Setting The AAA TN 2 3 Object PUES rettet eO EER POR DOPO DR OR RES needs 2 4 SOCS PILES ys C EE 2 4 Emulator Files ai p 2 5 EA OO 2 5 KIznnpaljcrul udi Y 2 7 Emulator Hardware Configuration
108. ss is highlighted reverse video there is a breakpoint at that address The second column is the hexadecimal value contained at that address which may be a single or multi byte opcode Between the address and the hexadecimal data may be an arrow pointing to the right indicating the current program counter This is the next line to execute The third column contains the disassembled instructions and operands This is the actual disassembly of the current memory contents Program windows can control emulation You may set or inactivate a breakpoint by clicking on the address To set a breakpoint click once on the address portion of the instruction where you want the break the address will be highlighted Clicking again will deactivate the breakpoint Alternately you may click once on the desired instruction to highlight that instruction and then click on it again to highlight the address To delete the breakpoint as opposed to disabling it use the Breakpoints Setup menu In line Assembler The in line assembler is easy to use simply highlight the instruction or address you wish to change in the Program window and begin typing the new instruction s and data The first character typed will automatically open an Edit dialog box to input your changes and allow you to edit your assembler source line Once the source line is as you want it press Enter The in line assembler will translate the input line according to the syntax described
109. sscoscsvcssessevascssessocassenscessosvcesesiedesscoeedonsascadensosessensesevessossesenes 4 11 Conditions for Triggering and Filtering cccccsccssscsscscsssssssssscssscssscsesssecsscssecsseesssssesssesssssssseees 4 11 Adding a Tr ce Qualifier ec ere hte ete tete de ee e eet tee E ANE URS 4 12 Trace Butler Display NA 4 15 Trace Local Du M 4 16 TPimestampimg Sub meny ioter petere rte ee eager be eade re edebat E EERE EEEE S Eei 4 18 Trace Speed Bar e 4 19 Program Performance Analyzer PPA scccsscssssssssssscssscssscseccscsecssscssesssssscssssssssssssssesssessseeseeees 4 19 PRA BIG GS eee POE De DO DIR D oa RO E CREER TREO 4 20 PPA Controls cdi t e epit rer esee ples 4 21 Emulation Status and Controls iseer aenn ea e a e EE e e E e Eaa aeea 4 22 Analyzer Status and Controls esin a A EE N non E E E AEE IA atas 4 22 Bin Controls iene EE 4 23 Miscellaneous Controls ierit A rie 4 23 Adding User Defined BINS ec eec aea o nE o ede eui i eerte E E ants 4 24 Example Adding a PPA Bin ener trennen trennen reete a enne enne ra 4 25 CHAPTER 5 POD BOARDS ici 5 1 CHAPTER 5 ACCESSORIES iria 6 1 Copyright O 1997 ICE Technology e vi EMUL68 PC Introducing EMUL68 PC Windows Chapter 1 Introducing EMUL68 PC Windows Introduction to EMUL68 PC Windows EMUL68 PC is a PC compatible computer based in circuit emulator for the Motorola 68HC11 8 bit family of
110. t Program Counter value You may use the mouse or arrow keys to position the cursor then use lt F4 gt to execute your program to the current cursor position in the same way as in the program window Breakpoints are indicated by highlighting reverse video the entire line s You may set and reset breakpoints by clicking on or to the left of the line number near the left border or alternately by pressing F2 on the current line indicated by the underline cursor You may only set breakpoints on lines which produce executable code in other words you cannot set a breakpoint on a comment only line Occasionally when you click on a line to set a breakpoint you will notice that several lines become highlighted as in the example above This is because in some cases several lines of C code resolve to a single execution point in the program code This is the case with multi line statements and lines which produce no code such as the label main and the subsequent opening brace An example of a multi line statement is shown above in Figure 2 29 where the printf statement is on two source lines but is actually a single C source statement terminated with a semi colon After each single step and during each animation pause the Source window scrolls to show the source line that generated the instruction pointed to by the Copyright 1997 ICE Technology 2 39 EMUL68 PC Chapter 2 Software User Interface new Program Counter if it was g
111. tional Trace board Display debug info Displays internal emulator information For further Info details see page 2 42 Displays the version number and date Please have this information handy when calling technical support Child Window Types The Details There are nine primary child windows created by the EMUL68 PC Windows application Program Source Data Registers Special Registers Trace Buffer Watch Inspect and Call Stack Seven are opened from the Window Open a new window menu the Inspect and Call Stack windows are opened from the View Edit menu The Watch window may be opened from either the Open a New Window menu or the View Edit menu Any number of child windows may be open at the same time Any number of child windows can overlap but only one child window is active selected or has the focus at a time Each child window has a corresponding local menu whose name appears on the menu bar between the Config and the Window items The local menu contains items that make sense within the context of that window Following is a description of all local menus All windows may be resized and relocated as desired to fit your debugging environment Some may be scrolled and resized to view any address desired Using the Config Color menu you may change the color for each type of Copyright 1997 ICE Technology e 2 34 EMUL68 PC Chapter 2 Software User Interface window to suit your tastes Window locations sizes
112. ts initial state which includes resetting emulator registers memory mapping and reloading the STR and SYM files All user symbols are deleted Reset hardware CPU and begin execution The reset lasts approximately 0 5s This form of Go should be used initially if your code writes to any registers that are locked after the first 64 E clock cycles in expanded mode Load the reset vector into the program Reset CPU without executing any instructions This has the same effect as pressing the reset button on the pod Some compiler optimizations may prevent this feature from being available during portions of program execution Copyright 1997 ICE Technology 2 18 EMUL68 PC Chapter 2 Software User Interface Breakpoints Menu ERES Config Registers Toggle F2 At ALT F2 Setup Disable all Delete all Special Conditions Break now Ctrl C Figure 2 11 Breakpoints menu Class 1 Breakpoints The Breakpoints menu allows you to set and reset breakpoints in your code There are two fully independent mechanisms for defining deleting and toggling breakpoints For this reason breakpoints are divided into two classes Class 1 and Class 2 Class 1 breakpoints are set and reset using a variety of techniques in the Program and Source windows Class 2 breakpoints are only available using the Breakpoints Special Conditions dialog box Both are implemented in hardware and thus will work for
113. ture and array members To use this as a quick calculator do not enter an equals sign i e to subtract hex 20 from hex 7A enter Ox7a 0x20 and press lt Enter gt the answer appears in the lower field Numbers may be entered in any C format except float only integers are evaluated Copyright 1997 ICE Technology 2 42 EMUL68 PC Chapter 2 Software User Interface Special Conditions Class 2 breakpoints dialog box Define Breakpoint x Address Range Cycle Type From All Opfetch amp E0 0 iibi Read Opfetch amp E0 1 To Write Opfetch 6003 Z Figure 2 30 Special Conditions Breakpoints dialog box This dialog box allows the user to define Class 2 only breakpoints It is accessed from the Add button in the Breakpoints Special conditions dialog box The dialog box allows the user to enter an address range or a single address when the From and To fields are set the same The cycle types may also be specified see below A break occurs on a bus cycle whose address falls within the specified range and the LIR R W and EO signals match the specified conditions See page 2 19 for further information on breakpoint Classes Cycle Type Description All Any valid bus cycle type Cycle Type don t care Read Any valid Read cycle which includes both data and opcode reads Note that for multi byte opcode fetches only the first byte fetched is an Opfetch cycle bytes 2 and any data
114. un it In the event of difficulty please refer to the detailed instructions for installing the hardware and configuring the software in other chapters in this manual Note When connecting to your target the emulator configuration pod jumpers and switches and software configuration parameters may require modification Please recheck these settings and other options in these dialogs for correctness as well as the Config Bankswitching dialog box if you have a bankswitching emulator prior to connecting to your target Thank you Quick Start Instructions This section describes how to quickly start using EMUL68 PC Windows to debug an existing program or target board once the EMUL68 PC hardware and software are installed If the Quick Installation instructions do not work you will most likely need to adjust either the hardware jumpers the software configuration or possibly both Please refer to the appropriate chapters of the EMUL68 PC User s Manual for setting the jumpers on the emulator board the trace board or the pod To load and execute a program 1 Select Load code from the File menu and identify the file to load using the dialog box 2 Select Reset and GO from the Run menu or click on the RESET and GO buttons in the tool bar in that order To set a breakpoint 1 Click once on the line number for the source line in any Source window You may only set a breakpoint on a source line that causes instructions to be generated
115. ut brackets and element reference To quickly traverse a linked list of structures double click on the pointer to the next element in the list To view a structure union or array within a structure double click on it s name Watch Window The Watch window displays one or more variables and is very useful for examining variables throughout a debugging session Only one watch window may be open at a time The contents of the Watch window are updated each time the emulator stops The Watch window displays one variable per line Any local variable in the Watch window that is not in scope will be displayed with three question marks instead of its value To open a Watch window use the Window Open a new window watch points menu selection or the View Edit menu by selecting Add a watch point then use the right mouse button to open a Watch local menu then click Add and fill in the dialog box with a variable name Alternately you may place the cursor on the desired variable and press lt Ctrl gt W this will open the Add dialog box automatically and place the variable in it press the Enter key or clicK OK with the mouse and a Watch window will appear If a Watch window is already open the specified variable will be added to it Copyright 1997 ICE Technology 2 41 EMUL68 PC Chapter 2 Software User Interface Watch windows have two important distinctions when compared with Inspect windows The first is that Watch windows
116. when set to display SFR space This feature displays SFR register addresses at the same locations referenced in the Motorola M68HC11 Reference Manual whether they have been relocated or not saving the programmer the inconvenience of translating addresses when viewing the SFR s Program Windows Current line next to execute shown by triangle Immediate data Address hex Disassembled instruction Memory contents hex raqram Prag 06014 CE6433 main 6433 06017 Cursor 06018 CC2004 200A 0601B BD6122 JSR strepy Tenens 0601E 38 PULX branch or 0601F 01 70004 NOP jump 06020 8D24 BSR timer_delay 06022 8D3E BSR timer func Breakpoint SU SEA rE2003 LDX 2003 3C Figure 2 28 Program window showing disassembled memory user code Copyright 1997 ICE Technology 2 37 EMUL68 PC Chapter 2 Software User Interface A Program window disassembles and displays code memory It also features a built in assembler for quick program edits The current line in the Program window is always highlighted This is known as the cursor Use the cursor to set and reset breakpoints set the program counter and invoke the in line assembler By moving the cursor to a line then pressing lt F4 gt Run Go to cursor your program will execute to the cursor by automatically setting a temporary breakpoint at the cursor and running your program The first column is the hexadecimal address If the addre
117. y equivalents That is there is some combination of function keys character keys and modifier keys Control Shift or Alt keys to select most menu items The Hot Key for each menu item is shown in that menu to the right of the item name and are also shown below Where you see AIt RF as the keyboard shortcut you should type lt Alt gt R hold the Alt key down while you then press the R key to open the Run menu then press the F key without the Alt key to activate the feature of EMUL68 PC Windows that begins emulation without enabling defined breakpoints Holding down the Shift key or turning on CapsLock is not necessary Even though the keyboard shortcuts are all shown in capital letters the shortcuts are not case sensitive Control key combinations are shown as either lt Ctrl gt X press and hold the Ctrl Copyright 1997 ICE Technology 2 14 EMUL68 PC Chapter 2 Software User Interface key while pressing the X key or alternately X Function keys are shown as lt F1 gt other keys such as the Delete key are shown by lt Del gt File Menu View Edit Run Breakpoints C The File Menu controls the loading and saving Load code F3 Load default CPU symbols Save code as Remove symbols Show load info Preferences of code your executable the loading of symbol information used in debugging your module function and variable names etc and their locations You may also set your prefer
118. your program spends in each bin Bins are often defined as single functions or subroutines and allow you to quickly see where your program is comparatively spending it s time There is also a default Miss bin which records cycles spent outside of your other defined bins You must have the optional trace board installed to utilize the PPA features Performance Analysis is a statistical analysis of execution behavior Once each second bus cycles are collected sorted into their respective bins and the results are displayed on the screen as percentages The percentage of cycles that are collected depends upon the speed of your PC and what other tasks are running etc We recommend running Win68 by itself to obtain the highest accuracy possible To produce more accurate results run your program for longer periods of time or at slower clock rates If you watch the percentage values on the screen you will see them change quickly at first then more slowly When the percentages of cycles in each bin change very slowly you can assume that the percentages shown are as accurate as possible Copyright 1997 ICE Technology 4 19 EMUL68 PC Chapter 4 Trace Board Program Performance Analyzer Emulation nea Stopped Stopped Stop ETE ed Stop ES Bins Active Address Range count F172 TO F1F7 check_timer FOB1 TO FOE6 main FOE7 TO Fl 4 timer delay F105 TO F171 timer_func Time Elapsed 000 00 00 10 Total 98760 100 00
119. ystrokes most often used in the active window This context sensitive help is turned on and off with the Window Toggle help line selection You can get a small amount of displayable area back with this function disabled after you become familiar with emulator s operation Trace Speed Bar Stopped Trace setup sia malo trig ey EN 7 Figure 2 32 Trace Speed Bar for rapid access to trace setup and display The Trace Speed Bar allows quick access to the most common trace functions The trace board is optional and for further information about the trace card see Chapter 4 Trace Board This bar is enabled by using the local menu item Toggle trace speed bar from the Trace Buffer window s local menu At the far left of the bar the current trace status is shown in the example shown tracing is Stopped This indicates the status of the trace board i e tracing stopped and not the emulator With tracing started you must also run the emulator to collect information In the rightmost box is shown the frames counter this is the number of frames collected that meet the trace filter conditions Next to this are setup parameters trig delay and loop count See the chapter on the trace board for more details on these parameters The Trace button starts and stops the trace feature Tracing may be started and stopped without the need to break emulation The Setup button brings up the Trace Setup dialog box which is covered in detai

Download Pdf Manuals

image

Related Search

Related Contents

COMBINÉ  幅広い用途に応える省スペースFC。  LaCie SAFE Mobile Hard Drive with Encryption 160GB  Adapted future landscapes – User guide  Netopia 3347-02 Network Router User Manual  47-614型 47-615型 取扱説明書 ガス吸収式冷暖房機 室内機(隠ぺい形)  cmas - brevet * +  TermoRossella Plus DSA – TermoNicoletta DSA TermoRossella  師匠 取扱説明書  1738 SD  

Copyright © All rights reserved.
Failed to retrieve file