Home
F MC -8L/8FX FAMILY USER`S MANUAL
Contents
1. Union union utag uni i Value of member i of uni char c int i uni Address of variable int data amp data Address of data Reference type int i ri Same as i int amp ri i Class class X cls i Value of member i of class X static int i Xi Same as cls i cls int X i Member pointer class class X clo ps Same as clo cs short cs clp gt ps Same as clp gt cs clo short X ps amp X cs X clp amp clo 30 E Notes on C C Symbols The C C compiler outputs symbol information with _ prefixed to global symbols For example the symbol main outputs symbol information _main However SOFTUNE Workbench permits access using the symbol name described in the source to make program debugging described in C C easier Consequently a symbol name described in C C 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 the symbol name searched first becomes valid To refer to another one specify the symbol with the module name 31 CHAPTER 1 Basic Functions 32 CHAPTER 2 Dependence Function This chapter describes the functions dependent on F2MC 8L 8FX family MCU 2 1 Simulator Debugger 2 2 Emulator Debugger MB2141
2. April 2004 the first edition Published FUJITSU LIMITED Electronic Devices Edited Business Promotion Dept 114
3. L 3 Indicates 4 II a move to level Indicates terminating 2 whenevent SI sequencer when event 2 1 occurs at occurs at level 2 level 1 e 8 Tr T gt 1 Latch 1 gt gt SHOW SEQUENCE 2 level no 2 Indicates move to level 1 when 300 us passed before event pass count trace cnt1 event 2 occurs at level 2 2 1 enable timer 00 00 000 300 000 enable 1 61 CHAPTER 2 2 2 5 2 Break by Sequencer A program can suspend program execution when the sequencer terminates This break is called a sequential break E Break by Sequencer A program can suspend program execution when the sequencer terminates This break is called a sequential break As shown in Figure 2 2 8 the delay count starts when the sequencer terminates and after delay count ends either break or not break but tracing only terminates is selected as the next operation To make a break immediately after the sequencer terminates 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 8 Operation when sequencer terminates Tracing terminates Break Sequential break Sequencer Delay Count ends terminates counter Tracing terminates Not break 62 Examples of Delay Count Setups
4. Example gt SET MAP USER H 0 H 1 FFF gt SET MAP READ EMULATION H FFOO H FFFF gt SET MAP GUARD gt SHOW MAP address attribute type 0000 1FFF code read write user FFOO FFFF code read emulation undefined area guard setup possibility user 19 emulation 19 46 2 2 1 4 Timer Minimum Measurement Unit The timer minimum measurement unit affects the sequencer the emulation timer and the performance measurement timer E Setting Timer Minimum Measurement Unit Choose either us or 100 ns as the timer minimum measurement unit for the emulator of measuring time The minimum measurement unit for the following timers is changed depending on this setup e Timer values of sequencer timer conditions at each level e Emulation timer es Performance measurement timer Table 2 2 2 shows the minimum measurement time length of each timer when us 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 us Table 2 2 2 Minimum Measurement Time Length of Each Timer Keel 1 us selected 100 ns selected Sequencer timer About 16 s About 1 6 s Emulation timer About 70 min About 7 min Performance measurement timer About 70 min About 7 min Use the following commands to control timers es SET TIMERSCALE command Sets minimum measurement unit for timers e SHOW TIMERSCALE command
5. This section explains the make build function of SOFTUNE Workbench E Make Function Make function generates a target file by compiling assembling only updated source files from all source files registered in a project and then joining all required object files This function allows compiling assembling only the minimum of required files The time required for generating a target file can be sharply reduced especially when debugging For this function to work fully the dependence between source files and include files should be accurately grasped To do this SOFTUNE Workbench has a function for analyzing include dependence For details see Section 1 5 Include Dependencies Analysis Function E 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 object files Using this function causes all files to be compiled assembled resulting in the time required for generating the target file longer Although the correct target file can be generated from the current source files The execution of Build function is recommended after completing debugging at the final stage of program development Note When executing the Make function using a source file restored from backup the integrity between an object file and a source file may be lost If this happens executing the Build funct
6. Data access breaks can be controlled using the following commands SET DATABREAK Sets break points SHOW DATABREAK Displays current break point setup status CANCEL DATABREAK Cancels break point ENABLE DATABREAK Enables break points DISABLE DATABREAK Temporarily cancels break points When a break occurs due to a data access break the following message is displayed Break at Address by databreak at Access address The maximum count of break points that can be set is 65535 both in the simulator and emulator MB2141 and 2 in the emulator MB2146 09 106 2 4 4 Sequential Break EML A sequential break is a function to suspend a executing program when the sequential condition is met by event sequential control E Sequential Break Use a sequential break when the event mode is set to normal mode using the SET MODE command Set a sequential break as follows Set as the following procedure in emulator MB2141 1 Set event mode SET MODE 2 Set events SET EVENT 3 Set sequencer SET SEQUENCE Set as the following procedure in emulator MB2146 09 SET BREAK SEQUENCE When a break occurs due to a sequential break the following message is displayed Break at Address by sequential break level Level No 107 CHAPTER 2 2 4 5 Guarded Access Breaks SIM EML A guarded access break aborts a executing program when access is made in violation of the access attribute set by using the Setup
7. Customers are advised to consult with FUJITSU sales representatives before ordering The information such as descriptions of function and application circuit examples in this document are presented solely for the purpose of reference to show examples of operations and uses of Fujitsu semiconductor device Fujitsu does not warrant proper operation of the device with respect to use based on such information When you develop equipment incorporating the device based on such information you must assume any responsibility arising out of such use of the information Fujitsu assumes no liability for any damages whatsoever arising out of the use of the information Any information in this document including descriptions of function and schematic diagrams shall not be construed as license of the use or exercise of any intellectual property right such as patent right or copyright or any other right of Fujitsu or any third party or does Fujitsu warrant non infringement of any third party s intellectual property right or other right by using such information Fujitsu assumes no liability for any infringement of the intellectual property rights or other rights of third parties which would result from the use of information contained 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 b
8. 1 17 1 Referring to Local Symbols oo eeeccecececeeeeeneeeeeeeeeeeaeeeeeeeeeeeaeeeceeeeceaeseseeeeeceaeeeseaeesecaeesseaaeseaeeeeaas 29 1 17 2 Referring to C C Variables oe eecceeccccecceecceeeeeeeeaeeeeeeeeecaaeeeseaeeeseaeeeseaaeseaeeesaaeeeeeeeesscaeeniaeeseaes 30 CHAPTER 2 Dependence Function ccccccsceseeeeeeeeeeeeeeeeeeeeseeeeeeeeeseseeeeeeeeeeeeseeneeeees 33 2 1 Simulator Klee TEE 34 2 1 1 Eelere RTE ue EE 35 2 1 2 Memory Simulation eidele ed ene 36 2 1 3 V O PortSim latio EE 37 2 1 4 Interrupt Simulation ee sete eta een tie ea ae eel eee 38 2 1 5 Reset Simulation WEE 39 2 1 6 Power Save Consumption Mode Simulation c ccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseaaeseeeeeeseaeeseneeeees 40 2 2 Emulator Debugger MB274 1 se ccccctcetveecchecteevetetecrted eel reedecclartvgaledieyieetetivrevetes AAEN TAES ARAN ES 41 2 2 1 Setting Operating Environment 00 cceceeceeeceeceeeeeeeeceeeeeeeeeceaeeeeeeeeesaeeeseaeeeseaeeeeeaaeeeeeeestaeeseaeeees 42 2 2 2 On the fly Executable COMMANAS ccececceeeeeeeeeceeeeeeeeeeeaeeeeeaeeeseaeesseaeeeseaeeseeaaeeeeeeeestaeseeeeees 48 2 2 3 Oni the fly Memory ACCESS ii cctesc Sesecvaddaetesachec cares ancdecp eend i bevyadeadudiaek dase Ped cavarinatvaseskebec usb seeds 49 2 2 4 EVE S ee Deg Seba cutee vest ee RE eege Be eege ES 51 2 2 5 elteren EE 59 2 2 6 Real time Trace ee ee eege ees 68 2 2 7 Measuring Performance 0 eeeececeeeeeenneeeeeeeeaaeeeeeeeaaeeeeeeeaaa
9. 2 3 Emulator Debugger MB2146 09 2 4 Abortion of Program Execution SIM EML 33 CHAPTER 2 2 1 Simulator Debugger This section describes the functions of the simulator debugger for the F2MC 8L 8FX family E Simulator Debugger The simulator debugger later referred as simulator simulates the MCU operations executing instructions memory space I O ports interrupts reset etc with software to evaluate a program It is used to evaluate an uncompleted system the operation of single units etc E Simulation Range The simulator simulates the MCU operations instruction operations memory space interrupts reset power save consumption mode etc with software Peripheral I Os such as a timer DMAC and serial I O other than the CPU core of the actual chip 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 e Instruction simulation e Memory simulation e I O port simulation Input port e I O port simulation Output port e Interrupt simulation e Reset simulation e Power save mode simulation 34 2 1 1 Instruction Simulation This section describes the instruction simulation executed by SOFTUNE Workbench E Instruction Simulation This simulates the
10. Also the command displays by SHOW TRACE STATUS E Display Format of Trace Data There are two types of display format for the trace buffer e Display instruction execution only Display instruction Display the instruction execution in disassembly unit e Display in source line units Display source Display the source line only E Clearing Trace Data When the trace data is cleared execute Clear within the shortcut menu in the trace window Also the command executes the CLEAR TRACE command 99 CHAPTER 2 2 3 4 2 Precaution of Trace This section notes related to display the trace data E Precaution of Trace Function When the emulator debugger for the MB2146 09 is used the address information is outputted at the branch instruction fetch the trace is implemented At that time notes the following points related to display trace data The disassembly display is performed after reading from the memory In this case when the instruction is completed to write after the code fetch it does not display correctly 100 2 3 5 Notes on Executing Program This emulater notes the following points E Break at Standby Mode When the suspend operation is executed in the standby mode the debugger cancels the standby mode and suspends the execution Therefore it is suspended in next address of instruction to be transmitted to the standby mode 101 CHAPTER 2 2 4 Abortion of Program Execution SIM EML T
11. 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 2 2 5 Control by Sequencer This emulator has a sequencer to control events By using this sequencer sampling of breaks time measurement and tracing can be controlled while monitoring program flow sequence A break caused by this function is called a sequential break To use this function set the event mode to normal mode using the SET MODE command Use the SET EVENT command to set events E Control by Sequencer As shown in Table 2 2 8 controls can be made at 8 different levels At each level 8 events and 1 timer condition 9 conditions in total can be set A timer condition is met when the timer count starts at entering a given level and the specified time is reached For each condition the next operation can be specified when 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 suspend resume can be controlled when a condition is met Table 2 2 8 Sequencer Specifications Function Specifications Level count 8 levels Conditions settab
12. Displays status of minimum measurement unit setting for timers Example gt SET TIMERSCALE 100N gt SHOW TIMERSCALE Timer scale 100ns gt 47 CHAPTER 2 2 2 2 On the fly Executable Commands Certain commands can be executed even while executing a program This is called on the fly execution E On the fly Executable Commands Certain commands can be executed on the fly If an attempt is made to execute a command that cannot be executed on the fly an error MCU is busy ossurs Table 2 2 3 lists major on the fly executable functions For further details refer to the SOFTUNE WORKBENCH Command Reference Manual Meanwhile on the fly execution is enabled only when executing the MCU from the menu or the tool button On the fly commands cannot be executed when executing the GO command etc from the command window Table 2 2 3 Major Functions Executable in On the fly Mode Function MCU reset Restrictions Major Commands RESET Displaying MCU execution status SHOW STATUS Displaying trace data Enabled only when trace function disabled SHOW TRACE SHOW MULTITRACE Enable Disable trace ENABLE TRACE DISABLE TRACE Displaying execution time measurement value Timer SHOW TIMER Memory operation Read Write Emulation memory only operable Read only enabled in mirror area ENTER EXAMINE COMPARE FILL MOVE DUMP SEARCH MEMORY SHOW MEMORY SET MEMORY
13. trace function that samples data before and after event trigger occurrence Performance Mode Event triggers are used for performance measurement to measure time duration between two event trigger occurrences and count of event trigger occurrences 52 2 2 4 1 Operation in Normal Mode As shown in the figure below the event trigger set in the normal mode performs input to the sequencer In the sequencer either branching to any level or terminating the sequencer can be specified as an operation at event trigger occurrence This enables debugging breaks limiting trace measuring time while monitoring program flow E Operation in Normal Mode The termination of sequencer triggers the delay counter When the delay counter reaches the specified count sampling for the single trace terminates A break normally occurs at this point but if necessary the program can be allowed to run on without a break Figure 2 2 4 Operation in Normal Mode DISABLE TRACE _ SHOW TRACE STATUS SET TRACE ENABLE TRACE d a A Enable Disable Buffer full break SHOW TRACE DATA x control control SET SEQUENCE NO TRACE gt ee SET SEQUENCE ENABLE TRACE CLEAR TRACE E Single trace measurement SET SEQUENCE DISABLE TRACE 05 N a D 5 SEARCH TRACE Enable Disable Measurement ends control eer event SHOW SEQUENCE level wy CANCELEVENT CANCEL s SONIN SEQUENCE TIMER ae SET When each condition at
14. 1 00007 cn E198 PUSHW A 11111111 1 00011 E199 PUSHW A 11111111 1 00015 E19A PUSHW A 11111111 1 demo3 c 91 int cc 1 00019 E19B MOVW A 0001 11111111 1 00022 cn E19E MOVW IX 02 A 11111111 1 demo3 c 93 numdt 10 00027 E1A0 MOVW A 000A 11111111 1 gt E Display in Source Line Units Specify SOURCE Only the source line can be displayed Example gt SHOW TRACE SOURCE 5 frame no source 00001 demo3 c 89 00019 cn demo3 c 91 intcc 1 00027 demo3 c 93 numdt 10 00035 demo3 c 94 ackdat 0 00041 demo3 c 96 sort amp datpl data sorting 00054 S demo3 c 147 struct st dat 00071 demo3 c 152 ackdat 5 00082 demo3 c 153 nckdat ackdat 00086 demo3 c 154 for j 0 j lt numdt 1 j 79 CHAPTER 2 2 2 6 8 Reading Trace Data On the fly Trace data can be read while executing a program However this is not possible during sampling Disable the trace function or terminate tracing before attempting to read trace data E Reading Trace Data On the fly in Single Trace To disable the trace function use the DISABLE TRACE command Check whether or not the trace function is currently enabled by executing the SHOW TRACE command with STATUS specified or by using built in variable 7TRCSTAT Tracing terminates when the delay count ends after the sequencer has
15. Fujitsu language tools are defined as part of the system these can not be modified A new error message format should be added when working the Error Jump function with user registered tool To set Error Jump execute the Setup Error Jump Setting command 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 character immediately after the above characters as a delimiter Therefore in Syntax the description until a character that is used as a delimiter re appears is interpreted as a file name or a keyword for help or is skipped over To use as a delimiter describe as The Y char macro skips over as long as the specified character continues in parentheses To specify as a skipped character describe it as Blank characters in succession can be specified with a single blank character Table 1 7 1 List of Special Characters String for Analyzing Error Message Parameter Semantics Interpret as source file name and inform editor Interpret as line number and inform editor Become keyword when searching help file Skip any desired character Skip as long as characters in continues CHAPTER 1 Basic Functions Example rr MFG Yoh or t l Wh The first four characters are followed by the file name and par
16. However when only the symbol name is specified the search is made as follows 1 Local symbols within function in Current Scope 2 The class member which can access with the this pointer when C 3 Static symbols within module in Current Scope 4 Global symbols If a global symbol has the same name as a local symbol in the Current Scope specify or at the start of global symbol By doing so you can explicitly show that is a global symbol An automatic variable can be referred to only when the variable is in memory Otherwise specifying an automatic variable causes an error 29 CHAPTER 1 Basic Functions 1 17 2 Referring to C C Variables C C variables can be specified using the same descriptions as in the source program written in C C E Specifying C C Variables C C variables can be specified using the same descriptions as in the source program The address of C C variables should be preceded by the ampersand symbol amp Some examples are shown in the Table 1 17 1 Table 1 17 1 Examples of Specifying Variables Example of Variables Example of Specifying Semantics Variables Regular Variable int data data Value of data Pointer char p D Value pointed to by p Array char a 5 a l Value of second element of a Structure struct stag st c Value of member c of st char c stp gt c Value of member c of the structure int i to which stp points struct stag st struct stag stp
17. Memory Map command and access is attempted to a guarded area access disabled area in undefined area E Guarded Access Breaks Guarded access breaks are as follows Code Guarded An instruction has been executed for an area having no code attribute Read Guarded A read has been attempted from the area having no read attribute Write Guarded A write has been attempted to an area having no write attribute 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 address Not supported in the emulator MB2146 09 108 2 4 6 Trace Buffer Full Break SIM EML A trace buffer full break occurs when the trace buffer becomes full E Trace Buffer Full Break To set a trace buffer full break use the Setup Trace command in the short cut menu of the Analyze Trace command or use the SET TRACE BREAK command When a break occurs due to a trace buffer full break the following message is displayed Break at Address by trace buffer full Note Not supported in the emulator MB2146 09 109 CHAPTER 2 2 4 7 Performance Buffer Full Break EML A performance buffer full break is a function to abort a executing program when the buffer for storing performance measurement data becomes full E Performance Buffer Full Break To set a performan
18. above functions refer to 3 13 Watch Window in SOFTUNE WORKBENCH Operation Manual 24 1 15 Register Operations This section describes the register operations E Register Operations The Register window is opened when the View Register command is executed The register and flag values can be displayed 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 in SOFTUNE WORKBENCH Operational Manual E Reference Section Register Window 25 CHAPTER 1 Basic Functions 1 16 Line Assembly and Disassembly This section describes line assembly and disassembly E Line Assembly To perform line by line assembly line assembly right click anywhere in the Disassembly window to display the short cut menu and select Inline Assembly For further details about assembly operation refer to 4 4 3 Assembly in SOFTUNE WORKBENCH Operation Manual E Disassembly To display disassembly use the View Assembly command 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
19. before and after executing compiler and assembler 2 Target file before and after executing linker librarian and converter 3 Configuration file before and after executing configuration Tool options Null character Others 1 File as focus is on project window and valid file name is selected 2 File on which focus is in internal editor as no valid file name can be obtained in 1 3 Null character if no valid file name can be obtained 2 The macros are determined as follows Customize build and tool options Information on configuration of project under building making compiling and assembling Others 1 Information on active configuration of project in which file is stored as focus is on project window and valid file name is selected 2 Information on active configuration of active project if no valid file name can be obtained in 1 3 Only project files in the workspace project format can be used for macros indicated 4 Data in the temporary file can be specified only for customize build Table 1 11 3 List of Sub parameters 1 Sub parameter Meaning PATH Directory of file RELPATH Relative path of file NAME Main file name of file EXT Extension of file SHORTFULLNAME Full path name of short file SHORTPATH Directory of short file SHORTNAME Main file name of short file FOLDER Name of folder in which files are stored in project window Can be specified only in FILE The
20. can be viewed in the Output window Save dialog before closing workspace Before closing the workspace a dialog asking for confirmation of whether or not to save the workspace to the file is displayed If this setting is not made SOFTUNE Workbench automatically saves the workspace without any confirmation message Save dialog at compiling assembling Before compiling assembling a dialog asking for confirmation of whether or not to save a source file that has not been saved is displayed If this setting is not made the file is saved automatically at compile assemble make build Termination message is highlighted at Make Build At Compile Assemble Make or Build the display color of termination messages Abort No Error Warning Error Fatal error or Failing During start can be changed freely by the user E Reference Section Development Environment Note Because the environment variables set here are language tools for the SOFTUNE Workbench the environment variables set on previous versions of SOFTUNE cannot be used In particular add the set values of User Include Directory and Library Search Directory to Project Settings 22 1 13 Debugger Types This section describes the functions of SOFTUNE Workbench debuggers E Debug Function SOFTUNE Workbench integrates two types of debugger a simulator debugger and emulator debugger Any one can be selected depending on the requirement E Simulator Debugge
21. displayed by using the SHOW TRACE command or SHOW MULTITRACE command just as with other trace data Sampling using the SHOW SAMPLING command samples data and displays its state In addition by specifying external probe data as events such events can be used for aborting a program and as multitrace and performance trigger points Events can be set by using the SET EVENT command E 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 clock clock input from target At falling edge of external clock clock input from target Use the SET SAMPLING command to set up to display the setup status use the SHOW SAMPLING command When sampling data using the SHOW SAMPLING command sampling is performed when the command is executed and has nothing to do with the above settings Example gt gt SET SAMPLING INTERNAL gt gt SHOW SAMPLING sampling timing internal channel 76543210 11110111 91 CHAPTER 2 E Displaying and Setting External Probe Data When a command that can use external probe data is executed external probe data is displayed in 8 digit binary or 2 digit hexadecimal format The displayed bit order is in the order of the IC clip cable color code order Table 2 2 11 The MSB is at bit 7 Violet and the LSB is at bit O Black The bit represented by 1 means HIGH while t
22. frame for sequencer executed at trace F b b b IAS MESSE Hexadecimal instructions sampling When the sequencer local number HOLD is not used 1 is displayed Signed decimal Data External probe data For single trace is i displayed Hexadecimal Binary Frame number p ext probe global number 11111111 Signed decimal 11111111 11111111 11111111 demo3 c 89 00001 in 11111111 IX 11111111 wr ite 11111111 wr ite 11111111 11111111 x HOLD 11111111 Access status Device status internal write Write access to internal memory internal read Read access to internal memory Displays status of the MCU Write Write access to memory other than internal area HOLD xx Access status other than the above When a read access is made to memory other than internal area nothing will be displayed because data access and code fetch are not distinguished from eath other For multi trace Block number XXXXXX is displayed at the beginning of a block 78 E Display in Only Instruction Execution Specify INSTRUCTION Only instruction execution is displayed in the same format as when CYCLE is specified Data access status and device status are not displayed Example gt SHOW TRACE INSTRUCTION 5 frame no address mnemonic ext probe lvl demo3 c 89 00001 E195 main 11111111 1 PUSHW IX 00003 E196 MOVW A SP 11111111 1 00005 E197 MOVW IX A 11111111
23. latch 2 The time value deducting the value of the timer latch 1 from the value of the timer latch 2 represents the execution time Time is displayed in the following format Dm Qs OOOms 000QQus minutes seconds milliseconds microseconds 67 CHAPTER 2 2 2 6 Real time Trace While execution a program the address data and status information and the data sampled by an external probe can be sampled in machine cycle units and stored in the trace buffer This function is called real time trace In depth analysis of a program execution history can be performed using the data recorded by real time trace There are two types of trace sampling single trace which traces from the start of executing the program until the program is suspended and multitrace which starts tracing when an event occurs E Trace Buffer The data recorded by sampling in machine cycle units is called a frame The trace buffer can store 32K frames 32768 Since the trace buffer has a ring structure when it becomes full it automatically returns to the start to overwrite existing data E Trace Data Data sampled by the trace function is called trace data The following data is sampled Address Data Status Information Access status Read Write Internal access etc Device status Instruction execution Reset Hold etc External probe data Sequencer execution level 68 2 2 6 1 Single Trace The single trace function t
24. macro in can be used only the project of workspace project format E Examples of Macro Expansion If the following workspace is opened macro expansion is performed as follows Workspace E C Wsp Wsp wsp Active project C Wsp Sample Sample prj Active project configuration Debug CHAPTER 1 Basic Functions 20 Object directory C Wsp Sample Debug Obj Subproject C Subprj Subprj prj Active project configuration Release Object directory C Subprj Release Obj Target file C Subprj Release Abs Subprj abs Example Macro expansion in external tools Focus is on Subprj project file in project window Joa d C Subprj Release Abs Subprj abs TA SUBPRJ abs D d C Subprj Release Abs E abs FILE FOLDER Source Files Common PRJFILE d C Subprj Subprj prj Focus is not in project window Joa C Wsp Sample Debug Abs Sample abs TA Sample abs D C Wsp Sample Debug Abs PRJFILE C Wsp Sample Sample prj 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 PRIPATH d C Subprj OBJPATH C Subprj Release Obj PRJCONFIG Release ENV FETOOL C SOFTUNE TEMPFILE C
25. minimum measurement unit for measuring time 42 2 2 1 1 MCU Operation Mode There are three MCU operation modes as follows e Single chip mode MCU Mode 0 e External ROM mode MCU Mode 1 e Internal ROM mode with external access function MCU Mode 2 E Setting MCU Operation Mode The MCU operation mode varies depending on the product type refer to the Hardware Manual for each MCU for further details Figure 2 2 1 MCU Modes and Memory Mapping 0000H Internal I O Area Internal I O Area Internal I O Area Internal RAM Internal RAM Internal RAM Internal ROM Mode 1 Mode 2 Internal Internal ROM Area The emulation memory is substituted ROM for this area Always map to the emulation memory External Access Area Can be mapped freely to the emulation memory and user memory Internal Access Area Access is performed to MCU internal memory regardless of the mapping setup Non Access Area Can be mapped to the emulation memory As shown in Figure 2 2 1 memory mapping operation varies depending on MCU mode Internal RAM area internal RAM internal register and internal I O cannot map to the emulation memory because it accesses internal MCU regardless of mapping setup 43 CHAPTER 2 2 2 1 2 Memory Area Types A unit to allocate memory is called an area There are three different area types E Memory Area Types A unit to allocate memory is called an area Up to 20 areas can be se
26. operations of all instructions supported by the F MC 8L 8FX It also simulates the changes in memory and register values due to such instructions 35 CHAPTER 2 2 1 2 Memory Simulation This section describes the memory simulation executed by SOFTUNE Workbench E Memory Simulation The simulator must first secure memory space to simulate instructions because it simulates the memory space secured in the host machine memory One of the following operations is required e To secure the memory area either use the Setup Memory Map command or the Set Map command in the Command window e Load the file output by the Linkage Editor Load Module File using either the Debug Load target file command or the LOAD OBJECT command in the Command window E Simulation Memory Space Memory space access attributes can be specified byte by byte using the Setup Memory Map command The access attribute of unspecified memory space is Undefined E Memory Area Access Attributes 36 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 attribute while executing a program When access is made by a program command such access is allowed regardless of the attribute CODE READ or WRITE However access to memory in an undefined area causes an error Table 2 1 1 Types of Access Attributes Attribute Semantics CODE In
27. specified for memory areas A guarded access break occurs if access is attempted in violation of these attributes while executing a program When access to the user memory area and the emulation memory area is made using program commands such access is allowed regardless of the READ WRITE attributes However access to memory with the GUARD attribute in the undefined area causes an error Table 2 2 1 Types of Access Attributes Attribute Description User Memory Read Data Read and Instruction Execution Enabled Emulation Memory Write Data Write Enabled Undefined GUARD GUARD Access Disabled NOGUARD No check of access attribute 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 area However if the access target is the emulation memory area 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 specifying the WRITE attribute for the area This write protection is only enabled for access made by executing a program and is not applicable to access by commands E Creating and Displaying Memory Map Use the following commands for memory mapping es SET MAP Sets memory map e SHOW MAP Displays memory map e CANCEL MAP Changes memory map setting to undefined 45 CHAPTER 2
28. terminated If Not Break is specified here tracing terminates without a break operation It is possible to check whether or not tracing has terminated by executing the SHOW TRACE command with STATUS specified or by using built in variable 7TRCSAMP 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 gt GO gt gt SHOW TRACE STATUS en dis enable buffer full nobreak sampling on lt Trace sampling continues gt gt SHOW TRACE STATUS en dis enable buffer full nobreak sampling end lt Trace sampling ends frame no 00805 to 00000 step no 00262 to 00000 gt gt SHOW TRACE 10 frame no address data mnemonic ext probe lvl 00010 ___ _ F000 04 MOV A 55 11111111 1 00009 ____ F001 55 11111111 1 00008 ___ _ F002 45 MOV 60 A 11111111 1 00007 _ F003 60 11111111 1 If the CLEAR TRACE command is executed with the trace ending state trace data sampling can be re executed by re executing the sequencer from the beginning 80 E Reading Trace Data On the fly in the Multitrace Use the DISABLE MULTITRACE command to disable the trace function before reading trace data Check whether or not the trace function is currently enabled by executing the SHOW MULTITRACE command with STATUS specified or by using built in variable 7TRCSTAT To read trace data use the
29. than them CHAPTER 1 Basic Functions Table 1 11 1 List of Macros That Can Be Specified 1 Tot Passed as full path name of file a PF Passed as main file name of file d Passed as directory of file Pe Passed as extension of file Joa Passed as full path name of load module file A Passed as main file name of load module file 2 D Passed as directory of load module file K PE Passed as extension of load module file 2 Tox Passed as directory of project file PX Passed as main file name of project file lt o Passed as Table 1 11 2 List of Macros That Can Be Specified 2 Parameter Meaning OI EI Passed as full path name of file Re LOADMODULEFILE Passed as full path name of load module file ra PRIFILE Passed as full path name of project file ie o WSPFILE Passed as full path name of workspace file 73 PRJPATH Passed as directory of project file ABSPATH Passed as directory of target file Si OBJPATH Passed as directory of object file 12 LSTPATH Passed as directory of list file Ka PRICONFIG Passed as project configuration name E ENV Environment variable Environment variable value specified in environment variable brackets is passed TEMPFILE Temporary file is created and its full path name is passed i 1 The macros are determined as follows Customize build 1 Source file
30. to build file or not Information on setting of debugger to debug target file E 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 project window and includes files detected in the Dependencies folder Note If a macro function newly added is used in old project format the macro description is expanded at the time of saving in old project format For the macro description newly added refer to Section 1 11 Macro Descriptions Usable in Manager 1 3 Project Dependence This section explains the project dependence of SOFTUNE Workbench E Project Dependence If target files output by other projects must be linked a subproject is defined in the project required in Project Dependence in the Project 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 Configuration Build Configuration in the Project menu can be specified CHAPTER 1 Basic Functions 1 4 Make Build Function
31. used a dialog asking whether to convert the file to the workspace project format is displayed For details refer to Section 2 13 of SOFTUNE WORKBENCH Operation Manual To open a project file in the workspace project format with an early Workbench version it is necessary to convert the file to the old project format For saving the file in other project formats refer to Section 4 2 7 Save As of SOFTUNE WORKBENCH Operation Manual F2MC 8L V30L26 or earlier CHAPTER 1 Basic Functions E Project Configuration The project configuration is a series of settings for specifying the characteristics of a target file and making building compiling and assembling is performed in project configurations Two or more project configurations can be created in a project The default project configuration name is Debug A new project configuration is created on the setting of the selected existing project configuration In the new project configuration the same files as those in the original project configuration are always used By using the project configuration the settings of programs of different versions such as the optimization level of a compiler and MCU setting can be created within one project In the project configuration the following information is managed Name and directory of target file Information on options of language tools to create target file by compiling assembling and linking source files Information on whether
32. 23456789ABCDEF0123456789ABCDEF0123456 FFOO 3 F ABCDEF C0 32 0 E TOTAL 32 0 Indicates access status of 16 addresses in one block No access Job Displays hexadecimal count of access to 16 addresses All 16 addresses accessed Details Specify DETAIL for command qualifier Indicates coverage ratio for one line gt SHOW COVERAGE DETAIL OFF00 address 0 1 2 3 4 5 6 7 8 9 A B C D E F CO0 FF00 ee 100 0 FF10 Jos eee ee 100 0 FF20 nn E er eS TE n C 18 6 FF30 ge Se oe ee ey tO ee gt Te ne Se e 1100 0 FF40 si A eh Be Jey ee oe ef te Beco A a ei 93 7 FF50 oe e a ne EM he cee a ed eke meet ah dw ve 100 0 FF60 0 0 FF70 0 0 FF80 ihe St Gn A 0 0 E Soe ae TOTAL 56 9 Indicates access status of each address Not accessed Indicates coverage ratio Accessed whole displayed lines CHAPTER 2 2 2 9 Measuring Execution Time Using Emulation Timer The timer for measuring time is called the emulation timer This timer can measure the time from the start of MCU operation until suspension E Measuring Executing Time Using Emulation Timer 90 Choose either 1 us or 100 ns as the minimum measurement unit for the emulation timer and set the measurement unit using the SET TIMERSCALE command When 1 us is selected as the minimum unit the maximum is about 70 minutes when 100 ns is selected as the minimum unit the maximum is about 7 minutes Th
33. 67 times If the performance buffer full break is not specified the performance measurement ends but the program does not break Example gt SET PERFORMANCE NOBREAK lt Specifying Not Break gt 83 CHAPTER 2 E Setting Events Set events using the SET EVENT command The starting ending point of time measurement and points to measure pass count are specified by events Events at 8 points 1 to 8 can be set However in the performance measurement the intervals starting event number and ending event number are fixed in the following combination Measuring Time Four intervals have the following fixed event number combination Interval Starting Event Number Ending Event Number Measuring Count The specified events become performance measurement points automatically E 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 E Displaying Performance Measurement Data Display performance measurement data by using the SHOW PERFORMANCE command E Clearing Performance Measurement Data Clear performance measurement data by using the CLEAR PERFORMANCE command Example gt CLEAR PERFORMANCE gt 84 2 2 7 2 Display Performance Measurement Data Display the measured time and measuring count by using the SHOW PERFORMANCE command E Displaying Mea
34. Break EMI a e leis deed een thee Sian patie eaaa Se dated 107 Guarded Access Breaks SIM EML sseesseesesseessrisrirterittsintetrtstintttrtsrnttrntntintatnnsrinnennnetn 108 Trace Buffer Full Break SIM EML ccccceeceseeeeeneeeceaeeeeeeeeeeeaeeeeeaaeesaeeseaeeeseaaeeseaeeeseaeeeea 109 Performance Buffer Full Break EML cccceeeeeeseeeeeseneeeeeeeeeeeeeeeesaeeeeeeeecaeeeeesenaeeeeesenaaeeeeeeeaas 110 Forced Break SIM EML A 111 CHAPTER 1 Basic Functions This chapter describes the basic functions on the SOFTUNE Workbench k o om 4 o Dm BR WO M ect ech seh set a eck geb ch sc N OOA UUN O Workspace Management Function Project Management Function Project Dependence Make Build Function Include Dependencies Analysis Function Functions of Setting Tool Options Error Jump Function Editor Functions Storing External Editors Storing External Tools Macro Descriptions Usable in Manager Setting Operating Environment Debugger Types Memory Operation Functions Register Operations Line Assembly and Disassembly Symbolic Debugging CHAPTER 1 Basic Functions 1 1 Workspace Management Function This section explains the workspace management function of SOFTUNE Workbench E Workspace SOFTUNE Workbench uses workspace as a container to manage two or more projects including subprojects For example a project that creates a library and a project that creates a target file using the proje
35. Break MB2146 09 A monitoring data break is a function when program execution at a specified address is completed to abort a running program when data access Read or Write is made to the specified data area address while the program is executing E Monitoring Data Breaks A data monitor break is a function when program execution at a specified address However before execution of target instruction to abort an executing program when the MCU access data at the specified address Monitoring data breaks can be controlled using the following commands SET BREAK DATAWATCH Sets break point SHOW BREAK DATAWATCH Display current break point setup status CANCEL BREAK DATAWATCH Cancel break point ENABLE BREAK DATAWATCH Enables break point DISABLE BREAK DATAWATCH Temporarily cancels break point When a break occurs due to a monitoring data break the following message is displayed Break at address by datawatch The maximum count of break points are as follows MB2146 09 Max 1 point Note This is specific function in the MB2146 09 ICE emulator 105 CHAPTER 2 2 4 3 Data Access Breaks SIM EML A data access break is a function to abort a executing program when data access Read or Write is made to the specified address while the program is executing E Data Access Breaks A data access break is a function to suspend a running program when the MCU accesses data at the specified address
36. Break when sequencer terminates gt SET DELAY BREAK 0 Break when 100 bus cycle tracing done after sequencer terminates gt SET DELAY BREAK 100 Terminate tracing but do not break when sequencer terminates gt SET DELAY NOBREAK 0 Terminate tracing but do not break when 100 bus cycle tracing done after sequencer terminates gt SET DELAY NOBREAK 100 2 2 5 3 Trace Sampling Control by Sequencer When the event mode is in the normal mode real time trace executing tracing called single trace If the trace function is enabled single trace samples all the data from the start of executing a program until the program is suspended E Trace Sampling Control by Sequencer Sets up suspend resume trace sampling for each condition at each level of the sequencer Figure 2 2 9 shows the trace sampling flow For example it is possible to suspend trace sampling when event occurs and then resume trace sampling when event 2 occurs Sampling trace data can be restricted Figure 2 2 9 Trace Sampling Control 1 Resume Start Suspend Resume Suspend Suspend Lt As shown in Figure 2 2 10 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 command or the SET GO command Example gt GO DISABLETRACE gt SET GO DISABLETRACE gt GO Figure 2 2 10 Trace Sampling Control 2 Resume Resume Start Suspend Resume Sus
37. Build file FILE Load module file LOADMODULEFILE Project file PRJFILE Workspace file WSPFILE Project directory PRIPATH Target file directory ABSPATH Object file directory OBJPATH List file directory LSTPATH Project construction name PRJCONFIG Environment variable ENV Temporary file TEMPFILE CHAPTER 1 Basic Functions Note When checking Use the Output window note the following e Once a tool is activated Make Build is suspended until the tool is terminated e 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 1 5 Include Dependencies Analysis Function This section describes the function of the Include Dependencies Analysis of SOFTUNE Workbench E Analyzing Include Dependencies A source file usually includes some include files When only an include file has been modified leaving a source file unchanged SOFTUNE Workbench cannot execute the Make function unless it has accurate and updated information about which source file includes which include files For this reason SOFTUNE Workbench has built in Include Dependencies Analysis function This function can be activated by selecting the Project Include Dependenc
38. E command in the single trace mode and to the SHOW MULTITRACE command in the multitrace mode E Displaying Trace Data Storage Status It is possible to display how much trace data is stored in the trace buffer This status data can be read by specifying STATUS to the SHOW TRACE command in the single trace mode and to the SHOW MULTITRACE command in the multitrace mode Frame numbers displayed in the multitrace mode is the grobal number Example In Single Trace gt SHOW TRACE STATUS en dis enable Trace function enabled buffer full nobreak Buffer full break function disabled sampling end Trace sampling terminates flame no 00120 to 00050 Frame 120 to 50 store data step no 00091 to 00022 Step 91 to 22 store data gt In Multitrace gt SHOW MULTITRACE STATUS en dis enable Multitrace function enabled buffer full nobreak Buffer full break function disabled sampling end Trace sampling terminates block no 1 to 5 Block 1 to 5 store data frame no 00001 to 00159 Frame to 159 store data Global number 76 2 2 6 6 Specify Displaying Trace Data Position It is possible to specify from which data in the trace buffer to display To do so specify a frame number with the SHOW TRACE command in the single trace mode or specify either a global number or a block number and local number with the SHOW MULTITRACE command in the multitrace mode A range can also be specified E Specify Displaying Trace Data Po
39. FUJITSU SEMICONDUCTOR CM25 00324 1E CONTROLLER MANUAL F MC 8L 8FX FAMILY SOFTUNE WORKBENCH USER S MANUAL co FUJITSU F MC 8L 8FX FAMILY SOFTUNE WORKBENCH USER S MANUAL FUJITSU LIMITED PREFACE E What is the SOFTUNE Workbench SOFTUNE Workbench is support software for developing programs for the FR V FR F MC 8L 8FX and F MC 8L families of microprocessors microcontrollers It is a combination of a development manager simulator debugger emulator debugger monitor debugger and an integrated development environment for efficient development E Purpose of this manual and target readers This manual explains functions of SOFTUNE Workbench This manual is intended for engineers designing several kinds of products using SOFTUNE Workbench E Trademarks SOFTUNE is a trademark of FUJITSU LIMITED FR is the abbreviation of FUJITSU RISC Controller and a product of FUJITSU LIMITED FMC is the abbreviation of FUJITSU Flexible Microcontroller and a trademark of FUJITSU LIMITED Windows is registered trademarks of Microsoft Corporation in the U S and other countries E Organization of Manual This manual consists of 2 chapters CHAPTER 1 Basic Functions This chapter describes the basic functions on the SOFTUNE Workbench CHAPTER 2 Dependence Function This chapter describes the functions dependent on F MC 8L 8EX family MCU The contents of this document are subject to change without notice
40. In instruction execution an event trigger is generated only when an instruction is executed This status cannot be specified concurrently with other status e The data modify is a function to generate the event trigger when the data of specified address is rewritten When the data modify is specified in the status the specified data is ignored This status cannot be specified concurrently with other status Use the following commands to set an event SET EVENT Sets event SHOW EVENT Display event setup status CANCEL EVENT Deletes event ENABLE EVENT Enable event DISABLE EVENT Disable event 51 CHAPTER 2 Example gt SET EVENT 1 funcl gt SET EVENT WRITE 2 data 2 d h 10 gt SET EVENT MODIFY 3 102 Reference An event can be set in the Event window as well E Event Modes There are three event modes as listed below To determine which function event triggers are used for select one using the SET MODE command The default is normal mode The event value setting are made for each mode so switching the event mode changes the event settings as well Normal Mode Event triggers are 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 Multitrace Mode Event triggers are used for multitracing
41. Line assembly Disassembly Emulation memory only enabled Mirror area Disassembly only enabled ASSEMBLE DISASSEMBLE Load Save program 48 Emulation memory only enabled Mirror area save only enabled LOAD SAVE 2 2 3 On the fly Memory Access While on the fly the area mapped to the emulation memory is Read Write enabled but the area mapped to the user memory is Read only enabled E Read Write Memory while On the fly The user memory cannot be accessed while on the fly executing MCU However the emulation memory can be accessed The cycle steal algorithm eliminates any negative effect on the MCU speed This emulator allows the user to use part of the emulation memory as a mirror area The mirror area holds a copy of the user memory Using this mirror area makes the user memory to Read only enabled function available while on the fly However at least one time access must be allowed before the emulation memory with the mirror area setting has the same data as the user memory The following copy types allow the emulation memory with the mirror area setting to have the same data as the user memory Copying only required portion using memory access commands Data in the specified portion can be copied by executing a command that accesses memory The following commands access memory Memory operation commands SET MEMORY SHOW MEMORY EXAMINE ENTER COMPARE FILL MOVE SEARCH MEMORY DUMP COPY VERIF
42. SB interface When the debugger starts immediately after the power of the user system is turned on the monitor program is automatically loaded The following dialog is displayed at loading the monitor program Once it is loaded it cannot be reloaded unless the power is turned off Thus the monitor program is placed in Lib 896 under the directory installed the Workbench Load of monitor program EN Now loading monitor program E SoftuneLib 896 EMLS50B bin 86 PE ER CHAPTER 2 2 3 1 Setting Operating Environment To operate the emulator set the operating environment by specifying the clock up mode and main clock oscillation Note that predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings E Setting Operating Environment For the emulator of the MB2146 09 ICEs it is necessary to set the clock up mode and frequency of main oscillation clock Fcp Note that predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Furthermore the specified setting value can be used for the subsequent default Clock up mode The MB2146 09 and communication speed of user system change by the operating frequency of the target MCU When the operating frequency is reduced especially in the sub clock mode the communication speed is also reduced In this case optimi
43. SHOW MULTITRACE command to search trace data use the SEARCH MULTITRACE command Example gt GO gt gt SHOW MULTITRACE STATUS en dis enable buffer full nobreak sampling on gt gt DISABLE MULTITRACE gt gt SHOW MULTITRACE STATUS en dis disable buffer full nobreak sampling end block no 1 to 20 frame no 00001 to 00639 gt gt SHOW MULTITRACE 1 frame no address data mnemonic ext probe lvl block no 1 00001 00007 F000 04 MOV A 55 11111111 1 00002 00006 F001 55 11111111 1 00003 00005 F002 45 MOV 60 A 11111111 1 00004 00004 F003 60 11111111 1 CHAPTER 2 2 2 7 Measuring Performance It is possible to measure the time and pass count between two events Repetitive measurement can be performed while executing a program in real time and when done the data can be totaled and displayed Using this function enables the performance of a program to be measured To measure performance set the event mode to the performance mode using the SET MODE command E Performance Measurement Function The performance measurement 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 num
44. Subprj Release Opt _fs 1056 TMP Example Macro expansion in tool options Release configuration of Subprj project is built FILE PRJFILE RELPATH PRJPATH OBJPATH PRICONFIG ENV FETOOL Subprj C Subprj C Subprj Release Obj Release C SSOFTUNE 21 CHAPTER 1 Basic Functions 1 12 Setting Operating Environment This section describes the functions for setting the SOFTUNE Workbench operating environment E Operating Environment Set the environment variables for SOFTUNE Workbench and some basic setting for the workspace To set the operating environment use the Setup Development Environment Setting command Environment Variables Environment variables are variables that are referred to mainly using the language tools activated from SOFTUNE Workbench The semantics of an environment variable are displayed in the lower part of the Setup dialog However the semantics are not displayed for environment variables used by tools added later to SOFTUNE Workbench When SOFTUNE Workbench and the language tools are installed in a same directory it is not especially necessary to change the environment variable setups Basic setups for workspace The following setups are possible Open the previously workspace at start up When starting SOFTUNE Workbench it automatically opens the last opened workspace Display options while compiling assembling Compile options or assemble options
45. The maximum count of break points that can be set is 65535 both in the simulator and emulator MB2141 and 256 in the emulator MB2146 09 E Notes on Instruction Execution Breaks MB2141 A break occurs before executing the instruction if the break point is set immediately after the instructions listed in Figure 2 4 1 The debugger is designed to perform step execution internally and then to break after such execution Therefore the last instruction is not executed in real time Figure 2 4 1 Instructions affecting instruction execution breaks A EP ADDC ADDC A ADDCW A A EP AND AND A ANDW A n CMP CMP A Ri CMP DAA DAS DEC DECW DECW IX DECW INC i INCW A INCW INCW MOV MOV MOV MOV MOV MOVW MOVW MOVW MOVW MOVW MOVW MOVW MOVW MOVW OR OR OR POPW POPW PUSHW ROLC RORC SUBC A EP SUBC SUBCW SWAP XCHW XCHW XCHW A SP XOR XOR XOR A If an instruction execution break is set following the 1 byte branch instruction shown below it occurs immediately after the instruction is executed because the 1 byte branch instruction is affected by prefetch 103 CHAPTER 2 of the next instruction when executed Instructions when the instruction execution break is set are just prefetched but not executed RET REI JMP A CALLV vct To avoid this set the instruction execution break shifted one byte or set a breakpoint using the SET EVENT CODE command which is unaffected by prefetch 104 2 4 2 Monitoring Data
46. Y Data load save commands LOAD SAVE Figure 2 2 2 Access to Mirror Area while MCU Suspended Memory access Executing command Emulation memory Mirror setting Reflected MCU operation Suspended User memory 49 CHAPTER 2 Figure 2 2 3 On the fly Access to Mirror Area Memory read Executing command EE Mirror setting Emulation memory Reflected Memory access MCU operation lt gt User memory Operating Note Memory access by a bus master other than the MCU is not reflected in the mirror area 50 2 2 4 Events The emulator can monitor the MCU bus operation and generate a trigger at a specified condition called an event In this emulator event triggers are used in order to determine which function event triggers are used accounting to event modes for the following functions e Sequencer e Sampling condition for multi trace e Measuring point in performance measurement E Setting Events Up to eight events can be set Table 2 2 4 shows the conditions that can be set for events Table 2 2 4 Conditions for Setting Events Condition Description Address Memory location Address bit masking enabled Data 8 bit data data bit masking enable NOT specified enable Status Select from among data read data write instruction execution and data modify External probe 8 bit data bit masking enable Notes e
47. able in Manager This section explains the macro descriptions that can be used in the manager of SOFTUNE Workbench E Macros SOFTUNE Workbench has special parameters indicating that any file name and tool specific options are specified as options The use of these parameters as tool options eliminates the need for options specified each time each tool is started The type of macro that can be specified and macro expansion slightly vary depending on where to describe macros The macros usable for each function are detailed below For the macros that can be specified for Error Jump and External Editors see Sections 1 7 Error Jump Function and 1 9 Storing External Editors E 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 the option directories in Table 1 11 1 but not to the macro directories in Table 1 11 2 The sub parameters in Table 1 11 3 can be specified in FILE LOADMODULEFILE PRJFILE and WSPFILE The sub parameter is specified in the form of PRJFILE PATH If the current directory is on the same drive the relative path is used The current directory is the workspace directory for PRJFILE and WSPFILE and the project directory for other
48. ace Disable Trace Clear Trace Sets events Displays event setup status Deletes event Enables event Disables event Sets sequencer Displays sequencer setting status Cancels sequencer Enables sequencer Disables sequencer Sets delay count value and operation after delay Displays delay count setting status Sets traces buffer full break Displays trace data Searchs trace data Enables trace function Disables trace function Clears trace data 2 2 6 3 Multitrace The multitrace function samples data where an event trigger occurs for 8 frames before and after the event trigger E Multitrace Function Execute multitrace by setting the event mode to the multitrace mode using the SET MODE command The multitrace function samples data where an event trigger occurs for 8 frames before and after the event trigger It can be used for tracing required only when a certain variable access occurs instead of continuous tracing The trace data sampled at one event trigger 16 frames is called a block Since the trace buffer can hold 32K frames up to 2048 blocks can be sampled Multitrace sampling terminates when the trace buffer becomes full At this point a executing program can be allowed to break if necessary Figure 2 2 13 Multitrace Sampling Start execution Event 1 Event 2 Event 3 H D JL L Rm a Block Program flow E Multitrace Frame Number Sixteen frames of data are sampled eac
49. at compiling assembling SOFTUNE Workbench cannot control an external editor Always save the file you are editing before compiling assembling E Setting Options When activating an external editor from SOFTUNE Workbench options must be added immediately after the editor name The names of 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 it is to the editor f File name is determined as follows 1 If the focus is on the project window and if a valid file name is selected the selected file name becomes the file name 2 When a valid file name cannot be acquired by the above procedure the file name with a focus in built in editor becomes the file name x project path is determined as follows 1 Ifa focus is on the project window and a valid file name is selected the project path is a path to the project in which the file is stored 2 Ifno path is obtained the project path is a path to the active project Also file name cannot be given double quotes in the expansion of f macros Therefore it is necessary for you to provide double quotes for f Depending on the editor there are line numbers to which there will be no correct jump if the entire option i
50. automatic variable are in this category Static symbol within function Out of the variables defined in function those with static declaration Automatic variable Out of the variables defined in function those without static declaration and parameters for the function E Setting Symbol Information Symbol information in the file is set with the symbol information table by loading a debug information file This symbol information is created for each module The module is constructed for each source file to be compiled in C C in assembler for each source file to be assembled The debugger automatically selects the symbol information for the module to which the PC belongs to at abortion of execution Called the current module A program in C C also has information about which function the PC belongs to 27 CHAPTER 1 Basic Functions E Line Number Information Line 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 28 1 17 1 Referring to Local Symbols This section describes referring to local symbols and Scope E Scope When a local symbol is referred to Scope is used to indicate the module and function to which the local symbol to be referred belongs SOFTUNE Workbench automatically scopes the
51. ber are combined as follows Four intervals have the following fixed event number combination Interval Starting Event Number Ending Event Number Measuring Count The specified events become performance measurement points automatically and occurrences of that particular event are counted 82 2 2 1 Performance Measurement Procedures Performance can be measured by the following procedure e Set event mode e Set minimum measurement unit for timer e Specify performance buffer full break e Set events e Execute program e Display measurement result e Clear measurement result E Setting Event Mode Set the event mode to the performance mode using the SET MODE command This enables the performance measurement function Example gt SET MODE PERFORMANCE gt E Setting Minimum Measurement Unit for Timer Using the SET TIMERSCALE command choose either 1 us or 100 ns as the minimum measurement unit for the timer used to measure performance The default is 1 us When the minimum measurement unit is changed the performance measurement values are cleared Example gt SET TIMERSCALE 1U lt Set 1 us as minimum unit gt E Setting 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 327
52. cally performed prior to executive operation or reset processing The programming to Flash ROM can be also performed manually The following dialog is displayed at writing to Flash ROM Processing GUTT The command that programming to Flash ROM is generated has the following SET MEMORY SET BREAK LOAD FILL MOVE ASSEMBLE There are the following three functions for the operation of Flash ROM L L LA Updating FLASH memory Environment FLASH area control Download FLASH memory menu Updates Flash memory Flash memory is usually updated automatically prior to executive operation or reset processing Use this menu when updating Flash memory before this automatic updating This menu is enabled when data in the Flash memory area is changed requiring the writing to of Flash memory Uploading FLASH memory Environment FLASH area control Upload FLASH memory menu Synchronizes Flash memory and the buffers within the Debugger Be sure to perform this synchronization when Flash memory is rewritten updated by the user program or the program would not operate properly Erasing FLASH memory Environment FLASH area control Erase FLASH memory menu Erase all data in Flash memory Note that this operation will erase all code break software break settings 95 CHAPTER 2 2 3 3 Break The emulator can use the break function below e Code break e Data break e Monitor
53. ce buffer full break use the SET PERFORMANCE command If a performance buffer full break is not specified no break occurs even when the performance buffer becomes full When a break occurs due to a performance buffer full break the following message is displayed Break at Address by performance buffer full Note Not supported in the emulator MB2146 09 110 2 4 8 Forced Break SIM EML A executing program can be forcibly aborted by using the Run Abort command E Forced Break When a break occurs due to a forced break the following message is displayed Break at Address by command abort request E Forced Break in Power Save Consumption Mode and Hold State MB2141 A forced break is not allowed in the emulator while the MCU is in the power save consumption mode or hold state When a forced break is requested by the Run Abort command while executing a program the command is disregarded if the MCU is in the power save 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 Run Reset of MCU command after inputting the Run Abort command When the MCU enters the power save consumption mode or hold state while executing the status is displayed on the Status Bar 111 CHAPTER 2 112 CM25 00324 1E FUJITSU SEMICONDUCTOR e CONTROLLER MANUAL F2MC 8L 8FX FAMILY SOFTUNE WORKBENCH USER S MANUAL
54. ct can be stored in one workspace E Workspace Management Function To manage two or more projects workspace manages the following information Project Active project Subproject E Project The operation performed in SOFTUNE Workbench is based on the project The project is a set of files and procedures necessary for creation of a target file The project file contains all data managed by the project E Active Project The active project is basic to workspace 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 E 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 subproject in creating a target file in the parent project This dependence consists of sharing target files output by the subproject so a subproject is first made and built If making and building of the subproject is unsuccessful the parent project of the subproject will not be made and built The target file in the subproject is however not linked with the parent project when An absolute format ABS type project is specified as a subproject A library LIB type project is specified as a subproject E Restrictions on Storage of Two or More Pr
55. cted the maximum measured time is about 7 minutes If the timer overflows during measurement a warning message is displayed when the timer value is displayed using the SHOW SEQUENCE command 65 CHAPTER 2 2 2 5 5 Sample Flow of Time Measurement by Sequencer In the following sample when events are executed in the order of Event 1 Event 2 and Event 3 the execution time from 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 E Sample Flow of Time Measurement by Sequencer Level 1 Level 2 YES 66 Indicates that if event 1 occurs at level 1 move to level 2 and let the timer latched gt SET SEQUENCE EVENT 1 1 J 2 gt SET SEQUENCE EVENT 2 4 J 1 gt SET SEQUENCE EVENT 2 2 J 3 gt SET SEQUENCE EVENT 3 4 J 1 gt SET SEQUENCE EVENT 3 2 J 0 gt SET SEQUENCE LATCH 1 1 2 gt SET SEQUENCE LATCH 2 3 0 gt SHOW SEQUENCE Sequencer Enable levell Level Level 1 1 gt 2 Ww LA end T T gt 1 Indicates that if event 3 occurs at level 3 the sequencer terminates and let the timer latched level4 level5 level6 level7 level8 Latch 1 1 gt 2 00m02s060ms379 0Us Latch 2 3 gt E 00m16s040ms650 0us Indicate time values of timer latch 1 and timer
56. current module and function to refer to local symbols in the current module with preference This is called the Auto scope function and the module and function currently being scoped are called the Current Scope When specifying a local variable outside the Current Scope the variable name should be preceded by the module and function to which the variable belongs This method of specifying a variable is called a symbol path name or a Search Scope E Moving Scope As explained earlier there are two ways to specify the reference to a variable by adding a Search Scope when specifying the variable name and by moving the Current 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 symbol in parent function with precedence E Specifying Symbol and Search Procedure A symbol is specified as follows Module Name Function Name Symbol Name C symbol can be specified as follows with the scope operator class Name Function Name Symbol Name Class Name Function Name Symbol Name When a symbol is specified using the module and function names the symbol is searched
57. d Writing to the standby control register using a command is not prohibited 2 2 Emulator Debugger MB2141 This section describes the functions of the emulator debugger for the F MC 8L family E Emulator Debugger The emulator debugger later referred as emulator is a software to evaluate a program by controlling an ICE from a host computer via a communications line RS 232C LAN Before using this emulator the ICE must be initialized For further details refer to the SOFTUNE WORKBENCH Operation Manual Appendix B Download Monitor Program and Appendix C Setting LAN Interface 41 CHAPTER 2 2 2 1 Setting Operating Environment Before operating the emulator set the operating environment such as the MCU operation mode memory mapping the timer minimum measurement unit etc However each setting has a default No setup is required if the defaults are used E MCU Operation Modes The operation mode setting varies when a regular MCU is used and when a F MC 8L piggy back evaluation chip is used MCU mode e Single chip mode MCU Mode 0 e External ROM mode MCU Mode 1 e Internal ROM mode with external access function MCU Mode 2 E Memory Mapping A memory space can be allocated to the user memory or the emulation memory However certain restrictions apply to the space that can be set depending on the selected MCU mode E Timer Minimum Measurement Unit Select either 1 us or 100 ns as the emulator timer
58. e default is 1 us By using this timer the time from the start of MCU operation until the suspension can be measured The measurement result is displayed as two time values the execution time of the preceding program and the total execution time of programs executed so far plus the execution time of the preceding program If the timer overflows during measurement a warning message is displayed Measurement is performed every time a program is executed The emulation timer cannot be disabled but the timer value can be cleared instead Use the following commands to control the emulation timer SHOW TIMER Displays measured time CLEAR TIMER Clear measured timer Example gt GO main 25 Break at FFOD by breakpoint gt SHOW TIMER lt timer gt from initialize 0h 00m 42s 108ms 264ns Time from last executed Oh 00m 03s 623ms 874ns Time gt CLEAR TIMER gt SHOW TIMER lt timer gt from initialize Ob 00m 00s 000ms 000ns Time Oh 00m 00s 000ms 000ns Time from last executed gt 2 2 10 Sampling by External Probe An external probe can be used to sample input data There are two sampling types sampling the trace buffer as trace data and sampling using the SHOW SAMPLING command E Sampling by External Probe There are two sampling types to sample data using an external probe sampling the trace buffer as trace data and sampling using the SHOW SAMPLING command When data is sampled as trace data such data can be
59. e options effective for specific source files The common options specified for source files for which individual options are specified become invalid E Tool Options In SOFTUNE Workbench the macros indicating that any file name and directory name 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 For details about the tool options for each tool see the manual of each tool 1 7 Error Jump Function This section describes the error jump function in SOFTUNE Workbench E Error Jump Function E Syntax When an error such as a compile error occurs double clicking the error message displayed in the Output window opens the source file where the error occurred and automatically moves the cursor to the error line This function permits efficient removal of compile errors etc The SOFTUNE Workbench Error Jump function analyzes the source file names and line number information embedded in the error message displayed in the Output window opens the matching file and jumps automatically to the line The location where a source file name and line number information are embedded in an error message varies with the tool outputting the error An error message format can be added to an existing one or modified into an new one However the modify error message formats for pre installed
60. each level met SEQUENCE TIMER A e E Timer setup foreach Select event number causing condition When condition met When count ends trigger at each level set r pass count value Delay counter When count ends CANCEL DISABLE EVENT SEQUENCE EVENT y P yY SHOW SEQUENCE ALL SHOW DELAY SET DELAY Enable Events Disable Sequencer Instructing MCU to i i suspend operation i SET i Timer latch pi p s SEQUENCE EVENT y ENABLE EVENT SHOW EVENT 53 CHAPTER 2 E Event related Commands in Normal Mode Since the real time trace function in the normal mode is actually the single trace function the commands can be used to control Table 2 2 5 shows the event related commands that can be used in the normal mode Table 2 2 5 Event related Commands in Normal Mode Normal Mode 54 Usable Command Set Event Show Event Cancel Event Enable Event Disable Event Function Sets 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 Search Trace Enable Trace Disable Trace Clear Trace Sets trace buffer full brea
61. ed MCU operation in response to an interrupt request is also supported for the following exception handling es Execution of undefined instructions e Address error in program access Program access to internal RAM area and internal I O area 2 1 5 Reset Simulation This section describes the reset simulation executed by SOFTUNE Workbench E Reset Simulation The simulator simulates the operation when a reset signal is input to the MCU using the Debug Run Reset MCU command 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 39 CHAPTER 2 2 1 6 Power Save Consumption Mode Simulation This section describes the power save consumption mode simulation executed by SOFTUNE Workbench E Power Save Consumption Mode Simulation 40 The MCU enters the power save consumption mode in accordance with 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 Run Abort command is executed Each cycle of the loop increments the count by 1 During this period I O port processing can be operate
62. eeeeeeeaaeeeeeeeaaaeeeseeeaaeeeseeaeeeeesenaaeeeeeseaaes 82 2 2 8 Measuring Coverage uu cceceeceeeeceeeeeeceeaaeeeeneeeeeaeeeeeaeeeeaeeeeeaaeseeeeeeeeaaeesdeneeecaeeseeaeeeseaeeeeeaeseeeneeees 87 2 2 9 Measuring Execution Time Using Emulation Timer cc iceeeeeececeeeencceeeeeeenaeeeeeeeaaeeeeeeeaeeeeeneaas 90 2210 Sampling D Eternal Probe a rioen geed geed EUREN AERCH 91 2 3 Emulator Debugger MB2146 09 ursii irria a EARE S EE ATARE AAS ESSAS 93 2 3 1 Setting Operating Environment ccecccceceeeeeeeeeeeeeeeeeeeeeeceaeeeeeeeeeceaeeeseaeeeseaeeeeeaaeeseeeestaeeeeneeees 94 2 3 2 Programing to Flash ROM area ccccccesscecceeeeeeeeeeeeeeeeeeceaeeeceeeesceaeeeseaeeseaeeesaaaeseeeeeesiaaeeneeeeeaes 95 2 3 3 2 3 4 2 3 5 2 4 2 4 1 2 4 2 2 4 3 2 4 4 2 4 5 2 4 6 2 4 7 2 4 8 Break eegen Ae deg AE ee eh EE edd to duet A elite tee 96 Real time Ne 98 Notes om Executing Program sue gk dugre Sei deed evened eieae AER REEERE 101 Abortion of Program Execution SIM EML eeeeesesessesesireeieerrsrirtstrtssintsrinssintetnnstnnnsrnnsrrntennt 102 Instruction Execution Breaks SIM EML c cccccceseeeeeseneeeeeneeeeeaeesecaeeeeeaeeeeaeeeneaeeseeeeeeieeeees 103 Data Monitor Break MB2146 09 0 0 ee eeceeeeeeenne eee eeeeaeeeeeeaeeeeeeenaaeeeeeeeaaeeeeeteaaeeeeenncaaeeeeeee 105 Data Access Breaks SIM EML 0 cccceceececeseeeeeneeeeeeeeeeeeeeeeeeeeeeaeeeseaeeeseaeeeseaeesseeeeesneeeneaees 106 Sequential
63. enthesized line 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 E Reference Section Setup Error Jump 1 8 Editor Functions This section describes the functions of the SOFTUNE Workbench built in standard editor E Standard Editor SOFTUNE Workbench has built in editor called the standard editor The standard editor is activated as the Edit window in SOFTUNE Workbench As many Edit windows as are required can be opened at one time The standard editor has the following functions in addition to regular editing functions Keyword marking function in C C assembler source file Displays reserved words such as if and for in different color Error line marking function The error line can be viewed in a different color when executing Error Jump Tag setup function A tag can be set on any line and instantaneously jumps to the line Once a tag is set the line is displayed in a different color Ruler line number display 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 precedi
64. equencer 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 termination and trace ending and the break operation Break or Not Break when the delay count ends If the data after event occurrence is not required there is no need of this setting If Not Break is set the trace terminates but no break occurs To check trace data in on the fly use this setup by executing the SET DELAY command Note When the sequencer termination causes a break Sequential break the last executed machine cycle is not sampled 71 CHAPTER 2 72 4 Set trace buffer full break The program can be allowed to break when the trace buffer becomes full Use the SET TRACE command for this setting The default is Not Break Display the setup status using the SHOW TRACE STATUS command Table 2 2 9 lists trace related commands that can be used in the single trace function Table 2 2 9 Trace related Commands that can be used in the single trace function Usable Command Function Set Event Show Event Cancel Event Enable Event Disable Event Set Sequence Show Sequence Cancel Sequence Enable Sequence Disable Sequence Set Delay Show Delay Set Trace Show Trace Search Trace Enable Tr
65. ess information is sampled and stored in the trace buffer This function is called trace E Trace The program execution history can be analyzed from the data stored by the trace Since the trace buffer has a ring structure when it becomes full it automatically returns to the start to overwrite existing data E Trace Data The stored data sampled by the trace is called trace data For the emulator debugger of the MB2146 09 16 divergences immediately before the execution interruption can be sampled Note When 4096 or more branch instructions are not executed only 4096 instructions from the branch destination address is displayed E Sampling Trace Data When the trace function is enabled the data is sampled during command execution and it is stored in the trace buffer When the program execution is stopped by the break cause such as break point the trace sampling is ended E Frame number A number is assigned to each frame of sampled trace data This number is called a frame number The frame number is used to specify the display start position of the trace buffer The value 0 is assigned to trace data at the position for current program counter PC Negative values are assigned to previous trace data 98 2 3 4 1 Displaying Trace Data The data stored in the trace buffer is displayed E Displaying Trace Data Storage Information Trace window is displayed how much trace data is stored in the trace buffer
66. h 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 point is 0 trace data sampled before reaching the event trigger point is numbered negatively and trace data sampled after the event trigger point is numbered positively These frame numbers are called local numbers See Figure 2 2 14 In addition to this local number there is another set of frame numbers starting with the oldest data in the trace buffer This is called the global number Since the trace buffer can hold 32K frames frames are numbered to 32758 See Figure 2 2 14 To specify which frame data is displayed use the global number or block and local numbers 73 CHAPTER 2 74 Figure 2 2 14 Frame Number in Multitrace Block number 2048 Trace buffer Frame number Global number 15 16 17 18 24 31 32 32752 32753 32759 32767 32768 Local number 7 8 7 6 7 8 lt Event trigger lt Event trigger lt Event trigger 2 2 6 4 Setting Multitrace Before executing the multitrace function the following settings must be made After these settings trace data is sampled when a program is executed 1 Set event mode to multitrace mode 2 Enable trace function 3 Set event 4 Set trace b
67. he abortion of program execution uses both the simulator and emulator for the F2MC 8L family When program execution is aborted the address where the break occurred and the break source are displayed E Abortion of Program Execution When program execution is aborted the address where the break occurred and the break source are displayed In the emulator debugger the following sources can abort program execution e Instruction Execution Breaks e Monitoring data Breaks e Data Access Breaks e Sequential Break e Guarded Access Breaks e Trace Buffer Full Break e Performance Buffer Full Break e Forced Break In the simulator debugger the following sources can abort program execution e Instruction Execution Breaks e Data Access Breaks e Guarded Access Breaks e Trace Buffer Full Break e Forced Break 102 2 4 1 Instruction Execution Breaks SIM EML An instruction execution break is a function to let an instruction break through monitoring bus the chip built in break points etc E Instruction Execution Breaks Use the following commands to control instruction execution breaks SET BREAK Sets break point SHOW BREAK Displays current break point setup status CANCEL BREAK Cancels break point ENABLE BREAK Enables break point DISABLE BREAK Temporarily cancels break point When a break occurs due to an instruction execution break the following message is displayed Break at Address by breakpoint
68. he bit represented by 0 means LOW When data is input as command parameters these values are also used for input Table 2 2 11 Bit Order of External Probe Data Bit Order External probe data E Commands for External Probe Data Table 2 2 12 shows the commands that can be used to set or display external probe data Table 2 2 12 Commands that can be used External Probe Data Usable Command Function Set Sampling Sets sampling timing for external probe Show Sampling Samples external probe data Set Event Enables to specify external probe data as condition for event 1 Show Event Displays event setup status Show Trace Displays external probe trace sampled single trace Show Multitrace Displays external probe trace sampled multi trace 92 2 3 Emulator Debugger MB2146 09 This section describes the functions of the emulator debugger for the F MC 8FX family E Emulator Debugger When choosing the emulator debugger from the setup wizard select MB2146 09 using ICEs in circuit emulators type MB2141 MB2146 09 The emulator debugger emulator for the MB2146 09 ICE is software that controls an in circuit emulator ICE from a host computer via a communications line USB to evaluate programs The following series can be debugged When using MB2146 09 USB adapter F MC 8FX When the MB2146 09 is used refer to Appendix D Setting USB Interface in the SOFTUNE WORKBENCH Operation Manual to set up the U
69. ies command By using this function users 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 executing the Project Include Dependencies command the Output window is redrawn and replaced by the dependencies analysis result If the contents of the current screen are important error message etc save the contents to a file and then execute the Include Dependencies command CHAPTER 1 Basic Functions 1 6 Functions of Setting Tool Options This section describes the functions to set options for the language tools activated from SOFTUNE Workbench E Function of Setting Tool Options To create a desired target file it is necessary to specify options for the language tools such as a compiler assembler and linker SOFTUNE Workbench stores and manages the options specified for each tool in project configurations Tool options include the options effective for all source files common options and the options effective for specific source files individual options For details about the 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 assembl
70. ing data break e Sequence break E Setup of Code Break Software Break The code break software break can be set 256 points The command is set as follows SET BREAK E Setup of Data Break The data break is a function to suspend the program execution when the data access read or write is performed to the specified address during the program execution The emulator can be set up to 2 When set as monitoring data break the data access is not broken The command is set as follows SET DATABREAK WR Setup of Monitoring Data Break The monitoring data break is a special break function when the program is reached the specified address during matching with specified data The following figure is displayed the break condition Flow of program Monitoring data Break does not occur when data is not matched Specified addres Data match Break occurs when data is matched ooo Specified addres 96 Monitoring data break can be set point The command is set the following procedure 1 SET DATABREAK 2 SET BREAK DATAWATCH E Setup of Sequence Break The sequence break is a function to suspend the program execution when the program is executed at level 1 and then at level 2 for the specified two addresses The emulator can be set only 1 The command is set below SET BREAK SEQUENCE 97 CHAPTER 2 2 3 4 Real time Trace While execution a program the executed addr
71. ion again 1 4 1 Customize Build Function This section describes the SOFTUNE Workbench to set the Customize Build function E Customize Build function In SOFTUNE Workbench different tools can be operated automatically before and after executing the Assembler Compiler Linker Librarian Converter or Configurator started at Compile Assemble Make or Build The following operations can be performed automatically during Make or Build using this function Starting the syntax check before executing the Compiler After executing the Converter starting the S format binary Converter m2bs exe and converting Motorola S format files to binary format files E Setting Options An option follows the tool name to start a tool from SOFTUNE Workbench The 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 as it is For details about the parameters see Section 1 11 Macro Descriptions Usable in Manager E Macro List The Setup Customize Build dialog provides a macro list for macro input The build file load module file project file submenus indicate their sub parameters specified The environment variable brackets must have any item otherwise resulting in an error Table 1 4 1 Macro List Macro List Macro Name
72. k Displays trace data Searches trace data Enables trace function Disables trace function Clears trace data 2 2 4 2 Operation in Multitrace Mode When the multitrace mode is selected as the event mode the real time trace function becomes the multitrace function and events are used as triggers for multitracing E Operation in Multitrace Mode Multitracing is a trace function that samples data before and after an event trigger occurrence When the multitrace mode is selected as the event mode the real time trace function becomes the multitrace function and events are used as triggers for multitracing Figure 2 2 5 Operation in Multitrace Mode SHOW MULTITRACE STATUS da SET EVENT ENABLE MULTITRACE i i D i SET MULTITRACE CANCEL EVENT DISABLE MULTITRACE e Enable Disable control Buffer full break control Instructing MCU to suspend operation Events All enabled events generate trigger Multitrace measurement DISABLE ENENT CLEAR MULTITRACE SEARCH MULTITRACE ENABLE EVENT M SHOW MULTITRACE SHOW EVENT 55 CHAPTER 2 E Event related Commands in Multitrace Mode Table 2 2 6 shows the event related commands that can be used in the multirace mode Table 2 2 6 Event related Commands in Multitrace Mode Usable Command Set Event Show Event Cancel Event Enable Event Disable Event Function Sets event Displays event setup status Deletes event Enables event Disables event Mul
73. le for each level 8 event conditions 1 to 16777216 times pass count can be specified for each condition 1 timer condition Up to 16 s in lus unit or up to 1 6 s in 100 ns units can be specified Operation when condition met Branches to required level or terminates sequencer Controls trace sampling Other function Timer latch enable at level branching Operation when sequencer terminates Starts delay counter The minimum measurement unit for Timer value can be set to either 1 us or 100 ns using the SET TIMERSCALE command 59 CHAPTER 2 2 2 5 1 Setting Sequencer The sequencer operates in the following order 1 The sequencer starts from level 1 simultaneously with the start of program executing 2 Depending on the setting at each level branching to the required level is performed when the condition is met 3 When sequencer termination is specified the sequencer terminates when the condition is met 4 When the sequencer terminates the delay counter starts counting E Setting Sequencer Figure 2 2 7 shows the sequencer operation Figure 2 2 7 Operation of Sequencer Start executing program Start sequencer Use event number 1 gt Pass counter Trace control Branch level number Use event number 2 gt Pass counter gt Trace control Branch level number 60 Use event number 3 gt Pass counter Use event number 4 g
74. nction 0 eeecccceeeeesneeeeeeeeaeeeeeeeaaeeeeeeeaaaeeeeeeeaaeeeeseaaeeeeseeaaaeeeeeeenaeeeeeseaaas 2 1 2 Project Management Function 0 ee eeeeeceeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeaeeeeeeeseaeeeeeeseaeeeeeesaeeeeeeeseneaeeeeeeeneaeeees 3 1 3 Project Dependente Nee TEEN SEENEN ENEE seed EENS ee 5 1 4 Make Bula FUNCION 3 52 iena eebe ae ha dig at SEENEN DEELER e R T a Ae Aen 6 1 4 4 Customize Build Function cccceceececeeeeeeeeeeeeeeeeeceaaeeeeneeecaaeeeseaeeeseaeeeseaaeeseaeeeesaaeeseeeeeeseeeseaeeeeaas 7 1 5 Include Dependencies Analysis Function ccccceeeeeeeee cette sence cette eaaeeeeeetaaeeeeeeaaaeeeeeeeaeeeeeeeaaeeeenes 9 1 6 Functions of Setting Tool Options ceccccceeeceeeeeeeeeeaeeceeeeeeeaaeeeeeeeeesaaeeeeeeeeeceaeeeseaaeeseieeesteeeeeeeeee 10 1 7 Error Jump FUMCHION 0 sce tese eden ded ENER ENEE EES ENEE EEN ened ieee 11 1 8 elle e ele Le EN 13 1 9 Stelle NEEN TREIE 14 1 10 Storing External Ke 16 1 11 Macro Descriptions Usable in Manager eee ee eaaeee ee eeaaeeeeeeeaaaeeeeeetaeeeeeeeaaeeeee 17 1 42 Setting Operating Environment mdee araoa a aa aa lates cnet REENEN d 22 Tt Debugger TYDES i u a e i ME ee a a a a AS 23 1 14 Memory Operation Functions 2 0 0 eee cece eeeeeee cece eeeeeaee cence ee caaeeeeeeeeecaaeeeeeeeeeseaeeeeeaaeeseeeeeseaeeeeeeeeee 24 1 15 Register Operations TEE 25 1 16 Line Assembly and Disassembly secscveiacssrnjiwi n aE E AEEA E 26 UN Wl ee eg RT et Uu BEE 27
75. ng line the same use is set at the inserted line as well Function to display Blank Line Feed code and Tab code When a file includes a Blank Line Feed code and Tab code these codes are displayed with special symbols Undo function This function cancels the preceding editing action to restore the previous state When more than one character or line is edited the whole portion is restored Tab size setup function Tab stops can be specified by defining how many digits to skip when Tab codes are inserted The default is 8 Font changing function The font size for character string displayed in the Edit window can be selected E Reference section Edit Window The Standard Editor CHAPTER 1 Basic Functions 1 9 Storing External Editors This section describes the function to set an external editor to SOFTUNE Workbench E External Editor SOFTUNE Workbench has built in standard editor and use of this standard editor is recommended However another accustomed editor can be used with setting it instead of an edit window There is no particular limit on which editor can be set but some precautions below may be necessary Use the Setup Editor setting command to set an external editor E Precautions Error jump function The Error Jump cannot move the cursor to an error line if the external editor does not have a function to specify the cursor location when activated the external editor File save
76. ojects Only one REALOS type project can be stored in one workspace 1 2 Project Management Function This section explains the project management function of SOFTUNE Workbench E Project Management Function The project manages all information necessary for development of a microcontroller system Especially its major purpose is to manage information necessary for creation of a target file The project manages the following information Project configuration Active project configuration Information on source files include files other object files library files Information on tools executed before and after executing language tools customize build function E Project format The project file supports two formats a workspace project format and an old project format The differences between the two formats are as follows Workspace project format Supports management of two or more project configurations Supports use of all macros usable in manager Does not support early Workbench versions Old project format Supports management of just one project configuration Limited number of macros usable in manager For details see Section 1 11 Macro Descriptions Usable in Manager Supports early 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
77. ort writing is executed to the data output destination To set an output port either use the Setup Debug Environment I O Port command or the Set Outport command in the Command window Up to 4096 port addresses can be set as output ports Select either a file or terminal Output Terminal window as the data output destination An output destination file must be either a text file that can be referred to by regular editors or a binary file To output a binary file select the Binary radio button in the Output Port dialog 37 CHAPTER 2 2 1 4 Interrupt Simulation This section describes interrupt simulation executed by SOFTUNE Workbench E Interrupt Simulation 38 Simulate the operation of the MCU in response to an interrupt request The methods of generating interrupts are as follows e 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 e Continue to generate interrupts each time the number of instruction execution cycles exceeds the specified number of cycles The method of generating interrupts is set by the Setup Debug environment Interrupt command If interrupts are masked by the interrupt enable flag when the interrupt generating conditions are established the interrupts are generated after they are unmask
78. outside the memory map range cannot be displayed If this is attempted is displayed as the mnemonic E Reference Section Disassembly Window 26 1 17 Symbolic Debugging The symbols defined in a source program can be used for command parameters address There are three types of symbols as follows e Global Symbol e Static Symbol within Module Local Symbol within Module e Local Symbol within Function E Types of Symbols A symbol means the symbol defined while a program is created and it usually has a type Symbols become usable by loading the debug information file Furthermore for symbol of C C it recognizes the type and executes the command There are three types of symbols as follows Global symbol A global symbol can be referred to from anywhere within a program In C C variables and functions defined outside a function without a static declaration are in this category In assembler symbols with a PUBLIC declaration are in this category Static symbol within module Local symbol within module A static symbol within module can be referred to only within the module where the symbol is defined In C C 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 C A static symbol within a function and an
79. pend Suspend l 4 l i l J 4 E 9 RRC 63 CHAPTER 2 Setup Example Suspend trace sampling when event 1 occurs and then resume at event 2 and keep sampling data until event 3 occurs Level 1 Resume trace sampling Level 3 Suspend trace sampling gt SET SEQUENCE EVENT DISABLETRACE 1 1 J 2 gt SET SEQUENCE EVENT ENABLETRACE 2 2 J 3 gt SET SEQUENCE EVENT DISABLETRACE 3 3 J 2 64 2 2 5 4 Time Measurement by Sequencer Time can be measured using the sequencer A time measurement timer called the emulation timer is used for this purpose When branching is made from a specified level to another specified level a timer value is fetched Up to two emulation timer values can be fetched This function is called the timer latch function E Time Measurement by Sequencer The time duration between two given points in a complex program flow can be 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 diplayed using the SHOW SEQUENCE command When a program starts execution the emulation timer is initialized and then starts counting Select either lus or 100 ns as the minimum measurement unit for the emulation timer Set the measurement unit using the SET TIMESCALE command When 1 us is selected the maximum measured time is about 70 minutes when 100 ns is sele
80. r The simulator debugger simulates the MCU operations executing instructions memory space 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 E Emulator Debugger The emulator debugger is software to evaluate a program by controlling an In Circuit Emulator ICE from a host computer through a communications line RS 232C LAN USB Before using this debugger the ICE must be initialized 23 CHAPTER 1 Basic Functions 1 14 Memory Operation Functions This section describes the memory operation functions E Functions for Memory Operations Display Modify memory data Memory data can be display in the Memory window and modified Fill The specified memory area can be filled with the specified data Copy The data in the specified memory area can be copied to another area Compare The 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 C variables The names of variables in a C C source file can be displayed in the Watch window and modified Setting Watch point By setting a watch point at a specific address its data can be displayed in the Watch window For further details of the
81. races all data from the start of executing a program until the program is aborted E Function of Single Trace The single trace is enabled by setting the event mode to normal mode using the SET MODE command The single trace function traces all data from the start of executing a program until the program is suspended If the real time trace function is enabled data sampling continues execution to record the data in the trace buffer while the GO STEP CALL commands are being executed As shown in Figure 2 2 11 suspend resume trace sampling can be controlled by the 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 bus 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 count ends a break occurs normally due to the sequential break but tracing can be terminated without a break Furthermore a program can be allowed to break when the trace buffer becomes full This break is called a trace buffer full break Figure 2 2 11 Sampling in Single Trace Delay counter Suspend Resume Sequencer terminates Tracing sampling sampling Trigger terminates Sequencer Start program ae GE Delay E Frame Number and Step N
82. s not given double quotes E Example of Optional Settings Table 1 9 1 List of Special Characters for Analyzing Error Message Parameter Semantics Means specifying itself Means specifying file name Means specifying line number Means specifying project path Table 1 9 2 Parameters Used in Option Setups For External Editors Editor name Argument WZ Editor V4 0 te MIFES V1 0 t l UltraEdit32 f 1 1 TextPad32 EH PowerEDITOR f g l Codewright32 f g l1 Hidemaru for Win3 1 95 j l 1 f ViVi E Reference Section Editor Setup line 1 f Note Regarding execution of error jump in Hidemaru To execute error jump in Hidemaru used as an external editor use the Others Operating Environment Exclusive Control command and then set When opening the same file in Hidemaru and Opening two identical files is inhibited CHAPTER 1 Basic Functions 1 10 Storing External Tools This section describes the function to set an external tool to SOFTUNE Workbench E External Tools A non standard tool not attached to SOFTUNE Workbench can be used by setting it as an external tool and by calling it from SOFTUNE Workbench Use this function to coordinate with a source file version management tool If a tool set as an external tool is designed to output the execution result to the standard output and the standard error output
83. sition It is possible to specify from which data in the trace buffer to displays To do this specify a step or frame number 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 multitrace mode A range can also be specified Example In Single Trace Mode gt SHOW TRACE 6 Start displaying from frame 6 gt SHOW TRACE 6 10 Display from frame 6 to frame 10 In Multitrace gt SHOW MULTITRACE GLOBAL 500 Start displaying from frame 500 Global number gt SHOW MULTITRACE LOCAL 2 Displaying block number 2 gt SHOW MULTITRACE LOCAL 2 5 5 Display from frame 5 to frame 5 of block number 2 77 CHAPTER 2 2 2 6 7 Display Format of Trace Data A display format can be chosen by specifying a command identifier with the SHOW TRACE command in the single trace and with the SHOW MULTITRACE command in the multitrace The source line is also displayed if Add source line is selected using the SET SOURCE command There are three formats to display trace data Display in all bus cycles Specify CYCLE Display in only instruction execution Specify INSTRUCTION Display in source line units Specify SOURCE E Display All Bus Cycles Specify CYCLE In this mode data can be displayed in the following format Disassembly display Sequencer s level Address Displays the disassembly Displays the level of the in the first
84. struction operation enabled READ Data read enabled WRITE Data write enabled undefined Attribute undefined access prohibited 2 1 3 UO Port Simulation This section describes I O port simulation executed by SOFTUNE Workbench E I O Port Simulation Input Port There are two types of simulations in I O port simulation input port simulation and output port simulation Input port simulation has the following types e Whenever a program reads the specified port data is input from the pre defined data input source e Whenever the instruction execution cycle count exceeds the specified cycle count data is input to the port To set an input port use the Setup Debug Environment I O Port command or the Set Inport command in the Command window Up to 4096 port addresses can be specified for the input port The data input source can be a file or a terminal After reading the last data from the file the data is read again from the beginning of the file If a terminal is specified the input terminal is displayed at read access to the set port A text file created by an ordinary text editor or a binary file containing direct code can be used as the data input source 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 E I O Port Simulation Output Port At output port simulation whenever a program writes data to the specified p
85. sured Time To display the time measured specify the starting event number or the ending event number Count of measuring within given time interval gt SHOW PERKORMANCE TIME 1 Minimum event 1 gt 2 time us count min time 11637 0 lt Le k time 17745 0 0 0 8999 0 0 execution time avr time 14538 0 9000 0 9999 0 0 10000 0 10999 0 0 execution time 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 19000 0 l 0 asSleteecesetesiesceseaesseee poco Mega total 452 The lower time limit upper time limit and display interval can be specified The specified time value is in lus when the minimum measurement unit of timer is set to 1 us by the SET TIMERSCALE command and in 100 ns when the minimum is set to 100 ns 85 CHAPTER 2 gt SHOW PERFORMANCE TIME 1 13000 16999 500 event 1 gt 2 time us min time 11637 0 max time 17745 0 0 0 avr time 14538 0 13000 0 13500 0 Lower time limit for display 140000 5 14500 0 15000 0 15500 0 Upper time limit for display 16000 0 16500 0 17000 0 total 12999 0 13499 0 13999 0 14499 0 14999 0 15499 0 15999 0 16499 0 16999 0 17499 0 86 2 2 8 Measuring Coverage This emulator has the CO coverage measuremen
86. t Pass counter Use event number 5 gt Pass counter Use event number 6 gt Pass counter Use event number 7 gt Pass counter Use event number 8 gt Pass counter Timer condition Waiting time gt Trace control Branch level number gt Trace control Branch level number gt Trace control Branch level number gt Trace control Branch level number Trace control Branch level number gt Trace control Branch level number gt Trace control Branch level number Terminate Branch to specified level sequencer Start delay count Setup Examples Terminate sequencer when event 1 occurs gt SET SEQUENCE EVENT 1 1 J 0 Terminate sequencer when event 2 occurs 16 times gt SET SEQUENCE EVENT 1 2 16 J 0 Terminate sequencer when event 2 occurs after event 1 occurred However do not terminate sequencer if event 3 occurs between event and event 2 gt SET SEQUENCE EVENT 1 1 J 2 gt SET SEQUENCE EVENT 2 2 J 0 gt SET SEQUENCE EVENT 2 3 J 1 Terminate sequencer when event 2 occurs less than 300 us after event 1 occurred gt SET SEQUENCE EVENT 1 1 J 2 gt SET SEQUENCE EVENT 2 2 J 0 gt SET SEQUENCE TIMER 2 300 J 1 gt SHOW SEQUENCE Sequencer Enable levell level2 level3 level4 level5 level6 level7 levels 1 i gt 2 2 2 gt end
87. t function Use this function to find now many percentage of an entire program has been executed E Coverage Measurement Function When testing a program the program is executed with various test data input and the results are checked for correctness When the test is finished every part of the entire program should have been executed If any part has not been executed there is a possibility that the test is insufficient This emulator coverage function is used to find now many percentage of the whole program has been executed In addition details such as which addresses were not accessed can be checked This enables the measurement coverage range to be set and the access attributes to be measured To execute the CO coverage set a range within the code area and set the attribute to Code attribute 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 E Coverage Measurement Procedures The procedure for coverage measurement is as follows Set range for coverage measurement SET COVERAGE Measuring coverage GO STEP CALL Displaying measurement result SHOW COVERAGE E Coverage Measurement Operation The following operation can be made in coverage measurement Load Save of coverage data LOAD COVERAGE SAVE COVERAGE Abortion and resume of coverage measurement ENABLE COVERAGE DISABLE COVERAGE Clearing co
88. t in 1 byte units There is no limit on the size of an area An access attribute can be set for each area There are three different area types as follows User Memory Area Memory space in the user system is called the user memory area and this memory is called the user memory To set the user memory area use the SET MAP command Emulation Memory Area Memory space substituted for emulator memory is called the emulation memory area and this memory is called emulation memory The user system bus master DMAC etc cannot access emulation memory To set the emulation memory area use the SET MAP command Undefined Area A memory area that does not belong to any of the areas described above is part of the user memory area This area is specifically called the undefined area The undefined area can be set to either NOGUARD area which can be accessed freely or GUARD area which cannot be accessed Select either setup for the whole undefined area If the area attribute is set to GUARD a guarded access error occurs if access to this area is attempted 44 2 2 1 3 Memory Mapping Memory space can be allocated to the user memory and the emulation memory etc and the attributes of these areas can be specified However the MCU internal resources are not dependent on this mapping setup and access is always made to the internal resources E Access Attributes for Memory Areas The access attributes shown in Table 2 2 1 can be
89. through the console application the result can be specified to output the SOFTUNE Workbench Output window In addition the allow description of additional parameters each time the tool is activated To set an external tool use the Setup Setting Tool command To select the title of a set tool use the Setup Activating Tool command E Setting 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 it is to the external tool For details about the parameters see Section 1 11 Macro Descriptions Usable in Manager Note When checking Use the Output window note the following 1 Once a tool is activated neither other tools nor the compiler assembler can be activated until the tool is terminated 2 The Output window must not be used with a tool using a wait state for user input while the tool is executing The user cannot 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 E Reference Section Setting Tools Starting Tools 1 11 Macro Descriptions Us
90. titrace Mode Set MultiTrace Show MultiTrace Search MultiTrace Enable MultiTrace Disable MultiTrace Clear MultiTrace 56 Sets trace buffer full break Displays trace data Searches trace data Enables trace function Disables trace function Clears trace data 2 2 4 3 Operation in Performance Mode Event triggers 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 E Operation in Performance Mode The event triggers that 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 6 Operation in Performance Mode SHOW PERFORMANCE STATUS A SET EVENT i SET PERFORMANCE CANCEL EVENT Buffer full break control Instructing MCU to suspend operation Limited to following combinations 1 2 34 56 7 8 Events Performance measurement DISABLE EVENT CLEAR PERFORMANCE ENABLE EVENT M M SHOW PERFORMANCE SHOW EVENT 57 CHAPTER 2 E Event related Commands in Performance Mode Table 2 2 7 shows the event related commands that can be used in the performance mode Table 2 2 7 Event related Commands in Performance Mode Performance Mode 58 Usable Command Set Event Show Event Cancel Event Enable Event Disable Event Function Sets event
91. uffer full break E Setting Multitrace Before executing the multitrace function the following settings must be made After these settings trace data is sampled when a program is executed 1 Set event mode to multitrace mode Use the SET MODE command for this setting 2 Enable trace function Use the ENABLE MULTITRACE command To disable the function use 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 10 shows the list of trace related commands that can be used in multitrace mode Table 2 2 10 Trace related Commands that can be used in multitrace mode Usable Command Function Set Event Sets events Show Event Displays event setup status Cancel Event Enable Event Disable Event Set Multitrace Show Multitrace Search Multitrace Enable Multitrace Disable Multitrace Clear Multitrace Deletes event Enables event Disables event Sets trace buffer full break Displays trace data Searches trace data Enables multitrace Disables multitrace Clears trace data 75 CHAPTER 2 2 2 6 5 Displaying Trace Data Storage Status It is possible to display how much trace data is stored in the trace buffer This status data can be read by specifying STATUS to the SHOW TRAC
92. umber in Single Trace The sampled trace data is numbered in frame units This number is called the frame number When displaying trace data the starting location in the trace buffer can be specified using the frame number The trace data at the point where the sequencer termination trigger occurs is numbered 0 trace data sampled before reaching the trigger point is numbered negatively and the data sampled after the trigger point is numbered positively See Figure 2 2 12 69 CHAPTER 2 If there is no sequencer termination trigger point available the trace data sampled last is numbered 0 Figure 2 2 12 Frame Number in Single Trace 0 Trigger point 1 2 3 Delayed frames 70 2 2 6 2 Setting Single Trace The following settings 1 to 4 are required before executing single trace Once these settings have been made trace data is sampled when a program is executed 1 Set event mode to normal mode 2 Enable trace function 3 Set events sequencer and delay count 4 Set trace buffer full break Setting Single Trace The following settings are required before executing single trace Once these settings have been made trace data is sampled when a program is executed 1 Set event mode to normal mode Use SET MODE command to make this setting 2 Enable trace function Use the ENABLE TRACE command To disable the function use the DISABLE TRACE command The default is Enable 3 Set events s
93. ut 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 serious effect to the public and could lead directly to death personal injury severe physical damage or other loss Oe nuclear reaction control in nuclear facility aircraft flight control air traffic control mass transport control medical life support system missile launch control in weapon system or 2 for use requiring extremely high reliability i e submersible repeater and artificial satellite Please note that Fujitsu will not be liable against you and or any third party for any claims or damages arising in connection with above mentioned uses of the products Any display has an inherent chance of failure You must protect against injury damage or loss from such failures by incorporating safety design measures into your facility and equipment such as redundancy fire protection and prevention of over current levels and other abnormal operating conditions If any products described in this document represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and Foreign Trade Law of Japan the prior authorization by Japanese government will be required for export of those products from Japan Copyright 2004 FUJITSU LIMITED All rights reserved PREFACE CHAPTER 1 Base FUNCHONS Geesse 1 1 1 Workspace Management Fu
94. verage data CLEAR COVERAGE Canceling coverage measurement range CANCEL COVERAGE 87 CHAPTER 2 2 2 8 1 Coverage Measurement Procedures The procedure for coverage measurement is as follows e Set range for coverage measurement SET COVERAGE e Measure coverage GO STEP CALL e Display measurement result SHOW COVERAGE E Setting Range for Coverage Measurement Use the SET COVERAGE command to set the measurement range Up to 32 ranges can be specified By specifying AUTOMATIC for the command qualifier the code area for the loaded module is set automatically However the library code area is not set when the C compiler library is linked Example gt SET COVERAGE OFFO00 0FFFF E 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 E Displaying Coverage Measurement Result To display the coverage measurement result use the SHOW COVERAGE command The following can be displayed 88 Coverage ratio of total measurement area Summary of 16 addresses as one block Details indicating access status of each address Coverage Ratio of Total Measurement Area Specify TOTAL for command qualifier gt SHOW COVERAGE TOTAL total coverage 82 3 Summary Specify GENERAL for command qualifier gt SHOW COVERAGE GENERAL HEX OXO 1X0 2X0 address 01
95. ze the communication speed the function increasing the operating frequency automatically is called clock up mode The default is ON at that time Also this setting is performed at the setup wizard or Environment Setting of debugging Environment Response Speed Tab Note When the clock up mode is used the operating frequency is changed automatically at breaking If the failure is caused by changing the operating frequency disables the clock up modes Ifa break occurs immediately after changing the system clock mode by the user program no clock up is performed during oscillations stabilization wait state Clock up will be performed when oscillations are stabilized Main Clock Oscillation 94 The MB2146 09 and communication speed of user system change by the operation frequency of the target MCU The setting of the main clock oscillation Fcp is required to calculate the operating speed of the target MCU The default is the maximum frequency that specified MCU operates in the main clock Also this setting is performed at the setup wizard 2 3 2 Programming to Flash ROM area This emulator supports programming to the Flash ROM area E Erasing Programming Flash ROM Writing to Flash ROM code break software break functions are supported The content of Flash ROM area is secured in the buffer within the debugger and the content of the buffer is referred at reading writing Writing to Flash ROM is automati
Download Pdf Manuals
Related Search
Related Contents
PIPER I.C.C. user`s manual manuel de mode d`emploi betriebsanleitung Numark Industries DM900EX User's Manual Supersport SE (all models) Operating Instructions and Owner's Manual de usuario para la presentación telemática de MindView 6 PDF InLine TAE-F 10m as a PDF 取扱説明書(PDF版) Copyright © All rights reserved.
Failed to retrieve file