background image

FUJITSU SEMICONDUCTOR
CONTROLLER MANUAL

F

2

MC-16 FAMILY

SOFTUNE

TM

 Workbench

USER'S MANUAL

CM41-00313-6E

Содержание SOFTUNE F2 MC-16

Страница 1: ...FUJITSU SEMICONDUCTOR CONTROLLER MANUAL F2 MC 16 FAMILY SOFTUNETM Workbench USER S MANUAL CM41 00313 6E ...

Страница 2: ......

Страница 3: ...FUJITSU SEMICONDUCTOR LIMITED F2 MC 16 FAMILY SOFTUNETM Workbench USER S MANUAL ...

Страница 4: ......

Страница 5: ...products names are trademarks or registered trademarks of their respective companies Trademarks REALOS SOFTUNE are trademark of Fujitsu Semiconductor Limited Japan Note F2 MC is the abbreviation of FUJITSU Flexible Microcontroller Microsoft Windows and Windows Media are either registered trademarks of Microsoft Corporation in the United States and or other countries The company names and brand nam...

Страница 6: ...ontained herein The products described in this document are designed developed and manufactured as contemplated for general use including without limitation ordinary industrial use general office use personal use and household use but are not designed developed and manufactured as contemplated 1 for use accompanying fatal risks or dangers that unless extremely high safety is secured could have a s...

Страница 7: ...n of this manual the summary about the section is described certainly so you can grasp an outline of this manual if only you read these summaries And the title of upper section is described in lower section so you can grasp the position where you are reading now ...

Страница 8: ...iv ...

Страница 9: ...Line Assembly and Disassembly 25 1 17 Symbolic Debugging 26 1 17 1 Referring to Local Symbols 28 1 17 2 Referring to Variable of C Language 29 CHAPTER 2 DEPENDENCE FUNCTIONS 31 2 1 Simulator Debugger 32 2 1 1 Setting Operating Environment 34 2 1 1 1 Boot ROM File Automatic Execution 35 2 1 2 Instruction Simulation 36 2 1 3 Memory Simulation 37 2 1 4 I O Port Simulation 38 2 1 5 Interrupt Simulatio...

Страница 10: ...ffer Full Break 86 2 2 5 7 Forced Break 87 2 2 6 Events 88 2 2 6 1 Operation in Normal Mode 90 2 2 6 2 Operation in Multi Trace Mode 92 2 2 6 3 Operation in Performance Mode 94 2 2 7 Control by Sequencer 96 2 2 7 1 Setting Sequencer 97 2 2 7 2 Break by Sequencer 99 2 2 7 3 Trace Sampling Control by Sequencer 100 2 2 7 4 Time Measurement by Sequencer 102 2 2 7 5 Sample Flow of Time Measurement by S...

Страница 11: ...ace Buffer Full Break 159 2 3 4 7 Performance Buffer Full Break 160 2 3 4 8 External Trigger Break 161 2 3 4 9 Forced Break 162 2 3 5 Control by Sequencer 163 2 3 5 1 Setting Sequencer 165 2 3 6 Real time Trace 167 2 3 6 1 Setting Single Trace 170 2 3 6 2 Multi Trace 171 2 3 6 3 Setting Methods of Multi Trace 174 2 3 6 4 Displaying Trace Data Storage Status 176 2 3 6 5 Specify Displaying Trace Dat...

Страница 12: ...4 6 Measuring Execution Cycle Count 232 2 5 Emulator Debugger MB2198 233 2 5 1 Setting Operating Environment 234 2 5 1 1 Monitoring Program Automatic Loading 235 2 5 1 2 Boot ROM File Automatic Execution 236 2 5 1 3 MCU Operation Mode 237 2 5 1 4 Operation Frequency Control 238 2 5 2 Notes on Commands for Executing Program 239 2 5 3 Commands Available during Execution of User Program 240 2 5 4 Bre...

Страница 13: ...pt the Program Execution Break 293 2 6 6 1 Code Break Hardware 294 2 6 6 2 Code Break Software 296 2 6 6 3 Data Break 297 2 6 6 4 Forced Break 298 2 6 6 5 Data Watch Break 299 2 6 6 6 Sequencer 301 2 6 7 Measuring the Program Execution Cycle Count 304 2 6 8 Measuring Event to Event Execution Cycle Count Performance Measurement 306 2 6 8 1 Measuring Performance 308 2 6 9 Viewing Program Execution H...

Страница 14: ...x ...

Страница 15: ...unction 1 5 Include Dependencies Analysis Function 1 6 Functions of Setting Tool Options 1 7 Error Jump Function 1 8 Editor Functions 1 9 Storing External Editors 1 10 Storing External Tools 1 11 Macro Descriptions Usable in Manager 1 12 Setting Operating Environment 1 13 Debugger Types 1 14 Memory Operation Functions 1 15 Register Operations 1 16 Line Assembly and Disassembly 1 17 Symbolic Debugg...

Страница 16: ... and undergoes Make Build Compile Assemble Start Debug and Update Dependence in the menu Make Build Compile Assemble and Update Dependence affect the subprojects within the active project If workspace contains some project it always has one active project Subproject The subproject is a project on which other projects depend The target file in the subproject is linked with the parent project of the...

Страница 17: ...Workbench versions When a new project is made the workspace project format is used When using an existing project the corresponding project format is used If a project made by an early Workbench version is used a dialog asking whether to convert the file to the workspace project format is displayed For details refer to Section 2 13 Reading SOFTUNE Project Files of Old Versions of SOFTUNE Workbench...

Страница 18: ...gger to debug target file Active Project Configuration The active project configuration at default undergoes Make Build Compile Assemble Start Debug and Update Dependence The setting of the active project configuration is used for the file state displayed in the SRC tab of project window and includes files detected in the Dependencies folder Note If a macro function newly added is used in old proj...

Страница 19: ...endence menu The subproject is a project on which other projects depend By defining project dependence a subproject can be made and built to link its target file before making and building the parent project The use of project dependence enables simultaneous making and building of two or more projects developed in one workspace A project configuration in making and building a subproject in Project...

Страница 20: ...e dependence of a source file and include file SOFTUNE Workbench has the function for analyzing the include file dependence For details see Section 1 5 Include Dependencies Analysis Function Build Function Build function generates a target file by compiling assembling all source files registered with a project regardless of whether they have been updated or not and then by joining all required obj...

Страница 21: ...he options include any file name and tool specific options SOFTUNE Workbench has the macros indicating that any file name and tool specific options are specified as options If any character string other than parameters is specified it is passed directly to the tool For details about the parameters see Section 1 11 Macro Descriptions Usable in Manager Macro List The Setup Customize Build dialog pro...

Страница 22: ...ded until the tool is terminated The Output window must not be used with a tool using a wait state for user input while the tool is executing The user can not perform input while the Output window is in use so the tool cannot be terminated To forcibly terminate the tool select the tool on the Task bar and input Control C or Control Z ...

Страница 23: ...de files For this reason SOFTUNE Workbench has a built in Include Dependencies Analysis function This function can be activated by selecting the Project Include Dependencies menu By using this function uses can know the exact dependencies even if an include file includes another include file SOFTUNE Workbench automatically updates the dependencies of the compiled assembled files Note When executin...

Страница 24: ... option setting refer to Section 4 5 5 Setup Project of SOFTUNE Workbench Operation Manual Common options These options are effective for all source files excluding those for which individual options are specified stored in the project Individual options These options are compile assemble options effective for specific source files The common options specified for source files for which individual...

Страница 25: ...ese can not be modified A new error message format should be added when working the Error Jump function with user register To set Error Jump execute the Setup Error Jump Setting menu Syntax An error message format can be described in Syntax SOFTUNE Workbench uses macro descriptions as shown in the Table 1 7 1 to define such formats To analyze up to where f h and continue SOFTUNE Workbench uses the...

Страница 26: ...our characters are followed by the file name and parenthesized page number and then the keyword for help continues after one blank character This represents the following message C Sample sample c 100 E4062C Syntax Error near int Reference Section Setup Error Jump ...

Страница 27: ... function The Ruler is a measure to find the position on a line it is displayed at the top of the Edit window A line number is displayed at the left side of the Edit window Automatic indent function When a line is inserted using the Enter key the same indent indentation as the preceding line is set automatically at the inserted line If the space or tab key is used on the preceding line the same us...

Страница 28: ...f file to be opened by the editor and the initial location of the cursor the line number can be specified SOFTUNE Workbench has a set of special parameters for specifying any file name and line number as shown in the Table 1 9 1 If any other character string are described by these parameters such characters string are passed as is to the editor f File name is determined as follows 1 If the focus i...

Страница 29: ...g the same file in Hidemaru and Opening two identical files is inhibited Table 1 9 1 List of Special Characters for Analyzing Error Message Parameter Semantics Means specifying itself f Means specifying file name l Means specifying line number x Means specifying project path Table 1 9 2 Example of Optional Settings Editor name Argument WZ Editor V4 0 f j l MIFES V1 0 f l UltraEdit32 f l 1 TextPad3...

Страница 30: ...etting Options When activating an external tool from SOFTUNE Workbench options must be added immediately after the external tool name Specify the file names and unique options etc SOFTUNE Workbench has a set of special parameters for specifying any file name and unique tool options If any characters string described other than these parameters such characters string are passed as is to the externa...

Страница 31: ...d for Error Jump and External Editors see Sections 1 7 Error Jump Function and 1 9 Storing External Editors Macro List The following is a list of macros that can be specified in SOFTUNE Workbench The macros usable for each function are listed below External tools Table 1 11 1 and Table 1 11 2 Customize build Table 1 11 1 and Table 1 11 2 Tool options Table 1 11 2 The directory symbol is added to t...

Страница 32: ...ule file 2 E Passed as extension of load module file 2 x Passed as directory of project file 2 X Passed as main file name of project file 2 Passed as Table 1 11 2 List of Macros That Can Be Specified 2 Parameter Meaning FILE Passed as full path name of file 1 LOADMODULEFILE Passed as full path name of load module file 2 PRJFILE Passed as full path name of project file 2 WSPFILE Passed as full path...

Страница 33: ... workspace project format 4 The content of a temporary file can be specified only with customize build The macro can be used only the project of workspace project format Examples of Macro Expansion If the following workspace is opened macro expansion is performed as follows Workspace C Wsp Wsp wsp Active project C Wsp Sample Sample prj Active project configuration Debug Object directory C Wsp Samp...

Страница 34: ...Example Macro expansion in customize build Release configuration of Subprj project is built FILE C Subprj LongNameFile c FILE PATH C Subprj FILE RELPATH FILE NAME LongNameFile FILE EXT c FILE SHORTFULLNAME C Subprj LongFi 1 c FILE SHORTPATH C Subprj FILE SHORTNAME LongFi 1 PRJFILE RELPATH Subprj PRJPATH C Subprj OBJPATH C Subprj Release Obj PRJCONFIG Release ENV FETOOL C SOFTUNE TEMPFILE C Subprj ...

Страница 35: ...ast worked on Project Display options while compiling assembling Compile options or assemble options can be viewed in the Output window Save dialog before closing Project Before closing the Project a dialog asking for confirmation of whether or not to save the Project to the file is displayed If this setting is not made SOFTUNE Workbench automatically saves the Project without any confirmation mes...

Страница 36: ...ce I O ports interrupts reset etc with software to evaluate a program It is used for evaluating an uncompleted system and operation of individual units etc Emulator Debugger The emulator debugger is software to evaluate a program by controlling an emulator from a host through a communications line RS 232C LAN USB Before using this debugger the emulator must be initialized Monitor Debugger The moni...

Страница 37: ... data in the specified source area can be compared with data in the destination area Search Data in the specified memory area can be searched For further details of the above functions refer to 3 11 Memory Window in SOFTUNE Workbench Operation Manual Display Modify C variables The names of variables in a C source file can be displayed in the Watch window and modified Setting Watch point By setting...

Страница 38: ...in the Register window For further details about modifying the register value and the flag value refer to 4 4 4 Register in SOFTUNE Workbench Operation Manual The name of the register and flag displayed in the Register window varies depending on each MCU in use For the list of register names and flag names for the MCU in use refer to Appendix A Register Name List of SOFTUNE Workbench Operational M...

Страница 39: ...tails about assembly operation refer to 4 4 3 Assembly in SOFTUNE Workbench Operation Manual Disassembly To display disassembly use the View Disassembly menu By default disassembly can be viewed starting from the address pointed by the current program counter PC However the address can be changed to any desired address at start up Disassembly for an address outside the memory map range cannot be d...

Страница 40: ...module where the symbol is defined In C language variables and functions defined outside a function with a static declaration are in this category In assembler symbols without a PUBLIC declaration are in this category Local symbol within function A local symbol within a function exists only in C language A static symbol within a function and an automatic variable are in this category Static symbol...

Страница 41: ...e number information is set with the line number information table in SOFTUNE Workbench when a debug information file is loaded Once registered such information can be used at anytime thereafter Line number is defined as follows Source File Name Line Number ...

Страница 42: ...Scope to the function with the symbol to be referred to The Current Scope can be changed by displaying the Call Stack dialog and selecting the parent function For further details of this operation refer to 4 6 7 Stack in SOFTUNE Workbench Operation Manual Changing the Current Scope as described above does not affect the value of the PC By moving the current scope in this way you can search a local...

Страница 43: ...examples are shown in the Table 1 17 1 Table 1 17 1 Examples of Specifying Variables Example of Variables Example of Specifying Variables Semantics Regular Variable int data data Value of data Pointer char p p Value pointed to by p Array char a 5 a 1 Value of second element of a Structure struct stag char c int i struct stag st struct stag stp st c stp c Value of member c of st Value of member c o...

Страница 44: ...ogram described by C language easier Consequently a symbol name described in C language and a symbol name described in assembler which should both be unique may be identical In such a case the symbol name in the Current Scope normally is preferred To refer to a symbol name outside the Current Scope specify the symbol with the module name If there are duplicated symbols outside the Current Scope th...

Страница 45: ...describes the functions dependent on each Debugger 2 1 Simulator Debugger 2 2 Emulator Debugger MB2141 2 3 Emulator Debugger MB2147 01 2 4 Emulator Debugger MB2147 05 2 5 Emulator Debugger MB2198 2 6 Emulator Debugger MB2100 01 2 7 Monitor Debugger ...

Страница 46: ...l I F for simulator are equipped to high speed simulator debugger to create peripheral simulation modules Please refer to Appendix I External I F DLL for Simulator in SOFTUNE Workbench Operation Manual Operating Condition of High speed Simulator Debugger The high speed simulator debugger requires much more RAM space on the host PC than that of normal simulator debugger The required RAM size depend...

Страница 47: ...ip are not supported as peripheral resources I O space to which peripheral I Os are connected is treated as memory space There is a method for simulating interrupts like timer interrupts and data input to memory like I O ports For details see the sections concerning I O port simulation and interrupt simulation Instruction simulation Memory simulation I O port simulation Input port I O port simulat...

Страница 48: ...ng Environment For the simulator debugger for F2MC 16FX it is necessary to set the following operating environment Its predefined default settings are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time Boot ROM file automatic execution ...

Страница 49: ...Project Setup Project menu and can be modified in the setup project dialog In addition it is also possible to automatically execute the Boot ROM file during the debugger startup or reset of MCU For details see the SOFTUNE Workbench Operation Manual Notes When MCU reset is performed in the simulator debugger the PC value varies as shown below depending on whether it is F2 MC 16FX or not F2 MC 16FX ...

Страница 50: ...ction describes the instruction simulation executed by SOFTUNE Workbench Instruction Simulation This simulates the operations of all instructions supported by the F2MC 16 16L 16LX 16H 16F It also simulates the changes in memory and register values due to such instructions ...

Страница 51: ...ndow Simulation Memory Space Memory space access attributes can be specified byte by byte using the Setup Memory Map menu The access attribute of unspecified memory space is Undefined using the Setup Memory Map menu Memory Area Access Attributes Access attributes for memory area can be specified as shown in Table 2 1 1 A guarded access break occurs if access is attempted against such access attrib...

Страница 52: ... by an ordinary text editor or a binary file containing direct code can be used as the data input file When using a text file input the input data inside commas When using a binary file select the binary radio button in the input port dialog I O Port Simulation Output Port At output port simulation whenever a program writes data to the specified port writing is executed to the data output destinat...

Страница 53: ... follows Execute instructions for the specified number of cycles while the program is running during execution of executable commands to generate interrupts corresponding to the specified interrupt numbers and cancel the interrupt generating conditions Continue to generate interrupts each time the number of instruction execution cycles exceeds the specified number of cycles The method of generatin...

Страница 54: ...simulator debugger simulates the operation when a reset signal is input to the MCU using the Debug Reset MCU menu and initializes the registers The function for performing reset processing by operation of MCU instructions writing to RST bit in standby control register is also supported In this case the reset message Reset is displayed on the status bar ...

Страница 55: ...th the MCU instruction operation Write to SLEEP bit or STOP bit of standby control register Once in the sleep mode or stop mode a message sleep for sleep mode stop for stop mode is displayed on the Status Bar The loop keeps running until either an interrupt request is generated or the Debug Abort menu is executed Each cycle of the loop increments the count by 1 During this period I O port processi...

Страница 56: ...on external interrupt generation and memory reprogramming without changing the main program This function is effective only when the simulator debugger is used Setting Method The STUB function can be set by the following commands Dialog 1 Breakpoint Set Dialog Code tab 2 Breakpoint Set Dialog Data tab Command 1 SET BREAK 2 SET DATABREAK execution starts Breakpoint is hit Break STUB processing exec...

Страница 57: ... be used When the program execution is aborted by each break function the address and the break factor to do the break are displayed Break Functions In this simulator debugger the following five types of break functions are supported Code break Data break Trace buffer full break Guarded break Forced break ...

Страница 58: ...points or less When a break occurs due to a code break the following message is displayed on the Status Bar Break at Address by breakpoint Setting Method The code break is controlled by the following method Command SET BREAK Refer to 3 1 SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Breakpoint Set Dialog Code tab Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manu...

Страница 59: ... GO command set at instruction immediately after such instruction the breakpoint does not break Note High speed version simulator debugger When the break function is used it is necessary to set the memory map beforehand When the memory map is deleted the setting of the breakpoint is deleted When the breakpoint with pass count is set to the reset vector in 16FX hit count is cleared after the Boot R...

Страница 60: ...emory position in the status bar 4 Next the executed memory position is displayed The breakpoint can be set up to 65535 points or less When a break occurs due to a data break the following message is displayed on the Status Bar Break at Address by databreak at Access address Setting Method The data break is controlled by the following method Command SET DATABREAK Refer to 3 10 SET DATABREAK type 2...

Страница 61: ...race buffer becomes full When a break occurs due to a trace buffer full break the following message is displayed on the Status Bar Break at Address by trace buffer full Setting Method The trace buffer full break is controlled by the following method Command SET TRACE BREAK Refer to 4 29 SET TRACE type 1 in SOFTUNE Workbench Command Reference Manual Dialog Trace Set Dialog Refer to 4 4 8 Trace in S...

Страница 62: ... to the access attribute doing the access and guarded An undefined area cannot be accessed area are accessed Guarded access break functions as follows Code guarded When the instruction execution to the area without the code attribute Read guarded When read the area without the read attribute Write guarded When writing it in the area without the write attribute When a break occurs due to a guarded ...

Страница 63: ...on to abort the execution of the program compulsorily Forced Break It is a function to abort the execution of the program compulsorily When a break occurs due to a forced break the following message is displayed on the Status Bar Break at Address by command abort request ...

Страница 64: ...ram execution step counts For both the normal simulator debugger and the high speed simulator debugger the maximum measurable count is 2 to the power of 32 1 in other words up to 4 294 967 295 steps The measurement is performed whenever a program is executed and the measurement result displays the following two values Step counts spent on the previous program execution Total step counts spent on t...

Страница 65: ...Measurement menu For details refer to Section 4 6 8 Time Measurement in SOFTUNE Workbench Operation Manual Clearing by command Enter the CLEAR TIMER command in the command window For details refer to Section 4 28 CLEAR TIMER in SOFTUNE Workbench Command Reference Manual Note Because no simulation was done on pipeline process or cache operation inside the chip it may differ from an actual chip for ...

Страница 66: ...data for the address of the executed instruction Abortion of Trace Measurement While the trace function is enabled data is always sampled and recorded in the trace buffer during execution of a user program The program execution aborts due to a break factor such as a breakpoint terminating the trace Furthermore when the trace buffer becomes full a program break can be invoked This break is called a...

Страница 67: ...ce function This program will startup and will be enabled Dialog This is done by Setup Trace in the trace window shortcut menu Command Enter the ENABLE TRACE command 2 Set the trace buffer full break When the trace buffer is full you can make a break When starting up this program it is setup for no breaks Dialog This is done using the trace window shortcut menu Setup Trace Command Enter the SET TR...

Страница 68: ... in the trace window shortcut menu Command window Enter the SHOW TRACE command Display Format of Trace Data There are two display formats of the trace data Instruction The instruction operation is displayed in disassembly units Source This mode only displays source lines Clearing Trace Data Either of the following methods can be used to clear data in the trace buffer Window Select Clear in the tra...

Страница 69: ...buffer has 1000 frames so the target data may not be found immediately Therefore the trace data can be searched from data in the trace buffer by specifying an address How to Search Trace Data Either of the following methods can be used to search the trace data Window Select Find in the trace window shortcut menu Command Enter the SEARCH TRACE command ...

Страница 70: ...ct View Trace menu 2 Specify the name of the file in which to save trace data Right click on the trace window and select Save from the shortcut menu The Save as dialog appears Specify the file name and where to save trace data For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Saving Trace Data 1 Save trace data Execute the SHOW TRACE FILE command For ...

Страница 71: ...gh speed version simulator debugger to have is used In addition details such as which addresses were not accessed can be checked In this debugger the range to measure coverage can be set Please set the time base range only to the code area when you do the C0 coverage Moreover the access of the variable can be examined as the variable not used is searched out by setting the time base range to the d...

Страница 72: ...Measurement starts when the program is executed by using the GO STEP or CALL command Displaying Coverage Measurement Result To display the coverage measurement result use the SHOW COVERAGE command The following can be displayed Display coverage rate of total measurement area Displaying coverage rate of load module Summary of 16 addresses as one block Details indicating access status of each addres...

Страница 73: ...splay the access status of every 16 addresses No access 1 to F Display the number accessed in 16 addresses by the hexadecimal number Access all of the 16 addresses SHOW COVERAGE DETAIL FF0000 address 0 1 2 3 4 5 6 7 8 9 A B C D E F C0 FF0000 100 0 FF0010 100 0 FF0020 18 6 FF0030 100 0 FF0040 93 7 FF0050 100 0 FF0060 0 0 FF0070 0 0 FF0080 0 0 Display one line of a coverage rate Display the access s...

Страница 74: ...he scope of the coverage measurement SHOW COVERAGE INSTRUCTION F9028F sample c 70 F9028F main F9028F 0822 F90291 4F01 sample c 74 for i 0 i 16 i F90293 D0 F90294 CBFE F90296 BBFE F90298 3B1000 F9029B FB18 sample c 75 value i target i F9029D BBFE MOVW F9029F 0C F902A0 98 F902A1 71F3DE F902A4 7700 F902A6 4214 F902A8 7833FE F902AB 38A001 Displays execution status of each machine command line No execu...

Страница 75: ...in SOFTUNE Workbench Command Reference Manual Dialog Version information dialog Select Help Version Information menu For details refer to Section 4 9 3 Version Information in SOFTUNE Workbench Operation Manual Displayed Contents F2MC 16 Family SOFTUNE Workbench VxxLxx ALL RIGHTS RESERVED COPYRIGHT C FUJITSU SEMICONDUCTOR LIMITED 1997 LICENCED MATERIAL PROGRAM PROPERTY OF FUJITSU SEMICONDUCTOR LIMI...

Страница 76: ... f2es exe path SOFTUNE FJ OMF to HEX Converter version File Path f2hs exe path SiOsM Product name Softune Workbench File Path SiOsM907 dll path Version SiOsM907 dll version F2MC 16 Series Debugger DLL Product name SOFTUNE Workbench File Path SiD907 dll path Version SiD907 dll version Debugger type Current debbuger type MCU type Currently selected target MCU VCpu dll name Path and name of the curre...

Страница 77: ...7 01 MB2147 05 MB2198 The emulator debugger for the MB2141 is software that controls an emulator from a host computer via a communications line RS 232C or LAN to evaluate programs The following series can be debugged When MB2141 506 pod used F2 MC 16 16H F2 MC 16F F2 MC 16L F2 MC 16LX When MB2141 507 pod used F2 MC 16F F2MC 16L F2 MC 16LX Before using the emulator the emulator must be initialized ...

Страница 78: ...debugger for the MB2141 it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time MCU operation mode Debug area Memory mapping Timer minimum measurement unit ...

Страница 79: ...g speed is slower than that of mass produced chips Native Mode Evaluation chips have the same timing as mass produced chips to control the operating speed Note that the restrictions the shown in Table 2 2 1 are imposed on the debug functions Table 2 2 1 Restrictions on Debug Functions in Native Mode Applicable series Restrictions on debug functions F2MC 16 16H Memory mapping setting is disabled an...

Страница 80: ... according to the MCU operation speed Normally set the low speed operation mode If the F2MC 16H 16F series is operated at high speed and malfunctions occur change the setting to the high speed operation mode Also to start at low speed and then change to high speed because of the gear setting etc use the SET RUNMODE command to change the setting ...

Страница 81: ...area other than the debug area but the total count of breakpoints must not exceed 65535 Enhancement of Data Breakpoints Up to six data breakpoints can be set when the debug area has not been set yet When setting the debug area of the data attribute READ WRITE up to 65535 data breakpoints can be set if they are within the area and have the same attribute At this time up to six data breakpoints can ...

Страница 82: ...each with a maximum size of 64 KB can be set An area larger than 64 KB can be set but the areas are managed internally in 64 KB units Using MB2145 507 emulation pod up to seven areas including mirror area and internal ROM area described below each with a maximum size of 512 KB can be set The memory operation command can be executed for this area while executing MCU To set the emulation memory area...

Страница 83: ...rmation is only enabled for either one one specified when linked To debug only the internal ROM image area change the creation type of the load module file Note The internal memory area it is set a suitable area automatically by the selected MCU Internal Instruction RAM Area F2 MC 16H only Some types of MCUs have the internal instruction RAM and this area is called the internal instruction RAM are...

Страница 84: ...70 CHAPTER 2 DEPENDENCE FUNCTIONS Note The F2 MC 16 16H only allows this setup in the debugging mode ...

Страница 85: ...or When access is made to an area without the WRITE attribute by executing a program a guarded access break occurs after the data has been rewritten if the access target is the user memory However if the access target is the emulation memory the break occurs before rewriting In other words write protection memory data cannot be overwritten by writing can be set for the emulation memory area by not...

Страница 86: ... address area 008000 008FFF copy The rest of setting area numbers user 6 emulation 3 Internal ROM Area Setting The Setup Map dialog box is displayed using Environment Debugger Memory Map menu You can set the internal ROM area using the Internal ROM Area tab after the Map Adding dialog box is displayed by clicking on the Setting button Two areas can be set Both ones require empty Emulation area to ...

Страница 87: ...ws the maximum measurement time length of each timer when 1 μs or 100 ns is selected as the minimum measurement unit When the minimum measurement unit is changed the measurement values of each timer are cleared as well The default setting is 1 μs Use the following commands to control timers SET TIMERSCALE Sets minimum measurement unit for timers SHOW TIMERSCALE Displays status of minimum measureme...

Страница 88: ...owing instructions No break occurs when breakpoint set at address other than starting address of instruction No break occurs when both following conditions met at one time Instruction for which breakpoint set starts from odd address Preceding instruction longer than 2 bytes length and breakpoint already set at last 1 byte address of preceding instruction This already set breakpoint is an invalid b...

Страница 89: ...than 2 bytes and last code ends at even address When breakpoint already set at last address This already set breakpoint is an invalid breakpoint that won t break because it has been set at an address other than the starting address of an instruction Controlling Watchdog Timer It is possible to select No reset generated by watchdog timer counter overflow while executing a program using the GO STEP ...

Страница 90: ...en a user program is executed Debug Run Go menu Go button on the debug toolbar The commands in Table 2 2 4 cannot be used when the GO command is entered in the command window An error message appears if you enter a command that cannot be used during the execution of a user program E4404S Command error MCU is busy Table 2 2 4 Commands Available during Execution of User Program Function Restrictions...

Страница 91: ...his area is specifically called the mirror area As shown in Figure 2 2 1 the mirror area performs access to the user memory while the MCU is stopped and such access is reflected simultaneously in the emulation memory specified as the mirror area Read access is also reflected in the emulation memory specified as the mirror area In addition as shown in Figure 2 2 2 access to the user memory by the M...

Страница 92: ...gure 2 2 1 Access to Mirror Area while MCU Suspended Figure 2 2 2 On the fly Access to Mirror Area Note Memory access by a bus master other than the MCU is not reflected in the mirror area Executing command Emulation memory Mirror setting User memory MCU operation Suspended Memory access Reflected Executing command Emulation memory Mirror setting User memory MCU operation Operating Memory access R...

Страница 93: ...execution is aborted by each break function the address and the break factor to do the break are displayed Break Functions In this emulator debugger the following seven types of break functions are supported Code break Data break Sequential break Guarded access break Trace buffer full break Performance buffer full break Forced break ...

Страница 94: ...nts set dialog Code tab Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window Disassembly window Notes on Code Break There are several points to note in using code break First some points affecting code break are explained Invalid Breakpoints No break occurs when a breakpoint is set at the instruction immediately after the following instructions F2 MC 16 16L 16LX 16H...

Страница 95: ...W Here are some additional points about the effects on other commands Dangerous Breakpoints Never set a breakpoint at an address other than the instruction starting address If a breakpoint is the last 1 byte of an instruction longer than 2 bytes length and if such an address is even the following abnormal operation will result If instruction executed by STEP command instruction execution not abort...

Страница 96: ...lowing message is displayed on the Status Bar Break at Address by databreak at Access address The number to which the data break can be set is as follows In debugging area of data attribute 65535 pieces Other areas 6 pieces Setting Method The data break is controlled by the following method Command SET DATABREAK Refer to 3 10 SET DATABREAK type 2 in SOFTUNE Workbench Command Reference Manual Dialo...

Страница 97: ...ntial control of the event Use a sequential break when the event mode is set to normal mode using the SET MODE command When a break occurs due to a sequential break the following message is displayed on the Status Bar Break at Address by sequential break level Level No For details of the sequential break function refer to Section 2 2 7 Control by Sequencer Setting Method The sequential break is co...

Страница 98: ...cution is done to the area without the code attribute the break is done Read guarded When the area without the read attribute is read the break is done Write guarded When the area without the write attribute is write the break is done If a guarded access occurs while executing a program the following message is displayed on the Status Bar and the program is aborted Break at Address by guarded acce...

Страница 99: ...race buffer becomes full When a break occurs due to a trace buffer full break the following message is displayed on the Status Bar Break at Address by trace buffer full Setting Method The trace buffer full break is controlled by the following method Command SET TRACE BREAK Refer to 4 29 SET TRACE type 1 in SOFTUNE Workbench Command Reference Manual Dialog Trace Set Dialog Refer to 4 4 8 Trace in S...

Страница 100: ...rformance measurement data storage becomes full When a break occurs due to a performannce buffer full break the following message is displayed on the Status Bar Break at Address by performance buffer full Setting Method The performance buffer full break is controlled by the following method Command SET PERFORMANCE BREAK Refer to 4 7 SET PERFORMANCE type 1 in SOFTUNE Workbench Command Reference Man...

Страница 101: ...ote A forced break is not allowed while the MCU is in the low power consumption mode or hold state When a forced break is requested by the Debug Abort menu while executing a program the menu is disregarded if the MCU is in the low power consumption mode or hold state If a break must occur then reset the cause at user system side or reset the cause by using the Debug Reset MCU menu after inputting ...

Страница 102: ...ed This status cannot be specified concurrently with other status The data modify is a function to generate the event trigger when the data of a specified address rewrites When the data modify is specified for status the data specification is disregarded This status cannot be specified concurrently with other status Use the following commands to set an event SET EVENT Sets event SHOW EVENT Display...

Страница 103: ...s the event settings as well Normal Mode Event triggers used for sequencer Since the sequencer can perform control at 8 levels it can control sequential breaks time measurement and trace sampling Real time tracing in the normal mode is performed by single trace tracing function that samples program execution continuously Multi Trace Mode Event triggers used for multitracing trace function that sam...

Страница 104: ...allowed to run on without a break Figure 2 2 3 Operation in Normal Mode Events SET EVENT CANCEL EVENT SHOW TRACE STATUS SHOW DELAY DISABLE EVENT ENABLE EVENT SHOW EVENT SHOW SEQUENCE level SET SEQUENCE EVENT CANCEL SEQUENCE EVENT SHOW SEQUENCE ALL SET DELAY SET SEQUENCE TIMER CANCEL SEQUENCE TIMER SET SEQUENCE DISABLE TRACE SET SEQUENCE ENABLE TRACE SET SEQUENCE NO TRACE CLEAR TRACE SEARCH TRACE S...

Страница 105: ...OW EVENT CANCEL EVENT ENABLE EVENT DISABLE EVENT Set event Displays event setup status Delete event Enables event Disables event SET SEQUENCE SHOW SEQUENCE CANCEL SEQUENCE ENABLE SEQUENCE DISABLE SEQUENCE Sets sequencer Displays sequencer setup status Cancels sequencer Enables sequencer Disables sequencer SET DELAY SHOW DELAY Sets delay count Displays delay count setup status SET TRACE SHOW TRACE ...

Страница 106: ...e When the multi trace mode is selected as the event mode the real time trace function becomes the multi trace function and events are used as triggers for multitracing Figure 2 2 4 Operation in Multi Trace Mode Events Enable Disable All enabled events generate trigger Enable Disable control Buffer full break control Multitrace measurement Instructing MCU to suspend operation SET EVENT CANCEL EVEN...

Страница 107: ...e Usable Command Function Multi Trace Mode SET EVENT SHOW EVENT CANCEL EVENT ENABLE EVENT DISABLE EVENT Sets event Displays event setup status Deletes event Enables event Disables event SET MULTITRACE SHOW MULTITRACE SEARCH MULTITRACE ENABLE MULTITRACE DISABLE MULTITRACE CLEAR MULTITRACE Sets trace buffer full break Displays trace data Searches trace data Enables trace function Disables trace func...

Страница 108: ... are set in the performance mode are used to measure performance The time duration between two event occurrences can be measured and the event occurrences can be counted Figure 2 2 5 Operation in Performance Mode Events Enable Disable Limited to following combinations 1 2 3 4 5 6 7 8 Buffer full break control Performance measurement Instructing MCU to suspend operation SET EVENT CANCEL EVENT SHOW ...

Страница 109: ...2 8 Event related Commands in Performance Mode Mode Usable Command Function Performance Mode SET EVENT SHOW EVENT CANCEL EVENT ENABLE EVENT DISABLE EVENT Sets event Displays event setup status Deletes event Enables event Disables event SET PERFORMANCE SHOW PERFORMANCE CLEAR PERFORMANCE Sets performance Displays performance setup status Clears performance measurement data ...

Страница 110: ...hen the condition is met Select any one of the following Move to required level Terminate sequencer The conditions set for each level are determined by OR Therefore if any one condition is met the sequencer either moves to the required level or terminates In addition trace sampling abort resume can be controlled when a condition is met The minimum measurement unit for Timer value can be set to eit...

Страница 111: ...on of Sequencer Start executing program Start sequencer Set Conditions Operation when Condition Met Use event number 1 Pass counter Use event number 2 Pass counter Use event number 3 Pass counter Use event number 4 Pass counter Use event number 5 Pass counter Use event number 6 Pass counter Use event number 7 Pass counter Use event number 8 Pass counter Timer condition Waiting time Trace control B...

Страница 112: ...erminate sequencer if and when event 2 occurs less than 300 μs after event 1 occurred SET SEQUENCE EVENT 1 1 J 2 SET SEQUENCE EVENT 2 2 J 0 SET SEQUENCE TIMER 2 300 J 1 SHOW SEQUENCE Sequencer Enable level1 level2 level3 level4 level5 level6 level7 level8 1 1 2 2 2 end 3 4 5 6 7 8 T T 1 Latch 1 Latch 2 SHOW SEQUENCE 2 level no 2 event pass count trace cnt1 jmp level1 2 1 enable end timer 00 00 000...

Страница 113: ...nates set delay count to 0 and specify Break after delay count terminates Use the SET DELAY command to set the delay count and the operation after the delay count The default is delay count 0 and Break after delay count Figure 2 2 7 Operation when sequencer terminates Examples of Delay Count Setups Break when sequencer terminates SET DELAY BREAK 0 Break when 100 bus cycle tracing done after sequen...

Страница 114: ...the trace sampling flow For example it is possible to suspend trace sampling when event 1 occurs and then resume trace sampling when event 2 occurs Trace data sampling can be restricted Figure 2 2 8 Trace Sampling Control 1 As shown in Figure 2 2 9 trace sampling can be disabled during the period from the start of a program execution until the first condition occurs For this setup use the GO comma...

Страница 115: ... keep sampling data until event 3 occurs SET SEQUENCE EVENT DISABLETRACE 1 1 J 2 SET SEQUENCE EVENT ENABLETRACE 2 2 J 3 SET SEQUENCE EVENT DISABLETRACE 3 3 J 2 Start Event 1 occurs NO Suspend trace sampling Level 1 YES Event 2 occurs NO Resume trace sampling Level 2 YES Event 3 occurs NO Suspend trace sampling Level 3 YES ...

Страница 116: ...measured using the timer latch function The timing for the timer latch can be set using the SET SEQUENCE command the latched timer values can be displayed using the SHOW SEQUENCE command When a program starts execution the emulation timer is initialized and then starts counting Select either 1 μs or 100 ns as the minimum measurement unit for the emulation timer Set the measurement unit using the S...

Страница 117: ...rom the Event 1 to the Event 3 is measured However no measurement is made if Event 4 occurs anywhere between Event 1 and Event 3 Sample Flow of Time Measurement by Sequencer Start NO Branch from level 1 to level 2 Timer latch 1 Level 1 YES Level 2 YES NO YES Sequencer terminates at level 3 Timer latch 2 Level 3 YES NO YES End Event 1 occurs Event 4 occurs Event 2 occurs Event 4 occurs Event 3 occu...

Страница 118: ... 7 8 T T 1 Latch 1 1 2 00m02s060ms379 0μs Latch 2 3 E 00m16s040ms650 0μs Indicates that if event 1 occurs at level 1 move to level 2 and let the timer latched Indicates that if event 3 occurs at level 3 the sequencer terminates and let the timer latched Indicate time values of timer latch 1 and timer latch 2 The time value deducting the value of the timer latch 1 from the value of the timer latch ...

Страница 119: ...tion Access status Read Write Internal access etc Device status Instruction execution Reset Hold etc Queue status Count of remaining bytes of instruction queue etc Data valid cycle information Data valid invalid Since the data signal is shared with other signals it does not always output data Therefore the trace samples information indicating whether or not the data is valid External probe data Se...

Страница 120: ...e event sequencer Since the delay can be set between the sequencer terminating the trigger and the end of tracing the program flow after an given event occurrence can be traced The delay count is counted in pass cycle units so it matches the sampled trace data count However nothing can be sampled during the delay count if trace sampling is suspended when the sequencer is terminated After the delay...

Страница 121: ...pled last is numbered 0 Figure 2 2 11 Frame Number in Single Trace This program can analyze the single trace result and sort the buffer data in execution instruction units only when the MCU execution mode is the debugging mode In this mode the following information is grouped as one unit and each information unit is numbered This number is called the step number Execution instruction mnemonic info...

Страница 122: ...E command To disable the function use the DISABLE TRACE command The default is Enable 3 Set events sequencer and delay count Trace sampling can be controlled by setting the sequencer for events If this function is not needed there is no need of this setting To set events use the SET EVENT command To set the sequencer use the SET SEQUENCE command Furthermore set the delay count between sequencer te...

Страница 123: ...nd Function SET EVENT SHOW EVENT CANCEL EVENT ENABLE EVENT DISABLE EVENT Sets events Displays event setup status Deletes event Enables event Disables event SET SEQUENCE SHOW SEQUENCE CANCEL SEQUENCE ENABLE SEQUENCE DISABLE SEQUENCE Sets sequencer Displays sequencer setting status Cancels sequencer Enables sequencer Disables sequencer SET DELAY SHOW DELAY Sets delay count value and operation after ...

Страница 124: ...igure 2 2 12 Multi Trace Sampling Multi Trace Frame Number Sixteen frames of data are sampled each time an event occurs This data unit is called a block and each sampled block is numbered starting from 0 This is called the block number A block is a collection of 8 frames of sampled data before and after the event trigger occurs At the event trigger is 0 trace data sampled before reaching the event...

Страница 125: ...re 2 2 13 Frame Number in Multi Trace Block number Trace buffer Frame number Global number Local number Event trigger 1 7 2 6 8 0 15 7 16 8 17 7 18 6 24 0 31 7 32 8 32752 7 32753 6 32759 0 32767 7 32768 8 1 Event trigger Event trigger 2 2048 ...

Страница 126: ... the DISABLE MULTITRACE command 3 Set event Set an event that sampling Use the SET EVENT command for this setting 4 Set trace buffer full break To break when the trace buffer becomes full set the trace buffer full break Use the SET MULTITRACE command for this setting Table 2 2 11 shows the list of trace related commands that can be used in multi trace mode Table 2 2 11 Trace related Commands That ...

Страница 127: ...and in the single trace mode and to the SHOW MULTITRACE command in the multi trace Frame numbers displayed in the multi trace mode is the global number Example In Single Trace SHOW TRACE STATUS en dis enable Trace function enabled buffer full nobreak Buffer full break function disabled sampling end Trace sampling terminates frame no 00120 to 00050 Frame 120 to 50 store data step no 00091 to 00022 ...

Страница 128: ...er with the SHOW TRACE command in the single trace and specify either a global number or a block number and local number with the SHOW MULTITRACE command in the multi trace A range can also be specified Example In Single Trace Mode SHOW TRACE CYCLE 6 Start displaying from frame 6 SHOW TRACE CYCLE 6 10 Display from frame 6 to frame 10 SHOW TRACE 6 Start displaying from step 6 SHOW TRACE 6 10 Displa...

Страница 129: ... Display in source line units Specify SOURCE Display in Instruction Execution Order Specify INSTRUCTION Trace sampling is performed at each machine cycle but the sampling results are difficult to Display because they are influenced by pre fetch etc This is why the emulator has a function to allow it to analyze trace data as much as possible The resultant data is displayed after processes such as e...

Страница 130: ... Read access to external memory external write access Write access to external memory SHOW TRACE INSTRUCTION 194 step no address mnemonic level sub4 00194 FF0106 LINK 00 4 00193 000186 internal read access 10F2 5 00192 1010E6 external write access 10F2 5 00191 000186 internal write access 10E6 5 00190 FF0108 ADDSP F8 5 00189 FF010A MOVL A 001A 5 00188 10001A external read access 0000 5 00187 10001...

Страница 131: ...a frame no address data a status d status Qst dfg level ext probe 1 2 3 4 5 6 7 8 9 1 frame number Decimal number 2 executed instruction address and data access address Hexadecimal number 3 data Hexadecimal number 4 access information a status WA write access to internal memory EWA write access to external memory RA read access to internal memory ERA read access to external memory ICF code fetch t...

Страница 132: ...ode is enabled only in the single trace mode while in the debugging mode Example SHOW TRACE SOURCE 194 step no source 00194 gtg1 c 251 00190 gtg1 c 255 sub5 nf nd 00168 gtg1 c 259 00164 gtg1 c 264 p char df 00161 gtg1 c 264 p char df 00157 gtg1 c 265 p 0x00 00145 gtg1 c 266 p 0x00 00133 gtg1 c 267 p 0x80 00121 gtg1 c 268 p 0x7f 00116 gtg1 c 270 p char dd 00111 gtg1 c 271 p 0xff 00099 gtg1 c 272 p ...

Страница 133: ...her or not tracing has terminated by executing the SHOW TRACE command with STATUS specified or by using the built in variable TRCSAMP To read trace data use the SHOW TRACE command to search trace data use the SEARCH TRACE command Use the SET DELAY command to set the delay count and break operation after the delay count Example GO SHOW TRACE STATUS en dis enable buffer full nobreak sampling on Trac...

Страница 134: ... trace data use the SHOW MULTITRACE command to search trace data use the SEARCH MULTITRACE command Example GO SHOW MULTITRACE STATUS en dis enable buffer full nobreak sampling on DISABLE MULTITRACE SHOW MULTITRACE STATUS en dis disable buffer full nobreak sampling end block no 1 to 20 frame no 00001 to 00639 SHOW MULTITRACE 1 frame no address data a status d status Qst dfg level ext probe block no...

Страница 135: ...ct View Trace menu 2 Specify the name of the file in which to save trace data Right click on the trace window and select Save from the shortcut menu The Save as dialog appears Specify the file name and where to save trace data For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Saving Trace Data 1 Save trace data Execute the SHOW TRACE FILE command For ...

Страница 136: ...easurement function allows the time between two event occurrences to be measured and the number of event occurrences to be counted Up to 32767 event occurrences can be measured Measuring Time Measures time interval between two events Events can be set at 8 points 1 to 8 However in the performance measurement mode the intervals starting event number and ending event number are combined as follows F...

Страница 137: ...g the SET TIMESCALE command choose either 1 μs or 100 ns as the minimum measurement unit for the timer used to measure performance The default is 1 μs When the minimum measurement unit is changed the performance measurement values are cleared Example SET TIMERSCALE 1U Set 1 μs as minimum unit Specify Performance Buffer Full Break When the buffer for storing performance measurement data becomes ful...

Страница 138: ...t number combination Measuring Count The specified events become performance measurement points automatically Executing Program Start measuring when executing a program by using the GO or CALL command If a break occurs during interval time measurement the data for this specific interval is discarded Displaying Performance Measurement Data Display performance measurement data by using the SHOW PERF...

Страница 139: ...t min time 11637 0 max time 17745 0 0 0 8999 0 0 avr time 14538 0 9000 0 9999 0 0 10000 0 10999 0 0 11000 0 11999 0 2 12000 0 12999 0 19 13000 0 13999 0 52 14000 0 14999 0 283 15000 0 15999 0 92 16000 0 16999 0 3 17000 0 17999 0 1 18000 0 18999 0 0 19000 0 0 total 452 Minimum execution time Event number Maximum execution time Average execution time Count of measuring within given time interval Tot...

Страница 140: ...ttribute In addition specifying the Read Write attribute and setting a range in the data area permits checking the access status of variables such as finding unused variables etc Execution of coverage measurement is limited to the address space specified as the debug area Therefore set the debug area in advance However the measurement attribute for coverage measurement can be specified regardless ...

Страница 141: ...oaded module is set automatically However the library code area is not set when the C compiler library is linked Example SET COVERAGE FF0000 FFFFFF Measuring Coverage When preparing for coverage measurement execute the program Measurement starts when the program is executed by using the GO STEP or CALL command Displaying Coverage Measurement Result To display the coverage measurement result use th...

Страница 142: ... SHOW COVERAGE GENERAL HEX 0X0 1X0 2X0 address 0123456789ABCDEF0123456789ABCDEF0123456 ABCDEF C0 FF0000 3 F 32 0 Display the access status of every 16 addresses No access 1 to F Display the number accessed in 16 addresses by the hexadecimal number Access all of the 16 addresses SHOW COVERAGE DETAIL FF0000 address 0 1 2 3 4 5 6 7 8 9 A B C D E F C0 FF0000 100 0 FF0010 100 0 FF0020 18 6 FF0030 100 0...

Страница 143: ...the scope of the coverage measurement SHOW COVERAGE INSTRUCTION F9028F sample c 70 F9028F main F9028F 0822 F90291 4F01 sample c 74 for i 0 i 16 i F90293 D0 F90294 CBFE F90296 BBFE F90298 3B1000 F9029B FB18 sample c 75 value i target i F9029D BBFE MOVW F9029F 0C F902A0 98 F902A1 71F3DE F902A4 7700 F902A6 4214 F902A8 7833FE F902AB 38A001 Displays execution status of each machine command line No exec...

Страница 144: ...130 CHAPTER 2 DEPENDENCE FUNCTIONS Note With MB2141 emulator the code coverage measurement is affected by a prefetch Note when analyzing ...

Страница 145: ...ed to set the minimum measurement unit for the emulation timer Set by dialog Select Setup Debug Environment Debug Environment menu to set the results in emulation tab in the debugging environment set dialog For details refer to Section 4 7 2 3 Setting Debug Environment in SOFTUNE Workbench Operation Manual Set by command Enter the SET TIMERSCALE command in the command window For details refer to S...

Страница 146: ...me Measurement in SOFTUNE Workbench Operation Manual Clearing by command Enter the CLEAR TIMER command in the command window For details refer to Section 4 28 CLEAR TIMER in SOFTUNE Workbench Command Reference Manual Note The measured execution time is added about ten extra cycles per execution If the execution cycle is measured execute many instructions continuously in order to minimize the effec...

Страница 147: ...e In addition by specifying external probe data as events such events can be used for aborting a program and as multi trace and performance trigger points Events can be set by using the SET EVENT command External Probe Sampling Timing Choose one of the following for the sampling timing while executing a program At rising edge of internal clock clock supplied by emulator At rising edge of external ...

Страница 148: ...mands for External Probe Data Table 2 2 13 shows the commands that can be used to set or display external probe data Table 2 2 12 Bit Order of External Probe Data IC Clip Cable Color Violet Blue Green Yellow Orange Red Brown Black Bit Order Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 External probe data Table 2 2 13 Commands that can be used External Probe Data Usable Command Function SET SAMP...

Страница 149: ...9 SHOW SYSTEM in SOFTUNE Workbench Command Reference Manual Dialog Version information dialog Select Help Version Information menu For details refer to Section 4 9 3 Version Information in SOFTUNE Workbench Operation Manual Displayed Contents F2MC 16 Family SOFTUNE Workbench VxxLxx ALL RIGHTS RESERVED COPYRIGHT C FUJITSU SEMICONDUCTOR LIMITED 1997 LICENCED MATERIAL PROGRAM PROPERTY OF FUJITSU SEMI...

Страница 150: ...h SiOsM Product name Softune Workbench File Path SiOsM907 dll path Version SiOsM907 dll version F2MC 16 Series Debugger DLL Product name SOFTUNE Workbench File Path SiD907 dll path Version SiD907 dll version Debugger type Current debugger type MCU type Currently selected target MCU VCpu dll name Path and name of the currently used VCpu dll VCpu dll version Version of the currently used virtual deb...

Страница 151: ...the case when MB2147 01 has been selected MB2141 MB2147 01 MB2147 05 MB2198 The emulator debugger for the MB2147 01 is software that controls an emulator from a host computer via a communications line RS 232C LAN or USB to evaluate programs The following series can be debugged F2MC 16L F2 MC 16LX Before using the emulator the emulator must be initialized For details refer to Appendix B Monitoring ...

Страница 152: ...MB2147 01 it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time Monitoring program automatic loading MCU operation mode Debug area Memory mapping Debug function Event mode ...

Страница 153: ...ecified data in the emulator can be checked at the beginning of debugging to load an appropriate monitoring program and configuration binary data automatically into the emulator The monitoring program and configuration binary data to be compared for update are in Lib 907 under the directory where Workbench is installed Enable disable the monitoring program automatic loading function by choosing En...

Страница 154: ...uffer Debugging Mode All the operations of evaluation chips can be analyzed but their operating speed is slower than that of mass produced chips Native Mode Evaluation chips have the same timing as mass produced chips to control the operating speed Note that the restrictions the shown in Table 2 3 1 are imposed on the debug functions Table 2 3 1 Restrictions on Debug Functions in Native Mode Appli...

Страница 155: ...r each area Set the debug area using the SET DEBUG command Setting the debug area enhances the coverage measurement function Enhancement of Coverage Measurement Function Setting the debug area enables the coverage measurement function In coverage measurement the measurement range can be specified only within the area specified as the debug area In 00 to 0F bank and 0F0 to 0FF bank a breakpoint can...

Страница 156: ...y It is possible to set up to four areas of 1 MB maximum including an internal ROM area described later as emulation memory area Define a region on a 256 byte boundary An area larger than 1 MB can be specified at one time but is divided internally into two or more 1 MB areas for management purposes Memory manipulation commands can be executed in relation to emulation memory areas while MCU executi...

Страница 157: ...M image area Note that the debug information is only enabled for either one one specified when linked To debug only the internal ROM image area change the creation type of the load module file Note The internal memory area it is set a suitable area automatically by the selected MCU Undefined Area A memory area that does not belong to any of the areas described above is part of the user memory area...

Страница 158: ...tes However access to memory with the GUARD attribute in the undefined area causes an error When access is made to an area without the WRITE attribute by executing a program a guarded access break occurs after the data has been rewritten if the access target is the user memory However if the access target is the emulation memory the break occurs before rewriting In other words write protection mem...

Страница 159: ...e user 000200 007FFF guard 008000 008FFF read write user 009000 FEFFFF guard FF0000 FFFFFF read write code emulation mirror address area 008000 008FFF copy The rest of setting area numbers user 6 emulation 3 Internal ROM Area Setting The Setup Map dialog box is displayed using Environment Memory Map menu You can set the internal ROM area using the Internal ROM Area tab after the Map Adding dialog ...

Страница 160: ...etup Debug Environment Select Debug Function menu or the SET MODE command on the command window At the emulator activated this is set to the RAM Checker mode When the debug function is changed all the followings are initialized Performance measurement data Trace buffer RAM Checker mode Enables the RAM Checker function The history of accessing the monitoring addresses can be recorded into the log f...

Страница 161: ...ere are three event modes as listed below Normal mode Event triggers are used for the single trace Multi trace mode Event triggers are used for the multi trace trace function which samples data before and after the event trigger occurred Performance mode Event triggers are used for the performance measurement It enables to measure time duration between two event trigger occurrence and count of eve...

Страница 162: ...ns met at one time Instruction for which breakpoint set starts from odd address Preceding instruction longer than 2 bytes length and breakpoint already set at last 1 byte address of preceding instruction This already set breakpoint is an invalid breakpoint that won t break because it has been set at an address other than the starting address of an instruction Abnormal Breakpoint Setting a breakpoi...

Страница 163: ...tep instruction longer than 2 bytes and last code ends at even address When breakpoint already set at last address This already set breakpoint is an invalid breakpoint that won t break because it has been set at an address other than the starting address of an instruction Controlling Watchdog Timer It is possible to select No reset generated by watchdog timer counter overflow while executing a pro...

Страница 164: ...bug function is in Trace Enhancement mode 2 only MULTITRACE 4 2 SHOW MULTITRACE 4 31 SHOW TRACE type 1 Clear trace data 1 Enabled only when trace execution ended 1 2 Enabled only when the debug function is in Trace Enhancement mode 2 only MULTITRACE 4 3 CLEAR MULTITRACE 4 34 CLEAR TRACE Search trace data 1 Enabled only when trace execution ended 1 2 Enabled only when the debug function is in Trace...

Страница 165: ...2 Enabled only when the debug function is in Trace Enhancement mode 2 4 45 SET DELAY 4 46 SHOW DELAY Displaying execution cycle measurement value Timer 4 27 SHOW TIMER Memory operation Read Write Emulation memory only operable 3 Read only enabled in real time monitoring area 5 1 EXAMINE 5 2 ENTER 5 3 SET MEMORY 5 4 SHOW MEMORY 5 5 SEARCH MEMORY 5 8 COMPARE 5 9 FILL 5 10 MOVE 5 11 DUMP Line assembl...

Страница 166: ...orted by each break function the address and the break factor to do the break are displayed Break Functions In this emulator debugger nine types of break functions are supported Code break Data break Monitoring data break Sequential break Guarded access break Trace buffer full break Performance buffer full break External trigger break Forced break ...

Страница 167: ...point in SOFTUNE Workbench Operation Manual Window Source window Disassembly window Notes on Data Break There are several points to note in using code break First some points affecting code break are explained Invalid Breakpoints No break occurs when a breakpoint is set at the instruction immediately after the following instructions F2 MC 16 16L 16LX 16H PCB DTB NCC ADB SPB CNR MOV ILM imm8 AND CC...

Страница 168: ...MW Here are some additional points about the effects on other commands Dangerous Breakpoints Never set a breakpoint at an address other than the instruction starting address If a breakpoint is the last 1 byte of an instruction longer than 2 bytes length and if such an address is even the following abnormal operation will result If instruction executed by STEP command instruction execution not abor...

Страница 169: ... possible to set it in this two debuggers When a break occurs due to a data break the following message is displayed on the Status Bar Break at Address by databreak at Access address Setting Method The data break is controlled by the following method Command SET DATABREAK Refer to 3 9 SET DATABREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Breakpoints set dialog Data tab Refer to...

Страница 170: ...in the figure below Setting Number The maximum constant and break conditions of monitoring data break vary as follows Monitoring Data Break Break conditions are set by address and data Up to four points can be set However the break conditions vary due to combination use with the Sequencer or the Trace trigger Setting Method The data monitoring break can be set depending on the following command Co...

Страница 171: ...he sequential control of the event Use a sequential break when the event mode is set to normal mode using the SET MODE command When a break occurs due to a sequential break the following message is displayed on the Status Bar Break at Address by sequential break For details of the sequential break function refer to Section 2 3 5 Control by Sequencer Setting Method The sequential break is controlle...

Страница 172: ...ecution is done to the area without the code attribute the break is done Read guarded When the area without the read attribute is read the break is done Write guarded When the area without the write attribute is write the break is done If a guarded access occurs while executing a program the following message is displayed on the Status Bar and the program is aborted Break at Address by guarded acc...

Страница 173: ...race buffer becomes full When a break occurs due to a trace buffer full break the following message is displayed on the Status Bar Break at Address by trace buffer full Setting Method The trace buffer full break is controlled by the following method Command SET TRACE BREAK Refer to 4 30 SET TRACE type 2 in SOFTUNE Workbench Command Reference Manual Dialog Trace Set Dialog Refer to 4 4 8 Trace in S...

Страница 174: ...erformance measurement data storage becomes full When a break occurs due to a performance buffer full break the following message is displayed on the Status Bar Break at Address by performance buffer full Setting Method The performance buffer full break is controlled by the following method Command SET PERFORMANCE BREAK Refer to 4 7 SET PERFORMANCE type 1 in SOFTUNE Workbench Command Reference Man...

Страница 175: ... is input from TRIG pin that the emulator has When a break occurs due to an external trigger break the following message is displayed on the Status Bar Break at Address by external trigger break Setting Method The external trigger break is controlled by the following method Command SET TRIGGER Refer to 3 42 SET TRIGGER in SOFTUNE Workbench Command Reference Manual Dialog Debugging environment set ...

Страница 176: ...ote A forced break is not allowed while the MCU is in the low power consumption mode or hold state When a forced break is requested by the Debug Abort menu while executing a program the menu is disregarded if the MCU is in the low power consumption mode or hold state If a break must occur then reset the cause at user system side or reset the cause by using the Debug Reset MCU menu after inputting ...

Страница 177: ...vel 3 One event can be specified as a sequencer restart condition When the debug function on MB2147 01 is set to Trace Enhancement mode it is possible to control a trace by a sequencer 1 Complete the trace acquisition 2 Transit to the next block Only in multi trace mode Table 2 3 4 Sequencer Specifications Function Specifications Level count 3 levels restart condition Conditions settable for each ...

Страница 178: ...settings Table 2 3 5 shows the conditions that can be set for events Note In instruction execution CODE an event trigger is generated only when an instruction is executed This cannot be specified concurrently with other status READ or WRITE Use the following commands to set an event SET EVENT Sets an event SHOW EVENT Displays the status of event setting CANCEL EVENT Deletes an event Example SET EV...

Страница 179: ...ncer The sequencer operates in the following order The event can be set at each level and as a restart condition 1 The sequencer starts after the program execution 2 Depending on the setting at each level 1 2 branching to the next level is performed when the condition is met 3 The sequencer is restarted when the restart condition is met 4 The sequencer is terminated and a break occurs when the lev...

Страница 180: ...Workbench Operation Manual Setting by Command 1 The event is set according to the SET EVENT command 2 The event set by the SET SEQUENCE command is set as a sequence For details refer to 3 22 SET EVENT type 2 or 3 28 SET SEQUENCE type2 in SOFTUNE Workbench Command Reference Manual Program execution start NO YES Level1 NO YES YES NO YES Break Level3 Level2 YES NO NO Event1 occurs Event4 occurs Event...

Страница 181: ...ignal is shared with other signals it does not always output data Therefore the trace samples information indicating whether or not the data is valid Execution time based on the previous trace frame in 25 ns units Data Not Traced The following data does not leave access data in the trace buffer Portion of access data while in native mode When operating in the native mode the F2MC 16L 16LX family o...

Страница 182: ...et during MCU bus operation monitoring a trigger for starting a trace can be generated This function is called a trace trigger For the use of the trace trigger function specify the code CODE and data access READ WRITE Up to 8 trace triggers can be preset each for code attribute and data access attribute However actually the maximum number of trace triggers is determined as indicated below because ...

Страница 183: ...ATAWATCH Displays a data monitoring trace trigger Trace Control during Executing User Program In MB2147 01 the trace control is enabled while the user program is executed However it is necessary to end the trace execution The parameter that can be controlled is as follows Set trace trigger Set filtering area Display trace data Clear trace data Search trace data Set trace delay Display measurement ...

Страница 184: ...es it possible to control trace sampling and make effective use of the limited trace buffer capacity If there is no such necessity setup need not be performed With a trace trigger it is possible to specify the start and stop of trace sampling to be performed at a trigger hit To use a trace trigger input the SET TRACE TRIGGER command and then perform trace trigger setup using the SET TRACETRIGGER c...

Страница 185: ... becomes a hit Multi trace end trigger Terminate the trace acquisition in the point that becomes a hit Figure 2 3 4 Multi Trace Sampling Multi Trace Frame Number Data of 128 to 1024 frames can be sampled according to the block size at each time an event occurs trace end trigger This data unit is called a block and each sampled block is numbered starting from 0 This is called the block number A blo...

Страница 186: ...efore the event hit and the trace delay When the multi trace end trigger event hit occurs the delay is acquired as many as the number of occurrence of the subsequent trace end trigger hit Example If you want to get the trace delay for three blocks the event hit needs to occur four times 1 63 2 62 64 0 127 62 128 63 129 63 130 62 192 0 255 62 256 63 65409 63 65410 62 65472 0 65535 62 65536 63 Block...

Страница 187: ...173 CHAPTER 2 DEPENDENCE FUNCTIONS Note The multi trace function in MB2147 01 is exclusive with the RAM Checker function For more details refer to Section 2 3 1 6 Debug Function ...

Страница 188: ...pled when a program is executed 1 Set the debug function to Trace Enhancement mode Use SET MODE command for this setting 2 Set event mode to multi trace mode Use the SET MODE command for this setting 3 Enable trace function Use the ENABLE MULTITRACE command for this setting To disable the function use the DISABLE MULTITRACE command 4 Set an event trace trigger Set an event for sampling the multi t...

Страница 189: ...R SHOW TRACETRIGGER CANCEL TRACETRIGGER ENABLE TRACETRIGGER DISABLE TRACETRIGGER Sets events Displays event setup status Deletes event Enables event Disables event SET MULTITRACE SHOW MULTITRACE SEARCH MULTITRACE ENABLE MULTITRACE DISABLE MULTITRACE CLEAR MULTITRACE Sets trace buffer full break Displays trace data Searches trace data Enables trace function Disables trace function Clears trace data...

Страница 190: ...ce Data Storage Status It is possible to displays how much trace data is stored in the trace buffer This status data can be read by specifying STATUS to the SHOW TRACE Example SHOW TRACE STATUS en dis enable Trace function enabled buffer full nobreak Buffer full break function disabled sampling end Trace sampling terminates code enable Code execution enabled verbose disable Verbose trace disabled ...

Страница 191: ... also be specified Specifying Displaying Trace Data Start Specify the data display start position in the trace buffer by inputting a step number or frame number using the SHOW TRACE command The data display range can also be specified Example In Single Trace Mode SHOW TRACE CYCLE 6 Start displaying from frame 6 SHOW TRACE CYCLE 6 0 Display from frame 6 to frame 0 SHOW TRACE 6 Start displaying from...

Страница 192: ...Display in source line units Specify SOURCE Display in Instruction Execution Order Specify INSTRUCTION Trace sampling is performed at each machine cycle but the sampling results are difficult to display because they are influenced by pre fetch etc This is why the emulator has a function to allow it to analyze trace data as much as possible The resultant data is displayed after processes such as el...

Страница 193: ...ccess to internal memory external read access Read access to external memory external write access Write access to external memory Step Number Address Disassemble Description Time Stamp Decimal signed Hexadecimal Indecates instruction executed Displays difference of executed time between this frame and next frame decimal The unit is ns WAIT SHOW TRACE 194 frame no address mnemonic time stamp 00675...

Страница 194: ...HOLD tool hold UHOLD user hold WAIT waiting with ready pin SLEEP sleep STOP stop EXECUTE execute instruction RESET reset invalid d status information 6 instruction queue status FLH flush queue by number of remainder code of queue is byte 1 to 8 7 information valid flag address is valid data is valid 8 event information C code event D data event 9 time stamp display ns unit displays difference of e...

Страница 195: ...le c 68 value i target I 00698 sample c 70 sort_val value 16L 00655 sample c 9 00594 sample c 13 for k max 2 k 1 k 00185 sample c 14 i k 00149 sample c 15 p tblp i 1 00088 sample c 16 while j 2 i max Note The following operation may be subjected to trace sampling immediately after the MCU operation is stopped tool hold Remember that the operation is unique to evaluation chips and not performed by ...

Страница 196: ...ted by executing the SHOW TRACE command with STATUS specified or by using the built in variable TRCSAMP To read trace data use the SHOW TRACE command to search trace data use the SEARCH TRACE command Use the SET DELAY command to set the delay count and break operation after the delay count Example GO SHOW TRACE STATUS en dis enable buffer ful nobreak sampling on Trace sampling continues code enabl...

Страница 197: ...ct View Trace menu 2 Specify the name of the file in which to save trace data Right click on the trace window and select Save from the shortcut menu The Save as dialog appears Specify the file name and where to save trace data For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Saving Trace Data 1 Save trace data Execute the SHOW TRACE FILE command For ...

Страница 198: ...formance measurement allows the time between two event occurrences to be measured and the number of event occurrences to be counted Up to 65535 event occurrences can be measured Measuring Time Measures time interval between two events Events can be set at 8 points 1 to 8 However in the performance measurement mode the intervals starting event number and ending event number are combined as follows ...

Страница 199: ... is 25ns Specify Performance Buffer Full Break When the buffer for storing performance measurement data becomes full a executing program can be broken This function is called the performance buffer full break The performance buffer becomes full when an event occurs 65535 times If the performance buffer full break is not specified the performance measurement ends but the program does not break Exam...

Страница 200: ...break occurs during interval time measurement the data for this specific interval is discarded Displaying Performance Measurement Data Display performance measurement data by using the SHOW PERFORMANCE command Clearing Performance Measurement Data Clear performance measurement data by using the CLEAR PERFORMANCE command Example CLEAR PERFORMANCE Interval Starting Event Number Ending Event Number 1...

Страница 201: ...0 0 12999 0 19 13000 0 13999 0 52 14000 0 14999 0 283 15000 0 15999 0 92 16000 0 16999 0 3 17000 0 17999 0 1 18000 0 18999 0 0 19000 0 0 tot al 452 Minimum execution time Event number Maximum execution time Average execution time Count of measuring within given time interval Total measuring count SHOW PERFORMANCE TIME 1 13000 16999 500 event 1 2 time µs count min time 11637 0 max time 17745 0 0 0 ...

Страница 202: ... permits checking the access status of variables such as finding unused variables etc Execution of coverage measurement is limited to the address space specified as the debug area Therefore set the debug area in advance This is operable by enabling the coverage function on the chip tabs Environment Setup Debugging Environment Debug Environment menu Coverage Measurement Procedures The procedure for...

Страница 203: ...ng for coverage measurement execute the program Measurement starts when the program is executed by using the GO STEP or CALL command Displaying Coverage Measurement Result To display the measurement result use the SHOW COVERAGE command The following can be displayed Display coverage rate of total measurement area Displaying coverage rate of load module Summary of 16 addresses as one block Details ...

Страница 204: ...splay the access status of every 16 addresses No access 1 to F Display the number accessed in 16 addresses by the hexadecimal number Access all of the 16 addresses SHOW COVERAGE DETAIL FF0000 address 0 1 2 3 4 5 6 7 8 9 A B C D E F C0 FF0000 100 0 FF0010 100 0 FF0020 18 6 FF0030 100 0 FF0040 93 7 FF0050 100 0 FF0060 0 0 FF0070 0 0 FF0080 0 0 Display one line of a coverage rate Display the access s...

Страница 205: ...ide the scope of the coverage measurement SHOW COVERAGE INSTRUCTION F9028F sample c 70 F9028F main F9028F 0822 LINK 22 F90291 4F01 PUSHW RW0 sample c 74 for i 0 i 16 i F90293 D0 MOVN A 0 F90294 CBFE MOVW RW3 02 A F90296 BBFE MOVW A RW3 02 F90298 3B1000 CMPW A 0010 F9029B FB18 BGE F902B5 sample c 75 value i target i F9029D BBFE MOVW A RW3 02 F9029F 0C LSLW A F902A0 98 MOVW RW0 A F902A1 71F3DE MOVEA...

Страница 206: ...oses The real time monitoring window has a function for reading data from the actual memory and displaying it before program execution copy function and a function for displaying updated data in red When referring to RAM area of the 0 bank To use the real time monitoring function in the RAM area of the 0 bank the coverage function must be disabled by the following methods Command DISABLE COVERAGE ...

Страница 207: ...evious program execution Total number of cycles executed since the previous clearing Displaying Measurement Results Either of the following methods can be used to display the measurement results Display by dialog The results appear in the time measurement dialog which can be displayed by selecting Debug Time Measurement menu For details refer to Section 4 6 8 Time Measurement in SOFTUNE Workbench ...

Страница 208: ...mand window For details refer to Section 4 28 CLEAR TIMER in SOFTUNE Workbench Command Reference Manual Note The measured execution time is added about ten extra cycles per execution If the execution cycle is measured execute many instructions continuously in order to minimize the effect of error ...

Страница 209: ...Data break Sequencer and event Trace trigger Trace measurement Coverage measurement The power on debugging procedure is described below Set the DIP switch on the adapter board mounted in the upper part of the emulator Turn on the target board and emulator main unit Launch Workbench to start debugging For debugging set hardware breaks etc To start a power on debugging run Execute Power ON Debug men...

Страница 210: ...vals of 100 ms RAM Check Window The debugging window RAM Checker has been added to SOFTUNE Workbench to log monitor monitoring addresses For operations of Ram checker Window refer to Section 3 21 RAM Checker Window of SOFTUNE Workbench Operation Manual Use Conditions The RAM Checker operates under the following conditions Emulator MB2147 01 Communication device USB The RAM Checker cannot be used f...

Страница 211: ...sets the Log File By checking the short cut menu Logging start on the Ram checker Window a logging status of the Ram Checker becomes to enable COMMAND Set the debug function to RAM Checker mode by using SET MODE CONFIG command By command SET RAMCHECK user sets the monitoring points By command SET RAMCHECK user sets the Log File By command ENABLE RAMCHECK a logging status of the Ram Checker becomes...

Страница 212: ...e system is FAT FAT32 file name will be changed and continue logging when the size of file is exceeded limitation Note If a file is already existed log file will be overwritten Example of an operation If the size of file is exceeded it s limitation log file will be created as filename srl filename 1 srl If the size gets exceeded the limitation again log will be shown and changes as follows filenam...

Страница 213: ...lowing two causes The Data Lost caused by hardware The emulator obtains data access history of RAM at intervals of 1 ms but if two or more data access the same address within 1 ms the emulator obtains only the data of the last access Data loss caused by hardware indicates that several data accessed the same address The Data Lost caused by software SOFTUNE Workbench obtains data from the emulator a...

Страница 214: ...information dialog Select Help Version Information menu For details refer to Section 4 9 3 Version Information in SOFTUNE Workbench Operation Manual Displayed Contents F2MC 16 Family SOFTUNE Workbench VxxLxx ALL RIGHTS RESERVED COPYRIGHT C FUJITSU SEMICONDUCTOR LIMITED 1997 LICENCED MATERIAL PROGRAM PROPERTY OF FUJITSU SEMICONDUCTOR LIMITED Cpu information file path CPU information file path Cpu i...

Страница 215: ...ersion SiD907 dll version Debugger type Current debugger type MCU type Currently selected target MCU VCpu dll name Path and name of the currently used VCpu dll VCpu dll version Version of the currently used virtual debugger DLL DSU type Currently used DSU type Common version Version of monitor common Monitor version Version of monitor dependent Configuration board ID Configuration board ID Configu...

Страница 216: ...ng description explains the case when MB2147 05 has been selected MB2141 MB2147 01 MB2147 05 MB2198 The emulator debugger for the MB2147 05 is software that controls an emulator from a host computer via a communications line RS 232C or USB to evaluate programs The following series can be debugged F2MC 16L F2 MC 16LX Before using the emulator it must be initialized For details refer to Appendix B D...

Страница 217: ...gger for the MB2147 05 it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time Monitoring program automatic loading MCU operation mode Debug area Memory mapping ...

Страница 218: ...fied data in the emulator can be checked at the beginning of debugging to load an appropriate monitoring program and configuration binary data automatically into the emulator The monitoring program and configuration binary data to be compared for update are in Lib 907 under the directory where Workbench is installed Enable disable the monitoring program automatic loading function by choosing Envir...

Страница 219: ...ations of evaluation chips can be analyzed but their operating speed is slower than that of mass produced chips Native Mode Evaluation chips have the same timing as mass produced chips to control the operating speed Note that the restrictions the shown in Table 2 4 1 are imposed on the debug functions Table 2 4 1 Restrictions on Debug Functions in Native Mode Applicable series Restrictions on debu...

Страница 220: ... the breakpoint function Enhancement of Breakpoints Up to six breakpoints not including temporary breakpoints set using GO command can be set when the debug area has not yet been set When setting the debug area as the CODE attribute up to 65535 breakpoints can be set if they are within the area At this time up to six breakpoints can be set for an area other than the debug area but the total count ...

Страница 221: ...ossible to set up to four areas of 256 KB maximum including an internal ROM area described later as emulation memory area Define a region on a 256 byte boundary An area larger than 256 KB can be specified at one time but is divided internally into two or more 256 KB areas for management purposes Memory manipulation commands can be executed in relation to emulation memory areas while MCU execution ...

Страница 222: ...M image area Note that the debug information is only enabled for either one one specified when linked To debug only the internal ROM image area change the creation type of the load module file Note The internal memory area it is set a suitable area automatically by the selected MCU Undefined Area A memory area that does not belong to any of the areas described above is part of the user memory area...

Страница 223: ...ibutes However access to memory with the GUARD attribute in the undefined area causes an error When access is made to an area without the WRITE attribute by executing a program a guarded access break occurs after the data has been rewritten if the access target is the user memory However if the access target is the emulation memory the break occurs before rewriting In other words write protection ...

Страница 224: ...ser 000200 007FFF guard 008000 008FFF read write user 009000 FEFFFF guard FF0000 FFFFFF read write cod e emulation mirror address area 008000 008FFF copy The rest of setting area numbers user 6 emulation 3 Internal ROM Area Setting The Setup Map dialog box is displayed using Environment Debugger Memory Map menu You can set the internal ROM area using the Internal ROM Area after the Map Adding dial...

Страница 225: ...ns met at one time Instruction for which breakpoint set starts from odd address Preceding instruction longer than 2 bytes length and breakpoint already set at last 1 byte address of preceding instruction This already set breakpoint is an invalid breakpoint that won t break because it has been set at an address other than the starting address of an instruction Abnormal Breakpoint Setting a breakpoi...

Страница 226: ...instruction longer than 2 bytes length and last code ends at even address When breakpoint already set at last address This already set breakpoint is an invalid breakpoint that won t break because it has been set at an address other than the starting address of an instruction Controlling Watchdog Timer It is possible to select No reset generated by watchdog timer counter overflow while executing a ...

Страница 227: ...itions which allow you to use the commands in Table 2 4 3 are limited to the following cases when a user program is executed Debug Run Go menu Go button on the debug toolbar The commands in Table 2 4 3 cannot be used when the GO command is entered in the command window An error message appears if you enter a command that cannot be used during the execution of a user program E4404S Command error MC...

Страница 228: ...s can be used When the program execution is aborted by each break function the address and the break factor to do the break are displayed Break Functions In this emulator debugger five kinds of break functions are supported Code break Data break Guarded access break Trace buffer full break Forced break ...

Страница 229: ...ints set dialog Code tab Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window Disassembly window Notes on Code Break There are several points to note in using code break First some points affecting code break are explained Invalid Breakpoints No break occurs when a breakpoint is set at the instruction immediately after the following instructions F2 MC 16 16L 16LX 16...

Страница 230: ...MW Here are some additional points about the effects on other commands Dangerous Breakpoints Never set a breakpoint at an address other than the instruction starting address If a breakpoint is the last 1 byte of an instruction longer than 2 bytes length and if such an address is even the following abnormal operation will result If instruction executed by STEP command instruction execution not abor...

Страница 231: ... specified address When a break occurs due to a data break the following message is displayed on the Status Bar Break at Address by databreak at Access address Setting Method The data break is controlled by the following method Command SET DATABREAK Refer to 3 9 SET DATABREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Breakpoints set dialog Data tab Refer to 4 6 4 Breakpoint in SO...

Страница 232: ...ecution is done to the area without the code attribute the break is done Read guarded When the area without the read attribute is read the break is done Write guarded When the area without the write attribute is write the break is done If a guarded access occurs while executing a program the following message is displayed on the Status Bar and the program is aborted Break at Address by guarded acc...

Страница 233: ...race buffer becomes full When a break occurs due to a trace buffer full break the following message is displayed on the Status Bar Break at Address by trace buffer full Setting Method The trace buffer full break is controlled by the following method Command SET TRACE BREAK Refer to 4 30 SET TRACE type 2 in SOFTUNE Workbench Command Reference Manual Dialog Trace Set Dialog Refer to 4 4 8 Trace in S...

Страница 234: ...ote A forced break is not allowed while the MCU is in the low power consumption mode or hold state When a forced break is requested by the Debug Abort menu while executing a program the menu is disregarded if the MCU is in the low power consumption mode or hold state If a break must occur then reset the cause at user system side or reset the cause by using the Debug Reset MCU menu after inputting ...

Страница 235: ...a valid invalid Since the data signal is shared with other signals it does not always output data Therefore the trace samples information indicating whether or not the data is valid Data Not Traced The following data does not leave access data in the trace buffer Portion of access data while in native mode When operating in the native mode the F2MC 16L 16LX family of chips sometime performs simult...

Страница 236: ...orated to provide a means of acquiring information about data accesses to a specific region The data trace filter function allows the following values to be specified for two regions Address Address mask Access attribute read write Another function can be used so that sampling of redundant frames occupying two or more trace frames such as SLEEP and READY can be reduced to sampling of one frame 3 2...

Страница 237: ... disable the trace function use the DISABLE TRACE command The trace function is enabled by default when the program is launched 2 Perform trace buffer full break setup A break can be invoked when the trace buffer becomes full To perform setup use the SET TRACE command This break feature is disabled when the program starts To view the setting use SHOW TRACE STATUS Table 2 4 4 shows the commands rel...

Страница 238: ...splaying Trace Data Storage Status It is possible to displays how much trace data is stored in the trace buffer This status data can be read by specifying STATUS to the SHOW TRACE Example SHOW TRACE STATUS en dis enable Trace function enabled buffer full nobreak Buffer full break function disabled sampling end Trace sampling terminates frame no 00120 to 00050 Frame 120 to 50 store data step no 000...

Страница 239: ...so be specified Specifying Displaying Trace Data Start Specify the data display start position in the trace buffer by inputting a step number or frame number using the SHOW TRACE command The data display range can also be specified Example In Single Trace Mode SHOW TRACE CYCLE 6 Start displaying from frame 6 SHOW TRACE CYCLE 6 10 Display from frame 6 to frame 10 SHOW TRACE 6 Start displaying from ...

Страница 240: ...Display in source line units Specify SOURCE Display in Instruction Execution Order Specify INSTRUCTION Trace sampling is performed at each machine cycle but the sampling results are difficult to display because they are influenced by pre fetch etc This is why the emulator has a function to allow it to analyze trace data as much as possible The resultant data is displayed after processes such as el...

Страница 241: ... memory internal write access Write access to internal memory external read access Read access to external memory external write access Write access to external memory SHOW TRACE INSTRUCTION 194 step no address mnemonic sub4 00194 FF0106 LINK 00 00193 000186 internal read access 10F2 00192 1010E6 external write access 10F2 00191 000186 internal write access 10E6 00190 FF0108 ADDSP F8 00189 FF010A ...

Страница 242: ...rnal memory IRA read access to internal memory ERA read access to external memory ICF code fetch to internal memory ECF code fetch to external memory valid d status information 5 device information d status STANDBY hardware standby THOLD tool hold UHOLD user hold WAIT waiting by ready pin SLEEP sleep STOP stop EXECUTE execute instruction RESET reset invalid d status information 6 instruction queue...

Страница 243: ... df 00161 gtg1 c 264 p char df 00157 gtg1 c 265 p 0x00 00145 gtg1 c 266 p 0x00 00133 gtg1 c 267 p 0x80 00121 gtg1 c 268 p 0x7f 00116 gtg1 c 270 p char dd 00111 gtg1 c 271 p 0xff 00099 gtg1 c 272 p 0xff Note The following operation may be subjected to trace sampling immediately after the MCU operation is stopped tool hold Remember that the operation is unique to evaluation chips and not performed b...

Страница 244: ...s possible to check whether or not tracing has terminated by executing the SHOW TRACE command with STATUS specified or by using the built in variable TRCSAMP To read trace data use the SHOW TRACE command to search trace data use the SEARCH TRACE command Example GO SHOW TRACE STATUS en dis enable buffer full nobreak sampling on Trace sampling continues SHOW TRACE STATUS en dis enable buffer full no...

Страница 245: ...ct View Trace menu 2 Specify the name of the file in which to save trace data Right click on the trace window and select Save from the shortcut menu The Save as dialog appears Specify the file name and where to save trace data For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Saving Trace Data 1 Save trace data Execute the SHOW TRACE FILE command For ...

Страница 246: ...asurement dialog which can be displayed by selecting Debug Time Measurement menu For details refer to Section 4 6 8 Time Measurement in SOFTUNE Workbench Operation Manual Display by command Enter the SHOW TIMER command in the command window For details refer to Section 4 27 SHOW TIMER in SOFTUNE Workbench Command Reference Manual Clearing Measurement Results Either of the following methods can be ...

Страница 247: ...ins the case when MB2198 has been selected MB2141 MB2147 01 MB2147 05 MB2198 The emulator debugger for the MB2198 is software that controls an emulator from a host computer via a communications line RS 232C LAN or USB to evaluate programs The following series can be debugged F2MC 16FX Before using the emulator the emulator must be initialized For further details refer to Appendix B Download Monito...

Страница 248: ...MB2198 it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time Monitor program automatic load Boot ROM file automatic execution MCU operation mode Operation frequency control ...

Страница 249: ...ied data in the emulator can be checked at the starting of debugging to load an appropriate monitoring program and configuration binary data automatically into the emulator The monitoring program and configuration binary data to be compared for update are in Lib 907 under the directory where Workbench is installed Enable disable the monitoring program automatic loading function by choosing Environ...

Страница 250: ...tup Project menu and can be modified in the setup project dialog In addition it is also possible to automatically execute the Boot ROM file during the debugger startup or reset of MCU For details see the SOFTUNE Workbench Operation Manual Notes As the Boot ROM file contains information necessary for launching the emulator debugger it must be executed during startup of the debugger or upon reset If...

Страница 251: ...ace Mode In full trace mode execution of all the instructions can be traced with no trace data missed However when branching has been performed for three times or more within 11 cycles getting the trace data will be given a higher priority as waits are inserted for MCU it may not run in real time Real time Mode In real time mode execution can be performed in the real time of a program However when...

Страница 252: ...etween 1 and 266MHz inclusive This setting optimizes the communication speed between MCU and emulator This function can be set using the Setup Debugging Environment Debugging Environment Frequency menu or the SET FREQUENCY command Notes This setting sets the maximum frequency and will not change the actual operation frequency When a value smaller than the operation frequency is actually used the e...

Страница 253: ... instructions and the next instruction are executed as a single instruction Step Execution that won t Break Note that no break occurs after step operation when both the following conditions are met at one time When step instruction longer than 2 bytes length and last code ends at even address When breakpoint already set at last address This already set breakpoint is an invalid breakpoint that won ...

Страница 254: ...d data can be read updated even during MCU execution For further details refer to Section 2 5 4 Break Table 2 5 1 Commands Available during Execution of User Program Function Restrictions Major Commands MCU reset 1 3 RESET Displaying MCU execution status 2 12 SHOW STATUS Displaying execution cycle measurement value cycle 4 27 SHOW TIMER Memory operation Read Write 5 1 EXAMINE 5 2 ENTER 5 3 SET MEM...

Страница 255: ... toolbar The commands in Table 2 5 1 cannot be used when the GO command is entered in the command window An error message appears if you enter a command that cannot be used during the execution of a user program E4404S Command error MCU is busy In Table 2 5 1 the commands of the memory operation and line assembly disassembly are read write when the CPU is temporarily stopped while the programs are...

Страница 256: ...ram execution is aborted by each break function the address and the break factor to do the break are displayed Break Functions In this emulator debugger seven kinds of break functions are supported Code break Data break Guarded access break Trace buffer full break Performance buffer full break External trigger break Forced break ...

Страница 257: ... The maximum setting number is as follows Hardware 4 points Software 2048 points When a break occurs due to a code break the following message is displayed on the Status Bar Hardware Break at Address by hardware breakpoint Software Break at Address by breakpoint Setting Method The code break is controlled by the following method Command SET BREAK HARD Hardware SET BREAK SOFT Software Refer to 3 1 ...

Страница 258: ...ng from the address where the hardware break was set if the preceding execution has been stopped due to reasons other than instruction break break will occur without execution of the instruction In such a case when re execution is performed the instruction will be executed Software There are the following considerations for the software break Setting cannot be performed in areas such as ROM where ...

Страница 259: ...tabreak at Access address Setting Method The data break is controlled by the following method Command SET DATABREAK Refer to 3 9 SET DATABREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Breakpoint Set Dialog Data tab Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Notes Due to combination use with the sequencer or trace trigger the maximum setting number varies Wor...

Страница 260: ...instruction is executed for the specified area Read guarded Break will occur when read is performed for the specified area Write guarded Break will occur when write is performed for the specified area If a guarded access occurs while executing a program the following message is displayed on the Status Bar and the program is aborted Break at Address by guarded access code read write at Access addre...

Страница 261: ... The break or trace control acquisition start acquisition end can be set when the sequencer is ended END The break is selected at this time The trace control acquisition start acquisition end can be set at each event hit of the sequencer The current sequence level shift state at break can be displayed 3 level sequence 3 level sequence is set in the 3 level sequence setting dialog displayed in Debu...

Страница 262: ...race buffer becomes full When a break occurs due to a trace buffer full break the following message is displayed on the Status Bar Break at Address by trace buffer full Setting Method The trace buffer full break is controlled by the following method Command SET TRACE BREAK Refer to 4 30 SET TRACE type 2 in SOFTUNE Workbench Command Reference Manual Dialog Trace Set Dialog Refer to 4 4 8 Trace in S...

Страница 263: ...erformance measurement data storage becomes full When a break occurs due to a performance buffer full break the following message is displayed on the Status Bar Break at Address by performance buffer full Setting Method The performance buffer full break is controlled by the following method Command SET PERFORMANCE BREAK Refer to 4 8 SET PERFORMANCE type 2 in SOFTUNE Workbench Command Reference Man...

Страница 264: ... is input from TRIG pin that the emulator has When a break occurs due to an external trigger break the following message is displayed on the Status Bar Break at Address by external trigger break Setting Method The external trigger break is controlled by the following method Command SET TRIGGER Refer to 3 42 SET TRIGGER in SOFTUNE Workbench Command Reference Manual Dialog Debugging environment set ...

Страница 265: ...ote A forced break is not allowed while the MCU is in the low power consumption mode or hold state When a forced break is requested by the Debug Abort menu while executing a program the menu is disregarded if the MCU is in the low power consumption mode or hold state If a break must occur then reset the cause at user system side or reset the cause by using the Debug Reset MCU menu after inputting ...

Страница 266: ...READ WRITE can be specified Up to eight events can be set However since hardware is shared with trace triggers the actual numbers is calculated as follows Current maximum constant of events 8 current number of break settings current number of trace trigger settings Table 2 5 3 shows the conditions that can be set for events Table 2 5 2 Sequencer Specifications Function Specifications Level count 8...

Страница 267: ...s In instruction execution CODE an event trigger is generated only when an instruction is executed This cannot be specified concurrently with other status READ or WRITE In the case of data event word access from an odd address in terms of bus access is performed using a byte access for twice Note that this is the reason why even when word access from an odd address is specified there is nothing fo...

Страница 268: ...e sequencer ends and the break is done Operating of Sequencer The sequencer works in the following order The event can be set as each level and a restart condition 1 The sequencer starts when the program execution begins 2 It diverges to the level the shift ahead when the condition consists by setting each level 3 When the restart condition consists the sequencer is begun again 4 When the conditio...

Страница 269: ...255 CHAPTER 2 DEPENDENCE FUNCTIONS Figure 2 5 1 Operation of Sequencer START LEVEL1 LEVEL2 LEVEL3 LEVEL4 LEVEL5 LEVEL6 END EVENT 1 EVENT 4 EVENT 2 EVENT 3 EVENT 6 EVENT 5 EVENT 7 EVENT 8 ...

Страница 270: ...the trace function is called trace data The following data is sampled Branching instruction frame Branching source address branching target address disassemble Data frame Access address Access data Access size Access attribute read write and Bus master CPU DMA Special frame Program stop Trace start end Reset Loop count Extended time stamp frame Data lost Difference of execution time with frame imm...

Страница 271: ...gger For the use of the trace trigger function specify the code CODE and data access READ WRITE Up to 4 trace triggers can be preset each for code attribute and data access attribute However actually the maximum number of trace triggers is determined as indicated below because the common hardware is used with events Current trace trigger maximum constant 4 current break count setting current event...

Страница 272: ...ted size trace buffer Such setups should be performed on a necessary base The trace trigger can specify the start stop of trace sampling with the trigger hit as the reason When the trace trigger is used setup is performed by inputting the SET TRACE TRIGGER command 3 Perform trace buffer full break setup A break can be invoked when the trace buffer becomes full To perform setup use the SET TRACE co...

Страница 273: ...he case of the data trace trigger word access from an odd address in terms of bus access is performed using a byte access for twice Note that this is the reason why there will not be any hits even when word access is specified from an odd address ...

Страница 274: ...isplaying Trace Data Storage Status It is possible to displays how much trace data is stored in the trace buffer This status data can be read by specifying STATUS to the SHOW TRACE Example SHOW TRACE STATUS en dis enable Trace function enabled buffer full nobreak Buffer full break function disabled code enable Code execution enabled loop compress enable loop compress function enabled frame no 0012...

Страница 275: ...nge can also be specified Specifying Displaying Trace Data Start Specify the data display start position in the trace buffer by inputting a step number or frame number using the SHOW TRACE command The data display range can also be specified Example SHOW TRACE RAWDATA 6 Start displaying from frame 6 SHOW TRACE RAWDATA 6 0 Display from frame 6 to frame 0 SHOW TRACE 6 Start displaying from step 6 SH...

Страница 276: ...cution is stopped Trace ON code data hit Indicates that trace acquisition is started Trace OFF code data hit Indicates that trace acquisition is stopped SHOW TRACE RAWDATA 2400 frame no address data mnemonic time stamp 02400 DF02B3 BRA DF0296 DF0296 1 02399 write 0010 at 004A32 02398 read 0010 at 004A32 8 02397 DF029B BGE DF02B5 DF02B5 INT 3 02396 DF02BC Trace ON code hit 10 02395 write 0000 at 00...

Страница 277: ...ther than the program lockup frame are displayed The display in this mode is as follows Special frame is as follows Trace ON code data hit Indicates that trace acquisition is started Trace OFF code data hit Indicates that trace acquisition is stopped Reset Indicates that reset is detected Loop Count Number of times Displays number of times which loop count occurs Extended time stamp frame Displays...

Страница 278: ...le SHOW TRACE SOURCE 1010 86 step no source 01007 sample c 68 value i target I 00905 sample c 68 value i target I 00803 sample c 68 value i target I 00698 sample c 70 sort_val value 16L 00655 sample c 9 00594 sample c 13 for k max 2 k 1 k 00185 sample c 14 i k 00149 sample c 15 p tblp i 1 00088 sample c 16 while j 2 i max ...

Страница 279: ...ct View Trace menu 2 Specify the name of the file in which to save trace data Right click on the trace window and select Save from the shortcut menu The Save as dialog appears Specify the file name and where to save trace data For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Saving Trace Data 1 Save trace data Execute the SHOW TRACE FILE command For ...

Страница 280: ...n enables the performance of a program to be measured Performance Measurement Function The performance measurement allows the time between two event occurrences to be measured and the number of event occurrences to be counted Up to 65535 event occurrences can be measured Measuring Time Measures time interval between two events Two sections can be set Measuring Count The specified events become per...

Страница 281: ... buffer full break The performance buffer becomes full when an event occurs 65535 times If the performance buffer full break is not specified the performance measurement ends but the program does not break Example SET PERFORMANCE NOBREAK Specifying Not Break Setting Events The event is set by event setting performance section setting dialog or SET PERFORMANCE command Two sections can be set Measur...

Страница 282: ...CE command Displaying Measured Time To display the time measured specify the starting event number or the ending event number Event number Minimum execution time Maximum execution time Average execution time Count of measuring within given time interval µ Total measuring count µ Lower time limit for display Upper time limit for display 1 9000 18999 1000 ...

Страница 283: ...earing Displaying Measurement Results Either of the following methods can be used to display the measurement results Display by dialog The results appear in the time measurement dialog which can be displayed by selecting Debug Time Measurement menu For details refer to Section 4 6 8 Time Measurement in SOFTUNE Workbench Operation Manual Display by command Enter the SHOW TIMER command in the comman...

Страница 284: ... DEPENDENCE FUNCTIONS Note The measured execution time is added about ten extra cycles per execution If the execution cycle is measured execute many instructions continuously in order to minimize the effect of error ...

Страница 285: ...k Sequencer Trace trigger Trace measurement Coverage measurement The power on debugging procedure is described below Set the DIP switch on the adapter board mounted in the upper part of the emulator Turn on the target board and emulator main unit Launch Workbench to start debugging For debugging set hardware breaks etc To start a power on debugging run Execute Power ON Debug menu Input the lower l...

Страница 286: ...g search comparison filling transfer Setting cancellation of events Setting cancellation of trace mode FLASH support Similar to the RAM area data can be downloaded to FLASH memory as well as read written from the memory window Multifunctional events Events can be used in the following six functions Code break hardware Code break hardware count Data break Data watch break Sequence Performance trigg...

Страница 287: ...ivated For details refer to 4 7 2 5 Setup Wizard in SOFTUNE Workbench Operation Manual Verification Items When Starting Debugging When starting debugging perform checking for initial settings When an item of initial setting is not correct debugging cannot be started Operating environments of the target Verify whether the operating environment of the target has a problem For details refer to 2 6 1 ...

Страница 288: ...influence the communication speed of the debugger Source oscillation frequency Set main clock MCLK The communication speed between MB2100 01 and the user system varies depending on the main clock Length of DEBUG I F cable Specified the length of the cable that suits the length of DEBUG I F cable The allowance maximum transfer rate from MB2100 01 to the direction of MCU changes according to this le...

Страница 289: ...otes When the operating environment set by the setup wizard is different from the actual operating environment the debugger cannot be activated For details on the DEBUG I F interface refer to EMBEDDED EMULATOR MB2100 01 E OPERATION MANUAL ...

Страница 290: ...shown below is displayed enter a preset password The password is needs to be entered each time the debugger is activated For details on the password refer to the description of Password for OCD On Chip Debugger start permission in the hardware manual for the product used Figure 2 6 2 Debugger Connection Password Note When authentification of the password has failed the debugger cannot be activated...

Страница 291: ... written data is reverted If it has ended abnormally software break code may remain without data being reverted When starting the debugger it checks whether this software break exists If it does the following message appears The software break set in A on B might remain A A project name displayed when the debugger aborted B The date when the debugger aborted When the message is displayed download ...

Страница 292: ...ably execute debugging the emulator debugger provides the following items required to be set correspondingly to for example the operating environment and the usage Standard clock frequency for high speed communication Debug function Therefore if the default value is used as it is there is no need to change this setting In addition a set value once specified is set as a default for the subsequent o...

Страница 293: ...peed communication is different in optimal value depending on the MCU For details refer to the hardware manual of model to be used How to set The method of setting the standard clock frequency for high speed communication is described below Setting by dialog Select the Setup Debug environment Debug environment menu and then select the Frequency tab For details refer to 4 7 2 3 Debug Environment in...

Страница 294: ...ode measures the time between specified two events points Pass count mode This mode selects the using method for the pass count function Sequential mode This mode uses the sequential function The pass count break cannot be used Pass count break mode default This mode uses the pass count break The sequential function cannot be used Switching methods Methods of switching to the execution time mode a...

Страница 295: ... debugging For details refer to 2 6 1 Starting debugging 3 Load an execution desired target program When loading a project target file select the Debug Load target file menu 4 Execute program Select the Debug Run GO menu For other executions such as step execution refer to 4 6 1 Run in SOFTUNE Workbench Operation Manual Control during program execution This emulator debugger is capable of controll...

Страница 296: ...ble during Execution of User Program Function Major Command name 1 Reset MCU 1 3 RESET Memory operation read write 5 1 EXAMINE 5 2 ENTER 5 3 SET MEMORY 5 4 SHOW MEMORY 5 5 SEARCH MEMORY 5 8 COMPARE 5 9 FILL 5 10 MOVE 5 11 DUMP Line assemble disassemble 6 1 ASSEMBLE 6 2 DISASSEMBLE Set delete breakpoint 3 1 SET BREAK type1 3 3 SET BREAK type3 3 6 CANCEL BREAK 3 7 ENABLE BREAK 3 8 DISABLE BREAK 3 10...

Страница 297: ...283 CHAPTER 2 DEPENDENCE FUNCTIONS Note An error message appears if you enter a command that cannot be used during the execution of a user program E4404S Command error MCU is busy ...

Страница 298: ...through any one of methods described below Select the shortcut menu Monitoring of the memory window Select the Setup Debug environment Debug environment menu to display the Monitoring tab 3 Execute the program According to the above a portion with variation during the program execution is displayed in red When performing monitoring of the watch window 1 Display the watch window Select the View Wat...

Страница 299: ...Debug menu It shifts to power on debug mode 3 Execute the user program Continuous execution of the user program that doesn t do anything such as infinity looping is recommended Display the confirmation dialog whether the program execution is interrupted 4 Do either the following Chip reset is issued from the outside The power supply of the target is turned on again After the power supply returns t...

Страница 300: ...debug is not available Selecting the power on debug menu the following functions cleared Performance measurement Execution cycle measurement Turning on the power supply of the target again the following functions cleared Performance measurement Trace data Data match status of Data watch break Hit count of Sequence Hit count of Passcount break ...

Страница 301: ...point is set at three instructions or less immediately after the following instructions Notes on STEP Command Exceptional Step Execution When executing the instructions listed in the notes on the GO command as invalid breakpoints such an instruction and next three instructions are executed as a single instruction Furthermore when above mentioned instructions are included in the next continuous ins...

Страница 302: ...g three instructions 2 3 and 4 following POP PS three instructions 4 5 and 6 following instruction 3 are executed continuously Consequently the program counter PC advances to NOP instruction 7 when the step operation is executed from the point of POP PS instruction 1 Note Issuing a chip reset during the execution of the user program the following functions cleared Execution cycle measurement Perfo...

Страница 303: ...zation Flash Debugger Updates the contents of the flash memory Flash memory synchronization Debbuger Flash Updates the stored data on the flash memory Methods of flash memory synchronization Flash memory synchronization can be performed in either a manual or automatic method Flash memory synchronization Flash Debugger Manual flash memory synchronization Select the Environment Flash area control me...

Страница 304: ...ontrol in SOFTUNE Workbench Operation Manual Automatic flash memory synchronization When a user program has been executed When a reset has been issued When debugging has been ended When the use of software break is set to prohibition When the target file is automatically loaded at start of debugging Note To shorten flash memory synchronization processing set the communication speed of the debugger...

Страница 305: ...onization Debugger Flash has been performed is shown below FF FF FF FF FF FF FF FF 12 34 56 78 Variations in the values of the debugger and flash memory in the case of the flash memory synchronization Debugger Flash Occurrence of flash memory synchronization Debugger Flash Debugger Flash memory Memory writing loading etc by the user Execution and reset etc ...

Страница 306: ...been performed is shown below FF FF FF FF 12 34 56 78 Variations in the values of the debugger and flash memory in the case of the flash memory synchronization Flash Debugger Occurrence of flash memory synchronization Flash Debugger Debugger Flash memory Execution of a user program that writes to the flash memory Synchronization Flash Debugger ...

Страница 307: ...nctions The function to interrupt the execution of the user program is called a break function This Emulator debugger provides the following seven types of break functions Code break hardware Code break hardware count Code break software Data break Forced break Data watch break Sequencer When by each break function aborts program execution the address where a break occurred and the break factor ar...

Страница 308: ...type 1 in SOFTUNE Workbench Command Reference Manual Dialog Code tab in the breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window disassemble window Refer to 3 7 Source Window or 3 9 Disassemble Window in SOFTUNE Workbench Operation Manual Special Operation when breakpoint is set If the specified condition is satisfied in the debugger note t...

Страница 309: ...vct JCTX A RETI Undefined instructions exceptions Notes When setting a breakpoint always specify the starting address of the instruction A break may not occur if an address other than the starting address is specified A code break shares points with the following functions The maximum number varies depending on how those functions are used Data break Data watch break Sequence When hardware or hard...

Страница 310: ...ea when prohibiting it Dialog Setup wizard For details refer to 4 7 2 5 Setup Wizard in SOFTUNE Workbench Operation Manual Debug environment setting dialog Break tab For details refer to 4 7 2 3 Debug Environment in SOFTUNE Workbench Operation Manual How to set Control the code break in the following methods Command SET BREAK SOFT Refer to 3 1 SET BREAK type1 in SOFTUNE Workbench Command Reference...

Страница 311: ... type 1 in SOFTUNE Workbench Command Reference Manual Dialog Data tab in the breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Notes A data break shares points with the following functions The maximum number varies depending on how those functions are used Code break Data watch break Sequence The data break may stop after a few instructions following the ins...

Страница 312: ...on When the communication speeds of the debugger is low it can take time to receive a program stop request Solution Await for some time until receipt of the stop request is completed The interrupt level is low Phenomenon When the interrupt level of the program stop request is low the interrupt is masked by the CPU interrupt level ILM Solution 1 Alter the interrupt level of the stop request and iss...

Страница 313: ... in the status bar when a data watch break occurs Break at address by breakpoint data watch The break conditions for the data watch break are illustrated in the Figure 2 6 3 Figure 2 6 3 Break Conditions for Data Watch Break How to set Control the data watch break in the following methods Data watch break Command SET BREAK DATAWATCH Refer to 3 3 SET BREAK type3 in SOFTUNE Workbench Command Referen...

Страница 314: ... Sequence The data watch break may stop if it hits a specified address after a few instructions following the instruction with data detection access are executed Consequently it may not stop if it hits the specified address during the execution of an instruction If the instruction address of the data watch break is set to the string instruction the program execution may not stop as expected ...

Страница 315: ...o level 2 in this order This becomes sequencer termination condition This sequencer is called a 2 level sequencer Furthermore pass information up to that point is reset and an event for restart which monitors the passage of level 1 againg can be set Operation of Sequencer When events are set to each level as shown in example the sequencer operates as shown in Figure 2 6 4 Example Level 1 Event 1 L...

Страница 316: ...e event set by the SET SEQUENCE command is set as a sequence For details refer to 3 22 SET EVENT type 2 or 3 28 SET SEQUENCE type2 in SOFTUNE Workbench Command Reference Manual Table 2 6 2 Specifications of Sequencer Function Specification No of levels 2 levels Restart function Available one Conditions of each event Code data Address Pass count 1 to 1048575 Attribute Read write Data size Byte Word...

Страница 317: ... may not occur A sequencer shares points with the following functions The maximum number varies depending on how those functions are used Code break Data break Data watch break If a data event is set to the sequencer the data event may stop after a few instructions following the instruction with detection access are executed If an event of the sequencer is set to the string instruction the sequenc...

Страница 318: ...to display the measurement results Display by dialog The results appear in the time measurement dialog which can be displayed by selecting Debug Time Measurement menu For details refer to Section 4 6 8 Time Measurement in SOFTUNE Workbench Operation Manual Display by command Enter the SHOW TIMER command in the command window For details refer to Section 4 27 SHOW TIMER in SOFTUNE Workbench Command...

Страница 319: ...UNCTIONS Notes The number of cycles measured normally includes an error of about 10 cycles However it may be even more depending on the bus state If a chip reset is issued during debugging the measurement cycle count is cleared ...

Страница 320: ...sult and obtaining the average value based on the measuring count The following shows the performance measurement image Measurement Items The measurement items for the performance function are as follows Cycle count Accumulates the number of cycles required to carry out the event to event execution Measuring count Accumulates the number of times the system passes from event to event Average Averag...

Страница 321: ...val have occurred at the same time performance measuring is not performed An error of approximately 10 cycles is always detected each time a user program is re executed because its execution has been stopped due to a breakpoint during performance measurement The error may exceed 10 cycles depending on the bus state If the performance measurement interval event is re specified during execution of a...

Страница 322: ...btained Using GUI for measuring 1 Display the performance window Select View Performance menu For details refer to Section 3 18 Performance Window in SOFTUNE Workbench Operation Manual 2 Specify the performance measuring interval Right click on the performance window and select Setup from the shortcut menu The performance setting dialog appears Here click the Display Range tab to specify the inter...

Страница 323: ...n SOFTUNE Workbench Command Reference Manual Ending the Measurement The performance measurement is ended in one of the following cases The measuring count has reached 65535 A user program has stopped during measurement Notes If Refresh is selected in the performance window during performance measuring only the measuring count appears Whether the performance measurement is currently being continued...

Страница 324: ...ends acquiring trace data without stopping the execution of a user program during acquisition of trace data Acquiring Trace Data The trace data acquisition is started and ended at the following times The acquisition is started when a user program has been executed or the Start menu has been selected when a user program has been executed The acquisition is ended when a user program has been stopped...

Страница 325: ...gure 2 6 5 Acquiring Trace Data Note Executing the forced start will clear the trace data that was stored until then Start execution Stop execution Start execution Stop execution Program flow Trace Buffer Max 1 024 frames When a break occurred during execution of a program ...

Страница 326: ...ily the last sampled trace data is assigned to frame number 0 How to Display Trace Data Trace data is displayed in the trace window or command window The following two display methods are available both of which enable you to obtain the same result Using trace window 1 Display the trace window Select View Trace menu 2 Select the display mode of the trace window Right click on the trace window and ...

Страница 327: ...SHOW TRACE Instruction SHOW TRACE Source SHOW TRACE For details refer to Section 4 32 SHOW TRACE type 2 in SOFTUNE Workbench Command Reference Manual Note In the disassembly format data is read from memory to be displayed If an instruction is rewritten after code fetching data will not be displayed correctly ...

Страница 328: ...110A8 000110A8 mnemonic Displays the instructions that are executed SHOW TRACE RAWDATA 10 frame no address mnemonic 00010 FF00E1 RETI FF010E 00009 FF011F BRA FF010E FF010E 00008 FF010E MOVW A 0190 FF00CE INT 00007 FF00E1 RETI FF010E 00006 FF011F BRA FF010E FF010E 00005 FF010E MOVW A 0190 FF00CE INT 00004 FF00E1 RETI FF010E 00003 FF011F BRA FF010E FF010E 00002 FF010E MOVW A 0190 FF00CE INT 00001 FF...

Страница 329: ...h addresses Note For branch addresses b addr an instruction between the branch addresses is extracted to get the frames to complement each other by disassembly When they are complemented the frame number field is blank SHOW TRACE RAWDATA 2400 frame no address mnemonic sample c 39 00003 FF011F BRA FF010E FF010E sample c 36 while flag2 00002 FF010E MOVW A 0190 FF00CE INT sample c 14 ExtInt FF00CE LI...

Страница 330: ... a source display example Figure 2 6 8 Example of the Trace Data Display Source frame no Displays frame numbers as decimal number source Displays the source line to be executed SHOW TRACE SOURCE 10 5 frame no source sample c 61 if p val tblp j 1 val 00007 sample c 62 break sample c 66 tblp i 1 p 00006 sample c 67 sample c 53 while max 1 sample c 54 p tblp max 1 sample c 55 tblp max 1 tblp 0 sample...

Страница 331: ...ct View Trace menu 2 Specify the name of the file in which to save trace data Right click on the trace window and select Save from the shortcut menu The Save as dialog appears Specify the file name and where to save trace data For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Saving Trace Data 1 Save trace data Execute the SHOW TRACE FILE command For ...

Страница 332: ...ace Data 1 Display the trace window Select View Trace menu 2 Specify the address or frame number to search for trace data Right click on the trace window and select Find from the shortcut menu The trace data search dialog appears Specify the address or frame number to be displayed For details refer to Section 4 4 8 Trace in SOFTUNE Workbench Operation Manual Using Command for Searching for Trace D...

Страница 333: ...from MBR according to the arrow in Figure 2 6 9 For details of on chip debugger OCD and MBR refer to the hardware manual Figure 2 6 9 Data Flow in Semihosting Feature What is Terminal Window Terminal window is the window displaying data when receiving an output request from user program to MBR Refer to section 3 22 Terminal Window of SOFTUNE Workbench Operation Manual for details of terminal windo...

Страница 334: ...E Workben ch Operation Manual 2 Display the content of the output request to MBR on the terminal window Use the following method to display the terminal window The following two methods are available to display the content of the output request using GUI window and using the command The same result is obtained from both methods Display by window The content is displayed in the terminal window sele...

Страница 335: ...6 Family SOFTUNE Workbench VxxLxx ALL RIGHTS RESERVED COPYRIGHT C FUJITSU SEMICONDUCTOR LIMITED 1997 LICENCED MATERIAL PROGRAM PROPERTY OF FUJITSU SEMICONDUCTOR LIMITED Cpu information file path CPU information file path Cpu information file version CPU information file version Add in DLLs SiCmn Product name SOFTUNE Workbench File Path SiC907 dll path Version SiC907 dll version SiiEd File Path Sii...

Страница 336: ...ersion FPGA version FPGA version Maker ID ID that indicates the device manufacturer CPU family ID ID that indicates the CPU family installed in the device DSU type ID ID that indicates the OCD DSU installation type DSU version ID ID that indicates version information of the DSU installed in the device Device ID ID that indicates device information Device version ID ID that indicates device version...

Страница 337: ...tions of the monitor debugger Monitor Debugger The monitor debugger performs debugging by putting the target monitor program for debugging into the target system and by communicating with the host Before using this debugger the target monitor program must be ported to the target hardware ...

Страница 338: ...ogram into the target hardware Table 2 7 1 Resources Used by Monitor Debugger 1 UART Necessary For communication with host computer 4800 9600 19200 38400 bps 2 Monitor ROM Necessary Need about 10 KB For details refer to link map 3 Work RAM Necessary Need about 2 KB For details refer to link map 4 External interrupt switch Option Uses for forced abortion of program When the switch is not built in t...

Страница 339: ... of break functions can be used When the program execution is aborted by each break function the address and the break factor to do the break are displayed Break Functions In this monitor debugger the following two types of break functions are supported Software break Forced break ...

Страница 340: ...ed on the status bar Break at Address by breakpoint Setting Method The software break is controlled by the following method Command SET BREAK SOFT Refer to 3 1 SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Breakpoint Set Dialog Code tab Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window Disassembly window Note There are a couple of points t...

Страница 341: ...on to abort the execution of the program compulsorily Forced Break It is a function to abort the execution of the program compulsorily When a break occurs due to a forced break the following message is displayed on the Status Bar Break at Address by command abort request ...

Страница 342: ...328 CHAPTER 2 DEPENDENCE FUNCTIONS ...

Страница 343: ...329 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...

Страница 344: ...k 44 Flow of Data Break 46 Forced Break 49 87 162 220 251 327 Guarded Access Break 48 84 158 218 246 Monitoring Data Break 156 Notes on Code Break 44 80 215 Notes on Data Break 153 Performance Buffer Full Break 86 160 249 Sequential Break 83 157 Software Break 326 Specify Performance Buffer Full Break 123 185 Specifying Performance Buffer Full Break 267 Trace Buffer Full Break 47 85 159 219 248 Bu...

Страница 345: ... Break 156 Notes on Data Break 153 Data Watch Break Data Watch Break 299 Debug Setting Debug Area 67 141 206 Setting of Debug Function 146 Debug Functions Debug Functions 280 Debugger Debugger Information 61 135 200 321 Emulator Debugger 22 63 233 Monitor Debugger 22 323 Operating Condition of High speed Simulator Debugger 32 Simulator Debugger 22 32 Type of Debugger 22 When the debugger has abort...

Страница 346: ...quencer 103 Forced Break Forced Break 49 87 162 220 251 298 327 Format Display Format of Trace Data 54 Project Format 3 Frame Frame Number 52 Frame Number Frame Number 167 221 256 Frame Number and Step Number in Single Trace 107 Multi Trace Frame Number 110 Function Break Functions 43 79 152 214 242 325 Build Function 6 Coverage Measurement Function 57 126 188 Customize Build Function 7 Error Jump...

Страница 347: ...rement Results 50 131 193 232 269 304 Measurement ResultsClearing Measurement Results 269 Measuring Measuring Coverage 58 127 189 Measuring Item Measurement Items 50 131 193 232 269 Memory Access Attributes for Memory Areas 71 144 209 Creating and Viewing Memory Map 71 145 210 Functions for Memory Operations 23 Memory Area Access Attributes 37 Memory Area Types 68 142 207 Memory Simulation 37 Read...

Страница 348: ...23 MCU Operation Speed 66 Operation frequency 238 Operation in Multi Trace Mode 92 Operation in Normal Mode 90 Operation in Performance Mode 94 Register Operations 24 Setting MCU Operation Mode 65 140 205 237 Operation Requirements Operation Requirements 296 Options Function of Setting Tool Options 10 Setting Options 7 14 16 Tool Options 10 Output Port I O Port Simulation Output Port 38 P Performa...

Страница 349: ...ion 40 Restrictions Restrictions on Storage of Two or More Projects 2 Result Displaying Coverage Measurement Result 58 127 189 ROM Boot ROM File Automatic Execution 35 236 Internal ROM Area Setting 72 145 210 ROM Area Internal ROM Area Setting 210 S Sample Sample Flow of Time Measurement by Sequencer 103 Sampling Sampling by External Probe 133 Saving Saving Trace Data 56 121 183 231 265 Scope Scop...

Страница 350: ...Specifications List 197 Specify Specify Performance Buffer Full Break 123 185 Specifying Specifying C Language Variables 29 Specifying Displaying Trace Data Start 114 177 225 261 Specifying Performance Buffer Full Break 267 Specifying Symbol and Search Procedure 28 Standard Clock Frequency Standard Clock Frequency for High speed Communication 279 Standard Editor Standard Editor 13 Status Displayin...

Страница 351: ...l during Executing User Program 169 Trace Data 52 105 167 221 256 Trace Delay 172 Trace Enhancement Mode 146 Trace Filter 168 222 257 Trace Functions 310 Trace Sampling Control by Sequencer 100 Trace Trigger Setup 168 257 What is Trace 310 Trace Buffer Trace Buffer 310 Trace Data Acquiring Trace Data 310 Display Formats of Trace Data 312 How to Display Trace Data 312 Saving Trace Data 317 Searchin...

Страница 352: ...338 INDEX ...

Страница 353: ...lophon CM41 00313 6E FUJITSU SEMICONDUCTOR CONTROLLER MANUAL F2MC 16 FAMILY SOFTUNETM Workbench USER S MANUAL April 2011 the 6th edition Published FUJITSU SEMICONDUCTOR LIMITED Edited Sales Promotion Dept ...

Страница 354: ......

Отзывы: