![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
id78k3 integrated debugger reference for pc-9801 and 9821 series (windows tm ) and ibm-pc/at series (windows tm ) ver. v1.20 document no. u10441ej1v0um00 (1st edition) date published october 1995 p printed in japan ? nec corporation 1995
ibm-pc/at is a trademark of ibm corporation. 386 and 486 are trademarks of intel corporation. ms-dos and windows are trademarks of microsoft corporation. windows is an abbreviation of microsoft? windows tm operating system. the export of this product from japan is prohibited without governmental license. to export or re-export this product from a country other than japan may also be prohibited without a license from that country. please call an nec sales representative. the information in this document is subject to change without notice. no part of this document may be copied or reproduced in any form or by any means without the prior written consent of nec corporation. nec corporation assumes no responsibility for any errors which may appear in this document. nec corporation does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from use of a device described herein or any other liability arising from use of such device. no license, either express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of nec corporation or others. preface preface thank you for purchasing the id78k3 integrated debugger. conventional debuggers are used by entering commands directly. the id78k3 integrated debugger, on the other hand, runs under windows to provide a friendly, easy-to-use gui (graphical u ser interface). its operation is mouse-based, and operation is possible without having to refer to the manual. also, frequently used commands are represented as buttons, allowing their activation simply by clicking the button with the mouse. ? purpose ? the purpose of this manual is to provide the user with details of the capabilities of the integrated debugger. this manual assumes that the reader is reasonably familiar with the operation of in-circuit emulators and windows. ? files supplied with the integrated debugger ? files used with the integrated debugger file name explanation id78k3.exe debugger main section. the debugger is started by executing this file. db78k3.dll contains libraries for file and symbol processing. as78k3.dll contains libraries for assembly and disassembly. ex78k3.dll contains libraries for communication with the in-circuit emulator. ex78k3.om0 downloaded into the in-circuit emulator when the debugger starts. id78k3.hlp help file. expc.ini initial file. used to specify a set point and an interrupt address for the pc interface board. preface sample programs file name explanation sample.c sample program written in c. sub.c sample program written in c. contains the subroutines of sample.c. sample.lnk load module file for sample programs sample.c and sub.c. compiled by pd78366. ? target device ? the device which is to be the target of debugging by the integrated debugger is called a target device. the table below lists target devices, their associated device files, microprograms, and the names of the cpus which select the target devices. target device cpu name device file pd78350 78350 d350.78k pd78350a 78350a d350a.78k pd78350b 78350b d350b.78k pd78352a 78352a d352a.78k pd78352b 78352b d352b.78k pd78p352 78p352 dp352.78k note: for details of other devices, contact your nec sales representative or authorized dealer. ? in-circuit emulator ? an in-circuit emulator and dedicated interface board are required to use the integrated debugger. the table below lists the in-circuit emulator boards and interface boards that can be connected to host machines. in-circuit emulator product name explanation ie-784000-r in-circuit emulator main board ie-78350-r-em-a 78k/iii series common board ie-783xx-r-em1 (note 1) product type dependent board note 1. for details, contact your nec sales representative or authorized dealer. interface boards product name explanation ie-70000-98-if-a interface board for pc-9801 and 9821 series ie-70000-98-if-b interface board for pc-9801 and 9821 series ie-70000-98n-if (note 2) interface board for 98note ie-70000-pc-if-b (note 3) interface board for ibm-pc/at series note 2. the ie-70000-98n-if is corrected to the expansion bus (110-pin type) of 98note. note 3. the ie-70000-pc-if-a cannot be used. preface ? host machine ? the integrated debugger runs under windows. the table below lists the requirements for the machine to be used. item requirement host machine pc-9801, 9821 or ibm-pc/at series cpu i80386 or above (i80486, 33 mhz or above recommended) main memory 4m bytes or more (8m bytes or more recommended) os windows 3.1 or later screen size 640 x 400 dots or larger (800 x 600 dots or larger recommended) ? configuration ? 2 2 2 2 chapter 1 overview explains the input conventions for the character set and file names used with the integrated debugger. 2 2 2 2 chapter 2 starting and exiting the debugger explains how to install, start, and exit the integrated debugger. 2 2 2 2 chapter 3 explanation of terms describes the terms used in the explanation of the integrated debugger. 2 2 2 2 chapter 4 functions of the debug windows explains the basic operating instructions for the debug windows. 2 2 2 2 chapter 5 debug windows explains the debug windows of the integrated debugger. 2 2 2 2 chapter 6 explanation of debugger functions explains the functions of the integrated debugger in detail. preface ? conventions ? the following explains the conventions used throughout this manual. : indicates a key to be pressed. + : indicates keys which must be pressed at the same time. " " : indicates a character string. ' ' : indicates a character. [ ] : indicates an optional parameter. grph key : representation of a key featured by the pc-9801 and 9821 series. the alt key of the ibm-pc/at series has the same function. all representations of keys in this manual are for the pc-9801 and 9821 series. when using an ibm-pc/at series computer as a host machine, see appendix b . ? cautions ? y to perform source debugging, add options for creating debug information whenever compiling, assembly, or linking is performed. otherwise, source debugging may not be possible. y when creating your own startup routine in c, add the symbols given below. failing to do so may result in part of the step execution not being performed correctly. where to add symbol to be added start of startup routine _@cstart end of startup routine _@cend ? related documents ? the documents (user's manuals) related to this manual are listed below: document name document number ra78k series assembler package, language eeu-1404 ra78k series assembler package, operation eeu-1399 ra78k series structured assembler preprocessor eeu-1402 cc78k series c compiler, language eeu-1284 cc78k series c compiler, operation eeu-1280 contents i contents chapter 1 overview............................................................................................................ .....1 1.1 overview of debugger ...................................................................................................... .......... 1 1.2 overview of functions ..................................................................................................... ........... 1 1.3 input conventions for the integrated debugger.......................................................................... 2 character set.................................................................................................................. ..... 2 file specification............................................................................................................. ..... 3 wild cards ..................................................................................................................... .3 operands....................................................................................................................... ...... 4 numeric value ................................................................................................................ 4 address ........................................................................................................................ .. 5 register ....................................................................................................................... ... 5 symbol ......................................................................................................................... .. 6 expression and operator ................................................................................................ 7 chapter 2 starting and exiting the debugger........................................................................10 2.1 installation.............................................................................................................. ................... 10 2.1.1 connecting the devices .......................................................................................... 10 (1) confirming the environment .................................................................................. 10 (2) setting and connecting the devices ....................................................................... 10 2.1.2 installing the debugger .......................................................................................... 16 (1) confirming the environment and the files .............................................................. 16 (2) installing the debugger .......................................................................................... 17 2.2 starting and exiting the debugger......................................................................................... ... 21 2.2.1 starting ................................................................................................................ .... 21 2.2.2 exiting................................................................................................................. ..... 22 chapter 3 explanation of terms............................................................................................23 3.1 debug mode ................................................................................................................ ............. 24 3.2 file ...................................................................................................................... ...................... 24 3.3 current file .............................................................................................................. ................. 24 3.4 function .................................................................................................................. .................. 25 3.5 current function .......................................................................................................... ............. 25 3.6 structure ................................................................................................................. .................. 25 3.7 stack frame number ........................................................................................................ ....... 25 3.8 line ...................................................................................................................... ..................... 26 3.9 real-time ram sampling .................................................................................................... .... 26 chapter 4 functions of the debug windows.........................................................................27 4.1 basic window operations ................................................................................................... ..... 27 4.2 active state and hold state............................................................................................... ....... 31 4.3 view mode and modify mode................................................................................................. ... 31 4.4 errors/warnings........................................................................................................... ............. 32 4.4.1 gui operational errors/warnings ........................................................................... 32 4.4.2 errors/warnings generated by the debugger......................................................... 32 contents ii chapter 5 debug windows ....................................................................................................33 5.1 window types and configurations ............................................................................................ 33 5.1.1 windows.................................................................................................................. .33 5.1.2 dialog boxes ............................................................................................................ 3 6 5.2 debug windows .............................................................................................................. .......... 38 5.3 details of debug windows ................................................................................................... ..... 40 main window.................................................................................................................... ....... 41 configuration dialog box....................................................................................................... .. 56 extended option dialog box ................................................................................................... 63 project file load dialog box................................................................................................... ... 66 project file save dialog box................................................................................................... .. 69 load module dialog box ......................................................................................................... 72 upload dialog box.............................................................................................................. ..... 75 source path dialog box ......................................................................................................... .78 source file select dialog box.................................................................................................. .80 source window .................................................................................................................. ..... 83 find dialog box ................................................................................................................ ....... 88 symbol to address dialog box ................................................................................................ 91 variable view dialog box....................................................................................................... .. 93 variable window................................................................................................................ ...... 95 add variable dialog box ........................................................................................................ 100 local variable window .......................................................................................................... 102 addressing dialog box .......................................................................................................... 105 assemble window................................................................................................................ . 108 memory window.................................................................................................................. ...115 memory fill dialog box......................................................................................................... . 120 memory copy dialog box ...................................................................................................... 122 memory compare dialog box ............................................................................................... 124 memory compare result dialog box ..................................................................................... 126 stack window................................................................................................................... ..... 128 event set dialog box........................................................................................................... .. 131 event manager .................................................................................................................. ... 137 event link dialog box .......................................................................................................... . 146 break dialog box............................................................................................................... .... 154 trace dialog box ............................................................................................................... .... 158 snap-shot dialog box ........................................................................................................... 165 stub dialog box................................................................................................................ ..... 172 timer dialog box ............................................................................................................... .... 176 trace view window.............................................................................................................. . 182 trace pick-up dialog box ...................................................................................................... 1 88 register window ................................................................................................................ ... 192 sfr window ..................................................................................................................... .... 198 coverage window ................................................................................................................ . 202 coverage efficiency view dialog box.................................................................................... 205 coverage condition setting dialog box ................................................................................ 208 coverage memory clear dialog box ..................................................................................... 212 view file load dialog box ...................................................................................................... . 214 view file save dialog box ...................................................................................................... 218 error/warning dialog box...................................................................................................... 2 23 reset debugger dialog box .................................................................................................. 224 contents iii about dialog box............................................................................................................... .... 226 exit debugger dialog box ..................................................................................................... 22 8 chapter 6 explanation of debugger functions ...................................................................230 6.1 system operating modes .................................................................................................... ... 230 6.1.1 operating mode types.......................................................................................... 230 6.1.2 system operating mode........................................................................................ 230 6.1.3 system operating state ........................................................................................ 231 6.2 using the basic functions ................................................................................................. ..... 231 6.2.1 clock selection function....................................................................................... 231 6.2.2 mapping functions ................................................................................................ 232 6.2.3 reset functions .................................................................................................... 232 6.2.4 load function........................................................................................................ 233 6.2.5 emulation execution functions ............................................................................. 235 6.2.6 break functions .................................................................................................... 242 6.2.7 trace functions .................................................................................................... 245 6.2.8 snapshot function ................................................................................................ 250 6.2.9 stub function ........................................................................................................ 250 6.2.10 event setting and detection functions ............................................................... 251 6.2.11 register operation functions.............................................................................. 255 6.2.12 memory operation functions .............................................................................. 255 6.2.13 save function ..................................................................................................... 255 6.2.14 time measurement function .............................................................................. 255 6.2.15 source debugging............................................................................................... 256 appendix a error messages................................................................................................257 appendix b key functions ..................................................................................................269 b.1 functions of special function keys ....................................................................................... 2 69 b.2 functions of special function keys ( ctrl + key) .............................................................. 270 appendix c menus.............................................................................................................. 271 index .......................................................................................................................... ..........279 contents iv list of figures fig. 2-1 dip switch settings (pc-9801 and 9821)................................................................................. ........... 11 fig. 2-2 pc interface boards (pc-9801 and 9821 expansion slots) ............................................................... 12 fig. 2-3 connection diagram (pc-9801 and 9821 expansion slots) ............................................................... 12 fig. 2-4 pc interface board (98note) ............................................................................................ ................ 13 fig. 2-5 connection diagram (98note) ............................................................................................ .............. 13 fig. 2-6 dip switch settings (for ibm-pc/at) .................................................................................... .............. 14 fig. 2-7 pc interface board (for ibm-pc/at)..................................................................................... .............. 15 fig. 2-8 connection diagram (ibm-pc/at)......................................................................................... ............. 15 fig. 2-9 configuration dialog box displayed when debugger first starts ....................................................... 21 fig. 2-10 debugger startup screen............................................................................................... ..................... 22 fig. 5-1 main window............................................................................................................ ........................... 41 fig. 5-2 configuration dialog box............................................................................................... ...................... 57 fig. 5-3 extended option dialog box ............................................................................................. .................. 63 fig. 5-4 project file load dialog box ........................................................................................... .................... 66 fig. 5-5 project file save dialog box........................................................................................... .................... 69 fig. 5-6 load module dialog box ................................................................................................. .................... 72 fig. 5-7 upload dialog box...................................................................................................... ......................... 75 fig. 5-8 source path dialog box ................................................................................................. ..................... 78 fig. 5-9 source file select dialog box.......................................................................................... ................... 80 fig. 5-10 source window ......................................................................................................... .......................... 84 fig. 5-11 find dialog box ....................................................................................................... ............................ 88 fig. 5-12 symbol to address dialog box.......................................................................................... .................. 91 fig. 5-13 variable view dialog box .............................................................................................. ...................... 93 fig. 5-14 variable window ....................................................................................................... .......................... 95 fig. 5-15 add variable window................................................................................................... ..................... 100 fig. 5-16 local variable window................................................................................................. ..................... 102 fig. 5-17 addressing dialog box ................................................................................................. ..................... 106 fig. 5-18 assemble window....................................................................................................... ...................... 109 fig. 5-19 memory window ......................................................................................................... ...................... 116 fig. 5-20 memory fill dialog box ................................................................................................ ..................... 120 fig. 5-21 memory copy dialog box................................................................................................ .................. 122 fig. 5-22 memory compare dialog box ............................................................................................. .............. 124 fig. 5-23 memory compare result dialog box ..................................................................................... .......... 126 fig. 5-24 stack window .......................................................................................................... ......................... 128 fig. 5-25 event set dialog box .................................................................................................. ...................... 131 fig. 5-26 event manager ......................................................................................................... ......................... 138 fig. 5-27 event setting ......................................................................................................... ............................ 145 fig. 5-28 event window relationship ............................................................................................. ................. 145 fig. 5-29 event link dialog box ................................................................................................. ...................... 146 fig. 5-30 setting event link conditions ......................................................................................... .................. 151 fig. 5-31 application example of event link conditions .......................................................................... ........ 153 fig. 5-32 break dialog box...................................................................................................... ......................... 154 fig. 5-33 setting break event conditions........................................................................................ ................. 157 fig. 5-34 trace dialog box...................................................................................................... ......................... 158 fig. 5-35 setting trace event conditions........................................................................................ ................. 164 fig. 5-36 snap-shot dialog box .................................................................................................. ..................... 165 fig. 5-37 setting snapshot event conditions..................................................................................... .............. 171 fig. 5-38 stub dialog box....................................................................................................... .......................... 172 fig. 5-39 setting stub event conditions......................................................................................... .................. 175 fig. 5-40 timer dialog box...................................................................................................... ......................... 176 fig. 5-41 setting timer event conditions........................................................................................ ................. 181 fig. 5-42 trace view window ..................................................................................................... ..................... 182 fig. 5-43 trace pick-up dialog box .............................................................................................. ................... 188 contents v fig. 5-44 register window ....................................................................................................... ........................ 192 fig. 5-45 sfr window ............................................................................................................ ......................... 198 fig. 5-46 coverage window....................................................................................................... ...................... 202 fig. 5-47 coverage efficiency view dialog box ................................................................................... ............ 205 fig. 5-48 coverage condition setting dialog box ................................................................................. ........... 208 fig. 5-49 coverage memory clear dialog box...................................................................................... ........... 212 fig. 5-50 view file load dialog box ............................................................................................. ................... 215 fig. 5-51 view file save dialog box ............................................................................................. ................... 219 fig. 5-52 error/warning dialog box .............................................................................................. ................... 223 fig. 5-53 reset debugger dialog box............................................................................................. ................. 224 fig. 5-54 about dialog box...................................................................................................... ......................... 226 fig. 5-55 exit debugger dialog box .............................................................................................. ................... 228 fig. 6-1 example of system operating state ...................................................................................... ........... 231 fig. 6-2 example of system operating state (go)................................................................................. ........ 236 fig. 6-3 concept of return command execution .................................................................................... ...... 236 fig. 6-4 example of system operating state (return)............................................................................. ...... 237 fig. 6-5 example of system operating state (go & go)............................................................................ .... 237 fig. 6-6 example of system operating state (go & come).......................................................................... . 238 fig. 6-7 example of system operating state (cpu reset & go) .................................................................. 239 fig. 6-8 example of system operating state (step) ............................................................................... ....... 240 fig. 6-9 concept of next step execution ......................................................................................... .............. 241 fig. 6-10 concept of trace memory............................................................................................... .................. 246 fig. 6-11 concept of stub function.............................................................................................. .................... 250 fig. 6-12 concept of event detection............................................................................................ ................... 254 list of tables table 2-1 debugger files ............................................................................................................................... ..... 16 table 5-1 debug windows ......................................................................................................... ......................... 38 table 6-1 explanation of trace data view........................................................................................ ................ 248 table 6-2 trace retrieval items ................................................................................................. ....................... 249 table c-1 main window........................................................................................................... .......................... 271 table c-2 event manager ......................................................................................................... ......................... 276 table c-3 register window ....................................................................................................... ........................ 277 table c-4 variable window ....................................................................................................... ........................ 278 chapter 1 overview 1 chapter 1 overview 1.1 overview of debugger to run id78k3, the host machine (pc-9801, 9821, or ibm-pc/at running windows) and the in- circuit emulator ie-784000-r must be connected using a dedicated parallel interface board (ie- 70000-98-if-a, ie-70000-98-if-b, or ie-70000-pc-if-b). 1.2 overview of functions the functions and features of id78k3 are explained below. (1) gui id78k3 runs in the windows environment, allowing the user to debug programs simply by manipulating the mouse. buttons and menus are displayed in each window, allowing easy switching of the currently displayed information to other related information. (2) debugging at the source level operations such as the following can be performed effectively by specifying function names and line numbers at the source text level: referencing/setting of variables and structures, display of programs, and setting of breakpoints. (3) debugging at the instruction level operations such as the following can be performed effectively by specifying labels and addresses at the instruction level: referencing/setting of symbols and register values, display of programs, and setting of break points. (4) the in-circuit emulator functions are available. the fine event setting functions of the in-circuit emulator can be used when setting breakpoints and tracing programs. (5) monitoring (automatic display update at execution stop) the values in the currently displayed windows (view windows and view/setting windows) are automatically updated when execution of a user program terminates. (6) saving and restoring the debugging environment the state existing at any point during debugging can be saved. if necessary, that saved state can subsequently be restored. (7) display of source text from a function upon selecting a function from a function list, the source text containing that function is displayed. chapter 1 overview 2 1.3 input conventions for the integrated debugger character set the following character set can be used with the integrated debugger: z alphabet upper case : a b c d e f g h i j k l m n o p q r s t u v w x y z lower case : a b c d e f g h i j k l m n o p q r s t u v w x y z z digits : 0 1 2 3 4 5 6 7 8 9 z other characters :@ ? _ z special characters : . , : ; * / + - ' < > ( ) $ = ! # [ ] character name main use . period bit position specifier , comma operand delimiter : colon label delimiter ; semicolon comment start symbol * asterisk multiplication operator / slash division operator + plus addition operator - minus sign of inequality or operator for subtraction ' quotation character constant or string start/end symbol < less-than sign relational operator > greater-than sign relational operator ( opening parenthesis used to change the order in which operations are performed. ) closing parenthesis used to change the order in which operations are performed. $ dollar sign relative addressing start symbol = equal sign relational operator ! exclamation mark absolute addressing start symbol # sharp indicates an immediate value. [ opening bracket indirect display symbol ] closing bracket indirect display symbol ? carriage return only one ? before each lf is permitted (0dh). chapter 1 overview 3 file specification a file is specified in the format shown below: file name: primary-name [.file-type]] directories: [drive-name:][[\directory-name]...] primary-name: string of up to eight characters file-type: string of up to three characters drive-name: one character only directory-name: has the same format as a file name. wild cards z * and ?, in a path name and file name, are handled as wild cards. z * is replaced by a string of any characters. z ? is replaced by any one character. (in this case, a blank is also considered as being one character.) z when a wild card is specified, all corresponding directory and file names in the directory are displayed. z when a specific file name is to be specified, the use of wild cards results in an error. chapter 1 overview 4 example: for the directory containing the eight files listed below, wild cards can be specified as shown, resulting in the display of the file names in the right-hand column. aaaaa.hex, abc.c abc.hex, abc.sym, abcdefgh.hex, axyz, bcdefg.hex, xyz specification with wild card(s) corresponding file name(s) a*.* aaaaa.hex, abc.c, abc.hex, abc.sym, abcdefgh.hex, axyz a* axyz a*.hex aaaaa.hex, abc.hex, abcdefgh.hex *.hex aaaaa.hex, abc.hex, abcdefgh.hex, bcdefg.hex a??.hex abc.hex a??.* abc.c abc.hex, abc.sym ??? xyz ???. xyz abc.? abc.c abc.??? abc.c abc.hex, abc.sym operands there are five types of operands: numeric value address register symbol expression and operator numeric value four types of numeric values are supported: z binary input formats ny(note 2) n...ny(note 2) (where n=0, 1) z octal input formats no(note 2) n...no(note 2) (where n=0, 1, 2, 3, 4, 5, 6, 7) z decimal input formats n n...n nt(note 2) n...nt(note 2) (where n=0, 1, 2, 3, 4, 5, 6, 7, 8, 9) chapter 1 overview 5 z hexadecimal input formats nh(note 2)(note 1) n...nh(note 2)(note 1) 0xn(note 2) 0xn...n(note 2) (where n=0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f(note 2)) notes 1. if a number begins with a through f, it must be preceded by 0. example: ffh 0ffh 2. suffixes (y, o, t, h, 0x) and the alphabetic characters in a hexadecimal number can be either upper or lower case. address z an address can be specified simply by specifying a numeric value. z an address can also be specified by using a symbol or expression. z when specifying an address by using a numeric value, hexadecimal, decimal, octal, or binary numbers can be used. register z a general-purpose register has two names: absolute and functional. z each bit of psw is assigned a name. z the following register types are supported: register type register name register type register name control register pc psw uf sp rbs2 psw rbs1 rbs0 s z rss ac ie p/v cy chapter 1 overview 6 register type register name absolute name functional name if rss=0 if rss=1 general-purpose register r0 x r1 a r2 c r3 b r4 x r5 a r6 b r7 c r8 r9 r10 r11 r12 e e r13 d d r14 l l r15 h h rp0 ax rp1 bc rp2 ax rp3 bc rp4 vp vp rp5 up up rp6 de de rp7 hl hl rg4 vvp vvp rg5 uup uup rg6 tde tde rg7 whl whl symbol z a symbol consists of any of a-z, a-z, @, ?, _ (underscore), and 0-9. z a symbol must begin with a character other than a digit (0-9). z symbols are case-sensitive (upper case a-z and lower case a-z characters are regarded as being different.) z a symbol can consist of up to 31 characters. z if a symbol consists of more than 31 characters, only the first 31 characters are effective. z a symbol is defined by loading a load module file. chapter 1 overview 7 z the following types of symbols are supported. each has its own application range: public symbol (assembler, structured assembler, and c) local symbol in-module local symbol (assembler and structured assembler) in-file local symbol (c) in-function local symbol (c) z the following symbols are supported for the corresponding language: assembler/structured assembler: label name, constant name, and bit symbol name c: variable name (including point variable name, enumeration variable name, array name, structure name, and union name) function name and label name array element, structure element, union element, and bit field (if the symbol is an array, structure, or union) z if a variable name in c is the same as a register name, flag name, sfr name, or sfr bit name, it must be explicitly distinguished by being prefixed with "_". z a symbol can be specified instead of an address and a numeric value. z the application range of a symbol is based on the source debugging information obtained at assemble or compile time. z a public symbol is described by a symbol name only. z a local symbol is represented by a pair of a file and module name. expression and operator expression z an expression is a combination of constants, register names, sfr names, and symbols, joined by operators. z when an sfr, label, function, or variable name is used as a symbol, an address is operated upon as the value of the symbol. z elements other than the operators that make up an expression are called terms (constants or labels). they are called the primary term, secondary term, and so on, starting from the left. chapter 1 overview 8 operator the following types of operators are supported: arithmetic operators symbol meaning explanation + addition returns the sum of the values of the primary and secondary terms. - subtraction returns the difference between the values of the primary and secondary terms. * multiplication returns the product of the values of the primary and secondary terms. / division divides the value of the primary term by the value of the secondary term and returns the integer part of the result. mod remainder divides the value of the primary term by the value of the secondary term and returns the remainder of the result. - sign unary operation (negative) returns the 2's complement of the value of a term. + sign unary operation (positive) returns the 2's complement of the value of a term. logical operators symbol meaning explanation not negation takes the logical not of each bit of a term and returns it. and logical product takes the logical product of each of the bits of the primary and secondary terms and returns it. or logical sum takes the logical sum of each of the bits of the primary and secondary terms and returns it. xor exclusive or takes the exclusive or of each of the bits of the primary and secondary terms and returns it. others symbol meaning explanation ( opening parenthesis operations within parentheses () are performed ) closing parenthesis prior to those outside parentheses. cautions: z ( and ) are always used as a pair. z in a comparison operation, character strings can be given in terms. z operations are performed according to the following rules: the order in which operations are performed conforms to the operator precedence. where the operators have equal precedence, operations are performed in order, from left to right. operations enclosed in parentheses are performed prior to those outside the parentheses. each term to be operated upon is handled as unsigned 32-bit data. all operation results are handled as unsigned 32-bit data. if an overflow occurs during an operation, the lower 32 bits are regarded as being valid; the overflow is not detected. chapter 1 overview 9 z the operator precedence is as follows: highest ( , ) - sign, not *, /, mod +, - and lowest or, xor term when describing a constant in a term, the following numeric values can be used. z binary number 0y numeric value 11111111111111111111111111111111y (32 digits) z octal number 0o numeric value 37777777777o z decimal number -2147483648 numeric value 4294967295 a negative decimal number is internally converted to a 2's complement. z hexadecimal number 0h numeric value 0ffffffffh chapter 2 starting and exiting the debugger 10 chapter 2 starting and exiting the debugger this chapter explains how to install, start, and exit id78k3. 2.1 installation 2.1.1 connecting the devices this section explains how to connect the devices. (1) confirming the environment the following environment must have been established prior to starting the integrated debugger (referred to simply as the debugger throughout the remainder of this manual). pc-9801 and 9821 series ibm-pc/at series host machine cpu: i80386 or above; memory: 4m bytes or more (recommendation: cpu: i80486, 33 mhz or above; memory: 8m bytes or more) os windows ver. 3.1 or later (386 enhanced mode) interface board for an expansion slot (c bus): ie-70000-98-if-a, ie-70000-98-if-b for 98note (110-pin expansion bus): ie-70000-98n-if (isa bus) ie-70000-pc-if-b in-circuit emulator ie-784000-r ie-78350-r-em-a ie-783xx-r-em1 (emulation board) ep-78xxx-r (emulation probe) (2) setting and connecting the devices a. pc-9801 and 9821 (for an expansion slot) c turn off all the devices. d set the dip switches and jumpers of the pc interface board (ie-70000-98-if-a or ie- 70000-98-if-b) as shown in figure 2-1. chapter 2 starting and exiting the debugger 11 i/o address = x x x 0 sw2:8-5 sw1:4-1 sw1:8-5 nouse ir13 ir12 ir11 ir9 ir6 ir5 ir3 nouse ir5 ir12 ir13 jp1 ir5 short-circuited off sw1 on(0) off(1) 0 0 a8 a9 a10 a11 a12 a13 a14 a15 ie-70000-98-if-a off sw2 0 d a4 fixed jp1 ir5 short-circuited off sw1 on(0) off(1) 0 0 a8 a9 a10 a11 a12 a13 a14 a15 ie-70000-98-if-b off sw2 d fixed a5 a6 a7 0 10 10 1 1 1 2 34 56 7 8 1 2 34 56 7 8 1 2 34 56 7 8 1 2 34 56 7 8 0 0 10 10 1 1 00 00 00 0 0 00 00 00 0 0 a4 a5 a6 a7 :on(0) :off(1) fig. 2-1 dip switch settings (pc-9801 and 9821) jumper set point vector number ie-70000-98-if-a ie-70000-98-if-b ir3 (int0) 0x0b not applied applied ir5 (int1) 0x0d applied applied ir6 (int2) 0x0e not applied applied ir9 (int3) 0x11 not applied applied ir11 (int42) 0x13 not applied applied ir12 (int5) 0x14 applied applied ir13 (int6) 0x15 applied applied chapter 2 starting and exiting the debugger 12 sw2 sw1 jp1 ie-70000-98-if-a sw2 sw1 jp1 ie-70000-98-if-b fig. 2-2 pc interface boards (pc-9801 and 9821 expansion slots) note: these settings correspond to the following i/o address and interrupt: 00dxh (addresses 00d0 through 00dfh are used) ir5 (int1) if these i/o address and interrupt are already being used for another device, the i/o address for the board must be set to an address between 000x and 0fffxh (the lower four bits cannot be set) and the interrupt to one of ir3, ir5, ir6, ir9, ir11, ir12, or ir13, such that they do not cause a conflict with the other device. note that if the settings of the pc interface board are changed, the settings of the expc.ini file must also be changed. e mount the pc interface board in an expansion slot of the pc-9801 or 9821. f connect the parallel interface port of the pc interface board mounted in the pc-9801 to ch3 of the in-circuit emulator, using the parallel interface cable supplied with the in-circuit emulator. g when using a target, connect the emulation probe to the in-circuit emulator and connect the other end of the probe to the target. h this completes the setting and connection of the devices. pc-9801,9821 + ie-70000-98-if-a or -b ie-784000-r +ie-78350-r-em-a +ie-783xx-r-em1 parallel interface cable (supplied with in-circuit emulator) emulation probe (ep-78xxx-r) target jig power supply ie-784000-r in circuit emulator fig. 2-3 connection diagram (pc-9801 and 9821 expansion slots) chapter 2 starting and exiting the debugger 13 b. pc-9801 and 9821 (for 98note) c turn off all the devices. (set the resume function of the 98note to off.) d attach the connecting cable, supplied with the pc interface board (ie-70000-98n-if), referring to the instruction manual for the pc interface board. for this pc interface board: 1. the interrupt and i/o address are fixed and cannot be changed. 2. the extension bus of the 98note must have a 110-pin connector. the interrupt and i/o address are as follows: interrupt and vector nos. int0, 0x0b i/o address 0x00d0 pc-9801 note nec ice ie-70000-98n-if fig. 2-4 pc interface board (98note) e connect the parallel interface port of the pc interface board, connected to the 98note, to ch3 of the in-circuit emulator, using the parallel interface cable supplied with the in-circuit emulator. f when using a target, connect the emulation probe to the in-circuit emulator and connect the other end of the probe to the target. g this completes the setting and connection of the devices. 98note ie-70000-98n-if ie-784000-r +ie-78350-r-em-a +ie-783xx-r-em1 parallel interface cable (supplied with in-circuit emulator) emulation probe (ep-78xxx-r) target jig power supply ie- in circuit fig. 2-5 connection diagram (98note) chapter 2 starting and exiting the debugger 14 c. ibm-pc/at c turn off all the devices. d set the dip switches and jumpers of the pc interface board (ie-70000-pc-if-b), as shown below. i/o address = x x x 0 sw2:4-1 sw1:4-1 sw1:8-5 off off sw1 sw2 on(0) off(1) 1 2 3 4 1 2 3 4 5 6 7 8 0 1 0 0 0 1 0 0 0 0 0 0 2 20 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 ie-70000-pc-if-b nouse irq7 irq6 irq5 irq4 irq3 irq2 jp1 irq3 short-circuited :on(0) :off(1) fig. 2-6 dip switch settings (for ibm-pc/at) jumper set point vector number irq2 0x0a irq3 0x0b irq4 0x0c irq5 0x0d irq6 0x0e irq7 0x0f chapter 2 starting and exiting the debugger 15 jp1 sw2 sw1 ie-70000-pc-if-b fig. 2-7 pc interface board (for ibm-pc/at) note: these settings correspond to the following i/o address and interrupt: 022xh (addresses 0220 through 022fh are used) irq3 if these i/o address and interrupt are already being used for another interface, the i/o address for the board must be set to an address between 000x and 0fffxh (the lower four bits cannot be set) and the interrupt to one of irq2, irq3, irq4, irq5, irq6, or irq7, such that they do not cause a conflict with the other interface. if the settings of the pc interface board are changed, the settings of the expc.ini file must also be changed. e mount the interface board in an expansion slot of the ibm-pc/at. f connect the parallel interface port of the interface board mounted in the ibm-pc/at to ch3 of the in-circuit emulator, using the parallel interface cable supplied with the in-circuit emulator. g when using a target, connect the emulation probe to the in-circuit emulator and connect the other end of the probe to the target. h this completes the setting and connection of the devices. ibm-pc + ie-70000-pc-if-b ie-784000-r +ie-78350-r-em-a +ie-783xx-r-em1 parallel interface cable (supplied with in-circuit emulator) emulation probe (ep-78xxx-r) target jig power supply ie-784000-r in circuit emulator fig. 2-8 connection diagram (ibm-pc/at) chapter 2 starting and exiting the debugger 16 2.1.2 installing the debugger this section explains how to install the debugger. (the explanation is common to the pc-9801, 9821, and ibm-pc/at.) (1) confirming the environment and the files the following lists the files used with the debugger. no device files are supplied with the debugger. therefore, the necessary device file(s) must be purchased separately. table 2-1 debugger files file name explanation id78k3.exe debugger main section. the debugger is started by executing this file. db78k3.dll contains libraries for file and symbol processing. as78k3.dll contains libraries for assembly and disassembly. ex78k3.dll contains libraries for communication with the in-circuit emulator. ex78k3.om0 downloaded into the in-circuit emulator when the debugger starts. id78k3.hlp help file. expc.ini initial file. used to specify a set point and an interrupt address for the pc interface board. d3xxx.78k (device file) (sold separately) contains device-specific information. a device file corresponding to the target device is required. chapter 2 starting and exiting the debugger 17 (2) installing the debugger the following explains the procedure for installing the debugger. the explanation assumes that the debugger will be used from a fixed disk. following the procedure will result in the debugger being installed in the \debugger directory on drive b of the fixed disk. it is assumed that windows has already been installed in the \windows directory on drive b. c turn on the host machine (pc-9801, 9821, or ibm-pc/at). start ms-dos from the fixed disk. d wait for the ms-dos prompt to appear. e insert the debugger system disk into the floppy disk drive (c drive). f enter the following: md debugger ? ? ? ? cd debugger ? ? ? ? copy c:*.* /v ? ? ? ? this copies the contents of the system disk to the fixed disk. g if the settings of the pc interface board have been changed, use the editor to change the expc.ini file as follows. if no changes have been made, go to h . the initial settings are as shown below. change the underlined portions as necessary. pc-9801 and 9821 [pcif] host=0 ; pc-9801 pc_base= 0x00d0 ; i/o base address ie_int= 0x0d ; interrupt vector 98note (only the following settings are possible) [pcif] host=0 ; pc-9801 pc_base= 0x00d0 ; i/o base address ie_int= 0x0b ; interrupt vector ibm-pc/at [pcif] host=1 ; ibm-pc/at pc_base= 0x0220 ; i/o base address ie_int= 0x0b ; interrupt vector chapter 2 starting and exiting the debugger 18 host= this switch is used to select the host machine. 0 for the pc-9801 or 9821 0 for 98note 1 for the ibm-pc/at pc_base= must be changed if the dip switch settings are changed. this item must be set to exactly correspond to the dip switch settings. (the lower four bits are fixed to 0.) ie_int= must be changed if the jumper settings are changed. pc-9801 and 9821 jumper set point ie_int set point remarks ir3 0x0b extended bus int0 ir5 0x0d extended bus int1 ir6 0x0e extended bus int2 ir9 0x11 extended bus int3 (hd) ir11 0x13 extended bus int42 (1m-byte fd) ir12 0x14 extended bus int5 (sound) ir13 0x15 extended bus int6 (mouse) ibm-pc/at jumper set point ie_int set point remarks irq2 0x0a irq3 0x0b irq4 0x0c irq5 0x0d irq6 0x0e irq7 0x0f h remove the system disk from the floppy disk drive (c drive) and insert the device file disk. i copy the following files from the device file disk to the b: \debugger directory, in which the debugger has been installed. file name contents d3xxx.78k device file for the 78k3 series this copies the contents of the device file disk to the fixed disk. j start windows. chapter 2 starting and exiting the debugger 19 k select file from the program manager. l select new... from the pull-down menu. select program group then click the button. enter group name "debugger" in the description field, then click the button. the group is now registered. select file n ew from the program manager. select program item , then click the button. 11 12 13 14 chapter 2 starting and exiting the debugger 20 enter the following, then click the button. description: id78k3 command line: b:\debugger\id78k3.exe working directory: b:\debugger the icon is now registered. the debugger is now installed on the fixed disk. once the debugger has been installed, the debugger can be started by double-clicking the icon registered as described above. 15 chapter 2 starting and exiting the debugger 21 2.2 starting and exiting the debugger 2.2.1 starting c start windows. d turn on the in-circuit emulator. e when using a target, turn on the target. f double-click the icon registered when the debugger was installed. id78k3 g when the debugger starts, the configuration dialog box opens first. fig. 2-9 configuration dialog box displayed when debugger first starts chapter 2 starting and exiting the debugger 22 h select a debug target device. (the debug target device can be selected only when the debugger first starts.) i set the clock source, pin mask, location, and memory mapping. j once all settings have been completed, click the button. this completes device initialization and downloads the necessary data into the in-circuit emulator. k once downloading has been completed, the main window of the debugger opens. this window is used the most during debugging. fig. 2-10 debugger startup screen 2.2.2 exiting c select file from the menu bar of the main window. d select exit from the file pull-down menu. e the exit debugger dialog box opens. f click the button to exit the debugger. chapter 3 explanation of terms 23 chapter 3 explanation of terms this chapter describes the terms used in explaining how to use id78k3. (1) debug mode (2) file (3) current file (4) function (5) current function (6) structure (7) stack frame number (8) line (9) real-time ram sampling chapter 3 explanation of terms 24 3.1 debug mode when the window interface is being used, two debug modes are supported: source mode and instruction mode. ? in source mode step execution is performed in units of source text lines. ? in instruction mode step execution is performed in units of instructions. the debug mode is switched from the main window. the debugger is placed in source mode when it first starts. 3.2 file id78k3 supports the following file types: ? source files ? load module files ? hexadecimal files ? debugging environment files ? view files 3.3 current file the current file is the source file containing the instruction pointed to by the program counter (pc). when lines and functions in the current file are specified by commands, the name of the file can be omitted. the file specification format is as follows: a. path\file b. file (path: path name file: file name ) ? for a (a path is specified) the file is written and read to and from the directory in the path. ? for b (no path is specified) the file is written and read to and from the current directory. chapter 3 explanation of terms 25 3.4 function a function refers to those functions constituting a c source program. the function view and specification format is: a. file#_func b. _func (file: file name func: function name ) ? for a (a file is specified) func is interpreted as a static function that is effective within the specified file. ? for b (no file is specified) a corresponding function is retrieved from the current file in the order of effective static functions and global functions. function specification examples test.c#_calc_data static function "calc_data" in the "test.c" file _main "main" which can be retrieved from the current file 3.5 current function the current function is that function which contains the instruction pointed to by the program counter (pc). when a local variable in the current function is to be accessed, the specification of the function name can be omitted. 3.6 structure in c, structures and unions are generically referred to as structures. the term structure is used when a structure or a union variable is used without explicitly specifying a member. 3.7 stack frame number a stack frame number is a decimal integer beginning from 1. it indicates a level in a stack that corresponds to a certain function. the function having the largest stack frame number is the current function. chapter 3 explanation of terms 26 3.8 line a line is specified to identify a specific line in a source file. the line view and specification format is: file:line (file: file name line: line number) this identifies the line-th line in the specified file. line specification example test.c:100 100th line in the "test.c" file 3.9 real-time ram sampling when it displays the variables assigned to a space, the contents of which can be read, id78k3 reads the contents in real time to update the display even during the execution of a user program. this capability is called real-time ram sampling. this memory address space is called a real-time ram space. real-time ram space 0xfe00 - 0x00feff chapter 4 functions of the debug windows 27 chapter 4 functions of the debug windows 4.1 basic window operations the basic operations in a debugging process using the window interface are specified as noun + verb. in other words, the user first selects the object to be debugged (a variable, line, or task) then selects the desired debug function by clicking the corresponding function button. a window provides a menu containing the same functions as the function buttons, allowing the user to carry out debugging by using the keyboard shortcut keys. the following explains the objects that the user can manipulate when using id78k3. (1) mouse mouse operations with the integrated debugger are mainly instigated with the left mouse button. in the following explanations, references to a mouse button refer to the left mouse button, unless otherwise specified. there are three basic mouse operations: click: press the mouse button once then release it. double-click: press the mouse button twice, in rapid succession, then release it. drag & drop: drag refers to repositioning an object by pressing and holding down the mouse button, then moving the mouse. drop refers to releasing the mouse button once an object has been moved to a desired location. (2) pushbutton and function button a pushbutton is a rectangular, sculptured button that contains a bit map (icon) or character string. clicking a pushbutton starts the corresponding action. a function button is a button which starts a debug function. (3) check box a check box consists of two parts: a square box and selectable text. clicking a check box causes the square box to change from ' ' to ' '. more than one check box can be selected at any one time. chapter 4 functions of the debug windows 28 (4) radio button a radio button consists of two parts: a circle and selectable text. clicking a radio button causes the circle to change from ' ' to ' '. usually, a group of two or more radio buttons are displayed, from which only one can be selected. (5) scroll bar slider arrow button scroll bars allow the user to scroll up and down on the screen (vertical scroll bar) and to the right and left (horizontal scroll bar). the slider in a scroll bar indicates the position of the displayed portion relative to the entire scrollable information. clicking an arrow button scrolls by one line in that direction. dragging and dropping the slider box displays the corresponding part of the information. (6) menu bar menu bar a menu bar is displayed at the top of each window. clicking an item in a menu bar causes the pull-down menu for that item to be displayed. the same effect is obtained by pressing the grph key (pc-9801 and 9821 series) or alt key (ibm-pc/at series) then entering the corresponding underlined alphabetic character. chapter 4 functions of the debug windows 29 (7) pull-down menu pull-down menu a pull-down menu is an extension of a menu bar. clicking an item in a menu causes the corresponding action to be activated. the same effect is obtained by entering the corresponding underlined alphabetic character for a desired item. some items in a pull-down menu can be activated directly by pressing ctrl + alphabetic character without first clicking the menu bar. such items are indicated by "ctrl+alphabetic character", to the right of the items in the pull-down menus. menu items are indicated as follows, such that the effect of selecting the menu items can easily be recognized. 1. for "item" when this item is selected, the indicated action is activated. 2. for "item ..." when this item is selected, a dialog box requiring a user response appears. 3. for "item " when this item is selected, the corresponding cascade menu appears. (8) tool bar tool bar a tool bar contains a group of buttons corresponding to frequently used commands, allowing those commands to be executed simply by clicking the corresponding button. each button is identified by an easy-to-understand graphical. (9) status bar source file name: line number function name ie status break cause status bar pc value cpu status a status bar is an area showing the states of the debugger and the in-circuit emulator. starting from the left, the status bar indicates the following items: source file name and line number pointed to by the pc function name pointed to by the pc pc value cpu ( pd784xxx) status in-circuit emulator status break cause chapter 4 functions of the debug windows 30 (10) drop-down list before clicking after clicking the arrow the arrow a drop-down list is a single-item field in which only the currently selected item is displayed. other items become selectable by clicking the arrow. chapter 4 functions of the debug windows 31 4.2 active state and hold state the active state is that state in which the values displayed in a window are automatically updated as a user program or a command is executed. the hold state is that state in which the values are retained irrespective of whether a user program or a command is executed. a window whose contents change as a user program is executed (view window and view/setting window) can be switched between the active state and the hold state. with id78k3, only one window of each type can be set to the active state. more than one view window of the same type can be displayed at any one time if placed in the hold state. if view windows of the same type are displayed, one in the active state and the others in the hold state, and an attempt is made to switch a hold-state window to the active state, the message "other view mode windows exist." appears and the hold-state window is closed. a window in the hold state has a highlighted background, with [hold xx] displayed in its title bar. to switch a window between the active and hold states, follow the procedure below. to switch from the active to the hold state: 1. select operation h old from the menu bar . 2. press the ctrl +h keys. to switch from the hold to the active state: 1. select operation a ctive from the menu bar . 2. press the ctrl +i keys. 4.3 view mode and modify mode some windows of id78k3 are provided with two window modes: view and modify. the windows are: ? variable window ? local variable window ? memory window ? register window ? sfr window ? disassemble window these windows are usually set to view mode. by switching these windows to modify mode, variable values in a user program and memory contents can be modified during debugging. the values modified in modify mode are reflected by clicking the button, displayed in modify mode. clicking the button causes all the values modified in modify mode to be restored to their previous states. however, if the button has already been clicked, the values are restored to those existing immediately after the button was clicked. only an active-state window can be switched to modify mode. chapter 4 functions of the debug windows 32 to switch a window between view and modify modes, follow the procedure below. to switch from view mode to modify mode: 1. select operation tom odify from the menu bar . 2. press the ctrl +f keys. 3. click the button. to switch from modify mode to view mode: 1. select operation tov iew from the menu bar . 2. press the ctrl +w keys. 3. click the button. 4.4 errors/warnings id78k3 handles errors and warnings separately. all errors are generated from the debugger. 4.4.1 gui operational errors/warnings all gui operational errors are handled as warnings. if a warning occurs, an alarm is generated or an error/warning dialog box appears. 4.4.2 errors/warnings generated by the debugger an error/warning dialog box appears when an error occurs. chapter 5 debug windows 33 chapter 5 debug windows 5.1 window types and configurations id78k3 uses several windows and dialog boxes. dialog boxes are displayed only temporarily to enable a specified operation. both windows and dialog boxes can be modified by using the window manager. in principle, however, while windows can be reduced to an icon, dialog boxes cannot. 5.1.1 windows windows are classified into the following four types according to their function: ? ? ? ? execution windows ? ? ? ? view windows ? ? ? ? view/setting windows ? ? ? ? management windows each of these window types is described below. (1) execution windows execution windows are used to control windows or program execution. an execution window consists of a menu bar, window display area, status bar, and control buttons. file e dit v iew op tion ex ecute o peration b rose j ump w indow h elp menu bar control button area window display area status bar windows of this type: main window chapter 5 debug windows 34 (2) view windows view windows are used to display the contents of a program or memory related to the target system. view windows display data but do not enable data modification. a view window consists of a location area and information display area. location area information display area windows of this type: source window trace view window coverage window stack window (3) view/setting windows view/setting windows are used to display or modify the contents of a program or memory related to the target system. view/setting windows usually allow only the display of data. data modification is possible only in modify mode. there are two types of view/setting windows: those opened from within the main window and those opened outside the main window. a. view/setting window opened from within the main window this type of window consists of function buttons, a location area, and information display area. function buttons information display area location area windows of this type: local variable window sfr window memory window assemble window chapter 5 debug windows 35 b. view/setting window opened outside the main window this type of window can be placed at any location outside the main window. it is, however, always displayed in front of the main window and cannot be reduced to an icon. this type of window consists of a menu bar, function buttons, a location area, and information display area. menu bar function buttons information display area location area file e dit v iew o peration j ump windows of this type: register window variable window (4) management windows management windows are used to manage the settings used for debugging. a management window consists of a menu bar and information display area. file e dit v iew o peration j ump menu bar icon display area windows of this type: event manager chapter 5 debug windows 36 5.1.2 dialog boxes dialog boxes are classified into the following two types: ? ? ? ? modal dialog boxes ? ? ? ? modeless dialog boxes (1) modal dialog boxes when you are working with this type of dialog box, you cannot access other debugger windows or dialog boxes, until you exit from this dialog box. to access other windows or dialog boxes, close the dialog box by completing the operation enabled by the dialog box or by clicking the button in the dialog box (2) modeless dialog boxes when you are working with this type of dialog box, you can access other debugger windows or dialog boxes, without first having to exit from this dialog box. dialog boxes are also classified into the following six types according to their function: ? ? ? ? selection dialog boxes ? ? ? ? specification dialog boxes ? ? ? ? setting dialog boxes ? ? ? ? confirmation dialog boxes ? ? ? ? auxiliary dialog boxes ? ? ? ? view dialog boxes (a) selection dialog boxes selection dialog boxes are used to select a chip name or file name. dialog boxes of this type: configuration dialog box load module dialog box project file save dialog box project file load dialog box upload dialog box view file load dialog box view file save dialog box source file select dialog box (b) specification dialog boxes specification dialog boxes provide text areas for specifying an address or path. dialog boxes of this type: addressing dialog box trace pick-up dialog box source path dialog box chapter 5 debug windows 37 (c) setting dialog boxes setting dialog boxes are used to set conditions. dialog boxes of this type: extended option dialog box event set dialog box event link dialog box break dialog box trace dialog box snap-shot dialog box stub dialog box coverage condition setting dialog box coverage memory clear dialog box (d) confirmation dialog boxes confirmation dialog boxes are used to confirm a selected operation. dialog boxes of this type: reset debugger dialog box exit debugger dialog box error/warning dialog box (e) auxiliary dialog boxes auxiliary dialog boxes are used to perform auxiliary operations for a window. dialog boxes of this type: variable dialog box find dialog box memory copy dialog box memory fill dialog box memory compare dialog box add variable dialog box (f) view dialog boxes view dialog boxes are used to temporarily display information. dialog boxes of this type: memory compare result dialog box about dialog box (g) view/setting dialog boxes view/setting dialog boxes provide areas for setting conditions and displaying information. dialog boxes of this type: timer dialog box chapter 5 debug windows 38 5.2 debug windows debug windows are listed below. table 5-1 debug windows (1/2) name outline page main window appears immediately after the debugger is activated. 41 configuration dialog box sets the debugger operating environment. 56 extended option dialog box sets extended options. 63 project file load dialog box loads the debugging environment. 66 project file save dialog box saves the debugging environment. 69 load module dialog box loads an object file or symbol file. 72 upload dialog box uploads memory contents into a file. 75 source path dialog box specifies source path information. 78 source file select dialog box selects the source file to be displayed in the source window. 80 source window displays the source text. 83 find dialog box searches for a character string in the current window. 88 symbol to address dialog box displays the address assigned to a symbol. 91 variable view dialog box temporarily displays the value of a variable. 93 variable window displays and modifies variables. 95 add variable dialog box adds variables to be displayed in the variable window. 100 local variable window displays and modifies local variables in the current function. 102 addressing dialog box specifies the display start address. 105 assemble window displays a disassembled program and performs online assembly. 108 memory window displays and modifies the memory contents. 115 memory fill dialog box initializes memory. 120 memory copy dialog box copies the memory contents. 122 memory compare dialog box compares the memory contents. 124 memory compare result dialog box displays the results of memory comparison. 126 stack window displays the stack contents for functions. 128 event set dialog box registers event conditions. 131 event manager manages each registered event condition. 137 event link dialog box registers event link conditions. 146 break dialog box registers and sets break event conditions. 154 trace dialog box registers and sets trace event conditions. 158 snap-shot dialog box registers and sets snapshot event conditions. 165 stub dialog box registers and sets stub event conditions. 172 chapter 5 debug windows 39 table 5-1 debug windows (2/2) name outline page timer dialog box displays the results of execution time measurement, and registers and sets timer event conditions. 176 trace view window displays the results of trace. 182 trace pick-up dialog box sets trace display conditions. 188 register window displays and modifies the register contents. 192 sfr window displays and modifies the sfr contents. 198 coverage window displays the results of coverage. 202 coverage efficiency view dialog box displays the results of coverage as a percentage. 205 coverage condition setting dialog box sets the measurement range for coverage efficiency. 208 coverage memory clear dialog box initializes the results of coverage. 212 view file load dialog box opens a reference window for the current window. 214 view file save dialog box saves the contents of the current window into a file. 218 error/warning dialog box displays an error or warning. 223 reset debugger dialog box resets the debugger and target cpu. 224 about dialog box displays the version of the debugger. 226 exit debugger dialog box exits from the debugger. 228 chapter 5 debug windows 40 5.3 details of debug windows this section details each debug window, using the following format: window-name window-type (mode-type-of-dialog-box) the window name and window type (and mode type, in the case of a dialog box) are indicated in this frame. outline provides a brief outline of the window. window displays the configuration of the window as it appears on the screen. description describes the contents of the window. buttons describes the function of each button in the window. menu bar lists menus that can be pulled down from the titles in the menu bar, and describes the functions of each menu item. chapter 5 debug windows main window [execution window] 41 main window execution window outline the main window is automatically opened immediately after you have activated the debugger and completed the initial settings. the window remains displayed until the debugger is terminated. other windows are opened from within this window. the execution of a user program is controlled by using this window at the following two levels: ? source level when a program is debugged in units of source text lines. ? instruction level when a program is debugged in units of instructions. when the debugger is started, source level debugging is selected by default. window fig. 5-1 main window description the main window consists of the following components: ? menu bar ? tool bar ? window display area ? status bar the function of each component is described below. chapter 5 debug windows main window [execution window] 42 (1) tool bar the tool bar contains buttons which allow you to execute frequently used commands by a single action. on each button, the corresponding command is indicated graphically, as an icon. commands assigned to the buttons can also be executed from the menu bar. you can hide the tool bar by selecting option t oolbar from the menu bar and removing the check mark. stops the user program. executes the user program. while the program is being executed, this button appears to remain pressed. once program execution stops, the button is released. executes the program in real time, until the execution returns to the calling function. executes the program, step by step. this button enables the execution of as many steps as the number of times the button is clicked. for source level debugging, the program is executed in units of lines. for instruction level debugging, the program is executed in units of instructions. performs next step execution of the program. this button enables the execution of as many steps as the number of times the button is clicked, by means of next step execution. for source level debugging, the program is executed in units of lines. for instruction level debugging, the program is executed in units of instructions. initializes the debugger or emulation cpu. opens the reset debugger dialog box. displays the source text. opens the source window. displays the stack contents. opens the stack window. displays a disassembled program. opens the assemble window. displays the memory contents. opens the memory window. displays the register contents. opens the register window. registers and sets break events. opens the break dialog box. displays the results of trace. opens the trace view window. chapter 5 debug windows main window [execution window] 43 registers and sets trace events. opens the trace dialog box. displays the sfr contents. opens the sfr window. registers and sets timer events, and displays the results of timer measurement. opens the timer dialog box. (2) window display area the window display area displays debug windows. within this area, displayed windows can be expanded, contracted, or reduced to an icon. windows displayed in this area: source window assemble window local variable window trace view window memory window coverage window sfr window stack window (3) status bar status bar source file name: line number function name pc value cpu status ie status break cause the status bar displays the status of the debugger and in-circuit emulator. source file name displays the source file name and source line number corresponding to the indicated pc value. if no file information is provided, --- is displayed. function name displays the function name corresponding to the indicated pc value. if no function information is provided, --- is displayed. pc value displays the current value of the program counter (pc). cpu status displays the status (such as bus hold, stop, or hold mode) of the cpu ( pd784xxx: target device). ie status displays the status (such as run or break mode) of the in-circuit emulator. chapter 5 debug windows main window [execution window] 44 break cause displays the cause of a break. the table below lists the possible causes of break. cause description compulsory break normal break event break break triggered by an event non map break an access has been attempted to a non-map area. relocation break a relocation instruction contradicting the initial setting has been executed. sfr illegal an illegal access has been attempted to an sfr. software break break triggered by a software break event stack overflow break due to stack overflow temporary break temporary break trace full break break due to trace full uninitialize mem read reading from uninitialized memory has been attempted. write protect writing to a write-protected area has been attempted. menu bar (a) file file open/save project save save as ctrl+o ctrl+s open save save as close print down load up load open/save project open/save log exit edit v iew op tion ex ecute o peration b rowse j ump w indow h elp open... the operation performed depends on the current window. when the current window is the source window: opens the source file select dialog box to enable selection of a source text file. when the current window is other than the source window: opens the view file load dialog box to enable display of a view file in the current window. save saves the contents of the current window into the view file. save as... saves the contents of the current window into a view file having a different name. the view file save dialog box is opened. chapter 5 debug windows main window [execution window] 45 close closes the current window. print prints the contents of the current window. down load... downloads a program: the load module dialog box is opened. up load... uploads a program: the upload dialog box is opened. open/save project open project... opens a project file: the project file load dialog box is opened. save overwrites the project file with the current operating environment. the file selected using open project... or save a s... of f ile open/save project of the menu bar is overwritten. save as ? saves the current operating environment into a project file: the project file save dialog box is opened. exit exits from the debugger: the exit debugger dialog box is opened. chapter 5 debug windows main window [execution window] 46 (b) edit option execute operation browse file jump window help view copy ctrl+z ctrl+c ctrl+v undo paste write in restore memory edit memory fill... memory copy... memory compare... file compare... undo cancels the most recent editing. copy copies a selected character string into the clipboard buffer. paste pastes the contents of the clipboard buffer at the point to which the text cursor is positioned. write in writes the modified contents into the target device. executing this command has the same effect as clicking the button. restore cancels the modified contents. executing this command has the same effect as clicking the button. memory memory fill... initializes memory: the memory fill dialog box is opened. memory copy... copies the contents of memory: the memory copy dialog box is opened. memory compare... compares the contents of memory: the memory compare dialog box is opened. file compare... compares the view file with the contents of memory: the file select dialog box is opened. chapter 5 debug windows main window [execution window] 47 (c) view 1 byte 64 byte 1024 byte file e dit view option ex ecute o peration b rowse j ump w indow h elp frame timetag instruction fetch address instruction fetch data instruction fetch status memory access address memory access data memory access status external probe jump address disassemble open frame... pick up... address sort pick up compulsion read synchronize nibble byte word long ascii show hide bin oct dec hex hide show hide show hide show hide show hide show hide show hide show hide bin oct dec hex hide bin oct dec hex hide attribute show hide search... address... view variable... watch variable... add variable... sym to adr... delete bin oct dec hex proper event ? memory sfr trace view coverage search ? searches for a character string or numerical value: the find dialog box is opened. executing this command has the same effect as clicking the button. address ? displays the contents of memory at a specified address: the addressing dialog box is opened. view variable... displays variables: the variable view dialog box is opened. the value of a specified symbol is displayed. watch variable... displays specified variables: the variable window is opened. chapter 5 debug windows main window [execution window] 48 add variable... adds specified variables to the variable window: the add variable dialog box is opened. sym to adr... displays the address of a specified variable. delete deletes a specified variable. bin sets binary display format. oct sets octal display format. dec sets decimal display format. hex sets hexadecimal display format. proper sets default display format for each variable (default). event ? displays event information: the event manager is opened. memory nibble displays data in units of 4 bits. byte displays data in units of 8 bits (default). word displays data in units of 16 bits. long displays data in units of 32 bits. ascii turns on/off ascii view mode. sfr address sort specifies the sfr display order. without check mark: alphabetical order with check mark ( 9 ): in order of addresses pick up displays only modified sfrs. attribute show displays the sfr attribute (default). hide hides the sfr attribute. compulsion read performs forced reading of a read-protected sfr. synchronize writes the modified sfrs to the target device. trace view frame displays or hides the frame number field. show displays the frame number (default). hide hides the frame number. timetag displays or hides the time tag field. show displays the time tag (default). hide hides the time tag. instruction fetch address displays or hides the fetch address field. show displays the address (default). hide hides the address. instruction fetch d ata displays or hides the fetch data field. bin displays data in binary format. oct displays data in octal format. dec displays data in decimal format. hex displays data in hexadecimal format (default). hide hides data. chapter 5 debug windows main window [execution window] 49 instruction fetch status displays or hides the fetch status field. show displays the status (default). hide hides the status. memory access address displays or hides the access address field. show displays the address (default). hide hides the address. memory access data displays or hides the access data field. bin displays data in binary format. oct displays data in octal format. dec displays data in decimal format. hex displays data in hexadecimal format (default). hide hides data. memory access status displays or hides the access status field. show displays the status (default). hide hides the status. external probe displays or hides the external sense data field. bin displays external sense data in binary format. oct displays external sense data in octal format. dec displays external sense data in decimal format. hex displays external sense data in hexadecimal format (default). hide hides external sense data. jump address displays or hides the jump address field. show displays the jump address (default). hide hides the jump address. disassemble displays or hides the disassembled data field. show displays the disassembled data (default). hide hides the disassembled data. open frame... specifies the view start frame: the start frame specification dialog box is opened. pick up... sets trace view conditions: the trace pick-up dialog box is opened. coverage 1 byte displays data in 1-byte units. 16 byte displays data in 16-byte units. 1024 byte displays data in 1024-byte units. chapter 5 debug windows main window [execution window] 50 (d) option execute operation browse file jump window help edit view option toolbar statusbar button source mode instruction mode configuration... source path... extended option... toolbar displays or hides the tool bar. statusbar displays or hides the status bar. button displays or hides the buttons in windows. source mode performs step execution at the source level. instruction mode performs step execution at the instruction level. configuration... sets the environment: the configuration dialog box is opened. source path... sets source path information: the source path dialog box is opened. extended option... sets extended options. (e) execute operation browse file jump window help edit view option execute stop go return step next go & go go & come slowmotion cpu reset & go cpu reset... set bp set pc uncond. trace on cond. trace on trace off ctrl+p ctrl+g ctrl+r ctrl+t ctrl+n ctrl+b coverage on coverage off chapter 5 debug windows main window [execution window] 51 stop stops the execution of a program: executing this command has the same effect as clicking the button. go executes a program: executing this command has the same effect as clicking the button. return executes a program in real time, until the execution is returned to the calling function: executing this command has the same effect as clicking the button. step executes a program, step by step: executing this command has the same effect as clicking the button. next performs next step execution of a program: executing this command has the same effect as clicking the button. go & go repeatedly executes a program. when a break condition is satisfied, the window is updated and the program is executed again. executing this command has the same effect as clicking the button each time a break occurs. go & come executes a program in real time, up to a specified address. slowmotion continues step-by-step execution of a program. cpu reset & go resets the target device, then executes a program. cpu reset... resets either the target device alone or the entire debugger system: the reset debugger dialog box is opened. executing this command has the same effect as clicking the button. set bp sets a breakpoint on a selected line. set pc sets the address of a selected line in the program counter (pc). uncond. trace on sets unconditional tracing of program execution by the tracer. cond. trace on sets tracing of program execution by the tracer only when preset conditions are satisfied. trace off disables the tracer (does not trace the execution of a program). coverage on enables coverage measurement. coverage off disables coverage measurement. chapter 5 debug windows main window [execution window] 52 (f) operation option execute browse file jump window help view edit operation active hold tomodify toview window connect ctrl+i ctrl+h ctrl+f ctrl+w sourcetext assemble memory active sets the window to the active state. hold sets the window to the hold state. tomodify sets the window to modify mode: executing this command has the same effect as clicking the button. toview sets the window to view mode: executing this command has the same effect as clicking the button. window connect links the trace view window to a specified window. sourcetext the trace view window is linked to the source window. assemble the trace view window is linked to the assemble window. memory the trace view window is linked to the memory window. (g) browse edit option execute operation file jump window help view traceset... traceview... snapshottraceset... eventset... eventmanager... eventlinkset... browse sourcetext... variable... assemble... memory... register... stack trace... sfr... local variable... breakset... timer... stub set... trace event coverage view... clear... condition... efficiency... chapter 5 debug windows main window [execution window] 53 source text... displays the source text: the source window is opened. executing this command has the same effect as clicking the button. variable... displays specified variables: the variable window is opened. assemble... displays disassembled text: the assemble window is opened. executing this command has the same effect as clicking the button. memory... displays the memory contents: the memory window is opened. executing this command has the same effect as clicking the button . register... displays the register contents: the register window is opened. executing this command has the same effect as clicking the button. stack trace... displays the stack contents: the stack window is opened. executing this command has the same effect as clicking the button. sfr... displays the sfr contents: the sfr window is opened. executing this command has the same effect as clicking the button. local variable... displays local variables: the local variable window is opened. break set... registers and sets break event conditions: the break dialog box is opened. executing this command has the same effect as clicking the button. timer... registers and sets timer event conditions, and displays the results of timer measurement: the timer dialog box is opened. executing this command has the same effect as clicking the button. stub set... registers and sets stub event conditions: the stub dialog box is opened. trace opens a window for a trace. traceset... registers and sets trace event conditions: the trace dialog box is opened. executing this command has the same effect as clicking the button. traceview... displays the results of trace: the trace view window is opened. executing this command has the same effect as clicking the button. snapshottraceset... registers and sets snapshot event conditions: the snap-shot dialog box is opened. event opens a window for an event. chapter 5 debug windows main window [execution window] 54 eventset... registers event conditions: the event set dialog box is opened. eventmanager... manages event conditions: the event manager is opened. eventlinkset set... registers event link conditions: the event link dialog box is opened. coverage opens a window for coverage. view... displays the results of coverage measurement: the coverage window is opened. clear... initializes the results of coverage: the coverage memory clear dialog box is opened. condition... sets the conditions for measuring coverage efficiency: the coverage condition setting dialog box is opened. efficiency... displays the coverage efficiency: the coverage efficiency view dialog box is opened. (h) jump edit option execute operation file window help view browse jump sourcetext... assemble... memory... ctrl+u ctrl+a ctrl+m sourcetext... sets the data selected in the current window as the jump address, and displays the source text and source line starting from that address: the source window is opened. no jump can be performed if the jump address contains no line information. assemble... sets the data selected in the current window as the jump address, and displays the disassembled text starting from that address: the assemble window is opened. memory... sets the data selected in the current window as the jump address, and displays the memory contents starting from that address: the memory window is opened. (i) window edit option execute operation file help view browse jump window cascade tile arrange icons close all [open windows] cascade displays the windows in cascade style within the main window. tile displays the windows in tile style within the main window. arrange icons re-arranges the icons within the main window. chapter 5 debug windows main window [execution window] 55 close all closes all windows except the main window. [open windows] lists the names of all currently open windows. selecting a window name from the list causes that window to become the current window. (j) help edit option execute operation file view browse jump window help about... about... displays the version of the debugger. icon the main window can be reduced to the following icon by clicking the button on the title bar. the user can freely create or modify the graphic or title of the icon. id78k3 chapter 5 debug windows configuration dialog box [selection dialog box] 56 configuration dialog box selection dialog box (modal) outline the configuration dialog box is used to display and set the operating environment of the in-circuit emulator. this dialog box is displayed when the debugger is started. to use the debugger, first set the operating environment of the in-circuit emulator using this dialog box. to load a project file, however, there is no need to set the operating environment. in such a case, the contents of the project file are reflected in the configuration dialog box. the settings for pin mask, location, and memory mapping in this dialog box can also be added or modified during debugging. this dialog box can be opened in any of the following ways: ? when the debugger is started, the dialog box is automatically opened. ? in the main window, select option c onfiguration... from the menu bar . ? in the main window, press the grph , p , and c keys , in this order. chapter 5 debug windows configuration dialog box [selection dialog box] 57 window fig. 5-2 configuration dialog box description the configuration dialog box consists of the following components: ? emulation cpu selection area ? internal rom/ram view area ? cpu clock source selection area ? power supply selection area ? mask setting area ? mapping setting area ? mapping attribute specification area ? function buttons the function of each component is described below. chapter 5 debug windows configuration dialog box [selection dialog box] 58 (1) emulation cpu selection area select the cpu to be emulated. the emulation cpu can be selected only when this dialog box is opened upon activation of the debugger. (2) internal rom/ram view area this area displays the internal rom and ram sizes of the emulation cpu. these sizes are displayed automatically once the emulation cpu has been selected. (3) cpu clock source selection area select the cpu clock source. the following three clock sources are supported (internal is the default): ? ? ? ? internal : the clock of the in-circuit emulator is used as the cpu clock (32 mhz). ? ? ? ? external : the clock of the target device is used as the cpu clock. the cpu clock can be selected when the debugger is started or a project file is loaded. you cannot select the cpu clock once debugger operation has been started. chapter 5 debug windows configuration dialog box [selection dialog box] 59 (4) power supply selection area select how power is to be supplied to the emulation cpu. the following two power supplies are supported (internal is the default): ? ? ? ? internal: the power supply of the in-circuit emulator is used as the power supply. (the operating voltage is fixed to 5 v.) ? ? ? ? external: the power supply of the target device is used as the power supply. (the operating voltage can be varied within the specifications of the device.) caution: just setting the power supply selection area is not enough to select the power supply. also set emulation board 1 according to the selected power supply. (5) mask setting area you can mask specified signals from the target device using this area. masked signals are not input to the in-circuit emulator. (signals should be masked only when the operation of the target device becomes unstable during debugging.) the signals of the following three pins can be masked: ? nmi pin ? reset pin ? wait pin chapter 5 debug windows configuration dialog box [selection dialog box] 60 (6) mapping setting area select the memory bus width. this area also allows you to add or delete memory mapping. a. selecting the bus width select a bus width from the displayed choices: ? 8 bits ? 16 bits (the choices vary with the target chip.) b. setting memory mapping ? to add memory mapping click the button. memory mapping is added according to the data specified in the memory attribute area and the selected bus width. ? to delete memory mapping select the memory mapping to be deleted, then click the button. the selected memory mapping is deleted. (7) mapping attribute specification area specify the type and range of memory mapping. select one of the following three memory mapping types according to the application: ? ? ? ? emulation rom: selects alternate rom for the in-circuit emulator. ? ? ? ? emulation ram: selects alternate ram for the in-circuit emulator. ? ? ? ? target: selects target memory. chapter 5 debug windows configuration dialog box [selection dialog box] 61 the mapping units depend on the mapping addresses, as listed below. mapping addresses mapping units 0x0000 - 0x0 ffff 8k bytes buttons completes the environment setting. closes the dialog box and sets the environment as specified in the dialog box. restores the environment existing before the dialog box was opened. ignores any selections and closes the dialog box. opens the help window, which provides a detailed explanation of the configuration dialog box. chapter 5 debug windows configuration dialog box [selection dialog box] 62 caution when any of the following settings is made using the configuration dialog box, the power of the target device must be turned on. otherwise, a message prompting power-on of the target device is displayed. confirm that the power of the target device is turned on before clicking the button. item setting power supply selection area external mapping attribute specification area target if the button is clicked even though the target device power is not turned on, the following message appears, and the debugger is terminated: chapter 5 debug windows extended option dialog box [setting dialog box] 63 extended option dialog box setting dialog box (modal) outline the extended option dialog box is used to display and set the extended debugger options. this dialog box can be opened in either of the following ways: ? in the main window, select option e xtended option... from the menu bar . ? in the main window, press the grph , p , and e keys , in this order. window fig. 5-3 extended option dialog box description the extended option dialog box consists of the following components: ? software break setting area ? break mode setting area ? real-time internal ram sampling time setting area ? write mode selection area ? function buttons the function of each component is described below. chapter 5 debug windows extended option dialog box [setting dialog box] 64 (1) software break setting area turn software break on or off. on: software break is used. off: software break is not used. callt adr: vector address for callt instruction to be freed for debugger when software break is used, a vector address for the callt instruction must be freed so that the debugger can use the address. (2) break mode setting area turn the break sound on or off. : sound is output. : sound is not output. (3) real-time internal ram sampling time setting area set the sampling time for real-time ram. real-time sampling can be performed within the following range: 256 bytes from address 0xfe00 to 0xfeff variables and other data stored within this range can be displayed, in real time, within the variable window or memory window. the sampling time can be specified in units of 1 ms. chapter 5 debug windows extended option dialog box [setting dialog box] 65 (4) write mode selection area select write mode for windows in modify mode. the following two write modes are supported: ? ? ? ? insert : insert mode ? ? ? ? over write: overwrite mode buttons stores the changes which have been made and closes the dialog box. cancels the changes which have been made and closes the dialog box. chapter 5 debug windows project file load dialog box [selection dialog box] 66 project file load dialog box selection dialog box (modal) outline the project file load dialog box is used to restore a previously saved debugger environment. once a project file has been loaded, the size and position of each displayed window are set to the state saved in the file (except for analyzer functions). this dialog box can be opened in either of the following ways: ? in the main window, select file open/save proj ect o pen project... from the menu bar . ? in the main window, press the grph , f , j , and o keys , in this order. window fig. 5-4 project file load dialog box description the project file load dialog box consists of the following components: ? file selection area ? path setting area ? function buttons the function of each component is described below. chapter 5 debug windows project file load dialog box [selection dialog box] 67 (1) file selection area specify the name of the project file to be loaded. you can select a project file from the list by clicking it. the selected file name is highlighted and displayed in the area above the list. the default extension for a project file name is .prj . double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. (2) path setting area specify the path of the project file to be loaded. double-clicking a path name in the list displays the project files under the path, in the project file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]:drive name buttons loads the specified project file and sets the environment accordingly. closes the project file load dialog box. ignores any selections and resets the initial state. opens the help window. chapter 5 debug windows project file load dialog box [selection dialog box] 68 loaded data the following data is loaded from a project file. if a project file for a different target device is loaded after the debugger has been started, data related to the target device is ignored. window data configuration dialog box all items main window display position, display information about tool bar/status bar/buttons, execution mode, and trace on/off information load module dialog box download file information extended option dialog box set information source path dialog box source path information source window window display information and font information assemble window window display information and display start address memory window window display information and display start address stack window window display information sfr window window display information local variable window window display information trace view window window display information event manager window display information and all event information event link dialog box window display information break dialog box window display information trace dialog box window display information snap-shot dialog box window display information stub dialog box window display information event set dialog box window display information register window window display information and display banks variable window window display information and displayed variable information coverage window window display information chapter 5 debug windows project file save dialog box [selection dialog box] 69 project file save dialog box selection dialog box (modal) outline the project file save dialog box is used to save the current debugger environment into a file called a project file. the size and position of each displayed window are also stored. only data for active windows is stored. this dialog box can be opened in either of the following ways: ? in the main window, select file open/save proj ect save a s... from the menu bar . ? in the main window, press the grph , f , j , and a keys , in this order. when a project file has already been loaded or saved, you can save the environment into that project file in either of the following ways: ? in the main window, select file open/save proj ect s ave from the menu bar . ? in the main window, press the grph , f , j , and s keys , in this order. in this case, the project file save dialog box does not appear but the current environment is saved to an existing project file. window fig. 5-5 project file save dialog box chapter 5 debug windows project file save dialog box [selection dialog box] 70 description the project file save dialog box consists of the following components: ? file selection area ? path setting area ? function buttons the function of each component is described below. (1) file selection area specify the name of the project file into which the current environment is to be saved. enter the file name from the keyboard. you can also select a project file from the list by clicking it, when that file is to be overwritten. the selected file name is highlighted and displayed in the area above the list. the default extension for a project file name is .prj . double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. (2) path setting area specify the path under which the project file will be stored. double-clicking a path name in the list displays the project files under that path, in the project file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]:drive name chapter 5 debug windows project file save dialog box [selection dialog box] 71 buttons saves the current environment into the specified project file. closes the project file save dialog box. ignores any selections and resets the initial state. opens the help window. saved data the following data is saved into a project file: window data configuration dialog box all items (target device, clock setting, pin mask setting, and mapping information) main window display position, display information about tool bar/status bar/buttons, execution mode, and trace on/off information load module dialog box download file information extended option dialog box set information source path dialog box source path information source window window display information and font information assemble window window display information and display start address memory window window display information and display start address stack window window display information sfr window window display information local variable window window display information trace view window window display information event manager window display information and all event information event link dialog box window display information break dialog box window display information trace dialog box window display information snap-shot dialog box window display information stub dialog box window display information event set dialog box window display information register window window display information and display banks variable window window display information and displayed variable information coverage window window display information chapter 5 debug windows load module dialog box [selection dialog box] 72 load module dialog box selection dialog box (modal) outline the load module dialog box is used to download a file to the in-circuit emulator or target device by specifying the name and type of the file. files of the following types can be downloaded: ? load module object files (.lnk) ? intel extended hexadecimal format ? s type of motorola hexadecimal format (standard address) ? extended tektronix hexadecimal format source debugging can be performed only for load module object files. this dialog box can be opened in either of the following ways: ? in the main window, select file d own load.... from the menu bar . ? in the main window, press the grph , f , and d keys , in this order. window fig. 5-6 load module dialog box chapter 5 debug windows load module dialog box [selection dialog box] 73 description the load module dialog box consists of the following components: ? file selection area ? path setting area ? load condition specification area ? function buttons the function of each component is described below. (1) file selection area specify the name of the load module file to be downloaded. you can select a load module file from the list by clicking it. the selected file name is highlighted and displayed in the area above the list. the default extension for a load module file name is .lnk . double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. (2) path setting area specify the path of the load module file to be downloaded. double-clicking a path name in the list displays the load module files under that path, in the load module file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]: drive name chapter 5 debug windows load module dialog box [selection dialog box] 74 (3) load condition specification area specify the load conditions. symbol specifies whether to read symbol information. object specifies whether to read object information. offset value specifies the offset address. buttons downloads the selected file. ignores any selections and closes the dialog box. ignores any selections and resets the initial state. opens the help window, which provides a detailed explanation of the load module dialog box. chapter 5 debug windows upload dialog box [selection dialog box] 75 upload dialog box selection dialog box (modal) outline the upload dialog box is used to save the memory contents to a file by specifying the name and type of the file. the memory contents can be saved to files of the following three types: ? intel extended hexadecimal format ? s type of motorola hexadecimal format (standard address) ? extended tektronix hexadecimal format this dialog box can be opened in either of the following ways: ? in the main window, select file u p load... from the menu bar . ? in the main window, press the grph , f , and u keys , in this order. window fig. 5-7 upload dialog box chapter 5 debug windows upload dialog box [selection dialog box] 76 description the upload dialog box consists of the following components: ? file selection area ? path setting area ? upload condition specification area ? function buttons the function of each component is described below. (1) file selection area specify the name of the object file for uploading. enter the file name from the keyboard. you can also select an object file from the list by clicking it, when that file is to be overwritten. the default extension for an object file name is .hex . double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. (2) path setting area specify the path under which the object file for uploading will be stored. double-clicking a path name in the list displays the object files under that path, in the object file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]: drive name chapter 5 debug windows upload dialog box [selection dialog box] 77 (3) upload condition specification area specify the upload conditions. ? ? ? ? address: specifies the address range in memory to be uploaded. ? ? ? ? file format: specifies the type of the object file to which the memory contents will be uploaded. the following three file types are supported: intel: intel extended hexadecimal format motrola: s type of motorola hexadecimal format (standard address) tektro: extended tektronix hexadecimal format buttons saves the memory contents within the specified address range into a file according to the specified directory, file name, and file type. closes the upload dialog box. ignores any selections and resets the initial state. opens the help window. chapter 5 debug windows source path dialog box [specification dialog box] 78 source path dialog box specification dialog box (modal) outline the source path dialog box is used to specify the source paths. when the source paths are specified, you can perform source debugging of the source text stored in two or more directories. this dialog box can be opened in either of the following ways: ? in the main window, select option source p ath... from the menu bar . ? in the main window, press the grph , p , and p keys , in this order. window fig. 5-8 source path dialog box description the source path dialog box consists of the following components: ? source path specification area ? function buttons the function of each component is described below. chapter 5 debug windows source path dialog box [specification dialog box] 79 (1) source path specification area specify the source paths, delimiting them with a blank. path information specifiable in this area is limited to 256 characters (including delimiters). example: when the source text is stored in the following directories: a:\78k\c b:\src c:\asm specify the source paths as follows: buttons sets the specified source paths and closes the dialog box. cancels the specified source paths and closes the dialog box. chapter 5 debug windows source file select dialog box [selection dialog box] 80 source file select dialog box selection dialog box (modal) outline the source file select dialog box is used to select the source text to be displayed within the source window. the source text can be selected in either of the following two ways: ? specifying a source file name ? specifying a function name this dialog box can be opened in any of the following ways when the current window is the source window: ? in the main window, select file o pen... from the menu bar . ? in the main window, press the grph , f , and o keys , in this order. ? press the ctrl +o short cut keys . window fig. 5-9 source file select dialog box chapter 5 debug windows source file select dialog box [selection dialog box] 81 description the components of the source file select dialog box vary with the selection mode, as follows: when file selection mode is specified ? file selection area ? path setting area ? mode selection area ? function buttons when function selection mode is specified ? function selection area ? path setting area ? mode selection area ? function buttons the function of each component is described below. (1) file selection area specify the name of the source file to be displayed within the source window. you can select a source file from the list by clicking it. the selected file name is highlighted and displayed in the area above the list. the default extension for a source file name is .c . double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. (2) function selection area specify the name of the function to be displayed within the source window. you can select a function name from the list by clicking it. the selected function name is highlighted and displayed in the area above the list. double-clicking a function name in the list has the same effect as selecting the function name and clicking the button. chapter 5 debug windows source file select dialog box [selection dialog box] 82 (3) path setting area specify the path of the source file to be displayed within the source window. double-clicking a path name in the list displays the source files under that path, in the source file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]: drive name (4) mode selection area select either of the following source selection modes: source selects a source file. func selects a function. buttons displays the selected source file or function within the source window. closes the source file select dialog box. ignores any selections and resets the initial state. opens the help window. chapter 5 debug windows source window [view window] 83 source window view window outline the source window is used to display the source text. this window can be opened in any of the following ways: ? in the main window, select browse s ource text... from the menu bar . ? in the main window, press the grph , b , and s keys , in this order. ? in the tool bar, click the button. the jump function can be used to display the source text from other windows. use of the jump function enables displaying of the target source and source lines quickly. to use the jump function, select the pointer and follow the steps below. c select jump s ource text... from the menu bar . d press the grph , j , and s keys , in this order. e press the ctrl +u keys . the following table lists jump functions. window pointer operation method c d e assemble window address view area { { { memory window address view area { { { trace view window trace result view area { { { coverage window address view area { { { stack window stack frame number view area { { { event manager event { { -- register window register { { -- chapter 5 debug windows source window [view window] 84 window source view area line number area current pc mark area point mark area fig. 5-10 source window description the source window consists of the following components: ? font specification area ? point mark area ? current pc mark area ? line number area ? source view area ? function buttons the function of each component is described below. (1) font specification area specify the font and character size for the source text to be displayed in the source view area. font: specify the font (default: fixedsys) size: specify the character size. (2) point mark area the point mark area displays the event setting conditions. you can set or delete break points and software break points using this area. chapter 5 debug windows source window [view window] 85 a. break point set/delete function you can set or delete break points by clicking this area, as listed in the table below. clicked location color clicked button operation on the b mark red or black left button deletes the break point. blue right button deletes the software break point. on a mark other than b or where no mark is indicated --- left button sets a break point. --- right button sets a software break point. b. event display function this area displays the setting condition of each type of events. when an execution event or access fetch event is set for a source line, the mark corresponding to the event type is displayed on the left of the source line. mark description e an event condition is set. l the final phase of an event link is set. b a break event is set. t a trace event is set. ti a timer event is set. s a snapshot event is set. u a stub event is set. a two or more events are set. (3) current pc mark area the current pc mark area displays a mark (>) indicating the current value in the program counter (pc). clicking this mark and holding the mouse button will display the content at the address indicated by the pc in a pop-up window. (4) line number area the line number area displays the line numbers of the source text. you can also perform the following five functions using this area: a. go & come function this function executes the user program up to the selected line number. when the user program is being executed in this mode, currently set break events do not occur. this function is used as follows: 1. select the line number up to which the program will be executed. 2. in the main window, select execute go & com e from the menu bar or press the grph , x , and m keys, in this order. chapter 5 debug windows source window [view window] 86 b. break event set function this function sets an execution break event at the first address corresponding to the selected line number. this function is used as follows: 1. select the line number for which a break event will be set. 2. in the main window, select execute set b p from the menu bar or press the grph , x , and b keys, in this order. or, press the ctrl +b short cut keys. c. program counter set function this function sets the first address corresponding to the selected line number in the program counter (pc). this function is used as follows: 1. select a line number. 2. in the main window, select execute se t pc from the menu bar or press the grph , x , and e keys, in this order. d. jump function the jump function causes a jump to the assemble or memory window, with the first address corresponding to the selected line number being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the assemble window): 1. select a line number. 2. in the main window, select jump a ssemble... from the menu bar or press the grph , j , and a keys, in this order. or, press the ctrl +a short cut keys. e. window linkage function this function indicates the linkage between the source text and other windows (assemble, memory, and trace view), using line numbers. the line numbers subject to linkage are displayed in reverse video. (5) source view area the source view area displays the source text. double-clicking or dragging a displayed symbol selects the symbol. chapter 5 debug windows source window [view window] 87 buttons sets a break point for the selected source text line. opens the variable window to display the values of variables. opens the variable view dialog box to display the value of a specified variable. opens the find dialog box to search the source text for a character string. when a mark is set for the selected source text line, opens the event manager to display details of the setting. when no mark is set, performs no operation. closes the source window. icon the source window can be reduced to the following icon by clicking the button on the title bar: source window (sample.c) chapter 5 debug windows find dialog box [auxiliary dialog box] 88 find dialog box auxiliary dialog box (modeless) outline the find dialog box is used to search for data. the results of search are reflected to the window that calls the dialog box. when the find dialog box is called from within the source window, the file is searched. when the find dialog box is called from within the assemble window, the disassembled text is searched. when the find dialog box is called from within the memory window, memory is searched. when the find dialog box is called from within the coverage window, the coverage view contents are searched. this dialog box can be opened in any of the following ways: ? in the main window, select view s earch... from the menu bar . ? in the main window, press the grph , v , and s keys , in this order. ? in the source window, click the button. ? in the assemble window, click the button. ? in the memory window, click the button. ? in the coverage window, click the button. window fig. 5-11 find dialog box chapter 5 debug windows find dialog box [auxiliary dialog box] 89 description the find dialog box consists of the following components: ? search data specification area ? search condition specification area ? search direction specification area ? function buttons the function of each component is described below. (1) search data specification area specify the data to be searched for. if you have selected a string within the calling window, that string is displayed in the area. you can modify the string, as required, using a keyboard. (2) search condition specification area specify whether the search is case-sensitive, using the radio buttons. the default is case- sensitive search. not case-sensitive case-sensitive (3) search direction specification area specify the direction of search, upward or downward. up : upward down : downward chapter 5 debug windows find dialog box [auxiliary dialog box] 90 buttons searches for the specified data according to the specified conditions. stops search. the button is changed to the button during search. closes the find dialog box. this button is changed to the button during search. chapter 5 debug windows symbol to address dialog box [auxiliary dialog box] 91 symbol to address dialog box auxiliary dialog box (modeless) outline the symbol to address dialog box is used to display the address assigned to a variable. this dialog box can be opened in either of the following ways: ? in the main window, select view sy m to adr... from the menu bar . ? in the main window, press the grph , v , and y keys , in this order. window fig. 5-12 symbol to address dialog box description the symbol to address dialog box consists of the following components: ? variable specification area ? variable address view area ? function buttons the function of each component is described below. chapter 5 debug windows symbol to address dialog box [auxiliary dialog box] 92 (1) variable specification area specify a function name or variable name or line number to be converted to the address. after entering data, press the ? key to display the address in the variable address display area. the table below lists how to specify a variable or line number. function or variable _fnc file#_fnc (for static function or variable) sfr sfrname line number in source text file:no fnc: function or variable name sfrname: sfr name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). (2) variable address view area this area displays address assigned to the variable specified in the variable specification area. buttons closes the dialog box. chapter 5 debug windows variable view dialog box [auxiliary dialog box] 93 variable view dialog box auxiliary dialog box (modal) outline the variable view dialog box is used to temporarily display the value of the variable which is specified in the source window. this dialog box can be opened in any of the following ways: ? select a variable in the source window, then select view v iew variable... from the menu bar . ? select a variable in the source window, then press the grph , v , and v keys , in this order. ? select a variable in the source window, then click the button. window when opened using menu bar when opened using button on source window fig. 5-13 variable view dialog box chapter 5 debug windows variable view dialog box [auxiliary dialog box] 94 description the variable view dialog box consists of the following components: ? variable specification area ? variable value view area ? function buttons the function of each component is described below. (1) variable specification area the name of the variable selected in the source window is specified by default. to display another variable, enter the variable name using a keyboard. (2) variable value view area this area displays the value of the variable specified in the variable specification area. buttons closes the dialog box. chapter 5 debug windows variable window [view/setting window] 95 variable window view/setting window outline the variable window is used to display and modify the values of variables specified in the source window. this window can be opened in any of the following ways: ? in the main window, select browse v ariable... from the menu bar . ? in the main window, press the grph , b , and v keys , in this order. ? select a variable in the source window, then select view w atch variable... from the menu bar . ? select a variable in the source window, then press the grph , v , and w keys , in this order. ? select a variable in the source window, then click the button. window fig. 5-14 variable window chapter 5 debug windows variable window [view/setting window] 96 description the variable window is used to display and modify variables. each time a variable is specified, the variable is added to the display area of the window. when a variable already being displayed is specified, however, the variable is not added. this window can be set to view mode or modify mode. the variable window consists of the following components: ? menu bar ? function buttons ? variable name view area ? variable value view/setting area the function of each component is described below. (1) variable name view area this area displays the names of variables. a prefix "+" attached to a variable means that the variable is a pointer. double- clicking it displays the data pointed to by the variable in the variable value view/setting area and toggles the prefix to "-". (2) variable value view/setting area this area displays the values of variables. for a pointer type variable, the displayed value is an address or data item. chapter 5 debug windows variable window [view/setting window] 97 buttons switches the window to modify mode. this button can be clicked only in view mode. clicking this button enables variables to be modified. when the window is placed in modify mode, the window is highlighted and this button is disabled. to modify the value of a variable, click the current value of the variable to display a text cursor, then enter a new value using a keyboard. clicking the button writes the new value into the target device. switches the window to view mode. this button can be clicked only in modify mode. when the window is placed in view mode, the window is not highlighted any more and this button is disabled. writes the new value of a variable into the target device. cancels modification. clicking this button restores the initial values of variables which have been modified in modify mode. if the button has been clicked, modification before clicking the button is not canceled. removes a specified variable from the variable window. menu bar double-clicking the mouse button on an item of the menu bar opens the corresponding pull-down menu. (a) file file edit view operation open/save condition close open condition... save condition save file as... open/save condition loads or saves variable values. open condition opens the selected file for reference. the view file load dialog box is opened. save condition saves the contents of the window into a view file. save file as... saves the contents of the window into a view file. the view file save dialog box is opened. close closes the variable window. chapter 5 debug windows variable window [view/setting window] 98 (b) edit file edit view operation undo copy paste write in restore undo cancels the most recent editing. copy copies a selected character string into the clipboard buffer. paste pastes the contents of the clipboard buffer at the point to which the text cursor is positioned. write in writes the modified contents into the target device. restore cancels the modified contents. (c) view file edit view operation bin oct dec hex proper bin displays variable values in binary format. oct displays variable values in octal format. dec displays variable values in decimal format. hex displays variable values in hexadecimal format. proper displays variable values in default format for each variable. chapter 5 debug windows variable window [view/setting window] 99 (d) operation file edit view operation active hold tomodify toview delete active sets the variable window to the active state. hold sets the variable window to the hold state. tomodify sets the variable window to modify mode. toview sets the variable window to view mode. delete removes a specified variable from the variable window. chapter 5 debug windows add variable dialog box [auxiliary dialog box] 100 add variable dialog box auxiliary dialog box (modeless) outline the add variable dialog box is used to add variables to be displayed in the variable window. this dialog box can be opened in either of the following ways: ? in the main window, select view add vari able... from the menu bar . ? in the main window, press the grph , v , and i keys , in this order. window fig. 5-15 add variable window description the add variable dialog box consists of the following components: ? variable name specification area ? variable type selection area ? variable size specification area ? function buttons the function of each component is described below. chapter 5 debug windows add variable dialog box [auxiliary dialog box] 101 (1) variable name specification area this area is used to specify the name of a variable to be added. variable _fnc file#_fnc sfr sfrname fnc: function, variable name sfrname: sfr name file: file name prefix the variable name with an underscore (_). separate the file and variable names using a sharp (#). (2) variable type selection area select the language type of a variable specified in the variable name specification area. c language variable defined in c other variable defined in a language other than c (such as sfr or assembly variable) (3) variable size specification area specify the size and quantities of variables to be added. this area cannot be used if c is selected from the variable type selection area. a. size specify the size of a variable by selecting one of the following: byte word double word b. number specify the quantity of variables to be specified. buttons adds variables in the variable window. closes the add variable dialog box. chapter 5 debug windows local variable window [view/setting window] 102 local variable window view/setting window outline the local variable window is used to display and modify the values of local variables in the current function. this window can be opened in either of the following ways: ? in the main window, select browse l ocal variable... from the menu bar . ? in the main window, press the grph , b , and l keys , in this order. window fig. 5-16 local variable window description the local variable window is used to display and modify local variables. this window automatically displays the local variables in the current function. you cannot additionally display a variable. you can move, using the mouse, the boundary between the local variable name view area and local variable value view/setting area. positioning the mouse pointer to the boundary changes the pointer from to . then, drag & drop the boundary to the desired position. this window can be set to view mode or modify mode. chapter 5 debug windows local variable window [view/setting window] 103 the local variable window consists of the following components: ? local variable name view area ? local variable value view/setting area ? function buttons the function of each component is described below. (1) local variable name view area this area displays the names of local variables. a prefix "+" attached to a variable means that the variable is a pointer. double- clicking it displays the data pointed to by the variable in the local variable value view/setting area and toggles the prefix to "-". (2) local variable value view/setting area this area displays the values of local variables. for a pointer type variable, the displayed value is an address or data item. buttons switches the window to modify mode. this button can be clicked only in view mode. clicking this button enables variables to be modified. when the window is placed in modify mode, the window is highlighted and this button is disabled. to modify the value of a variable, click the current value of the variable to display a text cursor, then enter a new value using a keyboard. clicking the button writes the new value into the target device. switches the window to view mode. this button can be clicked only in modify mode. when the window is placed in view mode, the window is not highlighted any more and this button is disabled. writes the new value of a variable into the target device. cancels modification. clicking this button restores the initial values of variables which have been modified in modify mode. if the button has been clicked, modification before clicking the button is not canceled. chapter 5 debug windows local variable window [view/setting window] 104 removes a specified variable from the local variable window. icon the local variable window can be reduced to the following icon by clicking the button on the title bar: local variable chapter 5 debug windows addressing dialog box [specification dialog box] 105 addressing dialog box specification dialog box (modal) outline the addressing dialog box is used to specify the start address for memory view, disassemble view, or coverage view. this dialog box can be opened in any of the following ways: when the assemble window is the current window ? in the main window, select browse a ssemble... from the menu bar . ? in the main window, press the grph , b , and a keys , in this order. ? in the tool bar, click the button. when the memory window is the current window ? in the main window, select browse m emory... from the menu bar . ? in the main window, press the grph , b , and m keys , in this order. ? in the tool bar, click the button. when the coverage window is the current window ? in the main window, select browse c overage v iew... from the menu bar . ? in the main window, press the grph , b , c , and v keys in this order. chapter 5 debug windows addressing dialog box [specification dialog box] 106 window when the assemble window is a target of operation when the memory window is a target of operation when the coverage window is a target of operation fig. 5-17 addressing dialog box description the addressing dialog box is used to specify the view start address. the dialog box consists of the following components: ? address specification area ? function buttons the function of each component is described below. chapter 5 debug windows addressing dialog box [specification dialog box] 107 (1) address specification area specify the address. the current value of the pc is displayed by default. you can enter an address using a keyboard, as required. symbols can also be used to specify the address, as follows: function or variable _fnc file#_fnc (for static function or variable) line number in source text file:no fnc: function or variable name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). buttons starts memory view, disassemble view, or coverage view, from the specified address. resets the address to the default value. closes the addressing dialog box. opens the help window. chapter 5 debug windows assemble window [view/setting window] 108 assemble window view/setting window outline the assemble window is used to display the disassembled text of a program. you can also perform on-line assembly using this window. this window can be opened in any of the following ways: ? in the main window, select browse a ssemble... from the menu bar . ? in the main window, press the grph , b , and a keys , in this order. ? in the tool bar, click the button. the jump function can be used to display the assembly line from other windows. use of the jump function enables displaying of the target assembly line quickly. to use the jump function, select the pointer and follow the steps below. c select jump a ssemble... from the menu bar . d press the grph , j , and a keys , in this order. e press the ctrl +a keys . the following table lists jump functions. window pointer operation method c d e source window line number area { { { memory window address view area { { { trace view window trace result view area { { { coverage window address view area { { { stack window stack frame number view area { { { event manager event { { -- register window register { { -- chapter 5 debug windows assemble window [view/setting window] 109 window fig. 5-18 assemble window description the assemble window displays the disassembled text of a program and enables on-line assembly. this window can be set to view mode or modify mode. the assemble window consists of the following components: ? point mark area ? current pc mark area ? address view area ? label view area ? data view area ? mnemonic view/modification area ? function buttons the function of each component is described below. chapter 5 debug windows assemble window [view/setting window] 110 (1) point mark area the point mark area displays the event setting conditions. you can set or delete break points using this area. a. break point set/delete function you can set or delete break points by clicking this area, as listed in the table below. clicked location color clicked button operation on the b mark red or black left button deletes the break point. blue right button deletes the software break point. on a mark other than b or where no mark is indicated --- left button sets a break point. --- right button sets a software break point. b. event display function this area displays the setting condition of each type of events. when an execution event or access fetch event is set for an assembly line, the mark corresponding to the event type is displayed on the left of the assembly line. mark description e an event condition is set. l the final phase of an event link is set. b a break event is set. t a trace event is set. ti a timer event is set. s a snapshot event is set. u a stub event is set. a two or more events are set. (2) current pc mark area the current pc mark area displays a mark (>) indicating the current value in the program counter (pc). clicking this mark and holding the mouse button will display the content at the address indicated by the pc in a pop-up window. chapter 5 debug windows assemble window [view/setting window] 111 (3) address view area this area displays the disassembly start address. you can also perform the following five functions using this area: a. go & come function this function executes the user program up to the selected address. when the user program is being executed in this mode, currently set break events do not occur. this function is used as follows: 1. select the address up to which the program will be executed. 2. in the main window, select execute go & com e from the menu bar or press the grph , x , and m keys, in this order. b. break event set function this function sets an execution break event at the selected address. this function is used as follows: 1. select the address for which a break event will be set. 2. in the main window, select execute set b p from the menu bar or press the grph , x , and b keys, in this order. or, press the ctrl +b short cut keys. c. program counter set function this function sets the selected address in the program counter (pc). this function is used as follows: 1. select an address. 2. in the main window, select execute se t pc from the menu bar or press the grph , x , and e keys, in this order. chapter 5 debug windows assemble window [view/setting window] 112 d. jump function the jump function causes a jump to the source or memory window, with the selected address being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the source window): 1. select an address. 2. in the main window, select jump s ourcetext... from the menu bar or press the grph , j , and s keys, in this order. or, press the ctrl +u shortcut keys. e. window linkage function this function indicates the linkage between the disassembled text and other windows (source, memory, and trace view), using addresses. the addresses subject to linkage are displayed in reverse video. (4) label view area this area displays labels. (5) data view area this area displays mnemonic data. chapter 5 debug windows assemble window [view/setting window] 113 (6) mnemonic view/modification area this area displays the disassembled text. in modify mode, data in this area can be directly modified. note the following: if the mnemonic after modification is longer than the previous one, the mnemonic on the next line is corrupted. if the mnemonic after modification is shorter than the previous one, the mnemonic on the next line becomes invalid. buttons switches the window to modify mode. this button can be clicked only in view mode. clicking this button enables mnemonics to be modified. when the window is placed in modify mode, the window is highlighted and this button is disabled. to modify a mnemonic, click the mnemonic to display a text cursor, then enter a new mnemonic using a keyboard. clicking the button writes the new mnemonic into the target device. switches the window to view mode. this button can be clicked only in modify mode. when the window is placed in view mode, the window is not highlighted any more and this button is disabled. writes the new mnemonics into the target device. cancels modification. clicking this button restores the initial states of mnemonics which have been modified in modify mode. if the button has been clicked, modification before clicking the button is not canceled. sets a break point for the selected assembly line. opens the find dialog box to search the disassembled text for a mnemonic. when an event mark is set for the selected assembly line, opens the event manager to display details of the setting. when no mark is set, performs no operation. chapter 5 debug windows assemble window [view/setting window] 114 icon the assemble window can be reduced to the following icon by clicking the button on the title bar: assemble window chapter 5 debug windows memory window [view/setting window] 115 memory window view/setting window outline the memory window is used to display and modify the contents of memory. this window can be opened in any of the following ways: ? in the main window, select browse m emory... from the menu bar . ? in the main window, press the grph , b , and m keys , in this order. ? in the tool bar, click the button. the jump function can be used to display the memory contents from other windows. use of the jump function enables displaying of the target memory contents quickly. to use the jump function, select the pointer and follow the steps below. c select jump m emory... from the menu bar . d p ress the grph , j , and m keys , in this order. e press the ctrl +m keys . the following table lists jump functions. window pointer operation method c d e source window line number area { { { assemble window address view area { { { trace view window trace result view area { { { coverage window address view area { { { event manager event { { -- register window register { { -- chapter 5 debug windows memory window [view/setting window] 116 window without ascii view with ascii view fig. 5-19 memory window description the memory window displays the contents of memory and enables the modification of the contents. this window can be set to view mode or modify mode. the memory window consists of the following components: ? address view area ? memory view area ? ascii view area ? function buttons the function of each component is described below. chapter 5 debug windows memory window [view/setting window] 117 (1) address view area this area displays memory addresses. you can also perform the following two functions using this area: a. jump function the jump function causes a jump to the source or assemble window, with the selected address being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the source window): 1. select an address. 2. in the main window, select jump s ourcetext... from the menu bar or press the grph , j , and s keys, in this order. or, press the ctrl +u shortcut keys. b. window linkage function this function indicates the linkage between the memory contents and other windows (source, assemble, and trace view), using addresses. the addresses subject to linkage are displayed in reverse video. (2) memory view area this area displays the contents of memory. you can modify the contents in modify mode. chapter 5 debug windows memory window [view/setting window] 118 (3) ascii view area this area displays the contents of memory using ascii code. you can modify each ascii character to modify the corresponding memory contents in modify mode. selecting view m emory a scii from the menu bar toggles whether ascii code is displayed. buttons switches the window to modify mode. this button can be clicked only in view mode. clicking this button enables memory contents to be modified. when the window is placed in modify mode, the window is highlighted and this button is disabled. to modify the content at a memory location, click the memory location to display a text cursor, then enter a new content using a keyboard. clicking the button writes the new content into the target device. when ascii code is displayed in the ascii view area, memory contents can be modified using ascii code. switches the window to view mode. this button can be clicked only in modify mode. when the window is placed in view mode, the window is not highlighted any more and this button is disabled. writes the new memory contents into the target device. cancels modification. clicking this button restores the initial contents of the memory locations which have been modified in modify mode. if the button has been clicked, modification before clicking the button is not canceled. opens the find dialog box to search memory for a string. chapter 5 debug windows memory window [view/setting window] 119 icon the memory window can be reduced to the following icon by clicking the button on the title bar: memory window chapter 5 debug windows memory fill dialog box [auxiliary dialog box] 120 memory fill dialog box auxiliary dialog box (modal) outline the memory fill dialog box is used to initialize memory by filling it with specified code. this dialog box can be opened in either of the following ways when the current window is memory window: ? in the main window, select edit m emory memory f ill... from the menu bar . ? in the main window, press the grph , e , m , and f keys , in this order. window fig. 5-20 memory fill dialog box description the memory fill dialog box is used to initialize memory. the dialog box consists of the following components: ? address range specification area ? code specification area ? function buttons the function of each component is described below. chapter 5 debug windows memory fill dialog box [auxiliary dialog box] 121 (1) address range specification area specify the address range to be initialized in memory, as initialization start address -- initialization end address . (2) code specification area specify the code with which memory will be filled. a string of up to 16 bytes can be specified. buttons initializes memory. ignores any selections and resets the initial state. closes the memory fill dialog box. opens the help window. chapter 5 debug windows memory copy dialog box [auxiliary dialog box] 122 memory copy dialog box auxiliary dialog box (modal) outline the memory copy dialog box is used to copy the contents of memory from one location to another. this dialog box can be opened in either of the following ways when the current window is memory window: ? in the main window, select edit m emory memory c opy... from the menu bar . ? in the main window, press the grph , e , m , and c keys , in this order. window fig. 5-21 memory copy dialog box description the memory copy dialog box is used to copy the contents of memory from one location to another. the dialog box consists of the following components: ? address range specification area ? function buttons the function of each component is described below. chapter 5 debug windows memory copy dialog box [auxiliary dialog box] 123 (1) address range specification area specify the address range to be copied and the destination address to which the range will be copied. from: specify the address range to be copied, as copy start address -- copy end address . to: specify the destination address. buttons copies the specified contents of memory. ignores any selections and resets the initial state. closes the memory copy dialog box. opens the help window. chapter 5 debug windows memory compare dialog box [auxiliary dialog box] 124 memory compare dialog box auxiliary dialog box (modal) outline the memory compare dialog box is used to compare the contents of memory between specified locations. this dialog box can be opened in either of the following ways when the current window is memory window: ? in the main window, select edit m emory memory comp are... from the menu bar . ? in the main window, press the grph , e , m , and p keys , in this order. window fig. 5-22 memory compare dialog box description the memory compare dialog box is used to compare the contents of memory between specified locations. the dialog box consists of the following components: ? comparison range specification area ? function buttons the function of each component is described below. chapter 5 debug windows memory compare dialog box [auxiliary dialog box] 125 (1) comparison range specification area specify the address ranges to be compared. mem1: specify the source address range to be compared, as comparison start address -- comparison end address . mem2: specify the destination address range to be compared, as comparison start address -- comparison end address . buttons compares the contents of memory in the specified ranges. when no differences have been found during comparison, a confirmation dialog box appears. when a difference has been found during comparison, the memory compare result dialog box appears. the following is the confirmation dialog box which appears when no differences have been found: pressing the button ends memory comparison. ignores any selections and resets the initial state. closes the memory compare dialog box. opens the help window. chapter 5 debug windows memory compare result dialog box [view dialog box] 126 memory compare result dialog box view dialog box (modal) outline the memory compare result dialog box is used to display the results of memory comparison. this dialog box is displayed only when a difference has been found as a result of memory comparison performed in the memory compare dialog box. if no differences have been found, the confirmation dialog box is displayed, instead. window fig. 5-23 memory compare result dialog box description the memory compare result dialog box is used to display the results of memory comparison. the dialog box consists of the following components: ? comparison result view area ? address search specification area ? function buttons the function of each component is described below. chapter 5 debug windows memory compare result dialog box [view dialog box] 127 (1) comparison result view area this area displays the results of memory comparison. source addr this area displays those addresses in the source range which contain different values from those at the corresponding addresses in the destination range. double-clicking an address highlights the corresponding location in the memory window. memory this area displays the values which are different in the source and destination ranges. the values in the source range are displayed on the left. the values in the destination range are displayed on the right. destination addr this area displays those addresses in the destination range which contain different values from those at the corresponding addresses in the source range. double- clicking an address highlights the corresponding location in the memory window. (2) address search specification area you can search for an address whose content you want to view. if the specified address is found, the address and its contents are displayed in the comparison result view area. entering an address using an keyboard starts searching for the address (pressing the ? (return) key is not necessary). buttons closes the memory compare result dialog box. the address which has been specified in the search address: area is highlighted in the memory window. closes the memory compare result dialog box. chapter 5 debug windows stack window [view window] 128 stack window view window outline the stack window displays the stack contents for the current user program. this window can be opened in any of the following ways: ? in the main window, select browse stack trace... from the menu bar . ? in the main window, press the grph , b , and k keys , in this order. ? in the tool bar, click the button. window fig. 5-24 stack window description the stack window consists of the following components: ? stack frame number view area ? stack contents view area ? function buttons the function of each component is described below. chapter 5 debug windows stack window [view window] 129 (1) stack frame number view area the stack frame number view area displays the numbers assigned to the stack contents. stack frame numbers are integers starting from one and increase as the nesting level increases. when a function calls another function, the stack frame number of the called function is larger than that of the calling function by one. in addition to displaying stack frame numbers, this area can be used to perform the following function: a. jump function the jump function causes a jump to the source or assemble window, with the first address of the function having the selected stack frame number being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the source window): 1. select a stack frame number. 2. in the main window, select jump s ourcetext... from the menu bar or press the grph , j , and s keys, in this order. or, press the ctrl +u shortcut keys. (2) stack contents view area the stack contents view area displays the contents of the stack. each stack content is represented as "file-name#function-name(parameter)". the file name is separated from the function name with a sharp (#). buttons closes the stack window. chapter 5 debug windows stack window [view window] 130 icon the stack window can be reduced to the following icon by clicking the button on the title bar: stack window caution stack contents may not be correctly displayed for functions which do not push a frame pointer (rp5) into the stack (such as noauto and norec) or when the -qf option has been specified to optimize compilation. chapter 5 debug windows event set dialog box [setting dialog box] 131 event set dialog box setting dialog box (modeless) outline the event set dialog box is used to register and display event conditions. once the event conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse e vent e ventset... from the menu bar . ? in the main window, press the grph , b , e , and e keys , in this order. ? in the event manager, select operation e ventset... from the menu bar . ? in the event manager, press the grph , o , and e keys , in this order. window fig. 5-25 event set dialog box chapter 5 debug windows event set dialog box [setting dialog box] 132 description the event set dialog box is used to register and display event conditions. up to 32,767 event conditions can be registered. up to ten of these conditions can be simultaneously used as conditions for a break, timer, or tracer (three execution events and seven access events). a single event condition can be simultaneously used, for example, as a break, timer, trace, and event link condition. the event set dialog box consists of the following components: ? event name setting area ? address setting area ? status selection area ? data setting area ? external sense data setting area ? pass count setting area ? function buttons the function of each component is described below. (1) event name setting area this area is used to specify an event name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select an event name. you can also type in, using the keyboard, a new event name of up to eight characters. chapter 5 debug windows event set dialog box [setting dialog box] 133 (2) address setting area this area is used to specify address conditions. valid range: 0 address value 0xffffff address conditions consist of an address and a mask value for that address. set each value as follows: a. address enter addresses as lower address - upper address . either a single address or address range can be set, as follows: c setting a single address specify an address in the lower address field only. or, specify the same address in both the lower and upper address fields. a mask value can be specified. d setting an address range specify both the lower and upper addresses. no mask value can be specified. symbols can also be used to specify an address, as follows: function or variable _ fnc file #_ fnc (for static function or variable) sfr sfrname line number in source text file : no fnc: function or variable name sfrname: sfr name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). b. mask when a single address is specified, a mask value can be set for the address. the default is 0x00000000 (no mask). the logical or of the specified address and mask value is used as the address condition. example: when address 0x4000 - 0x4000 and mask 0xff are set addresses 0x4000 to 0x40ff satisfy the condition. when address 0x4000 - 0x4000 and mask 0x101 are set addresses 0x4000, 0x4001, 0x4100, and 0x4101 satisfy the condition. chapter 5 debug windows event set dialog box [setting dialog box] 134 (3) status selection area this area is used to select the status of the event to be set. selecting a status also determines whether the event is an execution or access event. the table below lists the statuses. status event type description run execution event program execution fetch program fetch (including pre-fetch) program read program data read program write program data write program r/w access event program data read/write macro read data read during a macro service macro write data write during a macro service macro r/w data read/write during a macro service program/macro read data read program/macro write data write program/macro r/w data read/write vect vector read by interrupts all(no condition) all accesses (4) data setting area this area is used to specify the data conditions. valid range: 0 data 0xffff data conditions consist of a data value and mask value for that data. set each value as follows: a. data enter a data value. symbols can also be used to specify a data value, as follows: function or variable _ fnc file #_ fnc (for static function or variable) sfr sfrname line number in source text file : no fnc: function or variable name sfrname: sfr name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). chapter 5 debug windows event set dialog box [setting dialog box] 135 b. mask a mask value can be set for the data value. the default is 0xffff (the data c ondition is ignored; all data satisfies the condition). the logical or of the specified data value and mask value is used as the data condition. example: when data 0x4000 and mask 0xff are set data values 0x4000 to 0x40ff satisfy the condition. when data 0x4000 and mask 0x101 are set data values 0x4000, 0x4001, 0x4100, and 0x4101 satisfy the condition. (5) external sense data setting area this area is used to specify the external sense data conditions. valid range: 0x0 external sense data 0xf each bit of the external sense data corresponds to the input pin level of an external sense clip of the emulation probe connected to the in-circuit emulator. the states of the bits can be used for an event condition. the table below lists the correspondence between the external sense clips and the bits of the external sense data. external sense clip number external sense data bit 8bit 3 7bit 2 6bit 1 5bit 0 to specify the high input level for an external sense clip for an event condition, set the corresponding bit to 1. to specify the low input level for an external sense clip for an event condition, set the corresponding bit to 0. external sense data conditions consist of an external data value (external field) and mask value for the data. set each value as follows: a. external enter an external sense data value. b. mask a mask value can be set for the external sense data value. the default is 0xf (the external sense data condition is ignored; all data satisfies the condition). the logical or of the specified external sense data value and mask value is used as the data condition. chapter 5 debug windows event set dialog box [setting dialog box] 136 (6) pass count setting area this area is used to specify the pass count condition. valid range: 1 pass count 0xffff the pass count specifies the number of times the conditions for the event (address condition, status condition, data condition, and external sense data condition) must be satisfied to recognize the occurrence of the event. when the pass count is set to 1, the occurrence of the event is recognized as soon as the conditions are satisfied. when the pass count is set to two or more, no more than two events can be enabled at the same time. buttons ignores any selections and restores the initial settings of a specified event condition. registers a specified event condition into the event manager (the registered conditions are displayed with a red e. mark). closes the event set dialog box. notes to set up an event for data access such as byte or word access, input the following data in the data field of the data setting area. data access value byte byte-size data such as '0' or '0x00' word word-size data such as '000' or '0x0000' example address: 0xfe00 status: read/write by program data: 0x12 access size: byte access address: 0xfe00 status: read/write by program data: 0x1 access size: word access chapter 5 debug windows event manager [management window] 137 event manager management window outline the event manager is used to display or delete events. this window is also used to assign each event condition, registered using the event set or event link dialog box, to a break, trace, snapshot, stub, or timer event. this window can be opened in any of the following ways: ? in the main window, select browse e vent eventm anager... from the menu bar . ? in the main window, press the grph , b , e , and m keys , in this order. ? select a line number for which an event is set in the source window, then select view event ? from the menu bar . ? select a line number for which an event is set in the source window, then click the button. ? select an address for which an event is set in the assemble window, then select view event ? from the menu bar . ? select an address for which an event is set in the assemble window, then click the button. chapter 5 debug windows event manager [management window] 138 window normal view detailed view fig. 5-26 event manager description the event manager is used to display or delete events. this window manages event conditions to facilitate the registering and setting of event conditions (as event link, break, trace, snapshot, stub, or timer event conditions). the event manager consists of the following components: ? menu bar ? event view area ? event detail view area the function of each component is described below. chapter 5 debug windows event manager [management window] 139 (1) event view area in normal view mode in detailed view mode the event view area displays the icons for the registered or set events. each icon consists of a mark indicating the type of the event and the event name. e. event01 mark event name the table below lists these marks. mark description event condition event link condition break event trace event timer event stub event snapshot event chapter 5 debug windows event manager [management window] 140 the color of the character within each mark indicates the type of the event and whether the event is registered or set. character color relevant marks description , registered event and event link conditions are always displayed in red. red , , , , the event is set. when the specified conditions are satisfied, the event is triggered. black , , , , the event is registered but not set. the event is not triggered even when the specified conditions are satisfied. blue software break event in addition to displaying event icons, this area can be used to perform the following two functions: a. jump function the jump function causes a jump to the source, assemble, or memory window, with the address condition for the selected icon being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the source window): 1. select an icon. 2. in the event manager, select jump s ourcetext... from the menu bar or press the grph , j , and s keys, in this order. or, press the ctrl +u shortcut keys. b. deletion function you can delete the settings for a specified event and cancel the registration of that event. event conditions ( ) and event link conditions ( ) can be deleted only when those conditions are not being used for other events ( , , , , or ). to delete an event or event link condition that is being used for another event, delete that event first. this function is used as follows: 1. select an icon. 2. in the event manager, select edit d elete... from the menu bar or press the grph , e , and d keys, in this order. chapter 5 debug windows event manager [management window] 141 (2) event detail view area the event detail view area is displayed only in detailed view mode. this area displays detailed information for each event icon. as the event conditions, the status condition, address condition, address mask condition, data condition, external data condition, and pass count condition are displayed, in this order, with the following headers: for event conditions header condition [s] status condition [a] address condition [m] address mask condition [d] data condition [e] external sense data condition [p] pass count condition for event link conditions header condition [p1] - [p4] event link condition in the n-th phase [d] disable condition for break, trace, timer, snapshot, or stub event conditions header condition [b] break condition [ss] sectional trace start condition [se] sectional trace end condition [q] qualified trace condition [s] timer start condition [e] timer end condition [sn] snapshot condition [su] stub condition [a] jump destination address upon the occurrence of a stub event chapter 5 debug windows event manager [management window] 142 menu bar (a) file file edit view operation jump open... save save as... print close open... loads an event setting file. the setting file select dialog box is opened (loading an event setting file deletes all previous registrations/settings.) save saves the current event settings into the event setting file, overwriting the previously saved settings. save as... saves the current event settings into a specified event setting file. the setting file select dialog box is opened. print prints the event registration/setting information. the print dialog box is opened. close closes the event manager. (b) edit file edit view operation jump undo copy all select delete undo cancels the most recent editing. copy copies a specified icon using a different name. all select selects all icons. delete deletes a specified icon. (c) view file edit view operation jump name kind detail name sorts the icons into event name order. chapter 5 debug windows event manager [management window] 143 kind sorts the icons into event type order. detail switches between normal view and detailed view. (d) operation file edit view operation jump breakset... timer... stubset... traceset... snapshottraceset... eventset... eventlinkset... breakset... opens the break dialog box. timer... opens the timer dialog box. stubset... opens the stub dialog box. traceset... opens the trace dialog box. snapshottraceset... opens the snap-shot dialog box. eventset... opens the event set dialog box. eventlinkset... opens the event link dialog box. (e) jump file edit view operation jump sourcetext... assemble... memory... sourcetext... sets the address set for the selected event as the jump address, and displays the source text and source line starting from that address: the source window is opened. assemble... sets the address set for the selected event as the jump address, and displays the disassembled text starting from that address: the assemble window is opened. memory... sets the address set for the selected event as the jump address, and displays the memory contents starting from that address: the memory window is opened. chapter 5 debug windows event manager [management window] 144 notes ? how to set events ? you can easily set break, trace, and timer events by using the event manager, as follows: c open the event set dialog box. (select browse e vent e ventset... from the menu bar .) d register event conditions. in this example, register two events event01 and event02. e open the event manager. (select browse e vent eventm anager... from the menu bar .) the event manager displays the two registered events, event01 and event02. f open the dialog box corresponding to the type of the event to be set (trace, break, timer, event link, snap-shot, or stub dialog box). in this example, open the break dialog box. (select browse b reakset... from the menu bar or click the button.) g select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - event01 h drag the icon into the break dialog box. once the mouse pointer has been dragged into the break dialog box, it changes from - to ok . dropping the icon in the break dialog box copies the icon into the dialog box. i to register the event condition for a break event, enter a break event name, then click the button. chapter 5 debug windows event manager [management window] 145 - - drag the icon. drop the icon. ok - fig. 5-27 event setting ? event window relationship ? the event manager manages all events. the relationship between event windows is shown below. register events manage events set events fig. 5-28 event window relationship chapter 5 debug windows event link dialog box [setting dialog box] 146 event link dialog box setting dialog box (modeless) outline the event link dialog box is used to register and display event link conditions. once the event link conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse e vent eventl inkset... from the menu bar . ? in the main window, press the grph , b , e , and l keys , in this order. ? in the event manager, select operation eventl ink... from the menu bar . ? in the event manager, press the grph , o , and l keys , in this order. window fig. 5-29 event link dialog box chapter 5 debug windows event link dialog box [setting dialog box] 147 description the event link dialog box is used to register and display event link conditions. event link conditions are created by linking event conditions registered in the event manager. up to four events can be used to define an event link condition. the pass count for an event condition used as an event link condition must be one. event conditions having a pass count of two or more cannot be used as an event link condition. when an event link condition is set, the occurrence of the event is assumed only when the user program has executed the specified operations (event conditions) in the specified sequence. if a disable condition is satisfied part-way through the sequence, however, the event conditions satisfied up to that point are canceled and the first event condition is to be detected. up to 32,768 event link conditions can be registered. up to two of these conditions can be simultaneously used as conditions for a break, timer, trace, snapshot, or stub event. the event link dialog box consists of the following components: ? event link name setting area ? pass count setting area ? link condition setting area ? disable condition setting area ? function buttons the function of each component is described below. (1) event link name setting area this area is used to specify an event link name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select an event link name. you can also type in, using the keyboard, a new event link name of up to eight characters . chapter 5 debug windows event link dialog box [setting dialog box] 148 (2) pass count setting area this area is used to specify the pass count condition. valid range: 1 pass count 0xffff the pass count specifies the number of times the event link conditions must be satisfied to recognize the occurrence of the event. when the pass count is set to 1, the occurrence of the event is recognized as soon as the conditions are satisfied. when the pass count is set to two or more, no more than two event links can be enabled at the same time. (3) link condition setting area this area is used to specify the event conditions to be linked and the order in which they are detected. the specified event conditions are detected in the order of phase 1 phase 2 phase 3 phase 4 . it is not necessary to specify an event for every phase. the occurrence of the event is recognized upon the detection of the entire event sequence specified in this area. a combined total of up to ten event conditions can be specified in the link condition and disable condition setting areas. (4) disable condition setting area this area is used to specify disable conditions. when a disable condition is detected, the event conditions satisfied up to that point are canceled. a combined total of up to ten event conditions can be specified in the link condition and disable condition setting areas. chapter 5 debug windows event link dialog box [setting dialog box] 149 buttons ignores any selections and restores the initial settings of a specified event link condition. registers a specified event link condition into the event manager (the registered conditions are displayed with a red l. mark). closes the event link dialog box. chapter 5 debug windows event link dialog box [setting dialog box] 150 notes ? how to set event link conditions ? the following is an example of setting event link conditions: c open the event set dialog box. (select browse e vent e ventset... from the menu bar .) d register event conditions in the event set dialog box. in this example, register e_init, e_sub0, e_sub1, e_sub2, e_sub3, e_sub4, and e_nmi. e open the event manager. (select browse e vent eventm anager... from the menu bar .) f open the event link dialog box. (select browse e vent eventl inkset... from the menu bar .) g select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - e_init h drag the icon into the event link dialog box. once the mouse pointer has been dragged into the event link dialog box, it changes from - to ok . dropping the icon in the event link dialog box copies the icon into the dialog box. i by repeating steps g and h , set the events from the event manager in the event link dialog box as follows: location events phase 1 e_init phase 2 e_sub0 phase 3 e_sub1,e_sub2 phase 4 e_sub4 disable e_sub3,e_nmi j enter an event link name. in this example, enter e_link. k pressing the button registers the e_link event link condition into the event manager. chapter 5 debug windows event link dialog box [setting dialog box] 151 specify the event conditions in the event set dialog box. the event manager manages the event conditions specified in the event set dialog box. drag & drop event icons to specify event link conditions. - ok fig. 5-30 setting event link conditions chapter 5 debug windows event link dialog box [setting dialog box] 152 ? application example of event link conditions ? an application example of event link conditions is described below. in this example, event link conditions are set for the program shown in figure 5-30. the program consists of the following processing: main processing 1. initialization (init) 2. subprogram 0 (sub0) 3. conditional branch a. subprogram 1 (sub1) b. subprogram 2 (sub2) c. subprogram 3 (sub3) 4. subprogram 4 (sub4) interrupt handling interrupt handling routine (nmi) this program may be executed according to sequence c , d , or e , as shown in the figure. an interrupt (nmi) may occur during each sequence. to generate an event only when the program is executed in sequence c or d with no interrupt (nmi), set the event conditions as shown in the figure and the event link conditions as follows: location events phase 1 e_init phase 2 e_sub0 phase 3 e_sub1,e_sub2 phase 4 e_sub4 disable e_sub3,e_nmi chapter 5 debug windows event link dialog box [setting dialog box] 153 initialization condition sub0 end nmi handling return sub4 sub1 sub2 sub3 interrupt main processing interrupt handling start 1 2 3 fig. 5-31 application example of event link conditions chapter 5 debug windows break dialog box [setting dialog box] 154 break dialog box setting dialog box (modeless) outline the break dialog box is used to register, set, and display break event conditions. once the break event conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse b reakset... from the menu bar . ? in the main window, press the grph , b , and b keys , in this order. ? in the tool bar, click the button. ? in the event manager, select operation b reakset... from the menu bar . ? in the event manager, press the grph , o , and b keys , in this order. window fig. 5-32 break dialog box description the break dialog box is used to register, set, and display break event conditions. break event conditions are registered by using event conditions and event link conditions registered in the event manager. up to 32,767 break event conditions can be registered. up to twelve of these conditions can be simultaneously enabled. chapter 5 debug windows break dialog box [setting dialog box] 155 the break dialog box consists of the following components: ? break event name setting area ? break condition setting area ? function buttons the function of each component is described below. (1) break event name setting area this area is used to specify a break event name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select a break event name. you can also type in, using the keyboard, a new break event name of up to eight characters. (2) break condition setting area this area is used to specify break event conditions. to specify a condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. a total of up to twelve event and event link conditions can be specified in this area. buttons enables a specified break event condition (a break event occurs when that condition is satisfied). clicking this button changes the color of the mark to red. ignores any selections and restores the initial settings of a specified break event condition. registers a specified break event condition into the event manager. a break event condition is not enabled by merely registering it. disables a specified break event condition (a break event does not occur when that condition is satisfied). clicking this button changes the color of the mark to black. closes the break dialog box. chapter 5 debug windows break dialog box [setting dialog box] 156 note ? how to set break event conditions ? the following is an example of setting break event conditions: c open the event set dialog box. (select browse e vent e ventset... from the menu bar .) d register event conditions in the event set dialog box. in this example, register two events event01 and event02. e open the event manager. (select browse e vent eventm anager... from the menu bar .) f open the break dialog box. (select browse b reakset... from the menu bar .) g select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - event01 h drag the icon into the break dialog box. once the mouse pointer has been dragged into the break dialog box, it changes from - to ok . dropping the icon in the break dialog box copies the icon into the dialog box. i enter a break event name. in this example, enter break. j pressing the button registers the break break event condition into the event manager. k pressing the button changes the mark color of the break break event condition from black to red, indicating the break event is enabled. chapter 5 debug windows break dialog box [setting dialog box] 157 drag & drop event icons to specify break event conditions. - ok fig. 5-33 setting break event conditions chapter 5 debug windows trace dialog box [setting dialog box] 158 trace dialog box setting dialog box (modeless) outline the trace dialog box is used to register, set, and display trace event conditions. once the trace event conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse trac e t raceset... from the menu bar . ? in the main window, press the grph , b , c , and t keys , in this order. ? in the tool bar, click the button. ? in the event manager, select operation t raceset... from the menu bar . ? in the event manager, press the grph , o , and t keys , in this order. window fig. 5-34 trace dialog box chapter 5 debug windows trace dialog box [setting dialog box] 159 description the trace dialog box is used to register, set, and display trace event conditions. trace event conditions are registered by using event conditions and event link conditions registered in the event manager. up to 32,767 trace event conditions can be registered. only one of these conditions can be simultaneously enabled. to operate the tracer according to the specified trace event condition, select execute cond. trace on from the menu bar of the main window. the trace dialog box consists of the following components: ? trace event name setting area ? trace mode setting area ? delay count setting area ? sectional trace condition setting area ? qualified trace condition setting area ? function buttons the function of each component is described below. (1) trace event name setting area this area is used to specify a trace event name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select a trace event name. you can also type in, using the keyboard, a new trace event name of up to eight characters. chapter 5 debug windows trace dialog box [setting dialog box] 160 (2) trace mode setting area this area is used to specify the trace mode. there are three trace modes, all trace, sectional trace, and qualified trace. trace mode description all trace traces all sources. sectional trace traces only in a range specified with event conditions. qualified trace traces only when a specified event condition is satisfied. to specify each trace mode, the relevant item (under execute ) on the menu bar of the main window must also be set. the table below lists the combination of settings to specify each trace mode. trace mode setting for execute on the menu bar of the main window trace mode setting in trace dialog box delay condition all trace uncond. trace on ---- no all yes sectional trace cond. trace on section yes qualified trace qualify yes no trace trace off ---- ---- (3) delay count setting area this area is used to specify the delay count. valid range: 0 delay count 65535 when a delay count is set, the detection of a delay event causes the tracer to trace source lines or instructions as many as the delay count, then stop. when the delay count is set to 0, no delay event is detected. the following events are used as a delay event depending on the trace mode: trace mode delay event all trace event condition specified in the all trace condition setting area sectional trace event conditions specified for section end in the sectional trace condition setting area qualified trace event condition specified in the qualified trace condition setting area chapter 5 debug windows trace dialog box [setting dialog box] 161 (4) sectional trace condition setting area this area is used to specify the event conditions for sectional trace. section start : specifies the trace start event condition. section end : specifies the trace end event condition. to specify an event condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. a total of up to twelve event and event link conditions can be specified in this area. (5) qualified trace condition setting area this area is used to specify the event condition for qualified trace. to specify an event condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. a total of up to twelve event and event link conditions can be specified in this area. (6) all trace condition setting area this area is used to specify the delay event condition for all trace. to specify an event condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. a total up to twelve event and event link conditions can be specified in this area. chapter 5 debug windows trace dialog box [setting dialog box] 162 buttons enables a specified trace event condition (a trace event occurs when that condition is satisfied). clicking this button changes the color of the mark to red. ignores any selections and restores the initial settings of a specified trace event condition. registers a specified trace event condition into the event manager. a trace event condition is not enabled by merely registering it. disables a specified trace event condition (a trace event does not occur when that condition is satisfied). clicking this button changes the color of the mark to black. closes the trace dialog box. chapter 5 debug windows trace dialog box [setting dialog box] 163 note ? how to set trace event conditions ? the following is an example of setting trace event conditions: c select execute cond . trace on from the menu bar of the main window. d open the event set dialog box. (select browse e vent e ventset... from the menu bar .) e register event conditions in the event set dialog box. in this example, register two events event01 and event02. f open the event manager. (select browse e vent eventm anager... from the menu bar .) g open the trace dialog box. (select browse trac e t raceset... from the menu bar .) h specify the trace mode and delay count. i select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - event01 j drag the icon into the trace dialog box. once the mouse pointer has been dragged into the trace dialog box, it changes from - to ok . dropping the icon in the trace dialog box copies the icon into the dialog box. k enter a trace event name. in this example, enter trace. l pressing the button registers the trace trace event condition into the event manager. pressing the button changes the mark color of the trace trace event condition from black to red, indicating the trace event is enabled. 11 chapter 5 debug windows trace dialog box [setting dialog box] 164 drag & drop event icons to specify trace event conditions. - ok fig. 5-35 setting trace event conditions chapter 5 debug windows snap-shot dialog box [setting dialog box] 165 snap-shot dialog box setting dialog box (modeless) outline the snap-shot dialog box is used to register, set, and display snapshot event conditions. once the snapshot event conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse trac e sn apshottraceset... from the menu bar . ? in the main window, press the grph , b , c , and n keys , in this order. ? in the event manager, select operation sn apshottraceset... from the menu bar . ? in the event manager, press the grph , o , and n keys , in this order. window fig. 5-36 snap-shot dialog box chapter 5 debug windows snap-shot dialog box [setting dialog box] 166 description the snap-shot dialog box is used to register, set, and display snapshot event conditions. snapshot event conditions registered by using event conditions and event link conditions registered in the event manager. up to 32,767 snapshot event conditions can be registered. only one of these conditions can be simultaneously enabled. the snap-shot dialog box consists of the following components: ? snapshot event name setting area ? snapshot event condition setting area ? snapshot data selection area ? register bank setting area ? register & sfr data setting area ? memory data setting area ? snapshot data view area ? function buttons the function of each component is described below. (1) snapshot event name setting area this area is used to specify a snapshot event name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select a snapshot event name. you can also type in, using the keyboard, a new snapshot event name of up to eight characters. (2) snapshot event condition setting area this area is used to specify a snapshot event condition. to specify an event condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. only one event or event link condition can be specified in this area. chapter 5 debug windows snap-shot dialog box [setting dialog box] 167 (3) snapshot data selection area this area is used to select the type of data to be subject to snapshot, from the following three types: type description register enables the registration of register data (general-purpose and control registers). a register can be selected using the register bank setting area and register & sfr data setting area. sfr enables the registration of sfr data. an sfr can be selected using the register & sfr data setting area. memory enables the registration of memory data. an address range and access size can be selected using the memory data setting area. (4) register bank setting area this area is used to specify the bank number of the register to be subject to snapshot. when current is specified, the current bank register upon a break is subject to snapshot. this area is enabled only when register is selected in the snapshot data selection area. (5) r egister & sfr data setting area the contents of the drop-down list displayed in this area vary with whether register or sfr is selected in the snapshot data selection area. when register is selected this area is used to select a register. clicking the button displays a drop-down list, from which you can select a register. when sfr is selected this area is used to select an sfr. clicking the button displays a drop-down list, from which you can select an sfr. chapter 5 debug windows snap-shot dialog box [setting dialog box] 168 (6) memory data setting area this area is used to specify the address range and access size for memory data to be subject to snapshot. this area is enabled only when memory is selected in the snapshot data selection area. specify an address range and access size as follows: item description address specify an address range as start address -- end address . address-size select an access size from the following: 1 b yte 2 bytes 4 bytes 8 by tes symbols can also be used to specify an address, as follows: function or variable _ fnc file #_ fnc (for static function or variable) line number in source text file : no fnc: function or variable name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). chapter 5 debug windows snap-shot dialog box [setting dialog box] 169 (7) snapshot data view area this area lists the registered snapshot data. a total of up to 16 data items can be registered for snapshot, including register, sfr, and memory data. the registered snapshot data items are written into the tracer upon the detection of a snapshot event. to register a snapshot data item, make necessary settings then click the button. to delete a snapshot data item, select a data item to be deleted then click the button. buttons enables a specified snapshot event condition. the color of the mark changes to red. ignores any selections and restores the initial settings. registers a specified snapshot event into the event manager. disables a specified snapshot event condition. the color of the mark changes to black. closes the snap-shot dialog box. registers snapshot data. deletes a specified snapshot data item from the entry area. chapter 5 debug windows snap-shot dialog box [setting dialog box] 170 note ? how to set snapshot event conditions ? the following is an example of setting snapshot event conditions: c open the event set dialog box. (select browse e vent e ventset... from the menu bar .) d register event conditions in the event set dialog box. in this example, register event01. e open the event manager. (select browse e vent eventm anager... from the menu bar .) f open the snap-shot dialog box. (select browse trac e sn apshottraceset... from the menu bar .) g register snapshot data. h select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - event01 i drag the icon into the snap-shot dialog box. once the mouse pointer has been dragged into the snap-shot dialog box, it changes from - to ok . dropping the icon in the snap-shot dialog box copies the icon into the dialog box. j enter a snapshot event name. in this example, enter snap. k pressing the button registers the snap snapshot event condition into the event manager. l pressing the button changes the mark color of the snap snapshot event condition from black to red, indicating the snapshot event is enabled. chapter 5 debug windows snap-shot dialog box [setting dialog box] 171 drag & drop event icons to specify snapshot event conditions. - ok fig. 5-37 setting snapshot event conditions chapter 5 debug windows stub dialog box [setting dialog box] 172 stub dialog box setting dialog box (modeless) outline the stub dialog box is used to register, set, and display stub event conditions. once the stub event conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse stu b set... from the menu bar . ? in the main window, press the grph , b , and u keys , in this order. ? in the event manager, select operation stu b set... from the menu bar . ? in the event manager, press the grph , o , and u keys , in this order. window fig. 5-38 stub dialog box description the stub dialog box is used to register, set, and display stub event conditions. stub event conditions are registered by using event conditions and event link conditions registered in the event manager. up to 32,767 stub event conditions can be registered. only one of these conditions can be simultaneously enabled. chapter 5 debug windows stub dialog box [setting dialog box] 173 the stub dialog box consists of the following components: ? stub event name setting area ? stub event condition setting area ? jump destination address setting area ? function buttons the function of each component is described below. (1) stub event name setting area this area is used to specify a stub event name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select a stub event name. you can also type in, using the keyboard, a new stub event name of up to eight characters. (2) stub event condition setting area this area is used to specify a stub event condition. to specify an event condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. only one event or event link condition can be specified in this area. (3) jump destination address setting area this area is used to specify the first address of the function to be executed upon the detection of a stub event. specify a function which ends with a ret instruction. chapter 5 debug windows stub dialog box [setting dialog box] 174 symbols can also be used to specify the first address of a function, as follows: function or variable _ fnc file #_ fnc (for static function or variable) line number in source text file : no fnc: function or variable name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). buttons enables a specified stub event condition. the color of the mark changes to red. when that condition is satisfied, the function starting from the address specified in the goto: area is executed. ignores any selections and restores the initial settings of a specified stub event condition. registers a specified stub event condition into the event manager. disables a specified stub event condition. the color of the mark changes to black. a stub event does not occur when that condition is satisfied. closes the stub dialog box. note ? how to set stub event conditions ? the following is an example of setting stub event conditions: c open the event set dialog box. (select browse e vent e ventset... from the menu bar .) d register event conditions in the event set dialog box. in this example, register event01. e open the event manager. (select browse e vent eventm anager... from the menu bar .) f open the stub dialog box. (select browse stu b set... from the menu bar .) chapter 5 debug windows stub dialog box [setting dialog box] 175 g specify the jump destination address for a function. h select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - event01 i drag the icon into the stub dialog box. once the mouse pointer has been dragged into the stub dialog box, it changes from - to ok . dropping the icon in the stub dialog box copies the icon into the dialog box. j enter a stub event name. in this example, enter stub. k pressing the button registers the stub stub event condition into the event manager. l pressing the button changes the mark color of the stub stub event condition from black to red, indicating the stub event is enabled. drag & drop event icons to specify stub event conditions. - ok fig. 5-39 setting stub event conditions chapter 5 debug windows timer dialog box [view/setting dialog box] 176 timer dialog box view/setting dialog box (modeless) outline the timer dialog box is used to display the results of execution time measurement, and register and set timer event conditions. once the timer event conditions have been set using this dialog box, they are automatically registered into the event manager. this dialog box can be opened in any of the following ways: ? in the main window, select browse ti mer... from the menu bar . ? in the main window, press the grph , b , and i keys , in this order. ? in the tool bar, click the button. ? in the event manager, select operation ti mer... from the menu bar . ? in the event manager, press the grph , o , and i keys , in this order. window fig. 5-40 timer dialog box chapter 5 debug windows timer dialog box [view/setting dialog box] 177 description the timer dialog box is used to display the results of execution time measurement, and register and set timer event conditions. selecting a set timer event displays the results of the execution time measurement triggered by that event. timer event conditions are registered by using event conditions and event link conditions registered in the event manager. up to 32,767 timer event conditions can be registered. up to three of these conditions can be simultaneously enabled. when less than three timer event conditions are enabled, the time between the start of program execution and a break can also be displayed, by selecting run-break from the timer event name setting area. the timer dialog box consists of the following components: ? timer event name setting area ? timer event condition setting area ? measurement mode selection area ? execution time view area ? average execution time view area ? function buttons the function of each component is described below. (1) timer event name setting area this area is used to specify a timer event name. when the dialog box is opened, **new** is displayed. clicking the button displays a drop-down list, from which you can select a timer event name. timer event name "run-break", which displays the time between the start of program execution and a break, is already registered in the list (but not displayed within the event manager). you can also type in, using the keyboard, a new timer event name of up to eight characters. chapter 5 debug windows timer dialog box [view/setting dialog box] 178 (2) timer event condition setting area this area is used to specify timer event conditions. start event : specifies the event condition for starting timer measurement. end event : specifies the event condition for ending timer measurement. to specify an event condition, drag & drop the icon for a desired event or event link condition from the event manager into this area. only one event or event link condition can be specified for each of the start and end events. (3) measurement mode selection area this area is used to select the time measurement mode from the following: max time : maximum execution time mode. in this mode, the longest time required for unit processing between the start and end event conditions is measured. min time : minimum execution time mode. in this mode, the shortest time required for unit processing between the start and end event conditions is measured. (4) execution time view area this area displays the results of program execution time measurement. up to approximately 14 minutes and 18 seconds can be measured. in addition to the total execution time between the specified start and end event conditions, the maximum or minimum execution time between the conditions is measured at the same time. execution time description run time displays the total execution time. max time displays the maximum execution time (only when max time is selected in the measurement mode selection area). min time displays the minimum execution time (only when min time is selected in the measurement mode selection area). chapter 5 debug windows timer dialog box [view/setting dialog box] 179 (5) average execution time view area this area displays the average execution time required for unit processing and the number of times unit processing has been executed. item description run time displays the average execution time. pass count displays the number of times unit processing has been executed. valid range: 0 number 65535 buttons enables a specified timer event condition (a timer event occurs when that condition is satisfied). clicking this button changes the color of the mark to red. ignores any selections and restores the initial settings of a specified timer event condition. registers a specified timer event condition into the event manager. a timer event condition is not enabled by merely registering it. disables a specified timer event condition (a timer event does not occur when that condition is satisfied). clicking this button changes the color of the mark to black. initializes the timer. closes the timer dialog box. caution when measured execution time has exceeded the maximum measurable time (14 minutes and 18 seconds), selecting the relevant timer event name displays message "result of timer measurement is over." to indicate that measurement has failed. chapter 5 debug windows timer dialog box [view/setting dialog box] 180 note ? how to set timer event conditions ? the following is an example of setting timer event conditions: c open the event set dialog box. (select browse e vent e ventset... from the menu bar .) d register event conditions in the event set dialog box. in this example, register two events event01 and event02. e open the event manager. (select browse e vent eventm anager... from the menu bar .) f open the timer dialog box. (select browse ti mer... from the menu bar .) g select the icon for the event condition to be used, in the event manager. position the mouse pointer to the icon, press the mouse button then, keeping the mouse button held down, move the mouse. the mouse pointer changes from to - . as the mouse is moved, so too does the icon. - event01 h drag the icon into the timer dialog box. once the mouse pointer has been dragged into the timer dialog box, it changes from - to ok . dropping the icon in the timer dialog box copies the icon into the dialog box. i enter a timer event name. in this example, enter timer. j pressing the button registers the timer timer event condition into the event manager. k pressing the button changes the mark color of the timer timer event condition from black to red, indicating the timer event is enabled. chapter 5 debug windows timer dialog box [view/setting dialog box] 181 drag & drop event icons to specify timer event conditions. - ok fig. 5-41 setting timer event conditions chapter 5 debug windows trace view window [view window] 182 trace view window view window outline the trace view window is used to display trace results. this window can be opened in any of the following ways: ? in the main window, select browse trac e tracev iew... from the menu bar . ? in the main window, press the grph , b , c , and v keys , in this order. ? in the tool bar, click the button. window fig. 5-42 trace view window description the trace view window displays trace results. the tracer has a capacity of 32,768 frames and is of a ring structure. if the amount of data to be written is more than 32,768 frames, the oldest data is overwritten. in the window, frame numbers are assigned sequentially, with frame 0 being assigned to the oldest data item. chapter 5 debug windows trace view window [view window] 183 block information is written to the tracer at breaks of user program execution. block information is represented by a horizontal line displayed in each area. block information is written when the preceding and current execution modes are as follows: mode of most recent execution current execution mode real-time execution real-time execution step execution step execution real-time execution step execution by changing the execution address the trace view window consists of the following components: ? point mark area ? trace mode view area ? trace result view area the function of each component is described below. (1) point mark area this area displays the setting condition of each type of events. when an execution event or access fetch event is set for a trace address, the mark corresponding to the event type is displayed on the left of the trace address. mark description e an event condition is set. l the final phase of an event link is set. b a break event is set. t a trace event is set. ti a timer event is set. s a snapshot event is set. u a stub event is set. a two or more events are set. chapter 5 debug windows trace view window [view window] 184 (2) trace mode view area the trace mode view area displays trace modes. a: overall trace or sectional trace q: qualified trace s: step execution trace (3) trace result view area 1 2 3 4 5 6 7 the trace result view area displays trace results. selecting this area enables the jump and window linkage functions to be used. the window linkage function is used as follows: 1. select the window to be linked among the items displayed by selecting operation window connect from the menu bar of the main window. item under window connect window to be linked sourcetext source window assemble assemble window memory memory window 2. open the window selected in step 1 and the trace view window. 3. select a trace address in the trace result view area of the trace view window, using the mouse. 4. the contents of the location identified by the address selected in step 3 are displayed in reverse video in the view area of the window selected in step 1. the window linkage function differs from the jump function in that scrolling the view area in the trace view window also scrolls the view area in the linked window accordingly. chapter 5 debug windows trace view window [view window] 185 the trace result view area displays the following information: c trace frame number d time tag e fetch access result f data access result g external sense data h branch destination address i mnemonics a. trace frame number (frame) the trace frame number field displays trace frame numbers. valid range: 0 trace frame number 32,767 to display trace frame numbers, choose from the items displayed by selecting view trace view f rame from the menu bar of the main window. b. time tag (time) the time tag field displays the number of clock pulses taken by the target chip between the start of the execution of the immediately preceding trace address and the start of the execution of the current trace address. measurement range: 1 cpu clock rate 0xffffff to display time tags, choose from the items displayed by selecting view t race view timetag from the menu bar of the main window. c. fetch access result (address data statu) the fetch access result field displays program fetch results and snapshot data. this field displays the following information depending on the fetch status displayed in the statu field: statu information displayed brm1 fetch of the first byte of the first instruction encountered after a branch m1 program fetch results fetch of the first byte of an instruction op operation code fetch if invalid fetch snap snapshot data others none for program fetch results, the following information is displayed: address fetch address data fetch data chapter 5 debug windows trace view window [view window] 186 to display fetch access results, choose from the following items in the menu bar of the main window. item selection method for fetch addresses choose from the items displayed by selecting view t race view instruction fetch address. for fetch data choose from the items displayed by selecting view t race view instruction fetch data. for fetch statuses choose from the items displayed by selecting view t race view instruction fetch status. for snapshot data, the following information is displayed: item snapshot type information displayed register register name address sfr sfr name memory memory address register register value data sfr sfr value memory memory contents d. data access result (address data statu) the data access result field displays data access results. statu information displayed vect vector read rwp data read or write by a user program rp data read by a user program wp data write by a user program rwm data read or write by a macro service rm data read by a macro service wm data write by a macro service address address data data to display data access results, choose from the following items in the menu bar of the main window. item selection method for addresses choose from the items displayed by selecting view t race view memory access address . for data choose from the items displayed by selecting view t race view memory access data. for statuses choose from the items displayed by selecting view t race view memory access status. chapter 5 debug windows trace view window [view window] 187 e. external sense data (ext p) the external sense data field displays the input level of the external sense clips when a trace was performed. each bit is assigned as follows: external sense data external sense clip number bit 7 no. 8 bit 6 no. 7 bit 5 no. 6 bit 4 no. 5 bit 3 no. 4 bit 2 no. 3 bit 1 no. 2 bit 0 no. 1 to display external sense data, choose from the items displayed by selecting view trace view e xternal probe from the menu bar of the main window. f. branch destination address (jmpadd) the branch destination address field displays the last address of a branch destination. this information is displayed only when the fetch status is brm1 . to display a branch destination address, choose from the items displayed by selecting view trace view j ump address from the menu bar of the main window. g. mnemonics (disasm) the mnemonics field displays disassembly results. this information is displayed only when the fetch status is brm1 or m1 . to display mnemonics, choose from the items displayed by selecting view t race view disassemble from the menu bar of the main window. icon the trace view window can be reduced to the following icon by clicking the button on the title bar: trace view chapter 5 debug windows trace pick-up dialog box [specification dialog box] 188 trace pick-up dialog box specification dialog box (modal) outline the trace pick-up dialog box is used to specify conditions for displaying trace results in the trace view window. this dialog box can be opened in either of the following ways when the current window is the trace view window: ? in the main window, select view t race view p ick up... from the menu bar . ? in the main window, press the grph , v , t , and p keys , in this order. window fig. 5-43 trace pick-up dialog box chapter 5 debug windows trace pick-up dialog box [specification dialog box] 189 description the trace pick-up dialog box is used to specify conditions for displaying trace results in the trace view window. the trace pick-up dialog box consists of the following components: ? address condition specification area ? data condition specification area ? status condition specification area ? external sense data condition specification area ? displayed-frame condition selection area ? function buttons the function of each component is described below. (1) address condition specification area use the address condition specification area to specify an address value as a pick-up condition. specify an address specification mode, address value, and address mask value. the address value and address mask value to be specified must be in the range of 0 to 0x ffff. accepted address values vary with the specified mode as follows: mode input data source mode variable name, function name, or line number instruction mode immediate address or symbolic name (2) data condition specification area use the data condition specification area to specify a data value as a pick-up condition. specify a data value, data mask value, and data size. the data value and data mask value to be specified must be in the range of 0 to 0x ffff. accepted data sizes are listed below. data size meaning all size perform retrieval for any data size. byte retrieve only frames accessed in bytes. word retrieve only frames accessed in words. chapter 5 debug windows trace pick-up dialog box [specification dialog box] 190 (3) status condition specification area use the status condition specification area to specify the status as a pick-up condition. accepted status conditions are listed below. status condition meaning all status pick up all frames. brm1 pick up only the first frame for which an m1 fetch operation was performed after program control branched. m1 pick up only the frames for which an m1 fetch operation was performed. op pick up only the frames for which a fetch operation was performed. r pick up only the frames for which a read operation was performed. rm pick up only the frames for which a read operation was performed in macro service processing. rp pick up only the frames for which a read operation was performed in a user program. rw pick up only the frames for which a read or write operation was performed. rwm pick up only the frames for which a read or write operation was performed in macro service processing. rwp pick up only the frames for which a read or write operation was performed in a user program. vect pick up only the frames for which a vector read operation was performed. w pick up only the frames for which a write operation was performed. wm pick up only the frames for which a write operation was performed in macro service processing. wp pick up only the frames for which a write operation was performed in a user program. (4) external sense data condition specification area use the external sense data condition specification area to specify an external sense data value as a pick-up condition. specify a data value and data mask value. the data value and data mask value to be specified must be in the range of 0 to 0xff. chapter 5 debug windows trace pick-up dialog box [specification dialog box] 191 (5) displayed-frame condition selection area select a displayed-frame type. accepted frame types are listed below. frame type meaning all frame pick up all frames. step pick up only step execution frames. next pick up only next step execution frames. real time pick up only real-time execution frames. snap pick up only snapshot frames. buttons displays only frames that satisfy specified conditions. displays all frames. ignores any selections and resets the initial state. closes the trace pick-up dialog box. opens the help window. chapter 5 debug windows register window [view/setting window] 192 register window view/setting window outline the register window displays registers (general-purpose registers and control registers), and is used to modify their contents. this window can be opened in any of the following ways: ? in the main window, select browse r egister... from the menu bar . ? in the main window, press the grph , b , and r keys , in this order. ? in the tool bar, click the button. window fig. 5-44 register window description the register window displays registers (general-purpose registers and control registers), and is used to modify their contents. this window can be set to view mode or modify mode. chapter 5 debug windows register window [view/setting window] 193 the register window consists of the following components: ? control register view area ? register bank selection area ? general-purpose register view area ? menu bar ? function buttons the function of each component is described below. (1) control register view area the control register view area displays control registers, and is used to modify their contents. to modify the contents of a control register, click the button. to write new data to the target device, click the button after modification. in addition to being used to display and modify the contents of control registers, this area serves as the jump pointer for the jump function. the jump function causes a jump to the source, assemble, or memory window, with the value of a selected control register being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the source window): 1. select a control register. 2. in the register window, select jump s ourcetext... from the menu bar or press the grph , j , and s keys, in this order. or, press the ctrl +u shortcut keys. chapter 5 debug windows register window [view/setting window] 194 (2) register bank selection area the register bank selection area displays the number of a general-purpose register bank, and is used to select a bank. item description register bank: indicates the register bank to be displayed in the general-purpose register view area, and is used to select such a bank. to change the bank number, use the button. current bank: displays the number of the register bank which is currently set in the target device (current bank). (3) general-purpose register view area the general-purpose register view area displays the registers that belong to the bank indicated in the register bank: area, and is used to modify their contents. to modify the contents of a general-purpose register, click the button. to write new data to the target device, click the button after modification. the mode of general-purpose register view can be switched between absolute-name view and functional-name view and also between register view and register pair view, by choosing from the items displayed by selecting view from the menu bar of the register window. functional name and register pair view (select functional name and register p air .) functional name and register view (select functional name and r egister .) absolute name and register pair view (select absolute name and register p air .) absolute name and register view (select absolute name and r egister .) chapter 5 debug windows register window [view/setting window] 195 if view f unctional name is selected from the menu bar of the register window, the a , x , b , c , ax , and bc registers are displayed as follows depending on the value of the rss bit : displayed name when rss = 0 when rss = 1 x xr0 a ar1 c cr2 b br3 x* r4 x a* r5 a c* r6 c b* r7 b ax ax rp0 bc bc rp1 ax* rp2 ax bc* rp3 bc menu bar double-clicking the mouse button on an item of the menu bar opens the corresponding pull-down menu. (a) file file edit view operation open/save condition close jump open condition... save condition save file as... open/save condition loads or saves the contents of general-purpose registers. open condition... opens the selected file for reference. the view file load dialog box is opened. save condition saves the contents of the window into a view file. save file as... saves the contents of the window into a view file. the view file save dialog box is opened. close closes the register window. (b) edit file edit view operation jump undo copy paste write in restore chapter 5 debug windows register window [view/setting window] 196 undo cancels the most recent editing. copy copies a selected character string into the clipboard buffer. paste pastes the contents of the clipboard buffer at the point to which the text cursor is positioned. write in writes the modified contents into the target device. restore cancels the modified contents. (c) view file edit view operation jump absolute name functional name register register pair bin oct dec hex absolute name displays absolute register names. functional name displays functional register names. register displays registers individually. register pair displays register pairs. bin displays data in binary format. oct displays data in octal format. dec displays data in decimal format. hex displays data in hexadecimal format. (d) operation file edit view operation jump active hold tomodify toview active sets the register window to the active state. hold sets the register window to the hold state. tomodify sets the register window to modify mode. toview sets the register window to view mode. chapter 5 debug windows register window [view/setting window] 197 (e) jump file edit view operation jump sourcetext... assemble... memory... sourcetext... sets the contents of the selected register as the jump address, and displays the source text and source line starting from that address: the source window is opened. assemble... sets the contents of the selected register as the jump address, and displays the disassembled text starting from that address: the assemble window is opened. memory... sets the contents of the selected register as the jump address, and displays the memory contents starting from that address: the memory window is opened. buttons switches the window to modify mode. this button can be clicked only in view mode. clicking this button enables the contents of a register to be modified. when the window is placed in modify mode, the window is highlighted and this button is disabled. to modify the contents of a register, click the current value of the register to display a text cursor, then enter a new value using a keyboard. clicking the button writes the new value into the target device. switches the window to view mode. this button can be clicked only in modify mode. when the window is placed in view mode, the window is not highlighted any more and this button is disabled. writes the new contents of a register into the target device. cancels modification. clicking this button restores the initial contents of registers which have been modified in modify mode. if the button has been clicked, modification before clicking the button is not canceled. chapter 5 debug windows sfr window [view/setting window] 198 sfr window view/setting window outline the sfr window displays sfrs, and is used to modify their contents. this window can be opened in any of the following ways: ? in the main window, select browse sf r... from the menu bar . ? in the main window, press the grph , b , and f keys , in this order. ? in the tool bar, click the button. window fig. 5-45 sfr window description the sfr window displays sfrs, and is used to modify sfr contents. sfrs that can only be read from are displayed in gray. display in this color indicates that the contents of the registers cannot be modified. chapter 5 debug windows sfr window [view/setting window] 199 choosing from the items displayed by selecting view sf r from the menu bar of the main window can determine how to display and read from sfrs. item under sfr description address sort specifies the display order. without check mark: alphabetical order with check mark ( 9 ): in order of addresses pick up displays only modified sfrs. attribute displays or hides the sfr attribute. compulsion read forcibly reads read-protected sfrs. synchronize writes changed contents to the target device. this window can be set to view mode or modify mode. the sfr window consists of the following components: ? sfr name view area ? attribute view area ? sfr contents view area ? function buttons the function of each component is described below. (1) sfr name view area the sfr name view area displays sfr names. (2) attribute view area the attribute view area displays the read/write attributes, access types, and addresses of sfrs. choosing from the items displayed by selecting view sf r attribute from the menu bar of the main window can determine whether the attribute view area is to be displayed. chapter 5 debug windows sfr window [view/setting window] 200 read/write attributes are classified as follows: attribute description r the sfr can only be read from. it is displayed in gray. w the sfr can only be written to. r/w the sfr can be both read from and written to. access types are classified as follows: access type description 1 the sfr can be accessed bit by bit. 8 the sfr can be accessed byte by byte. 16 the sfr can be accessed word by word. (3) sfr contents view area the sfr contents view area displays sfr contents, and is used to modify them. contents are displayed in different ways depending on the attribute of the sfr as follows: read-only sfr: the contents are displayed in gray. write-only sfr: -- is displayed. read/write sfr: the contents are displayed in black. sfr modified by reading: ** is displayed. to modify the contents of an sfr, click the button. to write new data to the target device, click the button after modification. buttons switches the window to modify mode. this button can be clicked only in view mode. clicking this button enables the contents of an sfr to be modified. when the window is placed in modify mode, the window is highlighted and this button is disabled. to modify the contents of an sfr, click the current value of the sfr to display a text cursor, then enter a new value using a keyboard. clicking the button writes the new value into the target device. switches the window to view mode. this button can be clicked only in modify mode. when the window is placed in view mode, the window is not highlighted any more and this button is disabled. writes the new contents of an sfr into the target device. chapter 5 debug windows sfr window [view/setting window] 201 cancels modification. clicking this button restores the initial contents of sfrs which have been modified in modify mode. if the button has been clicked, modification before clicking the button is not canceled. closes the sfr window. icon the sfr window can be reduced to the following icon by clicking the button on the title bar: sfr window chapter 5 debug windows coverage window [view window] 202 coverage window view window outline the coverage window displays coverage results. this window can be opened in either of the following ways: ? in the main window, select browse co verage v iew... from the menu bar . ? in the main window, press the grph , b , o , and v keys , in this order. window fig. 5-46 coverage window description the coverage window displays coverage results. to measure coverage, be sure to select execute cov erage on from the menu bar of the main window. the coverage window consists of the following components: ? address view area ? coverage view area ? function buttons the function of each component is described below. chapter 5 debug windows coverage window [view window] 203 (1) address view area the address view area displays coverage addresses. in addition to displaying coverage addresses, this area can be used to perform the following function: a. jump function the jump function causes a jump to the source, assemble, or memory window, with a selected address being the jump pointer. the jump destination window is displayed from the location indicated by the jump pointer. this function is used as follows (when jumping to the source window): 1. select an address. 2. in the main window, select jump s ourcetext... from the menu bar or press the grph , j , and s keys, in this order. or, press the ctrl +u shortcut keys. (2) coverage view area the coverage view area displays coverage results. the symbols displayed in this area have the following meaning: symbol meaning . no execution, reading, or writing was performed. r only reading was performed. w only writing was performed. * only execution was performed. $ execution and reading were performed. # execution and writing were performed. a reading and writing were performed. % execution, reading, and writing all performed. chapter 5 debug windows coverage window [view window] 204 buttons displays coverage efficiency. the coverage efficiency view dialog box is opened. searches for coverage information to be displayed. the find dialog box is opened. closes the coverage window. when the coverage window is closed, the coverage efficiency view and coverage condition setting dialog boxes, if open, are also closed. icon the coverage window can be reduced to the following icon by clicking the button on the title bar: coverage chapter 5 debug windows coverage efficiency view dialog box [view dialog box] 205 coverage efficiency view dialog box view dialog box (modeless) outline the coverage efficiency view dialog box displays coverage results in efficiency. this dialog box can be opened in any of the following ways when the coverage window is open: ? in the main window, select browse co verage e fficiency... from the menu bar . ? in the main window, press the grph , b , o , and e keys , in this order. ? in the coverage window, click the button. ? in the coverage condition setting dialog box, click the button. closing the coverage window also closes the coverage efficiency view dialog box. window fig. 5-47 coverage efficiency view dialog box chapter 5 debug windows coverage efficiency view dialog box [view dialog box] 206 description the coverage efficiency view dialog box displays the coverage efficiency in the range specified in the coverage condition setting dialog box. the coverage efficiency view dialog box consists of the following components: ? coverage range view area ? coverage efficiency view area ? function buttons the function of each component is described below. (1) coverage range view area the coverage range view area displays the coverage efficiency measurement range. this area displays the areas specified in the coverage condition setting dialog box. if the range has been specified with a function name, it is displayed in the format "file-name#_function-name." (2) coverage efficiency view area the coverage efficiency view area displays coverage efficiency. coverage efficiency is the percentage to which specified states (i.e., execution, reading, and writing) have occurred in the measurement range. this area displays the coverage efficiency for each specified computation condition. the meaning of a computation condition is described below, after which the supported computation conditions are listed. the computation condition is a combination of states such as f, r, w, and all. f point at which a program was executed. r point at which memory was read-accessed. w point at which memory was write-accessed. all an entire function or an entire range of specified addresses. a computation condition is expressed by combining states with a character string 'or' and a slash (/). the slash represents a relationship between a denominator and a numerator, while 'or' represents a set. example f forw f fw / = u forw forworr fw fw r / = u uu chapter 5 debug windows coverage efficiency view dialog box [view dialog box] 207 computation conditions computation condition description f/forw ratio of program execution at a point where a program was executed or memory was write-accessed. w/forw ratio of memory writing at a point where a program was executed or memory was write-accessed. f/forr ratio of program execution at a point where a program was executed or memory was read-accessed. r/forr ratio of memory reading at a point where a program was executed or memory was read-accessed. w/worr ratio of memory writing at a point where memory was read- or write-accessed. r/worr ratio of memory reading at a point where memory was read- or write-accessed. f/forworr ratio of program execution at a point where a program was executed or memory was read- or write-accessed. w/forworr ratio of memory writing at a point where a program was executed or memory was read- or write-accessed. r/forworr ratio of memory reading at a point where a program was executed or memory was read- or write-accessed. forw/forworr ratio of program execution or memory writing at a point where a program was executed or memory was read- or write-accessed. forr/forworr ratio of program execution or memory reading at a point where a program was executed or memory was read- or write-accessed. worr/forworr ratio of memory reading or writing at a point where a program was executed or memory was read- or write-accessed. f/all ratio of program execution in the entire selected range. w/all ratio of memory writing in the entire selected range. r/all ratio of memory reading in the entire selected range. forw/all ratio of program execution or memory writing in the entire selected range. forr/all ratio of program execution or memory reading in the entire selected range. worr/all ratio of memory reading or writing in the entire selected range. forworr/all ratio of program execution, memory reading, or writing in the entire selected range. buttons closes the coverage efficiency view dialog box. sets coverage efficiency view conditions. the coverage condition setting dialog box is opened. opens the help window. chapter 5 debug windows coverage condition setting dialog box [setting dialog box] 208 coverage condition setting dialog box setting dialog box (modeless) outline the coverage condition setting dialog box is used to set the range for coverage efficiency measurement. this dialog box can be opened in any of the following ways when the coverage window is open: ? in the main window, select browse co verage conditio n... from the menu bar . ? in the main window, press the grph , b , o , and o keys , in this order. ? in the coverage efficiency view dialog box, click the button. closing the coverage window also closes the coverage condition setting dialog box. window fig. 5-48 coverage condition setting dialog box description the coverage condition setting dialog box is used to specify the information to be displayed in the coverage efficiency view dialog box. the coverage condition setting dialog box consists of the following components: ? selection list view area ? function list view area ? address specification area ? coverage condition specification area ? function buttons the function of each component is described below. chapter 5 debug windows coverage condition setting dialog box [setting dialog box] 209 (1) selection list view area the selection list view area lists the currently selected items. an item can be added to the selection list in either of the following ways: a. adding a function in the function list 1. specify the coverage condition. 2. select the function to be added in the function list view area, and click the button. to delete a function from the selection list, use the button. b. adding an address range 1. specify the coverage condition. 2. enter an address range in the address specification area, and click the button. to delete an address range from the selection list, use the button. to display the coverage efficiency for the items registered in the list, click the button. the contents of the list are displayed in the coverage efficiency view dialog box. (2) function list view area the function list view area is used to specify a function as a coverage efficiency address condition. this area displays the names of the functions registered in the load module file. select a function name and coverage condition (in the coverage condition specification area), and click the button. the selected function is registered in the selection list view area. a function name that has been added to the list is displayed in gray. (3) address specification area the address specification area is used to specify the address range for measuring coverage efficiency. symbols can also be used to specify an address, as follows: function or variable _fnc file#_fnc (for static function or variable) sfr sfrname line number in source text file:no fnc: function or variable name sfrname: sfr name file: file name no: line number chapter 5 debug windows coverage condition setting dialog box [setting dialog box] 210 when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). (4) coverage condition specification area the coverage condition specification area is used to select the computation condition for coverage efficiency. the coverage efficiency is computed according to a computation condition for each function or for a specified address range. the computation condition is a combination of states such as f, r, w, and all. f point at which a program was executed. r point at which memory was read-accessed. w point at which memory was write-accessed. all an entire function or an entire range of specified addresses. a computation condition is expressed by combining states with a character string 'or' and a slash (/). the slash represents a relationship between a denominator and a numerator, while 'or' represents a set. examples of compensation conditions follow. example f forw f fw / = u forw forworr fw fw r / = u uu computation conditions (1/2) computation condition description f/forw ratio of program execution at a point where a program was executed or memory was write-accessed. w/forw ratio of memory writing at a point where a program was executed or memory was write-accessed. f/forr ratio of program execution at a point where a program was executed or memory was read-accessed. r/forr ratio of memory reading at a point where a program was executed or memory was read-accessed. w/worr ratio of memory writing at a point where memory was read- or write-accessed. r/worr ratio of memory reading at a point where memory was read- or write-accessed. f/forworr ratio of program execution at a point where a program was executed or memory was read- or write-accessed. w/forworr ratio of memory writing at a point where a program was executed or memory was read- or write-accessed. r/forworr ratio of memory reading at a point where a program was executed or memory was read- or write-accessed. chapter 5 debug windows coverage condition setting dialog box [setting dialog box] 211 computation conditions (2/2) computation condition description forw/forworr ratio of program execution or memory writing at a point where a program was executed or memory was read- or write-accessed. forr/forworr ratio of program execution or memory reading at a point where a program was executed or memory was read- or write-accessed. worr/forworr ratio of memory reading or writing at a point where a program was executed or memory was read- or write-accessed. f/all ratio of program execution in the entire selected range. w/all ratio of memory writing in the entire selected range. r/all ratio of memory reading in the entire selected range. forw/all ratio of program execution or memory writing in the entire selected range. forr/all ratio of program execution or memory reading in the entire selected range. worr/all ratio of memory reading or writing in the entire selected range. forworr/all ratio of program execution, memory reading, or writing in the entire selected range. buttons displays the contents of the selection list view area in the coverage efficiency view dialog box. displays the coverage efficiency. the coverage efficiency view dialog box is opened. cancels modification. clicking this button restores the initial settings. if the button has been clicked, modification before clicking the button is not canceled. registers a function name specified in the function list view area into the selection list view area. deletes a specified function name from the selection list view area. registers an address range specified in the address specification area into the selection list view area. deletes a specified address range from the selection list view area. chapter 5 debug windows coverage memory clear dialog box [setting dialog box] 212 coverage memory clear dialog box setting dialog box (modal) outline the coverage memory clear dialog box is used to clear coverage results. this dialog box can be opened in either of the following ways when the coverage window is open: ? in the main window, select browse co verage cl ear... from the menu bar . ? in the main window, press the grph , b , o , and l keys , in this order. window fig. 5-49 coverage memory clear dialog box description the coverage memory clear dialog box is used to clear coverage results. the coverage memory clear dialog box consists of the following components: ? address specification area ? function buttons the function of each component is described below. chapter 5 debug windows coverage memory clear dialog box [setting dialog box] 213 (1) address specification area the address specification area is used to specify the coverage memory address range to be cleared. symbols can also be used to specify an address, as follows: function or variable _fnc file#_fnc (for static function or variable) sfr sfrname line number in source text file:no fnc: function or variable name sfrname: sfr name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). buttons clears the specified address range in coverage memory. closes the coverage memory clear dialog box. chapter 5 debug windows view file load dialog box [selection dialog box] 214 view file load dialog box selection dialog box (modal) outline the view file load dialog box is used to load a view file corresponding to the current window, and open a window for referencing the view file. this dialog box can be opened as follows: to load a view file for the local variable, assemble, memory, stack, sfr, trace view, or coverage window: ? in the main window 1. select the relevant window as the current window. 2. select file o pen... from the menu bar . ? in the main window 1. select the relevant window as the current window. 2. press the grph , f , and o keys , in this order. ? using short cut keys 1. select the relevant window as the current window. 2. press the ctrl +o keys . to load a view file for the variable window: ? in the variable window select file o pen/save condition o pen condition... from the menu bar . ? in the variable window press the grph , f , o , and o keys , in this order. to load a view file for the register window: ? in the register window select file o pen/save condition o pen condition... from the menu bar . ? in the register window press the grph , f , o , and o keys , in this order. chapter 5 debug windows view file load dialog box [selection dialog box] 215 window fig. 5-50 view file load dialog box description the view file load dialog box loads a view file and opens a window for referencing the view file. when the loaded view file contains more than 1000 lines, no reference window is opened. instead, the following error message dialog box appears. in that case, use other windows applications to reference the view file. the view file load dialog box consists of the following components: ? file selection area ? path setting area ? function buttons the function of each component is described below. chapter 5 debug windows view file load dialog box [selection dialog box] 216 (1) file selection area specify the name of the view file to be loaded. you can select a view file from the list by clicking it. the selected file name is highlighted and displayed in the area above the list. double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. the default extension for a view file name is as follows: window default extension variable window var local variable window loc assemble window dis memory window mem register window reg stack window stk sfr window sfr coverage window cov trace view window tvw event manager evn (2) path setting area specify the path of the view file to be loaded. double-clicking a path name in the list displays the view files under the path, in the view file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]: drive name chapter 5 debug windows view file load dialog box [selection dialog box] 217 buttons loads the specified view file. closes the view file load dialog box. ignores any selections and resets the initial state. opens the help window. chapter 5 debug windows view file save dialog box [selection dialog box] 218 view file save dialog box selection dialog box (modal) outline the view file save dialog box is used to save the contents of the current window into a view file. this dialog box can be opened as follows: to save the contents of the local variable, assemble, memory, stack, sfr, trace view, or coverage window: ? in the main window 1. select the relevant window as the current window. 2. select file save a s... from the menu bar . ? in the main window 1. select the relevant window as the current window. 2. press the grph , f , and a keys , in this order. to save the contents of the variable window: ? in the variable window select file o pen/save condition sa ve file as... from the menu bar . ? in the variable window press the grph , f , o , and a keys , in this order. to save the contents of the register window: ? in the register window select file o pen/save condition sa ve file as... from the menu bar . ? in the register window press the grph , f , o , and a keys , in this order. chapter 5 debug windows view file save dialog box [selection dialog box] 219 window when the current window is the local variable, assemble, variable, stack, sfr, coverage, or register window when the current window is the memory window when the current window is the trace view window fig. 5-51 view file save dialog box chapter 5 debug windows view file save dialog box [selection dialog box] 220 description the view file save dialog box saves the contents of the current window into a view file. the view file save dialog box consists of the following components: ? file selection area ? path setting area ? save range setting area ? function buttons the function of each component is described below. (1) file selection area specify the name of the view file into which the contents of the current window will be saved. enter the file name from the keyboard. you can also select a view file from the list by clicking it, when that file is to be overwritten. double-clicking a file name in the list has the same effect as selecting the file name and clicking the button. the default extension for a view file name is as follows: window default extension variable window var local variable window loc assemble window dis memory window mem register window reg stack window stk sfr window sfr coverage window cov trace view window tvw event manager evn chapter 5 debug windows view file save dialog box [selection dialog box] 221 (2) path setting area specify the path under which the view file will be stored. double-clicking a path name in the list displays the view files under that path, in the view file list. directories and drives are distinguished in the list as follows: [xxx]: directory name [-x-]: drive name (3) save range setting area this area is displayed only when the current window to be saved is the memory or trace view window. a. when the current window is the memory window specify the address range to be saved. symbols can also be used to specify an address, as follows: function or variable _ fnc file #_ fnc (for static function or variable) line number in source text file : no fnc: function or variable name file: file name no: line number when specifying a function or variable name, precede it with an underscore (_). a file name must be separated from a function or variable name with a sharp (#). a file name must be separated from a line number with a colon (:). b. when the current window is the trace view window specify the trace frame range to be saved. valid range: 0 frame number 32,767 if a range of 100 or more frames is specified, the following message dialog box can be displayed to get hold of save conditions. a save operation can be aborted by pressing the button in the message dialog box. chapter 5 debug windows view file save dialog box [selection dialog box] 222 buttons saves the contents of the current window into the specified view file. closes the view file save dialog box. ignores any selections and resets the initial state. opens the help window. chapter 5 debug windows error/warning dialog box [confirmation dialog box] 223 error/warning dialog box confirmation dialog box (modal) outline the error/warning dialog box appears when an error or warning occurs. the user shall confirm the message displayed in this dialog box. window fig. 5-52 error/warning dialog box description the error/warning dialog box displays the reason for the error or warning. buttons closes the error/warning dialog box. chapter 5 debug windows reset debugger dialog box [confirmation dialog box] 224 reset debugger dialog box confirmation dialog box (modal) outline the reset debugger dialog box is used to initialize the debugger or emulation cpu. this dialog box can be opened in either of the following ways: ? in the main window, select execute cpu reset... from the menu bar . ? in the main window, press the grph , x , and u keys , in this order. window fig. 5-53 reset debugger dialog box description specify what is to be initialized, using the check boxes. the default setting is resetting only the emulation cpu. the reset debugger dialog box consists of the following components: ? address selection area ? function buttons the function of each component is described below. chapter 5 debug windows reset debugger dialog box [confirmation dialog box] 225 (1) reset system selection area select the system to be initialized. item description debugger restarts the entire debugger system. symbol initializes the entire symbolic information which has been loaded and registered. target cpu resets only the emulation cpu. buttons initializes the debugger or emulation cpu according to the selection. closes the reset debugger dialog box. chapter 5 debug windows about dialog box [view dialog box] 226 about dialog box view dialog box (modal) outline the about dialog box is used to display the version of the debugger. this dialog box can be opened in either of the following ways: ? in the main window, select help a bout... from the menu bar . ? in the main window, press the grph , h , and a keys , in this order. window fig. 5-54 about dialog box chapter 5 debug windows about dialog box [view dialog box] 227 description the about dialog box displays version information including the versions of the debugger and device file. buttons closes the about dialog box. chapter 5 debug windows exit debugger dialog box [confirmation dialog box] 228 exit debugger dialog box confirmation dialog box (modal) outline the exit debugger dialog box is used to exit the debugger. you can save the current debugging environment into a project file when exiting the debugger. this dialog box can be opened in either of the following ways: ? in the main window, select file ex it from the menu bar . ? in the main window, press the grph , f , and x keys , in this order. window fig. 5-55 exit debugger dialog box description select whether to save the current debugging environment into a project file when exiting the debugger, using the check box. by default, the current environment is not saved. when the box is checked, clicking the button opens the project file save dialog box, saves the current debugging environment into a specified project file, closes all windows, then terminates the debugger. when the box is not checked, clicking the button closes all windows, then terminates the debugger. chapter 5 debug windows exit debugger dialog box [confirmation dialog box] 229 buttons when the box is checked, opens the project file save dialog box, saves the current debugging environment into a specified project file, closes all windows, then terminates the debugger. when the box is not checked, closes all windows, then terminates the debugger. closes the exit debugger dialog box without any processing. chapter 6 explanation of debugger functions 230 chapter 6 explanation of debugger functions this chapter explains each of the functions of the integrated debugger. 6.1 system operating modes the system operating mode indicates the current operating state of the system, i.e., whether the "user program execution (emulation) functions" and the "analyzer functions" are activated. 6.1.1 operating mode types there are three system operating modes. commands are restricted according to the current system operating mode. break mode the execution of both "user program execution (emulation) functions" and "analyzer functions" is stopped. emulation mode the "user program execution (emulation) functions" are activated but execution of the "trace functions" is stopped. this mode is used when the user does not want the execution of a user program to be stopped. in this mode analyzer functions other than the tracer, such as coverage and timer measurement, are activated. trace mode both the "user program execution (emulation) functions" and "analyzer functions" are activated. 6.1.2 system operating mode the current system operating mode is displayed in the status bar of the main window. system operating mode cpu tracer break mode stopped stopped emulation mode activated stopped trace mode activated activated chapter 6 explanation of debugger functions 231 6.1.3 system operating state the relationship between an emulation cpu and the analyzer functions is shown in the following figure. the relationship shown here is just one example. ?a?~ event (command) start of execution event condition match event delay restart of tracer stop of tracer forced termination emulation function analyzer functions stop stop stop stop stop operating operating real-time execution delay time fig. 6-1 example of system operating state 6.2 using the basic functions the following sections explain the basic functions of the debug functions supported by the debugger. 6.2.1 clock selection function the clock selection function is used to specify the clock source to be supplied to an emulation cpu (target device). one of three clock sources can be selected: fixed clock (25 mhz) within the in-circuit emulator (internal) user-established clock (external) clock obtained by multiplying the user-established clock pulses (multiple ext) the desired clock source can be selected when the debugger is first started or from within the configuration dialog box. there are two ways of specifying a user-established clock to supply any clock: a. create a clock on the target system and supply the clock to an emulation cpu via the emulation probe. b. install a transmitter in the clock socket on the break board in the main section of the in-circuit emulator and supply the clock to an emulation cpu. when the clock source is changed, the emulation cpu is reset. chapter 6 explanation of debugger functions 232 6.2.2 mapping functions there are five mapping functions, which allow the following settings for address areas other than sfrs. these settings can be made when the debugger is first started or from within the configuration dialog box. internal rom the memory area specified as internal rom represents the internal rom of the target device. with this type of mapping, the target device can access the memory of the in-circuit emulator. when the target device writes data into this memory area, a write protect break is generated. internal ram the memory area specified as internal ram represents the internal ram of the target device. with this type of mapping, the target device can access the memory of the in-circuit emulator. user area mapping (target) the memory area specified for user area mapping allows access to the memory of the target system. with this type of mapping, the target device can access the memory of the target system. ie alternate rom (emulation rom) the memory area specified for ie alternate rom represents the additional rom of the target device. with this type of mapping, the target device can access the memory of the in-circuit emulator. when the target device writes data into this memory area, a write protect break is generated. ie alternate ram (emulation ram) the memory area specified for ie alternate ram represents the additional ram of the target device. with this type of mapping, the target device can access the memory of the in-circuit emulator. 6.2.3 reset functions the reset functions are used to reset the entire in-circuit emulator system or the emulation device only. reset of entire system (debugger) reset of emulation device only (target cpu) these functions can be specified from within the reset debugger dialog box. chapter 6 explanation of debugger functions 233 6.2.4 load function the load function is used to load specified files such as the debugging environment, object, load module, and symbol files individually. there are two types of files to be loaded: view files for screen reference and information files for updating information in the debugger. a view file stores screen information that was current when the file was saved. when a view file is loaded, a reference window opens. the following table lists the types of view files. file window explanation variable view file (file name: xxxxxxxx.var) variable window stores variable information. assemble view file (file name: xxxxxxxx.dis) assemble window stores assemble information. memory view file (file name: xxxxxxxx.mem) memory window stores memory information. register view file (file name: xxxxxxxx.reg) register window stores register information. stack trace view file (file name: xxxxxxxx.stk) stack window stores stack trace information. sfr view file (file name: xxxxxxxx.sfr) sfr window stores sfr information. local variable view file (file name: xxxxxxxx.loc) local variable window stores local variable information. trace view file (file name: xxxxxxxx.tvw) trace view window stores trace information. chapter 6 explanation of debugger functions 234 the following table lists the types of information files. file window explanation object file (file name: xxxxxxxx.hex) load module dialog box stores the object code (in intel standard hexadecimal format) of a user program. symbol table file (file name: xxxxxxxx.sym) load module dialog box stores the symbols defined by the user on a source for a user program. load module file (file name: xxxxxxxx.lnk) load module dialog box stores the object code, symbols, and source information of a user program. project file (file name: xxxxxxxx.prj) project file load dialog box stores a debugging environment. this file contains the setting information for the following windows: y configuration dialog box y extended option dialog box y load module dialog box y source window y source path dialog box y assemble window y memory window y stack window y sfr window y local variable window y trace view window y event manager y event link dialog box y break dialog box y trace dialog box y snap-shot dialog box y stub dialog box y timer dialog box y register window y variable window y coverage window y coverage efficiency view dialog box event setting file (file name: xxxxxxxx.evn) event manager stores event setting information. chapter 6 explanation of debugger functions 235 6.2.5 emulation execution functions the emulation execution functions are used to start "user program execution (emulation)" by an emulation cpu and the analyzers. the functions are classified according to the emulation execution mode, as follows: real-time execution functions: go ( button) performs real-time execution. the program breaks upon the occurrence of a break event. return ( button) performs real-time execution until control returns to the calling function. go & go performs real-time execution. the program breaks upon the occurrence of a break event and, after window updating, real-time execution is performed. go & come performs real-time execution until a specified address or source line is reached. no break event occurs while a program is being executed. cpu reset & go resets the emulation cpu then performs real-time execution. non-real-time execution functions: step ( button) if source mode is selected performs step execution at the source level. if instruction mode is selected performs real-time execution at the instruction level. next ( button) if source mode is selected performs next step execution at the source level. if instruction mode is selected performs next step execution at the instruction level. slowmotion performs step execution continuously. real-time execution functions there are four real-time execution functions: "go" which executes a user program until the occurrence of a break event; "go & go" which updates each window and reexecutes a user program upon the occurrence of a break event; "go & come" which executes a user program up until a specified point, when it breaks; and ?return? which executes a user program until control returns to the calling function. go command ( button) with real-time execution by the go command, the user program is executed starting from a specified address and is stopped upon the occurrence of a break event. each analyzer becomes operable when the program is executed, and is executed or stopped depending on the events. the relationship between the cpu, tracer, timer, and coverage during real-time execution by the go command is shown in the following figure. chapter 6 explanation of debugger functions 236 cpu go tre tme tms tme trs tms brk tracer timer c0 coverage time : stopped : executing trs: trace start event, tre: trace stop event, tms: timer start event, tme: timer stop event go: go command, brk: break event fig. 6-2 example of system operating state (go) return command with real-time execution by the return command, real-time execution is performed until control returns to the calling function. if no calling function exists, no operation is performed. the concept of real-time execution by the return command is shown in the following figure. call call call call ret ret ret ret beginning of program termination of return command execution issue of return command :program execution by a command other than return :program execution by a return command :transfer between functions call: call instruction (call, callf, callt, brk, brkcs) ret: instruction used to return to the calling function fig. 6-3 concept of return command execution the return command realizes real-time execution by specifying an execution break at the return address of a function. the following diagram shows the relationships among the cpu, tracer, timer, and coverage used in real-time execution based on the return command. chapter 6 explanation of debugger functions 237 cpu : stopped :executing return return: return command, brk: break event, return address: return address of a function brk brk return address time analyzers brk fig. 6-4 example of system operating state (return) go & go command with real-time execution by the go & go command, (1) the user program is executed starting from a specified address. (2) the program is stopped when a break event occurs. (3) each window is updated. (4) the program is reexecuted starting from the address where it was stopped. (5) (2), (3), and (4) are repeated until the stop command is issued. each analyzer becomes operable when the program is executed, and executed or stopped depending on the events. the relationship between the cpu and the analyzers during real-time execution by the go & go command is shown in the following figure. cpu go&go brk brk stop brk analyzers time : stopped go&go: go & go command, brk: break event, stop: stop command : executing : window updating fig. 6-5 example of system operating state (go & go) chapter 6 explanation of debugger functions 238 go & come command with real-time execution by the go & come command, (1) in either the source or assemble window, position the cursor to the point where you want the program to be stopped. (2) issue a go & come command to execute the user program starting from the address stored in the program counter. (3) the program is executed up to the point to which the cursor is positioned, after which it breaks. the program does not break upon the occurrence of a break event during the course of program execution. the relationship between the cpu and the analyzers during real-time execution by the go & come command is shown in the following figure. cpu go&come brk brk brk analyzers : stopped : executing cursor go&come: go & come command, brk: break event, cursor: executes the cursor-specified address. time fig. 6-6 example of system operating state (go & come) cpu reset & go command with cpu reset & go execution, (1) the emulation cpu is reset. (2) the program is executed with a reset vector. the emulation cpu is reset before the program is executed. subsequently, the operation is the same as that of the go command. the relationship between the cpu and the analyzers during cpu reset & go execution is shown in the following figure. chapter 6 explanation of debugger functions 239 cpu cpu reset&go tre tm e tms tme trs tms brk tracer timer c0 coverage time :stopped trs: trace start event, tre: trace stop event, tms: timer start event, tme: timer stop event cpu reset&go: cpu reset & go command , brk: break event :resetting :executing fig. 6-7 example of system operating state (cpu reset & go) non-real-time execution functions the non-real-time execution functions are roughly divided into "step" which performs step execution; "next" which performs next step execution; and "slowmotion" which performs continuous step execution. step command with step execution by the step command, y in source mode, step execution is performed for one line starting from a specified source line. y in instruction mode, one instruction is executed starting from a specified address. after execution, each window is updated. the relationship between the cpu and the analyzers during step execution by the step command is shown in the following figure. chapter 6 explanation of debugger functions 240 cpu step step in source mode analyzers time in instruction mode termination of one line nalyzers cpu time : stopped step: step command, termination of one line: termination of execution of an instruction on one line : execution of one line : confirmation of step execution termination fig. 6-8 example of system operating state (step) next command next step execution by the next command differs depending on whether a call statement or a statement other than a call statement is executed. depending on the debug mode, the following can be used as a call instruction: y in source mode, line calling a function y in instruction mode, call, callf, callt, brk, and brkcs instructions the operation of the next command is explained below: y if a call statement is executed, an execution break is set for the line or instruction immediately after the call statement. then, real-time execution is performed. y if a statement other than a call statement is executed, the same processing as that resulting from execution of the step command is performed. chapter 6 explanation of debugger functions 241 the concept of next step execution by the next command is as shown in the figure below. program executed (step execution) - windows are updated. - additional trace - only one step is executed. call statement next instruction (step execution) subroutine (function) next real-time execution - no windows are updated. - real-time execution - interrupts are enabled. instruction used to return to the calling function next command fig. 6-9 concept of next step execution slowmotion command with step execution by the slowmotion command, (1) starting from a specified address, step execution is performed line-by-line if the debug mode is source mode, or instruction-by-instruction if it is instruction mode. (2) each window is updated. (3) (1) and (2) are repeated until the stop command is issued. chapter 6 explanation of debugger functions 242 6.2.6 break functions the break functions are used to stop "user program execution (emulation)" by an emulation cpu and the "analyzers (tracer, timer, and coverage)". there are basically five break functions: y event detection break y software break y temporary break y break caused by a condition being satisfied during step execution y forcible break y fail-safe break the table below lists the relationship between these "break functions" and the "emulation execution functions". event detection break temporary break software break break due to a step condition being satisfied forcible break fail-safe break real-time execution by go command real-time execution by go & go command real-time execution by go & come command real-time execution by cpu reset & go command non-real-time execution by step command non-real-time execution by return command non-real-time execution by next command non-real-time execution by slowmotion command : applied : not applied event detection break event detection break enables the stopping of the execution of a user program upon the detection of a specified event condition. this break is effective for the go, go & go, and cpu reset & go commands. for the go & go command, each window is redrawn and the program is reexecuted after an event detection break. a break event must be set as an event detection condition by using the event set dialog box, event manager, or break dialog box. chapter 6 explanation of debugger functions 243 temporary break temporary break enables the stopping of the execution of a user program upon the detection of a specified address. once execution of the user program stops, the temporary break point is cleared. software break software break enables the stopping of the execution of a user program upon the detection of a specified address. compared with event detection break or temporary break, which uses one hardware resource for each event condition, software break allows breakpoints to be set at multiple addresses for one event condition. since software break allows breakpoints to be set in multiple addresses with a single event detector, it performs the following processing before and after execution of a user program: immediately before execution: (1) the instruction at the location where a software break is set is changed to a callt instruction immediately before execution of a user program. (2) in the event detector, a break point is set in the vector address of the above callt instruction. after a break: (1) correction of the analyzers (tracer and coverage) used when the callt instruction was executed (2) the callt instruction is restored to the original instruction. since a software break uses a callt instruction as stated above, a vector table must be left open for the callt instruction. these settings are made from within the extended option dialog box. the analyzers are corrected after the break. therefore, the result of executing the callt instruction may not be displayed correctly in the tracer. break caused by a condition being satisfied during step execution break caused by a condition being satisfied during step execution enables the execution of a program to be stopped when the termination condition for a command (step, next, return, and slowmotion) is satisfied. the processing time is longer than that for real-time execution because execution, stop, and condition confirmation is performed for each instruction. forcible break forcible break enables the execution of a user program to be stopped forcibly. this break is effective for all commands used to execute a program. there are two types of forcible break: 1. stop command forcibly stops the execution of a user program. 2. reset command forcibly stops the execution of a user program, then resets the devices. the stop command is useful for temporarily stopping a program. the reset command is useful for executing a program from the beginning. chapter 6 explanation of debugger functions 244 fail-safe break fail-safe break enables the execution of a user program to be stopped forcibly if the program attempts to perform execution that is prohibited, using the memory and registers. there are three types of fail-safe break: 1. non-map break generated when an attempt is made to access a non-mapping area. 2. write-protect break generated when an attempt is made to write to write-protected memory such as rom. 3. sfr illegal access break generated when an attempt is made to gain illegal access to the sfr area. a fail-safe break can be generated by either of two causes: an error in the user program or an environment setting error in the debugger. caution: if a program is written up to the vicinity of the boundary between the mapping and non-mapping areas or of the internal ram area for which fetching is not allowed, a non-map break may be generated. more specifically, a non-map break may be generated if: maximum address in a mapping area - 5 program address maximum address in a mapping area or minimum address in unfetchable internal ram - 5 program address minimum address in unfetchable internal ram example: for a mapping area of 0x00000 to 0x03fff and a non-mapping area of 0x04000 and above, a non-map break may be generated if a program is written to addresses 0x3ffa to 0x3fff. if a non-map break is generated, it is related to prior fetch and a queue buffer. chapter 6 explanation of debugger functions 245 6.2.7 trace functions the trace functions allow a user to write data such as external sense clip values and data obtained by memory access during the execution of a user program to "trace memory" in real-time mode. by opening the trace view window, the data written to trace memory can be referenced to check the progress of the target program. the main functions of trace execution and view are as follows. trace conditions can be set in the trace dialog box . trace data view can be selected from the trace pick-up dialog box and with view t race view in the menu bar of the main window. trace operations: y operation during real-time execution y operation during step execution y operation during next step execution trace condition setting function (trace dialog box) y trace mode specification y qualified trace setting y section trace setting trace data view, format, and retrieval condition setting y trace data view specification y trace data retrieval condition setting relationship between trace execution and trace memory trace is divided into trace blocks according to the corresponding period: c block from real-time execution to a break caused by the occurrence of an event d block from emulation execution until the generation of a fail-safe break e block from emulation execution until application of a forcible break f block of step execution groups which are consecutive as viewed from the program trace memory is a ring buffer having 32k frames. if trace exceeds 32k frames, the oldest frame is overwritten with the newest trace data. chapter 6 explanation of debugger functions 246 a: if trace is within 32k frames oldest frame newest frame : frame already used for trace : frame not used for trace : top frame to be used for trace by the next execution ring buffer newest frame oldest frame b: if trace exceeds 32k frames c: if execution and breaks are repeated top frame trigger frame last frame top frame trigger frame last frame top frame trigger frame last frame fig. 6-10 concept of trace memory trace operation the operation of the tracer varies with the execution mode: operation during real-time execution the tracer starts tracing with real-time execution specified and stops tracing when the event condition (including a delay condition), specified as a break condition from within the trace dialog box, is satisfied. operation during step execution the tracer operates upon the execution of each step, trace information for each step being added to the tracer every time a step is executed. operation during next step execution if an instruction to be executed is other than a call instruction (call, callf, callt, brk, and brkcs) the tracer performs the same processing as that performed during step execution. if the instruction to be executed is a call instruction (call, callf, callt, brk, and brkcs) the tracer performs the same processing as that performed during real-time execution. real-time execution is canceled when control returns to the calling function. chapter 6 explanation of debugger functions 247 trace condition setting function (trace dialog box) the following specifications enable the user to specify the conditions for tracing. if these specifications are omitted, "all trace" is assumed, i.e., trace information is recorded for each instruction of a user program. trace mode specification specifies whether to execute all trace or conditional trace. there are two types of conditional trace: qualified trace and sectional trace. the trace mode specified with this setting becomes valid. qualified trace setting qualified trace involves tracing only when a previously specified address is executed or accessed. the condition to be specified can be created in the event set dialog box. sectional trace setting in sectional trace, tracing begins when a previously specified trace start condition is satisfied and stops when a stop condition is satisfied. in other words, it is a range-specified trace. the condition to be specified can be created in the event set dialog box. chapter 6 explanation of debugger functions 248 trace data view, format, and retrieval condition setting the display/hiding of data in the trace view window, as well as the view conditions, can be set. trace data view specification specifying trace data view enables effective use of the screen. when specifying trace data view, display/hiding can be specified for the following data items with view t race view in the menu bar of the main window. table 6-1 explanation of trace data view menu bar item item in trace view window explanation frame frame time sequence in which data is written to trace memory using trace memory frame numbers. (range: 00000-32767) timetag time execution time for each frame instruction fetch address addr fetch address instruction fetch data data fetch data instruction fetch status statu fetch status y m1: fetch of the first byte of an instruction y brm1: fetch of the first byte of the first instruction after a branch y op: fetch of operation code y if: invalid fetch memory access address addr access address memory access data data access data memory access status statu access status y vect: interrupt handling y rwp: data read/write by a user program y rp: data read by a user program y wp: data write by a user program y rwm: data read/write by a macro service y rm: data read by a macro service y wm: data write by a macro service external probe extp external sense clip data jump address jumpa jump address field disassemble disasm disassemble result chapter 6 explanation of debugger functions 249 setting of trace data retrieval conditions trace data retrieval conditions can be specified. retrieval conditions can be specified by selecting any or all of the items listed in the table below, in the trace pick-up dialog box. the specified data becomes valid by clicking the button. table 6-2 trace retrieval items specifiable item explanation specifiable range default address address to be retrieved 0-0ffffffh 0 xxxxxxh data data to be retrieved 0-0ffffffffh 0 xxxxxxxxh status status to be retrieved y all status: all status y m1: fetch of the first byte of an instruction y brm1: fetch of the first byte of the first instruction after a branch y op: fetch of operation code y if: invalid fetch y vect: interrupt processing y rwp: data read/write by a user program y rp: data read by a user program y wp: data write by a user program y rwm: data read/write by a macro service y rm: data read by a macro service y wm: data write by a macro service same as left all status external probe external sense clip data to be retrieved 0-0ffh 0xxh kind of frame? type of da ta to be retrieved y all frame: all frames y step: step execution frames y next: frames other than step execution frames same as left all frame chapter 6 explanation of debugger functions 250 6.2.8 snapshot function the snapshot function is used to interrupt real-time execution and output specified information to trace memory as snap data upon the detection of a specified snap event during real-time execution. once the output of information to trace memory has been completed, the function resumes real-time execution. the following can be specified as snap data: y data in a general-purpose register y data in an sfr y data in memory snap data output can be specified for a maximum of sixteen points. 6.2.9 stub function the stub function is used to insert a simple program into the user program currently being checked. when a stub event is generated, the user program stops and another user-supplied program is executed. a retb instruction must be specified at the end of the sub-program to be executed when a stub event is generated. failing to specify this instruction can cause a malfunction. is executed. main program sub-program retb instruction program flow stub event the stub function enables a user to easily insert a program. when the stub function is not used is executed. is executed. when the stub function is used is executed. a stub event is generated at and the main program breaks. in , ie pushes the current address into the stack and overwrites the pc with the entry address of the sub-program. is executed. in , control is returned to the main program by execution of the retb instruction which appears at the end of the sub-program. 1 3 5 2 4 6 1 1 2 5 6 2 4 3 fig. 6-11 concept of stub function chapter 6 explanation of debugger functions 251 6.2.10 event setting and detection functions the event setting and detection functions are used to set the conditions for stopping "user program execution" by an emulation cpu and for starting and stopping "trace operation" and "timer measurement" by the analyzers. the following event condition setting and detection functions are provided: event detection condition setting functions bus event condition setting function execution event condition setting function event condition link setting function event detection condition integration functions break event setting trace event setting timer event setting event condition setting function the event condition setting function is used to set, in the event condition register, the conditions for stopping "user program execution" by an emulation cpu and for starting and stopping "trace operation" and "timer measurement" by the analyzers. the event detection condition specified by the event detection condition setting function (event set dialog box and event link dialog box) does not become effective until set in the event mode register by the event detection condition integration function (event manager, break dialog box, trace dialog box, snap-shot dialog box, stub dialog box, and timer dialog box). three functions are provided for setting the event detection conditions: bus event condition setting function when the user program accesses specified memory or data is input to an external sense clip, it is possible to set this as an event detection condition in the bus event condition register. (a) bus event condition register using the event set dialog box, up to seven conditions can be set in the bus event condition register (bra). chapter 6 explanation of debugger functions 252 (b) event conditions the following items can be set as event detection conditions: item status explanation address address address (address range) mask address mask status fetch program fetch program read read by a program program write write by a program program r/w read/write by a program macro read read by a macro service macro write write by a macro service macro read/write read/write by a macro service program/macro read all read program/macro write all write program/macro r/w all read/write vect vector read by interrupts all(no condition) all accesses data data data value mask data mask value external external external sense data value mask external sense data mask value pass count pass count pass count value caution: when fetch is selected as a status condition, an event is generated with the execution of a fetch operation. that is, an event is generated prior to the fetched program being executed. to generate an event with the actual execution of the fetched program, use the execution event condition setting function. execution event condition setting function when the user program attempts to execute the instruction at a specified address and data is simultaneously input to an external sense clip, it is possible to set this as an event detection condition in the execution event condition register. (a) execution event condition register using the event set dialog box, up to three conditions can be set in the execution event detection register (brs). chapter 6 explanation of debugger functions 253 (b) event conditions the following items can be set as event detection conditions: item status explanation address address address (address range) mask address mask status run program execution data data data value mask data mask value external external external sense data value mask external sense data mask value pass count pass count pass count value event condition link setting function in the event link dialog box, an event link condition can be registered for the event condition registered in the event set dialog box. chapter 6 explanation of debugger functions 254 concept of event detection the figure below illustrates the concept of event detection starting from event condition setting. bra1 bra2 bra3 bra4 bra5 bra6 bra7 brs1 brs2 brs3 seq1 seq2 pas1 pas2 :corresponding window, brax: bus event detector, brsx: execution event detector event trigger source data obtained by memory access source of external sense clip sources memory fetch address event detection condition setting function event set dialog box event match signal 10 signals event link event link dialog box 2 signals event link match signal event match signal 10 signals pass count setting event set dialog box event link dialog box pass count can be set for up to two of the 12 match signals; 10 event match signals + 2 event link match signals. 12 match signals event integration event manager break dialog box trace dialog box snap-shot dialog box stub dialog box timer dialog box timer condition setting stub conditon setting snapshot condition setting trace condition setting break condition setting emulation and analyzer functions emulation chip tracer timer control signals seqx: event link detector, pasx: pass counter fig. 6-12 concept of event detection chapter 6 explanation of debugger functions 255 6.2.11 register operation functions the register operation functions are used to view and modify the general-purpose registers and sfrs. the main functions are explained below. (1) general-purpose register operation function (register window) this function is used to view and modify the control registers and general-purpose registers. y control registers: pc, sp, psw y general-purpose registers: rp0, rp1, rp2, rp3, ax, bc, de, hl, vp, up psw can also be viewed and modified using the psw flag names given below: y psw flag names: uf, rsb, s, z, rss, ac, ie, p/v, cy (2) special function register operation function (sfr window) this function is used to view and modify the special function registers (sfrs). bit operation is possible for sfrs. 6.2.12 memory operation functions the memory operation functions are used to view and modify memory using mnemonic codes, hexadecimal codes, and ascii characters. these functions can be used in the assemble and memory windows. 6.2.13 save function the save function is used to store, to a file, the object code and debugging environment on the in- circuit emulator, via the disk device connected to the host machine. 6.2.14 time measurement function this function is used to measure the total execution time from the start of execution to a break and the time from one event to another. time can be measured at up to three locations. the following table lists the specifications of the timers. item explanation number of timers three independent timers maximum measurable time approximately 14 minutes and 18 seconds minimum resolution 200 ns chapter 6 explanation of debugger functions 256 6.2.15 source debugging id78k3 can be used to debug not only object programs but also source programs. the debugging of a source program is referred to as source debugging. the debugging of a source program offers the following advantages over the debugging of an object program: ? debugging can be carried out while viewing the source, created by the editor in c or structured assembler. ? breakpoints can be set and step execution can be performed for the source. to set a breakpoint, for example, the actual address of the breakpoint must normally be set. in source debugging, on the other hand, a breakpoint can be set by specifying the position in the source program where the breakpoint is desired, using the mouse. also, in source debugging, the line of the source program that is currently being executed is indicated by a '>' during step execution. this allows the user to comprehend the operation of the program more accurately. source debugging is particularly useful when debugging a program written in c or structured assembler. note the following when performing source debugging: (1) before assembling or compiling a source program, an appropriate option must be specified so that the object program includes source debugging information. type of source program to be debugged necessary action c program specify the -g option before compiling. structured assembler program specify the -gs option before structured assembling. assembler program specify the -ga option before assembling. link specify the -g option before linking. (2) information on the path of the source program must be specified in the source path dialog box. (3) to perform source debugging, the load module file created by the linker must always be loaded. source debugging is not possible when the object file created by the object converter is loaded. appendix a error messages 257 appendix a error messages this appendix lists the error and warning messages output by id78k3. an error message consists of error number +type + message . type error number message a type is represented by an alphabetic character. there are three types: type explanation a abort error. processing is interrupted and the debugger ends. if this error occurs, debugging cannot be continued. f format (syntax) error. processing is interrupted. the currently open windows and dialog boxes are closed. w warning. processing is interrupted. the currently open windows and dialog boxes remain as is. a message contains the names of the file, variable, and device related to the error, as follows: representation in message explanation xxx low-order three digits of device name yyy file name zzz function name appendix a error messages 258 errors messages (1/11) error no. type message explanation --- -- can?t open this file. please make sure, now active window. the project file format is incorrect, or the file content has collapsed. loading the project file was discontinued. --- -- cannot find "character string". the search character was not found. the search was discontinued. alternatively, opening the specified file was discontinued because no data was in the file. --- -- event name is not set. there is no event name. specify the name of the event when adding it. --- -- event number already exist. it is impossible to add an event having the same number as an existing event. change the number of the event to be added or of the existing event. --- -- not enough memory. because of insufficient memory, a window cannot be displayed, its content cannot be changed, or changes to it cannot be retained. assign sufficient memory, and retry. --- -- other view mode window exist. two or more active windows of the same type cannot be opened simultaneously. an active window that was already open was closed. --- -- sorry, too large view file. (max is 1000 frame) the specified view file (.mem, .tvw, or .dis) contains more than 1000 lines. its display was discontinued. --- -- "event name" is already exist. it is impossible to add an event having the same name as an existing event. change the name of the event to be added or of the existing event. 0103 a send timed out data was not transmitted to the in-circuit emulator (ie). the interface board may not be correctly set or the ie may not be turned on. check the above and restart the debugger. 0104 a receive timed out no response is returned from the ie. there may be an error in the ie. check the ie and restart the debugger. appendix a error messages 259 errors messages (2/11) error no. type message explanation 0105 a invalid d3xxx.78k the device file (d3xxx.78k) was not read correctly. the device file may not exist in the specified directory or it may have been destroyed. install the device file again and restart the debugger. 01a0 a monitor timed out data was not transferred to and from the monitor program. clock pulses may not be being supplied to the target cpu or power may not be supplied. check the above and restart the debugger. 01a1 a invalid ex78kx.om0 the executor file (ex78k3.om0) was not read correctly. the executor file may not exist or may have been destroyed. install the executor file again and restart the debugger. 01a2 a unconnected break-board the break board (ie-784000-r-bk) is not correctly connected. connect the ie-784000-r-bk to the ie-784000-r correctly. 01a3 a unconnected emulation-board the emulation board (ie-784000-r-em) is not correctly connected. connect the ie-784000-r-em to the ie-784000-r correctly. 01a4 a contradictory board-set the board configuration in the ie is contradictory. reconfigure the boards and restart the debugger. 01a5 a unconnected i/o emulation-board emulation board 1 (ie-783xx-r-em1) is not correctly connected. connect the ie-783xx-r-em1 to the ie-784000-r correctly. 01a8 a invalid expc.ini the initialize file (expc.ini) was not read correctly. the initialize file may not exist or may have been destroyed. install the initialize file again and restart the debugger. 02a0 f bus hold error the bus is on hold, in which case the user program cannot be executed. 0300 f user program is running a user program is running. this command cannot be executed. 0301 f user program is stopped a user program is at a break. this command cannot be executed. 0302 f user program is tracing the tracer is running. this command cannot be executed. appendix a error messages 260 errors messages (3/11) error no. type message explanation 0303 f no tracing no trace measurement has been performed. 0304 f now, trace memory is off the tracer is off. 0305 f cannot over trace block it is impossible to move beyond a trace block. 0306 f there is no trace block there is no trace block. 0307 f there is no event-no there is no event condition. 0308 f not doing timer measurement timer measurement has not been performed. 0309 f there is no trigger frame there is no trigger frame. 030a f traces off an attempt was made to stop the tracer when it was already at a stop. 030b f no entry snap number an attempt was made to reference or delete a snapshot event that had not been registered. 030c f no entry stub number an attempt was made to reference or delete a stub event that had not been registered. 030d f timer is running the timer is running. no timer event can be changed. 030e f illegal memory range a memory copy range overlaps with another. 030f f already specified mode tracing is already on. 0310 f illegal event number no event condition has been set up. 0311 f full timer number an attempt was made to register more than three timer conditions. 0312 f not specified timer number this timer event has not been set up. 0313 f mapping range over. the specified mapping range is incorrect. an attempt was made to specify mapping that cannot be specified. 03a0 w target power off the target power supply is off. 03a1 f now stepping step execution is in progress. this command cannot be used. 03a2 f timer and tracer are running the timer and tracer are running. this command cannot be used. 0400 f illegal parameter the parameter is illegal. 0401 f result of timer measurement is over the timer has overflowed. 0402 f pass count conditions overflow more than two event conditions cannot be used simultaneously to specify a pass. 0403 f specified address range is over an attempt was made to specify more event conditions than the maximum allowable quantity for an address range. up to three execution event conditions and one bus event condition can be specified. 0404 f event conditions overflow an attempt was made to specify more event conditions than usable simultaneously. up to seven bus event conditions and three execution event conditions can be specified. 0405 f snapshot number conditions overflow an attempt was made to register more than 32,767 snapshot events. appendix a error messages 261 errors messages (4/11) error no. type message explanation 0406 f stub number conditions overflow an attempt was made to register more than 32,767 stub events. 0407 f initialized data overflow the amount of initialization data is too large to fit the initialization area. 0408 f search data number over the search data is a string consisting of more than 16 bytes. the maximum allowable size of search data is 16 bytes. 0409 f search range over the search data is larger than the search range. 04a0 f number of trigger condition overflow an attempt was made to specify more than 100 software breaks. 04a1 f emulation memory is not enough an attempt was made to map ie alternate memory in an area of 1 mbyte or more. 04a2 f bus size conditions overflow the bus size is larger than 8. an event may not be set up correctly. 04a3 f brs event conditions overflow an attempt was made to set up more than three execution event conditions. (up to three execution event conditions can be specified.) 04a4 f bra event conditions overflow an attempt was made to set up more than seven bus event conditions. (up to seven bus event conditions can be specified.) 05a0 a evade runaway hardware the ie is unstable. the ie was reset to bring the user program to a break forcibly. 0600 a communication buffer error the area for the buffer used for exchanging data with the ie was not reserved. end other ms- windows applications, change the setting of the ms-windows swap file, or install additional main memory in the host machine. 1000 a failure in initialization an attempt to initialize the ie failed. check whether the ie is abnormal. 1003 f illegal relocation address it is impossible to relocate to a specified address. 1004 f illegal parameter the parameter is illegal. 1006 f illegal address the address is illegal. 1007 a not enough substitute memory an attempt was made to map ie alternate memory in an area of 1 mbyte or more. 100b f program is running a user program is running. this command cannot be executed. 100c f different bussize an attempt was made to make duplicate specification in areas having different bus sizes. 100d f total maximum over an attempt was made to specify a bus larger than the maximum size (8). 100e f enable maximum over the bus size is larger than 8. 100f w wrong target status(power off) the target state is unstable. 10ff a communication error it is impossible to communicate with the ie. check whether the ie is abnormal. appendix a error messages 262 errors messages (5/11) error no. type message explanation 2000 f illegal sfr name the sfr name is illegal. 2002 f user program is running a user program is running. this command cannot be executed. 2003 f illegal sfr number an attempt was made to access a nonexistent sfr. 2004 f illegal bit number there is no bit sfr at the specified bit position. 2005 w redraw sfr name the sfr has been disabled from redrawing. 2006 f this sfr is hidden sfr this sfr is not open to general use. it is impossible to display or change data for the sfr. 2007 f can't read/write an attempt was made to write to a write-protected sfr or read from a read-protected sfr. 2008 f too big number the specified sfr was not found. 200a f illegal bit pattern an attempt was made to specify an illegal value for an sfr. 20ff a communication error communication with the ie is impossible. check whether the ie is abnormal. 3000 f illegal address the address is illegal. 3001 f different data there is a memory content mismatch. 3002 f illegal source address the specified source address range does not fall within the mapping range (during a memory search, comparison, or copy). 3003 f illegal destination address the specified destination address range does not fall within the mapping range (during a memory search, comparison, or copy). 3004 f illegal address (source & destination) the specified address range does not fall within the mapping range (during a memory search, comparison, or copy). 3005 f illegal parameter the parameter is illegal. 3006 f user program is running a user program is running. this command cannot be executed. 3008 f no parameter there is no parameter. 3009 f parameter size alignment error the parameter size is illegal. change the parameter according to the memory access size. 300a f memory alignment error the address value is illegal. change the address value according to the memory access size. 300b f source start address alignment error the source address is illegal. change the source address according to the memory access size. 300c f error, destination start address alignment error in the destination address range, a memory range with a conflicting access memory size was specified. 300d f end address alignment error the end address is illegal. change the end address according to the memory access size. 300e f different access size in this area in the address range, a memory range with a conflicting access memory size was specified. 300f f different access size in source area in the source address range, a memory range with a conflicting access memory size was specified. appendix a error messages 263 errors messages (6/11) error no. type message explanation 3010 f different access size in destination area in the destination address range, a memory range with a conflicting access memory size was specified. 3011 f different access size, source & destination the access size conflicts between the source and destination address ranges. 30ff a communication error communication with the ie is impossible. check whether the ie is abnormal. 4000 f number is referenced now the specified event condition cannot be deleted. 4001 f illegal table number the specified table number is illegal. 4002 f illegal start address the start address is illegal. 4003 f illegal end address the end address is illegal. 4004 f illegal status the status is illegal. 4005 f illegal data the data is illegal. 4006 f can't action number an attempt was made to use an event number that was already in use. 4007 f can't empty number an attempt was made to register more than 32,767 events of the same type. 4008 f table not found the specified event has not been registered. 4009 f illegal data size the data size is illegal. 400a f illegal type mode the mode is illegal. 400b f illegal parameter the parameter is illegal. 400c f illegal type number the type is illegal. 400d f table overflow an attempt was made to register more than 32,767 events of the same type. 400e f no entry event number the specified event does not exist. 400f f illegal elink data an event condition specified with a range condition or pass condition was used as an event link condition. alternatively, only one event condition was specified. 4010 f function not found the specified function was not found. 4011 a no free memory there is no sufficient memory. end unnecessary applications, or close the debugger window. 4012 f timer not enabled the timer is disabled. enable it if timer measurement must be made. 4013 w data access size mismatch at the bus size the access size in an event condition does not match the bus size for mapping. 4014 f can't use software break at present, no software break can be used. specify that a software break be usable, using the extended option dialog box. 4015 f not point-address it is impossible to use, as an address condition, an event condition specifying a range. 4016 f not renew event condition. this event condition is being used for another event. it is impossible to change the address range condition or pass count condition. 4017 f specified odd-address by word-access. the data value was not detected in word data beginning at an odd address. do not include that data value in the setting. appendix a error messages 264 errors messages (7/11) error no. type message explanation 5000 a illegal type number the type is illegal. 5002 a illegal file name the device file cannot be opened. 5003 a cannot file seek an attempt to seek the file failed. 5004 a cannot file close an attempt to close the file failed. 5005 a illegal device format the format of the device file is illegal. 5006 a cannot device initialize an attempt to initialize the ie failed. 5007 a illegal device information there is no device information. 5008 f cannot open device file the specified device file cannot be opened. 5009 f cannot open ex78kx.om0 file the ex78k3.om0 cannot be opened. 500a f no match device file of version the version of the device file is illegal. 500b w device has no relocatable iram. the currently selected device does not support relocation in internal ram. 6001 f illegal entry symbol name the symbol name is illegal. 6002 f illegal parameter the parameter is illegal. 6003 f illegal entry function name the function name is illegal. 6004 f out of buffer flow function display in the stack window is incomplete. the maximum allowable line size is 512 characters. 6005 f illegal expression the expression is illegal. 7001 f user program is running a user program is running. this command cannot be executed. 7002 f user program is stopped a user program is at a break. this command cannot be executed. 7003 f trace function is active the tracer is running. this command cannot be executed. 7004 f trace memory is off the tracer is off. 7005 f no return address, can't execute the return address of the current function was not found. step execution based on the return command is not carried out. 7010 w warning, no source line information instruction-level step execution was carried out because there was no source information. 7012 a not enough memory there is no sufficient memory. end unnecessary applications, or close the debugger window. 70fe a bus hold error the bus is on hold. the user program cannot be executed. 70ff a communication error communication with the ie is impossible. check whether the ie is abnormal. 7801 f step wait canceled step execution was discontinued. so, communication with the ie may become impossible. 7802 f step aborted an illegal access break occurred during step execution. check the user program. appendix a error messages 265 errors messages (8/11) error no. type message explanation 7f00 f interrupted step step execution was forced to end. 7f02 f suspended step step execution was suspended. 7f03 a run/step cancel failed. cpu resetted an attempt to break the user program failed. the ie is unstable because the evaluation chip was reset. make sure that the ie is normal, then restart it. 7f04 f illegal address an attempt was made to execute in an non- mapped area. 8000 f file not found the file was not found. 8001 f illegal line number the line number is illegal. 8002 f current data is not set the current information has not been set. 8003 f ilegal address the address is illegal. 9002 f illegal set value the specified value cannot be set in a register. specify a value that can be set. a001 f illegal expression the expression is illegal. a002 f start address bigger than end address the start address is greater than the end address (start address > end address). check the addresses. a003 f source path not found the specified source path information is illegal. specify the correct source path information. a004 f expression is too big the size of the expression is greater than 127 characters. a005 a not enough memory there is no sufficient memory. end unnecessary applications, or close the debugger window. a006 f illegal argument the argument is illegal. a008 f source path not set the source path has not be specified. a009 f file not found the file was not found. a00a f file not open the file cannot be opened. a00b a file not close an attempt to close the file failed. a00c a file not read an attempt to read the file failed. it is likely that the file has collapsed. a00d f not source file of lm the specified source file has not been registered for the load module file. a file not registered for the load module file cannot be displayed in the source window. a00e f illegal line number the line number is illegal. a00f f illegal variable the variable does not exist. a010 a communication failed communication with the ie is impossible. check whether the ie is abnormal. a011 f can't access register the register cannot be accessed. check the ie. appendix a error messages 266 errors messages (9/11) error no. type message explanation a012 f can't access memory the specified memory (variable) cannot be accessed. check the ie or map setting. b000 f command line error the parameter is illegal. b001 f task type not found the load module file does not contain program information. b002 f file not found the file was not found. b003 f function not found the specified function was not found. b004 f illegal magic number the magic number for the load module file is illegal. b005 f symbol not found the symbol was not found. b008 f illegal value the expression is illegal. b009 a not enough memory there is no sufficient memory. end unnecessary applications, or close the debugger window. b00a f illegal symbol entry there is an illegal symbol in the load module file. it is likely that there is a bug related to the programming language. b00b f current type noting there is no debug information. load the load module file. b00c f current file noting there is no current source file. alternatively the source file cannot be opened because the load module file has not be loaded. b012 f line number too large the line number is illegal. b015 a read error an attempt to read the file failed. it is likely that the file has collapsed. b016 a open error the file cannot be opened. b017 a write error an attempt to write to the file failed. b019 a seek error an attempt to seek the file failed. b01a a close error an attempt to close the file failed. b01d f address not found there is no source line that corresponds to the current pc value. b01e f no line information(not compile with -g) there is no source line information in the load module file. attach the debug option, and carry out recompilation, assembly, and linkage. b01f f cannot find member no member was found in the specified structure. b020 f cannot find value the specified enumeration constant is illegal. b021 f striped lm there is no symbol information in the load module file. b022 f null statement line the line number is illegal. b026 f max dimension array over a four-dimensional or greater-scale array cannot be displayed. b027 f end of file the file is not complete. b029 f illegal address the address is illegal. appendix a error messages 267 errors messages (10/11) error no. type message explanation b02a a communication failed communication with the ie is impossible. check whether the ie is abnormal. b02b f no stack frame point stack tracing is impossible with the current pc value. b02c f max block overflow the maximum number of blocks in one function is exceeded. the function cannot be displayed. (the maximum number of blocks per function is 256.) b02d f illegal argument the argument is illegal. c001 f cannot open file the file cannot be opened. c002 a cannot close file an attempt to close the file failed. c003 a cannot read file an attempt to read the file failed. it is likely that the file has collapsed. c004 a cannot seek file an attempt to seek the file failed. c005 f illegal file type the format of the file is illegal. this file cannot be handled. c006 f illegal magic number the magic number for the load module file is illegal. c007 f this file is not load-module file the specified file is not a load module file. c008 f old coff version the version of the load module file is illegal. c009 a not enough memory there is no sufficient memory. end unnecessary applications, or close the debugger window. c00a f illegal address the address is illegal. c00b f lm not load the load module file has not been loaded. c00c f illegal argument this is an internal error. c00d f user program is emulating a user program is running. this command cannot be executed. c00e f user program is tracing the tracer is running. this command cannot be executed. c010 a communication failed communication with the ie is impossible. check whether the ie is abnormal. c011 f illegal file format the format of the load module file (lnk) is illegal. c012 f check sum error a checksum error occurred in reading the load module file. check the load module file. c013 f too big size the address range for uploading has exceeded 1 mbytes. c014 f cannot write file an attempt to write to the file failed. c100 f not support the tektronix format is not supported. appendix a error messages 268 errors messages (11/11) error no. type message explanation d001 f not enough memory there is no sufficient memory. end unnecessary applications, or close the debugger window. e000 f illegal argument this is an internal error. e001 f illegal start address the start address is illegal. e002 f illegal end address the end address is illegal. e003 f size too long the address value is illegal. e004 f can't open file the specified file cannot be opened. e005 f can't read file an attempt to read the file failed. it is likely that the file has collapsed. e006 f can't seek file an attempt to seek the file failed. e007 f can't write file an attempt to write to the file failed. e008 f not enough memory there is no sufficient memory. end unnecessary applications, or close the debugger window. e009 f illegal file format the format of the file is illegal. appendix b key functions 269 appendix b key functions debugging can be carried out more effectively when id78k3 is operated using the special function keys. in the following explanation of the special function keys, general key representations (generic key representations) are used. for the ibm-pc/at series, the key representations may differ slightly depending on the keyboard type. b.1 functions of special function keys key function pc-9801 and 9821 series ibm-pc/at series bs backspace deletes the character immediately before the cursor and moves the cursor to the position of the deleted character. the character string following the cursor is moved back. copy printscreen captures the entire screen into the clipboard as a bit image. (windows function) esc esc c closes the pulldown menu. d closes the modal dialog box. grph alt moves the cursor to the menu bar. help end displays the last line. also, the cursor is positioned to the last line. home clr home displays the first line. also, the cursor is positioned to the first line. roll up pageup scrolls the display up by one screen. also, the cursor is positioned to the top of the screen. roll down pagedown scrolls the display down by one screen. also, the cursor is positioned to the top of the screen. space space inserts one blank. tab ta b positions the cursor to the next item. moves the cursor up. scrolls the screen down by one line when the cursor is positioned to the top of the screen. moves the cursor down. scrolls the screen up by one line when the cursor is at the bottom of the screen. moves the cursor to the left. scrolls the screen to the right by one item when the cursor is in the leftmost column. moves the cursor to the right. scrolls the screen to the left by one item when the cursor is in the rightmost column. ? ? confirms input data. appendix b key functions 270 b.2 functions of special function keys ( ctrl + key) key (common to the pc-9801, 9821, and ibm-pc/at series) function a using the data value in the current window as an address to jump to, disassembles and displays the program starting from that address. opens the assemble window. b sets a breakpoint in a selected line. c copies a selected character string to the clipboard buffer. f switches a window to modify mode. this has the same effect as clicking the button. g executes a program. this has the same effect as clicking the button. h switches a window to the hold state. i switches a window to the active state. m using the data value in the current window as an address to jump to, displays the contents of memory starting from that address. opens the memory window. o if the source window is current: allows the user to select a source view file. opens the source file select dialog box. otherwise: displays an appropriate view file in the current window. opens the view file save dialog box. p stops the execution of a program. this has the same effect as clicking the button. r performs step execution until control returns to the calling function. this has the same effect as clicking the button. s saves the contents of the current window to a view file. t performs step execution. this has the same effect as clicking the button. u using the data value in the current window as an address to jump to, displays an appropriate source text and source line. opens the source window. v pastes the contents of the clipboard buffer to the text cursor position. w switches a window to view mode. this has the same effect as clicking the button. x performs next step execution. this has the same effect as clicking the button. z cancels the previous editing operation. appendix c menus 271 appendix c menus this appendix lists the menus supported by id78k3. symbols used in the menu lists symbol meaning [item] item on a menu bar no symbol item in a pull-down menu (arrow) item in a cascaded menu the number of arrows corresponds to the nesting level. table c-1 main window (1/5) menu mnemonic explanation [file] open... ctrl+o opens a file. save ctrl+s saves the contents of the current window into the view file. save as... save the contents of the current window into a view file having a different name. close closes the current window. print print the contents of the current window. down load... downloads a program. up load... uploads a program. open/save project open project... open a project file. save overwrites the project file with the current debugging environment. save as... saves the current debugging environment into a project file. open/save log records the history of execution. exit exits from the debugger. [edit] undo ctrl+z cancel the most recent editing. copy ctrl+c copies a selected character string into the clipboard buffer. paste ctrl+v pastes the contents of the clipboard buffer at the point to which the text cursor is positioned. write in writes the modified contents into the target device. restore cancels the modified contents. memory memory fill... initializes memory. memory copy... copies the contents of memory memory compare... compares the contents of memory. file compare... compares the view file with the contents of memory. appendix c menus 272 table c-1 main window (2/5) menu mnemonic explanation [view] search... searches for a character string or numerical value. address... displays the contents of memory at a specified address. view variable... displays the value of a specified variable temporarily. watch variable... displays the value of a specified variable continuously. add variable... adds a variable to the variable window. sym to adr... converts symbols. delete deletes a specified value. bin selects binary display format. oct selects octal display format. dec selects decimal display format. hex selects hexadecimal display format. proper selects a default display format for each variable. event ? displays event information. memory nibble displays data in nibble format. byte displays data in byte format. word displays data in word format. long displays data in long format. ascii switches on or off ascii view mode. sfr address sort selects alphabetic display order or display in order of addresses. pick up displays only modified sfrs. attribute show displays the attribute view area. hide hides the attribute view area. compulsion read performs forced reading of a read-protected sfr. synchronize writes the modified sfrs to the target device. trace view frame show displays the frame number field. hide hides the frame number field. timetag show displays the time tag field. hide hides the time tag field. instruction fetch address show displays the instruction fetch address field. hide hides the instruction fetch address field. appendix c menus 273 table c-1 main window (3/5) menu mnemonic explanation instruction fetch data bin displays instruction fetch field data in binary format. oct displays instruction fetch field data in octal format. dec displays instruction fetch field data in decimal format. hex displays instruction fetch field data in hexadecimal format. hide hides instruction fetch field data. instruction fetch status show displays the instruction fetch status. hide hides the instruction fetch status. memory access address show displays the memory access address field. hide hides the memory access address field. memory access data bin displays memory access field data in binary format. oct displays memory access field data in octal format. dec displays memory access field data in decimal format. hex displays memory access field data in hexadecimal format. hide hides memory access field data. memory access status show displays the memory access status. hide hides the memory access status. external probe bin displays external sense field data in binary format. oct displays external sense field data in octal format. dec displays external sense field data in decimal format. hex displays external sense field data in hexadecimal format. hide hides external sense field data. jump address show displays the jump address field. hide hides the jump address field. disassemble show displays the disassembly view field. hide hides the disassembly view field. open frame... specifies a view frame number. pick up... selects a view frame. coverage 1 byte displays data in 1-byte units. 64 byte displays data in 64-byte units. 1024 byte displays data in 1024-byte units. appendix c menus 274 table c-1 main window (4/5) menu mnemonic explanation [option] tool bar displays or hides the tool bar. status bar displays or hides the status bar. button displays or hides the buttons in the window. source mode selects the source mode. instruction mode selects the instruction mode. configuration... sets the environment. source path... sets source path information. extended option... sets extended options. [execute] stop ctrl+p stops the execution of a program. go ctrl+g executes a program. return ctrl+r executes a program, step by step, until control is returned to the calling function. step ctrl+t executes a program step by step. next ctrl+x performs next step execution of a program. go & go repeatedly executes a program. go & come executes a program up to a specified address. slowmotion continues step-by-step execution. cpu reset & go resets the cpu before starting execution. cpu reset... resets the cpu. set bp ctrl+b sets a breakpoint. set pc sets the address in the program counter. uncond. trace on sets unconditional tracing. cond. trace on sets conditional tracing. trace off disables the tracer. coverage on enables coverage measurement. coverage off disables coverage measurement. [operation] active ctrl+i put the window in the active state. hold ctrl+h put the window in the hold state. tomodify ctrl+f puts the window in modify mode. to v i e w ctrl+w puts the window in view mode. window connect sourcetext links to the source window. assemble links to the assemble window. memory links to the memory window. appendix c menus 275 table c-1 main window (5/5) menu mnemonic explanation [browse] sourcetext... opens the source window. variable... opens the variable window. assemble... opens the assemble window. memory... opens the memory window. register... opens the register window. stack trace... opens the stack window. sfr... opens the sfr window. local variable... opens the local variable window. breakset... opens the break dialog box. timer... opens the timer dialog box. stub set... opens the stub dialog box. trace traceset... opens the trace dialog box. traceview... opens the trace view dialog box. snapshottraceset... opens the snap-shot dialog box. event eventset... opens the event set dialog box. eventmanager... opens the event manager. eventlinkset... opens the event link dialog box. coverage view... opens the coverage window. clear... opens the coverage memory clear dialog box. condition... opens the coverage condition setting dialog box. efficiency... opens the coverage efficiency view dialog box. [jump] sourcetext... ctrl+u jumps to the source window. assemble... ctrl+a jumps to the assemble window. memory... ctrl+m jumps to the memory window. [window] cascade displays the window in cascade style. tile displays the window in tile style. arrange icons re-arranges the icons. close all closes all windows except the main window. [help] about... displays the information about the version. appendix c menus 276 table c-2 event manager menu mnemonic explanation [file] open... opens an event setting file. save saves the current event settings into the event setting file, overwriting the previously saved setting. save as... saves the current event settings into a specified event setting file. close closes the event manager. print prints the event registration/setting information. [edit] undo cancel the most recent editing. copy copies a specified icon using a different name. all select selects all icons. delete deletes a specified icon. [view] name sorts the icons into event name order. kind sorts the icons into event type order. detail switches between normal view and detail view. [operation] breakset... opens the break dialog box. timer... opens the timer dialog box. stubset... opens the stub dialog box. traceset... opens the trace dialog box. snapshottraceset... opens the snap-shot dialog box. eventset... opens the event set dialog box. eventlinkset... opens the event link dialog box. [jump] sourcetext... jumps to the source window. assemble... jumps to the assemble window. memory... jumps to the memory window. appendix c menus 277 table c-3 register window menu mnemonic explanation [file] open/save condition open condition... opens the selected file for reference. save condition saves the contents of the window into a view file. save file as... saves the current event settings into a specified view file. close closes the register window. [edit] undo cancel the most recent editing. copy copies a selected character string into the clipboard buffer. paste pastes the contents of the clipboard buffer at the point to which the text cursor is positioned. write in writes the modified contents into the target device. restore cancels the modified contents. [view] absolute name displays absolute register names. functional name displays functional register names. register displays registers individually. register pair displays register pairs. bin displays data in binary format. oct displays data in octal format. dec displays data in decimal format. hex displays data in hexadecimal format. [operation] active puts the register window in the active state. hold puts the register window in the hold state. tomodify puts the register window in modify mode. to v i e w puts the register window in view mode. [jump] sourcetext... jumps to the source window. assemble... jumps to the assemble window. memory... jumps to the memory window. appendix c menus 278 table c-4 variable window menu mnemonic explanation [file] open/save condition open condition... opens the selected file for reference. save condition saves the contents of the window into a view file. save file as... saves the currents of the window into a specified view file. close closes the variable window. [edit] undo cancel the most recent editing. copy copies a selected character string into the clipboard buffer. paste pastes the contents of the clipboard buffer at the point to which the text cursor is positioned. write in writes the modified contents into the target device. restore cancels the modified contents. [view] bin displays variable values in binary format. oct displays variable values in octal format. dec displays variable values in decimal format. hex displays variable values in hexadecimal format. proper displays variable values in default format for each variable. [operation] active puts the variable window in the active state. hold puts the variable window in the hold state. tomodify puts the variable window in modify mode. to v i e w puts the variable window in view mode. delete removes a specified variable from the variable window. index 279 a active state ..........................................................31 address .................................................................5 addressing.........................................................105 ascii view ................................................... 48, 118 b break cause.........................................................44 break event set function .............................. 86, 111 break function..............................................42, 242 break mode .................................................64, 230 break point set/delete function .................... 85, 110 button arrow button...................................................28 function button ..............................................27 pushbutton.....................................................27 radio button...................................................28 c character set .........................................................2 check box............................................................27 click.....................................................................27 clock selection function...............................58, 231 connecting the devices .......................................10 coverage clear ............................................................212 condition setting ..........................................208 displaying ....................................................202 efficiency......................................................205 cpu status ..........................................................43 current file ...........................................................24 current function ...................................................25 d debug mode instruction level ..............................................24 source level ...................................................24 debug windows ...................................................38 debugger files .....................................................16 delay count........................................................160 dialog box auxiliary dialog box ........................................37 confirmation dialog box .................................37 modal dialog box............................................ 36 modeless dialog box ...................................... 36 selection dialog box....................................... 36 setting dialog box .......................................... 37 specification dialog box ................................. 36 view dialog box.............................................. 37 view/setting dialog box .................................. 37 dip switch settings ie-70000-98-if-a ........................................... 11 ie-70000-98-if-b ........................................... 11 ie-70000-pc-if-b.......................................... 14 disassembly ...................................................... 108 double-click......................................................... 27 drag & drop ......................................................... 27 drop-down list ..................................................... 30 e emulation cpu selection..................................... 58 emulation execution function ............................ 235 emulation mode ................................................ 230 environment ........................................................ 10 error/warning....................................... 32, 223, 257 event break event condition .................................. 154 event condition ............................................ 131 event link condition...................................... 146 event management ..................................... 137 snapshot event condition ............................ 165 stub event condition .................................... 172 timer event condition .................................. 176 trace event condition .................................. 158 event display function.................................. 85, 110 event setting and detection functions................ 251 execution control................................................. 41 exiting.......................................................... 22, 228 expc.ini file ....................................................... 17 expression............................................................. 7 external sense clip ............................................ 135 external sense data........................... 135, 187, 190 f fail-safe break................................................... 244 file....................................................................... 24 file specification.................................................... 3 font ..................................................................... 84 index 280 function specification ..........................................25 g gui ........................................................................1 h hold state ............................................................31 i icon........ 55, 87, 104, 114, 119, 130, 187, 201, 204 ie status...............................................................43 installation 98note.........................................................13 ibm-pc/at.....................................................14 pc-9801 and 9821.........................................10 interface board ie-70000-98-if-a ...........................................12 ie-70000-98-if-b ...........................................12 ie-70000-98n-if ............................................13 ie-70000-pc-if-b ..........................................15 j jump function ....................... 83, 86, 108, 112, 115, 117, 129, 140, 193, 203 k key functions .....................................................269 l line specification .................................................26 load function .................................66, 72, 214, 233 m mapping function ...............................................232 mark...................................................................139 memory comparing ...................................................124 copying........................................................122 initializing .....................................................120 operation .............................................115, 255 menu bar .................................28, 44, 97, 142, 195 menus................................................................271 modify mode........................................................ 31 monitoring.............................................................. 1 mouse.................................................................. 27 n non-real-time execution functions............. 235, 239 numeric value ....................................................... 4 o on-line assembly............................................... 108 operands............................................................... 4 operator ................................................................ 8 p pass count................................................. 136, 148 pin mask.............................................................. 59 point mark ........................................... 84, 110, 183 power supply voltage selection ........................... 59 program counter set function .......................86, 111 project file...................................................... 66, 69 pull-down menu................................................... 29 r real-time execution........................................... 235 real-time ram sampling............................... 26, 64 register ................................................................. 5 register operation functions.............................. 255 register view..................................................... 192 reset function ........................................... 224, 232 s save function................................. 69, 75, 218, 255 scroll bar ............................................................. 28 search ................................................................. 88 search condition.................................................. 89 search data ......................................................... 89 search direction .................................................. 89 sfr view ........................................................... 198 slider ................................................................... 28 snapshot function...................................... 165, 250 software break ...................................... 64, 85, 243 index 281 source debugging .............................................256 source file............................................................80 source path .........................................................78 source text view ..................................................86 stack frame number ....................................25, 128 starting ................................................................21 status bar ......................................................29, 43 step execution...............................................42, 51 structure ..............................................................25 stub function......................................................250 symbol...................................................................6 symbol-to-address conversion ............................91 system operating mode.....................................230 system operating state......................................231 t temporary break ...............................................243 term ......................................................................9 time measurement function......................176, 255 timer .................................................................176 tool bar..........................................................29, 42 trace function....................................................245 trace mode ...............................................160, 247 trace view .........................................................182 v variable displaying ........................................ 93, 95, 102 specifying ............... 92, 94, 101, 107, 133, 134, 168, 174, 210, 213, 221 version .............................................................. 226 view mode........................................................... 31 w wild cards ............................................................. 3 window execution window .......................................... 33 management window..................................... 35 view window .................................................. 34 view/setting window ...................................... 34 window linkage function ..............86, 112, 117, 184 write mode.......................................................... 65 |
Price & Availability of USAB10ID78K3
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |