Home

F MC-8L/8FX FAMILY USER`S MANUAL

image

Contents

1. 1 1 gt 2 2 2 gt 3 Indicates 3 that if event 1 occurs at 4 1521 level 1 move 5 to level 2 and let the timer latched 7 8 T gt 1 Latch 1 1 gt 2 00m02s060ms379 0uMs Latch 2 3 gt E 00mi16s040ms650 0ps Indicate time values of timer latch 1 and timer latch 2 The time value deducting the value of the timer latch 1 from the value of the timer latch 2 represents the execution time Time is displayed in the following format 00 00s 000ms 0O00 0us 7 i i 7 minutes seconds milliseconds microseconds 81 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 1 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 multi trace 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 overwr
2. tenerent 134 2 4 2 Erasing Programming FLASH Memory ccccceeceeeeeececeeeeeaeececaeeeeaaaeseeeeeesaeeeseaeeeseaeeeseaeeees 135 2 4 8 Notes on Executing Program esser 137 2 4 4 FEASH SecUrity e te ete hie AN tee 138 2 4 5 Notes on Starting Stopping Debugger 139 2 4 6 lir wc ian hin niet edi ee A Aiea atin ie Ma 141 2 4 6 1 Gode Bte k ibt peo t Hes Ug a EROR benedeni 142 246 2 Forced Break eese ede eeu tet dete Pee derat E dee Ya eene cba dee eue ne th 143 2 5 Monitor Debugger tene nti E Ee Ee E e Pe tee Ce refe Eee tuve te e deed ee petto 144 2 5 1 Wsing the ELASE APC sec ui cte te tet a i ER p Ph Re DO dees 145 2 5 2 Points to Note when Executing Programs sss eene enne 146 2 5 8 cre M r 147 2 5 9 1 Gode Break ee pet eund pee edet Wi eee et 148 2 5 3 2 Forced Break Sha is Gees 149 INDEX tou detinuit Doc esos Ghia faint ever A 151 vi CHAPTER 1 BASIC FUNCTIONS This chapter describes the basic functions on the SOFTUNE Workbench 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 12 1 13 1 14 1 15 1 16 Workspace Management Function Project Manag
3. Sequencer Enable levell level2 level3 level4 level5 level6 level7 level8 1 i 2 N N gt end Indicates 4 move to level Indicates terminating 5 sequencer when event 2 occurs at level 2 2 when event 1 occurs at 6 level 1 T T gt 1 Latch 1 gt i E et 5 N 1 v ii gt SHOW SEQUENCE 2 level no 2 Indicates move to level 1 TON pasgscount anti when 300 us passed before event 2 occurs at level 2 2 1 enable timer 00 00 000 300 000 enable 1 75 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 6 2 Break by Sequencer A program can aborts program execution when the sequencer terminates This break is called a sequential break E Break by Sequencer A program can aborts program execution when the sequencer terminates This break is called a sequential break As shown in Figure 2 2 9 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 9 Operation when sequencer terminates
4. On the Fly Reading Memory On the Fly 127 On the fly On the fly Executable Commands 53 116 Read Write Memory while On the fly 54 Reading Trace Data On the fly in Single Trace 94 Reading Trace Data On the fly in the Multi Trace 95 Operating Environment Operating Environment eese 22 Setting Operating Environment 47 111 132 153 INDEX Operation Mode Setting MCU Operation Mode 48 Optional Settings Example of Optional Settings 15 Options Function of Setting Tool Options 10 Setting Options sssssssne 7 14 16 TOOL Options teo es 10 Oscillation Main Clock Oscillation eese 113 Setting Main Clock Oscillation Frequency 134 Output Port V O Port Simulation Output Port 35 P Performance Buffer full Break Performance Buffer full Break 63 Performance Measurement Data Clearing Performance Measurement Data 99 Displaying Performance Measurement Data 99 Performance Measurement Function Performance Measurement Function 97 Performance Mode Event related Commands in Performance Mode RS 72 Operation in Performance Mode 71
5. gt SHOW COVERAGE SOURCE main i 70 71 int i 2 struct table value 1 6 74 for i 0 i lt 16 i j 75 value i amp target i 77 sort_val value 16L Displays access status of each source line No Access i Accessed Blank Line which the code had not been generated or is outside the s cope of the coverage measurement 104 CHAPTER 2 DEPENDENCE FUNCTIONS Displays per machine instruction specify INSTRUCTION for the command qualifier gt SHOW COVERAGE INSTRUCTION C304 sample 70 304 41 C305 F1 C306 E2 C307 E40024 C30A 81 C30B 33 C30C E1 sample c 74 C30D E40000 C310 D6FE C312 C6FE C314 E40010 C317 13 C318 FE2C sample c 75 C31A F2 C31B E40024 C31E 81 PUSHW IX MOVW A SP MOVW IX A MOVW A 0024 CLRC SUBCW MOVW SP A for i20 i lt 16 i MOVW A 0000 MOVW e X 02 A MOVW A e X 02 MOVW A 0010 CMPW A BGE C346 value i amp target i MOVW A IX MOVW A 0024 CLRC Displays access status of each source line No Access t Accessed Blank Instruction outside the scope of the coverage measurement Note With MB2141 emulator the code coverage is affected by a prefetch Note when analyzing 105 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 10 Measuring Execution Time Using Emulation Timer The timer for measuring time is called the emulation timer This timer can measu
6. Trace control Branch level number Use event number 3 Pass counter Trace control Branch level number bs Use event number 4 gt Pass counter Trace control Branch level number Use event number 5 gt Pass counter gt Trace control Branch level number Use event number 6 Pass counter Trace control Branch level number Use event number 7 Pass counter Trace control Branch level number Use event number 8 Pass counter Trace control Branch level number Timer condition Waiting time gt Trace control Branch level number Terminate sequencer Start delay count Branch to specified level 74 CHAPTER 2 DEPENDENCE FUNCTIONS Setup Examples e 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 1 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
7. 29 Section Reference Section VERTES 12 13 15 16 22 25 26 Sequencer Break by Sequencer 76 Control by Sequencer 0 0 0 eee 73 Sample Flow of Time Measurement by Sequencer 80 Setting Sequencer sss 74 Time Measurement by Sequencer 79 Trace Sampling Control by Sequencer 77 Sequential Break Sequential Break esses 60 121 Setting Setting Method 39 41 42 44 57 59 60 62 63 118 119 120 121 142 148 Simulation V O Port Simulation Input Port 35 I O Port Simulation Output Port 35 Instruction Simulation eeeeeeuesees 33 Interrupt Simulation eeeeeeeeeeese 36 Low Power Consumption Mode Simulation 38 Memory Simulation 0 0 0 eee sees eee e 34 Reset Simulation eee e neaei essen 37 Simulation Memory 34 Simulation Range sss 32 Simulator Simulator Debugger eee ees 23 32 Simulator Debugger Simulator Debugger sess 23 32 Single Trace Frame Number and Step Number in Single Trace 84 Function of Single 83 Reading Trace Data On the fly in Single Trace
8. 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 B 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 Build file 9 FILE Load module file LOADMODULEFILE Project file PRJFILE Workspace file WSPFILE Project directory PRIJPATH 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
9. approx approx As user program halts are performed at 1ms intervals fixed user program execution operates as shown in the figure below during monitoring 127 CHAPTER 2 DEPENDENCE FUNCTIONS Accordingly the total halt time for the user program when reading four bytes is as follows Example Reading four bytes at an operating frequency of 16MHz Number of user program halts 4 2 4 12 Total user program halt time 90 x 12 1080 us Execution time after break 1ms fixed Halt time Program execution Note The following restrictions apply to the monitoring function on the MB2146 09A 1 As this function performs a pseudo on the fly memory read the execution halt time may become long if large areas of memory are read via a memory window watch variables or similar 2 This function reads memory data using byte access Accordingly when monitoring data that uses word size access the timing for reading the upper and lower bytes will not be simultaneous and this may result in the display value being different to the actual value 128 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 8 Measuring the Number of Execution Cycles The additional debugging functions on the MB2146 09A include a function for measuring the number of program execution cycles E Measured Data This function measures the number of program execution cycles Two values are displayed the number of execution cycles
10. 2 2 4 4 Guarded Access Break A guarded access break aborts a executing program when accessing in violation of the access attribute set and accessing a guarded area access disabled area in undefined area E Guarded Access Breaks A guarded access break aborts a executing program when accessing in violation of the access attribute set by using the Setup Memory Map menu and accessing a guarded area access disabled area in undefined area Guarded access breaks are as follows 1 Code Guarded An instruction has been executed for an area having no code attribute 2 Read Guarded A read has been attempted from the area having no read attribute 3 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 execution aborted Break at Address by guarded access code read write at Access Address 61 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 5 Trace Buffer full Break This function aborts the program execution when the trace buffer becomes full E Trace Buffer full Break This function aborts the program execution when the trace buffer becomes full When the trace buffer full break occurs the following message appears at the status bar Break at address by trace buffer full E Setting Method Set the trace buffer full break as follows Command SET TRACE BREAK Refer to SET
11. Performance measurement timer Table 2 2 2 shows the minimum measurement time length of each timer when 1 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 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 SETTIMERSCALE Sets minimum measurement unit for timers SHOW TIMERSCALE Displays status of minimum measurement unit setting for timers Example gt SET TIMERSCALE 100N gt SHOW TIMERSCALE Timer scale 100ns gt 52 CHAPTER 2 DEPENDENCE FUNCTIONS 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 occurs 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 exec
12. Tracing terminates Tracing terminates Break Sequential break Sequencer Delay Count ends terminates counter Not break 76 Examples of Delay Count Setups 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 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 6 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 10 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 10 Trace Sampling Control 1 Resume Start Suspend Resume Suspend Suspend Lo d As shown in Figure 2 2 11 trace sampling can be disabled during the period from the start of a program execution until the first condi
13. 6 Customize Build Function 7 Bus Cycles Display All Bus Cycles Specify CY CLE 92 C C Language Notes on Symbols of C Language 30 Specifying Variables of C Language 30 Clock Main Clock Oscillation eesses 113 Setting Main Clock Oscillation Frequency 134 Clock up Mode Clock up Mode 112 Setting Clock up Mode esee 133 Code Break Code 41 57 118 142 148 151 INDEX Code Break Settings when Using Step Execution 146 Commands Commands for External Probe Data 108 On the fly Executable Commands 53 116 Coverage Coverage Measurement Function 102 Coverage Measurement Operation 102 Coverage Measurement 102 Displaying Coverage Measurement Result 103 Measuring 103 Setting Range for Coverage Measurement 103 Customize Customize Build Function cccccccccsseeeeeeeseeeees 7 D Data Break Data 42 59 119 Debug Debug the 140 Debugger Emulator Debugger 23 46 109 131 Monitor Debugger eeeeeeeeeeess 23 144 Simulator De
14. 94 Setting Single Trace esse eee 85 Source Line Units Display in Source Line Units Specify SOURCE n ETE 93 Standard Editor Standard Editorii iecur dean 13 Standby Mode Break at Standby Mode 126 137 Step Number Frame Number and Step Number in Single Trace 84 Storage Information Displaying Trace Data Storage Information 124 Storage Status Displaying Trace Data Storage Status 90 STUB Outline of STUB Function usus 39 Subproject SUbprO Ject z ede aa i 2 Symbol Setting Symbol Information 27 Specifying Symbol and Search Procedure 29 Symbols Notes on Symbols of C Language 30 Types of Symbols 27 Syntax SYNAR rooden riasa iaaiiai riakina is 11 T Time Measurement Sample Flow of Time Measurement by Sequencer EE E 80 Time Measurement by 79 Timer Minimum Measurement Unit Setting Timer Minimum Measurement Unit 52 Tool Options Function of Setting Tool Options 10 LOO Options t eese ertet 10 Trace Trace Guide on aie T UE ene EIER 123 Trace Sampling Control by Sequencer 77 Trace Buffer T race B ffer iore n kr eet n 82 Trace Buffer full Break Trace Buffer ful
15. E Display Format of Trace Data There are two types of display format for the trace buffer Display instruction execution only Display instruction Display the instruction execution in disassembly unit 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 Note 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 124 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 5 2 Saving Trace Data The debugger has function of saving trace data E Saving Trace Data Save the trace data to the specified file For details on operations refer to Sections 3 14 Trace Window and 4 4 8 Trace of SOFTUNE Workbench Operation Manual and Section 4 22 SHOW TRACE of SOFTUNE Workbench Command Reference Manual 125 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 6 Notes on Executing Program This emulator notes the following points E Break at Standby Mode When the abort operation is executed in the stand
16. Line Assembly uere ne a donee 26 Line Number Line Number Information sssssss 28 Low Power Consumption Mode Low Power Consumption Mode Simulation 38 M Macro Examples of Macro 20 7 17 Macros RT ER 17 Main Clock Oscillation Main Clock Oscillation sssese 113 Setting Main Clock Oscillation Frequency 134 Make Make Function i e itte rrr ieri 6 MCU Setting MCU Operation Mode 48 Measurement Conditions Measurement Conditions sss 129 Measurement Range How to Extend the Measurement Range 129 Measurement Result Clearing the Measurement Result 130 Displaying the Measurement Result 129 Memory Access Attributes for Memory Areas 50 Functions for Memory Operations 24 Memory Area Access Attributes 34 Memory Area 49 Memory Simulation 34 Read Write Memory while On the fly 54 Reading Memory On the Fly 127 Simulation Memory 34 Memory Map Creating and Displaying Memory 50 INDEX Minimum Measurement Unit Setting Minimum
17. 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 function again CHAPTER 1 BASIC FUNCTIONS 1 4 1 Customize Build Function This section describes the SOFTUNE Workbench to set the Customize Build function BB 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
18. 1 BASIC FUNCTIONS ciissiiciseccsicniniaiscstincinnecnsiecasennsenanstiuarsnnvicsenwioweseendeanieasass 1 1 1 Workspace Management Function sess nennen 2 1 2 Project Management Function sse eene en nnns nennen innen tenni nnn tenens 3 1 3 Project Dependence uicina indien ee asl Dude des 5 1 4 Make B lldF nctlorn s ire ettet rh Een creen dep En AE 6 1 4 1 Customize Build senten entis entren 7 1 5 Include Dependencies Analysis Function sessseseeeeneeeennneenen nnm nennen nnne 9 1 6 Functions of Setting Tool Options sess nnne 10 1 7 Error dump Function vienee urarii eee eae eee oe eee ene ee areca p eee ele ees 11 1 8 Editor Functions eie DH DNI RR 13 1 9 Storing External Editots 2 p a ER oH PH det ie REEL datu duties 14 140 Storing External TOOlS Ce rettet e Eh DL de recette esie ee Ra 16 1 141 Macro Descriptions Usable in Manager sssssseene nennen nennen nennen 17 1 12 Setting Operating Environment set nnns senten sinis senten 22 1213 Debugger Ty POS Rr 23 1 14 Memory Operation Functions sse seen ennemis 24 iS Register Operation
19. BGM adapter and MCU board Function to measure the number of execution cycles Monitoring function 2 3 Certain commands remain available while the user program is running See 2 3 3 On the Fly Executable Commands The table below lists the different combinations of BGM adapter and MCU board that can be used with the emulator debugger 109 CHAPTER 2 DEPENDENCE FUNCTIONS Table 2 3 1 Debug Functions for Different BGM Adapter and MCU Board Combinations MCU Board Additional Debug Previous Up to V30L29 Version No 1 Functions Debug Functions BGM Adapter MB2146 301A MB2146 302A MB2146 303A 02B and later Available Available MB2146 09A MB2146 301A MB2146 302A MB2146 303A O1A Not available Available MB2146 301A MB2146 302A MB2146 303A 02B and later Not available Not available 2 MB2146 09 MB2146 301A MB2146 302A MB2146 303A 01 Not available Available 1 The version number of the MCU board is shown on a sticker affixed to the board 2 The MCU board version 02B and later cannot be connected to the old BGM adapter MB2146 09 Note One of the following error messages will be displayed when the debugger starts if the BGM adapter and MCU board combination is not correct In this case the debugger will not be able to run 1 Compatibility error Please turn off the power immediately and check the connection 2 Emulator hardware error Please turn
20. MCU board is incorrect one of the following error messages appears at the startup of the debugger and the debugger cannot be started Consistency error Turn off the power immediately and check the connection Hardware error in the emulator Turn off the power immediately and check the connection For details of the error messages refer to Appendix B Debugger Related Error Messages in the SOFTUNE Workbench Command Reference Manual 131 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 1 Setting Operating Environment This section explains the operating environment setup E Setting Operating Environment For this debugger it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time e Clock up mode Main clock oscillation frequency 132 2 4 1 1 CHAPTER 2 DEPENDENCE FUNCTIONS Clock up Mode For this debugger it is necessary to set the clock up mode E Setting Clock up Mode Notes The communication speed of MB2146 08 and the user system changes depending on 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 For this reason a function called clock up mode is used to optimize the communica
21. Only Instruction Execution Specify INSTRUCTION 93 SOURCE Display in Source Line Units Specify SOURCE INDEX A Access Attributes Access Attributes for Memory Areas 50 Memory Area Access Attributes 34 Active Project Active ProJect et telis 2 Active Project Configuration eus 4 Additional Debugging Functions Additional Debugging Functions 109 Assembly Line Asseimblyz 2 e ere tenete tein 26 B Break Break at Standby Mode 126 137 Break by 76 Break Functions 40 56 117 141 147 Code 41 57 118 142 148 Code Break Settings when Using Step Execution Hiri eit tien Ae at ine 146 Data Break cccccsseceseeceeeeaseceeeeeans 42 59 119 Forced Break 45 64 122 143 149 Monitoring Data 120 Notes on Instruction Execution Break 57 Performance Buffer full Break 63 Sequential Break 60 121 Specify Performance Buffer Full Break 98 Trace Buffer full Break 44 62 Breaks Guarded Access Breaks 43 61 Build Build Function
22. Performance Buffer Full Break Specify Performance Buffer Full Break 98 Port VO Port Simulation Input Port 35 Port Simulation Output Port 35 Program Executing Program 99 Programming Erasing Programming FLASH Memory 114 135 Project Active Projeti uet 2 Active Project Configuration eese 4 ProJecteza oe cu etre din te etm ins 2 Project Configuration eese 4 Project 5 Project format titii 3 Project Management Function 3 Project Configuration Active Project Configuration cee 4 Project Configuration esses 4 Projects Restrictions on Storage of Two or More Projects bs see a SEN RN ARA ED 2 154 R Reference Reference Section 12 13 15 16 22 25 26 Register Register 25 Reset Reset Simulation cccccccceecceeeeeceeeeeeeeeeeeeeeeaaes 37 S Sample Flow Sample Flow of Time Measurement by Sequencer D MM TE 80 Sampling External Probe Sampling Timing 107 Trace Sampling Control by Sequencer 77 Scope SCOPE 29 Search Procedure Specifying Symbol and Search Procedure
23. RUE PAR C Ee MR 64 2 2 5 Events x see either ee MINIS ALD 65 2 2 5 1 Operation in Normal Mode sse nnne n enn sistit eres nennen nenne 67 2 2 5 2 Operation in Multi Trace Mode sssssssssssseseeeeennee nennen nnne nennen nnns nnne 69 2 2 5 3 Operation in Performance Mode 71 2 2 6 Control by Sequencers ie eee tte i te Det eh ieee 73 2 2 6 1 Setting SEQUENCER ia 74 2 2 6 2 Break Sequencer Saeed Ati a onda 76 2 2 6 3 Trace Sampling Control by 5 2 2 2 nenne 77 2 2 6 4 Time Measurement by Sequencer sssssssssssssseseeee eene nennen enne nnns entren 79 2 2 6 5 Sample Flow of Time Measurement by Sequencer ssssssssseeeeeennn 80 2 2 7 RHeabtime TIace eae ced sata em teinte e tede nex ed aad aad ied ned 82 2 211 Single Traces disce edades oie tbe beta enm nd 83 2 27 2 Setting Single ACC done rea e aoo dac et dete eee Ya ec RARE cd de E Yee HI au pes BERT ede ORT Vado 85 2 2 7 3 Trato EE 87 2 2 7 4 Setting Multi 89 2 2 7 5 Displaying Trace Data Storage Status 90 2 2 7 6 Specify Disp
24. TRACE in SOFTUNE Workbench Command Reference Manual Dialog Trace setting dialog Refer to 4 4 8 Trace in SOFTUNE Workbench Operation Manual 62 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 6 Performance Buffer full Break It is a function to abort the program execution when the buffer for the performance measurement data storage becomes full BB Performance Buffer full Break It is a function to abort the program execution when the buffer for the performance measurement data storage becomes full When the performance buffer full break occurs the following message appears at the status bar Break at address by performance buffer full E Setting Method Set the performance buffer full break as follows Command SET PERFORMANCE BREAK Refer to SET PERFORMANCE in SOFTUNE Workbench Command Reference Manual Dialog Performance setting dialog Refer to 4 4 13 Performance in SOFTUNE Workbench Operation Manual 63 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 7 Forced Break This function forcibly aborts the program execution to generate a break E Forced Break This function forcibly aborts the program execution to generate a break When the forced break occurred the following message appears at the status bar Break at address by command abort request Note The forced break cannot be generated when the MCU in the low power consumption mode or in the hold state If the MCU is in the low power consumption
25. This section describes the functions of the monitor debugger for the F MC 8FX family Bi Monitor Debugger The monitor debugger works by incorporating a monitor program into the target system which provides debugging functions via communication with a host computer Before it can be used the monitor program must be ported to the target hardware Refer to the Appendix E Incorporating the Monitor Debugger of SOFTUNE Workbench Operation Manual for details Note The BGM adapter MB2146 09A is required to use the monitor debugger The monitor debugger cannot be used with the old BGM adapter MB2146 09 Attempting to use the old BGM adapter MB2146 09 as a monitor debugger may cause a system fault 144 CHAPTER 2 DEPENDENCE FUNCTIONS 2 5 1 Using the FLASH Area The monitor debugger supports writing to the FLASH area E Using the FLASH Area The monitor debugger writes to the FLASH area Writing is only performed when loading the file The following dialog is displayed while writing to the FLASH area Processing B Error Message if Loading Fails The following error messages may be displayed depending on the content of the file being loaded to the FLASH area Refer to Appendix B Debugger Related Error Messages in the SOFTUNE Workbench Command Reference 1 If access to the FLASH area occurs other than for loading The FLASH area can only be accessed by the LOAD command 2 If a file that includes ROM o
26. Trace Buffer tulliBreak permet 44 2 1 8 5 FORO Break uei deste tent a e UNE dap Baa Da ense x RES RIA i eid Ped 45 2 2 Emulator Debugger MB2141 sssssssssssssseeeseeee eene enne en nnne n nennen nnns 46 2 2 1 Setting Operating Environment 47 2 2 1 1 MCU Operation i educ uae eee ee 48 2 2 1 2 Meno Area Types aiuti date eam e io tede e Det e tet etes 49 2 2 1 3 Memory Mapping s ote duet opea renati ee 50 2 21 4 Timer Minimum Measurement Unit 52 2 2 2 On the fly Executable Commands sse nnn enne 53 2 2 8 On the fly Memory ACCESS ssssssssseessssenee innen 54 2 2 4 Break 56 2 2 4 1 Gode Break c RE Et ti n brass 57 2 2 4 2 Data Break eie eed idle vee Pep dece nde deu SU ne dev ne egentes 59 2 2 4 3 Sequential Break eda pact t d nit ed d E at dista 60 2 2 444 G arded Access Break ieu ica gts ip ede eet a cu ege th dive dne denda 61 2 2 4 5 Trace Buff r tull Break teretes tete tre aa ideal 62 2 2 4 6 Performance Buffer full Break sss nennen ener nennen nnne 63 2 2 4 7 Forced Break ecc eee ple tutu tds ede ta oce ERU ye ET
27. 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 i e 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 semiconductor devices have 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 e Exportation release of any products described in this document may require necessary procedures in accordance with the regulations of the Foreign Exchange and Foreign Trade Control Law of Japan and or US export control laws The company names and brand names herein are the trademarks or registered trademarks of their respective owners Copyright 2004 2008 FUJITSU LIMITED All rights reserved CONTENTS CHAPTER
28. 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 VERIFY Dataload 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 54 CHAPTER 2 DEPENDENCE FUNCTIONS Figure 2 2 3 On the fly Access to Mirror Area Memory read Executing Emulation memory command I Mirror setting Reflected MCU Memory access operation lt lt gt User memory Operating Note Memory access by a bus master other than the MCU is not reflected in the mirror area 55 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 Break This Debugger provides seven types of break functions When by each break function aborts program execution the address where a break occurred and the break factor are displayed E Break Functions This Debugger provide
29. condition at each level met Timer setup foreach Select event number causing condition trigger at each level set z pass count value When count ends When count ends Instructing Moy is suspend operation Fi 1 SHOW SEQUENCE ALL SHOW DELAY SET DELAY Events When condition met Delay counter A SET s SEQUENCE EVENT a CANCEL DISABLE EVENT SEQUENCE EVENT ENABLE EVENT SHOW EVENT 67 CHAPTER 2 DEPENDENCE FUNCTIONS 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 68 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 SET TRACE SHOW TRACE SEARCH TRACE ENABLE TRACE DISABLE TRACE CLEAR TRACE Sets delay count Displays delay count setup status Sets trace buffer full break Displays trace data Searches trace data Enabl
30. directory of load module file Es Passed as extension of load module file 2 Passed as directory of project file Passed as main file name of project file 5 Table 1 11 2 List of Macros that be Specified 2 Parameter Meaning FILE Passed as full path name of file nl LOADMODULEFILE Passed as full path name of load module file 2 PRJFILE Passed as full path name of project file WSPFILE Passed as full path name of workspace file 3 9c PRJPATH Passed as directory of project file 2 ABSPATH Passed as directory of target file OBJPATH Passed as directory of object file 2 LSTPATH Passed as directory of list file PRJCONFIG Passed as project configuration name Environment variable value specified in environment variable ENV Environment variable brackets iapassed TEMPFILE Temporary file is created and its full path name is passed s CHAPTER 1 BASIC FUNCTIONS 1 The macros are determined as follows Customize build 1 Source file 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 the SRC tab of project window and valid file name is selected 2 File on which focus is in internal e
31. 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 Multi trace sampling terminates when the trace buffer becomes full At this point a executing program can be allowed to break if necessary Figure 2 2 14 Multi Trace Sampling Start execution Event 1 Event 2 Event 3 L WE NN NB Block Program flow Multi Trace Frame Number Sixteen frames of data are sampled each time an event occurs This data unit is called a block and each sampled block is numbered starting from 0 This is called the block number A block is a collection of 8 frames of sampled data before and after the event trigger occurs At the event trigger 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 15 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 1 to 32768 See Figure 2 2 15 To specify which frame data is displayed use the global number or block and local
32. 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 B 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 than them CHAPTER 1 BASIC FUNCTIONS Table 1 11 1 List of Macros that can be Specified 1 Parameter Meaning Passed as full path name of file Passed as main file name of file Passed as directory of file Passed as extension of file Passed as full path name of load module file Passed as main file name of load module file Passed as
33. 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 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 48 CHAPTER 2 DEPENDENCE FUNCTIONS 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 set 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 Q 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
34. status cannot be specified concurrently with other status 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 SHOW EVENT CANCEL EVENT ENABLE EVENT DISABLE EVENT Sets event Display event setup status Deletes event Enable event Disable event 65 CHAPTER 2 DEPENDENCE FUNCTIONS 66 Example gt SET EVENT 1 funcl gt SET EVENT WRITE 2 data 2 d h 10 gt SET EVENT MODIFY 3 102 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 Multi Trace Mode Event triggers are used for multitracing trace function that samples data before and after event trigger Occurren
35. terminated The Output window must not be used with a tool using a wait state for user input while the tool is executing The user can not perform input while the Output window is in use so the tool cannot be terminated To forcibly terminate the tool select the tool on the Task bar and input Control C or Control Z CHAPTER 1 BASIC FUNCTIONS 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 Dependencies menu 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 menu 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 exe
36. to do with the above settings Example gt gt SET SAMPLING INTERNAL gt gt SHOW SAMPLING sampling timing internal channel 76543210 11110111 107 CHAPTER 2 DEPENDENCE FUNCTIONS 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 bit7 Violet and the LSB is at bitO Black The bit represented by 1 means HIGH while the 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 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 108 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 Emulator Debugger MB2146 09 MB2146 09A This sectio
37. 3 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 demo3 c 147 struct st dat 00071 demo3 c 152 ackdat 5 00082 demo3 c 153 nckdat ackdat 00086 demo3 c 154 for 0 0 j lt numdt 1 j gt 93 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 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 94 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 TRCSTAT Tracing terminates when the delay count ends after the sequencer has 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 TRCSAMP To read trace data use the SHOW TRACE command to search trace data use the SEARCH TRACE command Use the SET DELAY command to set the delay count and break operation after the delay count Example gt GO gt gt SHOW TRACE STATU
38. 6 F001 Do 00003 00005 F002 45 MOV 60 A 00004 00004 F003 60 ext probe lvl 11111111 1 11111111 1 11111111 1 11111111 1 95 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 9 Saving Trace Data The debugger has function of saving trace data E Saving Trace Data Save the trace data to the specified file For details on operations refer to Sections 3 14 Trace Window and 4 4 8 Trace in SOFTUNE Workbench Operation Manual and Section 4 23 SHOW TRACE in SOFTUNE Workbench Command Reference Manual 96 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 8 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 number are combined as follows Four intervals have the followin
39. Break ADDC EP ADDC ADDC A ADDCW A AND AND AND A ANDW A CALLV n A eEP CMPW DAS DEC Ri DECW A DECW EP DECW IX DECW SP DIVU A INC Ri INCW A INCW EP INCW IX INCW SP MOV A T MOV EP A MOV A A MOV EP MOV MOV Ri A MOW MOVW eA MOVW A eEP MOVW A EP MOVW A IX MOVW A PC MOVW A PS MOVW SP A MOVW A MOVW PS A MOVW SP A MULU A OR EP OR OR ORW POPW A POPW IX PUSHW A PUSHW IX ROLC A RORC A SUBC A EP SUBC Ri SUBC A SUBCW A SWAP XH XCHW EP XCHW A IX XCHW SP XCHW XOR EP XOR XOR A XORW A 57 CHAPTER 2 DEPENDENCE FUNCTIONS 58 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 of the next instruction when executed Instructions when the instruction execution break is set are just prefetched but not executed RET RETI 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 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 2 Data Break This function aborts the program execution when a data access read write is made to a specified address while executing a program E Data Break
40. DUE EENEN E cp E total 452 101 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 9 Measuring Coverage This emulator has the CO coverage measurement 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 il 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 102 The following operation can be made in cover
41. FLASH Memory Writing to FLASH memory code break software break functions are supported The content of FLASH memory area is secured in the buffer within the debugger and the content of the buffer is referred at reading writing Writing to FLASH memory is automatically performed prior to executive operation or reset processing The programming to FLASH memory can be also performed manually The following dialog is displayed at writing to FLASH memory x Downloading the flash memory 5 Main commands that cause writing to FLASH memory include SET MEMORY SET BREAK LOAD FILL MOVE ASSEMBLE There are the following three functions for the operation of FLASH memory 1 Updating FLASH memory Environment FLASH area control Download FLASH memory menu Updates Flash memory Normally Flash memory is updated automatically before performing execution or reset processing and before stopping the debugger 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 FLASH memory 135 CHAPTER 2 DEPENDENCE FUNCTIONS 2 Synchronizing FLASH memory Environment FLASH area control Synchronize FLASH memory menu Synchronizes FLASH memory and the buffers within the Debugger Be sure to perform this synchronization when FLASH memory is rewritten by the user program or the content of th
42. FUJITSU SEMICONDUCTOR CONTROLLER MANUAL CM25 00324 3E F MC 8L 8FX FAMILY workbench USER S MANUAL FUJITSU F MC 8L 8FX FAMILY workbench USER S MANUAL FUJITSU LIMITED PREFACE E What is the SOFTUNE Workbench SOFTUNE Workbench is support software for developing programs for the F MC 8L 8FX family 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 Note F2MC stands for FUJITSU Flexible Microcontroller 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 B Trademarks SOFTUNE is a trademark of FUJITSU LIMITED Windows is registered trademarks of Microsoft Corporation in the U S and other countries Other company names and products names are trademarks or registered trademarks of their respective companies 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 FUNCTIONS This chapter describes the functions dependent on F MC 8L 8FX family MCU The contents of this document are subject to change without notice Customers are advised
43. Measurement Unit for Timer EET 98 Mode Break at Standby Mode 126 137 Clock up Mode 112 Event related Commands in Multi Trace Mode 70 Event related Commands in Performance Mode ur 72 Low Power Consumption Mode Simulation 38 Operation in Multi Trace Mode 69 Operation in Normal Mode 67 Operation in Performance Mode 71 Setting Clock up Mode esseeeeeee 133 Setting Event 98 Setting MCU Operation Mode 48 Monitor Monitor Debugger 23 144 Monitor Debugger Monitor Debugger eeeeeeeeeeeess 23 144 Monitoring Halt Time During Monitoring 127 Monitoring Data Break Monitoring Data Break uueuuesse 120 Multi Trace Multi Trace Frame Number ss 87 Multi Trace Function eeeeeeeeeene 87 Reading Trace Data On the fly in the Multi Trace PE 95 Setting Multi 89 Multi Trace Mode Event related Commands in Multi Trace Mode DEPT 70 Operation in Multi Trace Mode 69 N Normal Mode Event related Commands in Normal Mode 68 Operation in Normal Mode 67
44. NT SHOW EVENT CANCEL EVENT ENABLE EVENT DISABLE EVENT Function Sets event Displays event setup status Deletes event Enables event Disables event SET PERFORMANCE SHOW PERFORMANCE CLEAR PERFORMANCE Sets performance Displays performance setup status Clears performance measurement data CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 6 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 Tabl
45. S 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 E Reading Trace Data On the fly in the Multi Trace CHAPTER 2 DEPENDENCE FUNCTIONS 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 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 block no 1 00001 00007 F000 04 MOV A 55 00002 0000
46. SOFTUNE CHAPTER 1 BASIC FUNCTIONS 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 Setup Development Environment menu Q 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 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 automatic
47. T Disables event Multi Trace Mode SET MULTITRACE Sets trace buffer full break SHOW MULTITRACE Displays trace data SEARCH MULTITRACE Searches trace data ENABLE MULTITRACE Enables trace function DISABLE MULTITRACE Disables trace function CLEAR MULTITRACE Clears trace data 70 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 5 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 il 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 7 Operation in Performance Mode SHOW PERFORMANCE STATUS A SET EVENT i SET PERFORMANCE CANCEL EVENT Buffer full break control Instructing MCU to suspend operation Enable Limited to following combinations 1 2 3 4 5 6 7 8 Events Performance measurement DISABLE EVENT CLEAR PERFORMANCE ENABLE EVENT Y Y SHOW PERFORMANCE SHOW EVENT 71 CHAPTER 2 DEPENDENCE FUNCTIONS 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 72 Usable Command SET EVE
48. This function aborts the program execution when a data access read write is made to a specified address by MCU Up to 65535 data break points can be set for this debugger When the data break occurs the following message appears at the status bar Break at address by databreak at access address E Setting Method Set the data break as follows Command SETDATABREAK Refer to SET DATABREAK in SOFTUNE Workbench Command Reference Manual Dialog Data tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual 59 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 3 Sequential Break A sequential break is a function to abort an executing program when the sequential condition is met by event sequential control E Sequential Break A sequential break is a function to abort an executing program when the sequential condition is met by event sequential control Use a sequential break when the event mode is set to normal mode using the SET MODE command When a break occurs due to a sequential break the following message is displayed on the Status Bar Break at Address by sequential break level 2 Level No Refer to 2 2 6 Control by Sequencer for details of the sequential break function E Setting Method The sequential break is controlled by the following method 1 Set event mode SET MODE 2 Setevents SET EVENT 3 Setsequencer SET SEQUENCE 60 CHAPTER 2 DEPENDENCE FUNCTIONS
49. age measurement Load Save of coverage data LOAD COVERAGE SAVE COVERAGE Abortion and resume of coverage measurement ENABLE COVERAGE DISABLE COVERAGE Clearing coverage data CLEAR COVERAGE Canceling coverage measurement range CANCEL COVERAGE CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 9 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 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 FF00 FFFF 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 measurement result use the SHOW COVERAGE command The following can be displayed Coverage ratio of total measurement area Displaying coverage ratio of load module Summary of 16 addresses as one block Details indicating access status of each address Displaying coverage measurement result per source line Displaying coverage measu
50. al 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 SRC tab of 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 If a focus is on the SRC tab of 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 If no 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 is not given double quotes CHAPTER 1 BASIC FUNCTIONS 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 E Example of Optional Settings Table 1 9 2 Parameters Used in Option Setups For External Editors Editor name Argume
51. ally saves the workspace without any confirmation message e 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 BB Reference Section Development Environment Note 22 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 CHAPTER 1 BASIC FUNCTIONS 1 13 Debugger Types This section describes the types of SOFTUNE Workbench debuggers E Type of Debugger SOFTUNE Workbench integrates three types of debugger a simulator debugger emulator debugger and monitor debugger Any one can be selected depending on the requirement E Simulator Debugger 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 sys
52. and Setting External Probe Data foa wenns ii oer c pone 108 External Probe Sampling Timing 107 Sampling by External Probe 107 External Tools External Tools 16 F FLASH Using the FLASH Area 145 FLASH Memory Erasing Programming FLASH Memory rm 114 135 FLASH Security FLASH Secutity 2 2 138 Forced Break Forced Break 45 64 122 143 149 Format Display Format of Trace Data 124 Frame Number Frame Number and Step Number in Single Trace cM LECT 84 Multi Trace Frame Number 87 Frame number Frame number 22 eren eerie 123 G Guarded Access Breaks Guarded Access 48 61 Port Port Simulation Input Port 35 Port Simulation Output Port 35 Include Dependencies Analyzing Include Dependencies 9 Input Port I O Port Simulation Input Port 35 Instruction Display in Only Instruction Execution Specify INS TRUCTION 93 Instruction Simulation eese 33 Instruction Execution Break Notes on Instruction Execution Break 57 Interrupt Interrupt Simulation esee 36 L Line Assembly
53. and function names the symbol is searched However when only the symbol name is specified the search is made as follows 1 Local symbols within function in Current Scope 2 Static symbols within module in Current Scope 3 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 Variables of C Language Variables of C language can be specified using the same descriptions as in the source program written in C language E Specifying Variables of C Language Variables of C language can be specified using the same descriptions as in the source program The address of variables of C language 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 Specifying Variables Semantics Example of Variables Value of data Regular Variable int data Pointer char p Value pointed to by p Value of second element of a Array char a 5 struct stag char c int 1 E struct stag st struct stag stp Value of member c of st Value of member c of the structure to which stp poi
54. arget power on E Cancel When OK is selected the startup of the debugger is retried When Cancel is selected the debugger stops This debugger cannot be started unless the clock is in the normal state Therefore if an abnormality is detected at startup of the debugger the following dialog will appear Softune896 X CR trimming has been detected Do you want to continue debugging E Mo When Yes is selected the startup of the debugger is retried When is selected the debugger stops 139 CHAPTER 2 DEPENDENCE FUNCTIONS E Debug the End The software break which is set in the FLASH memory during debugging must be erased before the debugging ends considering that the MCU may be used standalone after the debugger stops Therefore the FLASH memory should be updated for each sector to which the software break is set The time required depends on the setup conditions of the software break Note When a software break is set standalone operation cannot be guaranteed under the following conditions Operation is aborted while the FLASH memory is being updated upon completion of debugging Workbench ends abnormally during debugging Hardware connection is disconnected during debugging 140 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 6 Break This Debugger provides two types of break functions When by each break function aborts program execution the address where a break occurred and the b
55. art displaying from frame 500 Global number Displaying block number 2 Display from frame 5 to frame 5 of block number 2 91 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 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 multi trace 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 e Display in all bus cycles Specify CYCLE e 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 frame for sequencer executed at trace F rame number 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 displayed Hexadecimal Binary Frame number ext probe lvl global number 11111111 1 Signed decimal 11111111 1 11111111 1 11111111 1 emo3 c 89 00001 195 11111111 1 PUSHW IX 00000 11111111 write 11111111 write 11111111 11111111 HOLD 11111111 gt Access status Device s
56. be operated Writing to the standby control register using a command is not prohibited CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 7 STUB Function This section describes the STUB function which executes commands automatically when the breakpoint hit occurs E Outline of STUB Function The STUB function is supported so that a series of commands in the command list can automatically be executed when a specified breakpoint is hit The use of this function enables spot processing such as simple I O simulation external interrupt generation and memory reprogramming without changing the main program This function is effective only when the simulator debugger is used Break STUB processing execution Breakpoint is hit Is there a breakpoint command list Program Execution restarts Process a breakpoint command list execute commands Re execute is no break specified Execution stops execution ends E Setting Method The STUB function can be set by the following commands Dialog 1 Breakpoint Set Dialog Code tab 2 Breakpoint Set Dialog Data tab Command 1 SET BREAK 2 SETDATABREAK 39 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 8 Break This Debugger provides five types of break functions When by each break function aborts program execution the address where a break occurred and the break factor are displayed E Break Funct
57. bugger seeeeseee 23 32 Type of Debugger scere eniron 23 When Starting Debugger uses 139 Dependence Project Dependence eeeeeeeeesss 5 Disassembly Disassembly nte tite 26 E Editor External Editor 20e ees 14 Standard Editor 13 Emulation Measuring Executing Time Using Emulation Timer borne ae 106 Emulation Timer Measuring Executing Time Using Emulation Timer EUER 106 Emulator Emulator Debugger 23 46 109 131 Emulator Debugger Emulator Debugger 23 46 109 131 Erasing Erasing Programming FLASH Memory ERE 114 135 Error eee 130 Error Jump Error Jump 11 152 Error Message Error Message if Loading Fails 145 Event Event Modes ce 66 Event related Commands in Multi Trace Mode rr 70 Event related Commands in Normal Mode 68 Event related Commands in Performance Mode Lee vee Seite aoe Teed 72 Event Mode Setting Event Mode esee 98 Event Modes Event Modes eec euet aene are oa uda era 66 Events Setting Events ee 65 99 External Editor External Editor ngii n Ra aaiae ia 14 External Probe Commands for External Probe Data 108 Displaying
58. by mode the debugger cancels the standby mode and aborts the execution Therefore it is aborted in next address of instruction to be transmitted to the standby mode 126 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 7 Memory Access On the Fly The additional functions available on the MB2146 09A include a monitoring function which can read memory on the fly E Reading Memory On the Fly The additional functions for the BGM debugger include a monitoring function which can read memory on the fly while the MCU is executing E Conditions for Use This function is available if the BGM adapter and MCU board combination uses the following models or version number or later SOFTUNE Workbench Version V30L30 or later BGM adapter Model MB2146 09A MCU board Model MB2146 301A 302A 303A Version 02B or later E Halt Time During Monitoring To read data the monitoring function must temporarily halt and then restart the user program The formulas below calculate the number of times the user program is halted and the halt duration for each read operation Number of times the user program halts 4 2 x no of bytes read Total user program halt duration 2 Number of times the user program halts x Halt time i Duration of each halt This varies as follows depending on the operating frequency Fep Table 2 3 3 Operating Frequency vs Halt Duration Operating Frequency MHz Duration of Halt us approx approx approx
59. 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 49 CHAPTER 2 DEPENDENCE FUNCTIONS 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 Access Attributes for Memory Areas The access attributes shown in Table 2 2 1 can be 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 Data Read and Instruction Execution Enabled Emulation Memory Write Data Write Enabled GUARD Access Disabled Undefined GUARD 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 u
60. ce B 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 123 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 5 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 Also the command displays by SHOW TRACE STATUS
61. ce Performance Mode Event triggers are used for performance measurement to measure time duration between two event trigger occurrences and count of event trigger occurrences CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 5 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 5 Operation in Normal Mode DISABLE TRACE SHOW TRACE STATUS SET TRACE ENABLE TRACE 4 UA Enable Disable Buffer full break SHOW TRACE DATA control control SET SEQUENCE NO TRACE SET SEQUENCE ENABLE TRACE ee ee Single trace measurement ET SEQUENCE DISABLE TRACE a adir ace SEARCH TRACE SET EVENT ub alc Qd NN lm ig Measurement ends CANCELEVENT CANCEL WR A ELI PR NE SEQUENCE TIMER SEQUENCE T SEQUENCE TIMER When each
62. cute 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 assemble options effective for specific source files The common options specified for source files for which individual options are specified become invalid 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 opti
63. declaration are in this category Local symbol within function A local symbol within a function exists only in C language A static symbol within a function and an automatic variable are in this category Static symbol 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 language 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 language also has information about which function the PC belongs to 27 CHAPTER 1 BASIC FUNCTIONS B 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 CHAPTER 1 BASIC FUNCTIONS Referring to Local Symbols This section describes referring to local symbols a
64. ditor 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 the SRC tab of 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 The macros can use only the project of the workspace project format 4 The content of a temporary file can be specified only with 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 Name of folder in which files are stored in the SRC tab of project window Can be specified only in FILE FOLDER The macros can use only the project of the workspace project format CHAPTER 1 BASIC FUNCTIONS E Examples of Macro Expansion If the following workspace is opened macro expansion is performed as follows Workspace C Wsp Wsp wsp Active project C Wsp Sample Sample prj Active project configuration D
65. ds 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 occurs Table 2 3 2 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 command window Table 2 3 2 Major Functions Executable in On the fly Mode Function MCU reset Limitations and Restrictions On the fly commands cannot be executed when executing the GO command etc from the Major Commands RESET Displaying MCU execution status SHOW STATUS Memory operation Read Write Disassembly Only when BGM adaptor MB2146 09A and the MCU board version 02B or later are used Only when BGM adaptor MB2146 09A and the MCU board version 02B or later are used EXAMINE COMPARE FULL MOVE DUMP SEARCH MEMORY SHOW MEMORY DISASSEMBLE Displaying breakpoint SHOW BREAK SHOW DATABREAK Displaying content of vector 116 Only when BGM adaptor MB2146 09A and the MCU board version 02B or later are used SHOW VECTOR 2 3 4 Break CHAPTER 2 DEPENDENCE FUNCTIONS This Debugger provides five types of break functions When by each break function aborts program execution the address where a break occurred and the break factor are displayed E Break F
66. e 2 2 8 Sequencer Specifications Function Specifications Level count 8 levels 8 event conditions 1 to 16777216 times pass count can be specified for each condition Conditions settable for each level 1 timer condition Up to 16 s in lus unit or up to 1 6 s in 100 ns units can be specified Branches to required level or terminates sequencer Operation when condition met 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 73 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 6 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 8 shows the sequencer operation Figure 2 2 8 Operation of Sequencer Start executing program Start sequencer Use event number 1 Pass counter Trace control Branch level number Use event number 2 gt Pass counter
67. e contains some project it always has one active project B 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 Projects Only one REALOS type project can be stored in one workspace CHAPTER 1 BASIC FUNCTIONS 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 custom
68. e following message appears at the status bar Break at address by databreak at access address E Setting Method Set the data break as follows Command SETDATABREAK Refer to SET DATABREAK in SOFTUNE Workbench Command Reference Manual Dialog Data tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Note When set as the monitoring data break a break does not occur as the data break 119 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 4 3 Monitoring Data Break It is a special break function to abort execution while it is corresponding to specified data when the program reaches a specified address E Monitoring Data Break It is a special break function to abort execution while it is corresponding to specified data when the program reaches a specified address The following figure shows the break conditions of the monitoring data break Figure 2 3 1 Break Conditions of Monitoring Data Break Flow of program Monitoring Data Break does not occur when data is not matching Specified address Data matching Break occurs when data is matching Specified address E Setting Method 120 Set the monitoring data break as follows Command SET BREAK DATAWATCH Refer to SET BREAK type 2 in SOFTUNE Workbench Command Reference Manual Dialog Data tab in breakpoint setting dialog Ref
69. e memory may not be referenced properly Furthermore synchronization is made automatically before starting the debugger 3 Erasing FLASH memory Environment FLASH area control Erase FLASH memory menu Erases all data in FLASH memory Note that this operation will also erase all code break software break settings 136 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 3 Notes on Executing Program The following points must be noted when executing a program using this debugger E Break at Standby Mode When the abort operation is executed in the standby mode the debugger cancels the standby mode and aborts the execution Therefore it is aborted in next address of instruction to be transmitted to the standby mode 137 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 4 FLASH Security This debugger performs a follow up operation for the FLASH security function installed in the MCU FLASH Security 138 This debugger performs a follow up operation for the FLASH security function installed in the MCU The FLASH security function manipulates the value of the security byte 1 byte area in the FLASH memory defined for each MCU to place the FLASH memory in protected state in which no debug operation other than erasing the FLASH memory is accepted so that programs and other content in the FLASH memory are undisclosed to third parties There are the following two types of detection timing to detect the protected state using
70. e 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 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 Bookmark setup function A bookmark can be set on any line and instantaneously jumps to the line Once a bookmark 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 preceding 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 functio
71. eak sampling end block no 1 to 5 frame no 00001 to 00159 enable enable 90 Trace function enabled Buffer full break function disabled Trace sampling terminates Frame 120 to 50 store data Step 91 to 22 store data Multi trace function enabled Buffer full break function disabled Trace sampling terminates Block 1 to 5 store data Frame 1 to 159 store data Global number CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 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 multi trace mode A range can also be specified Bi Specify Displaying Trace Data Position 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 multi trace mode A range can also be specified Example In Single Trace Mode gt SHOW TRACE 6 gt SHOW TRACE 6 10 In Multi Trace gt SHOW MULTITRACE GLOBAL 500 gt SHOW MULTITRACE LOCAL 2 gt SHOW MULTITRACE LOCAL 2 5 5 Start displaying from frame 6 Display from frame 6 to frame 10 St
72. ebug 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 the SRC tab of project window C Subprj Release Abs Subprj abs JA SUBPRJ abs D C Subprj Release Abs E abs FILE FOLDER Source Files Common PRJFILE C Subprj Subprj prj Focus is not in the SRC tab of project window Joa C Wsp Sample Debug Abs Sample abs 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 i C Subprj FILE RELPATH 9 FILE NAME LongNameFile FILE EXT FILE SHORTFULLNAME C Subprj LongFi 1 c FILE SHORTPATH C Subprj FILE SHORTNAME LongFi 1 PRJFILE RELPATH Subprj PRJPATH C Subprj OBJPATH C Subprj Release Obj PRJCONFIG Release ENV FETOOL CASOFTUNE TEMPFILE C Subprj Release Opt _fs 1056 TMP 20 Example Macro expansion in tool options Release configuration of Subprj project is built FILE PRJFILE RELPATH Subprj PRJPATH C Subprj OBJPATH C Subprj Release Obj PRJCONFIG 3 Release ENV FETOOL i CA
73. ement 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 project 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 workspac
74. er to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 4 4 Sequential Break A sequential break is a function to abort an executing program when it is executed in the order of level 1 and then level 2 at two specified addresses E Sequential Break A sequential break is a function to abort an executing program when it is executed in the order of level 1 and then level 2 at two specified addresses One break can be set for this debugger When the Sequential break occurs the following message appears at the status bar Break at address by hardware breakpoint E Setting Method Set the Sequential break as follows Command SET BREAK SEQUENCE Refer to SET BREAK type 3 in SOFTUNE Workbench Command Reference Manual Dialog Sequential tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual 121 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 4 5 Forced Break This function forcibly aborts the program execution to generate a break E Forced Break This function forcibly aborts the program execution to generate a break When the forced break occurred the following message appears at the status bar Break at address by command abort request 122 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 5 Real time Trace While execution a program the executed address information is sampled and stored in the trace buffer This function is called tra
75. es trace function Disables trace function Clears trace data CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 5 2 Operation in Multi Trace Mode When the multi trace mode is selected as the event mode the real time trace function becomes the multi trace function and events are used as triggers for multitracing il Operation in Multi Trace Mode Multitracing is a trace function that samples data before and after an event trigger occurrence When the multi trace mode is selected as the event mode the real time trace function becomes the multi trace function and events are used as triggers for multitracing Figure 2 2 6 Operation in Multi Trace Mode SHOW MULTITRACE STATUS SET EVENT ENABLE MULTITRACE A i i SET MULTITRACE CANCEL EVENT DISABLE MULTITRACE Enable Disable contro Buffer full break control Instructing MCU to suspend operation All enabled events generate trigger Events Multitrace measurement _ DISABLE EVENT CLEARMULTITRACE SEARCH MULTITRACE ENABLE EVENT Y Y SHOW MULTITRACE SHOW EVENT 69 CHAPTER 2 DEPENDENCE FUNCTIONS E Event related Commands in Multi Trace Mode Table 2 2 6 shows the event related commands that can be used in the multitrace mode Table 2 2 6 Event related Commands in Multi Trace Mode Usable Command Function SET EVENT Sets event SHOW EVENT Displays event setup status CANCEL EVENT Deletes event ENABLE EVENT Enables event DISABLE EVEN
76. ffer 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 CHAPTER 2 DEPENDENCE FUNCTIONS 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 99 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 8 2 Display Performance Measurement Data Display the measured time and measuring count by using the SHOW PERFORMANCE command E D
77. for the previous program execution and the total number of execution cycles up to that time The default maximum value for the measurement result is 65535 cycles E Measurement Conditions This function is available if the BGM adapter and MCU board combination uses the following models or version number or later SOFTUNE Workbench Version V30L30 or later BGM adapter Model MB2146 09A MCU board Model MB2146 301A 302A 303A Version 02B or later When this function is used the following internal resource is used by the debugger Note that this means the resource cannot be used by the user program 16 bit reload timer ch 1 E How to Extend the Measurement Range The default maximum value for the measurement result is 65535 cycles but this can be extended to a maximum of 4294967295 cycles Extending the measurement range requires that you link the relative format load module file from the following directory into the user program lt SOFTUNE installation directory gt Lib 896 EXETMR REL If using this library the following resources are also used Interrupt vector IRQI7 Interrupt handler User ROM 16 bytes Overflow counter User RAM 2 bytes OxOF7E to OxOF7F Reserved symbol name __EXETMROVRHDR E Displaying the Measurement Result The following methods can be used to display the results 1 Time measurement dialog Debug Time Measurement menu 2 SHOW TIMER command 129 CHAPTER 2 DEPENDENCE FUNCTIONS E Clea
78. g 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 97 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 8 1 Performance Measurement Procedures Performance can be measured by the following procedure Setting event mode Setting minimum measurement unit for timer Specify performance buffer full break Setting events Execute program Display measurement result Clear measurement result 98 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 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 Specify Performance Buffer Full Break When the buffer for storing performance measurement data becomes full a executing program can be broken This function is called the performance buffer full break The performance buffer becomes full when an event occurs 32767 times If the performance bu
79. ically at breaking If the failure is caused by changing the operating frequency disables the clock up modes If a 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 112 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 1 2 Main Clock Oscillation For the emulator debugger for the MB2146 09 it is necessary to set the main clock oscillation E Main Clock Oscillation 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 113 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 2 Programming to FLASH Memory Area This emulator supports programming to the FLASH memory area E Erasing Programming FLASH Memory Writing to FLASH memory code break software break functions are supported The content of FLASH memory area is secured in the buffer within the debugger and the content of the buffer is referred at reading writing Writing to FLASH memory is automatically performed prior to executive operation or reset processing The programming to FLASH memory can be also performed manually The fo
80. 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 TIMERSCALE command When 1 us is selected the maximum measured time is about 70 minutes when 100 ns is selected 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 79 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 6 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 2 YES Sequencer terminates at level 3 Timer latch 2 80 CHAPTER 2 DEPENDENCE FUNCTIONS gt SET SEQUENCE EVENT 1 1 7 2 gt SET SEQUENCE EVENT 2 4 J 1 gt SET SEQUENCE EVENT 2 2 7 3 gt SET SEQUENCE EVENT 3 4 J 1 gt SET SEQUENCE EVENT 3 2 J 0 Indicates that if event 3 gt SET SEQUENCE LATCH 1 1 2 occurs at level 3 the gt SET SEQUENCE LATCH 2 3 0 sequencer terminates and let the timer latched gt SHOW SEQUENCE Sequencer Enable levell level2 level3 level4 levels level6 level7 level8
81. ions This Debugger provides the following five types of break functions Code break Data break Guarded access break Trace buffer full break Forced break 40 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 8 1 Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Up to 65535 addresses can be set for this debugger When the code break occurs the following message appears at the status bar Break at address by breakpoint E Setting Method Set code break as follows Command SET BREAK Refer to SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Code tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window disassemble window 41 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 8 2 Data Break This function aborts the program execution when a data access read write is made to a specified address while executing a program E Data Break This function aborts the program execution when a data access read write is made to a specified address by MCU Up to 65535 data break points can be set for this debugger When the data break
82. isplaying Measured Time To display the time measured specify the starting event number or the ending event number gt SHOW PERNORMANCE TIME 1 9000 18999 1000 Minimum event 1 gt 2 time us count min time 11637 0 oes time 17745 0 0 0 8999 0 0 UME 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 18000 0 18999 0 0 19000 0 0 Pee TEE a 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 100 CHAPTER 2 DEPENDENCE FUNCTIONS gt SHOW PERFORMANCE TIME 1 13000 16999 500 event 1 gt 2 time us count min time 11637 0 4 max time 17745 0 0 0 12999 0 21 avr time 14538 0 13000 0 13499 0 13 13500 0 13999 0 39 Lower time limit for display 140000 14499 0 14500 0 14999 0 162 15000 0 15499 0 76 15500 0 15999 0 16 Upper time limit for display 16000 0 164330 2 16500 0 16999 0 1 17000 0 17499 0 1 Sa MER OS IE
83. ite 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 82 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 1 Single Trace The single trace function traces 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 12 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 bu
84. ize 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 new project is made the workspace project format is used When using an existing project the corresponding project format is used If a project made by an early Workbench version is used a dialog asking whether to convert the file to the workspace project format is displayed For details refer to Section 2 13 Reading SOFTUNE Project Files of Old Versions of SOFTUNE Workbench 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 characte
85. l Break 44 62 Trace Data Clearing Trace Data 124 Display Format of Trace Data 124 Displaying Trace Data Storage Information 124 Displaying Trace Data Storage Status 90 Reading Trace Data On the fly in Single Trace 94 Reading Trace Data On the fly in the Multi Trace EP 95 Sampling Trace 123 Saving Trace 96 125 Specify Displaying Trace Data Position 91 Trace Data 82 123 V Variables Specifying Variables of C Language 30 W Workspace Workspace nune iade e the cdda irand ddai iin 2 Workspace Management Function 2 155 INDEX 156 CM25 00324 3E FUJITSU SEMICONDUCTOR CONTROLLER MANUAL F MC 8L 8FX FAMILY SOFTUNE M workbench USER S MANUAL March 2008 the third edition Published FUJITSU LIMITED Electronic Devices Edited Strategic Business Development Dept
86. l 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 When checking Use the Output window note the following Once a tool is activated neither other tools nor the compiler assembler can be activated until the tool is terminated The Output window must not be used with a tool using a wait state for user input while the tool is executing The user 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 BB Reference Section Setting Tools Starting Tools 1 11 CHAPTER 1 BASIC FUNCTIONS Macro Descriptions Usable in Manager This section explains the macro descriptions that can be used in the manager of SOFTUNE Workbench B 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
87. lated Commands that can be used in multi trace mode Usable Command Function SET EVENT Sets events SHOW EVENT Displays event setup status CANCEL EVENT Deletes event ENABLE EVENT Enables event DISABLE EVENT Disables event SET MULTITRACE Sets trace buffer full break SHOW MULTITRACE Displays trace data SEARCH MULTITRACE Searches trace data ENABLE MULTITRACE Enables multi trace DISABLE MULTITRACE Disables multi trace CLEAR MULTITRACE Clears trace data 89 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 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 TRACE command in the single trace mode and to the SHOW MULTITRACE command in the multi trace 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 multi trace mode Frame numbers displayed in the multi trace mode is the global number Example In Single Trace gt SHOW TRACE STATUS en dis buffer full nobreak sampling end frame no 00120 to 00050 step no 00091 to 00022 gt In Multi Trace gt SHOW MULTITRACE STATUS en dis buffer full nobr
88. laying Trace Data Position sssssssssssseeeeeeeeeenmenn nnne 91 2 2 7 7 Display Format of Trace Data nennen nnn nnns 92 2 2 7 8 Reading Trace Data On the fly ssssssssssssssssseseseeee eene eene nennen trennen nennen 94 2 2 7 9 Saving Trace Data dci cod dd nir itae rester ta dede te pat 96 2 2 8 Measuring Performance aa a aei 97 2 2 8 1 Performance Measurement Procedures 98 2 2 8 2 Display Performance Measurement Data 100 2 2 9 Measuring Coverage t ee trece ttc Ea P EU quta Peu e ids 102 2 2 9 1 Coverage Measurement Procedures 103 2 2 10 Measuring Execution Time Using Emulation Timer 106 2 2 11 Sampling by External Probe nnn 107 2 3 Emulator Debugger 2146 09 2146 09 109 2 3 1 Setting Operating Environment sssssssssssssssseseeenneeen enne 111 2 9 1 1 Olock up MOQOG o aee petente n 112 2 3 1 27 Mait Glock Oscillation eee vagas cee eae npe sang cba 113 2 3 2 Programming
89. llowing dialog is displayed at writing to FLASH memory Processing RARE The command that programming to FLASH memory is generated has the following SET MEMORY SET BREAK LOAD FILL MOVE ASSEMBLE There are the following three functions for the operation of FLASH memory 1 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 2 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 114 CHAPTER 2 DEPENDENCE FUNCTIONS 3 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 115 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 3 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 Comman
90. mode or in the hold state when the strong break is requested by the Debug Abort menu during the program execution the Debug Abort menu is ignored To generate a break forcibly use the Debug Abort menu to remove a factor by the user system or use the Debug Reset of MCU menu to remove it If the MCU enters the low power consumption mode or the hold state during the program execution the condition is displayed at the status bar 64 2 2 5 Events CHAPTER 2 DEPENDENCE FUNCTIONS 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 External probe Select from among data read data write instruction execution and data modify 8 bit data bit masking enable Notes In instruction execution an event trigger is generated only when an instruction is executed This
91. n Tab stops can be specified by defining how many digits to skip when Tab codes are inserted The default is 8 e 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 BB 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 Setup Editor menu 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 Hile save 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 speci
92. n describes the functions of the emulator debugger for the 2 8 family B Emulator Debugger The setup wizard displays the following emulator type options when it prompts you to select the emulator debugger Select MB2146 09 if using either the MB2146 09 or the MB2146 09A MB2146 09 MB2146 08 The emulator debugger for the MB2146 09 and MB2146 09A is a software package that you can use to test program execution via a USB communication link from a host computer The emulator debugger can be used with the following MCU series When using the MB2146 09 or MB2146 09A F MC 8FX When using the MB2146 09 or MB2146 09A refer to Appendix D Setting USB Interface in SOFTUNE Workbench Operation Manual to setup the USB interface The monitor program loads automatically when the debugger starts immediately after the power is turned on to the user system The following dialog is displayed while the monitor program loads Once loaded the monitor program cannot be reloaded unless the power is turned off The monitor program is located in the Lib 896 sub directory under the directory in which Workbench is installed Load of monitor program x Now loading monitor program E Softune lt Lib 896 EML950B bin Additional Debugging Functions In addition to the functions available on the BGM debugger in the past the following additional functions also become available if using SOFTUNE Workbench V30L30 and later with certain combinations of
93. n interrupt request is also supported for the following exception handling Execution of undefined instructions Address error in program access Program access to internal RAM area and internal I O area CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 5 Reset Simulation This section describes the reset simulation executed by SOFTUNE Workbench E Reset Simulation The simulator debugger simulates the operation when a reset signal is input to the MCU using the Debug Reset MCU menu and initializes the registers The function for performing reset processing by operation of MCU instructions writing to RST bit in standby control register is also supported In this case the reset message Reset is displayed on the status bar 37 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 6 Low Power Consumption Mode Simulation This section describes the low power consumption mode simulation executed by SOFTUNE Workbench E Low Power Consumption Mode Simulation 38 The MCU enters the low power 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 Debug Abort menu is executed Each cycle of the loop increments the count by 1 During this period I O port processing can
94. nd 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 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 X Symbol Name When a symbol is specified using the module
95. nt WZ Editor V4 0 f 191 MIFES V1 0 l UltraEdit32 9001 1 1 TextPad32 f 1 PowerEDITOR f g l Codewright32 of g l Hidemaru for Win3 1 95 j 1 1 f ViVi line 1 96f E Reference Section Editor Setup 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 menu 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 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 Setup Tool menu To select the title of a set tool use the Setup Tool execution menu E Setting Options Note When activating an external too
96. nt at a specific address its data can be displayed in the Watch window For further details of the above functions refer to 3 13 Watch Window in SOFTUNE Workbench Operation Manual 24 CHAPTER 1 BASIC FUNCTIONS 1 15 Register Operations This section describes the register operations E Register Operations The Register window is opened when the View Register menu 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 B Disassembly To display disassembly use the View Assembly menu By default disassembly can be viewed starting from the address pointed by the curren
97. nts Structure union utag char c int i uni Value of member i of uni Address of variable int data Address of data int i D Same as i int amp ri i Reference type E Notes on Symbols of C Language The 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 easier Consequently a symbol name described in C language and a symbol name described in assembler which should both be unique may be identical In such a case the symbol name in the Current Scope normally is preferred To refer to a symbol name outside the Current Scope specify the symbol with the module name If there are duplicated symbols outside the Current Scope the symbol name searched first becomes valid To refer to another one specify the symbol with the module name 30 CHAPTER 2 DEPENDENCE FUNCTIONS This chapter describes the functions dependent on F MC 8L 8FX family MCU 2 1 Simulator Debugger 2 2 Emulator Debugger MB2141 2 3 Emulator Debugger MB2146 09 MB2146 09A 2 5 Monitor Debugger 31 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 Simulator Debugger This section describes the functions of the simulator debugger for the 2 81 8 family B Simulator Debugger The simulator deb
98. nual 46 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 1 Setting Operating Environment This section explains the operating environment setup E Setting Operating Environment For the emulator debugger for the MB2141 it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time MCU operation mode Memory Mapping Timer Minimum Measurement Unit 47 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 1 1 MCU Operation Mode There are three MCU operation modes as follows e Single chip mode MCU Mode 0 External ROM mode MCU Mode 1 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 0000 Internal I O Area Internal I O Area Internal I O Area Internal RAM Internal RAM Internal RAM Internal ROM Mode 1 Mode 2 mem Internal ROM Area The emulation memory is substituted ROM for this area Always map to the emulation memory Internal ROM External Access Area Can be mapped freely to the emulation memory and user memory Internal Access Area Access is performed to MCU internal memory
99. numbers 87 CHAPTER 2 DEPENDENCE FUNCTIONS Figure 2 2 15 Frame Number in Multi Trace Block number 2048 Trace buffer Frame number Global number 15 16 17 18 24 31 32 32752 32753 32759 32767 32768 Local number 7 6 7 8 7 6 7 8 7 8 Event trigger lt Event trigger lt Event trigger 88 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 4 Setting Multi Trace Before executing the multi trace function the following settings must be made After these settings trace data is sampled when a program is executed 1 Set event mode to multi trace mode 2 Enable trace function 3 Set event 4 Set trace buffer full break E Setting Multi Trace Before executing the multi trace function the following settings must be made After these settings trace data is sampled when a program is executed 1 Set event mode to multi trace 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 multi trace mode Table 2 2 10 Trace re
100. occurs the following message appears at the status bar Break at address by databreak at access address E Setting Method 42 Set the data break as follows Command SETDATABREAK Refer to SET DATABREAK in SOFTUNE Workbench Command Reference Manual Dialog Data tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 8 3 Guarded Access Break A guarded access break aborts a executing program when accessing in violation of the access attribute set and accessing a guarded area access disabled area in undefined area E Guarded Access Breaks A guarded access break aborts a executing program when accessing in violation of the access attribute set by using the Setup Memory Map menu and accessing a guarded area access disabled area in undefined area 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 execution aborted Break at Address by guarded access code read write at Access Address 43 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 8 4 Trace Buffer full Break This f
101. off the power immediately and check the connection Refer to Appendix B Debugger Related Error Messages in the SOFTUNE Workbench Command Reference Manual 110 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 1 Setting Operating Environment This section explains the operating environment setup E Setting Operating Environment For the emulator debugger for the MB2146 09 it is necessary to set the following operating environment Predefined default settings for all these setup items are enabled at startup Therefore setup is not required when using the default settings Adjusted settings can be used as new default settings from the next time Clock up mode Main Clock Oscillation 111 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 1 1 Clock up Mode For the emulator debugger for the MB2146 09 it is necessary to set the clock up mode E 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 communication speed is also reduced In this case optimize 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 Response speed tab of setup debug environment dialog Notes When the clock up mode is used the operating frequency is changed automat
102. ons for each tool see the manual of each tool CHAPTER 1 BASIC FUNCTIONS 1 7 Error Jump Function This section describes the error jump function in SOFTUNE Workbench E Error Jump Function 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 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 Setup Error Jump menu B Syntax An error message format can be described in Syntax SOFTUNE Workbench uses macro descriptions as shown in the Table 1 7 1 to define such formats To analyze up to where f h and continue SOFTUNE Workbench u
103. ory simulation executed by SOFTUNE Workbench E Memory Simulation The simulator debugger 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 To secure the memory area either use the Setup Memory Map menu or the SET MAP command in the Command window Load the file output by the Linkage Editor Load Module File using either the Debug Load target file menu 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 menu The access attribute of unspecified memory space is undefined The access attributes of the memory space which was not specified by using the Setup Memory Map menu remain undefined E Memory Area Access Attributes 34 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 Instruction operation enabled READ Data read enabled WRITE Data write enabled undefined Att
104. ot 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 Sets events SHOW EVENT Displays event setup status CANCEL EVENT Deletes event ENABLE EVENT Enables event DISABLE EVENT Disables event SET SEQUENCE Sets sequencer SHOW SEQUENCE Displays sequencer setting status CANCEL SEQUENCE Cancels sequencer ENABLE SEQUENCE Enables sequencer DISABLE SEQUENCE Disables sequencer SET DELAY Sets delay count value and operation after delay SHOW DELAY Displays delay count setting status SET TRACE Sets traces buffer full break SHOW TRACE Displays trace data SEARCH TRACE Searches trace data ENABLE TRACE Enables trace function DISABLE TRACE Disables trace function CLEAR TRACE 86 Clears trace data CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 3 Multi Trace The multi trace function samples data where an event trigger occurs for 8 frames before and after the event trigger E Multi Trace Function Execute multi trace by setting the event mode to the multi trace mode using the SET MODE command The multi trace function samples data where an event trigger occurs for 8 frames before and after the
105. r RAM areas is loaded Loading of files that include ROM or RAM areas is not permitted Notes The FLASH area is only written to when loading a file The FLASH area cannot be modified directly using the memory window or other memory manipulation commands Only load files for the FLASH area memory range to the FLASH area If a file contains data for other areas it will not be written to the FLASH area 145 CHAPTER 2 DEPENDENCE FUNCTIONS 2 5 2 Points to Note when Executing Programs Take note of the following points when using this emulator to execute a program Bi Code Break Settings when Using Step Execution The wild register is used temporarily when using the monitor debugger in step in mode at the machine language level As it is not possible to set code breakpoints during this time code breakpoints are disabled In particular when using step execution with the interrupt mask set to disable interrupts you need to take note of this point in situations such as when a breakpoint is set in an interrupt handler As breakpoints set in interrupt handlers are disabled execution will not break even if the breakpoint code is executed 146 CHAPTER 2 DEPENDENCE FUNCTIONS 2 5 3 Break This Debugger provides two types of break functions When by each break function aborts program execution the address where a break occurred and the break factor are displayed E Break Functions This Debugger provides the follo
106. re the time from the start of MCU operation until suspension E Measuring Executing Time Using Emulation Timer 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 The 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 Oh 00m 425 015ms 10815 264ns Time from last executed Oh 00m 03s 904ms 623us 874ns Time gt CLEAR TIMER gt SHOW TIMER timer from initialize Oh 00m 005 000ms 000ys 000ns Time from last executed Oh 00m 005 000ms 000us 000ns Time gt Note The measu
107. reak factor are displayed E Break Functions This Debugger provides the following two types of break functions Code break Forced break 141 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 6 1 Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Up to 256 addresses can be set for this debugger When the code break occurs the following message appears at the status bar Break at address by breakpoint E Setting Method 142 Set code break as follows Command SET BREAK Refer to SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Code tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window disassemble window CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 6 2 Forced Break This function forcibly aborts the program execution to generate a break E Forced Break This function forcibly aborts the program execution to generate a break When the forced break occurred the following message appears at the status bar Break at address by command abort request 143 CHAPTER 2 DEPENDENCE FUNCTIONS 2 5 Monitor Debugger
108. red execution time is added about ten extra cycles per execution 106 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 11 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 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 multi trace and performance trigger points Events can be set by using the SET EVENT command B 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
109. rement result per machine instruction Coverage Ratio of Total Measurement Area Specify TOTAL for command qualifier gt SHOW COVERAGE TOTAL total coverage 82 3 Displaying coverage ratio of load module specify MODULE for the command qualifier gt SHOW COVERAGE MODULE sample abs 2 eee ede RR 84 03 90 43 t sample c 2 2 2 5 ees 95 17 sSampg uude eee weed RS 100 0096 Displays the load modules and the coverage ratio of each module 103 CHAPTER 2 DEPENDENCE FUNCTIONS e Summary Specify GENERAL for command qualifier gt SHOW COVERAGE GENERAL HEX 0X0 1X0 2X0 oM address 0123456789ABCDEF0123456789ABCDEF0123456 ABCDEF FFOO 32 0 Display the access status of every 16 addresses No access 1 to F Display the number accessed in 16 addresses by the hexadecimal number 1 Access all of the 16 addresses Details Specify DETAIL for command qualifier gt SHOW COVERAGE DETAIL FF00 address 0 1 2 3 4 5 6 7 8 9 A D E F 0 FFOO ecc 1000 FF10 X FF20 18 6 ecc 1000 FF40 Se ue da Oe des xe Se 19037 FF50 ecc 1000 FF60 0 0 FF70 0 0 FF80 0 0 Display the access status of every 1 address No access i Access Displays per source line specify SOURCE for the command qualifier
110. ribute undefined access prohibited 2 1 3 CHAPTER 2 DEPENDENCE FUNCTIONS Port Simulation This section describes I O port simulation executed by SOFTUNE Workbench Bi 1 0 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 Whenever a program reads the specified port data is input from the pre defined data input source 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 menu 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 Bi 1 O Port Simulation Output Port At output port simulation whenever a program writes data to the specified port writing is executed to the data output destina
111. ring the Measurement Result The following methods can be used to clear the results 1 Time measurement dialog lt Clear gt button Debug Time Measurement menu 2 CLEAR TIMER command B Error The measurement result for the number of execution cycles has an error of around zero to ten or so cycles The following additional error also occurs if the measurement range is extended Error Overflow counter upper 16 bits x 0 to 10 or so cycles approx Notes Tominimize the error when measuring the number of execution cycles use continuous instruction execution as far as possible It is possible that 16 bit counter overflow events may be missed if interrupts are disabled for a long period of time In this case the measurement result will not be correct 130 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 Emulator Debugger MB2146 08 This section explains the functions of the emulator debugger MB2146 08 for the F MC 8FX Family B Emulator Debugger When you choose the emulator debugger from the setup wizard the following items are displayed as emulator types Select MB2146 08 MB2146 09 MB2146 08 This debugger is software that controls an emulator from a host computer via a communications line USB to evaluate programs Before using MB2146 08 refer to Appendix D Setting USB Interface in SOFTUNE Workbench Operation Manual to set the USB interface Note If the combination of the BGM adaptor and the
112. ristics 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 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 SRC tab of 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 newl
113. s the following seven types of break functions Code break Data break Sequential break Guarded access break Trace buffer full break Performance buffer full break Forced break 56 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 4 1 Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Up to 65535 addresses can be set for this debugger When the code break occurs the following message appears at the status bar Break at address by breakpoint E Setting Method Set code break as follows Command SET BREAK Refer to SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Code tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window disassemble window Notes on Instruction Execution Break If a break point is set after the instruction shown in Figure 2 2 4 a break occurs before the instruction is executed As the debugger is designed to perform step execution internally and cause a break after the execution only the last one instruction cannot be executed in real time Figure 2 2 4 List of Instructions Affecting Instruction Execution
114. s x n icti regere etie ite Er Re PU pde 25 1 16 Line Assembly and Disassembly sse eene n nnne nennen nnns 26 1417 Symbolie Debuggihg Lii uet tentes 27 1 17 1 Referring to Local Symbols 29 1 17 2 Referring to Variables of C Language sese enne nnne enses 30 CHAPTER 2 DEPENDENCE FUNCTIONS nennen nennen 31 2 1 Simulator Debugger cue erect teet 32 2 1 1 INSTRUCTION SITmulatiOn 55 55 33 2 1 2 Memory Simulation 34 2 1 3 O PortsSimulationy 2 dii torret eei E hen Ue iere e xr 35 2 1 4 Interrupt Simulation z i sed a dep 36 2 1 5 Reset Simulation ie 37 2 1 6 Low Power Consumption Mode Simulation sese 38 2 1 7 ST UB E UBCtlon s eie de tede td iuc ms 39 2 1 8 ccr 40 2 1 8 1 Gode Break ecto ey tsar epee nat secre depen ee A E eee el aes eee eee 41 2 1 0 2 Break OU Rome RESI EM S 42 2 1 8 3 Guarded Access Break Sh seas aa 43 2 1 8 4
115. ser 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 SET MAP Sets memory map SHOW MAP Displays memory map CANCEL MAP Changes memory map setting to undefined 50 CHAPTER 2 DEPENDENCE FUNCTIONS 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 51 CHAPTER 2 DEPENDENCE FUNCTIONS 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 1 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 Timer values of sequencer timer conditions at each level Emulation timer
116. ses 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 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 Example 00901 95h Cof 90l Wh The first four characters are followed by the file name and parenthesized line number and then 11 CHAPTER 1 BASIC FUNCTIONS 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 CHAPTER 1 BASIC FUNCTIONS 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 Th
117. t program counter PC However the address can be changed to any desired address at start up Disassembly for an address outside the memory map range cannot be displayed If this is attempted is displayed as the mnemonic E Reference Section Disassembly Window 26 CHAPTER 1 BASIC FUNCTIONS 1 47 Symbolic Debugging The symbols defined in a source program can be used for command parameters address There are three types of symbols as follows Global Symbol e Static Symbol within Module Local Symbol within Module 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 language 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 language 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 language variables and functions defined outside a function with a static declaration are in this category In assembler symbols without a PUBLIC
118. t 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 12 Sampling in Single Trace Start program Delay counter Sequencer Suspend Resume sampling sampling Sequencer terminates Tracing Trigger terminates 654 Delay 83 CHAPTER 2 DEPENDENCE FUNCTIONS E Frame Number and Step Number in Single Trace 84 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 13 If there is no sequencer termination trigger point available the trace data sampled last is numbered O Figure 2 2 13 Frame Number in Single Trace o Trigger point T1 2 3 Delayed frames CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 7 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 e
119. tatus 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 MOLD 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 92 CHAPTER 2 DEPENDENCE FUNCTIONS 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 1 00007 E198 PUSHW A 11111111 1 000010 E199 PUSHW A 11111111 1 000015 E19A PUSHW A 11111111 1 demo3 c 91 int cc 1 00019 E19B MOVW A 0001 11111111 1 00022 19 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 demo
120. tem and operation of individual units etc B Emulator Debugger The emulator debugger is software to evaluate a program by controlling the emulator from a host computer through a communications line RS 232C LAN USB Before using this debugger the emulator must be initialized B Monitor Debugger The monitor debugger evaluates a program by putting it into an evaluation system and communicating with a host An RS 232C interface and an area for the debug program are required within the evaluation system For further information on the MCU related items see CHAPTER 2 DEPENDENCE FUNCTIONS in this manual 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 e Display Modify C variables The names of variables in a C source file can be displayed in the Watch window and modified Setting Watch point By setting a watch poi
121. the FLASH security function At startup of debugging When the FLASH memory is already in the protected state During debugging When the memory moves to the protected state by an operation such as writing to the memory When it is determined that the FLASH memory is already in the protected state the following dialog Softune896 xi appears The flash memory is protected To start debugging all contents in the flash memory need to be erased Are you sure you want to erase all contents in the flash memory If Yes is selected the debugger starts or debugging continues once the FLASH memory is erased If No is selected the debugger stops CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 5 Notes on Starting Stopping Debugger The following points must be noted when starting or stopping this debugger E When Starting Debugger As the FLASH memory uses a buffer style control it must always be synchronized with the FLASH memory first At startup of the debugger it is automatically synchronized with the FLASH memory This may take a significant time because the entire FLASH memory of the MCU must be read Under the following conditions it takes approximately 20 seconds FLASH memory 1 sector product the sector size 16KB Clock Clock up mode ON For this debugger the power supply can be monitored If an abnormality is detected at startup of the debugger the following dialog will appear Softune896 AN Please turn t
122. tion To set an output port either use the Setup Debug Environment I O Port menu 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 35 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 4 Interrupt Simulation This section describes interrupt simulation executed by SOFTUNE Workbench B Interrupt Simulation 36 Simulate the operation of the MCU in response to an interrupt request The methods of generating interrupts are as follows Execute instructions for the specified number of cycles while the program is running during execution of executable commands to generate interrupts corresponding to the specified interrupt numbers and cancel the interrupt generating conditions Continue to generate interrupts each time the number of instruction execution cycles exceeds the specified number of cycles The method of generating interrupts is set by the Setup Debug environment Interrupt menu If interrupts are masked by the interrupt enable flag when the interrupt generating conditions are established the interrupts are generated after they are unmasked MCU operation in response to a
123. tion 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 11 Trace Sampling Control 2 Resume Resume Start Suspend Resume Suspend Suspend i 4d lo 4 B rt Trace buffer 77 CHAPTER 2 DEPENDENCE FUNCTIONS Setup Example Suspend trace sampling when event 1 occurs and then resume at event 2 and keep sampling data until event 3 occurs Level 2 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 78 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 6 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 displayed using the SHOW SEQUENCE command When a program starts execution the emulation timer is
124. tion speed and increase the operating frequency automatically The default setting is ON Also this setting is performed at the setup wizard or Response speed tab of setup debug environment dialog When the clock up mode is used the operating frequency is changed automatically at breaking If a failure is caused by changing the operating frequency disable the clock up mode If a 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 133 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 1 2 Main Clock Oscillation Frequency For this debugger it is necessary to set the main clock oscillation frequency E Setting Main Clock Oscillation Frequency The communication speed of MB2146 08 and the user system changes depending on the operating frequency of the target MCU The setting of the main clock oscillation FCH is required to calculate the operating speed of the target MCU The default setting is the maximum frequency at which the specified MCU operates in the main clock Also this setting is performed at the setup wizard Note Use the default setting when only the internal main CR clock is used 134 CHAPTER 2 DEPENDENCE FUNCTIONS 2 4 2 Erasing Programming FLASH Memory This debugger supports programming to the FLASH memory area E Erasing Programming
125. to FLASH Memory Area 114 2 3 3 On the fly Executable Commands 116 2 3 4 Break cvs D 117 2 3 4 1 Gode Break eet sien euet oat N 118 2 3 4 2 Break ao inerte ec ten ten 119 2 3 4 3 Monitoring Data Break 120 2 3 4 4 Sequential Break 5 nian each eee e o hi edd eti eret Ene reds 121 2 3 4 5 Forced Break epp oen T anestesia ete iius 122 2 3 5 Real time Trace utet ue at ee itti t ar eive etre i uv eene e eee ea us 123 233 0 Displaying Trace Data rt IRR ud ES 124 2 3 5 2 Saving Trace Data hdi e drei te d DE DRE PR eee 125 2 3 6 Notes on Executing Program rinse 126 2 3 7 Memory Access On the Fly 127 2 3 8 Measuring the Number of Execution Cycles ssssssssssseseneneeeneneen nennen 129 2 4 Emulator Debugger MB2146 08 nennen nnns 131 2 4 1 Setting Operating Environment enana naea a naaa 132 2 4 1 1 Clock Up Mode ke UT tee Dee a ERE e ec tpa 133 2 4 1 2 Main Clock Oscillation Frequency
126. to consult with 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 but are not designed developed
127. ugger 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 B Simulation Range The simulator debugger 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 nstruction simulation Memory simulation I O port simulation Input port e I O port simulation Output port Interrupt simulation Reset simulation Power save mode simulation 32 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 1 Instruction Simulation This section describes the instruction simulation executed by SOFTUNE Workbench B Instruction Simulation This simulates the 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 33 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 2 Memory Simulation This section describes the mem
128. unction aborts the program execution when the trace buffer becomes full E Trace Buffer full Break This function aborts the program execution when the trace buffer becomes full When the trace buffer full break occurs the following message appears at the status bar Break at address by trace buffer full E Setting Method Set the trace buffer full break as follows Command SET TRACE BREAK Refer to SET TRACE in SOFTUNE Workbench Command Reference Manual Dialog Trace setting dialog Refer to 4 4 8 Trace in SOFTUNE Workbench Operation Manual 44 CHAPTER 2 DEPENDENCE FUNCTIONS 2 1 8 5 Forced Break This function forcibly aborts the program execution to generate a break E Forced Break This function forcibly aborts the program execution to generate a break When the forced break occurred the following message appears at the status bar Break at address by command abort request 45 CHAPTER 2 DEPENDENCE FUNCTIONS 2 2 Emulator Debugger MB2141 This section describes the functions of the emulator debugger for the F MC 8L family B Emulator Debugger The emulator debugger is a software to evaluate a program by controlling an emulator from a host computer via a communications line RS 232C LAN Before using this emulator the emulator must be initialized For further details refer to Appendix B Download Monitor Program and Appendix C Setting LAN Interface in SOFTUNE Workbench Operation Ma
129. unctions This Debugger provides the following five types of break functions Code break Data break Monitoring Data Break Sequential break Forced break 117 CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 4 1 Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Up to 256 addresses can be set for this debugger When the code break occurs the following message appears at the status bar Break at address by breakpoint E Setting Method 118 Set code break as follows Command SET BREAK Refer to SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Code tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window disassemble window CHAPTER 2 DEPENDENCE FUNCTIONS 2 3 4 2 Data Break This function aborts the program execution when a data access read write is made to a specified address while executing a program E Data Break This function aborts the program execution when a data access read write is made to a specified address by MCU Up to 2 data break points can be set for this debugger When the data break occurs th
130. uting the GO command etc from the command window Table 2 2 3 Major Functions Executable in On the fly Mode Function Restrictions Major Commands MCU reset RESET Displaying MCU execution status SHOW STATUS Enabled only when trace function SHOW TRACE disabled SHOW MULTITRACE ENABLE TRACE DISABLE TRACE Displaying trace data Enable Disable trace Displaying execution time SHOW TIMER measurement value Timer ENTER EXAMINE COMPARE FILL MOVE DUMP SEARCH MEMORY SHOW MEMORY SET MEMORY Memory operation Emulation memory only operable Read Write Read only enabled in mirror area Emulation memory only enabled Line assembly Disassembly Mirror area Disassembly only enabled ASSEMBLE DISASSEMBLE 53 CHAPTER 2 DEPENDENCE FUNCTIONS 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
131. vents 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 sequencer and delay count Trace sampling can be controlled by setting the sequencer for events If this function is not needed there is no need of this setting To set events use the SET EVENT command To set the sequencer use the SET SEQUENCE command Furthermore set the delay count between sequencer 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 85 CHAPTER 2 DEPENDENCE FUNCTIONS 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 N
132. wing two types of break functions Code break Forced break 147 CHAPTER 2 DEPENDENCE FUNCTIONS 2 5 3 1 Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Code Break This function aborts the program execution by monitoring a specified address by software A break occurs before executing an instruction at the specified address Up to 256 addresses can be set for this debugger When the code break occurs the following message appears at the status bar Break at address by breakpoint E Setting Method 148 Set code break as follows Command SET BREAK Refer to SET BREAK type 1 in SOFTUNE Workbench Command Reference Manual Dialog Code tab in breakpoint setting dialog Refer to 4 6 4 Breakpoint in SOFTUNE Workbench Operation Manual Window Source window disassemble window CHAPTER 2 DEPENDENCE FUNCTIONS 2 5 3 2 Forced Break This function forcibly aborts the program execution to generate a break E Forced Break This function forcibly aborts the program execution to generate a break When the forced break occurred the following message appears at the status bar Break at address by command abort request 149 CHAPTER 2 DEPENDENCE FUNCTIONS 150 INDEX Symbols CYCLE Display All Bus Cycles Specify CYCLE 92 INSTRUCTION Display in
133. y added refer to Section 1 11 Macro Descriptions Usable in Manager CHAPTER 1 BASIC FUNCTIONS 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 This section explains the make build function of SOFTUNE Workbench B 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

Download Pdf Manuals

image

Related Search

Related Contents

Alpine CHM-S665RF User's Manual  fiche pédagogique atelier « construire la ville    Temperature Station With Radio  1 2 3 AB - Siemens  Acheter un véhicule d`occasion  KNIFE USER GUIDE  

Copyright © All rights reserved.
Failed to retrieve file