Home
MCUEZDBG0508 User Guide - Freescale Semiconductor
Contents
1. MODULE ABC ABCMCR 0x700 16 PORTABC 0x706 16 MODULE SQIM SOIMCR OxA00 16 SYNCR OxA04 16 GROUP PORTS PORTA OxA10 8 PORTB OxA11 8 GROUP CHIPSELECTS CSPARO OxA44 16 CSBARA 0xA60 16 CSORA OxA62 16 MEMMAP CSA BASE CSBARA amp OxFFF8 lt lt 8 SIZE CSBARA amp 7 0 0x800 1 0x2000 2 0x4000 3 0x10000 4 0x20000 5 0x40000 6 0x80000 7 0x80000 ENABLED CSPARO amp 3 gt 2 SPECIFIER ACCESS CSORA gt gt 11 amp 3 0 None 1 Read 2 Write 3 Both SPECIFIER BYTE CSORA gt gt 13 amp 3 0 None 1 Lower 2 Upper 3 Both SPECIFIER CSORA gt gt 4 amp 3 0 None 1 Lower 2 Upper 3 Both MODULE FLASH FEEMCR 0x820 16 FEEBAH 0x824 16 FEEBAL 0x826 16 MEMMAP FLASH BASE FEEBAH 16 SIZE 0x8000 ENABLED FEEMCR amp 0x8000 0 eof MCUez HC05 HC08 Debugger User s Manual MOTOROLA Register Description File 185 Register Description File User s Manual MCUez HC05 HC08 Debugger 186 Register Description File MOTOROLA User s Manual MCUez HC05 HC08 Debugger Appendix B C Source Level Debugging B 1 Contents Ea UGG sis ro ribera ion B3 OMR COMpPO dir dd B4 Puoosduetomponedt iceseost
2. MEM Short description Displays the memory map Syntax MEM Description The MEM command displays a representation of the current memory map of the system and the lower and upper boundaries of the internal module that contain the MCU registers Example in mem Type Addresses Comment IO 0 3F PRU or TOP TOP board resource or the PRU NONE 40 4F NONE RAM 50 64F RAM NONE 650 7FF NONE EEPROM 800 A7F EEPROM NONE A80 3DFF NONE ROM 3E00 FDFF ROM IO FEOO FELF PRU or TOP TOP board resource or the PRU NONE FE20 FFDB NONE ROM EEDGC zFEEE ROM COP BEER EEFE special ram for cop RT MEM Qu SEE enabled User s Manual MCUez HC05 HC08 Debugger 140 Command Reference MOTOROLA Command Reference Target Commands MS Short description Sets memory bytes Syntax MS range list Arguments range Address range constant that defines the block of memory to be set to the values of the bytes in the list list List of byte values to be stored in the block of memory Description The MS command initializes a specified block of memory to a specified list of byte values When the range is wider than the 1ist of byte values the list is repeated as many times as necessary to fill the memory block When the range is not an integer multiple of the length of the 1ist the last copy of the list is truncated appropriately This command is identical to the write bytes WB command Example MS 0x1000 0x100F OxFF
3. 86 Changing the Variable Value Display Format 87 Modifying a Variable Value i2 cuossescenstie metrice ne 87 Displaying an Allocated Variable Address 88 Loading an Address Register with a Variable Address 88 User s Manual MOTOROLA Operating Procedures 71 Operating Procedures 112 Working with Registers iososecenssbecesskRsseER CARPE EA Xd RS 88 4 12 1 Changing the Register Display Format 89 4 12 2 Modifying the Content of an Index or Accumulator Register 89 4 12 3 Modifying Bit Register ContentS o oooooooomomooo 90 4 12 4 Retrieving a Memory Dump Starting at a Register Indicated Address oooooooooo o 90 413 Working with Memory irasssasesssbestcbeerka ko eed ur den 91 4 13 1 Changing the Memory Display Format 91 4 13 2 Modifying Memory Address Content 92 4 2 Introduction This section provides procedures on e Configuring the debugger e Configuring the debugger for use with various editors e Starting the debugger from the shell e Configuring a default layout e Loading starting and stopping an application Defining and setting breakpoints e Stepping through code within an application e Working with variables e Working on registers e Accessing memory contents User s Manual MCUez HC05 HC08 Debugger 72 Operating Procedures MOTOROLA Operating Procedures C
4. 31 28 MCUez Debugger TOGIDRE cos heed aS ARAS 32 29 MCUez Debugger Status Baf oes ciar AA E 32 2 10 Debugger Object Information Bat 2 s 22402iassss ves eave ews 23 zl De ugsger Mam Meni caos Ari A AS ed fle Pile MEU 65 serene RIAS 35 CORE OS 2 o0 Pr 36 2AF MR Lo Mr TC rcr 2j 2 43 A O 31 2 16 Component Me restar ses 38 217 O MenH 031 AAA 39 fle A 244999 o o TP RPE TROP RE pd 40 2 19 Component Drag and Drop Example 5 esos rn 40 3 1 Open Window Component Dialog Box o ooooooomo o 48 3 2 Aelvatompanent NISI nas x s oe see oe owe deee es RS TR RENS 49 2 4 Source Component Pop up Menu Losasexcasuu kk RE E EAR RAS 50 3 4 Source Component Window Less IRAE or RENT sees eern seen ees 51 3 5 Source Component Main Menu and Pop up Menu 51 Oe AUS Disassembly sk nee e en ARA AA 54 S7 Iul Dialoe Box visir 595500925 50466 005 9455485 569 54 3 8 Assembly Component Window iccoosesa oso hr RES 33 3 9 Assembly Component Main Menu and Associated Pop up Menu 56 MCUez HC05 HC08 Debugger User s Manual MOTOROLA List of Figures 15 List of Figures User s Manual Figure Title Page 3 10 Register Component Window ci 46604 seisee seses sesane 58 3 11 Register Display Options Menu i 226iccddeeedseeeeseiaa es 59 3 12 Memory Component Window Li2szecszestzensce Az qd rea 60 3 13 Memory Component Pop up Menu seseeeeeees 61 3 14 Memory Component Display AddresS o oo oooooooo
5. IdentNum Size IdentNum ident HexNumber Size pn y Ta a ident is an identifier as defined in ANSI C IOReg IOREG group regName group Refer to the Motorola I O register file definition in Appendix A Register Description File regName Refer to the Motorola register name definition in Appendix A Register Description File itemName module module procedure module procedure variable variable ident ident number module ident extension procedure ident extension is an identifier as defined in ANSI C number is a number as defined in ANSI C ident is an identifier as defined in ANSI C Module names can have an extension If no extension is specified the parser will look for the first module that has the same name without extension User s Manual MCUez HC05 HC08 Debugger 100 Command Reference MOTOROLA 5 5 2 Semantics Command Reference Expressions A scope represents either a module or procedure A scope is recognized by the presence of the double colon which terminates the scope If the scope identification contains at least one colon it is assumed to represent a procedure otherwise it represents a module Empty module or procedure names represent the current module or procedure respectively The current procedure is the procedure that the program counter of the debugger points to The current module is the module that contains t
6. MCUez HC05 HC08 Debugger 162 Command Reference MOTOROLA Command Reference Component Commands Arguments hex Sets format representation to hexadecimal oct Sets format to octal bin Sets format to binary signed Displays value in signed decimal format unsigned Displays value in unsigned decimal format number Requested word size The word size can be 1 2 or 4 bytes address Memory address to be located range Memory range to be located module Specified module periodical Set data component to periodical update mode frozen Set data component to frozen update mode automatic Set data component to automatic update mode rate Update rate in tenth of a second Valid values are 1 to 600 Description The ATTRIBUTES command sets the display and state options of the Memory component window The FORMAT command selects the diplay format in the memory window Format can be set to binary octal hexadecimal signed decimal unsigned decimal or symbolic The WORD command selects the word size of the Memory window The word size can be 1 2 or 4 bytes The ADR command displays or hides the address in front of the memory lines The ASC command displays or hides the ASCII dump at the end of the memory lines The ADDRESS command scrolls the Memory component window to the specified address and displays the corresponding memory address The SPC show PC SMEM show memory commands scroll the Memory compo
7. 112 Command Reference MOTOROLA Command Reference Kernel Commands REPEAT Short description REPEAT loop command Syntax REPEAT Description The REPEAT command enables a command sequence to be executed until a specified condition is true REPEAT blocks can be nested A REPEAT block can be started inside a REPEAT block Example DEFINE var 0 REPEAT DEFINE var var 1 UNTIL var 2 The REPEAT UNTIL loop is identical to the ANSI C loop The operation DEFINE var var lisexecuted twice then var 2 is executed and the loop exits This command can be halted by pressing the Esc key MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 113 Command Reference RETURN User s Manual Short description Returns from a CALL or CF command Syntax RETURN Description The RETURN command terminates the current command processing level If executed within a command file control is returned to the caller of the command file for example the first instance which did not chain execution Example in file ddMemoemdl txt CALL d demo cmd2 txt JE Example in file d NdemoNcma2 txt RETURN returns to the caller The command file cmd1 txt calls a second command file cmd2 txt It is necessary to insert the RETURN instruction to return to the caller file Then the T trace command is executed MCUez HC05 HC08 Debugger 114 Command Reference MOTOROLA UND
8. Execution of the application has been stopped after a single step at assembler level The menu entry Run Assembly Step or the Assembly Step icon in the toolbar has been selected This message is relevant only when debugging at C source level Application has been stopped because a breakpoint has been reached User s Manual MOTOROLA Getting Started and User Interface 33 Getting Started and User Interface 2 6 2 2 CPU Specific Messages Some error messages depend on the CPU used These are messages related to exceptions The MCUez debugger makes a distinction between predefined exceptions that have a specific meaning for all derivates in the CPU family and user defined exceptions A user defined exception can be freely configured by the user and does not have the same meaning for all derivates in the CPU family The exception message format is Exception string number where string describes the reason for the exception This string is only specified when a predefined exception is detected number is the entry in the vector table that generates the exception This number is only specified when a user defined exception is detected Two exceptions are treated differently An address error exception and a bus error exception for the target processor Check the target hardware manual for an explanation of the exception Other exceptions can be generated for a vector that are not associated with an interrupt fun
9. Syntax OSC lt rate gt lt source gt Arguments rate OSC1MHZ Selects the 1 MHz oscillator OSC2MHZ Selects the 2 MHz oscillator OSC4MHZ Selects the 4 MHz oscillator OSC8MHZ Selects the 8 MHz oscillator OSC16MHZ Selects the 16 MHz oscillator source EXT Selects an external clock source Example OSC osc8Mhz Use the 8 MHz internal emulator clock Disables the real time memory block at base address 1000 User s Manual MCUez HC05 HC08 Debugger 212 MMEVS0508 Target MOTOROLA MMEVS0508 Target MMEVS Commands PROTOCOL Protocol Command Description The PROTOCOL command allows the user to display the communication protocol between the debugger and the server in the Command Line window Syntax PROTOCOL ON OFF Arguments ON Protocol is displayed in the Command Line window default OFF Protocol is not displayed in the Command Line window or logged in the log file RESET Reset Command Description The RESET command resets the target MCU RESET GO performs a reset of the EM emulator and automatically starts execution of the code starting at the address stored in the reset vector RESET STOP performs a reset and waits for user commands NOTE This command does not execute the reset command file reset cmd Syntax reset GO STOP Arguments GO Resets the MCU and continues at address stored in reset vector STOP Resets the MCU and stops default Example RESET GO Resets the M
10. The ELS MCUez HC05 HC08 Debugger EIF keyword is associated with the IF command User s Manual MOTOROLA Command Reference 105 Command Reference ENDFOCUS Short description Resets the current focus refer to FOCUS command Syntax ENDFOCUS Description The ENDFOCUS command resets the current focus It is associated with the FOCUS command The following commands are broadcast to all currently open components This command is only valid in a command file Example FOCUS Assembly ATTRIBUTES code on ENDFOCUS FOCUS Source ATTRIBUTES marks on ENDFOCUS The ATTRIBUTES command is first redirected to the assembly component by the FOCUS Assembly command The code is displayed next to assembly instructions Then the assembly component is released by the ENDFOCUS command and the second ATTRIBUTES command is redirected to the source component by the FOCUS Source command Marks are displayed in the source window User s Manual MCUez HC05 HC08 Debugger 106 Command Reference MOTOROLA ENDFOR ENDIF ENDWHILE Command Reference Kernel Commands Short description End of a FOR loop Syntax ENDFOR Description The ENDFOR keyword is associated with the FOR command and terminates a FOR loop Short description End of an IF condition Syntax ENDIF Description The ENDIF keyword is associated with the IF command and terminates a conditional block
11. 4 4 Automating the MCUez Startup Process Often the same tasks have to be performed after starting the debugger Tasks can be automated by writing a command file that contains all commands to be executed after startup Most target components will execute the command file startup cmd once the target component is loaded and initialized By inserting the call command in the startup command file for example call init cmd the user defined command file init cmd also will be executed when the target component is loaded Example of startup cmd file call init cmd Example of init cmd file load fibo abs bs amp main t g The init cmd file will load the application fibo abs then set a temporary breakpoint at the start of the function main and start the application The application will then stop at main after executing the startup and initialization code 4 5 Configuring the Default Layout User s Manual The default layout is activated when the debugger is started This layout is defined in the project ini file located in the project directory Figure 4 1 is an example of a project ini file MCUez HC05 HC08 Debugger 74 Operating Procedures MOTOROLA Operating Procedures Configuring the Default Layout DEFAULTS Window0 Source 0 0 50 40 Windowl Assembly 50 0 50 40 Window2 Register 50 40 50 30 Window3 Memory 50 70 50 30 Window4 Data 0 40 50 25 Window5 Command 0 65 50 20 Window6 Module 0 85 50 15
12. 41 Dragging into the Assembly Component 42 Dragging from the Data ComponeMt o oo ooccocococoooo 42 Dragging into the Data Component oo ooococococoooo o 43 Dragging from the Source Component 4 43 Dragging into the Source Component 4 Dragging from the Memory Component de Dragging into the Memory Component 45 Dragging from the Register Component 45 Dragging into the Register Component 46 Dragging from the Module Component 46 Section 3 Component Windows CONS Las cerdabaxeddwEERTr V RbeRRA AE ARR ERECTAE A EAE US 47 D sic o MR 48 Li ARA 48 Component Window Menu 6266 sias ehh RR ERA 49 Source Component Window 2 65 04 864 e re bese ee eres hese ees 50 a e 2 4 a d ov 9 ORE EAE A 53 Decoding Dal uci eoa sckssebesraiqa sd pA RR ER 53 Pid Dialog BOX AAA 54 Assembly Component WindoW o oooooooooomoo o 55 Retrieving Source Statements cascada cr kirba kski 58 Register Component Window 6604 ccererss4ee gt eoeseeera es 58 wr OIRO A m 58 Editing Revistes cid chee ck ese abd bbtrbiad ska ds 59 Register Display Options Menu os eere e Memory Component Window e eee eee eee 59 Memory Component Operations 000005 60 Memory Component Pop up Menu 61 Memory Update Mode s iade vua dur EY RRELAESYEIAAE teta 6
13. B Arguments list List of events A B C and D separated by a space character or a comma All events A B C and D LB Specifies backward search When this option is omitted a forward search is performed Example GE A B Moves the cursor to the next frame that contains the event A and or B MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 247 MMDS0508 Target GF Go to Frame Description GF moves the cursor to a specified trace buffer frame When the number of the specified frame is greater than the number of frames currently stored in the buffer the command moves to the last frame Syntax GF lt frame gt Argument frame Specifies a frame number in the range of 0 8190 The frame is always specified as a decimal number regardless of the current default number base Examples GF 4096 Moves the cursor to frame 4096 GF 32768 Moves the cursor to the last frame in the buffer User s Manual MCUez HC05 HC08 Debugger 248 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands GP Go to Analyzer Search Pattern Description GP searches forward or backward in the analyzer trace buffer for a frame that matches the search pattern defined with the SP command A forward search begins at the frame following the current frame A backward search begins at the frame preceding the current frame When the search finds a frame that matches the search pattern the line cursor
14. 108 Command Reference MOTOROLA Command Reference Kernel Commands FOR Short description FOR loop command Syntax FOR variable range step Arguments variable A symbol or program variable During execution of the loop the iteration value is stored in variable range Integer that specifies start and end condition for the loop step Constant number defining the increment for the iteration value Description The FOR loop allows all commands to be executed up to the trailing ENDFOR a predefined number of times The bounds of the range and optional steps are evaluated only at the beginning A variable either a symbol or program variable may be optionally specified which is assigned to all values in the range during execution of the FOR loop Assignment happens immediately before comparing the iteration value with the upper boundary The variable is a copy of the internal iteration value Modifications on the variable do not impact the number of iterations This command is halted by pressing the Esc key Example DEFINE loop FOR loop 1 T ENDFOR 0 6 1 The T trace command is performed six times MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 109 Command Reference GOTO Short description Unconditional branch to a label in a command file Syntax GOTO Label Argument Label User defined label used to mark a place in code Description The
15. Drag a function name from the procedure component to a data component with attribute local 2 Using double click Double click a function name in the procedure component The data component with attribute local that is neither frozen nor locked displays the list of variables with their values and type defined in the selected function B 14 Miscellaneous C Source Level Commands This section describes all debugger commands associated with C source level debugging MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 197 C Source Level Debugging SPROC User s Manual Short description Shows information associated with the specified procedure Syntax SPROC level Description In the data component the SPROC command shows local variables of the corresponding procedure stack level In the source component the SPROC command shows the corresponding module s source text scrolls to the corresponding procedure and highlights the statement that 1s in the procedure chain level Oisthe current procedure level Level 1 is the caller stack level and so on Data component example in Data 2 lt SPROC O This command displays the local variables defined in the caller function number 1 in the call chain Source component example in Source SPROC 1 MCUez HC05 HC08 Debugger 198 C Source Level Debugging MOTOROLA C Source Level Debugging Miscellaneous C Source
16. ENABLED Exp apSpecifier SPECIFIER Label Exp Exp CExpression SwitchExpr SwitchExpr CExpression CaseSpec CaseSpec ConstValue CExpression StringDef J cuName StringDef name of the MCU culd ConstValue identification number of the MCU RegBase ConstValue base address of the registers after reset oduleName Name name of the module GroupName Name name of a group of registers RegName Name name of the register RegOffset ConstValue offset from the register base address Size ConstValue size of the register in bits BlkName Name name of the memory block Label StringDef name to be used to label th expression defined in ANSI C that contains integers 3 specifier CExpression ConstValue constant value as defined n ANSI C Name identifier as defined in ANSI C StringDef any number of printable characters in double quotes 1 Evaluation of expressions are done with signed 32 bit arithmetic 2 Non printable characters are interpreted as white spaces User s Manual MCUez HC05 HC08 Debugger 184 Register Description File MOTOROLA Register Description File Description Using Extended Backus Naur Form EBNF Example This example describes a hypothetical MCU It contains the modules ABC SQIM and FLASH The SQIM module has two groups of registers PORTS and CHIPSELECTS MCU MY MCU 0Ox07A5 OxFFFOOO 00x1000
17. If the application was previously stopped on a function invocation a Step Over halts the application on the source instruction directly following the function invocation The display in the assembly component is always synchronized with the display in the source component The highlighted instruction in the assembly component is the first assembler instruction generated by the highlighted instruction in the source component Elements from the register memory or data components that are displayed in red are the register memory position and local or global variables The indicated variables are those whose values have changed during execution of the source statement B 12 3 Stepping Out of a Function Call The debugger provides two ways of stepping out of a function call 1 Select Run Step Out 2 Click the Step Out icon on the toolbar STOPPED displayed in the status line indicates that the application is stopped by a step out function If the application was previously stopped on a function invocation a Step Over halts the application on the source instruction directly following the function invocation User s Manual MCUez HC05 HC08 Debugger 196 C Source Level Debugging MOTOROLA C Source Level Debugging Displaying a Local Variable from a Function B 13 Displaying a Local Variable from a Function The debugger provides two methods to view the local variable list defined in a function 1 Using drag and drop
18. MCUez HC05 HC08 Debugger User s Manual MCUEZDBG0508 D Rev 1 My MOTOROLA MCUEZDBG0508 D MCUez HCO5 HC08 Debugger User s Manual Mj MOTOROLA User s Manual Important Notice to Users While every effort has been made to ensure the accuracy of all information in this document Motorola assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document its updates supplements or special editions whether such errors are omissions or statements resulting from negligence accident or any other cause Motorola further assumes no liability arising out of the application or use of any information product or system described herein nor any liability for incidental or consequential damages arising from the use of this document Motorola disclaims all warranties regarding the information contained herein whether expressed implied or statutory including implied warranties of merchantability or fitness for a particular purpose Motorola makes no representation that the interconnection of products in the manner described herein will not infringe on existing or future patent rights nor do the descriptions contained herein imply the granting or license to make use or sell equipment constructed in accordance with this description The computer program contains material copyrighted by Motorola Inc first published in 1997 and may be used only under a license such
19. MOTOROLA MMDS0508 Target 259 MMDS0508 Target When a mask is entered only bits of the value that correspond to one bits 1s in the mask are used in the comparison When a length and a mask are entered the length is added to the start value The mask is applied to the start value and to start value length to obtain the end address clips A 5 bit value that defines logic clip signals on the MMDS0508 analyzer for the trigger The value is specified like this lt clips gt lt mask gt When a mask is entered only bits of the value that correspond to 1s in the mask are used in the comparison For example the code 0x1F Ox1F sets all clips of Term A to H If a mask is not specified the value 0x1F will be assigned by default Each trigger clip line has three options l H High 2 L Low 3 X Don t care The bits of the clips and mask words are Group A Bit Signal 0 BRN 1 RED 2 ORG 3 YEL 4 GRN 6 LIR active low FR Trigger on a read bus cycle only SW Trigger on a write bus cycle only RW Trigger on a read or write bus cycle PD Disable trigger for example set trigger value and disable trigger LIR Trigger on a specific value for LIR signal LIR H Triggers when LIR is high LIR L Triggers when LIR is low LIR X Triggers when LIR is high or low User s Manual MCUez HC05 HC08 Debugger 260 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands When the user specifies a r
20. Short description End of a WHILE loop Syntax ENDWHILE Description The ENDWHILE keyword is associated with the WHILE command and terminates a WHILE loop MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 107 Command Reference FOCUS Short description Sets the focus on a specified component Syntax FOCUS component Argument component Component window Description The FOCUS command sets the given component window as the destination for all subsequent commands up to the next ENDFOCUS command The focus command eliminates having to repeatedly specify the same command redirection especially in the case where command files are edited manually It is not possible to visually notice that a component is the focus for commands Use the ACTIVATE command to activate a component window This command is valid only in a command file Example FOCUS Assembly ATTRIBUTES code on ENDFOCUS FOCUS Source ATTRIBUTES marks on ENDFOCUS The ATTRIBUTES command is first redirected to the assembly component by the FOCUS Assembly command The code is displayed next to assembly instructions Then the assembly component is released by the ENDFOCUS command and the second ATTRIBUTES command is redirected to the source component by the FOCUS Source command Marks are displayed in the source window NOTE The FOCUS command cannot be nested User s Manual MCUez HC05 HC08 Debugger
21. Target ESL MainFrame 149 54 752 583 Motorola ESL ServerType 1 COMDEV COM2 BAUDRATE 57600 SHOWPROT 0 Figure 4 1 Example of project ini File Elements of the project ini file Target Specifies the default target component used when starting the debugger for example Target ESL e Layout Specifies a default layout file for component windows for example Layout mylayout hwl Layout files are created by selecting the Window Layout Store menu option in the debugger NOTE The complete path to the layout file must be specified if the file is not stored in the project directory NOTE Other elements of the project ini file are defined automatically and written to the file after performing operations such as using the mouse to resize windows or entering information in dialog boxes MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 75 Operating Procedures 4 6 Loading an Application User s Manual Follow these steps to load an application l Select Load in the target menu for example MMDS0508 to open the Load Executable File dialog box Figure 4 2 The target menu is located between the Run and Component menus Select an application for example fibo abs Click OK to close the dialog box and load the application into the debugger Load Executable File Look in C3 hc05 t a Fibomain abs e Fiboorg abs ia Macrodem abs File name Fibo
22. while i lt n El fibl fib2 fibo return fibo rs Figure B 5 Stepping at Source Level Window The debugger provides two ways of stepping to the next source instruction 1 Select Run Single Step 2 Click the Single Step icon on the debugger toolbar STEPPED displayed in the status line indicates that the application is stopped by a step function If the application was previously stopped on a function invocation a Single Step stops the application at the beginning of the invoked function The display in the assembly component is always synchronized with the display in the source component The highlighted instruction in the assembly component is the first assembler instruction generated by the highlighted instruction in the source component Elements from the register memory or data components that are displayed in red are the register memory position and local or global variables The indicated variables are those whose values have changed during execution of the source statement MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 195 C Source Level Debugging B 12 2 Stepping Over a Function Call Flat Step The debugger provides two ways of stepping over a function call 1 Select Run Step Over 2 Click the Step Over icon on the toolbar STEPPED OVER displayed in the status line indicates that the application was stopped by a step over function
23. 258 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands When a mask is entered only the bits of the address that correspond to 1s in the mask are used in the comparison address range A range of addresses within which a trigger is set The address range can be specified with a start and end address constant or with a start address and a length value as follows start address mask end address Or start address mask length When a mask is entered only the bits of the address that correspond to one bits 1s in the mask are used in the comparison When a length and mask are entered the length is added to the start address and the mask is applied to the start address and sum to obtain the end address data The comma indicates that the address address range data data range clips or clips range has been omitted The omitted item is ignored in the trigger A data value that defines the trigger The value is specified as lt value gt lt mask gt When a mask is entered only bits of the value that correspond to 1s in the mask are used in the comparison data range A range of data values that define the trigger The data range can be specified with a start and end value or with a start value and a length like this start value mask end value or start value mask lengtnh MCUez HC05 HC08 Debugger User s Manual
24. 5 8 5 9 MCUez HC05 HC08 Debugger Section 5 Command Reference TOGO sudes n e NETROR ra 93e Ded e Ped d d ded 94 List of Available Commands 0 0 0c cee eee cece eee 95 Kernel Comandi ss Kd ERE EE E ER EE ees keene 95 Taiteet CORB sroki eas ckddeeesines EPI arre 96 Component Commands AAA 97 Definition of Terms 0 0 0c ccc eee RR III 98 Pee esas ek wee hha chee ede eapceee tee 99 Expression Definition m EBNF saseeaesua esu se ken 100 AMI eod Ett ck Be oe Read Rare ne ad od wee docs 101 o A EROR HERR ERR RAIDER es 101 Constant Standard Notation 0 000 cee eee eee 102 Kernel Commands is a acid haan sada OE dep COR E c a ead 103 ii WM Q4 edid p EH ERE S E Seg e Rp E eases 118 Component Commands MEA 155 Coma BIGR ca dau NOR ER EORR a o 181 User s Manual MOTOROLA Command Reference 93 Command Reference 5 2 Introduction User s Manual This section provides a detailed list of all MCUez debugger commands All commands and component names are case insensitive The EBNF Extended Backus Naur Form command syntax is component name component number gt lt command where component name is the name of the component window The component number is the number of the component This number does not exist in the component window title if only one component of this type is open When two instances of the data component are open each data component is titled numerically as
25. C and D Examples TE A B Enables triggers A and B TE Enables all triggers MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 267 MMDS0508 Target TT Display Time Tag Difference Description The TT command displays the difference between the time tags in the two trace frames of the analyzer display When frame numbers are not entered the command displays the difference between the beginning and ending frames Syntax TT lt sframe gt lt eframe gt Arguments sframe Starting frame number eframe Ending frame number When ef rame is omitted the end frame in the trace buffer is used to calculate the difference Examples TT Displays the difference between the beginning and ending frames in the trace buffer TT 80 Displays the difference between frame 80 and the ending frame in the trace buffer TT 10 40 Displays the difference between frames 10 and 40 in the trace buffer User s Manual MCUez HC05 HC08 Debugger 268 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands VA Analyzer View Description The VA command selects the display format of the analyzer trace buffer Syntax VA MODE MIX NS GRAPH Arguments MODE Followed by one of the three options indicates the bus analyzer display mode MIX Mixed view INS Instruction view GRAPH Graphical view Example VA MODE MIX Sets mixed view mode MCUez HC05 HC08 Debug
26. Data Command Line Module MotoESL Target Probe ID BOOT ROM EEPROM Protocol Server ARP NNNRwOO0O0OOo0Oo0ooooo lt lt lt lt Oo MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 179 Command Reference ZOOM Short description Zooms in out on an array or variable Syntax ZOOM address in address out Arguments address Address of a structure or pointer variable that should be zoomed in or zoomed out Description In the data component the ZOOM in command is used to display the member fields of structures by revealing the structure Member fields are not expanded in place The display of the member fields replaces the previous view The ZOOM out command is used to return to the nesting level indicated by the given identifier Addresses are not needed to zoom out Simply type ZOOM out Example in gt ZOOM Ox1FEO in The variable structure located at address 0x1 FEO is zoomed in NOTE This command is relevant when C source debugging in zoom amp StartupData The previous code example zooms in on the StartupData structure amp StartupData is the address of the StartupData structure User s Manual MCUez HC05 HC08 Debugger 180 Command Reference MOTOROLA Command Reference Command Files 5 9 Command Files The command files startup cmd reset cmd preload cmd and postload cmd are MCUez system command files e startup cmd is exe
27. If address is omitted execution begins at the instruction pointed to by the program counter Description The P command executes a CPU instruction either at a specified address or current instruction pointed to by the program counter This command traces through subroutine calls software interrupts and operations involving the following instructions Branch to SubRoutine BSR Jump to SubRoutine JSR e SoftWare Interrupt SWI For example if the current instruction is a BSR instruction the subroutine is executed and execution stops at the first instruction after the BSR instruction For instructions that are not in the above list the P and T commands are equivalent When the instruction specified in the P command has been executed the software displays the content of the CPU registers the instruction bytes at the new value of the program counter and a mnemonic disassembly of that instruction Example in gt p A 0x0 HX 0x450 SR 0x70 PC 0xF04E SP 0xFF OOFO4E 94 TXS Register contents are displayed and the current instruction is disassembled MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 145 Command Reference RD Short description Displays register contents Syntax RD lt list gt Arguments list List of registers to be displayed Registers to be displayed are separated by a space When RD CPU is specified all CPU registers are displayed If no CPU is loa
28. NOTE Bits set to O are don t care bits Bits set to 1 are bits that expect the value for Address Data or Clip Bits set to O accept 0 or 1 Bits set to 1 only accept values from address fields For Address 0xC000 Mask OxFFFC the search pattern is detected for 0xC000 and 0xC001 0xC002 or 0xC003 is loaded in the address bus For Address 0x00BO Mask 0x00FO the search pattern is detected when an address in the range 0x00B0 OxFFBF is loaded User s Manual MCUez HC05 HC08 Debugger 264 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands SQ Set Sequencer Description The SQ command sets the analyzer sequencer mode Alternately if no parameters are specified the command interpreter displays the Bus Analyzer configuration dialog Then the user can select the Sequencer tab and program the sequencer Syntax SO lt mode gt lt count gt S Arguments mode Selects the sequencer mode Modes are ALL Records all bus cycles EVENT Records events only SEQO Sequential recording mode A B C D SEQ1 Sequential recording mode A B gt C D SEQ2 Sequential recording mode A gt B gt C D lt SEQ3 Sequential recording mode A gt B gt C gt D SEQ4 nthevent of A B C D After collecting nth events then 4095 more cycles are collected in the trace buffer count Specifies terminal count for the Counted ALL cycles and Counted Events Only modes as a decimal value Causes frames of the appropriate type to be recorded T
29. PC value for instance program execution is stopped as soon as the PC reaches the value defined in a breakpoint The MCUez debugger supports different types of breakpoints e Run to cursor breakpoints temporary breakpoints which are deleted as soon as they are reached This type of breakpoint is activated the next time the corresponding instruction is executed Set breakpoints permanent breakpoints which remain active until the user deletes them This type of breakpoint will be activated each time the corresponding instruction is executed Breakpoints can be set in either a source or assembly component Figure 4 4 shows the Breakpoints Setting dialog window imi Source ci Ed al Assembly IC MCUEZ DEMO Shc O5 fibo DBG Fibonacci fibl l fibl 0 0x86 d Breakpoints Setting 100 fibo dbg Fibonacci 0 E P 108 fibo dbg Fibonacci 8 E T 104 fibo dbg Fibonacci 10 D P Breakpoint counter fiboCount Address fi 00 Disable j M Hex format Temporary no Name Fibonacci m Command Add Delete A Cancel Help Breakvoint Figure 4 4 Breakpoints Setting Dialog Window MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 79 Operating Procedures The Breakpoint Setting dialog consists of Alist box which displays a list of currently defined breakpoints e Breakpoint group box which displays the address of the currently selected breakpoint name
30. The memory range between addresses 0x1000 and Ox100F is filled with the OxFF value MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 141 Command Reference NB User s Manual Short description Sets the number base for expression values in arguments Syntax NB base Argument base Decimal integer specifying the number base 2 8 10 or 16 Description The NB command changes or displays the default number base for the constant values in expressions The initial default number base is 10 decimal and can be changed to 16 hexadecimal 8 octal 2 binary or reset to 10 with this command If base is omitted the current default number base is displayed in the command line window Independent of the default base number the ANSI C standard notation for constant is supported inside of an expression That means that independent of the current number base hexadecimal or octal constants can be specified using standard ANSI C notation Notation Meaning 0x Hexadecimal constant 0 Octal constant MCUez HC05 HC08 Debugger 142 Command Reference MOTOROLA Command Reference Target Commands Example Ox2F00 Hexadecimal Constant 043 Octal Constant In the same way the assembler notation for constant is also supported That means that independent of the current number base hexadecimal octal or binary constants can be specified using the assembler prefixes Notation
31. execution has stopped the current position is marked by highlighting the corresponding instruction The object info bar displays the procedure name that contains the currently selected instruction Figure 3 8 shows the assembly component window imi Assembly iof x 0x80 0x80 0x80 0x0100 0x82 0x81 S017 Figure 3 8 Assembly Component Window MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 55 Component Windows Figure 3 9 shows the Assembly component main menu and associated pop up menu The paragraphs that follow describe each menu option Component RSS Window Help Address Sw Display Code DBG Display Adr v Display Absolute Address CLRX STX 0x80 INC 0x80 Ln nvan Main Menu Set Breakpoint Run To Cursor STX 0x80 Show Breakpoints INC 0x80 LDX 0x80 Address JSR OxO1f Display Code STX 0x82 Display Adr Pop Up Menu STA 0x81 right mouse button Tn 4n 1 Y Display Absolute Address Figure 3 9 Assembly Component Main Menu and Associated Pop up Menu User s Manual e Menu bar Address Opens a dialog box prompting for an address Enter a hexadecimal address to interpret and display the memory contents as assembler instructions starting at the specified address Display Code Displays the machine code in front of each disassembled instruction Display Address Displays the location address at the beginning of each d
32. iol x fibo c Address 8055 main Startup si Figure B 1 Procedure Component Window Double clicking on a procedure name forces all open windows to display information about that procedure The Source component window shows the procedure s source The Data component window displays the local variables and parameters of the selected procedure Figure B 2 shows the Procedure component window menu Show Values Displays function parameter values in the procedure component Show Types Displays function parameter types in the procedure v Show Values Show Types Figure B 2 Procedure Component Window Menu component MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 189 C Source Level Debugging B 4 2 Drag Out Table B 1 shows the drag and drop actions possible from the procedure component Table B 1 Procedure Component Drag and Drop Actions Destination Component Action Displays local variables from the selected procedure in the Data Local data component Displays source code of the selected procedure Current Source instruction inside the procedure is highlighted in the source component The current assembly statement inside the procedure is Assembly highlighted in the assembly component B 4 3 Drop Into Nothing can be dropped into the Procedure component window B 5 Data Component The Data component window contains the na
33. of the register component The HSCROLLPOS command sets the position in column a column is about the tenth of the greatest register or bitfield width of the horizontal scroll box hex Sets format representation to hexadecimal bin Sets the format representation to binary Description The ATTRIBUTES command sets the display and state options of the Register component window The FORMAT command sets the display format of register values The VSCROLLPOS command sets the position in line each register and bit field have the same height which is the height of a line of the vertical scroll box The attribute VSCROLLPOS enables scrolling vertically in the register component The expression specified is an absolute and positive value for scrolling This command is effective only when a vertical scroll bar is present on the right of the register component The attribute HSCROLLPOS enables horizontal scrolling in the register component The expression specified is an absolute and positive value for scrolling Equivalent operations ATTRIBUTES FORMAT Select menu option Register Options ATTRIBUTES VSCROLLPOS Scroll vertically in the Register component window ATTRIBUTES HSCROLLPOS Scroll horizontally in the Register component window User s Manual MCUez HC05 HC08 Debugger 158 Command Reference MOTOROLA Command Reference Component Commands Example Register ATTRIBUTES FORMAT BIN Contents of r
34. the code Address Ox00B0 Mask 0Ox00FO the trigger is detected when an address in the range 0xBO OxBF is loaded MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 261 MMDS0508 Target SP Set Analyzer Search Pattern Short description Set analyzer search pattern Syntax SP lt address gt lt data gt lt clips gt LIR X L H JJ J1 R WI RW Description The SP command defines a pattern for searching the bus analyzer trace buffer The goto search pattern command GP performs the search for the pattern defined by the most recent SP command If no parameter is specified the Bus Analyzer Search Pattern dialog box is displayed The inversion operator applies to a specified single address or data value When is specified the command sets a pattern on addresses and or data values other than the specified address or data value address An address to which a pattern is set The address is specified with a constant address mask When a mask is entered only the bits corresponding to one bits 1s in the mask are useful in the pattern The comma indicates that the address data or clips byte has been omitted The omitted item matches any value of the omitted type don t care data Data value that defines the data pattern The value is specified as value mask When a mask is entered only the bits corresponding to one bits 1s in the ma
35. the specified number of frames has been recorded or the specified number of post trigger cycles following the trigger event has been recorded When a trigger event is detected the event cycle is latched into the buffer and the bus analyzer continues recording data until the specified number of post trigger cycles has been collected When the required post trigger cycles have been collected the bus analyzer stops collecting data With the first post trigger cycle the bus analyzer automatically begins searching for the next trigger event If other events occur while collecting the post trigger cycles for the first event the bus analyzer marks those event cycles while continuing to collect post trigger cycles D 8 Viewing Collected Data D 8 1 View Cycles When the desired cycles have been collected the bus analyzer provides a variety of methods to view those cycles At this point the trace buffer contains up to 8192 of the most recently stored frames The higher numbered frames are usually the post trigger frames The lower numbered frames are those frames stored before the trigger occurred if any were stored When the bus analyzer is deactivated data is displayed in the Trace window D 8 2 Textual Graphical or Instructions User s Manual NOTE Select one of these entries in the Trace pop up menu to set the bus data display If the sequencer is set up to not collect all frames for example event only modes the instru
36. 10 E T m ENE xc d 8053 fibo c Fibonacc 14 E 1 1 Fib2 13 E SPC 0xC200 E t 806E fibo c Fibonacci 25 E 1 1 fibl 0 fib2 1 fibo n fli 2 while i lt n El m Breakpoint fibo fibl fib2 Address hex 8063 Disable Mdfibl fib2 EHE fibo Mame Fibonacci T _ Tempora Condition Condition Fib2 13 Disable r Command Command sPC 0xC200 Disable r Counter Current lz Interval no Delete DK Cancel Help Figure B 4 Breakpoints Setting Dialog Window B 9 Loading an Application The global data component contains the list of global variables defined in the module that contains the application entry point The local data component is empty B 10 Stopping an Application The Data component window assigned the global attribute displays the name and value of all global variables defined in the module where the currently executed procedure is implemented The module name is specified in the data component information bar The Data component window assigned the local attribute displays the name and value of the local variables defined in the current procedure The name of the procedure is specified in the data information bar MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 193 C Source Level Debugging B 11 Defining Counting Breakpoints Counting breakpoints are activated after the instruction has been exec
37. 2 0 2 10 2 11 2 12 3 1 3 2 3 3 4 1 4 2 4 3 MCUez HC05 HC08 Debugger List of Tables Title Page n E C EMTPO 36 Dragging from the Assembly Component 41 Dragging into the Assembly Component lesse 42 Dragging from the Data Component 000 42 Dragging into the Data Component 04 43 Dragging from the Source Component 04 43 Dragging into the Source Component 200 44 Dragging from the Memory Component uses Dragging into the Memory Component oooo occoccococoooo 45 Dragging from the Register Component 0 45 Dragging into the Register Component oo oococcocooooo 46 Dragging from the Module Component 04 46 Memory Component Pop up Menu 0000 61 Data Component Pop up Menu 2 0 0 e eee eee ee 67 Command Line peraions 9 2520s440s6000s09e bu PER EY 69 Breakpoint Pop Up Menu Definitions 4 84 Changing the Variable Value Display Format 87 Memory Display Format Options cosocesrrenicarr ek m 9 User s Manual MOTOROLA List of Tables 19 List of Tables User s Manual MCUez HC05 HC08 Debugger 20 List of Tables MOTOROLA User s Manual MCUez HC05 HC08 Debugger 1 1 Contents 1 2 Introduction Section 1 General Informa
38. 9 MCUez Debugger Status Bar User s Manual MCUez HC05 HC08 Debugger 32 Getting Started and User Interface MOTOROLA 2 6 2 1 Debugger Status Ready Halt Running Halted Stepped Stopped Traced Breakpoint MCUez HC05 HC08 Debugger Getting Started and User Interface Graphical Environment The MCUez debugger is ready and waits until a new target or application is loaded This message is generated once the debugger has been started Execution of the application has been stopped by a request of the application The Motorola predefined macro HALT has been reached in the application during execution The application currently is executing in the debugger Execution of the application has been stopped on user request The menu entry Run Halt or the Halt icon in the toolbar has been selected A Halted message is also displayed when the first Assembly Step is executed either from the Run menu or push button Subsequent Assembly Steps result in a trace message Execution of the application has been stopped after a single step at source level The menu entry Run Single Step or the Single Step icon in the toolbar has been selected This message is relevant only when debugging at C source level Execution has been stopped after a step out from a function call The menu entry Run Step Out or the Step Out icon in the toolbar has been selected This message is relevant only when debugging at C source level
39. 9600 19 200 28 800 38 400 57 600 115 200 Example BAUD 57600 Exit Terminate Session Description The EXIT command terminates the host session with the target Syntax EXIT User s Manual MCUez HC05 HC08 Debugger 210 MMEVS0508 Target MOTOROLA MMEVS0508 Target MMEVS Commands LOADMAP Load Memory Map Description The LOADMAP command allows the user to load a memory map from a file If the specified file starts with a number it should be preceded by a period and back slash For example LOADMAP N00123V22 mem Syntax LOADMAP filename MCU ID Arguments filename Specifies a memory file that defines a memory map MCU ID MCU identifier If specified the command will load the memory file that matches the MCU Id Example LOADMAP 0x3C1 Loads memory map from a file that matches the MCUez HC05 HC08 Debugger MCU Id User s Manual MOTOROLA MMEVS0508 Target 211 MMEVS0508 Target OSC Select Emulator Clock Frequency Description The OSC command selects the emulator clock frequency Six clock frequencies are available Five internally generated clock frequencies are available 16 MHz 8 MHz 4 MHz 2 MHz and 1 MHz An external clock source is also available The default emulator clock rate is set by the firmware and adapted to the current frequency Enter this command without parameters to open the equivalent Target Signals dialog box
40. C Sequential 4 B gt C D C Sequential 4 gt B gt C D lt C Sequentia 4 gt B gt C gt D C Nth Event of A B C D r Counted Sequential Recording Mode Terminal Count Post Trigger Cycles 1 8191 E Stop the emulator when recording completes Cancel Help Figure D 12 Bus Analyzer Configuration Sequencer Tab Click on one of the nine option buttons to select the recording mode D 6 3 1 Continuous Non Triggered Modes Continuous All Cycles Provides a real time non invasive trace of MCU bus activities The bus analyzer stores all cycles When used in this way the bus analyzer continuously records bus data in the trace buffer whenever the user target system is being emulated No qualifications for triggering or halting data collection can be defined NOTE The user must stop the application to view the collected frames Continuous Events Only Stores all events Events are defined by the terms set up in the Triggers tab MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 229 MMDS0508 Target D 6 3 2 Counted Non Triggered Modes Counted All Cycles Configures the bus analyzer to record a specified number of cycles Counted Events Only Collects all events until the specified count is reached then collection stops D 6 3 3 Sequential Triggered Modes Sequential A B C D Select this option for the bus analyzer to start recording after event A B C or D Frame
41. Drag and drop from source component to memory component Example Memory lt ATTRI BUTES ASC OFF ADR OFF ASCII dump and addresses are removed from the memory component User s Manual MCUez HC05 HC08 Debugger 164 Command Reference MOTOROLA Command Reference Component Commands AUTOSIZE Short description Autosizes component windows in the main window Syntax AUTOSIZE onloff Description AUTOSIZE enables or disables window autosizing When on component windows are automatically adapted to the MCUez main window when it is resized Example AUTOSIZE off Window autosizing is disabled MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 165 Command Reference BCKCOLOR Short description Sets the background color Syntax BCKCOLOR color Argument color Available colors BLACK GREY LIGHTGREY WHITE RED YELLOW BLUE CYAN GREEN PURPLE LIGHTRED LIGHTYELLOW LIGHTBLUE LIGHTCYAN LIGHTGREEN LIGHTPURPLE Description BCKCOLOR sets the background color Ensure that the text will be visible by using different colors for the font and background Do not use colors that have a specific meaning in the Command Line window These colors are Red To display error messages Blue To echo commands Green To display asynchronous events When WHITE is specified as an argument the default background c
42. EXT Selects the external clock BUS Selects the bus clock PROGRAM Selects the programmable clock When the programmable clock is selected and the frequency argument is omitted the default frequency is 50 Hz frequency Specifies the time tag clock frequency for the programmable clock which is in the range of 50 Hz to 50 kHz The frequency is entered as a decimal hertz value The programmable clock source has a fundamental frequency of 500 000 Hz and the frequency should be the quotient of 500 000 Hz divided by an integer Thus 50 000 is valid but 49 000 is invalid because an invalid frequency is rounded up to the next higher frequency Examples SC PROGRAM 100 Sets the programmable clock running at 100 Hz as the time tag clock source SC OSC8MHz Sets the 8 MHz oscillator as the time tag clock source User s Manual MCUez HC05 HC08 Debugger 256 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands SIG Set Emulator Signal Description The SIG command enables or disables control signals from the target MCU and controls emulation If a signal or list of signals is entered without specifying ENABLE or DISABLE the signals are enabled Syntax SIG ENABLE signal lt signal gt DISABLE signal lt signal gt Arguments signal Signal to be enabled or disabled available signals are RESETIN and RESETOUT ENABLE Connect signal from the target system DISABLE Di
43. GOTO command diverts command file execution to the command line that follows Label Label must be defined in the current command file The GOTO command fails if Label is not found A label can be followed on the same line only by a comment No MCUez command is allowed on the same line as a label Example GOTO MyLabel MyLabel comments When the instruction GOTO MyLabel is reached the program pointer jumps to MyLabel and follows program execution from this position User s Manual MCUez HC05 HC08 Debugger 110 Command Reference MOTOROLA Command Reference Kernel Commands GOTOIF Short description Conditional branch to a label in a command file Syntax GOTOIF condition Label Arguments condition Defined as in C language syntax Label User defined label used to mark a place in code Description The GOTOIF command diverts execution of the command file to the command line that follows the label if the condition is true otherwise execution continues on the next line in the command file The GOTOIF command fails if the condition is true and the label is not found A label can be followed on the same line only by a comment No MCUez command is allowed on the same line as a label Labels must be defined in the current command file Example DEFINE jump 0 DEFINE jump jump 1 GOTOIF jump 10 MyLabel T MyLabel comments The program pointer jumps to MyLabel only if jump 10 Otherwise th
44. MMDS0508 Target From the MCUez debugger load the MMDS0508 target by selecting Set Target from the Component menu Figure D 1 and selecting ESL from the list Target Ma Window Help Open nj Set Target Fonts Background Color Figure D 1 Component Menu The ESL driver automatically attempts to locate the MMDS0508 If the target is successfully loaded the MMDS0508 menu replaces the Target menu and the debugger status bar displays information shown in Figure D 2 Running Mode MCU Id For Help press F1 57 800 Backond Disarmed MCE8HC084AZ32 TRACED 4 Baud 4 Bus Analyzer Mode Debugger Status Figure D 2 MCUez Status Bar Displayed from left to right after the help line are the communication baud rate debugger run mode bus analyzer mode name of connected MCU and debugger status If the driver cannot locate the target an error message and the Communication dialog box appear indicating that the target is not connected The ESL menu replaces the Target menu The Communicaton dialog can also be opened by selecting Connect in the ESL menu MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 217 MMDS0508 Target D 3 1 MMDS Target Startup File The startup command file startup cmd is executed by the debugger immediately after the MMDS target driver has been loaded This file must be located in the working directory Any debugger command can be used in t
45. OPEN opens a component window If 1 is set the component window is opened as an icon Example OPEN Source 0 78 60 22 The Source component window is opened at the specified position width and height MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 173 Command Reference SLAY NOTE User s Manual Short description Saves the general window layout Syntax SLAY filename Argument filename Name of file with full path where component window layout is saved Description The SLAY command is used to save the layout of all component windows available in the main window Example slay mcuez demo mylayout hwl The current layout is saved in the file mylayout hwl Layout files usually have an hwl extension However any file extension can be specified If no path is specified the destination directory is the current project directory MCUez HC05 HC08 Debugger 174 Command Reference MOTOROLA SMEM Command Reference Component Commands Short description Shows a memory range Syntax SMEM range Argument range Address range constant that defines the block of memory to be displayed Description This command applies to the Source Assembly and Memory component windows In the source component the SMEM command displays the corresponding module s source text scrolls to the corresponding text location the code address and highlights the statements which corre
46. Syntax FIND string B MC WW Arguments string Pattern to match B Searches backward default is forward MC Match case WW Match whole word Description In the source component the F IND command is used to search a specified pattern in the source file currently loaded If the pattern has been found it is highlighted The search is forward default backward B match case sensitive MC or match whole word WW The operation starts from the currently highlighted statement or from the beginning of the file if nothing is highlighted If the item is found the Source window is scrolled to the position of the item and the item is highlighted Equivalent operation Select Source Find or open the Source pop up menu and select Find to open the Find dialog Example in FIND this B WW The this string considered to be a whole word is searched in the Source component window The search is performed backward MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 169 Command Reference FONT Short description Sets the text font Syntax FONT FontName size color Arguments FontName Name of a valid font installed on the system If the specified font is not found Windows will try to find an available font that best fits the specification size Defines the font size This parameter must be a positive numerical constant representing a point
47. VS Mets es PERIERE QUEEUCDARS AAA ARA 205 GS Debugger Status Mi ri AAA AAA 205 C 4 MMEVS0506 Target Menu occasus c Rr ERR RR 206 C 5 Memory Configuration Dialog Box oooooooooomoo o 207 MCUez HC05 HC08 Debugger 16 List of Figures MOTOROLA Figure C 6 Open Personality File Dialog Box C 7 Memory Map Error Message C 8 Target Signals Dialog Box D 1 Component Menu D 2 MCUez Status Bar D 3 MMDS0508 Target Menu D 4 Memory Configuration Dialog Box Open Memory Blocks Dialog Box D 6 Memory Map Error Message D 5 D 7 Target Signals Dialog Box D 8 Trace Component and Menu D 9 Trace Component Window and Pop up Menu D 10 Bus Analyzer Configuration Dialog Box Search for Pattern D 11 D 12 Bus Analyzer Configuration Sequencer Tab D 13 Bus Analyzer Configuration Time Tag Clock D 14 Trace Window Elements D 15 Trace Window Graphical Display Zoom In D 16 Trace Window Zoom Out D 17 Items Configuration Dialog Box D 18 Item Content Dialog Box D 19 D 20 MCUez HC05 HC08 Debugger Search for Event or Pattern Search Frame Dialog Box D 21 Search Event Specification Dialog Box D 22 Search for Pattern D 23 Dump Bus Analyzer Frames Dialog Box List of Figures User s Manual MOTOROLA List of Figures 17 List of Figures User s Manual MCUez HC05 HC08 Debugger 18 List of Figures MOTOROLA User s Manual MCUez HC05 HC08 Debugger Table 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8
48. a command execution Alternate operation associated with IF command Alternate conditional operation associated with IF Resets the current focus see FOCUS command Exits a FOR loop Exits an IF condition Exits a WHILE loop Sets the focus on a specified component FOR loop instruction Unconditional branch to a label in a command file Conditional branch to a label in a command file Conditional execution REPEAT loop instruction Returns from a CALL command Condition of a REPEAT loop Command file execution pause WHILE loop instruction User s Manual Command Reference 95 Command Reference 5 3 2 Target Commands User s Manual Target commands are used to monitor the MCUez target execution Target input output files target execution control direct memory editing breakpoint management and CPU register setup are handled by these commands Target commands are executed independent of open components Command Syntax BC address BD BS address P T CALL filename C NI CD path CF filename C NL CR filename A DASM address range OBJ DB address range DEFINE symbol DL address range DW address range G address LF filename A LOG type state type state LS symbol C S MEM MS range list NB base NOCR NOLF P add
49. abs Files of type Executables abs Cancel m Load Options Load Code Symbols C Load Symbols only Load Code only L Figure 4 2 Load Executable File Dialog Box Figure 4 3 illustrates an executable file loaded in the debugger The source component displays the source from the module containing the entry point for the application The highlighted statement is the entry point The assembly component contains the corresponding disassembled code The highlighted statement is the entry point from the application The code is disassembled directly from the target board memory MCUez HC05 HC08 Debugger 76 Operating Procedures MOTOROLA Operating Procedures Loading an Application The global data component contains the list of global variables defined in the module containing the application entry point The PC program counter in the register component is initialized with the PC value from the application entry point MCUez Ci xi Fie View Bun MMDSO508 Component Window Help CAMCUEZADEMO he 05 hbo DBG REPEAT fibo dog Auto counter 254 unsigned char fiboCount 12803 int j 221 unsigned char n 239 unsigned char Target Reset caused Stop im 00 1F 00 oc OD OE 00 82 80 fibo dbg 00 00 00 SA 20 48 43 NCUeZ HC 7 eF en NE hanno 115200 Backgwd Disamed M amp SHCOSPS 1 4 7 Target Reset caused Stop Figure 4 3 Loading an Application MCUe
50. are not updated when the target is stopped 3 In periodical mode variables are updated at regular time intervals when the target is running The default update rate is 1 second The update rate can be modified in steps of up to 100 ms Update Rate X Rate 100 ms Cancel Figure 3 21 Update Rate Data Component 3 3 7 Command Line Component Window User s Manual MCUez commands are entered on the right side of the in gt terminal prompt in the Command Line component window To recall a command use the up arrow key down arrow key or special function key F3 The component executes the command entered and displays results or error messages The 10 previous commands can be recalled using the up or down arrow keys Commands are displayed in blue Prompts and command responses are displayed in black Error messages are displayed in red Enter help at the command prompt to display a list of commands MCUez HC05 HC08 Debugger 68 Component Windows MOTOROLA Component Windows Components NOTE Memory ranges addresses and values can be dropped into the command line component Nothing can be dragged from the command line component The command line component accesses corresponding items of the current command Refer to Section 5 Command Reference for detailed information regarding MCUez commands Execute File Copy Paste Figure 3 22 Command Line Component Menu Table 3 3 Command Line Operations
51. bckcolor white ENDIFE When logging is enabled for commands executed from a command file all commands executed in the FOR loop are logged each time they have been executed User s Manual MCUez HC05 HC08 Debugger 136 Command Reference MOTOROLA Command Reference Target Commands Example When executing this file define i 1 FOR i 1 3 ls ENDFOR This log file is generated 1 3 L gt define i FOR i ls 0x1 1 DFOR ls Ox2 2 DFOR ls 0x3 3 ENDFOR When logging is enabled for commands executed from a command file all commands executed in the WHILE loop are logged each time they are executed Example MCUez HC05 HC08 Debugger When executing this file define i 1 WHILE i 3 define i i 1 ls ENDWHILE This log file is generated Idefine i 1 IWHILE i lt 3 define i i rds i 0x2 2 ENDWHILE l define i i ls i 0x3 3 ENDWHILE User s Manual MOTOROLA Command Reference Command Reference LS Short description Displays the list of symbols Syntax LS symbol C 1S Arguments symbol A restricted regular expression that specifies the symbol whose values are to be listed This argument is case sensitive Lists all symbols Ae Lists symbols in accepted format which consists of a DEFINE command for each symbol ao List
52. choose which actions to take when a certain pattern event or sequence of patterns appear on the bus To trigger the bus analyzer define the desired bus state s as terms and select the desired sequence of terms as a trigger event To select a recording mode click on the Sequencer tab in the Bus Analyzer Configuration dialog box In continuous and counted modes non triggered modes collection does not stop until the analyzer is terminated The analyzer stops when the application stops or the bus analyzer is disarmed In sequential triggered modes the defined terms are used to track the occurrence of events Data collection is stopped based on certain combination of events Each term has an associated pre event count that will count events for that term The sequencer condition will use that term when the count is reached An event is a pattern of bus signals which can include addresses and data values to which the analyzer is connected by logic clips and miscellaneous MCU signals An event can also be the negation of a defined pattern Each signal can be defined as asserted negated or ignored don t care User s Manual MCUez HC05 HC08 Debugger 228 MMDS0508 Target MOTOROLA MMDS0508 Target Using the Bus Analyzer Bus Analyzer Configuration Ea Triggers Patten Sequencer Time Tag Clock m Analyzer Recording Mode C Continuous All Cycles C Continuous Events Only C Counted Events Only C Sequentia 4 B C D
53. command file is started In the event that command files are chained one calling another the delay is measured from the time the first command file is started This command can be executed only from a command file The time specified is relative to the start of the command file Example AT 10 OPEN Command This command opens a command line component 10 ms after execution of the command file MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 103 Command Reference CALL Short description Executes a command file Syntax CALL FileName C NL Description The CALL command is an alias of the CF command Refer to the CF command in 5 3 2 Target Commands for a description and examples DEFINE Short description Defines a user symbol Syntax DEFINE symbol expression Arguments symbol User defined name expression User defined expression assigned to symbol name Description The DEFINE command creates a symbol and associates the value of an expression with the symbol Arithmetic expressions are evaluated when the command is interpreted The symbol represents the expression until the symbol is redefined or undefined using the UNDEF command A symbol is a maximum of 31 text characters In a command line all symbol occurrences after the command name are substituted by their values before processing A symbol cannot represent a command name A symbol definition pr
54. command syntax descriptions follow address A number matching a memory address This number can be specified in the ANSI C format for instance Ox for hexadecimal value O for octal or in the MCUez assembler format for hexadecimal for octal for binary Example 255 0377 OxFF SFF NOTE address can also be an expression if constant address is not specifically mentioned in the command description An expression can be Global application variables I O register definitions defined in DEFAULT REG definitions in the command line and numerical constants Example DEFINE IO_PORT 0x210 WB IO_PORT OxFF range A composition of two addresses that define a memory address range The syntax is shown as address address or address size where size is an ANSI format numerical constant Example Ox2F00 0x2FFF Refers to a memory range starting at Ox2FOO and ending at Ox2FFF 256 bytes Example 0x2F00 256 User s Manual MCUez HC05 HC08 Debugger 98 Command Reference MOTOROLA Command Reference Expressions Refers to a memory range starting at 0x2F 00 which is 256 bytes wide Both previous examples are equivalent filename A DOS filename and path that identifies a file and its location The command interpreter does not assume the filename extension Use backslash V or slash as a directory delimiter The parser is case insensitive If no path is spec
55. cursor and drop when the mouse button is released 1 3 3 Typographic Styles in This Manual These typographic conventions are used in this manual Bold face type is used for literal strings that must be used exactly as shown in the example and for the names of menus windows dialog boxes icons and buttons Courier type face is used for all C code program listings command lines and directories e Italics are used where the string is a place holder that may be substituted for a string of the user s own design e Variable user inputs are in Courier italics e Filenames are in italics with all lower case letters for example proj ext MCUez HC05 HC08 Debugger User s Manual MOTOROLA General Information 23 General Information These styles are used in this manual to define notational conventions Numeric constants Numeric constants are displayed in the C language format Constants that are in the Ox format are hexadecimal Constants that have no prefix are assumed to be decimal The notation k unless to denote a frequency setting in kilohertz defines a number multiplied by 1024 Function prototypes Structures and function call descriptions are given in terms of the C language This does not limit the implementation of calling programs to C but it 1s the calling routine s responsibility to provide the correct link to these routines User s Manual MCUez HC05 HC08 Debugger 24 General Information MOTO
56. display or hide it File E v Toolbar e v Status Bar Run Figure 2 13 View Menu 2 6 4 3 Run Menu The Run menu is used for debug operations Table 2 1 defines all Run menu commands Table 2 1 Run Menu Menu Entry Description Starts or continues execution of the loaded application until a Start Continue breakpoint is reached a runtime error is detected or the user stops the application using Halt Interrupts and halts a running application enabling examination Halt of the state of each variable in the application setting of breakpoints and inspection of the source code If the application is halted this command performs a single step Assembly Step for instance execution continues for one CPU instruction from the point it was halted Assembly Step Similar to the Assembly Step command but does not step into Over called functions steps over subroutine call instructions Opens the Breakpoints Setting dialog which lists breakpoints defined in the application and allows their properties to be modified Breakpoints also can be set in the Source and Assembly component windows Breakpoints User s Manual MCUez HC05 HC08 Debugger 36 Getting Started and User Interface MOTOROLA Getting Started and User Interface Graphical Environment The menu entries except breakpoints have an associated toolbar button Figure 2 14 illustrates the Run menu Start Continue Halt Assembly S
57. ee era A 180 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Index 277 User s Manual MCUez HC05 HC08 Debugger 278 Index MOTOROLA Technical support for MCUez development tools is available through your regional Motorola office or by contacting Motorola Inc 6501 William Cannon Drive West MD 0E17 Austin Texas 78735 Phone 800 521 6274 Fax 602 437 1858 CRCOCRC email sps mot com Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any prod uct or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Motorola does not convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which t
58. es bh eshe soe shes IW ELE REPE 238 Daa SO LOB eas odd cp pde ed beide dde eee d ds oes 239 D 9 Add Remove Items in the Trace Window 239 MCUez HC05 HC08 Debugger 12 Table of Contents MOTOROLA Table of Contents DIU South saciedad FP ROSS RE DRE 8608008508 28 240 DAtkl Search tors Frame cisco RAERX REX RUEEEXER dE 240 DIU SeachforBEVelS lax EE eed den ERE GSP ds ee 241 D 10 3 Next Bvent c 6ccaseceedckvectwcheesuweckeeauweeuve 242 D04 Preyions Evel A URDU GR ALORS 242 D105 Beach lora Pate ae hei eh Gp CERERI ERE ES CREER 242 D 10 6 Next Patte eoe mese SURE PEG SEEMS E EGRE EG e 243 DIO7 Previos Paulteth c iesu E ete ba ame AERE RR bition 243 D 11 Dumping Bus Analyzer Data toa File 244 D 12 MMDS Commadds ee 245 Index Bici o EN Ladies dct Cap ite EE GE La E eee 271 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Table of Contents 13 Table of Contents User s Manual MCUez HC05 HC08 Debugger 14 Table of Contents MOTOROLA User s Manual MCUez HC05 HC08 Debugger List of Figures Figure Title Page 2 1 Hardware Connectioli ee dedere d eR EE ERROR HE RE ones 2 mu Wer A LEADEOR TAE ES 2T oo 00 loro ir rr ari 29 I4 MNDSUSDS Go iiio ho 3E ECRIRE ROCA AREE o ES 29 20 Establishing a L ODDSCUUD os 54 oases Gee et REG REA RES iuni 30 26 Communication Device Dialog Box aiioscesss e voe vw 30 2 7 MCUez Debugger and Component Windows
59. expand array User s Manual The data component contains the names values and types of variables The Data component window shows all variables present in the current source module Display formats such as symbolic representation depending on the variable types as well as hexadecimal octal binary signed and unsigned formats are selectable The object information bar contains the address and size of the selected variable It also contains the module name where the displayed variables are defined the display mode automatic frozen etc and the display format symbolic hex bin etc Values can be edited by double clicking on a value or the line containing a value Arrays can be expanded by clicking on the plus symbol preceding an array name Figure 3 17 shows the Data component window Imacrodem dbg Auto Symb Global A 253 unsigned char cccl 221 unsigned char destinationl array 15 of unsigned destination2 array 15 of unsigned destination3 array 15 of unsigned destination4 pH array 15 of unsigned sourcel MCUeZ HCOS array 11 of unsigned sourcez Assembler array 10 of unsigned FEO De A mance mee 100 eg 2 m ome m el Figure 3 17 Data Component Window MCUez HC05 HC08 Debugger 64 Component Windows MOTOROLA Component Windows Components 3 8 6 1 Expression Editor To add an expression double click a blank line in the data component to open the Exp
60. highlights the corresponding statements The SMOD show module command displays the corresponding module s source text If the module is not found a message is displayed in the Command Line component window The SPROC show procedure command loads the corresponding module s source text scrolls to the corresponding procedure and selects highlights the statement in the procedure chain of this procedure The SPROC command is applicable only for C source level debugging The numberAssociatedwithProcedure is the level of the procedure in the procedure chain The MARKS command displays or hides the marks Marks are visible in the Source component window Example Source ATTRIBUTES MARKS ON Equivalent operations ATTRIBUTES SPC Drag and drop from register component to source component ATTRIBUTES SMEM Drag and drop from memory component to source component ATTRIBUTES SMOD Drag and drop from module component to source component ATTRIBUTES SPROC Drag and drop from procedure component to source component ATTRIBUTES MARKS Select menu Source Marks User s Manual MCUez HC05 HC08 Debugger 160 Command Reference MOTOROLA In the Data Component Syntax ATTR BUTES list Command Reference Component Commands list command command command FORMAT bin oct hex signed unsigned symb frozen Arguments hex oct bin symb signed unsigned per
61. in Data 1 and Data 2 A number is automatically associated with a component if more than one instance of the component exists The redirect left symbol redirects a command to a specific component Some commands are valid for several or all components If the command is not redirected to a specific component all concerned components will be affected Also a mismatch could occur due to the fact that command parameters could differ from one component to another for the same command name MCUez HC05 HC08 Debugger 94 Command Reference MOTOROLA 5 3 List of Available Commands Command Reference List of Available Commands This section lists and defines each available MCUez debugger command 5 3 1 Kernel Commands Kernel commands are used to build command files Therefore they can be used only in an MCUez command file The command line component accepts one command at a time It is possible to build powerful programs combining kernel commands with target commands and component commands Command Syntax AT time ELSE ELSEIF condition ENDFOCUS ENDFOR ENDIF ENDWHILE FOCUS componentName FOR variable range DF m step GOTO label GOTOIF condition Label IF condition EPEAT RETURN AIT time s R R UNTIL condition W W HILE condition MCUez HC05 HC08 Debugger Short Description Sets a time condition for
62. is vertically positioned on the matching frame in the center of the screen If a matching frame is not found the line cursor is not moved When no search pattern is defined the command searches for any pattern for example the line cursor moves to the next line or preceding line Syntax GP B Argument ZB Specifies a backward search When this option is omitted a forward search is performed Examples GP Searches forward for the next frame that matches the search pattern GP B Searches backward for the previous frame that matches the search pattern MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 249 MMDS0508 Target LF Log File Description The LF command is used to specify a log file to store contents of the bus analyzer trace buffer Syntax LF lt filename gt Example LF mylog txt Create log file to obtain trace buffer data LOADMAP Load Memory Map Description The LOADMAP command allows the user to load a memory map from a file If the specified file starts with a number it should be preceded by a period and slash for example LOADMAP N00123V22 mem Syntax LOADMAP filename MCU ID Arguments filename Specifies a memory file that defines a memory map MCU ID MCU identifier If specified the command will load the memory file that matches the MCU Id Example LOADMAP 0x3C1 Loads memory map from a file that matches
63. or the RAM NONE 0450 6DFF NONE ROM BEOD FDFF ROM 10 FEOO FEOF PRU or TOP TOP board resource or the NONE FE10 FFDF NONE ROM FFEO FFFE ROM COP FFFF FFFF special ram for cop Start o End ar Type fio y Comment PRU or TOP TOP board resource or the PRU Add Update Delete Cancel Help Figure C 5 Memory Configuration Dialog Box C 4 4 1 Configuration Auto select according to MCU Id Upon starting the debugger the target memory setup is automatically loaded The debugger loads the memory map file mem related to the MCU Id If not checked the previously opened or saved memory map file is automatically loaded Load Opens a dialog box Figure C 6 to locate and load a different memory file If a file is not found or is invalid an error message is displayed Figure C 7 Memory personality files can also be loaded with the LOADMAP command line command To work properly the ESL target must load the memory file that matches the connected emulation module MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMEVS0508 Target 207 MMEVS0508 Target Open Personality File Look in SJ wWmmevs 5a J Fie name Files of type Personality files Cancel Open as read only Figure C 6 Open Personality File Dialog Box The personality file for Id BFE was not found in directory C MCUEZ PROG MEM If a matching MEM file is available click Retry to sele
64. seeresthxuse B 4 1 Operations AA B 4 2 Dine Ub RM B 4 3 AA Bo Data cGHpotilil oasiesscas LECCE DENT ER B 6 Breakpoints Setting Dialog B 7 General Rule for Halting on a Control Point B 8 Configuring the Default Layout BS Loading an Application l2 B 10 Stopping an Aplication cossisscoracionsuasi s B 11 Defining Counting Breakpoints B 12 Stepping in the Application B 121 Stepping at Source Level osse sea B 12 2 Stepping Over a Function Call Flat Step B 12 3 Stepping Out of a Function Call B 13 Displaying a Local Variable from a Function B 14 Miscellaneous C Source Level Commands MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 187 C Source Level Debugging B 2 Introduction NOTE This appendix provides information on performing C source level debugging with the the MCUez debugger The C source level debugging process is applicable only for applications that are compliant with the ELF DWARF 2 0 object format standard A license key is required to activate this feature Contact HIWARE AG for information on CSLD pricing and how to obtain the license key B 3 Source Component NOTE User s Manual The Source component window displays the source code of the program application file It enables the user to view change monitor and control the current execution location in th
65. size color Defines the font color BLACK GREY LIGHTGREY WHITE RED YELLOW BLUE YAN GREEN PURPLE LIGHTRED GHTYELLOW LIGHTBLUE LIGHTCYAN GHTGREEN LIGHTPURPLE C I L Description The FONT command changes the font type color and size The color specified in the FONT command applys to all text displayed in the component windows Do not use the same color for the font and background otherwise text will not be visible Font color exceptions Exceptions apply to the command line component and source component Colors used in the command line component are fixed and cannot be changed The prompt and responses are displayed in black commands in blue and error messages in red Colors used in the source component are also fixed ANSI C keywords are displayed in blue comments in green and strings in red The rest of the code is displayed in the color specified in the FONT command Equivalent operation The Component Fonts menu option will display the Font dialog Example FONT Arial 8 BLUE Text is written in blue using the Arial 8 point font User s Manual MCUez HC05 HC08 Debugger 170 Command Reference MOTOROLA HELP Short description Command Reference Component Commands Displays a list of available commands Syntax HELP Description In the command line component the HELP command displays all available primary commands Subcomman
66. the MCU Id User s Manual MCUez HC05 HC08 Debugger 250 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands LT Log Trace Description The LT command copies the contents of the bus analyzer trace buffer to the log file The trace buffer is logged in the current view format An LF log file command must be executed before entering the LT command to initiate logging The target must be stopped to execute an LT command Syntax LT lt range gt Argument range Specifies a range of frames to be copied If range is omitted all frames in the trace buffer are copied The default number base for range is decimal Examples LF logfile Open the log file LT 10 20 Copy frames 10 to 20 to log file NOLF Close the log file MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 251 MMDS0508 Target OSC Select Emulator Clock Frequency Description The OSC command selects the emulator clock frequency Six clock frequencies are available Five internally generated clock frequencies are available 16 MHz 8 MHz 4 MHz 2 MHz and 1 MHz An external clock source is also available The default emulator clock rate is set by the firmware and adapted to the current frequency Enter this command without parameters to open the equivalent Target Signals dialog box Syntax OSC lt rate gt lt source gt Arguments rate OSC1MHZ Selects the 1 MHz oscillator OSC2MHZ Selects th
67. the last instruction that was disassembled by the most recent DASM command If this is the first DASM command of a session disassembly begins at the current address in the program counter Press the Esc key to stop the command Equivalent operation Right click in the Assembly component window select Address and enter the address to start disassembling in the Show PC dialog User s Manual MCUez HC05 HC08 Debugger 126 Command Reference MOTOROLA Example in dasm Oxf04b OOFO4B LDHX OOFO4E TXS OOFO4F CLRH 00F050 CLRX 00F051 STX 00F053 INC 00F055 LDX 00F057 JSR OOFO5A STX 00F05C STA DOFO5E LDA 00F060 CMP 00F062 BEQ 00F064 BRA 00F066 DECX 00F067 DECX MCUez HC05 HC08 Debugger 0x0450 0x80 0x80 0x80 OxFO0O00 0x82 0x81 0x17 0x80 20 19 Command Reference Target Commands abs F050 abs F053 Disassembled instructions are displayed in the Command Line component window User s Manual MOTOROLA Command Reference 127 Command Reference DB Short description Displays memory bytes Syntax DB lt address gt lt range gt Arguments address Address constant expression indicating the address of the first byte to be displayed range Address range constant indicating the range of addresses to be displayed If range is omitted one byte is displayed If address and range are omitted the first byte displayed is take
68. user can drag objects from one component window to another This is defined as drag and drop For example the user can display the memory layout corresponding to the address held in a register by dragging the address from the register component for instance EA to the memory component See the example in Figure 2 19 ll Register i OF XI x 1 s FF SR EA Status HINZC PE 141 OOFO 7F F7 EF 7F DB BE 3E EB gt Ej OOFS DF OF 8D FF FD DF BF 73 8 0100 BF 84 3F 86 3F 85 B6 84 0108 B7 SA 3F 89 A6 01 B7 88 NIIN 3F A7 AF n RF R3 2n 1F 2 Y Figure 2 19 Component Drag and Drop Example MCUez HC05 HC08 Debugger 40 Getting Started and User Interface MOTOROLA Getting Started and User Interface Drag and Drop 2 7 1 Drag and Drop an Object To drag and drop follow this step by step procedure 1 2 3 4 Select the component window containing the object to drag Make sure the destination component window is visible Select and hold the object with the left mouse button Drag the object into the destination component window and release the mouse button The following sections describe the possible combinations of drag and drop between components and associated actions If the destination of a dragged item is not possible the cursor is displayed as a circle with a line through it 2 7 2 Dragging from the Assembly Component The drag and drop actions shown in
69. which the breakpoint has been set state of the breakpoint disabled or not and type of breakpoint temporary or permanent A Counter group box that displays the current value and interval value of the counter This group allows the user to define a counting breakpoint See B 10 Stopping an Application A Delete button to remove the currently selected breakpoint OK button to validate all modifications Cancel button to disregard all modifications and retain previous values Help button to open the help file See Figure B 4 B 7 General Rule for Halting on a Control Point Counting Control Point If the interval is greater than one 1 a counting control point has been defined When the application is running its current value is decremented each time the control point is reached The application will halt on this control point if the value is equal to zero 0 If a command has been defined and enabled the command is executed when the application is halted on the control point B 8 Configuring the Default Layout This line must be in the project ini file to establish a default layout for the debugger User s Manual Window2 Procedure 0 30 50 15 MCUez HC05 HC08 Debugger 192 C Source Level Debugging MOTOROLA C Source Level Debugging Loading an Application EABIN TESTS fibo c DAADE sorting unsigned int Fibonacci unsigned int n 5 805C fibo c Fibonacci E 3 3 iho 805F fibo c Fibonacci
70. 05 HC08 Debugger 84 Operating Procedures MOTOROLA Operating Procedures Stepping in the Application 4 10 Stepping in the Application The debugger provides stepping functions at the assembler level Implementing stepping functions is described in the following subsections 4 10 1 Stepping on Assembly Level The debugger provides two ways of stepping to the next assembler instruction 1 Select Run Assembly Step 2 Click the Assembly Step button on the toolbar The message TRACED in the status line indicates that the application is stopped by an assembly step function The application stops at the next assembler instruction The display in the source component is always synchronized with the display in the assembly component The highlighted instruction in the source component is the source instruction that has generated the highlighted instruction in the assembly component Elements displayed in red in the register memory or data components are values that have changed during execution of the assembly instruction 4 10 2 Stepping Over a Function Call Flat Step The debugger provides two ways of stepping over a function call 1 Select Run Step Over 2 Click the Step Over button on the tool bar The message STEPPED OVER in the status line indicates that the application is stopped by a step over function If the application was stopped previously on a function invocation a JSR Gump to subroutine o
71. 1 MMDS0508 Target D 10 3 Next Event In the Trace pop up menu select Search Next Event to search forward for the next frame that matches the specified event The user can also press the N key while the Trace window is active to find the next event D 10 4 Previous Event Open the Trace pop up menu and select Search Previous Event to find the previous frame that matches the specified event The user can also press the P key while the Trace window is active D 10 5 Search for a Pattern To search for a frame with a specific pattern select Trace Search Pattern Define the search pattern to find all stored bus cycles that match the pattern The pattern consists of an address a data word logic clips and four miscellaneous signals Bus Analyzer Configuration X Pattern Symbol counter Invert Address o008 Mask 0000 Strobes gt Data jo Mask jo RAY r Group A Clips Group B Clips Cow pto Pa a ERES a pe cues pa e ERES en Clear All smwx BRNx emwx Banx Cancel Help Figure D 22 Search for Pattern User s Manual MCUez HC05 HC08 Debugger 242 MMDS0508 Target MOTOROLA MMDS0508 Target Searching The bus analyzer will search for the defined pattern in the trace buffer then highlight and display the matched frame in the Trace window Address Specify the Address to be matched Data Specify the Data value to be matched Strobes Specify the state of R W and LIR X
72. 1 A AA dew Edaegand ebd d b eas 207 C 4 4 2 o 00 errar M 209 C 4 5 Target Sianal vr AA 209 C3 e AA 210 MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMEVS0508 Target 203 MMEVS0508 Target C 2 Overview This appendix introduces the MMEVS0508 modular evaluation system for the MC68HCO05 and MC68HC08 MCU Families The MMEVS0508 is an emulator system designed by Motorola for MCUs that use a CPUOS or CPUOS to provide emulation memory MMEVS interface allows an external target system based on a Motorola MCU to download an executable program from the MCUez environment execute it and relay the results of the real target system behavior to the MCUez debugger The debugger fully supervises and monitors the target system s MCU It also controls CPU functions such as read and write in internal external memory even when the CPU is running and single step run stop processes C 3 Loading the MMEVS0508 Target User s Manual From the debugger load the MMEVS0508 target by selecting Set Target from the Component menu Figure C 1 and selecting ESL emulator server library from the list of targets Target Ma Window Help Open mi Set Target Fonts Background Color Figure C 1 Component Menu The ESL driver automatically attempts to locate the MMEV S0508 If the target is successfully loaded the MMEVS0508 menu replaces the Target menu Figure C 2 and the debugger status bar
73. 3 Data Component Window ci csnciacceaeecunceedeebontas 64 Pxpression Pour esop Vends s PRERA ERG EPERSE 65 Data Component Pop up Menus 4 67 Data Update Mode oss etc ta dex vara nales 68 MCUez HC05 HC08 Debugger 8 Table of Contents MOTOROLA 3 3 7 4 3 8 4 1 4 2 4 3 4 3 1 4 4 4 5 4 6 4 7 4 8 4 9 4 9 4 9 2 4 9 3 4 9 4 4 9 5 4 10 4 10 1 4 10 2 4 11 4 11 1 4 11 2 4 11 3 4 11 4 4 11 5 4 12 4 12 1 4 12 2 4 12 3 4 12 4 MCUez HC05 HC08 Debugger Table of Contents Command Line Component Window 4 5 68 Module Component Window i oss lt eus4 eee ed ARA 70 Section 4 Operating Procedures LODS A cs eoe AAA 71 i sees hos Hn ee err b er E e Red eas 72 Configuring the MCUez Debugger osrcisiiesices resis das 13 Configuring for Use with EditOrS o oooooooomooo o 73 Automating the MCUez Startup Process oooooooooooo 74 Contigurineg the Default Layout ccosiossiciacrroriasrcrs dies 74 Loading an Applicatiof Lusashad esa es IAPEAIVEN4uqEP cR RR ston 76 Starting an APMC 2 co cicedc ceed agecedesieisinosae S AREA 78 Stopping an ADDBORUDER ra 78 o 40 1 9 T r rre 79 Breakpoint Symbols socsprrric kk da RAV EERE RI tees 80 Identifying All Positions to Define a Breakpoint 8l Dannie s Breakpoint MA 82 Deleting a Breakp ini 1222s suada es ai a4 A hh ERES 82 Breakpo MS MIA I HOHER d EE Rr Id 83 Stepping in Mhe Application cpsicistons
74. CED A 0x0 HX 0x7F02 SR 0x62 PC 0xF032 SP 0x44D 00F032 B787 STA 0x87 Contents of registers are displayed and the current instruction is disassembled MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 151 Command Reference WB Short description Sets a specified block of memory to a specified list of byte values Syntax WB range list Arguments range Address range constant that defines the block of memory to be initialized to the values of the bytes in the list list List of byte values to be stored in the block of memory Description The WB command sets a specified block of memory with a specified list of byte values When the range is wider than the list of byte values the list of byte values is repeated as many times as necessary to fill the memory block This command is identical to the memory set MS command Example WB 0x0401 0x19 0x69 This command fills up the memory range 0x0401 0x0402 with the byte values 0x19 and 0x69 Example WB 0x0205 0x0220 OxFF This command fills up the memory range 0x0205 0x0220 with the byte value OxFF User s Manual MCUez HC05 HC08 Debugger 152 Command Reference MOTOROLA WL Command Reference Target Commands Short description Sets a specified block of memory to a specified list of longword values Syntax WL range list Arguments range Address range constant that defines the block of memory to be set to the longword value
75. CU and continues RESET Resets the MCU and stops default MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMEVS0508 Target 213 MMEVS0508 Target SIG Target Signal Emulation Command Description The SIG command enables or disables control signals from the target MCU and controls emulation If a signal or list of signals is entered without specifying ENABLE or DISABLE the signals are enabled If no signal is specified the Target Signal dialog box appears Syntax SIG ENABLE signal lt signal gt DISABLE signal lt signal gt Arguments signal The signal to be enabled or disabled Available signals are RESETIN and RESETOUT ENABLE Connect the signal from the target system DISABLE Disconnect signal from the target system Example SIG ENABLE RESETIN Enables the RESET IN signal from the target system User s Manual MCUez HC05 HC08 Debugger 214 MMEVS0508 Target MOTOROLA User s Manual MCUez HC05 HC08 Debugger Appendix D MMDS0508 Target D 1 Contents ER 0 o AAA 216 D3 Loading the MMDS0508 Target 40 44042460 sa8deendeen dase 217 D 3 1 MMDS Target Startup File oo csacstgicedsccacdeussseaes 218 DA MIMDSOSOS Target Ment os og cccasibesceadesendeeesbecce 218 D 4 1 AI 218 D 4 2 A cT 218 D 4 3 COM e A A a 219 D 4 4 Memory Misco rotor E ERR ESOS APTE EPERVETEE 219 D 4 4 1 A Ga oo cca ETELE a qrapdi lo dones d
76. Correct module names such as FIBO DBG are displayed in the Module component window BC amp FIBO DBG Fibonacci In this example an expression replaces the address F IBO DBG is the module name and Fibonacci is the function where the breakpoint is cleared This example deletes the breakpoint set at the start address of the symbol Fibonacci defined in the module fibo dbg MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 119 Command Reference BD Short description Displays all breakpoints currently defined Syntax BD Description In the command line component the BD command displays the list of all breakpoints with addresses and types temporary permanent For each breakpoint this information is displayed SymbolName address type SymbolName is the symbol or function where the breakpoint is defined address is where the breakpoint is set type represents type of breakpoint T stands for temporary breakpoints and P for permanent breakpoints Example in gt BD Fibonacci 0x805c T Fibonacci 0x8072 P Fibonacci 0x8074 T main 0x8099 T Currently one permanent and two temporary breakpoints are set in the function Fibonacci and one temporary breakpoint is set in the function main NOTE This list will not display whether a breakpoint is disabled or active User s Manual MCUez HC05 HC08 Debugger 120 Command Reference MOTOROLA Command Reference Target Commands BS Short descriptio
77. Dialog Box Find dialog box options are Match whole word only If this box is checked only strings separated by special characters are recognized Match case If checked the search is case sensitive The Up Down buttons will enable the search backward or forward If the string is found it is highlighted If the string is not found a message is displayed NOTE ifanitem single word or source section has been selected in the source component before opening the Find dialog the first line of the selection will be automatically copied into the Find what edit box User s Manual MCUez HC05 HC08 Debugger 54 Component Windows MOTOROLA Component Windows Components 3 3 3 Assembly Component Window The assembly component displays program code in disassembled form The assembly component function is similar to that of the source component enabling the user to view change monitor and control the current location of program execution The assembly component contains all disassembled instructions generated by the application Each disassembled line shows this information e Address e Machine code Instruction e Absolute address for branch instruction Per default the instruction and absolute address for a branch instruction are visible The program instruction and absolute address also can be viewed by selecting the corresponding menu entry Breakpoints set in the application are marked with a special symbol If
78. EF Short description Command Reference Kernel Commands Undefines a user defined symbol Syntax UNDEF symbol Arguments symbol User defined symbol Undefines all symbols previously defined with the DEFINE command Description The UNDEF command removes a symbol definition from the symbol table UNDEF does not undefine symbols that have been defined in the loaded application Program variables whose names were redefined using the DEF I command become visible again Undefining an undefined symbol is not considered an error Example DEFINE test UNDEF test 1 NE When the test variable is no longer needed it can be undefined and removed from the symbol table After UNI cannot be used unless it is redefined MCUez HC05 HC08 Debugger DEF test the test variable User s Manual MOTOROLA Command Reference 115 Command Reference UNTIL Short description Specifies the condition of a REPEAT loop Syntax UNTIL condition Argument condition Defined as in C language syntax Description The UNTIL command is associated with the REPEAT command Refer to the REPEAT command User s Manual MCUez HC05 HC08 Debugger 116 Command Reference MOTOROLA WAIT Short descr Command Reference Kernel Commands iption Insert a pause in a command file execution Syntax WAIT time s Arguments time Specifies time interval to pause command e
79. IIOD amp 6 cebamARAC ERR GA raras 81 SEIL es ouv 24 A EREXIT EA EE EC Ki EUER RES DER 79 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Index 271 User s Manual BS EAE 121 BUS ADA AE rd coa 223 C CALD arroba leia eda a epit ipd Sent d ane iae ceti d 104 Cal Chill bortis e b RES eee Bese eee bed dese eee as 189 Ob eres re ee RNC VACARE HCR Pp UR OR ARR A RR ee eee aras S 122 a cL 123 CLOSE 02456 ce Bees GGrk seek REQUE ERE eR E ERES ek adiri Se 167 Mon gsm oid PM 38 Command IOS DP P oe ne oe CES ea eee ee eee Ae een De 118 NICUBZ os es REC ste pbi ac b RE sages RELAX EI eek 155 vc PR 94 Component ASCO croatas period RA E dde 76 78 Dio do ra oda PO Be ae Hee OS oO eRe 71 78 86 193 Memo es ia batakevidawedesebarataridasecetacassaasiiheanes 91 P oced re MEER 189 Dian draer PPRE tei iie cT E 77 88 SOULCE i hale be re And bo VE ASAD SPP C PROTI UG RETI MP UPRO TS 76 78 CPU MESSA Ee Conv ErREARAVERTRSEERERR RSRK UE E AG ERU ES KR EE 34 ADDRESS ERROR 24e bec EG ERR Dx ERES eee eens Eqs 34 5 D dies 125 Cross debuggIng cciam rA REGERE RP RES dd RR RE d Es 21 D DASM ascuas RE ERE AUN dro da dais NR ates 126 Data Pom eked Rx hie RRERTOMDCKP X3 hex eS Rees UeRE AR RT 30 e saa ae nn Imp 128 Decade adi 87 91 D ctinalJ 2c si ad a Es 87 91 DE Pin AR AA RARA 104 DEFAUL CREG e cem IEEE QE ATE EAR ERES
80. Level Commands ATTRIBUTES Short description Sets the display inside a component window In the Procedure Component Syntax ATTRIBUTES list Arguments list command command command VALUES ONIOFF I TYPES ONIOFF Description The ATTRIBUTES command sets the display and state options of the procedure component window The VALUES and TYPES command ON or OFF indicates if the values or types should be displayed in the Procedure window This command is applicable for the procedure component only when performing C source level debugging Example Procedure lt ATTRIBUTES VALUES ON TYPES ON Argument types and values are displayed in the Procedure component window MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 199 C Source Level Debugging In the Data Component Syntax ATTRIBUTES list Arguments list command command command FORMAT bin oct hex signed unsigned symb MODE automatic periodical locked frozen SCOPE global local SPROC module SMOD module UPDATERATE rate Description The ATTRIBUTES command sets the display and state options of the Data component window The FORMAT command indicates how variables will be represented Display formats are binary octal hexadecimal signed decimal unsigned decimal or symbolic The SCOPE command selects and displays global or local variables Th
81. Meaning Hexadecimal constant Octal constant oe Binary constant Example S2F00 Hexadecimal Constant 043 Octal Constant 10011 Binary Constant When the default number base is 16 constants starting with a letter A B C D E or F must be prefixed either by 0x or by Otherwise the command line interpreter cannot detect 1f an integer constant or a symbol is specified Notation Meaning 5AFD Hexadecimal constant 5AFD AFD In this the Hexadecimal constant AFD or the symbol which name is AFD Example in gt NB 16 The number base is hexadecimal MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 143 Command Reference NOCR Short description Closes the record file Syntax NOCR Description The NOCR command closes the current record file The record file is opened with the CR command Example NOCR The current record file is closed NOLF Short description Closes the log file Syntax NOLF Description The NOLF command closes the current log file The log file is opened with the LF command Example NOLF The current log file is closed User s Manual MCUez HC05 HC08 Debugger 144 Command Reference MOTOROLA Command Reference Target Commands Short description Steps into the program using assembly step over Syntax P address Argument address Address constant expression indicating where execution begins
82. Menu Entry Description When selected opens a dialog where the user can select a file Execute File p containing MCUez commands to be executed Appears only in the pop up menu when something is selected in Copy the command line component When selected copies the selected text to the clipboard Appears only in the pop up menu when something is stored in the Paste clipboard When selected the first line of text currently stored in the clipboard is appended to the current command Selected text from the command line component can also be copied to the clipboard using the standard window key combination CTRL C The first line of text currently stored in the clipboard can be appended to the current command using the standard window key combination CTRL V MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 69 Component Windows 3 3 8 Module Component Window User s Manual NOTE The Module component window provides an overview of source modules used to build the application It displays all source files source modules bound to the application The module component displays all modules in the order they appear in the absolute file abs Figure 3 23 shows the module component imi Module Figure 3 23 Module Component Window Double clicking a module name forces all open windows to display information about the module The source component shows the module s source and the data component disp
83. Mouse Operations ss 66 xd bi E Rueda AAA 23 L3 Typographic Styles in This Manual 04 23 Section 2 Getting Started and User Interface Zl CGS A 29 2 4 Tap BOBO iod Y 93 9 9 ERG IG ER c CE 26 2 4 MMDS MMEVS Hardware Connection oo ooo ooocoomooo o 26 2 4 Starting the MC Uez Depubeer conorcorirrciss rr n nen 27 2 4 1 Contentiticn File 6444602595200 9s 0406509 255550008 9482 28 23 E SEA 29 25 1 Communication Dialog BOX cosocisrinsicis repisa 30 2 6 Graphical EnVIrOnIMEent Cs iA SPESE A RR E RETE 31 2 6 1 ES eller A 32 2 6 2 DENN BB rs AAA E DEA PARS GAMES 32 20 204 Debugger A tide ds PIER CER ERES 33 2 5 2 2 PU Specie MBIMIBES idavedeosShvuxbtRLARYA ERR V Ex 34 25 3 da MAA a 2 6 4 Memm BA rra AAA 35 2 6 4 1 O A A 35 2 6 4 2 WIS no ET 36 2 6 4 3 DP o m PTT P TPT 36 2 6 4 4 e d ls TET 37 2 6 4 5 Component Ment AA LEUERR S RP 38 2 6 4 6 Window Menu 24 eere ERR AERE AA AAA 39 2 6 4 7 l l o MAA 40 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Table of Contents 7 Table of Contents User s Manual 2 1 PA Pelee Les 2 7 4 2 13 2 7 6 E dui 2 7 8 249 2 1 10 FAC EI FAN Ll 3 1 3 4 3 3l dede 3224 33 22 33 23 LE E NM 3 3 4 3 3 4 1 3 3 4 2 3 3 4 3 Dos S434 Ed d EO RENE 3 3 6 3 3 6 1 3 3 6 2 3263 Dip asa Dil PP 40 Dirag aud Drop an CE oc ek ho oes bho ERAS RLENUEF ERG AKA 41 Dragging from the Assembly Component
84. R 194 BiZi Spp a oie Level 6 coude xe Ex CESTA AAA 194 B 12 2 Stepping Over a Function Call Flat Step 2 6 2 44246 196 B 12 3 Stepping Out of a Function Call 2 3224 ecdsegscavesseas xs 196 B 13 Displaying a Local Variable from a Function 197 B 14 Miscellaneous C Source Level Commands 197 Appendix C MMEVS0508 Target S4 EE AMA 203 ho INS ss ee ee ee ee eee ee AAA 204 C3 Loading the MMEVS0506 Target 5 6224 csceescdeeiveedse aan 204 CSI MMEVS Target Startup File cisororinssrrtrrnatrs veia 205 C4 MMEVS50508 Target MONI rr pee os 206 C 4 1 LO dara sd 206 C 4 2 I o 206 C 4 3 Boo UUs hls P ITT 206 C 4 4 Memory Mapas 4229 or AAA AAA A Rd 207 C 4 4 1 UA oae eed d eb RR HERE EP dp ciiin aes 207 C 4 4 2 hr C Y HET TTA TT TR e TOT 209 C 4 5 Target Signals ASA 209 C3 MMPETS Commands 152 ideas deducti dade Sd RS VR RAE Res 210 Appendix D MMDS0508 Target Il GG Loa cea LEO EIER EORR Oa b ioa dos dA ERA deca 215 D2 S EET 216 143 Loading the MMDSUSUA Target Leva up RR ERR 217 D 3 1 MMDS Target Startup File ss siesekwkRAXATREN AREA ESAE 218 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Table of Contents 11 Table of Contents User s Manual D4 MMDSUSOS Target Menu sceoacasestuec RE ERR 3 aora as 218 D 4 1 P C PEPPT 218 D 4 2 PP TUER 218 D 4 3 du i d PHP Cm 219 D 4 4 Memory NS coated px A
85. ROLA User s Manual MCUez HC05 HC08 Debugger 2 1 Contents Section 2 Getting Started and User Interface 2 4 Uu oco i sarro sae 26 23 MMDS MMEVS Hardware Connection 00 26 2 4 starine the MCUez DeDUREBE sasuke av akrR ERE RE RR RYE 27 2 4 1 Conticutalion Piles cvccckaccerecee aie cabana 28 2 9 Loading a Wb rr 29 2 5 1 Communication Dialog BOX 226sessetcchete RE ER RR ERE ER 30 2 6 Graphical Environment 9 5650 9 5406S a5 daen ee EC E REN 31 2 6 1 TOO io vide aie tec apod GE d needed dod edu dq Ra bdo EY 26 2 JU CD A P PmM 32 25 2 1 Debugger AA 33 25 24 CPU Specie Messages 1ucooiosaucbPpeseee bes qe rt ps 34 2 6 3 Object Information Bat ccosscrri canrrrrriria RR RR RES 35 2 6 4 Mem Bat sic pos 5h eo sb Ge VERF RARA 33 2 6 4 1 i313 A M 7 2 6 4 2 View Mi rr dia 36 2 6 4 3 oopbor MP no PHA 36 2 6 4 4 Teee MEDU cures prona deed id pesqq dd pb ir 2 6 4 5 Component M O kare Wha cee ka Es ewes bbe chews D AK ada 38 2 6 4 6 Woe MSI gt rotor 39 2 6 4 7 HEPNI 22465 Gi ak ee aG ENR 40 AT Diag and D rerepa kt apere hL E EEATT AA 40 2d Drag and Drop an Objecto 244 4 edsceesseaseegeeewser eer d 41 2 7 2 Dragging from the Assembly Component 41 Ri Dragging into the Assembly Component 42 2 7 4 Dragging from the Data Component 4 42 2 4 5 Dragging into the Data Component 04 43 2 7 6 Dragging from the Source Componen
86. RS command places specified values into specified registers An equal sign may be used to separate the register name from the value assigned to the register otherwise they must be separated by a space The contents of any number of registers may be set using a single RS command If the specified register is not a CPU register it is considered to be an I O register The debugger looks for the specified register in the loaded register file This file is called MCUxxxx reg where xxxx is a number related to the MCU Example in rs a 0xff hx Ox7fff The new content of register a is Ox f and register hx is 0x 7 The Register component window is updated with the new values MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 147 Command Reference Short description Stops execution of loaded application Syntax S Description The S command stops execution of the application Use the Go G command to start or continue execution Example in gt s STOPPING HALTED The current application is halted User s Manual MCUez HC05 HC08 Debugger 148 Command Reference MOTOROLA Command Reference Target Commands SAVE Short description Saves a memory block in S record format Syntax SAVE range filename lt offset gt A Arguments range Address range constant that defines the block of memory to be saved in a Motorola S record file filename Specified file where t
87. S AMA 96 Component Command iososmssas rar d aw y w esess rra ES 97 Deron OF Tete reir 98 BO a dr CERDOS T EDO de ese caesar 99 Expression Definition in EBNF 2 22546 edes sm 100 MI SA 101 o AA 101 Constant Standard Notation 0 00 cee eee eee 102 KRermiel C ompndnila accord aes dee 103 a oda y Hr dr E E dad ed e EE PER 118 Component Commands 414g wet ce an tEn ienai 155 Command BIS iua uk tok E RR redder bodes ee ede 181 Appendix A Register Description File A uae lipadRas eet awe ewes are beh ws 183 Ui cas ls 16 ee VEL EAT A 183 FUE PO P rv rar aos 183 Description Using Extended Backus Naur Form EBNF 184 Appendix B C Source Level Debugging A 187 IAEA eri did 188 as o AAA 188 Procedure COMP cr cris A RdA 189 Li IA 189 A TEC Pee ee ere eee eee tar re eee ee 190 MCUez HC05 HC08 Debugger 10 Table of Contents MOTOROLA Table of Contents B 4 3 Dn IB uuo ode RQERA RAS EEEORSEREE RP SQUARE RAP Add 190 Hs DISCOS ri RR Gd aed dar hdd ee d ego 190 Bo Breakpoints Setting DIOE rr Od ve pEqe ve ei i 192 B 7 General Rule for Halting on a Control Point 192 BS Configuring the Default Layout 2256246025054 6e ee esseeers 192 B9 Loading an Appia cascos obasenee og re 193 Bl Stopping an Application gee ti ede k eed Soe eesGeeeetessas 193 Bil Defining Counting Breakpoints 22262222 4o Rr ease Gade 194 B 12 Stepping in the Application sicisesso oe RR RE RR RR E
88. See Table 4 2 Table 4 2 Changing the Variable Value Display Format Menu Entry Description Hex Variable values are displayed in hexadecimal format Oct Values are displayed in octal format Dec Values are displayed in signed decimal format UDec Values are displayed in unsigned decimal format Bin Values are displayed in binary format Displayed format depends on the variable type Values for character variables are displayed in ASCII character and Symbolic decimal format Values for other variables are displayed in signed or unsigned decimal format depending on the variable being signed or not 4 11 3 Modifying a Variable Value The debugger allows variable values to be changed Double click on a variable The current value is highlighted and can be edited Figure 4 7 I Data E fibo dbg Auto Symb Global counter unsigned char z fiboCount int unsigned char unsigned char int int int Figure 4 7 Modifying a Variable Value MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 87 Operating Procedures The following procedure describes how to modify a variable value 1 Formats for the input value follow the rule for ANSI C constant values Values are prefixed by 0x for a hexadecimal value or 0 for octal values All other values are treated as decimal values For example if the data component is in decimal format and the variable input value is 0x20 then the var
89. TAPER dba 183 D cui o M TROITE 73 Display Graphical asss area don a an posta o Ed FRE RII appe dd IR end 237 Instructions Ol Y coci nscrrriar caninas ecards 236 Disnei od ad p eo qe e E E a ee a aa on Bere els 130 A m 40 DW exes dived adeeiSerencesocesgeesSuadee catador 131 MCUez HC05 HC08 Debugger 272 Index MOTOROLA Index E Editing A a a a E a a E E E A E A 92 Resiste erene eian area ia e a h era ee e E EREEREER 89 Nattabler as ln de ta Dl actas 87 lj aid id dl 105 EESETE 105 ENDFOCU Sara alada 106 BENDEOR Eye Si S een fas 107 BNDIE eerte et uos ien PADS reda RD E eds 107 ENDWHIEE eR IRPPex ad TR 107 EXECUTE oras az are ahaha dada et la 132 Expression definition EBNF 20 0 cece ee eee 99 F MMMM ics ose Bese tern ah sees ute pl ast ho ated eo A sae gag Sek eee 168 Pt ae aot 60 61 A ON 169 FOCUS acacia soba a Oe een 108 FONT V ever Ib doi i eI ean es eae lg dena eri este ees 170 FOR aeaaea ce da diia Aarne 109 136 A fas cesses e E A fas are ear 87 89 91 PRAMES cat a UN 171 ATOZ OT ee c ieri cuui ME 61 67 191 G corr 133 Global s a unida pa E PEE VS ee aa 191 Global Variable Displaying cesa eum Ra riaa een ee arde d me doe dd 86 GOTO anio I S DITE Si cee add 110 GOTOIE 454 ore Sally a e Pere es PS 111 H HALT vp es rade eten eue SEL GR en PEAS eee A a ROB 33 HALTED ndo oie a tant tie ois 33 Hex sedeo useer O uus A CDM ut LU EE 87 91 H xa
90. Table 2 2 are possible from the assembly component Destination Component Table 2 2 Dragging from the Assembly Component Action Command Line The command line component appends the address of the pointed to instruction to the current command Dumps memory starting at the selected instruction PC The PC MCUez HC05 HC08 Debugger Memory location is selected in the memory component Loads the destination register with the address of the selected Register instruction Source component scrolls to the corresponding source Source statement and highlights it User s Manual MOTOROLA Getting Started and User Interface 41 Getting Started and User Interface 2 7 3 Dragging into the Assembly Component The actions shown in Table 2 3 occur when dragging and dropping into the assembly component Table 2 3 Dragging into the Assembly Component Source Action Component Displays disassembled instructions starting at the first high level language instruction selected The assembler instructions Source corresponding to the selected high level language instructions are highlighted in the assembly component Displays disassembled instructions starting at the first address Memory selected Instructions corresponding to the selected memory area are highlighted in the assembly component Displays disassembled instructions starting at the address Register stored in the source register The instruction starti
91. Table 2 9 describes the action taken when dragging into the memory component Table 2 9 Dragging into the Memory Component Source Action Component Dumps memory starting at the selected instruction PC The PC Assembly a a location is selected in the memory component Dumps memory starting at the address of the selected variable Data The memory area where the variable is located is selected in the memory component Dumps memory starting at the address stored in the selected Register register The corresponding address is selected in the memory component Dumps memory starting at the address of the first global Module variable in the module The memory area where this variable is located is selected in the memory component 2 7 10 Dragging from the Register Component Table 2 10 shows the options available when dragging from the register component Table 2 10 Dragging from the Register Component Destination Action Component Assembly component receives an address range scrolls to the Assembly C are corresponding instruction and highlights it Dumps memory starting at the address stored in the selected Memory register The corresponding address is selected in the memory component Cummandifina The address stored in the pointed to register is appended to the current command MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 45 Getting Started and Use
92. The code range in the source component is highlighted and the associated information in the memory component is highlighted 3 3 4 Register Component Window The register component window displays the content of registers and status register bits of the target processor Register values are displayed in binary or hexadecimal format All values can be edited Figure 3 10 shows the register component ll Register Iof E AES Ede EE dq SR EA Status HINZC PC 141 Figure 3 10 Register Component Window 3 3 4 1 Status Register Bits User s Manual All status register bits that are set are displayed black or dark if user has changed font color All reset status register bits are displayed gray A reset status register bit is toggled by placing the mouse pointer on the bit then double clicking the left mouse button Contents of registers that have changed since the last display refresh are shown in red except for status register bits during application execution MCUez HC05 HC08 Debugger 58 Component Windows MOTOROLA Component Windows Components 3 8 4 2 Editing Registers Double clicking on a register opens an edit box over the register enabling modification of the register value Press the Escape key Esc to retain the previous value of the register Press the Enter key or select outside the edited register to validate a new value and change the register content If the Tab key is pressed the register co
93. When the C option is entered in the calling file the command interpreter terminates the calling file after executing the called file If the option is omitted execution of the remaining commands in the calling file is resumed after the commands in the called file have been executed Any error halts execution of CF file commands When the command is entered with no parameter the Open File dialog is displayed Use this dialog to select the command file to execute The CALL command is a synonym for the CF command MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 123 Command Reference Example Without C option if commandl txt file contains bckcolor green cf command2 txt bckcolor white if command2 txt file contains bckcolor red Execution in cfcommandl txt executing command l txt bckcolor green Icf command2 txt executing command2 txt bckcolor red done command2 txt Ibckcolor white done command txt With C option if command _1 txt file contains bckcolor green cf command2 txt C bckcolor white if command2 txt file contains bckcolor red Execution in cfcommandl txt executing command l txt bckcolor green Icf command2 txt C executing command2 txt bckcolor red done command2 txt done command 1 txt User s Manual MCUez HC05 HC08 Debugger 124 Command Reference MOTOROLA CR NOTE Command Reference Target Commands Short descripti
94. ZNDEMO hcOBMibo DBG 541 CLRX STX counter il Data Figure 3 2 Active Component Menu MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 49 Component Windows The pop up menu is a dynamic context sensitive menu It contains entries for the currently active component Pop up menu entries differ to reflect operations that can be performed on the object pointed to by the mouse For example if a breakpoint is pointed to menu options are available to delete enable or disable the breakpoint Figure 3 3 shows the Source component pop up menu I Source Oy ES C MCUEZ DEMD She05 fibo DBG Set Breakpoint E Run To Cursor Show Breakpoints Entry Open Module Find Marks Figure 3 3 Source Component Pop up Menu 3 3 2 Source Component Window NOTE User s Manual The Source component window displays the program source code application file It enables the user to view change monitor and control the current execution location in the program A word is selected by placing the mouse pointer on the word then double clicking the left mouse button A section of code is selected by holding down the left mouse button and dragging the mouse across the code to highlight the selected area Text displayed in the Source component window cannot be edited The Source component window is a file viewer only The range of source code covered by the curre
95. a Register Indicated Address The MCUez debugger provides two ways to dump the memory starting at the address a register is pointing to Using drag and drop Dragaregister from the register component to the memory component 2 Select Address menu entry Right click in the memory component to display the pop up menu Select Address to open the Memory dialog box Enter the register content in the Address field and select OK to close the dialog box Memory Bl x Auto 00000840 20 13 FC 08 02 C3 00 01 0000 Display Address xi 00001 00001 00001 Address ead hex 00001 ed Iv Hex Format Cancel Help Figure 4 9 Choosing a Memory Address User s Manual MCUez HC05 HC08 Debugger 90 Operating Procedures MOTOROLA Operating Procedures Working with Memory The memory component scrolls until it reaches the address specified in the dialog box This feature allows the user to display a memory dump from the application stack NOTE IfHex Format is checked numbers and letters are treated as hexadecimal numbers Otherwise expressions can be typed and hex numbers should be prefixed with Ox or 4 13 Working with Memory These sections describe how to work with and modify memory content 4 13 1 Changing the Memory Display Format The debugger allows the user to define the format to use in the memory component The Format menu entry in the Memory component pop up menu provid
96. all other formats Example in define a 0x12 in define b 0x10 in gt e atb 34 The addition operation of the two previously defined variables a and b is evaluated and the result is displayed in the Command Line window User s Manual MCUez HC05 HC08 Debugger 132 Command Reference MOTOROLA Command Reference Target Commands G Short description Begins execution of the currently loaded application Syntax G address Argument address Address expression This value is loaded into the program counter before execution starts When no address is entered the address in the program counter is not altered and execution begins at the address in the program counter Description The G command starts executing code in the emulated system at the current address in the program counter or at the specified address The user can specify the program entry point skipping execution of the previous code Example G 0x8000 Program execution is started at address 0x 8000 RUNNING is displayed in the status bar The application runs until a breakpoint is reached or manually stopped MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 133 Command Reference LF Short description Opens a log file Syntax LF filename A Arguments filename DOS filename that identifies the file or device to which the log is written The command interpreter does not assume a filename extension A Opens the file in app
97. all sequential modes data storage ends after the specified number of post trigger cycles D 6 3 4 Counted Sequential Recording Mode Terminal Count Post Trigger Cycles 1 8191 Enter a number in the range of 1 to 8191 If one of the counted modes was selected this number represents the number of bus cycles to trace If one of the sequential modes was selected this is the number of cycles to trace after the trigger sequence occurs If one of the continuous recording modes was selected this value is ignored Stop the emulator when recording completes D 6 4 Time Tag Clock Setup Check this box to stop the emulator after the collection of bus cycles has stopped The bus analyzer uses a clock for the time tag which provides a time reference value timestamp in each frame of the trace buffer To change the clock select the Time Tag Clock tab in the Bus Analyzer Configuration dialog box Time Tag Clock Frequency MCUez HC05 HC08 Debugger Select one clock frequency to be used either an internal oscillator at 1 2 4 8 or 16 MHz a bus clock or a programmable clock In general faster clock rates provide higher resolution and are appropriate for faster emulator clock rates User s Manual MOTOROLA MMDS0508 Target 231 MMDS0508 Target User s Manual Bus Analyzer Configuration x Triggers Pattern Sequencer Time Tag Clock m Time Tag Clock Frequency Byte 8 Source C 16 MHz rp A L
98. alues can be dragged to other components 2 7 5 Dragging into the Data Component Table 2 5 shows all options available when dragging into the data component Table 2 5 Dragging into the Data Component seule Action Component A selection in the source window is considered as an expression Sous in the data window as if it had been entered through the expression editor of the data component refer to 3 3 6 1 Expression Editor Displays global variables from the selected module in the data Module component 2 7 6 Dragging from the Source Component Table 2 6 describes the actions taken when dragging from the source component Table 2 6 Dragging from the Source Component Destination Action Component Displays disassembled instructions starting at the first high level language instruction selected The assembler instructions Assembly corresponding to the selected high level language instructions are highlighted in the assembly component Loads the destination register with the PC of the first instruction Register selected A selection in the source window is considered as an expression Data in the data window as if it had been entered through the expression editor of the data component refer to 3 3 6 1 Expression Editor MCUez HC05 HC08 Debugger User s Manual Getting Started and User Interface 43 Getting Started and User Interface 2 7 7 Dragging into the Source Component Table 2 7 decrib
99. alyzer data to the file Click Cancel to cancel the operation and no data will be dumped e demoBump ts Select Frames to Dump From jo To 200 e C Instructions Cancel Help Figure D 23 Dump Bus Analyzer Frames Dialog Box User s Manual MCUez HC05 HC08 Debugger 244 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands D 12 MMDS Commands This section describes MMDS commands These commands can be typed in the debugger command line component or inserted in a command file ARM Arm Bus Analyzer Description The ARM command arms the bus analyzer When armed the analyzer records bus cycles when the emulator is executing user code Arming the analyzer clears the current contents of the trace buffer Syntax ARM BAUD Baud Rate Description The BAUD command sets the baud rate for communication between the system controller and host computer For maximum performance the baud rate should be set as high as the host computer can accommodate The maximum rate is 115 200 the default is 9600 Enter the command without a rate to display the Communication Device dialog box If the system does not support a specified baud rate an error message is displayed Syntax BAUD rate Argument rate Specifies the baud rate either 1200 2400 4800 9600 19 200 28 800 38 400 57 600 or 115 200 Example BAUD 57600 Changes the communic
100. and can be stopped by pressing the Esc key Example in DL 0x8000 2 8000 FE8045FD 80432710 The content of two longwords starting at 0x8000 is displayed as longword values 4 bytes in DL 0x100 2 Displays memory dump of address 102 User s Manual MCUez HC05 HC08 Debugger 130 Command Reference MOTOROLA Command Reference Target Commands DW Short description Displays a word Syntax DW address range Arguments address Address constant expression indicating the address of the first word to be displayed range Address range constant indicating the range of addresses to be displayed If range is omitted one word is displayed If address and range are omitted the first word displayed is taken from the address following the last word displayed by the most recent DB DW or DL command or from address 0x0000 for the first DB DW or DL command of a session Description The DW command displays the hexadecimal values of the words in a specified range of memory The command displays one or more lines depending on the address or range specified Each line shows the address of the first word displayed in the line followed by the number of specified hexadecimal word values The address can be an expression If an I O register is specified the DB command will use the value of the register as an address To use the address of the I O register specify the ampersand amp chara
101. and line command To work properly the ESL target must load the memory file that matches the connected emulation module The mem filename is constructed like this OnnnnVxx mem nnnn MCU Id 4 digit hex value xx 2 digit version number Select Retry to open a memory file If the selected file is valid it is loaded and copied into the PROG WEM directory Select Cancel to open the Open Personality File dialog box Save Opens a dialog box to save new user defined memory locations in a memory configuration file Open Memory blocks Look in y mem aa 003cOv01 mem laa D03c1 v01 mem 003c3v01 mem 003c4v01 mem OObfev00 mem ai 0837 v04 mem File name Files of type Memory blocks Cancel Figure D 5 Open Memory Blocks Dialog Box User s Manual MCUez HC05 HC08 Debugger 220 MMDS0508 Target MOTOROLA WARNING MMDS0508 Target MMDS0508 Target Menu Personality file for Id amp 18 was not found in directory C AMCUEZAPROGAMEM If a matching MEM file is available click Retry to select and install this file in the directory C AMCUEZAPROGAMEM If such a file is not available proper operation will not be possible Figure D 6 Memory Map Error Message Do not save a new configuration to a provided mem file This would overwrite the original mem file and could prohibit the MMDS from booting up D 4 4 2 Dual Port RAM NOTE D 4 4 3 Memory Dual port RAM allows the ba
102. ange for one of the address or data options a second option is also seen as a range For example the command STC 8 20 40 is interpreted as STC 8 8 20 40 and the command STC 8 9 20 is interpreted as STC 8 9 20 20 If neither R nor W is specified the trigger defaults to a read write bus cycle Set the LIR signal with the clips bit 6 or the LIR option The address data or clips will be ignored if the matching mask is specified as 0 If a bit is set in both the clips and masks the trigger is set to high H If a bit is not set in clips but is set in masks the trigger is set to low L If a bit is not set in the mask the trigger does not depend on the state of the clip Examples STA 0x1000 Sets analyzer trigger A to match accesses at address 1000 STB 4 Sets analyzer trigger B to match accesses with a value of 4 at any address STC 8 20 40 Sets analyzer triggers C and D to match accesses using a value from 20 to 40 at address 8 STC 8 10 20 Sets analyzer triggers C and D to match accesses using value 20 at an address from 8 to 10 NOTE Bits set to O are don t care bits Bits set to 1 are bits that expect the value for Address Data or Clip Bits set to O are in a position that accepts 0 or 1 Bits set to 1 are in a position that only accepts values from the address fields For the code Address 0xC000 Mask OxFFFC the trigger is detected for 0xC000and 0xC001 0xC002 or 0xC003 is loaded in the address bus For
103. as the License For Computer Programs Article 14 contained in Motorola s Terms and Conditions of Sale Rev 1 79 Trademarks This document includes these trademarks MCuUez is a trademark of Motorola Inc Microsoft Windows is a registered trademark of Microsoft Corporation WinEdit is a trademark of Wilson WindowWare Motorola Inc and HIWARE AG 1999 All Rights Reserved User s Manual MCUez HC05 HC08 Debugger 4 MOTOROLA User s Manual MCUez HC05 HC08 Debugger List of Sections Section 1 General Information 21 Section 2 Getting Started and User Interface 25 Section 3 Component Windows 47 Section 4 Operating Procedures 71 Section 5 Command Reference 93 Appendix A Register Description File 183 Appendix B C Source Level Debugging 187 Appendix C MMEVS0508 Target 203 Appendix D MMDS0508 Target 215 jp Je oss ones 271 MCUez HC05 HC08 Debugger User s Manual MOTOROLA List of Sections 5 List of Sections User s Manual MCUez HC05 HC08 Debugger 6 List of Sections MOTOROLA User s Manual MCUez HC05 HC08 Debugger Table of Contents Section 1 General Information 1 1 loco rr oi A AA ARA ARA 21 1 2 loiro elite Ce AAN E 2 1 3 Document Convenis s 615s e 55 ive ERES RETESYHRZAZMA A Rab 23 LI A LER RR 23 1 3 2
104. ation baud rate to 57 600 MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 245 MMDS0508 Target CT Clear Trigger Description The CT command clears the values of specified bus analyzer triggers events A B C and or D The command also disables the cleared triggers Syntax CT lt list gt Arguments list List of trigger identifiers All triggers A B C and D Examples CT A B Clears triggers A and B GE Clears all triggers When clearing a trigger that is part of a range the second trigger in the range is cleared at the same time For example if a range is defined between triggers C and D CT C clears trigger C and D DARM Disarm Bus Analyzer Description DARM disarms the bus analyzer When disarmed the analyzer does not record bus cycles Syntax DARM User s Manual MCUez HC05 HC08 Debugger 246 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands EXIT Terminate Session Description The EXIT command terminates the host session with the target Syntax EXIT GE Go to Event Description The GE command searches forward or backward in the analyzer trace buffer for a frame that matches the search event defined with this command For a forward search the search begins at the frame immediately following the current frame a backward search begins at the frame immediately preceding the current frame Syntax GE lt list gt
105. bar Open Module Opens a dialog which lists all source files bound to the application currently loaded Choose the module to be viewed in the source window Find Opens a dialog box prompting for a string and then searches the file displayed in the source component for the specified string To start searching click Find Next and the search begins at the current selection or first line visible in the source component Up down radio buttons enable the search backward or forward If the string is found it is highlighted If the string is not found a message will be displayed Marks Displays upside down check marks at source lines where breakpoints may be set e Pop up menu Set Breakpoint Appears in the pop up menu if no breakpoint is set or disabled When selected sets a permanent breakpoint at this position If program execution reaches this instruction the program is halted and the current program state is displayed in all component windows Delete Breakpoint Appears in the pop up menu for a breakpoint pointed at with mouse cursor that is set or disabled Deletes a selected breakpoint Enable Breakpoint Appears in the pop up menu for a pointed to breakpoint that is disabled Enables a selected breakpoint Disable Breakpoint Appears if a breakpoint is set Disables a selected breakpoint Run to Cursor Sets a temporary breakpoint at the nearest code position and continues program execution When prog
106. breakpoint at this same position the temporary breakpoint will also be disabled and the program will not halt MCUez HC05 HC08 Debugger Show Breakpoints Opens the Breakpoints Setting dialog box and lists breakpoints defined in the application Breakpoint properties can be modified Address Opens a dialog box prompting for an address Enter a hexadecimal address to interpret and display memory contents as assembler instructions starting at the specified address Display Code Displays the machine code in front of each disassembled instruction Display Address Displays the location address at the beginning of each disassembled instruction If both Display Code and Display Address are selected the absolute address is displayed first then the hexadecimal code and finally the disassembled instruction Display Absolute Address For a branch instruction displays the absolute address at the end of the disassembled instruction User s Manual MOTOROLA Component Windows 57 Component Windows 3 3 3 1 Retrieving Source Statements Point to an instruction in the Assembly component window and drag and drop it into the Source component window The source component scrolls to the source statement that generates this assembly instruction and highlights it Point to an instruction in the assembly component with the mouse cursor click and hold the left mouse button press the L key then release the L key and mouse button
107. by the expression DEFINE jump jump 1 When the loop is exited the T trace instruction is executed 5 7 Target Commands User s Manual The target commands monitor MCUez target execution Target input output files target execution control direct memory editing and CPU register setup are handled by these commands Target commands are executed independently of any components that are active MCUez HC05 HC08 Debugger 118 Command Reference MOTOROLA Command Reference Target Commands BC Short description Deletes a breakpoint BC stands for breakpoint clear Syntax BC address Arguments address Specifies the address of the breakpoint to be deleted This address must be in the ANSI format or MCez assembler format address can be replaced by expression as shown in the next example Deletes all breakpoints Description BC deletes a breakpoint at the specified address When is specified BC deletes all breakpoints Equivalent operation Point the breakpoint directly in the Assembly or Source component window right click and choose Delete Breakpoint in the pop up menu or open the Breakpoint Setting dialog by selecting Show Breakpoint then select the breakpoint and click Delete Example BC 0x8000 This command deletes the breakpoint set at the address 0x8000 The breakpoint symbol is removed in the Source and Assembly window The breakpoint is removed from the breakpoint list NOTE
108. ca eoque 4x dae oe Ep d eRENE CP ee TOES ded seus 230 MCUez HC05 HC08 Debugger 274 Index MOTOROLA Index Mod le CCC C 70 A HM 141 N NB S So sabe any p se B Sici qe uites Xen d Lane Feed Len ES 142 5 C ee A AAA 144 NOLE ets ae eh Read hee a oe aed ORS ewe dee 144 O i 87 91 Octalzsss a ds tt EE m eee oe 87 91 OPEN uzA eena ade Eeer SEED E EE 13 Plo EET PPRT Pee 73 P P Lag ad acido SO ODE RR UR Ra a OUR CRUS MACRO ee ROLE CIR Ier RR d rid 145 Periodical tias 61 67 191 Post dd 42425 Seles IER R ade 181 ice e ES 181 Procedure Dalfies iria RT EP E AIC DEN nd Ris 189 PROJECT IN oratoria ooh aba tx One dba EC 37 74 R BGs O 146 READY d T 33 Door P PL 58 Registers Description Te cose su RES RE EDO ERC AT RU errata 183 REPEAT 2221523 u RI ner RE ar aon eaerds tows d S 113 136 luu PR 181 RETURN isis edo d n st ua wes de eine a Rar EAE 114 O PENES 147 RS 232 serial Polte ide bd aem cx RE tad equ md q dde 26 RUNNING 1 us rat irc dulce he ER KR EE ee ga Pe eh SR e 33 S O A E E O O E E E eee oe 148 SAVE Lor psv ena AAA 140 Scrolling Display as Lo suem oth POR doe acea Por a dont 240 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Index 275 Search ll A a raa E A AEN E EA 241 Frame darla dad a la du 240 EA Y AAA 227 242
109. ch satisfies the term is called an event Specify the trigger address Specify the trigger data Specify the state of R W on which to trigger Toggle to specify each logic clip as high H low L or don t care X The clips buttons show the Group A logic clips with their respective colors Logic clips are used to trace signals in the target system When a trigger occurs a breakpoint is provided that shows the states of significant logic signals before at and after the breakpoint Invert Disable Clear HB User s Manual Check Invert to specify that a term previously defined as triggered within a range is to be triggered outside that range Check Disable to disable the trigger for a specific term Select the Clear button to clear all changes Hardware Breakpoints make use of the bus analyzer triggering circuit Users can break on any combination of bus signals including address and data values instruction fetch read write and logic clips Four independant hardware breakpoints are available Terms A B C or D MCUez HC05 HC08 Debugger 226 MMDS0508 Target MOTOROLA MMDS0508 Target Using the Bus Analyzer D 6 2 Pattern Search Setup To search for a frame with a specific pattern define the search pattern to find all matched frames in the trace buffer The pattern consists of an address a data word logic clips and four miscellaneous signals Bus Analyzer Configuration x Triggers Patter
110. chine code CODE off Switches off the display of the machine code ADR on Switches on the display of the addresses in front of the disassembly instruction ADR off Switches off the display of the addresses in front of the disassembly instruction ABSADR on Switches on the display of the absolute address for destination of branch instructions ABSADR off Switches off the display of the absolute address for destination of branch instructions SPC address PC address location TOPPC address Address location of the first line of the PC Description The ATTRIBUTES command sets the display and state options for the Assembly component window The ADR command displays or hides the address of a disassembled instruction ON OFF is used to switch the display of the address in front of disassembled instructions on or off The SMEM show memory range and SPC show PC address scroll the assembly component to the corresponding address or range code location and select highlight the corresponding assembler instructions or set of instructions The CODE command displays or hides the machine code of the disassembled instruction ON OFF is used to switch the machine code on or off The ABSADR command shows or hides the display of the destination address in a disassembled instruction like branch to ON OFF is used to switch the display of the destination absolute address on or off The TOPPC command specifies the program counter of the first
111. collection will terminate after the specified number of post trigger cycles Sequential A B gt C D Select this option to start the bus analyzer on event A or B followed by events C or D This sequencer can be simplified to involve fewer than four events by defining all signals of unused events as ignored Frame collection ends after the specified number of post trigger cycles Sequential A gt B gt C gt D Select this option to start the bus analyzer after four events A then B then C then D occurring in sequence Frame collection ends after the specified number of post trigger cycles Sequential A gt B gt C D lt Select this option to start the bus analyzer on cycles of three events in sequence A then B then C provided that the fourth event D remains false When the fourth event occurs the sequence starts again with the first event This sequence can be used as a 3 event sequence by leaving event D defined with all signals ignored Frame collection ends after the specified number of post trigger cycles User s Manual MCUez HC05 HC08 Debugger 230 MMDS0508 Target MOTOROLA MMDS0508 Target Using the Bus Analyzer Nth Event of A B C D Select this option for the bus analyzer to begin storing data that matches events A B C and D until nth event is stored Then the next 4096 cycles are stored This allows for a maximum of 4096 events to be stored including the nth event followed by 4096 cycles For
112. ct and copy this file in the directory C AMCUEZ PROGAMEM The file will be named C 4MCUEZXPROGSMEMSODBFEVOD MEM CAUTION If such a file is not available or if a wrong file is installed proper operation will NOT be possible Cancel Figure C 7 Memory Map Error Message The mem filename is constructed like this OnnnnVxx mem nnnn MCU Id 4 digit hex value xx 2 digit version number Select Retry to open a memory file If the selected file is valid it is loaded and copied into the PROGMEM directory Select Cancel to open the Open Personality File dialog box Save Opens a dialog box to save new user defined memory locations in a memory configuration file WARNING Do not save a new configuration to a provided mem file This would overwrite the original mem file and could prohibit the MMEVS from booting up User s Manual MCUez HC05 HC08 Debugger 208 MMEVS0508 Target MOTOROLA C 4 4 2 Memory C 4 5 Target Signals MMEVS0508 Target MMEVS0508 Target Menu The memory group box in the Memory Configuration dialog allows the real time memory to be specified The user can specify the start and end location for a selected memory type and enter a brief comment The MMEVS0508 real time memory consists of dual ported memory that can be assigned to any valid RAM or ROM memory address While the MMEVS0508 is running the debugger can display and modify the real time memory If part of the memory overlays the MCU I O RAM
113. cter followed by the register name This command can be stopped by pressing the Esc key Example in dw 0x8000 0x8007 8000 FE80 45FD 8043 2710 Contents of the memory range starting at 0x8000 and ending at 0x8007 is displayed as word values 2 bytes in DW 0x8000 4 8000 FE80 45FD 8043 2710 The content of four words starting at 0x8000 is displayed as word values MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 131 Command Reference Short description Evaluates a given expression Syntax E expression O D Xl Cl B Arguments expression String or arithmetic expression to be evaluated 70 Displays value of expression as octal base 8 number D Displays value of expression as decimal base 10 X Displays value of expression as hexadecimal base 16 PB Displays value of expression as binary base 2 C Displays value of expression as an ASCII character That is the remainder resulting from dividing the number by 256 is displayed All values are displayed in the current font Control characters 32 are displayed as decimal Description The E command evaluates an expression and displays the result in the Command Line component window If the expression is the only parameter entered no option specified the value of the expression is displayed in the default number base The result is displayed as a signed number in decimal format and as an unsigned number in
114. ction Possible reasons Aninterrupt source was not disabled Insert code to disable the interrupt source in the application e The corresponding entry in the vector table was not initialized with the address of the function associated with the interrupt Initialize the vector table User s Manual MCUez HC05 HC08 Debugger 34 Getting Started and User Interface MOTOROLA Getting Started and User Interface Graphical Environment 2 6 3 Object Information Bar The object information bar provides immediate information about an object selected in a component window Figure 2 10 Address 80 Size 1 fibo dbg Auto Symb Global counter 255 unsigned char fiboCount 12819 int j 221 unsigned char n 239 unsigned char Figure 2 10 Debugger Object Information Bar 2 6 4 Menu Bar Figure 2 11 shows an example of the debugger main menu with the MMDS0508 target menu MCUez Ele View Run MMDSO508 Component Window Help mi aii ado dmm OS PO Figure 2 11 Debugger Main Menu 2 6 4 1 File Menu The File menu is dedicated to the debugger Use the File menu to exit the debugger as shown in Figure 2 12 IE View Exit Figure 2 12 File Menu MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 35 Getting Started and User Interface 2 6 4 2 View Menu The View menu contains two options e Check uncheck toolbar to display or hide it e Check uncheck status bar to
115. ctions may not be displayed MCUez HC05 HC08 Debugger 234 MMDS0508 Target MOTOROLA MMDS0508 Target Viewing Collected Data The bus analyzer can display data either textually or graphically The user can also specify which items to be displayed by selecting the Trace Items menu entry D 8 3 Textual Display In the textual representation all frames or just the frames where an instruction starts can be displayed Use the right side scroll bar to display other frames Use the bottom scroll bar to display other signals Two horizontal lines double bar are used to mark a specific frame The frame number of the marked frame is inverted The Trace window contains the following items It is possible to add or remove any item by selecting the Trace Items menu entry Figure D 14 Trace Window Elements MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 235 MMDS0508 Target Frame Events Address Data Time Tag Control Signals D 8 4 Instructions Display The cycle or frame number is 0 8191 which identifies the frame The most recently stored frame is frame 8191 or the highest numbered frame that has been stored when the trace buffer 1s full The defined trigger identifier is A B C or D When the corresponding data in the frame matches the data defined for an event the identifier of that event is displayed in the event column The address bus value is stored in the fra
116. cuted when a target is loaded the target defined in the project ini file or by selecting the Component Set Target menu option reset cmd is executed when the Target Name Reset menu option is selected Target Name represents the actual target for example MMDS0508 SDI etc e preload cmd is executed before loading an abs application file select Target Name Load to load an executable file e postload cmd is executed after loading an abs application file MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 181 Command Reference User s Manual MCUez HC05 HC08 Debugger 182 Command Reference MOTOROLA User s Manual MCUez HC05 HC08 Debugger A 1 Contents A 2 Introduction A 3 File Format Appendix A Register Description File RE MGI sip he ERR Pd ERR CERA dob IER RO E ed deed pcs 183 B Pe On a oo er d RA 183 A 4 Description Using Extended Backus Naur Form EBNF 184 When loading an MCUez target definitions of the I O input output registers are loaded from a reg file This allows the names of these registers to be used as parameters for commands or as operands in an expression The syntax of the file is defined in A 4 Description Using Extended Backus Naur Form EBNF There may be several different files depending on the MCU used The name of the correct file is derived from the MCU identification number MCU Id in the following way MCUXxxxx REG where xxxx
117. d program execution can continue The application stops before executing the statement Permanent breakpoints remain active until they are disabled or deleted 4 9 4 Deleting a Breakpoint The debugger provides four ways to delete a breakpoint 1 Using Delete Breakpoint from pop up menu n the source or assembly component point at a statement where a breakpoint has been defined and right click Select Delete Breakpoint from the pop up menu 2 Using the keyboard In the source or assembly component point at a statement where a breakpoint has been defined hold down the left mouse button and press the D key User s Manual MCUez HC05 HC08 Debugger 82 Operating Procedures MOTOROLA Operating Procedures Breakpoints 3 Select Show Breakpoints from Source or Assembly pop up menu Place the mouse pointer in the source or assembly component window and right click Select Show Breakpoints from the pop up menu The Breakpoints Setting dialog is displayed In the list of defined breakpoints select the breakpoint to delete Click Delete The selected breakpoint is removed from the list of defined breakpoints Click OK to close the Breakpoints Setting dialog box 4 Select Run Breakpoints 4 9 5 Breakpoints Menu Choose Run Breakpoints The Breakpoints Setting dialog is displayed Select the breakpoint to delete Click Delete Click OK to close the Breakpoints Setting dialog box Figur
118. d Gp A RUE SOR DEO IE PERRO ERA 2 9 D 4 4 1 Mec icio TEM crerm 220 D 4 4 2 Bil Port RAM e 1dQ sic dice riak kke Pitch i Ed rid eens 221 D 4 4 3 o Lo onus ee re ee ee ey ee qi RS is 221 D 4 5 ii c T 222 D 4 6 365 rr 222 DS DIKAN S sy abe CE DOE ROG VOR I So ee eee 223 D 5 1 Troce n0 PC 223 Do ene ie Bus Ana rra PREPARES Ee es 224 D 6 1 o eM CM 225 D 6 2 Potem Scarch SEMP o p4swes qeud uu qd d aet cap d ut q du 227 D 6 3 Sequanper NOI osrasinro rar 228 D 6 3 1 Continuous Non Triggered Modes 229 D 6 3 2 Counted Non Tnggered Modes ils ccs ee eo 230 D 6 3 3 Sequential Triggered Modes 202cc0cee2snsereeases 230 D 6 3 4 Counted Sequential Recording Mode 231 D 6 4 Time Tag Clock SOI sak ohh eee he Ps dtd ad Qo d pd e 231 p Collecting Data Frame 224422654 eau rr AA qUuR RES 233 Dl Pe o A raia Er Ea 233 D72 Disarming the Analy eenieder E rue Rh d 233 p 55 Siart PUNO Lascsaz baeeRYAR ERRARE FER etawes ba zeus 233 D 7 4 SUME BE id da di 233 D73 Recording Bus DIS Lio oer sci4ddaothqSden dtd de dpa ein 233 D 7 6 Trigger EVE A 234 DS Viewing Collected Lid 255 66y2045s06s uo ireny SESTAS YES 234 D 8 1 hj 16 MT Pret 234 D 8 2 Textual Graphical or Instructions ooooooooo o 234 D 8 3 Testual Display ossis be As 235 D 8 4 Instructions DISUBY Lied 2pe bp Veo ORE RE RO DSOo pbi eda 236 D 8 5 Graphical Display 5 2c ness oa vee As a Aq ARE sed 237 D 8 6 We Le Bee c 6o sesso
119. d in the MMDS or MMEVS target CAUTION Ifthe corresponding memory file is missing or has been overwritten the debugger will not connect with the target MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 27 Getting Started and User Interface The I O input output register definitions are loaded from a register description file reg located in the MCUez prog reg directory These files are related to the specific MCU used in the target The filename is represented as MCUxxxx reg where xxxx is the MCU Id in hexadecimal representation The register file enables register names to be used as command parameters or as expression operands If no appropriate file is found an error message is displayed corresponding information will be missing and related commands may not operate properly 2 4 1 Configuration File The project ini configuration file located in the project directory contains information used to configure the debugger and specify a default target Current target options are ESL emulation server library or D Bug12 ESL is used for MMDS or MMEVS Specifying ESL as the default target will load the emulator server library with functions used to operate with MMDS or MMEVS and cause the debugger to automatically detect the hardware target connection If no target is specified as the default the user must set a target from the Component Set Target menu option D Bug12 is used for HC12 target
120. dard Font Selection dialog and select the font characteristics to use in the component windows Select Component Background Color to open the color selection dialog This enables setting of the background color for component windows User s Manual MCUez HC05 HC08 Debugger 38 Getting Started and User Interface MOTOROLA 2 6 4 6 Window Menu Getting Started and User Interface Graphical Environment The Window menu Figure 2 17 sets the general arrangement of component windows and loads or stores custom arrangements Options v Autosize v Component Menu Cascade Tile Arrange Icons Options gt Layout gt 1 Source 2 Assembly 3 Register 4 Memory 5 Data 6 Command i 7 Module Figure 2 17 Window Menu Check Autosize to automatically resize component windows when the debugger main window is resized Check Component Menu to display the menu associated with the currently selected component window For example if the Source window is selected the Source menu appears in the main menu Select Window Layout to load or store arrangements in a hwl file MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 39 Getting Started and User Interface 2 6 4 7 Help Menu 2 7 Drag and Drop User s Manual The Help menu Figure 2 18 provides on line help and version information Help Help Topics About MCU ez Figure 2 18 Help Menu The
121. decimal cuicos aia ii Paced NEED 87 91 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Index 273 User s Manual HI WAVE Application S on darned si Hewes eee Rees dae ERR E IRR dca d oy ee 2 Component erat n E bese A bee RARE E RE S Pa RETE E qua 21 En Meesun s ie pana die tae ee eee edd seus dae ene dee 2 21 Jobboom 34 Using on Windows 95 or Windows NT 4 0 000000005 29 HSCOLLPOS votan sare rub Re tag e Fas saca ihe ede 171 l Tor PE 112 136 L B i EE rr 31 39 LF iilsised lta da Rp RAM Boe DANI PUER RERQIE Eq Ed EM RE dd 134 A ae a a T E EE E AEA E EEEE 172 Loading an Applicatiolt iussa eduerx ede bees eR ea 193 A non E E eee ease 191 Local Variable Displaying dessus cencia netaiko AEn ER RR RP REDE RR qd Ed qur 197 Pl A a ea a a E a A E E 67 191 LOG mp 135 M MARES sudeste m E EAE d ana sado Ens t int dte 138 MCUez DEOIGPUIDI ress seek ety ht abe ee Be eee exu eee tees dhe et a 192 MCUID chc RARE ERES RARE HERE RE Pda d Rp ERR Rs 183 NOCUIOnDnaii AAA 183 MCUTOOLS INI 22242094 bekree6EERER E RG UU Da be RE a T3 MCU WAVE Layout esseere penrre OG eae oa E E PER EAE SMS 75 MEM PEPERIT EA Rr pA 138 Memory O 59 io PEE 59 Menu SIMULAT criteria errar riera 37 TAPA otr dsd ana Ei APRA AA E 37 MIMD S0508 24st pk bep E EX PR ab 26 204 216 MMDS0508 Modular Development System 04 26 Modes SOU
122. ded No CPU loaded is displayed as an error message Lists the content of register file currently loaded The address and size of each register is displayed If no register file is loaded the following error message is displayed No register file loaded If 1ist is omitted the list and any other parameters of the previous RD command are used For the first RD command of a session all CPU registers are displayed Description The RD command displays the content of specified registers The display for a register includes both the mnemonic and the hexadecimal value of the register If the specified register is not a CPU register it is considered to be an I O register The debugger looks for the specified register in the loaded register file This file is called MCUxxxx reg where xxxx is a number related to the MCU Example in gt RD A X A 0x1 X OxF Contents of registers A and X are displayed Example in RD CPU will display all CPU registers User s Manual MCUez HC05 HC08 Debugger 146 Command Reference MOTOROLA Command Reference Target Commands RS Short description Sets a register Syntax RS lt register gt lt value gt lt register gt lt value gt Arguments register Specifies the name of a CPU register or register in the register file to be changed value Integer constant expression in ANSI C or MCUez assembler format representation Description The
123. displays information shown in Figure C 3 MCUez HC05 HC08 Debugger 204 MMEVS0508 Target MOTOROLA MMEVS0508 Target Loading the MMEVS0508 Target Component Load Reset Ld lo Communication Memory Map Target Signals Figure C 2 MMEVS0508 Menu Running Mode MCU Id For Help press F1 57600 Backand MCBGHCOR4Z32 TRACED y Help Baud Rate Debugger Status Figure C 3 Debugger Status Bar Displayed from left to right after the help line are the communication baud rate debugger run mode name of connected MCU MCU Id and debugger status If the driver cannot locate the target an error message and the Communication dialog box appear indicating that the target is not connected This dialog also can be opened by selecting Connect in the ESL menu C 3 1 MMEVS Target Startup File The startup command file startup cmd is executed by the debugger immediately after the MMEVS target driver has been loaded This file must be located in the current project directory Any debugger command can be used in this file Commands are described in Section 5 Command Reference Example of a startup cmd file wb 0x0035 0x00 wb 0x0012 0x11 MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMEVS0508 Target 205 MMEVS0508 Target C 4 MMEVS0508 Target Menu C 4 1 Load C 4 2 Reset The MMEVS0508 Target menu is displayed in Figure C 4 E Component Load Reset Lx b Co
124. do pP 174 SLAY odoro ei oter aE KG ER RR OR MP REDE PIER IM E EE 174 SMEM Er 175 SMOD Ano v 176 SUG c rr 177 SPROG ET 177 198 A aa a a a E a a aaia e S 174 Starting an Application viste is 78 Blartu p d serra epe bEeR Pv RP ADU PERO RE IA EU NE xd ed de 181 Status Message coo cod sree Sed abbr RR qu ERR TEE PEEE LE dees LEES 33 HALT scosebew k itiche ba mb RE pae RS dra 33 HALTED s erona d en eens shuns e Spring auis dia edm 33 RBADY deipa bees qu RR RETE CREE E E RR qa 33 RUNNING Los basreReericereeeerkeesa aiiwesQeedbsesudbe tends 33 Status register BUS cotorra rra ds RERUM 58 Step Ieor ener een perean AERE Ed PIA essere EREE 85 194 Assembly Instruction 2 4 uop a emen pr eed hb RR ER omes sos 85 Step OUt Lacarra ld 85 194 F nun Callos ipe 29 top ee vide tate aii as 196 Step OVET dioses ects eda exe aS e di ci qudd 85 194 STEPPED 26530 ver EO adeunde ei deeerdesseeaneesdoesne cases 33 STEPPED OVER cols Rt da inini Ein ed da A 33 Stepping Message STEPPED AA 23 STOPPED eta ER e ER RR RE na a E riadas 33 TRACED Lai rece REI crei ee eee eens 33 STOPPED oL user chew eei eee rr 33 Stopping an Application 24eli2ers ebbe kh I RI RETE Pur Ade 78 193 exaltare li e PEE 87 T O ele ete nea ee Vat deu d 151 Time Tag Clock 15s opu E LE ERE cu tE HER ds RE RW 231 Trace 0 44 niet See en UPS an E Ubi M ta EEE EEE 223 Trace Mode dorar E ER RN resis a prd Redde 228 TRACED 20 Ge to ERES bReee Geer See
125. ds for the ATTRIBUTES command are not listed Component specific commands for components that are not opened will also not be listed Example in help MCUez VER AUTOSI OPEN SET MCUez HC05 HC08 Debugger ZE Shows version information Selects window sizing mode Opens a component window Loads a target component User s Manual MOTOROLA Command Reference 171 Command Reference LOAD User s Manual Short description Loads an application file Syntax LOAD applicationName Argument applicationName Name of application If the abs file is not located in the project directory the complete path must be specified Description Loads an application file for debugging If no parameter is specified the Load Executable File dialog is opened Example LOAD FIBO ABS Loads the application fibo abs MCUez HC05 HC08 Debugger 172 Command Reference MOTOROLA Command Reference Component Commands OPEN Short description Opens a component window Syntax OPEN componentName x y width height I Arguments componentName Name of the component window to be opened x X axis of the component window from upper left corner y Y axis of the component window from upper left corner width Component window width height Component window height Opens the component window as an icon x y width and height are specified as a percentage of the MCUez main window Description
126. e 2 MHz oscillator OSC4MHZ Selects the 4 MHz oscillator OSC8MHZ Selects the 8 MHz oscillator OSC16MHZ Selects the 16 MHz oscillator source EXT Selects an external clock source Example OSC osc8Mhz Use the 8 MHz internal emulator clock Disables the real time memory block at base address 1000 User s Manual MCUez HC05 HC08 Debugger 252 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands PROTOCOL Communication Protocol Command Description The PROTOCOL command allows the user to display the communication protocol between the debugger and the server in the Command Line window Syntax PROTOCOL ON OFF Arguments ON Protocol is displayed in the Command Line window default OFF Protocol is not displayed in the Command Line window or logged in the log file MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 253 MMDS0508 Target RESET Reset Command NOTE User s Manual Description The RESET command resets the target MCU RESET GO performs a reset of the EM emulator and automatically starts execution of the code starting at the address stored in the reset vector RESET STOP performs a reset and waits for user commands Syntax reset GO STOP Arguments GO Resets the MCU and does a Go from Reset STOP Resets the MCU and stops default Examples Reset Go Resets the MCU and does a Go from Reset Reset Resets the MCU and stops default setting This c
127. e 4 6 shows the breakpoint options in the pop up menu MCUez HC05 HC08 Debugger Set Breakpoint Run To Cursor Show Breakpoints Open Module Find Marks Figure 4 6 Breakpoints User s Manual MOTOROLA Operating Procedures 83 Operating Procedures User s Manual Table 4 1 defines all breakpoint menu options in the pop up menu Table 4 1 Breakpoint Pop Up Menu Definitions Menu Entry Description Set Breakpoint Selects the permanent breakpoint option When selected sets a temporary breakpoint at the nearest code position and continues execution of the program immediately If a disabled breakpoint is at this position the temporary breakpoint will also be disabled and the program will not halt Temporary breakpoints are removed automatically when they are reached Run To Cursor Opens the Breakpoints Setting dialog box and allows the user to consult the list of breakpoints defined in the application and to modify their properties Show Breakpoints Toggles the display of source positions where breakpoints Marks may be set If this switch is on source positions are marked by upside down check marks If some statements do not show marks although the mark display is switched on the following may be at fault The statement did not produce code due to compiler optimization The entire procedure or section is not linked in the application because of smart linking MCUez HC
128. e MODE command selects the display mode of variables In automatic mode default mode variables are updated when the target is stopped Variables from the currently executed module or procedure are displayed in the data component In locked and frozen mode variables from a specific module are displayed in the data component In locked mode values from variables are updated when the target is stopped In frozen mode values are not updated when the target is stopped In periodical mode variables are updated at regular time intervals when the target is running The default update rate is 1 second The UPDATERATE command sets the update rate for the data component This command is only relevant when the update mode for the data component is set to periodical The SMOD show module command displays global variables of the corresponding module User s Manual MCUez HC05 HC08 Debugger 200 C Source Level Debugging MOTOROLA MCUez HC05 HC08 Debugger C Source Level Debugging Miscellaneous C Source Level Commands The SPROC show procedure command displays local variables of the procedure Arguments hex oct bin symb signed unsigned periodical locked frozen tomatic au module Tate Equivalent operations Sets format representation to hexadecimal Sets format to octal Sets format to binary Sets format as a symbol Displays value in signed decimal format Displays val
129. e T trace command is executed MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 111 Command Reference IF User s Manual Short description Conditional execution Syntax IF cond Argument condition Description The conditional commands for example the ition Defined as in C language syntax F ELSEIF ELSE and ENDIF subcommands allow different command sections to be executed depending on the result of the corresponding conditions Conditional blocks may be nested A conditional block can be specified to start inside an The conditions of the commands up to the next ELSEIF ELSE or END F ELSE F or ELSE command block F and ELSEIF commands respectively guard all F command on the same nesting level The ELSE command guards all commands up to the next ENDIF command on the same nesting level Any occurrence of a subcommand not in sequence of 7 ELSE ENDIF is an error F zero or more ELSEIF zero or one Example DEFINE jump 0 DEFINE jump jump 1 IF jump 10 T DEFINE jump 0 ELSEIF jump 100 DEFINE jump 1 ELSE DEFINE jump 2 ENDIF The jump 10 condition is evaluated as in ANSI C and depending on the test result the T trace instruction is executed or the ELSEIF jump 100 test is evaluated MCUez HC05 HC08 Debugger
130. e program The text displayed in the Source component window is chroma coded Language keywords comments and strings are emphasized with different colors respectively blue green red A word is selected by double clicking it Select a section of code by holding the left mouse button and dragging the mouse over the appropriate code range If the selected source code range matches the highlighted instruction set in the assembly component both code groups are highlighted Marks are displayed at all locations where breakpoints can be set If execution has stopped the current position is marked in the source component with the corresponding statement in the source component highlighted The text visible in the Source component window cannot be edited The source component is a file viewer only MCUez HC05 HC08 Debugger 188 C Source Level Debugging MOTOROLA C Source Level Debugging Procedure Component B 4 Procedure Component B 4 1 Operations The procedure component displays the list of procedure or function calls that were performed up to the moment the program was halted This is the procedure chain also known as the call chain Entries in the procedure chain are displayed in reverse order from the last call most recent on top to the first call on bottom Procedure parameter values and types can be displayed The object information bar contains the source module and the address of the selected procedure Im Procedure
131. eS Seen RE auq4RE SR ab 33 User s Manual MCUez HC05 HC08 Debugger 276 Index MOTOROLA Index U JUD TM ES does 87 91 UNDEF 2 2 x3 AA ERR Re va EER 115 Unsigned Decimal enterada HAS ber 87 91 UN ll resis dass rs os 116 UPDATERATE 229 iz Gxe f Eae errar A its 178 V VALUES cuts C Rx tac E RETE RI OO b Rc Sal RR CES GR 180 Variable Displaying Global Variables 0 0 0 eee eee 86 Displaying Local Variables 197 Editing Vale ecu iis Coes he eee Ue UP QUEE Ed eT T Ead 87 Forint 2i ded eres e PES er ped aes 64 191 Local and Global 1 0 0 0 0c I 64 190 hu uM ERE a ans ee ea os be aed Bae a 67 191 SCOPE eR teed ee secease eee ane Zee eee wwegeelaedceus 191 DDE Pcr 64 Valverde rade ewneeseeet see coe eitwe sete see E eK UE 87 Viewing Data esmes siig m ee is sin eii 234 W bf lg E 117 Watchpoint COUMUNG MEE eee eee eee Eee ede daa 192 WATCHPOINT Setas sees see OVER RES A dx ERR i 34 o M S 132 WHILE assess M eens e en Gogh sees REESE EE Urt dd 118 136 Window Bis Analyzer Clock 1 sets caos pE CORR EE aC PERO AS ees 232 Bus Analyzer Search Event 20i eeabsbecave RE e 241 Bus Analyzer Search Pattern 1 iocos rb s 227 242 Dump Bus Analyzer Frames 244 A A o 153 WORD mr 179 WorKDIT a prd x Kop QU edo e urs ose RC gc 73 soda e a es dace debo SES ERE SAI dapes dra sed eR d En 13 A n ee EE A ee ee eee eee E NEERA 154 Z ZOOM A genet ens aiea pe a a a
132. ebugger Section 5 Command Reference provides detailed information on all MCUez commands An example is provided with each description Appendix A Register Description File defines the syntax for creating a register file Appendix B C Source Level Debugging provides information on how to use the debugger when debugging C code at the source level Appendix C MMEVS0508 Target provides information about the target interfaces related to the MMEVS0508 modular evaluation system for the MC68HC05 and MC68HC08 MCU Families Appendix D MMDS0508 Target provides information about the target interfaces related to the modular development system for the MC68HC05 and MC68HC08 MCU Families MCUez HC05 HC08 Debugger 22 General Information MOTOROLA General Information Document Conventions 1 3 Document Conventions This section describes terms and styles used throughout the manual 1 3 1 General Term This general term is used in this document Keyl Key2 The plus sign means that Keyl is held down while Key2 is pressed 1 3 2 Mouse Operations This list describes the terminology used to define mouse operations Click Implies to click the left mouse button once e Right click This click operation is done with the right mouse button e Double click This indicates to double click the left mouse button e Drag Press and hold down the left mouse button while dragging the mouse The object will move with the mouse
133. ebugger User s Manual MOTOROLA MMDS0508 Target 223 MMDS0508 Target D 6 Using the Bus Analyzer The bus analyzer Trace component window has its own menu to control the features of the MMDS0508 bus analyzer hardware The bus analyzer window is called Trace The Trace component window Figure D 9 can be loaded by selecting Open in the Component menu and selecting Trace from the list or by selecting Bus Trace in the MMDS0508 menu From the user s perspective using the bus analyzer requires three steps 1 Defining the data collection parameters 2 Collecting the desired bus data running the program 3 Viewing the collected data The bus analyzer allows these parameters to be defined e Triggers e Pattern e Sequencer Time tag clock Set Time Base Show Location v Textual Graphical Instructions Items ST Ox6A Dump Go to Frame Arm Analyzer LDA Ox6D Setup Search b 006D 1491 uE us Figure D 9 Trace Component Window and Pop up Menu User s Manual MCUez HC05 HC08 Debugger 224 MMDS0508 Target MOTOROLA MMDS0508 Target Using the Bus Analyzer D 6 1 Trigger Setup To set up the bus analyzer select Trace Setup to display the Bus Analyzer Configuration dialog box Figure D 10 This dialog box allows the user to define symbolic names for address values The address and symbolic name values must match If they are inconsistent the user
134. ecedes and therefore conceals a program variable with the same name Defined symbols remain valid when a new application is loaded Use this command to assign meaningful names to expressions that are used in other commands This increases the readability of command files and avoids re evaluation of complex expressions An application variable or I O register can be overwritten with a DEF INE command User s Manual MCUez HC05 HC08 Debugger 104 Command Reference MOTOROLA Example DEF Command Reference Kernel Commands INE addr 1000 DEF INE limit addr 15 First addr is defined as a constant equivalent to 1000 Then limit is defined and affected with the value 1000 15 Define a symbol on the command line using the DEF INE command The symbol defined in the application is not accessible until an UNDEF is issued on the symbol name Example DEF 7 DB y UND Define symbol testCase INE testCase 800 Display value stored at address 800 testCase Undefine symbol testCase EF testCase Alternate operation associated with IF command ELSE Short description Syntax ELSE Description The ELS E keyword is associated with the IF command ELSEIF Short description Alternate conditonal operation associated with IF command Syntax ELSEIF Argument condit condition ion Defined as in C language syntax Description
135. ed using standard ANSI C notation Example Notation Meaning 0x Hexadecimal constant Q Octal constant Similarly the assembler notation for constant is supported This means that independent of the current number base hexadecimal octal or binary constants can be specified using the assembler prefixes Example Notation Meaning Hexadecimal constant Octal constant oe Binary constant When the default number base is 16 constants starting with a letter A B C D E or F must be prefixed by 0x or Otherwise the command line detects a symbol and not a number Example Notation Meaning 5AFD Hexadecimal constant 5AFD AFD Symbol name SAFD Hexadecimal constant User s Manual MCUez HC05 HC08 Debugger 102 Command Reference MOTOROLA Command Reference Kernel Commands 5 6 Kernel Commands AT Kernel commands are commands that build command programs They are used as a command line component in an MCUez debugger command file Each command line component accepts one command at a time The user can build programs and combine kernel base common and component specific commands Short description Time delay for executing a command in a command file Syntax At time Argument time Expression interpreted in milliseconds Description The AT command temporarily suspends a command from executing for a specified delay in milliseconds The delay is measured from the time the
136. egisters are displayed in binary format in the Register component window Register ATTRIBUTES VSCROLLPOS 3 Scrolls three positions down The fourth line of registers is displayed on the top of the register component Register lt ATTRIBUTES VSCROLLPOS 0 Returns to the default display The first line of registers is displayed on the top of the register component Register ATTRIBUTES HSCROLLPOS 5 Scrolls five positions right The sixth column of registers is displayed on the left of the register component Register ATTRIBUTES HSCROLLPOS 0 Returns to the default display The first column of registers is displayed on the left of the register component In the Source Component Syntax ATTRIBUTES list list command command command SPC address SMEM range SMOD module SPROC numberAssociatedwithProcedure MARKS ON OFF Arguments address Address to be located range Memory range to be located module Specified module MARKS on Displays breakpoint marks MARKS off Hides breakpoint marks MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 159 Command Reference Description The ATTRIBUTES command sets the display and state options of the Source component window The SMEM show memory range command and SPC show PC address command displays the corresponding module s source text scrolls to the corresponding text range location or text address location and
137. emark of Motorola Inc MOTOROLA Semiconductor Products Sector
138. end mode Logged lines are appended to the end of the existing log file If the A option is omitted and the specified file exists the file contents are cleared before logging begins Description The LF command logs commands and responses to an external file or device While logging remains in effect any line that is displayed in the Command Line window is also written to the log file Logging continues until a close log file NOLF command is executed When the LF command is entered with no filename the Open File dialog is displayed Use the LOG command to specify the type of information to be logged Example LF LOGFILE TXT A The file logfile txt is opened as a log file in append mode This example assumes the file is in the working directory User s Manual MCUez HC05 HC08 Debugger 134 Command Reference MOTOROLA Command Reference Target Commands LOG Short description Enables or disables logging of specific information Syntax LOG type state type state Arguments type is one of the following types CMDLINE Commands entered on the command line CMDFILE Commands read from a file RESPONSES Command output responses ERRORS Error messages NOTICES Asynchronous event notices such as breakpoints state Value is on or off to enable or disable logging of the type Description The LOG command enables or disables logging of user specified information in the command line component and to t
139. es several options Table 4 3 defines the format options Table 4 3 Memory Display Format Options Menu Entry Description Hex Memory dump is displayed in hexadecimal format Dec Memory dump is displayed in signed decimal format UDec Memory dump is displayed in unsigned decimal format Oct Memory dump is displayed in octal format Bin Memory dump is displayed in binary format MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 91 Operating Procedures 4 13 2 Modifying Memory Address Content The debugger allows the content of a memory address to be changed To do so 1 Double click the memory location to be modified The content of the memory location is highlighted and can be edited 2 The format for the input value depends on the format selected for the memory component If the format is hex the input value is treated as a hex value For example if the input value is 10 the memory location will be set to Ox10 16 3 To restore the previous memory value press Esc 4 To validate the new value press Enter or Tab or select another memory position 5 Oncea value has been allocated to a memory word it is validated and the next memory address is selected automatically User s Manual MCUez HC05 HC08 Debugger 92 Operating Procedures MOTOROLA User s Manual MCUez HC05 HC08 Debugger 5 1 Contents de 5 3 5al Dede doe 5 4 a0 5 5 1 3 9 4 P 5 5 4 5 6 5 7
140. es the action taken when dragging into the source component Table 2 7 Dragging into the Source Component Source Action Component Assembly Source component scrolls to the source statements corresponding to the pointed to assembly instruction and highlights it Memory Displays high level language source code starting at the first address selected The instructions corresponding to the selected memory area are greyed in the source component Module Displays source code from the selected module 2 7 8 Dragging from the Memory Component Table 2 8 describes the action taken when dragging from the memory component Table 2 8 Dragging from the Memory Component Destination Component Action Assembly Displays disassembled instructions starting at the first address selected The instructions corresponding to the selected memory area are highlighted in the assembly component Command Appends the selected memory range to the command line Line window Register Loads the destination register with the start address of the selected memory block Source Displays high level language source code starting at the first address selected Instructions corresponding to the selected memory area are greyed in the source component User s Manual MCUez HC05 HC08 Debugger 44 Getting Started and User Interface MOTOROLA Getting Started and User Interface Drag and Drop 2 7 9 Dragging into the Memory Component
141. ess In the memory component the SPC command shows the location memory address of the specified address Example in gt Assembly SPC 0x8000 The Assembly component window scrolls to the address 0x8000 and the instruction is highlighted SPROC Short description Shows information associated with the specified procedure This command is available only when performing C source debugging using the HIWARE compiler Refer to Appendix B C Source Level Debugging for information on C source debugging MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 177 Command Reference UPDATERATE User s Manual Short description Sets the data update mode Syntax UPDATERATE rate Argument rate Constant number representing tenths of a second between 1 and 600 tenths of a second for example 0 1 to 60 seconds Description In the data and memory components the UPDATERATE command is used to set the data refresh update rate The UPDATERATE command has effect only when the data or memory component is set to periodical mode Example in Memory updaterate 30 This rate sets memory to update every three seconds MCUez HC05 HC08 Debugger 178 Command Reference MOTOROLA Command Reference Component Commands VER Short description Displays the MCUez debugger and component windows version numbers Syntax VER Example in ver MCUez MCUez Engine Source Assembly Register Memory
142. ger User s Manual MOTOROLA MMDS0508 Target 269 MMDS0508 Target User s Manual MCUez HC05 HC08 Debugger 270 MMDS0508 Target MOTOROLA User s Manual MCUez HC05 HC08 Debugger Index Symbols SL eie pape oes ka be Exe A RU E E der Reese sa ees eRe T A ACTIVATE os eR aRAieRREAR REIR ER ad RES ERSGqOX Ad Rxddu Sau ERE 155 ADDRESS ERROR sss Sade RS Ss EO GR bate e M acu s 34 Application Assembly Siep o4 bee dade cates PERI te td ede dire i a qud md eq 85 rni PET 76 vic STPPP TC 78 A e S 85 194 Step Oll poriaripir carol faripr dae bh PE E Rd dU RES eased 196 SEP OVET uo hts Roe d xi aps adea s ehe E Rain 85 196 9 A E a ea E a a E A a a 78 193 Ly sd cine TE E oa E E E E E E E E E 103 ATTRIBUTES utut oy wed sace cR hie on ae oe eux dada da Estes 155 Automatic eoan a is 61 67 191 AUTOSIZE oat Aceh aed RO CD SCR RO WG dG REI Scio DF qp dd ra de ee 165 AQUUDSMZE sir A a 39 B Background Color 1 522 cess RR REG RE REG a EG 38 BC ios 119 BCECULOR 5225s othe dataehs esla 166 BD spera ee ERE AN 168 Do T m 87 91 Bindty A ead Reed Rs dard die oe 87 89 91 le 1y 1 30 0110 PUN un a EE a E a E E 53 358 BREAKPOINT 0 oe esas xr a dno RES pde Sese pU dq d Ra 33 COUMING Loud on dee wow P EDU RECENTE Cd dq mere Md Due 82 192 194 Deleng P 82 Multiple selection 4 12 xe ge c I EPeR b X EE qu xx ER 80 lus C PL nea dag oe 82 POS
143. ghlighting the corresponding statement 3 3 2 2 Decoding Instructions To disassemble code select a range of instructions in the source component and drag it into the assembly component The corresponding range of code is highlighted in the Assembly component window In the source component place the mouse cursor on a line of code Click and hold the left mouse button and press the R key Release the R key then release the left mouse button to highlight a code range in the assembly component that corresponds to the code pointed to in the source component The code range in the source component is also highlighted Figure 3 6 illustrates this process MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 53 Component Windows El Source Pel ES eel Assembly ICAMCUEZADEMOShcO5tfibo DBG Entry ST fiboCount LDX 0x80 JSR O0x0100 LD Limit STX 0x82 ST 0x81 A BEQ main E LDA 0x17 BRA main2 a BEQ 20 abs BRA 19 fabs RTS 1 ah Figure 3 6 Online Disassembly 3 3 2 3 Find Dialog Box Enter the string to search for in the Find what edit box To start searching click Find Next The search begins at the current selection or first line visible in the source component when nothing is selected Figure 3 7 shows the Find dialog box Find HEI Find what Find Next Cancel Match whole word only Direction C Up Down Match case Figure 3 7 Find
144. he current procedure Items are identified as absolute or relative corresponding to the presence or absence of a scope An item is identified as absolute by specifying its scope for instance the module and or procedure where the item is located An item is identified as relative if a scope is omitted In this case the item is assumed to be located in the current procedure 5 5 3 Scope Examples fibo dbg Fibonacci fibl Matches the local variable ib1 of the procedure Fibonacci in the module fibo dbg main Matches the procedure main in the current module start12 c _Startup Matches the procedure _Startup in the module start12 c counter Matches the global variable counter of the current module Fibonacci fibl Matches the local variable ib1 of the procedure Fibonacci of the current module fibo dbg counter Matches the global variable counter of the module fibo MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 101 Command Reference fibl Matches the local variable of the current procedure or a global variable of any module startupData flags Matches the field flags of the local or global variable st artupData whichisa structure of the current module or procedure 5 5 4 Constant Standard Notation Inside an expression the ANSI C standard notation for constant is supported This means that independent of the current number base hexadecimal or octal constants can be specifi
145. he word value OxAF O00 MCUez HC05 HC08 Debugger 154 Command Reference MOTOROLA Command Reference Component Commands 5 8 Component Commands The commands listed in this section monitor the MCUez debugger environment and manage component windows ACTIVATE Short description Activates a component window Syntax ACTIVATE component window Description Activates a component window The window is displayed in the foreground and its title bar is highlighted Example ACTIVATE Memory This command will make the memory component the active window ATTRIBUTES Short description Sets the display and formatting attributes for a component window Usually this command is not specified interactively by the user However this command can be written in a session record file or in a script command file to save and reload component window layouts An equivalent operation is typically possible using MCUez menus and drag and drop as described under the equivalent operations headings that follow In the Assembly Component Syntax ATTRIBUTES list list command command command ADR ON OFF SMEM range SPC address CODE ON OFF ABSADR ON OFF TOPPC address MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 155 Command Reference Arguments address Address to be located range Memory range to be located module Specified module CODE on Switches on the display of the ma
146. he failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unin tended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death as sociated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and amp are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer How to reach us USA EUROPE Locations Not Listed Motorola Literature Distribution P O Box 5405 Denver Colorado 80217 1 800 441 2447 or 1 303 675 2140 Customer Focus Center 1 800 521 6274 JAPAN Motorola Japan Ltd SPD Strategic Planning Office 141 4 32 1 Nishi Gotanda Shinagawa ku Tokyo Japan 03 5487 8488 ASIA PACIFIC Motorola Semiconductors H K Ltd Silicon Harbour Centre 2 Dal King Street Tai Po Industrial Estate Tai Po New Territories Hong Kong 852 26668334 Mfax Motorola Fax Back System RMFAX0 email sps mot com http sps motorola com mfax TOUCHTONE 1 602 244 8609 US amp Canada ONLY 1 800 774 1848 HOME PAGE http motorola com sps Mfax is a trad
147. he log file when it as been opened with an LF command Example LOG ERRORS OFF CMDLINE on Error messages are not logged Commands entered in the command line component are logged By default when the LOG command is not specified all types are logged Responses are results of commands For examble for the DB command the displayed memory dump is the response of the command Errors are displayed in red in the command line component Protocol messages are not errors Notices are displayed in green on the command line They denote status information returned asynchronously by the target MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 135 Command Reference Logging of IF FOR WHILE and REPEAT When logging is enabled for commands executed from a command file a command file executed with the CF or CALL command without the NL option and with the CMDFILE type of the LOG command set to ON all commands executed in an IF block are logged All commands in a block that are not executed because the corresponding condition is not verified are also logged but preceded with a dash Example When executing this command file define truth 1 IF truth bckcolor blue at 2000 bckcolor white else bckcolor yellow at 1000 bckcolor white ENDIF This log file is generated define truth 1 IF truth bckcolor blue at 2000 bckcolor white lelse bckcolor yellow at 1000
148. he menu to open the Memory Configuration dialog window Figure D 4 This dialog displays the current memory map Memory Configuration x Configuration File sd LU bee tibi MEM Load zn i j Save r Dual Port RAM Base Address jo Range 0 3FF v Enable gt Memory Type Start End Comment PRU or TOF 02 TOP board resourds ROM Q020 OO4F ROM 04 write protect NONE 0050 007F NONE 0D RAM 0080 OOFF RAM 01 ROM 0100 O8FF ROM 04 write protect 10 0900 0900 TOP 02 NONE 0901 1FEF NONE 0D COP 1FFO 1FFO RAM 00 cop address needs to be v RAM 1FF1 1FFF RAM tfl4 Start o End fir Type io y Comment PRU or TOP 02 TOP board resource or the PRU Add Update Delete Cancel Help Figure D 4 Memory Configuration Dialog Box MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 219 MMDS0508 Target D 4 4 1 Configuration Auto select according to MCU Id Upon starting the debugger the target memory setup is automatically loaded The debugger loads the memory map file mem related to the MCU Id If not checked the previously opened or saved memory map file is automatically loaded Load Opens a dialog box Figure D 5 to locate and load a different memory file If a file is not found or is invalid an error message is displayed Figure D 6 Memory files blocks can also be loaded with the LOADMAP comm
149. he records are written offset Optional offset to add or subtract from addresses when writing S records The default is 0 A Appends the saved S records to the end of an existing file If this option is omitted and the specified file exists the file contents are cleared before saving the S records Description The SAVE command saves a specified block of memory to a specified file in Motorola S record format The memory block can be reloaded later using the load S record SREC command Example SAVE 0x1000 0x2000 DUMP SX A The memory range 0x1000 to 0x2000 is appended to the dump sx file NOTE ifno path is specified the path is assumed to be the current working directory MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 149 Command Reference SET SREC NOTE User s Manual Short description Sets a new target Syntax SET targetName Argument targetName Name of target without extension to be set Description Sets a new target for the debugger The file targetName tgt must be available in the PROG directory Example SET ESL The ESL target is set in the MCUez debugger Short description Loads the content of an S record file in memory Syntax SREC filename offset Argument filename Specified file containing records offset A signed value added to the addresses stored in the file when loading the file contents Description The SREC command loads Moto
150. hen the analyzer stops recording and is disarmed If count is omitted the count defaults to one 1 Specifies post trigger count decimal for the sequential modes Causes count bus cycles to be recorded after the trigger point If count is omitted the default is one This also specifies n of the nth event of A B C D sequencer PS Stops the emulator when recording stops Thus the analyzer can be used as a sequenced breakpoint machine MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 265 MMDS0508 Target Examples SQ ALL 100 Specifies 100 bus cycles After 100 cycles the analyzer disarms and stops recording SQ EVENT 10 S Records 10 event cycles then stops the emulator SQ ALL Sequencer is set to Continuous All Cycles TD Trigger Disable Description The TD command disables specified triggers Syntax TD lt list gt Arguments list List of triggers to disable each trigger is separated by a comma or space character All triggers A B C and D Examples TD A B Disables triggers A and B TD Disables all triggers User s Manual MCUez HC05 HC08 Debugger 266 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands TE Trigger Enable Description The TE command enables specified triggers Syntax TE list Arguments list List of triggers to enable each trigger is separated by a comma or a space All triggers A B
151. his file Commands are described in Section 5 Command Reference Example of a startup cmd file wb 0x0035 0x00 wb 0x0012 0x11 D 4 MMDS0508 Target Menu The MMDS0508 target menu is displayed in Figure D 3 IE Component Load RE Reset Communication Memory Map Target Signals Bus Trace Figure D 3 MMDS0508 Target Menu D 4 1 Load Select Load to load an executable file containing an abs extension D 4 2 Reset Select Reset to reset the target MCU After selecting this option the commands specified in the reset cmd script file are executed This file should be located in the current project directory Any debugger command can be used in this file Commands are described in Section 5 Command Reference User s Manual MCUez HC05 HC08 Debugger 218 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS0508 Target Menu D 4 3 Communication D 4 4 Memory Map Select Communication to display the Communication dialog box If the target is not connected enter the port that connects the serial cable to the target Select the maximum baud rate the host will support or 115 200 The maximum baud rate depends on the speed and interrupt load of the host computer The default is 9600 Check the Show Protocol box to display the communication protocol in the command line component of the debugger This feature should be used only for advanced debugging issues Choose Memory Map from t
152. iable is initialized with 32 If a variable input value is 020 the variable is initialized with 16 2 Torestore the previous value press the escape Esc key or select another variable 3 To validate the new value press either the Enter key or Tab key 4 If an input value has been validated by pressing the Tab key the next variable value in the component is highlighted automatically 4 11 4 Displaying an Allocated Variable Address The debugger displays the start address and variable size in the data information bar when a variable name is clicked 4 11 5 Loading an Address Register with a Variable Address To load a register with the address of a variable drag a variable name from the data component to the register component The destination register is updated with the start address of the selected variable 4 12 Working with Registers The following sections describe how to work with registers User s Manual MCUez HC05 HC08 Debugger 88 Operating Procedures MOTOROLA Operating Procedures Working with Registers 4 12 1 Changing the Register Display Format The debugger allows the register content to be displayed in hexadecimal or binary format To do so 1 Right click in the register component to display the pop up menu 2 Choose Options 3 Select either binary or hexadecimal format 4 12 2 Modifying the Content of an Index or Accumulator Register The following procedure describes how to modify the con
153. ified it looks for the file or writes the file into the current project directory For example when no path is specified the default directory is the project directory component Name of a component window Example Memory 5 5 Expressions Many commands accept expressions as parameters Expression syntax and semantics are described here MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 99 Command Reference 5 5 1 Expression Definition in EBNF Example expression lorExpr lorExpr landExpr landExpr logical OR landExpr orExpr amp amp orExpr logical AND orExpr xorExpr xorExpr bitwise OR xorExpr andExpr andExpr bitwise XOR andExpr eqExpr amp eqExpr bitwise AND egExpr relExpr relExpr relExpr shiftExpr lt gt lt gt shiftExpr shiftExpr addExpr lt lt gt gt addExpr addExpr mulExpr mulExpr MulExpr castExpr castExpr castExpr Mer I 4 parenExpr parenExpr expression cObject symbol register variable string number symbol defined with the DEFINE command register IOReg variabl ObjectReg ObjectReg OBJPOOL ObjectSpec ObjectSpec ObjectName FieldName ObjectName ident Index FieldName IdentNum
154. instructions can be generated when using a high level language The debugger helps detect all positions where a breakpoint can be set when these steps are followed 1 Right click in the source component to display the source pop up menu 2 Select Marks from the pop up menu All statements where a breakpoint can be set are identified by a special mark 4 See Figure 4 5 3 Toremove the breakpoint marks right click in the source component and uncheck Marks f Source Ml ES eed Assembly Bl x C A AMCUEZ DEMO Shc O5 fibo DBG Fibonacci T n ST a e fibl l fibl n fibo l fibo 1 fib2 1 Figure 4 5 Identifying Breakpoint Positions MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 81 Operating Procedures 4 9 3 Defining a Breakpoint The debugger provides two ways to define a breakpoint 1 Using the pop up menu Point at a statement in the Source or Assembly component window and click the right mouse button to display the pop up menu Select Set BreakPoint or Run to Cursor from the pop up menu A breakpoint mark is displayed in front of the selected statement 2 Using the keyboard Point at a statement in the Source or Assembly component window hold the left mouse button and press the P key for a permanent breakpoint or T for a temporary breakpoint A breakpoint mark is displayed in front of the selected statement Once a breakpoint has been define
155. interfaces as described in the MCUez HCI2 Debugger User s Manual Motorola document order number MCUEZDBG12 D Example project ini file DEFAULTS Window0 Source 0 0 50 40 Windowl Assembly 50 0 50 40 Window2 Register 50 140 50 30 Window3 Memory 50 70 50 30 Window4 Data 0 40 50 25 Window5 Command 0 65 50 20 Window6 Module 0 85 50 15 Target ESL MainFrame 0 1 1 1 1 1 204 174 866 732 Motorola ESL ServerType 0 MapFileName C MCUEZNPROGNMEMNOOBFEVOO MEM User s Manual MCUez HC05 HC08 Debugger 28 Getting Started and User Interface MOTOROLA Getting Started and User Interface Loading a Target 2 5 Loading a Target If no default target is set in the project ini file select Set Target from the Component menu and choose ESL from the list D bug12 Esl KE window He Set Target Fonts Background Color He Help Figure 2 3 Setting a Target The ESL driver automatically attempts to locate the target for example the MMDS0508 or MMEVS0508 If the target is successfully loaded the related menu appears between the Run and Component menus for example MMDS0508 The debugger status bar displays information related to the connected target SPA Component 1 Load 13 Reset Communication Memory Map Emul Signals Bus Trace Figure 2 4 MMDS0508 Menu If the ESL driver cannot locate the target an error
156. iodical locked frozen au tomatic module ra te Description The ATTRI MO SMOD DE automatic periodical locked module UPDATERATE rate Sets format representation to hexadecimal Sets format to octal Sets format to binary Sets format as a symbol Displays value in signed decimal format Displays value in unsigned decimal format Set Set Set Set Da Da Da Da ta component to periodical update mode ta component to locked update mode ta component to frozen update mode ta component to automatic update mode Specified module Update rate in tenth of second Valid value is 1 to 600 component window BUTES command sets the display and state options of the Data The FORMAT command selects how the list of variables is represented The format can be one of the following binary octal hexadecimal signed decimal unsigned decimal or symbolic The MOI DE command selects the display mode for variables In automatic mode default variables are updated when target is stopped Variables from the currently executed module or procedure are displayed in the data component In locked and frozen mode variables from a specific module are displayed in the data component MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 161 Command Reference In locked mode variable values displayed in the data component are updated
157. is the MCU Id in hexadecimal representation This file is expected to be found in the directory where the program files are located for example PROG REG If this file is not found the default reg file is searched for and loaded If this file is not found corresponding information will be missing and related commands may not deliver the complete results A header contains the name identification number and location of the register block of the MCU The header is followed by a list of module descriptors Each descriptor contains register definitions and optionally a memory map MCUez HC05 HC08 Debugger User s Manual MOTOROLA Register Description File 183 Register Description File specification The register definitions can be grouped under a group name Each register definition defines the name address and size of an I O register The memory map specification is used by the MEM command to display the configured memory of that module A 4 Description Using Extended Backus Naur Form EBNF The syntax of the register file is described here in EBNF CUDescription Header Module Header MCU McuName Mculd RegBase RegSize odule MODULE ModuleName RegDef GroupDef MapDef GroupDef GROUP GroupName RegDef RegDef RegName RegOffset Siz apDef MEMMAP BlkName BaseMapDef MapSecifier BaseMapDef BASE Exp SIZE Exp
158. isassembled instruction If both Display Code and Display Address are selected at the same time the absolute address is displayed first then the hexadecimal code and finally the disassembled instruction Display Absolute Address Displays the absolute address at the end of a disassembled branch instruction MCUez HC05 HC08 Debugger 56 Component Windows MOTOROLA Component Windows Components Pop up menu Set Breakpoint Appears in the pop up menu if no breakpoint is set or a breakpoint is disabled Sets a permanent breakpoint on the instruction pointed at by the mouse cursor When program execution reaches this instruction the program is halted and the current program state is displayed in all component windows Delete Breakpoint Appears in the pop up menu for a pointed to breakpoint that is set or disabled Deletes a selected breakpoint Enable Breakpoint Appears in the pop up menu if a breakpoint is disabled Enables a selected breakpoint Disable Breakpoint Appears in the pop up menu if a breakpoint is set Disables a selected breakpoint Run to Cursor When selected sets a temporary breakpoint at the pointed to instruction and continues program execution When program execution reaches this instruction the program is halted and the current program state is displayed in all component windows Temporary breakpoints are removed automatically as soon as they are reached NOTE _ If there isa disabled
159. l M gt 2 2 3 9 FE Source Pl E AF Assembly iml x no source reference found F Register B x HF Command Of x No target detected M Memory lolx 22 22 9 22 22 22 9 2222222 2 22 22 22 2 27 im Module 22 22 22 2 n For Help press F1 No target detected A Figure 2 7 MCUez Debugger and Component Windows The main window manages the layout of the different component windows The component windows can be Multiple windows tiled in the debugger main window e Automatically resized with the main window e Overlapped e Minimized e Maximized MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 31 Getting Started and User Interface 2 6 1 Toolbar A brief description is available when the mouse pointer is pointed at an icon The toolbar is illustrated in Figure 2 8 MCUez A E File View Run ESL Component Assembly Window Help Figure 2 8 MCUez Debugger Toolbar 2 6 2 Status Bar The status bar at the bottom of the debugger window see Figure 2 9 contains a help line that displays a brief explanation when the mouse cursor is positioned over a button or menu item Also shown is target specific information For Help press F1 115200 Backgnd Disarmed MBSHCO5P9 1 4 7 Target Reset caused Stop Brief Help for Baud Rate Processing Bus Analyzer Buttons and Menu Items State i State id rn Figure 2
160. lays the module s global variables The module component has no associated menu MCUez HC05 HC08 Debugger 70 Component Windows MOTOROLA User s Manual MCUez HC05 HC08 Debugger 4 1 Contents 4 2 4 3 4 3 1 4 4 4 5 4 6 4 7 4 8 4 9 4 9 1 4 9 2 4 9 3 4 9 4 4 9 5 4 10 4 10 1 4 10 2 4 11 4 11 1 4 11 2 4 11 3 4 11 4 4 11 5 MCUez HC05 HC08 Debugger Section 4 Operating Procedures TG rerni ened ERR EE Rr d ia b EAR E da 74 Configuring the MCUsz Debugger 1442 t a ah REX 73 Configuring for Use with Editors 2 2 2ccdoe aser a 73 Automating the MCUez Startup Process 00 74 Configuring the Default Lal coria ad ia 74 Loading a Applicatiof ci access ceeds ran aa ER REA 76 Starting ad ADPIC vases AA Ve dap b TES 78 Stopping an Application 4 425 cos e644 She eed ERE RR IEEE eRe EES 78 BINE OH 2 oo 5 404s ok eee basen ee eeescebaseas 79 Breakpoint Symbols og bc pass sq bees cad AES SI ARA ER RP EE 80 Identifying All Positions to Define a Breakpoint 8l a aai ao bb a xy CIRCE CORE REN 82 Deleting a Deeskpolit 122sosssues ebssRQST RS PU RR PARE 82 Breakpoint Menu pls essere 83 Stepping m dis AppUSUBDH uecoseseuwectb cs wee RE P Vw epe ps 85 Stepping on Assembly Level c cccsecchesckaatancasaedes 85 Stepping Over a Function Call Flat Step 85 Working with Variables osisboi orisas ici aa bra 86 Displaying Global Variables from a Module
161. lic display format depends on the variable type Hex Format hexadecimal Oct octal Bin binary Dec signed decimal UDec unsigned decimal display formats Mode Switches between automatic periodical locked and frozen update modes Appears only in the data pop up menu when right clicking on an empty line When Add E selected a user defined expression can be added in the data component through the xpression i Edit Expression dialog Edit Appears only in the data pop up menu when right clicking on a line containing a E f user defined expression When selected allows you to edit the pointed to user defined xpression a expression through the Edit Expression dialog Delete Appears only in the pop up menu when right clicking on a line containing a user defined Expression expression When selected it deletes the pointed to user defined expression MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 67 Component Windows 3 3 6 3 Data Update Mode The data component can be updated in three different modes 1 In automatic mode default variables are updated when the target is stopped Variables from the currently executed module are displayed in the data component 2 In locked and frozen mode variables from a specific module are displayed in the data component In locked mode data component variable values are updated when the target is stopped In frozen mode variables
162. lowing code example displays the byte at the address of the TCR I O register I O registers are defined in a reg file in DB amp TCR 0012 5A Z MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 129 Command Reference DL Short description Displays memory bytes as longword Syntax DL lt address gt lt range gt Arguments address Address constant expression indicating the address of the first longword to be displayed range Address range constant indicating the range of addresses to be displayed If range is omitted one longword is displayed If range is omitted the first longword displayed is taken from the address following the last longword displayed by the most recent DB DW or DL command or from address 0x0000 for the first DB DW or DL command of a session Description The DL command displays the hexadecimal values of the longwords at a specified address or in a specified range of memory The command displays one or more lines depending on the address or range specified Each line shows the address of the first longword displayed in the line followed by the number of specified hexadecimal longword values The address can be an expression If an I O register is specified the DB command will use the value of the register as an address To use the address of the I O register specify the ampersand amp character followed by the register name This comm
163. me displayed as four hexadecimal digits This is the address on the address bus when the frame is strobed into the trace buffer The data bus value is stored in the frame displayed as two hexadecimal digits This is the value on the data bus when the frame is strobed into the trace buffer Contains a representation of the time tag count stored when the frame is strobed into the trace buffer When the bus clock is the time tag clock the time tag is the number of time tag clock cycles When a clock other than the bus clock is chosen the time tag is displayed as a number of seconds or fractions of second The remaining fields contain values of the control signals or the two groups of logic clips If the instructions format is chosen only instructions are displayed in the trace buffer The instructions format is not possible in the events only recording mode User s Manual MCUez HC05 HC08 Debugger 236 MMDS0508 Target MOTOROLA MMDS0508 Target Viewing Collected Data D 8 5 Graphical Display Figure D 15 and Figure D 16 show examples of graphically displaying bus analyzer data A graphical representation gives a better overview than the textual display The leftmost section presents a textual description of the current frame with information about frame number events values on the data and address bus time tag value etc In the graphical display it is possible to zoom in or zoom out to see more detail or get a bette
164. me It is also possible to search for one or more events defined to trigger the bus analyzer or search for a specific pattern Search Pattern Next Pattern F Previous Pattern B Event Next Event N Previous Event P Figure D 19 Search for Event or Pattern D 10 1 Search for a Frame Select Trace Go to Frame and enter the desired frame number to search for a frame If the frame is found it is selected If the selected frame is not visible the Bus Analyzer window will scroll to the frame If the frame number is larger than the last frame stored in the trace buffer the bus analyzer will scroll to the last frame User s Manual MCUez HC05 HC08 Debugger 240 MMDS0508 Target MOTOROLA MMDS0508 Target Searching Search Frame X Frame n 1250 Cancel Help Figure D 20 Search Frame Dialog Box D 10 2 Search for Events To search for an event select one or more events in the Search Event Specification dialog box OK Button Click OK to store the selected events and close the dialog box Forward Searches forward to find the next frame that matches the specified event Backward Searches backward to find the previous frame that matches the specified event Search Event Specification X Event C Event B Event D Forward Backward Cancel Help Figure D 21 Search Event Specification Dialog Box MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 24
165. me Base To reference a frame with a tag value of 0 hold the mouse cursor over a frame and click the right mouse button The Trace pop up menu appears Select Set Time Base and the time tag values will be displayed relative to the selected frame User s Manual MCUez HC05 HC08 Debugger 238 MMDS0508 Target MOTOROLA MMDS0508 Target Add Remove Items in the Trace Window D 8 7 Show Location Select a frame and click the right mouse button to display the Trace menu then select ShowLocation The marker can be positioned with a left mouse click The Source and Assembly windows are updated automatically D 9 Add Remove Items in the Trace Window In the default configuration the following items are displayed in the window Frame Events Address Data Time Tag Instruction and R W It is possible to add or remove items and rearrange their order by using the buttons provided in this dialog box To edit an item set its color or assign a name select More Displaying mode Textual Textual Graphical Instructions gt gt Defined items Displayed items Figure D 17 Items Configuration Dialog Box MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 239 MMDS0508 Target Title Frame Color blue User defined name Pome Cancel Help Figure D 18 Item Content Dialog Box D 10 Searching It is possible to search for a specific trace buffer fra
166. mes values and types of global or local variables The Data component window in Figure B 3 shows all variables that are present in the current source module or procedure fee Data 1 x Address 803D Size 24 istartup c Auto Symb Global startupData 223 tagStartup flags 0 unsigned int El main 0x8084 _PFunc stackOffset 8190 unsigned int nofzero uts l unsigned int E pZero ut 0x804f Range El pZero0ut x4 Range E toCopyDowmBeg Ox8Dae Copy nofLibInits 32851 unsigned int Figure B 3 Data Component Window User s Manual MCUez HC05 HC08 Debugger 190 C Source Level Debugging MOTOROLA C Source Level Debugging Data Component The object info bar contains the address and size of the selected variable It also contains the module name or procedure name where the displayed variables are defined the display mode automatic locked etc the display format symbolic hex bin etc and the current scope global or local Various display formats such as symbolic representation hexadecimal octal binary signed and unsigned can be selected Structures can be unfolded to display their member fields Pointers can be traversed to display the data they are pointing to Table B 2 lists the menu options for the data component Table B 2 Data Component Menu Options for C Source Level Debugging Menu Entry Description Develops the selected structure The member field of the Zoom in l structu
167. message and the Communication dialog box appear indicating that the target is not connected MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 29 Getting Started and User Interface The ESL menu replaces the Target menu The Communication dialog box can also be displayed by selecting the ESL Connect menu option Component oad Connect Figure 2 5 Establishing a Connection 2 5 1 Communication Dialog Box The default is COMI at a baud rate of 9600 To change settings enter another device name in the edit box select a baud rate and click Connect After connecting with the target new settings are saved in the project ini file Communication Device Specification Communication Device Com Baud Rate 9600 Y Show Protocol Cancel Help Figure 2 6 Communication Device Dialog Box The MCUez debugger uses this data format e Eight data bits e One stop bit no parity e Variable baud rate User s Manual MCUez HC05 HC08 Debugger 30 Getting Started and User Interface MOTOROLA Getting Started and User Interface Graphical Environment 2 6 Graphical Environment The debugger consists of an arrangement of component windows that reside in the debugger main window The main window provides a toolbar status bar object information bar and menu bar for component windows see Figure 2 7 File View Run ESL Component Window Help Dal sele
168. mmunication Memory Map Target Signals Figure C 4 MMEVS0508 Target Menu Select Load to load an executable file containing an abs extension Select Reset to reset the target MCU After selecting this option the commands specified in the reset cmd script file are executed This file should be located in the current project directory Any debugger command can be used in this file Commands are described in Section 5 Command Reference C 4 3 Communication User s Manual Select Communication from the MMEVS0508 menu to display the Communication dialog box If the target is not connected enter the port that connects the serial cable to the target Select the maximum baud rate the host will support or 115 200 The maximum baud rate depends on the speed and interrupt load of the host computer The default is 9600 Check the Show Protocol box to display the communication protocol in the command line component of the debugger This feature should be used only for advanced debugging issues MCUez HC05 HC08 Debugger 206 MMEVS0508 Target MOTOROLA MMEVS0508 Target MMEVS0508 Target Menu C 4 4 Memory Map Choose Memory Map from the menu to open the Memory Configuration dialog Figure C 5 This dialog displays the current memory map Memory Configuration X Configuration File E SMCU WAVENSPROGSMEMSNOO411VUO2 MEM Load E Save Comment PRU or TOP TOP board resource
169. n Sets a breakpoint BS stands for breakpoint set Syntax BS address P T Arguments address Indicates the address where the breakpoint is to be set This address can be specified in the ANSI C format or in MCUez assembler format see 5 5 4 Constant Standard Notation address can also be replaced by an expression as shown in the next example P Specifies a permanent breakpoint T Specifies a temporary breakpoint A temporary breakpoint is deleted after the debugger stops on it Description BS sets atemporary T or permanent P breakpoint at the specified address If P or T is not specified the default is a permanent breakpoint Equivalent operation Point to a statement in the Assembly or Source component window right click and select Set Breakpoint in the pop up menu Example BS 0x8000 T This command sets a temporary breakpoint at the address 0x8000 BS 8000 P This command sets a permanent breakpoint at the address 0x8000 BS amp FIBO DBG Fibonacci In this example an expression replaces the address FIBO DBG is the module name and Fibonacci is the function where the breakpoint is set NOTE Module names for example fibo dbg are displayed in the Module component window The previous example sets a breakpoint on the symbol Fibonacci defined in fibo dbg MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 121 Command Reference CD Short description Cha
170. n Sequence Time Tag Clock Symbol counter Invert Address 0080 Mask 0000 Strobes Data joo Mask 120 RAY Cw Group 4 Clips Group B Clips GRY YELL GAY YELX CR vun oR amp x vun ORG unx BLU REDX BLU REDX Clear All GRNX BRN X GAN BRN OK Cancel Help Figure D 11 Search for Pattern In the dialog box shown in Figure D 11 the search pattern can be defined the same as it is defined in the Trigger tab of the Bus Analyzer Configuration dialog box The bus analyzer will search for the defined pattern in the trace buffer then highlight and display the matched frame in the Trace window Address Specify the Address to be matched Data Specify the Data value to be matched Strobes Specify the state of R W and LIR X to be matched Group A B Clips Toggle to specify each logic clip as high H low L or don t care X MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 227 MMDS0508 Target The clips buttons show Group A and B logic clips with their respective colors Invert Select Invert to find any frame that does not match the defined pattern OK Button Click OK to store the specified values Cancel Button Click Cancel to retain previous settings D 6 3 Sequencer Setup The bus analyzer can operate in different modes to gather pertinent bus data The various trace modes of the bus analyzer make it possible to
171. n from the address following the last memory position displayed by the most recent DB DW or DL command or from address 0x0000 for the first DB DW DL command of a session Description The DB command displays hexadecimal and ASCII byte values in a specified range of memory The command displays one or more lines depending on the address or range specified Each line shows the address of the first byte displayed in the line followed by the number of specified hexadecimal byte values The hexadecimal byte values are followed by the corresponding ASCII characters separated by spaces Between the eighth and ninth values a hyphen replaces the space as the separator Each non displayable character is represented by a period The address can be an expression If an I O input output register is specified the DB command will use the value of the register as an address To use the address of the I O register specify the ampersand amp character followed by the register name This command can be stopped by pressing the Esc key User s Manual MCUez HC05 HC08 Debugger 128 Command Reference MOTOROLA Command Reference Target Commands Example in DB 0x8000 0x800F 8000 FE 80 45 FD 80 43 27 10 35 ED 31 EC 31 69 70 83 in DB 0x8000 8 8000 FE 80 45 FD 80 43 27 10 Memory bytes are displayed with matching ASCII characters in the command line component The fol
172. n internal external memory even when the CPU is running and single step run stop processes 2 3 MMDS MMEVS Hardware Connection User s Manual The MMDS or MMEVS target is connected to the RS 232 serial port of the host computer Use the serial link cables provided to connect the host to the target The host computer is configured as a data terminal For additional information about the MMEVS and MMDS targets refer to Appendix C MMEVS0508 Target and Appendix D MMDS0508 Target respectively MCUez HC05 HC08 Debugger 26 Getting Started and User Interface MOTOROLA Getting Started and User Interface Starting the MCUez Debugger Serial Link A NA eee Host Computer MMDS MMEVS Target Figure 2 1 Hardware Connection 2 4 Starting the MCUez Debugger After installing the MCUez software start the MCUez Shell Typically this is done from the Windows Start menu For example select Start gt Programs gt MCUez gt MCUez Shell Debugger Figure 2 2 MCUez Shell Before launching the debugger power up the MMDS or MMEVS Then click on the ezDEBUG icon in the shell The debugger will load the target firmware and the memory map configuration file mem also known as the personality file A register description file reg is also loaded The mem files are located in the default installation directory prog nem and reg files are located in prog reg Memory map files are related to the specific MCU use
173. ned events that are used if any have been connected emulation can begin D 7 1 Arming the Analyzer The bus analyzer has to be armed to collect data Select the menu entry Trace Arm Analyzer to arm the bus analyzer D 7 2 Disarming the Analyzer To stop the analyzer select the menu entry Trace Disarm Analyzer Disarming the analyzer stops data collection without stopping emulation D 7 3 Start Emulation To begin emulation select the menu entry Run Start Continue in the MCUez Debugger main menu or click the Start Continue button Emulation continues until stopped by either a bus analyzer breakpoint or manually When emulation stops data in the Bus Analyzer window is updated D 7 4 Status Bar When the bus analyzer is activated the status bar displays Armed The bus analyzer is ready to collect data When emulation begins the status bar displays Running When the bus analyzer collects data the status bar displays Analyzing When data collection has stopped the bus analyzer state changes to Disarmed D 7 5 Recording Bus Data When data collection begins the bus analyzer records bus data into the buffer as frames When the end of the buffer is reached the bus analyzer wraps around to the first frame in the buffer and continues recording This process continues MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 233 MMDS0508 Target D 7 6 Trigger Event until the bus analyzer is manually disarmed
174. nent window to the specified address or range of memory The SMOD show module commands scroll the Memory component window to the address of the first global variable in the specified module MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 163 Command Reference The MOI DE command selects the memory component display mode In automatic mode default the memory component is updated when the target is stopped In frozen mode memory displayed in the Memory component window is not updated when the target is stopped In periodical mode the content of the Memory component window is updated at regular time intervals when the target is running The default update rate is 1 second but it can be modified by steps of 100 ms using the associated dialog box or the UPDATERATE command Equivalent operations ATTRIBUTES FORMAT Select menu option Memory Format ATTRIBUTES WORD Select menu option Memory Word Size WORD 1 The content is displayed in byte format WORD 2 The content is displayed in word 2 byte format WORD 4 The content is displayed in long 4 byte format ATTRIBUTES ADR Select menu option Memory Display Address ATTRIBUTES ASC Select menu option Memory Display ASCII ATTRIBUTES ADDRESS Select menu option Memory Address ATTRIBUTES SMEM Drag and drop from data component variable to memory component ATTRIBUTES SMOD
175. ng at the address stored in the register is highlighted 2 7 4 Dragging from the Data Component NOTE User s Manual The actions shown in Table 2 4 occur when dragging from the data component Table 2 4 Dragging from the Data Component Destination Component Acton Dragging the name appends the address range of the variable to the current command in the command line window Dragging the value appends the variable value to the current command in the command line window Command Line Dumps memory starting at the address where the selected variable is located The memory area where the variable is located is selected in the memory component Dragging from a data value in the memory component is not allowed Memory Dragging the name loads the destination register with the Register address of the selected variable Dragging the value loads the destination register with the value of the variable The user can drag either a variable name or a variable value Both operations are possible Dragging the variable name drags the address of the variable MCUez HC05 HC08 Debugger 42 Getting Started and User Interface MOTOROLA Getting Started and User Interface Drag and Drop Expressions are evaluated at run time therefore they do not have a location address associated with them Without a location address the user cannot drag an expression name into another component although expression v
176. nges the current working directory Syntax CD path Argument path Changes path to another working directory Description The CD command changes the current working directory to the directory specified in path When the command is entered with no parameter the current directory is displayed The directory specified must be a valid directory It should exist and be accessible When specifying a relative path make sure the path is relative to the current project directory Example in cd C NncuezNdemo in cd prog C mcuez prog The new project directory is C mcuez prog User s Manual MCUez HC05 HC08 Debugger 122 Command Reference MOTOROLA Command Reference Target Commands CF Short description Executes a command file Syntax CF filename C NL Arguments filename Name of file to be executed aC Chains the command file Useful in a nested command file NL Specifies that commands from the called file are not displayed in the Command Line window or written to the log file Description The CF command reads the commands in the specified command file which are then executed by the command interpreter The command file contains ASCII text commands Command files can be nested CF or CALL can be used in a command file to start another command file By default once execution from the called command file is complete the remaining commands in the calling file are executed
177. nt program counter is selected for example in a C source fib1 fib2 The selected source code range is highlighted to match the highlighted Assembly component instruction set If breakpoints have been set in the program they will be marked with a special symbol to indicate the nature of the breakpoint See 3 3 2 1 Breakpoints MCUez HC05 HC08 Debugger 50 Component Windows MOTOROLA Component Windows Components If execution has stopped the current position is marked in the Source component window by highlighting the corresponding statement The complete path of the displayed source file is written in the object information bar Figure 3 4 shows the Source component window I Source Bill XI CAMCUEZADEMO She05 fibo DBG CLRX STX counter Figure 3 4 Source Component Window Figure 3 5 shows the Source component menu and its associated pop up menu obtained by clicking the right mouse button File View Run MMDSO508 Component FTC Window Help Open Module msue Ea Find IC AMCUEZ DEMO She05 fibo DBG a REM RSP CLRX Main Menu imi Source PI Set Breakpoint Run To Cursor E Show Breakpoints Open Module biis REPEA main c End Marks Pop up Menu Figure 3 5 Source Component Main Menu and Pop up Menu MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 51 Component Windows The following describes Source component menu options e Menu
178. ntent is changed and validated and the next register value is selected for modification Click and hold the left mouse button and press the A key to view the source code as well as the changed contents of the assembly and memory components The source component shows the source code located at the address stored in the register The assembly component shows the disassembled code starting at the address stored in the register The memory component dumps memory starting at the address stored in the register 3 3 4 3 Register Display Options Menu The Register Display Options menu Figure 3 11 provides the option to display code in either binary or hexadecimal format Options gt Bin v Hex Figure 3 11 Register Display Options Menu 3 3 5 Memory Component Window The memory component displays unstructured memory contents or memory dumps continuous memory words without distinction between variables Various word sizes byte word double and data formats binary octal hexadecimal decimal unsigned decimal can be specified for the memory display MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 59 Component Windows NOTE To specify the start address for a memory dump use the Address menu option A memory area can be initialized with a fill pattern using the Fill Memory dialog box An ASCII dump can be added removed to the right side of the window by checking unchecking ASCII in the Display me
179. nu option The location address also can be added removed on the left side of the window by checking unchecking Address in the Display menu option Memory values that have changed since the previous program halt are displayed in red If a memory item is edited or rewritten with the same value the memory item display remains black The object information bar contains the procedure or variable name structure field and memory range matching the first selected memory word Figure 3 12 shows the Memory component window Figure 3 12 Memory Component Window 3 3 5 1 Memory Component Operations User s Manual Memory component operations are Double click a memory position to edit it Drag the mouse in the memory dump to select a memory range e Press and hold the left mouse button and press the A key to jump to a memory address The selected value is interpreted as an address The memory component dumps memory starting at this address MCUez HC05 HC08 Debugger 60 Component Windows MOTOROLA Component Windows Components 3 3 5 2 Memory Component Pop up Menu The Memory component pop up menu Figure 3 13 is displayed by placing the cursor in the Memory component window and clicking the right mouse button Word Size gt Format gt Mode gt Display Fill Address Figure 3 13 Memory Component Pop up Menu Table 3 1 defines options in the Memory component pop up menu Table 3 1 Memory Comp
180. od dbi eke 220 D 4 4 2 Dual Port B ANL corsa ad du bortis da hx Ard 221 D 4 4 3 jl 0 PUTET 221 D 4 5 A Er 222 D 4 6 Mlo PCT m 222 D3 Be oh ah hn ee eo oe eke eee 223 D 5 1 ADR BUT ard des iE i re dc ewh ees tee PERS EE ads 223 D6 Using the Bus Analyzer 2i sease s es ERR rr rie 224 Ix6 1 TION SOUR oS es ot sd dee qid duo Ua D p uest Dq e d E i dE 225 D 6 2 Pattern Search Setup evrcscrs pares CER RE ERA RT RE add a 221 D 6 3 SCUUDODO ODD o2 2349 ooo os A cede sees A 228 D 6 3 1 Continuous Non Triggered Modes 229 D 6 3 2 Counted Non Triggered Modes 4 230 D 6 3 3 Sequential Triggered Modes osse seres 230 D 6 3 4 Counted Sequential Recording Mode 231 D 6 4 Time Tag Clock SO ccoo RR REC ean ee ae be ues 231 D Collect Data Pl 24 0 ise AA RARA rm x ve 293 D 7 1 Armine AA La dcr di rbd kidar RE EFE de dE 233 Hd Disarming AR 233 MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 215 MMDS0508 Target D 2 Overview User s Manual 73 BT EBD ua ise hd REL Bait dde ee ERAS RSS AES 233 D 7 4 in doc aa EA E TT TT TT TET 233 p Recording Bus DIA o c4denp aed AAA 233 D 7 6 ji er PVE TTC erhoa nn ERS 234 DS Viewing Collected Lata 6652604 254s 06s ee ose cee Entus TES 234 D 8 1 VEW EV Eeg orpine kana ETE AIEA ade te ddl ees 234 D 8 2 Textual Graphical or Instructions 2 2 2222 cse 234 D 8 3 Termal CNSR adri 235 D 8 4 Instructions TASAS Sue bc
181. odule is not found a message is displayed in the command line window In the data component the SMOD command displays the corresponding module s global variables In the memory component the SMOD command scrolls the memory component and highlights the first global variable The module is searched for in the directories specified in the GENPATH environment variable An error message is displayed e If the specified module is not bound to the application currently loaded e fno application is loaded Example in Data SMOD fibo dbg Global variables defined in the fibo dbg module are displayed in the Data component window NOTE The module parameter must be a module filename listed in the Module component window User s Manual MCUez HC05 HC08 Debugger 176 Command Reference MOTOROLA Command Reference Component Commands SPC Short description Shows the specified address in a component window Syntax SPC address Description This command applies to the Source Assembly and Memory component windows In the source component the SPC command loads the corresponding module s source text scrolls to the corresponding text location the code address and highlights the statement that corresponds to this code address In the assembler component the SPC command scrolls the assembly component shows the location assembler address and highlights the assembler instruction of the specified addr
182. of executable file name of procedure in which the breakpoint has been set the state of the breakpoint disable or not and type of breakpoint temporary or permanent e Add button Adds a new breakpoint at the address specified in the Address edit box Delete button Click Delete to remove the currently selected breakpoint e Update button Updates changes made to an existing breakpoint e OK button Click OK to accept all modifications Cancel button Click Cancel to retain all previous settings Help button Click Help to open the help file and associated information The list box allows multiple consecutive breakpoints to be selected Select a breakpoint then hold the Shift key and select another breakpoint Select multiple non consecutive breakpoints by selecting a breakpoint then holding the control Ctrl key and selecting other breakpoints When selecting multiple breakpoints the name of the group box Breakpoint changes to Selected breakpoints and the associated controls Address hex and Name are disabled 4 9 1 Breakpoint Symbols User s Manual A temporary breakpoint has this symbol A permanent breakpoint has this symbol H A disabled breakpoint has this symbol i MCUez HC05 HC08 Debugger 80 Operating Procedures MOTOROLA Operating Procedures Breakpoints 4 9 2 Identifying All Positions to Define a Breakpoint Some compound statements a statement that can be split into several base
183. ogic Clips C 8 MHz C Extended Address C 4MHz C 2MHz Byte 7 Source C 1MHz rp B Logic Clips C Extemal C Timetag data C Bus Clock C Pisgemmebd Nominal 50000 Actual 50000 Figure D 13 Bus Analyzer Configuration Time Tag Clock The programmable clock has to be programmed in a range of 50 to 50 000 Hz Entering a nominal value causes the closest actual value to be calculated and used If the nominal value is an integer that is a quotient of dividing 500 000 Hz by an integer the nominal value is also the actual value If this is not the case the nominal value is rounded up to the next valid frequency and that frequency is displayed as the actual value Since the MMDS0508 supports the HC08 up to 16 M of data space the trace buffer will store the additional addresses XA16 23 To allow for the additional storage the logic clips on group A can be multiplexed with the expanded addresses Currently there is no EM emulation board supporting extended address mode The bus analyzer can also collect data from two groups of logic clips Group A and Group B Time tag can also be expanded to a 24 bit counter to allow for more time measurement Click the OK button to accept changes and close the dialog box MCUez HC05 HC08 Debugger 232 MMDS0508 Target MOTOROLA MMDS0508 Target Collecting Data Frame D 7 Collecting Data Frame When the emulator and bus analyzer have been initialized and the logic clips in the defi
184. olor is set for all component windows Example BCKCOLOR LIGHTCYAN The background color for all currently opened windows will be set to LIGHTCYAN User s Manual MCUez HC05 HC08 Debugger 166 Command Reference MOTOROLA CLOSE Command Reference Component Commands Short description Closes a component window Syntax CLOSE component Arguments component Component window in the debugger environment x Closes all component windows including command line component Description CLOSE closes the specified component window or all windows Example CLOSE Memory The Memory component window is closed MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 167 Command Reference FILL Short description Fills a memory range with a value Syntax FILL range value Description In the memory component the FILL command fills a corresponding range in memory component with the defined value The value must be a single byte pattern higher bytes ignored Equivalent operation The Fill Memory dialog is available from the Memory pop up menu by selecting Fill or selecting the Memory Fill menu option Examples in gt FILL 0x8000 0x8008 OxFF The memory range 0x8000 0x80068 is filled with the value OxFF User s Manual MCUez HC05 HC08 Debugger 168 Command Reference MOTOROLA FIND Command Reference Component Commands Short description Finds and highlights a pattern
185. ommand does not execute the reset command file reset cmd The MMDS0508 Reset menu option executes the reset cmd file MCUez HC05 HC08 Debugger 254 MMDS0508 Target MOTOROLA RTMEM Real Time Memory Description MMDS0508 Target MMDS Commands The RTMEM command allows the user to enable or disable the real time memory Syntax RTMEM lt address gt E D Arguments address The base address of the real time memory block to be enabled or disabled If not specified it is set to O E Enables the real time memory block default D Disables the real time memory block Example RTMEM 0x1000 D Disables the real time memory block at base address 1000 MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 255 MMDS0508 Target SC Set Analyzer Clock Description The SC command sets the source for the time tag clock which increments the trace buffer time tag Alternately if no parameters are specified the command interpreter displays the Bus Analyzer Configuration dialog box Then the user can select the Time Tag Clock tab and set the clock source Syntax SC lt timetag gt lt frequency gt Arguments timetag Specifies the source for the time tag clock Sources are OSC1MHZ Selects the 1 MHz oscillator OSC2MHZ Selects the 2 MHz oscillator OSC4MHZ Selects the 4 MHz oscillator OSC8MHZ Selects the 8 MHz oscillator OSC16MHZ Selects the 16 MHz oscillator
186. omponent windows and user applications Command Syntax Short Description ACTIVATE lt component name gt Activates a component window ATTRIBUTES list AUTOSIZE on off BCKCOLOR color FILL lt range gt lt value gt FIND lt string gt B MC Sets up display inside component Autosizes windows in main window Sets the background color CLOSE lt component name gt Closes a component E expression O D X C B Evaluates a given expression Fills a memory range with a value WW Finds and highlights a pattern FONT fontName size color Sets text font HELP LOAD applicationName OPEN component name Displays a list of available commands Loads user s application x y width height il max Opensacomponent window SLAY filename SMEM range SMOD module SPC address SPROC level MCUez HC05 HC08 Debugger Saves the general window layout Shows a memory range Shows a module Shows specified address in window Shows information associated with procedure User s Manual MOTOROLA Command Reference 97 Command Reference Command Syntax Short Description UPDATERATE rate Sets the data update mode VER Displays version number of components and MCUez ZOOM address in out Zooms in out on an array 5 4 Definition of Terms A definition and explanation of how certain words are used in
187. on Opens a record file Syntax CR filename A Arguments filename User defined file If filename is not specified a standard Open File dialog is displayed PA Opens the specified file in append mode Records are appended at the end of an existing record file Description The CR command records commands in an external file Recording continues until a close record file command NOCR is executed If the A option is omitted and filename is an existing file the file contents are erased before records are written to it Example in cr mcuez demo myrecord txt A The myrecord txt file is opened in append mode If no path is specified MCUez assumes the path to be the current working directory MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 125 Command Reference DASM Short description Disassembles source code Syntax DASM lt address gt lt range gt OBJ Arguments address Constant expression indicating the address where disassembly begins range Address range that specifies addresses to be disassembled When range is omitted a maximum of 16 instructions are disassembled OBJ Displays assembler code in hexadecimal format Description The DASM command displays the disassembled code of an application starting from the address given as a parameter When address and range are omitted disassembly begins at the address of the instruction that follows
188. onent Pop up Menu Menu Entry Description Opens a submenu enabling the user to specify the display unit Word Size size The three available sizes are byte word 2 bytes and longword 4 bytes Selects the format in which the items are to be displayed Available Format formats are hexadecimal binary octal signed and unsigned decimal Displa Opens a submenu enabling the user to toggle the display of pay addresses and ASCII dump Mode Switches between automatic periodical and frozen update mode See 3 3 5 3 Memory Update Mode Opens a dialog box Figure 3 14 and prompts for an address The Address memory component dumps memory starting at the specified address Fill Opens the Fill dialog Figure 3 15 to fill a memory range with a bit e pattern MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 61 Component Windows Display Address x Address 84FO hex v Hex Format Cancel Help Figure 3 14 Memory Component Display Address 00000800 00000808 00000810 000008185 from Address 1800 hex 00000825 00000830 v Hex Format ee Cancel nnnnnecn 00000820 d to ddress 1830 hex Value 143 hex Figure 3 15 Memory Component Fill Memory Dialog Box Click OK in the Fill Memory dialog to initialize all memory positions from 800 to 830 with the value A3 NOTE IfHex Format is checked numbers and letters are considered to be hexadecimal numbers Otherwi
189. onfiguring the MCUez Debugger 4 3 Configuring the MCUez Debugger The debugger must be associated with a project directory to find all requested configuration and component files The project working directory is defined in the mcutools ini file located in the Windows directory for example C winnt The working directory including path is defined in the environment variable DefaultDir in the Opt ions group or WorkDir inthe WorkingDirectory group 4 3 1 Configuring for Use with Editors Perform the following steps to define an editor Additional information about the MCUez Shell and Configuration settings are explained in the MCUez Installation and Configuration User s Manual Motorola document order number MCUEZINS D 1 Ze NDA zo m MCUez HC05 HC08 Debugger Start the MCUez Shell Click on the ezMCU icon first icon in the shell The Configuration dialog is displayed Click Change to open the Current Configuration dialog Select the Editor tab In the Editor list box select an editor For Codewright from Premia Corporation or WinEdit enter a filename in the Project File edit box Codewright project files have the extension pjt and WinEdit files have the extension wpj The editor project file is created automatically in the project directory In the Executable edit box enter or browse to the editor s executable file User s Manual MOTOROLA Operating Procedures 73 Operating Procedures
190. ooo 62 3 15 Memory Component Fill Memory Dialog Box 62 346 Update Rate Memory Component 2 224442 4 Re pus 63 3 17 Data Component Window LosackkeskmRA PRO RS ER ER AEZAT AR RA 64 3 18 Accessing the Expression Editor iiococaasszensas Ares y RR 65 3 19 Using the Edit Expression BOR iios RR Rea 66 3 20 Data Component Pop up Menus ssleeeee eese 67 3 21 Update Kate Data CO mponenb iiooossessacacRi REESEa uda 68 3 22 Command Line Component Men ser n nnn 69 3 23 Module Component Window seeeeece i n RR w 70 4l Example of PROJECT INI File 1252s ze Rak TUS 3 4 2 Load Executable File Dialog BOX io ooociosiorsrrrsrsoo avis 76 43 Loading an ADICIONA dni 77 4 4 Breakpoints Setting Dialog Window 05 79 4 5 Identifying Breakpoint Positions 000000008 81 Te IO bk oh ee ee es AERE AERA EA DANA GAMES 83 4 7 Modifying a Variable Vale ccoocociciospricrra iris 87 4 8 Modifying the Content of an Index or Accumulator Register 89 4 9 Choosing a Memory Address soconocaroiariorsrinor canes 90 B 1 Procedure Component Window 000s ee ee eee 189 B 2 Procedure Component Window Menu 4 189 B Data Component Window s cc6 os c asas ne 190 B 4 Breakpoints Setting Dialog Window 4 5 193 B 5 Stepping at Source Level Window 2 000e 195 Cl Component Met caches kERS PRA SERERE SOR ERLS RES AA EB sees 204 Lo WINE
191. or EEPROM that portion can only be displayed not monitored Select Target Signals from the MMEVS0508 menu to open the Target Signals dialog shown in Figure C 8 Settings are read from the MMEVS0508 If the user changes the settings and selects OK the values are written to the MMEVS0508 If Save and Reload is checked the configuration is reloaded when the debugger is started This dialog allows the MCU clock speed to be set and the target signal connection to be reset Target Signals x Target may not support all options m MCU Clock C 16Mhz 2Mhz C 8Mhz C 1Mhz C 4Mhz C External Reset Resetin Reset out Save and Reload E Cancel Help Figure C 8 Target Signals Dialog Box MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMEVS0508 Target 209 MMEVS0508 Target C 5 MMEVS Commands This section describes MMEVS commands These commands can be typed in the debugger command line component or inserted in a command file BAUD Serial Communication Baud Rate Description The BAUD command sets the baud rate for communication between the system controller and host computer For maximum performance the baud rate should be set as high as the host computer can accommodate The maximum rate is 115 200 the default is 9600 If the system does not support a specified baud rate an error message is displayed Syntax BAUD rate Argument rate 1200 2400 4800
192. ponent windows can be opened by selecting the ComponentlOpen menu option Figure 3 1 shows the Open Window Component dialog box Component windows are implemented as dynamic link library files with the extension wnd CPU central processor unit components handle processor specific operations such as register naming instruction decoding disassembly and stack tracing CPU components are reflected in the Register and Memory component windows Applicable CPU components are loaded when connection with the target is established Open Window Component x Assembly Command Data Memory Module Procedur Register Source Trace Select a component Cancel and click OK Lea Ene Figure 3 1 Open Window Component Dialog Box MCUez HC05 HC08 Debugger 48 Component Windows MOTOROLA Component Windows Components 3 3 1 Component Window Menu Each component window has two menus One menu can appear on the debugger main menu bar and the other is a pop up menu that can be opened by clicking the right mouse button in the active component window The active component menu appears between the Component and Window menus on the debugger main menu bar For example if the Source component window is selected the Source menu will appear If the Data component window is selected the Data menu will appear as shown in Figure 3 2 File View Run MMDSO508 Component ESTEE Window Help Open Module msue 8 Find CAMCUE
193. r BSR branch to subroutine instruction a Step Over stops the application on the source instruction following the function invocation MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 85 Operating Procedures Elements displayed in red in the register memory or data components are values that have changed when the Step Over function was invoked 4 11 Working with Variables The following sections describe how to work with variables in the debugger 4 11 1 Displaying Global Variables from a Module The debugger provides two ways to view a list of global variables defined in a module 1 Using drag and drop Drag a module name from the module component to a data component 2 Using pop up menu Place the mouse pointer in the data component and right click Select Open Module in the pop up menu A dialog box that contains the list of all modules used to build the application opens Double click on a module name The data component displays the list of global variables and their values that are defined in the selected module User s Manual MCUez HC05 HC08 Debugger 86 Operating Procedures MOTOROLA Operating Procedures Working with Variables 4 11 2 Changing the Variable Value Display Format The debugger can display variable values in different formats The Format entry in the pop up menu provides several options The selected format affects all data component variables
194. r Interface 2 7 11 Dragging into the Register Component Table 2 11 shows the options available when dragging into the register component Table 2 11 Dragging into the Register Component Source Action Component Loads the destination register with the address of the selected Assembler instruction Dragging the name loads the destination register with the start Data address of the selected variable Dragging the value loads the destination register with the value of the variable S Loads the destination register with the PC of the first instruction ource selected Loads the destination register with the start address of the Memory selected memory block 2 7 12 Dragging from the Module Component Table 2 12 shows the options available when dragging from the module component Table 2 12 Dragging from the Module Component Destination Action Component Data Global Displays the global variables from the selected module in the data component Dumps memory starting at the address of the first global Memory variable in the module The memory area where this variable is located is selected in the memory component Source Displays source code from the selected module NOTE Nothing can be dragged into the module component User s Manual MCUez HC05 HC08 Debugger 46 Getting Started and User Interface MOTOROLA User s Manual MCUez HC05 HC08 Debugger Section 3 Component Windo
195. r general view Zoom in Zoom out are available in the Trace pop up menu by clicking the right mouse button inside the Trace component window To zoom in select Trace Zoom In or press I on the keyboard To zoom out select Trace Zoom Out or press O on the keyboard Fee a EEN Address 044D 006A 006A 044 o4ar 006D Data Time Taq Instruction R w A Gry Vlt Blu Grn Yel 4 Org Red A Brn Figure D 15 Trace Window Graphical Display Zoom In MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 237 MMDS0508 Target 5 Trace of x m e mmm Address AAN S IIA AAA 1491 00 SAA AAA ES Data Time Tag Instruction R w A Gry Vlt Blu Grn Yel A rgq Red Brn o oc O O O O O O m Figure D 16 Trace Window Zoom Out Dragging the marker over the bus analyzer data display may also generate updates in component windows for example the Source and Assembly windows Thus the bus analyzer data can be examined in the continually updated windows as the marker is moved over the graphic or text display of the bus analyzer data In graphic mode the vertical bar indicates the marker position and displays all information for the current frame In textual or instruction mode the horizontal bar indicates the position of the marker and displays information for the current frame D 8 6 Set Ti
196. ram execution reaches this instruction the program is halted and the current program state is displayed in all component windows Temporary breakpoints are removed automatically as soon as they are reached NOTE _ If there isa disabled breakpoint at this same position the temporary breakpoint will also be disabled and the program will not halt User s Manual MCUez HC05 HC08 Debugger 52 Component Windows MOTOROLA Component Windows Components Show Breakpoints Opens the Breakpoints Setting dialog box which lists breakpoints defined in the application and allows properties to be modified Open Module Opens a dialog that lists all source files bound to the application currently loaded Select the module to be viewed in the source window Find Opens a dialog box prompting for a string and then searches the file displayed in the source component for the specified string Marks Displays upside down check marks at source lines where breakpoints may be set 3 3 2 1 Breakpoints If breakpoints have been set in the program they will be marked with a specific symbol Temporary breakpoint symbol A lighter color encased by a darker color with the lighter color usually being yellow and the darker being red e Permanent breakpoint symbol H Solid red e Disabled breakpoint symbol f Halftone and light red If execution has stopped the current position is marked in the source component by hi
197. re replaces the variable list Zoom out Returns to previous level of development Scope Switches between local or global variable display Switches between Symbolic display depends on type of Format variable Hex hexadecimal Oct octal Bin binary Dec signed decimal UDec unsigned decimal display format Switches between automatic periodical locked or frozen Modan update mode In automatic mode default variables are updated when the target is stopped Variables from the currently executed module or procedure are displayed in the data component In locked and frozen mode variables from a specific module are displayed in the data component In that case the same variables are always displayed in the data component In locked mode variable values displayed in the data component are updated when the target is stopped In frozen mode values displayed in the data component are not updated when the target is stopped In periodical mode variables are updated at regular time intervals when the target is running The default update rate is 1 second MCUez HC05 HC08 Debugger User s Manual MOTOROLA C Source Level Debugging 191 C Source Level Debugging B 6 Breakpoints Setting Dialog The Breakpoints setting dialog box consists of A list box that displays currently defined breakpoints A Breakpoint group box that displays the address of the currently selected breakpoint name of the procedure in
198. ress RD list RS register value register value S Short Description Deletes a breakpoint Displays a list of all breakpoint Sets a breakpoint Executes a command file Changes the current working directory Executes a command file Opens a record file Disassembles Displays memory bytes Defines a user symbol expression Displays memory bytes as longwords Displays memory bytes as words Starts execution of the loaded application Opens a log file Sets options for the log file Displays the list of symbols Displays the memory map Sets memory bytes Sets the base for arithmetic operations Closes the record file Closes the log file Single assembly steps into the program Displays content of registers Sets aregister Stops application execution MCUez HC05 HC08 Debugger 96 Command Reference MOTOROLA Command Syntax SAVE range filename offset A REC filename offset address count S T UNDEF symbol W W B range list L range list WW range list 5 3 3 Component Commands Command Reference List of Available Commands Short Description Savesamemory blockin S record format Loads a memory block in S record format Traces instructions at specified address Undefines a user symbol Writes bytes Writes longwords Writes words Component commands monitor the debugger environment component windows component window layouts and load c
199. ression Editor dialog or point to a blank line as shown in Figure 3 18 and right click to select Add Expression in the pop up menu fibo dbg Auto Symb Glob counter 254 unsigned char fiboCount 12603 int j 221 unsigned char n 239 unsigned char fibl 2053 int fib2 l int fibo Open Module 9 int a Add Expression Co Zoom in Zoom out fibo Z Format gt Mode gt Figure 3 18 Accessing the Expression Editor Enter a logical or numerical expression in the Edit Expression box using ANSI C syntax This expression is a function of one or several variables from the current data component Figure 3 19 shows the expression editor MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 65 Component Windows fm Data B x fibo dbg Auto Symb Glob counter 254 unsigned char fiboCount 12803 int j 221 unsigned char n 239 unsigned char fibl 2053 int fib2 l int fibo 9 int Edit Expression Ed fg Module for fib fibo dbq Lo Cancel Figure 3 19 Using the Edit Expression Box Example With two variables variable_1 variable_2 e Expression entered variable 1 variable 2 OxFF lt 0x1000 will result as a Boolean type e Expression entered variable 1 variable 2 0x1000 will result as an integer type NOTE Itis not possible to drag an expression defined with the expression editor Operations e Do
200. rola S records from a specified file Example SREC DUMP SX The dump sx file is loaded into memory If no path is specified the path is assumed to be the current working directory MCUez HC05 HC08 Debugger 150 Command Reference MOTOROLA Command Reference Target Commands Short description Traces program instructions Program trace begins at a specified address Syntax T address count Arguments address Address constant expression indicating where execution begins If address is omitted the instruction pointed to by the program counter is the first instruction traced count Integer constant expression 1 65 535 that specifies the number of instructions to be traced If count is omitted one instruction is traced Description The T command executes one or more instructions starting at a specified address or at the current instruction address in program counter The T command traces into subroutine calls and software interrupts For example if the current instruction is a branch to subroutine instruction BSR the BSR is traced and execution stops at the first instruction of the subroutine After executing the last or only instruction the T command displays the contents of the CPU registers the instruction bytes at the new address in the program counter and a mnemonic disassembly of the current instruction This command can be stopped by pressing the Esc key Example in T OxF030 TRA
201. rre ia ds 236 D 8 5 Graphical Display is a dn eas bas entidad 237 D 8 6 wer URE ESSE ir AAA 238 D 8 7 DW LOGS Li oka tai dd doi d opa Rl adio ode enese deans 239 D 9 Add Remove Items in the Trace Window 05 239 DIS SO eg en hh bo PSone EO Edondee odd Uu eed 240 Dad Search fora Fr Losses bh eee RAS oa RAPER GER EY ded 240 Dia search tor Esas sra rrer 66026895 08 so SESE dnd 241 ASA EE 20 re Error 242 E Previous BULL taa chceiwids dees dob DR bak breee ees 242 DIES estelar a Pul 2i2ogee RP TP FPE YIRENI EMO E 242 EXA Nest PORO pn dur ot pariente dic i UE db o ed dos eru ird odis 243 IIO Previos Pattern taria a da ia cen 243 D 11 Dumping Bus Analyzer Data to a Fille oos 244 D12 MMDS Comins lt 5 dacs hues doris ar 245 MCUez debugger uses Motorola s MMDS0508 to communicate with a target system The MMDS0508 is an emulator system that provides emulation memory and a bus state analyzer for MCUs with a CPUOS or CPUOS Using the MMDS interface an external target system can download an executable program execute it and relay the results of the target system to the debugger MCUez HC05 HC08 Debugger 216 MMDS0508 Target MOTOROLA MMDS0508 Target Loading the MMDS0508 Target The debugger fully supervises and monitors the target system s MCU It also controls CPU activities such as read and write in internal external memory even when the CPU is running and single step run stop processes D 3 Loading the
202. s in the list list List of longword values to be stored in the block of memory Description The WL command initializes a specified block of memory with a specified list of longword values When the range is wider than the list of longword values the list of longword values is repeated as many times as necessary to fill the memory block When the range is not an integer multiple of the length of the list the last copy of the list is truncated accordingly Example WL 0x2000 OxOFFFFFOF This command fills up the memory address 0x2000 0x2003 with the longword value OxOFFFFFOF MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 153 Command Reference WW User s Manual Short description Sets a specified block of memory to a specified list of word values Syntax WW range list Arguments range Address range constant that defines the block of memory to be set to the word values in the list list List of word values to be stored in the block of memory Description The WW command sets a specified block of memory with a specified list of word values When the range is wider than the list of word values the list of word values is repeated as many times as necessary to fill the memory block When the range is not an integer multiple of the length of the list the last copy of the list is truncated accordingly Example WW 0x2000 0x200F OxAFOO This command fills up the memory range 0x2000 0x200F with t
203. s symbol table statistics following the list of symbols Description In the command line component the LS command lists the values of symbols defined in the symbol table and also by the user There is no limit to the number of symbols that can be listed The size of memory determines the symbol table size Use the DEF INE command to define symbols and the UNDEF command to delete symbols Symbols listed with the LS command are split in two parts applications symbols symbols defined in the application currently loaded and user symbols symbols defined on the command line using the DEF INE command For application symbols LS displays the address of the symbol For user defined symbols LS displays the value of the symbol User s Manual MCUez HC05 HC08 Debugger 138 Command Reference MOTOROLA Command Reference Target Commands Example in ls User Symbols j 0x2 2 Application Symbols counter 0x80 128 fiboCount 0x81 129 j 0x83 131 n 0x84 132 fibl 0x85 133 fib2 0x87 135 fibo 0x89 137 Fibonacci OxFO0O00 61440 Entry OxF041 61505 When an LS is performed on a single symbol that is an application variable as well as a user symbol the application variable is displayed Example with 3 being an application symbol as well as a user symbol in ls j Application Symbol j 0x83 131 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 139 Command Reference
204. sconnect signal from the target system Example SIG ENABLE RESETIN Enables the RESET IN signal from the target system MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 257 MMDS0508 Target ST Trigger Command Short description Set trigger Syntax sT lt id gt lt address gt lt address range lt data gt lt data range gt lt clips gt ILIR X H D 111 R W RW D 1 Description The ST command sets the value of one of the four bus analyzer triggers If a value is set or only the triggered ID is entered the command interpreter displays the Trigger tab of the Bus Analyzer Configuration dialog box for the userto set a trigger value Do not include a space character when entering the command and ID on the command line For example in gt sta id Specifies the trigger ID of the analyzer trigger A B C or D The inversion operator applies to the entire trigger When is specified and an address data value and clip value are specified the trigger occurs when the address data value or clip value is not the specified value When and a range are specified the trigger occurs at values outside the range and at the lowest value in the range address An address to which a trigger is set The address is specified with an address constant as follows lt address gt lt mask gt User s Manual MCUez HC05 HC08 Debugger
205. se expressions can be typed and hex numbers must be prefixed with Ox or User s Manual MCUez HC05 HCO08 Debugger 62 Component Windows MOTOROLA Component Windows Components 3 3 5 3 Memory Update Mode The memory component can be updated in three different modes 1 Inautomatic mode default memory dump is updated when the target is stopped 2 In frozen mode memory dump displayed in the memory component is not updated when the target is stopped 3 In periodical mode memory dump is updated at regular time intervals when the application is running The default update rate is 1 second but it can be modified by steps up to 100 ms using the associated dialog box Update Rate X Rate 100 ms Cancel Figure 3 16 Update Rate Memory Component NOTE The periodic update mode available in the Data or Memory component menu is only available for MMDS0506 using dual port RAM and is only possible for variables or memory positions located in the dual port RAM area Dual port RAM allows the user to specify the base address and enable real time memory To enable dual port RAM click on the MMDS0508 Memory Map menu option To specify the base address enter the desired value in the Base Address edit box To enable real time memory check Enable The real time memory size is 1 Kbyte MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 63 Component Windows 3 3 6 Data Component Window Click to
206. se address and enable real time memory to be specified To specify the base address enter the desired value in the Base Address edit box To enable real time memory check Enable The real time memory size is Kbyte The periodic update mode available in the debugger Data or Memory component menu is only possible for variables or memory positions located in the dual port RAM area The memory group box in the Memory Configuration dialog allows the real time memory to be specified The user can specify the start and end location for a selected memory type and enter a brief comment The real time memory consists of dual ported memory that can be assigned to any valid RAM or ROM memory address While the MMDS0508 is running the debugger can display and modify the real time memory If part of the memory overlays the MCU I O RAM or EEPROM that portion can only be displayed not monitored MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 221 MMDS0508 Target D 4 5 Target Signals D 4 6 Bus Trace User s Manual Select Target Signals from the MMDS0508 menu to open the Target Signals dialog shown in Figure D 7 Settings are read from the MMDS0508 Change settings and select OK to write values to the MMDS Check Save and Reload to reload the configuration when the debugger is started This dialog allows the MCU clock speed to be set and the target signal connection to be reset Target Signals x Targe
207. sk are useful in the pattern clips 16 bit value that defines logic clip signals for the search pattern The value is specified as clips mask User s Manual MCUez HC05 HC08 Debugger 262 MMDS0508 Target MOTOROLA MMDS0508 Target MMDS Commands When a mask is entered only the bits corresponding to one bits 1s in the mask are useful in the pattern The bits of the clips are Bit Signal Bit 0 GroupA BRN 8 1 RED 9 2 ORG 10 3 YEL 11 4 GRN 12 5 BLU 13 6 LIR 14 7 GRY 15 R Search for a read bus cycle only SW Search for a write bus cycle only RW Search for a read or write bus cycle LIR X LIR is high or low Signal Group B BRN RED ORG YEL GRN BLU VLT GRY LIR Search for a specific value for LIR signal LIR H LIR is high LIR L LIR is low If a bit is set in both clips and masks the pattern is detected when the bit is high H If a bit is set in masks but not in clips the pattern is detected when the bit is low L If a bit is not set in masks the pattern does not depend on the state of the clip MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 263 MMDS0508 Target Examples SP 0x1000 Sets analyzer search pattern to search for accesses at address 1000 SP 4 Sets analyzer search pattern to search for accesses with a data value of 4 at any address SP 8 20 Sets analyzer search pattern to search for accesses using a value of 20 at address 8
208. spond to this code address range In the assembly component the SMEM command scrolls the assembly component shows the location assembler address and highlights the assembler lines of the address range In the memory component the SMEM command scrolls the memory dump component and shows the locations memory address of the address range given as the range argument Example MCUez HC05 HC08 Debugger in Source SMEM 0x8000 0x8008 The Source component window scrolls to the source code corresponding to the instruction located at address 0x 8000 The source code generating code between 0x8000 and 0x80068 is highlighted in Memory SMEM 0x8000 8 The Memory component window scrolls to the address 0x8000 and the memory range 0x8000 0x8007 is highlighted in SMEM 0xF040 0xF050 The Source Assembly and Memory component windows scroll to OxF040 and the range 0xF040 to 0xF050 is highlighted User s Manual MOTOROLA Command Reference 175 Command Reference SMOD Short description Shows a module Syntax SMOD module Argument module Name of a module bound to the application The module name should contain no path The module extension dbg for assembly sources or c for C sources etc must be specified Description This command applies to the Source Data and Memory component windows In the source component the SMOD command displays the corresponding module s source text If the m
209. sr ii Qa va ese ps 85 Stepping on Assembly Level iiiicuacoss a eh n 85 Stepping Over a Function Call Flat Step 85 Working with l 0 MATRE 86 Displaying Global Variables from a Module 86 Changing the Variable Value Display Format 87 Modifying A Vangble Vale diesaosesekcsseti her w e res 87 Displaying an Allocated Variable Address 88 Loading an Address Register with a Variable Address 88 Working With eee y aues ARANA 88 Changing the Register Display Format 89 Modifying the Content of an Index or Accumulator Register i eessess ron rss eb RE TR RE 89 Modifying Bit Register ContentS oooooooooomooo o 90 Retrieving a Memory Dump Starting at a Register Indicated Address oooomooooo 90 User s Manual MOTOROLA Table of Contents 9 Table of Contents 4 13 4 13 1 4 13 2 24 3 3 9 FAL TAZ 5 3 5 4 ae 5 5 1 asm e Ne 5 5 4 5 6 WO 5 8 5 9 A l AA A 3 A A4 B 1 B 2 B 3 B 4 B 4 1 B 4 2 User s Manual Working with Memory ooo 5665 S RR SERESERERSGRPR ETE d ES 91 Changing the Memory Display Format 91 Modifying Memory Address Content 92 Section 5 Command Reference EDS or ad dstdiua ed du 93 TOQUE 1602s ado E ECKE bdo pb REESE SW RET EIS ETE d 94 Last of Available Commands ev serca ER YEEA 95 Kernel des aii os a 95 Target C OREMU
210. t 4 43 MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 25 Getting Started and User Interface 2 2 Introduction PAPE Dragging into the Source Component 4 2 7 8 Dragging from the Memory Component 44 2 1 9 Dragging into the Memory Component 45 2 7 10 Dragging from the Register Component 45 2 7 11 Dragging into the Register Component 46 2 7 12 Dragging from the Module Component 46 This section describes how to connect the target hardware start the debugger and use the graphical user GUI interface environment This section also introduces target interfaces related to the modular development system for the MC68HC05 and MC68HC08 MCU Families The MCUez debugger uses Motorola s MMDS0508 or MMEVS0508 to communicate with a target system The MMDS0508 is an emulator system that provides emulation memory and a bus state analyzer for MCUs with a CPUOS or CPU08 The MMEVS0508 is an emulator system designed by Motorola for MCUs that use a CPUOS or CPUOS to provide emulation memory Using the MMDS interface an external target system can download an executable program execute it and relay the results of the target system to the debugger The debugger fully supervises and monitors the target system s MCU It also controls CPU activities such as read and write i
211. t may not support all options gt MCU Clock C 1 amp Mhz 2Mhz C 8Mhz C 1Mhz C 4Mhz C External Reset Resetin Reset out Save and Reload E Cancel Help Figure D 7 Target Signals Dialog Box Select Bus Trace from the MMDS0508 menu to run the bus analyzer This will open the Trace component window and insert the Trace menu between the Component and Window menus MCUez HC05 HC08 Debugger 222 MMDS0508 Target MOTOROLA MMDS0508 Target Bus Analyzer File View Run MMDSO508 Component Trace Window Help E Trace Figure D 8 Trace Component and Menu D 5 Bus Analyzer Except for emulation of the target system MCU the most important feature offered by a microcontroller development tool is an instrument to analyze program execution activities on the target MCU bus This analysis allows the user to determine what is occurring in a system without actually affecting it NOTE The bus analyzer in the MMDS0508 shows the logical state of the MCU bus It does not show signal hold and setup times D 5 1 Trace Buffer The trace buffer contains 8 192 entries or frames each of which stores 96 bits When the bus analyzer is activated and the emulator is running a frame of the selected type is strobed into the trace buffer for each bus cycle When the event s to trigger the analyzer has occurred in the specified sequence only the specified number of additional frames are stored MCUez HC05 HC08 D
212. tent of an index or accumulator register The register window changes to reflect the MCU used in the system 1 Double click on a register The current register content is highlighted Figure 4 8 and can be edited ll Register A E a TE fam SR E8 Status HINZC PC 141 Figure 4 8 Modifying the Content of an Index or Accumulator Register 2 The format of the input value depends on the format selected for the register component If the format is hex the input value is treated as a hex value If the input value is 10 the variable will be set to 0x10 16 3 To restore the previous register content press the Esc key 4 To validate the input value press either the Enter key or Tab key or select another register 5 Ifan input value has been validated by pressing the Tab key the content of the next register is highlighted automatically MCUez HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 89 Operating Procedures 4 12 3 Modifying Bit Register Contents In a bit register each bit has a specific meaning for example a status register SR or condition code register CCR bit from a processor Mnemonic characters for bits set to 1 one are displayed in black Mnemonic characters for bits that are reset to 0 zero are displayed in grey Single bits inside the bit register are toggled by double clicking on the corresponding mnemonic character 4 12 4 Retrieving a Memory Dump Starting at
213. tep Assembly Step Over Breakpoints Figure 2 14 Run Menu 2 6 4 4 Target Menu The Target menu appears between the Run and Component menus when no target is specified as the default in the project ini file and no target component has been set Select Target Load to display the load executable file message Click Yes to display the set target listbox enabling selection of a target for example ESL After it is connected to a hardware target the Target menu is replaced by a menu with the name of the hardware target for example MMDS0508 The user can also select Component Set Target to connect to a target Component Load Executable File Load Heset 9 There is currently no T arget installed Do you want to install it now j s Figure 2 15 Target Menu MCUez HC05 HC08 Debugger User s Manual MOTOROLA Getting Started and User Interface 37 Getting Started and User Interface 2 6 4 5 Component Menu Open additional component windows by selecting the Component Open menu entry Select a component window from the list of components and click OK Component windows are described in Section 3 Component Windows Figure 2 16 illustrates the Component menu eons Source windo Open Set Target I Jm Fonts Background Color Figure 2 16 Component Menu Select Component Set Target to set the preferred target Select Component Fonts to open a stan
214. tion 12 ia AAA e BUEGUOGB xks 21 L3 Document Conventions 00 0 cee eee eee nh 23 131 Gener DE si pa Mi PE IER ES 23 14 Mpuse Opera 50 MCCC TP 22 125 Typographic Styles in This Manual 4 23 Motorola s MCUez debugger is a multipurpose tool used for various tasks in the embedded systems and industrial control world such as emulation and or cross debugging of an embedded application or hardware design The debugger consists of the engine and a set of component windows bound to the task they perform for example a debugging session The debugger engine is the heart of the system It monitors and coordinates the tasks of the components Each component has its own functionality for example source level debugging MCUez HC05 HC08 Debugger User s Manual MOTOROLA General Information 21 General Information This manual describes how to use the MCUez debugger A brief description of each section is provided here User s Manual Section 1 General Information provides document conventions a functional description of operation and support information Section 2 Getting Started and User Interface provides information on the toolbar status bar object information bar drag and drop operation and the MCUez menus Section 3 Component Windows provides detailed information on each basic component and how to use them Section 4 Operating Procedures contains procedures on how to use the MCUez d
215. to be matched Group A B Clips Toggle to specify each logic clip as high H low L or don t care X The clips buttons show Group A and B logic clips with their respective colors Invert Select Invert to find any frame that does not match the defined pattern OK Button Click OK to store the specified values Cancel Button Click Cancel to retain previous settings D 10 6 Next Pattern Select the menu entry Trace Search Next Pattern to search for the next occurrence of the pattern If the pattern is not found an error message is displayed D 10 7 Previous Pattern Select Trace Search Previous Pattern to search for the previous occurrence of the pattern If the pattern is not found an error message is displayed MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 243 MMDS0508 Target D 11 Dumping Bus Analyzer Data to a File To dump bus analyzer data to a file open the Trace pop up menu and select Dump Dump File Select Frames to Dump All Instructions OK Button Cancel Button Dump Bus Analyzer Frames X Dump File Enter the name of the file to which data is to be written Click Select to open a standard open file dialog box Enter the frames to be dumped to the file Select All to dump all frames within the specified range to the file Select Instructions to dump just the frames in the specified range that contain an instruction Click OK to dump the bus an
216. uble click a variable line to edit the value e Click the plus and minus signs next to each variable to fold or unfold the variable structure Double clicking a blank line opens the expression editor to insert an expression in the data component User s Manual MCUez HC05 HCO08 Debugger 66 Component Windows MOTOROLA Component Windows Components 3 3 6 2 Data Component Pop up Menus Figure 3 20 shows the Data component pop up menus Notice that additional options for the expression editor are displayed when pointing to a blank line or an existing expression Open Module Open Module Open Module Zoom in Add Expression Delete Expression Zoom out T Edit Expression Zoom in Format gt Zoom out Zoom in Zoom out Mode gt Format gt Format gt Mode gt Mode gt Figure 3 20 Data Component Pop up Menus Table 3 2 identifies all data component operations Table 3 2 Data Component Pop up Menu Menu Entry Description Opens a dialog that lists all source files bound to the application The global variables Open Module from the selected module are displayed in the data component This is only supported when the component is in global scope mode Zo min Expands the selected structure For example members of an array are displayed when selecting an array name and zooming in Zoom Out Returns to the previous level Switches between Symbo
217. ue in unsigned decimal format Set data component to periodical update mode Set data component to locked update mode Set data component to frozen update mode Set data component to automatic update mode Specified module Update rate in tenths of a second Valid values for the rate are 0 to 600 ATTRIBUTES FORMAT elect menu entry Data Format ATTRIBUTES MODE Select menu entry Data Mode ATTRIBUTES SCOPE Select menu entry Data Scope ATTRIBUTES SPROC Drag and drop from procedure component to data component ATTRIBUTES SMOD Drag and drop from module component to data component ATTRIBUTES UPDATERATE Select menu entry Data Mode Periodical Example Data ATTRIBUTES MODE FROZEN In the data component the mode for updating global variables is set to frozen Variables are not refreshed when the application is halted User s Manual C Source Level Debugging 201 C Source Level Debugging User s Manual MCUez HC05 HC08 Debugger 202 C Source Level Debugging MOTOROLA User s Manual MCUez HC05 HC08 Debugger C 1 Contents Appendix C MMEVS0508 Target EE AAA 204 3 Loading the MMEVS0508 Target caciones 204 CSI MMEVS Target Startup Mle 2c442is9iceds4beedeusesuavs 205 CA MMEVSUSO8 Target Menu iiisoskasebeerbr ar ER RR 206 C 4 1 A 206 C 4 2 Ree Aone T EX 206 C 4 3 CODI ua d ERRARE RE RA AA AA 206 C 4 4 Memoty Mass ir rr AA 207 C 4 4
218. uted a specified number of times This section describes breakpoint operations A counting breakpoint is recognized by this icon A counting breakpoint is set by the Breakpoints Setting dialog To access this dialog box e Point to a C statement in the source component window hold the left mouse button and press the S key e Point at a C statement in the Source component window and click the right mouse button to open the Source pop up menu then select Set BreakPoint or Show BreakPoints Select Run Breakpoints from the main menu bar If program execution continues the Current field is decremented each time the instruction containing the counting breakpoint is reached When Current is equal to 0 the application stops If the check box Temporary is not checked not a temporary breakpoint Current is reloaded with the value stored in Interval to enable the counting breakpoint again B 12 Stepping in the Application The MCUez debugger provides stepping functions at the application source level and assembler level B 12 1 Stepping at Source Level Figure B 5 shows a typical stepping at source level operation User s Manual MCUez HC05 HC08 Debugger 194 C Source Level Debugging MOTOROLA C Source Level Debugging Stepping in the Application File View Bun Simulator Component Assembly Window Help SEa S 9 gt Rr qe fi Source iz o xn EMI Step Out Einb xd E DEMO fibo c Fibonacci wae alll ees
219. visible line User s Manual MCUez HC05 HC08 Debugger 156 Command Reference MOTOROLA Command Reference Component Commands Equivalent operations ATTRIBUTES ADR Select menu Assembly Display Adr ATTRIBUTES SMEM Select a range in Memory component window and drag it to the Assembly component window ATTRIBUTES SPC Drag a register to the Assembly component window ATTRIBUTES CODE Select menu Assembly Display Code Example Assembly lt ATTRIBUTES ADR ON CODE ON SMEM 0x800 16 Addresses and hexadecimal codes are displayed in the Assembly component window and assembly instructions at addresses 0x800 16 are highlighted In the Register Component Syntax ATTRIBUTES list list command command command FORMAT hex bin VSROLLPOS vposition HSCROLLPOS hposition Where vposition expression Where hposition expression Arguments VSCROLPOS vposition 1 gt The second line of registers is on top of the register component VSCROLPOS vposition 0 gt Returns to the default display The first line of registers is on top of the register component HSCROLPOS hposition 1 gt The second column of registers is on the left hand side of the register component MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 157 Command Reference HSCROLPOS hposition 0 gt Returns to the default display The first column of registers is on the left hand side
220. when the target is stopped In frozen mode variable values displayed in the data component are not updated when the target is stopped In periodical mode variables are updated at regular time intervals when the target is running The default update rate is 1 second but it can be modified by steps of 100 ms using the associated dialog box or the UPDATERATE command The UPDATERATE command sets the update rate for the data component This command is relevant only when the update mode for the data component is set to periodical The SMO module D command displays global variables for the corresponding Equivalent operations ATTRIBUTES FORMAT Select menu option Data Format ATTRIBUTES MODE Select menu option Data Mode ATTRIBUTES SMOD Drag and drop from module component to data component ATTRIBUTES UPDATERATE Select menu option Data Mode Example Periodical Data lt ATTRIBUTES MODE FROZEN In the data component the update mode for updating global variables is frozen mode Variables are not refreshed when the application is halted In the Memory Component Syntax ATTRIBUTES list A User s Manual list D command command command FORMAT bin oct hex signed unsigned WORD number ADR ON OFF ASC ON OFF DRESS address SPC address SMEM range SMOD module MODE Automatic Periodical Frozen UPDATRATE rate
221. will be prompted to e Use the address and remove the symbol e Replace the address with the symbol address e Fix the inconsistency by returning to the dialog box and clicking the symbol button Bus Analyzer Configuration x Triggers Pattem Sequencer Time Tag Clock Tem Symbol Invert C T HB V Disable E Range Address 0000 Mask 0000 CB HB Strobes Range Data 00 Mask 00 EAN Cc HB Range Group Clips Group B Clips Cow eo fw veLx CR ORG uns RED x Clear GAN BAN Figure D 10 Bus Analyzer Configuration Dialog Box In the Triggers tab define a trigger in terms of one to four events For each term the user can define the read write actions and clips The user can use these terms as ranged or non ranged triggers When using ranges the user can use A and B together or C and D together to give two different ranges or B and C together for one range MCUez HC05 HC08 Debugger User s Manual MOTOROLA MMDS0508 Target 225 MMDS0508 Target The address masks and data masks can be edited to provide a don t care on any address or data signal For example if a trigger is set up for an address of 0x1000 but the corresponding mask is OxFFFE then the trigger will be qualified when the address is 0x1000 or 0x1001 Terms Address Data Strobes Group A Clips Specify the term to be displayed for editing The term is used to identify an event a frame whi
222. ws 3 1 Contents 3 2 stu s io PPP 3 2 LONDON 6 ei diode ehs4 PE y dn 3a Component Window Menu EE M Source Component Window 3 3 4 1 BS DOS Loa nes RAW AERA AR 3 3 2 2 Decoding Instructions ocomccomo ros 45 4 3 PumulBiaosBDE abes XP ARRA RES RA dudes Assembly Component Window ERA Retrieving Source Statements 3 3 4 Register Component Window 3 3 4 1 Status Register Ds ccs ck cee ERA ES 3 3 4 2 Editing Registers cadssntp4ed eu bep 3 3 4 3 Register Display Options Menu 3 3 5 Memory Component Window 333 4 Memory Component Operations 3434 Memory Component Pop Up Menu A ie A Memory Update Mode seco ree 3 3 6 Data Component Window 3 3 6 1 Expression AAA 3 3 6 2 Data Component Pop Up Menu 3 2 03 Data Update Mode 6 si0crswcsugaeeas ke Command Line Component Window 3 3 8 Module Component Window MCUez HC05 HC08 Debugger User s Manual MOTOROLA Component Windows 47 Component Windows 3 2 Introduction 3 3 Components User s Manual This section describes the various component windows and associated menus The MCUez debugger operates in an environment constructed of windows that represent components of the target system Component windows are applications loaded at run time and have access to the target interface the symbol table and other global facilities Additional com
223. xecution 55 Pauses command execution until the target is halted on a breakpoint exception etc If the target is already halted execution of the command continues immediately Description The WAIT command pauses command execution for a specified t ime in tenths of a second or pauses until the target is halted when the option s is set When no parameter is specified the command pauses for 50 tenths of a second 5 seconds If time and s are specified t ime is used as a timeout Command execution waits until the target is halted If within the specified time interval the target is not halted execution continues as soon as the specified t ime elapses If the target is already halted command execution continues immediately Example WA I IT 100 Pauses for 10 seconds before executing the T trace instruction MCUez HC05 HC08 Debugger User s Manual MOTOROLA Command Reference 117 Command Reference WHILE Short description WHILE loop instruction Syntax WHILE condition Argument condition Defined as in C language syntax Description The WHILE command executes a sequence of commands as long as condition is true WHILE blocks can be nested This command can be stopped by pressing the Esc key Example DEFINE jump 0 WHILE jump lt 100 DEFINE jump jump 1 ENDWHILE T While jump lt 100 the jump variable is incremented
224. z HC05 HC08 Debugger User s Manual MOTOROLA Operating Procedures 77 Operating Procedures 4 7 Starting an Application The two ways to start an application are 1 Select the Runl Start Continue menu option 2 Click the Start Continue button in the MCUez toolbar mj The message RUNNING in the status bar indicates that the application is running The application will continue until 1 Itis manually halted 2 A breakpoint has been reached 3 Anexception has been detected 4 8 Stopping an Application The two ways to stop an application are 1 Choose Run Halt 2 Click on the Halt button in the MCUez toolbar El HALTED is displayed in the status bar to indicate that program execution has stopped The highlighted line in the source component is the source statement at which the program was stopped for example the next statement that will be executed The highlighted line in the assembly component is the assembler statement at which the program was stopped for example the next assembler instruction that will be executed The data component displays the names and values of global variables defined in the currently executed module The name of the module is specified in the data component information bar User s Manual MCUez HC05 HC08 Debugger 78 Operating Procedures MOTOROLA Operating Procedures Breakpoints 4 9 Breakpoints Breakpoints are control points associated with a program counter
Download Pdf Manuals
Related Search
Related Contents
Notice d`utilisation - WilTec Wildanger Technik GmbH Samsung ML-3753ND User Manual gravite word for pdf Valve Saver Kit Installation Manual Formations à la carte : mode d`emploi Betriebsanleitung 0,25 15 kW Copyright © All rights reserved.
Failed to retrieve file