Fujitsu SOFTUNE F2 MC-16 User Manual

FUJITSU SEMICONDUCTOR CONTROLLER MANUAL
CM41-00313-6E
F2MC-16 FAMILY
SOFTUNE
TM
Workbench
F2MC-16 FAMILY
SOFTUNE
TM
Workbench
USER'S MANUAL
FUJITSU SEMICONDUCTOR LIMITED
PREFACE
What is the SOFTUNE Workbench?
SOFTUNE Workbench is support software for developing programs for the F2MC-16 family of microprocessors / microcontrollers.
It is a combination of a development manager, simulator debugger, emulator debugger, m onitor debugger, and an integrated development environment for efficient development.
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. Other company names and products names are trademarks or registered trademarks of their respective
companies.
Trademarks
REALOS, SOFTUNE are trademark of Fujitsu Semiconductor Limited, Japan.
2
Note: F Microsoft, Windows and Windows Media are either registered trademarks of Microsoft Corporation in the
United States and/or other countries. The company names and brand names herein are the trademarks or registered trademarks of their respective
owners.
MC is the abbreviation of FUJITSU Flexible Microcontroller.
Organization of This Manual
This manual consists of the following 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 each Debugger.
i
• The contents of this document are subject to change without notice. Customers are advised 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 SEMICONDUCTOR 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 SEMICONDUCTOR 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 SEMICONDUCTOR or any third party or does FUJITSU SEMICONDUCTOR warrant non-infringement of any third-party's intellectual property right or other right by using such information. FUJITSU SEMICONDUCTOR 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 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 SEMICONDUCTOR 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.
• 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.
Copyrights © 2004-2011 FUJITSU SEMICONDUCTOR LIMITED All rights reserved.
ii
READING THIS MANUAL
Configuration of Page
In each section of this manual, the summary about the section is described certainly, so you can grasp an outline of this manual if only you read these summaries.
And the title of upper section is described in lower section, so you can grasp the position where you are reading now.
iii
iv v
CONTENTS
CHAPTER 1 BASIC FUNCTIONS ..................................................................................... 1
1.1 Workspace Management Function ..................................................................................................... 2
1.2 Project Management Function ...... .... ... ... ... ....................................... ... ... .... ... ... .................................. 3
1.3 Project Dependence ............................................................ ... .... ........................................................ 5
1.4 Make/Build Function ........................................................................................................................... 6
1.4.1 Customize Build Function .............................................................................................................. 7
1.5 Include Dependencies Analysis Function ........................................................................................... 9
1.6 Functions of Setting Tool Options ..................................................................................................... 10
1.7 Error Jump Function ......................................................................................................................... 11
1.8 Editor Functions ................................................................................................................................ 13
1.9 Storing External Editors .................................................................................................................... 14
1.10 Storing External Tools ...................................................................................................................... 16
1.11 Macro Descriptions Usable in Manager ............................................................................................ 17
1.12 Setting Operating Environment .. ....................................... ... ... .... ... ...................................... . ............ 21
1.13 Debugger Types ............................................................... ... ... ....................................... ................... 22
1.14 Memory Operation Functions ....................... ....................................... ... .... ... ... ................................ 23
1.15 Register Operations .......................................................................................................................... 24
1.16 Line Assembly and Disassembly ...................................................................................................... 25
1.17 Symbolic Debugging ......................................................................................................................... 26
1.17.1 Referring to Local Symbols ......................................................................................................... 28
1.17.2 Referring to Variable of C Language .......................................................................................... 29
CHAPTER 2 DEPENDENCE FUNCTIONS ..................................................................... 31
2.1 Simulator Debugger ................ ... ... .... ... ... ....................................... ... ... ... .... ... ................................... 32
2.1.1 Setting Operating Environment ................................................................................................... 34
2.1.1.1 Boot ROM File Automatic Execution ........................................... ... .... ...................................... 35
2.1.2 Instruction Simulation .................................................................................................................. 36
2.1.3 Memory Simulation ...................................................................................................................... 37
2.1.4 I/O Port Simulation .................. .... ...................................... .... ... ... ... ............................................. 38
2.1.5 Interrupt Simulation ................. ....................................... ... .... ... ... ................................................ 39
2.1.6 Reset Simulation .................. ... .... ... ... ....................................... ... ... ... .... ... ................................... 40
2.1.7 Low-Power Consumption Mode Simulation ................................................................................. 41
2.1.8 STUB Function ..................................................... .... ... ... ....................................... ... ... ................ 42
2.1.9 Break ........................................................................................................................................... 43
2.1.9.1 Code Break ............................................................................................................................... 44
2.1.9.2 Data Break ................................................................................................................................ 46
2.1.9.3 Trace-Buffer-Full Break .................................................. .... ... ... ... ... .......................................... 47
2.1.9.4 Guarded Access Break ............................................................................................................. 48
2.1.9.5 Forced Break ............................ ... ....................................... ... ... ... ... .......................................... 49
2.1.10 Measuring Execution Cycle Count .... ... ... ....................................... ... .... ... ... ................................ 50
2.1.11 Trace ........................................................................................................................................... 52
2.1.11.1 Setting Trace ............................................................... ....................................... ...................... 53
2.1.11.2 Displaying Trace Data .............................................................................................................. 54
2.1.11.3 Searching Trace Data ............................................................................................................... 55
2.1.11.4 Saving Trace Data .................................................................................................................... 56
2.1.12 Measuring Coverage ................................................................................................................... 57
2.1.12.1 Coverage Measurement Procedures ........................................................................................ 58
2.1.13 Checking Debugger Information ........................... .... ... ... ... .... ...................................... ... .... ......... 61
2.2 Emulator Debugger (MB2141) ...... .... ... ....................................... ... ... ... ... .......................................... 63
2.2.1 Setting Operating Environment ................................................................................................... 64
2.2.1.1 MCU Operation Mode ............................................................................................................... 65
2.2.1.2 Debug Area .............................................................................................................................. 67
2.2.1.3 Memory Area Types ........................................................... ... ... ... ............................................. 68
2.2.1.4 Memory Mapping ............... ... ....................................... ... .... ... ... ................................................ 71
2.2.1.5 Timer Minimum Measurement Unit .......... ... ... ....................................... ... ... .... ... ...................... 73
2.2.2 Notes on Commands for Executing Program .............................................................................. 74
2.2.3 Commands Available during Execution of User Program ........................................................... 76
2.2.4 On-the-fly Memory Access ....................................... ... ... ... ....................................... ... ... .... ......... 77
2.2.5 Break ........................................................................................................................................... 79
2.2.5.1 Code Break ............................................................................................................................... 80
2.2.5.2 Data Break ................................................................................................................................ 82
2.2.5.3 Sequential Break ...................................................................................................................... 83
2.2.5.4 Guarded Access Break ............................................................................................................. 84
2.2.5.5 Trace-Buffer-Full Break .................................................. .... ... ... ... ... .......................................... 85
2.2.5.6 Performance-Buffer-Full Break ................................................................................................. 86
2.2.5.7 Forced Break ............................ ... ....................................... ... ... ... ... .......................................... 87
2.2.6 Events ............................. ......................... .......................... .......................... ................................ 88
2.2.6.1 Operation in Normal Mode ....................... ... ....................................... ... ... ... .... ......................... 90
2.2.6.2 Operation in Multi Trace Mode .............................................. ... ... ... .... ... ................................... 92
2.2.6.3 Operation in Performance Mode .............. ... ... ... .... ...................................... .... ... ... ... ... ............. 94
2.2.7 Control by Sequencer .................................................................................................................. 96
2.2.7.1 Setting Sequencer ....................... ... ....................................... ... ... ... .... ...................................... 97
2.2.7.2 Break by Sequencer ................................................................................................................. 99
2.2.7.3 Trace Sampling Control by Sequencer ............................... ... ... ....................................... ... ... . 100
2.2.7.4 Time Measurement by Sequencer ......................................................................................... 102
2.2.7.5 Sample Flow of Time Measurement by Sequencer ................................................................ 103
2.2.8 Real-time Trace ......................................................................................................................... 105
2.2.8.1 Single Trace ........................................................................................................................... 106
2.2.8.2 Setting Single Trace .............................................................. ................................................. 108
2.2.8.3 Multi trace ............................. .... ... ... ... ... ....................................... ... .... ... ... ... ........................... 110
2.2.8.4 Setting Multi Trace ....... ... ... ....................................... ... ... .... ... ................................................. 112
2.2.8.5 Displaying Trace Data Storage Status ................................................................................... 113
2.2.8.6 Specify Displaying Trace Data Start ....................................................................................... 114
2.2.8.7 Display Format of Trace Data ................................................................................................. 115
2.2.8.8 Reading Trace Data On-the-fly .............................. ... ... ... ....................................... ... ... .... .. ..... 119
2.2.8.9 Saving Trace Data .................................................................................................................. 121
2.2.9 Measuring Performance ............................................................................................................ 122
2.2.9.1 Performance Measurement Procedures ................................................................................. 123
2.2.9.2 Display Performance Measurement Data ............................................................................... 125
2.2.10 Measuring Coverage ................................................................................................................. 126
vi
2.2.10.1 Coverage Measurement Procedures ...................................................................................... 127
2.2.11 Execution Time Measurement ................................................................................................... 131
2.2.12 Sampling by External Probe ...................................................................................................... 133
2.2.13 Checking Debugger Information ........................... .... ... ... ... .... ...................................... ... .... ....... 135
2.3 Emulator Debugger (MB2147-01) .............................. .... ... ... ... .... ...................................... ... .... .. ..... 137
2.3.1 Setting Operating Environment ................................................................................................. 138
2.3.1.1 Monitoring Program Automatic Loading ...................................... ... ....................................... . 139
2.3.1.2 MCU Operation Mode ............................................................................................................. 140
2.3.1.3 Debug Area ............................................................................................................................ 141
2.3.1.4 Memory Area Types ........................................................... ... ... ... ........................................... 142
2.3.1.5 Memory Mapping ............... ... ....................................... ... .... ... ... .............................................. 144
2.3.1.6 Debug Function ...................................................................................................................... 146
2.3.1.7 Event Mode ............................................................................................................................ 147
2.3.2 Notes on Commands for Executing Program ............................................................................ 148
2.3.3 Commands Available during Execution of User Program ......................................................... 150
2.3.4 Break ......................................................................................................................................... 152
2.3.4.1 Code Break ............................................................................................................................. 153
2.3.4.2 Data Break .............................................................................................................................. 155
2.3.4.3 Monitoring Data Break .......... .... ...................................... .... ... ... ... ........................................... 156
2.3.4.4 Sequential Break .................................................................................................................... 157
2.3.4.5 Guarded Access Break ........................................................................................................... 158
2.3.4.6 Trace-Buffer-Full Break .................................................. .... ... ... ... ... ........................................ 159
2.3.4.7 Performance-Buffer-Full Break ............................................................................................... 160
2.3.4.8 External Trigger Break ............................................................................................................ 161
2.3.4.9 Forced Break ............................ ... ....................................... ... ... ... ... ........................................ 162
2.3.5 Control by Sequencer ................................................................................................................ 163
2.3.5.1 Setting Sequencer ....................... ... ....................................... ... ... ... .... .................................... 165
2.3.6 Real-time Trace ......................................................................................................................... 167
2.3.6.1 Setting Single Trace .............................................................. ................................................. 170
2.3.6.2 Multi Trace ......................... ... ....................................... ... .... ... ... .............................................. 171
2.3.6.3 Setting Methods of Multi Trace ............................................................................................... 174
2.3.6.4 Displaying Trace Data Storage Status ................................................................................... 176
2.3.6.5 Specify Displaying Trace Data Storage Status ....................................................................... 177
2.3.6.6 Display Format of Trace Data ................................................................................................. 178
2.3.6.7 Reading Trace Data On-the-fly .............................. ... ... ... ....................................... ... ... .... .. ..... 182
2.3.6.8 Saving Trace Data .................................................................................................................. 183
2.3.7 Measuring Performance ............................................................................................................ 184
2.3.7.1 Performance Measurement Procedures ................................................................................. 185
2.3.7.2 Display Performance Measurement Data ............................................................................... 187
2.3.8 Measuring Coverage ................................................................................................................. 188
2.3.8.1 Coverage Measurement Procedures ...................................................................................... 189
2.3.9 Real-time Monitoring ................................................................................................................. 192
2.3.10 Execution Time Measurement ................................................................................................... 193
2.3.11 Power-on Debugging ................................................................................................................. 195
2.3.12 RAM Checker .................................................... ... .... ... ....................................... ... ... .. ............... 196
2.3.13 Checking Debugger Information ........................... .... ... ... ... .... ...................................... ... .... ....... 200
2.4 Emulator Debugger (MB2147-05) .............................. .... ... ... ... .... ...................................... ... .... .. ..... 202
vii
2.4.1 Setting Operating Environment ................................................................................................. 203
2.4.1.1 Monitoring Program Automatic Loading ...................................... ... ....................................... . 204
2.4.1.2 MCU Operation Mode ............................................................................................................. 205
2.4.1.3 Debug Area ............................................................................................................................ 206
2.4.1.4 Memory Area Types ........................................................... ... ... ... ........................................... 207
2.4.1.5 Memory Mapping ............... ... ....................................... ... .... ... ... .............................................. 209
2.4.2 Notes on Commands for Executing Program ............................................................................ 211
2.4.3 Commands Available during Execution of User Program ......................................................... 213
2.4.4 Break ......................................................................................................................................... 214
2.4.4.1 Code Break ............................................................................................................................. 215
2.4.4.2 Data Break .............................................................................................................................. 217
2.4.4.3 Guarded Access Break ........................................................................................................... 218
2.4.4.4 Trace-Buffer-Full Break .................................................. .... ... ... ... ... ........................................ 219
2.4.4.5 Forced Break ............................ ... ....................................... ... ... ... ... ........................................ 220
2.4.5 Real-time Trace ......................................................................................................................... 221
2.4.5.1 Setting Trace ............................................................ ... ... .... .................................................... 223
2.4.5.2 Displaying Trace Data Storage Status ................................................................................... 224
2.4.5.3 Specifying Displaying Trace Data Start .................................................................................. 225
2.4.5.4 Display Format of Trace Data ................................................................................................. 226
2.4.5.5 Reading Trace Data On-the-fly .............................. ... ... ... ....................................... ... ... .... .. ..... 230
2.4.5.6 Saving Trace Data .................................................................................................................. 231
2.4.6 Measuring Execution Cycle Count .... ... ... ....................................... ... .... ... ... .............................. 232
2.5 Emulator Debugger (MB2198) ...... .... ... ....................................... ... ... ... ... ........................................ 233
2.5.1 Setting Operating Environment ................................................................................................. 234
2.5.1.1 Monitoring Program Automatic Loading ...................................... ... ....................................... . 235
2.5.1.2 Boot ROM File Automatic Execution ........................................... ... .... .................................... 236
2.5.1.3 MCU Operation Mode ............................................................................................................. 237
2.5.1.4 Operation Frequency Control ............................................. ...................................... ... .... .. ..... 238
2.5.2 Notes on Commands for Executing Program ............................................................................ 239
2.5.3 Commands Available during Execution of User Program ......................................................... 240
2.5.4 Break ......................................................................................................................................... 242
2.5.4.1 Code Break ............................................................................................................................. 243
2.5.4.2 Data Break .............................................................................................................................. 245
2.5.4.3 Guarded Access Break ........................................................................................................... 246
2.5.4.4 Sequential Break .................................................................................................................... 247
2.5.4.5 Trace-Buffer-Full Break .................................................. .... ... ... ... ... ........................................ 248
2.5.4.6 Performance-Buffer-Full Break ............................................................................................... 249
2.5.4.7 External Trigger Break ............................................................................................................ 250
2.5.4.8 Forced Break ............................ ... ....................................... ... ... ... ... ........................................ 251
2.5.5 Control by Sequencer ................................................................................................................ 252
2.5.5.1 Operating of sequencer .................. ....................................... ... ... ... .... .................................... 254
2.5.6 Real-time Trace ......................................................................................................................... 256
2.5.6.1 Setting Trace ............................................................ ... ... .... .................................................... 258
2.5.6.2 Displaying Trace Data Storage Status ................................................................................... 260
2.5.6.3 Specifying Displaying Trace Data Start .................................................................................. 261
2.5.6.4 Display Format of Trace Data ................................................................................................. 262
2.5.6.5 Saving Trace Data .................................................................................................................. 265
viii
2.5.7 Measuring Performance ............................................................................................................ 266
2.5.7.1 Performance Measurement Procedures ................................................................................. 267
2.5.7.2 Display Performance Measurement Data ............................................................................... 268
2.5.8 Execution Time Measurement ................................................................................................... 269
2.5.9 Power-On Debugging ................................................................................................................ 271
2.6 Emulator Debugger (MB2100-01) .............................. .... ... ... ... .... ...................................... ... .... .. ..... 272
2.6.1 Starting debugging .................................................................................................................... 273
2.6.1.1 Operating Environments of the Target ................................................................................... 274
2.6.1.2 Security ........................ ............. ............ ............. ............. .......... ............. ............. .................... 276
2.6.2 Ending debugging ...................................................................................................................... 277
2.6.3 Efficiently Executing Debugging ................................................................................................ 278
2.6.3.1 Increasing Communication Speed during Debugging ............................................................ 279
2.6.3.2 Switching Debug Function ...................................................................................................... 280
2.6.4 Executing Program .................................................................................................................... 281
2.6.4.1 Setting/Release of Debug Functions ...................................................................................... 282
2.6.4.2 Monitoring .......................... ................................................. .................................................... 284
2.6.4.3 Power-on Debug ..................................................................................................................... 285
2.6.4.4 Notes on Commands for Executing Program ......................................................................... 287
2.6.5 To Access the Flash Memory .................................................................................................... 289
2.6.6 To Interrupt the Program Execution [Break] .............................................................................. 293
2.6.6.1 Code Break (Hardware) .......................................................................................................... 294
2.6.6.2 Code Break (Software) ........................................................................................................... 296
2.6.6.3 Data Break .............................................................................................................................. 297
2.6.6.4 Forced Break ............................ ... ....................................... ... ... ... ... ........................................ 298
2.6.6.5 Data Watch Break .................................................................................................................. 299
2.6.6.6 Sequencer .............................................................................................................................. 301
2.6.7 Measuring the Program Execution Cycle Count ........................................................................ 304
2.6.8 Measuring Event-to-Event Execution Cycle Count [Performance Measurement] ..................... 306
2.6.8.1 Measuring Performance .............................................. ... .... ... ... ... ........................................... 308
2.6.9 Viewing Program Execution History [Trace] .............................................................................. 310
2.6.9.1 Displaying Trace Data ............................................................................................................ 312
2.6.9.2 Trace Data Display Examples (RAW Data) ............................................................................ 314
2.6.9.3 Trace Data Display Example (Instruction) .............................................................................. 315
2.6.9.4 Trace Data Display Example (Source) ................................................................................... 316
2.6.9.5 Saving Trace Data .................................................................................................................. 317
2.6.9.6 Searching for Trace Data ....................................................................................................... 318
2.6.10 How to Display the Output Message from User Program to the Debugger ............................... 319
2.6.11 Checking Debugger Information ........................... .... ... ... ... .... ...................................... ... .... ....... 321
2.7 Monitor Debugger ............................. ... ....................................... ... ... ... ... ........................................ 323
2.7.1 Resources Used by Monitor Program ....................................................................................... 324
2.7.2 Break ......................................................................................................................................... 325
2.7.2.1 Software Break ....................................................................................................................... 326
2.7.2.2 Forced Break ............................ ... ....................................... ... ... ... ... ........................................ 327
INDEX...................................................................................................................................329
ix
x
CHAPTER 1
BASIC FUNCTIONS
This chapter describes the basic functions on the SOFTUNE Workbench.
1.1 Workspace Management Function
1.2 Project Management Function
1.3 Project Dependence
1.4 Make/Build Function
1.5 Include Dependencies Analysis Function
1.6 Functions of Setting Tool Options
1.7 Error Jump Function
1.8 Editor Functions
1.9 Storing External Editors
1.10 Storing External Tools
1.11 Macro Descriptions Usable in Manager
1.12 Setting Operating Environment
1.13 Debugger Types
1.14 Memory Operation Functions
1.15 Register Operations
1.16 Line Assembly and Disassembly
1.17 Symbolic Debugging
1
CHAPTER 1 BASIC FUNCTIONS

1.1 Workspace Management Function

This section explains the workspace management function of SOFTUNE Workbench.
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.
Workspace Management Function
To manage two or more projects, workspace manages the following information:
• Project
• Active project
• Subproject
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.
Active Project
The active project is basic to workspace and undergoes [Make], [Build], [Compile/Assemble], [Start Debug], and [Update Dependence] in the menu. [Make], [Build], [Compile/Assemble], and [Update Dependence] affect the subprojects within the active project.
If workspace contains some project, it always has one active project.
Subproject
The subproject is a project on which other projects depend. The target file in the subpr oject 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 (ABS)-type project is specified as a subproject.
• A library (LIB)-type project is specified as a subproject.
Restrictions on Storage of Two or More Projects
Only one REALOS-type project can be stored in one workspace.
2
CHAPTER 1 BASIC FUNCTIONS

1.2 Project Management Function

This section explains the project management function of SOFTUNE Workbench.
Project Management Function
The project manages all information necessary for development of a microcontroller system. Especially, its major purpose is to manage information necessary for creation of a target file.
The project manages the following information:
- Project configuration
- Active project configuration
- Information on source files, include files, other object files, library files
- Information on tools executed before and after executing language tools (customize build function)
Project Format
The project file supports two formats: a 'workspace project format,' and an 'old project format.' The differences between the two formats are as follows:
Workspace project format
- Supports management of two or more project configurations
- Supports use of all macros usable in manager
- Does not support early Workbench versions(*)
Old project format
- Supports management of just one project configuration
- Limited number of macros usable in manager For details, see Section "1.11 Macro Descriptions Usable in Manager".
- Supports early Workbench versions(*)
When a new project is made, the workspace project format is used. When using an existing project, the corresponding project format is used. If a project made by an early Workbench version(*) is used, a dialog asking whether to convert th e file t o 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".
2
MC-16: V30L26 or earlier
*: F
Project Configuration
The project configuration is a series of settings for specifying the characteristics of a target file, and making, building, compiling and assembling is performed in project configurations.
Two or more project configurations can be created in a project. The default project configuration name is Debug. A new project configuration is created on the se tting 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
3
CHAPTER 1 BASIC FUNCTIONS
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
Active Project Configuration
The active project configuration at default undergoes [Make], [Build], [Comp ile/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 proj ect window and includes files detected in the Dependencies folder.
Note:
If a macro function newly added is used in old project format, the macro description is expanded at the time of saving in old project format. For the macro description newly added, refer to Section "1.11 Macro Descriptions Usable in Manager".
4
CHAPTER 1 BASIC FUNCTIONS

1.3 Project Dependence

This section explains the project dependence of SOFTUNE Workbench.
Project Dependence
If target files output by other projects must be linked, a subproject is defined in the project required in [Project] - [Project Dependence] menu. The subproject is a project on which other projects depend.
By defining project dependence, a subproject can be made an d built to link its target file b efore making and building the parent project.
The use of project dependence enables simultaneous making and building of two or m ore projects developed in one workspace.
A project configuration in making and building a subproject in [Project] - [Project Configuration] - [Build Configuration] menu can be specified.
5
CHAPTER 1 BASIC FUNCTIONS

1.4 Make/Build Function

This section explains the make/build function of SOFTUNE Workbench.
Make Function
Make function generates a target file by compiling/assembling only u pdated source files from all sou rce files registered in a project, and then joining all required object files.
This function allows compiling/assembling only the minimum of required files. The time required for generating a target file can be sharply reduced, especially, when debugging.
For this function to work fully, the dependence between source files and include files should be accurately grasped. To do this, SOFTUNE Workbench has a function for analyzing include dependence. To perform this function, it is necessary to understand the dependence of a source file and include file. SOFTUNE Workbench has the function for analyzing the include file dependence. For details, see Section "1.5 Include Dependencies Analysis Function".
Build Function
Build function generates a target file by compiling/assembling all source files registered with a project, regardless of whether they have been updated or not, and then by joining all required object files. Using this function causes all files to be compiled/assembled, resulting in the time re quired for gener ating the targ et 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.
6
CHAPTER 1 BASIC FUNCTIONS

1.4.1 Customize Build Function

This section describes the SOFTUNE Workbench to set the Customize Build function.
Customize Build function
In SOFTUNE Workbench, different tools can be operated automatically before and after executing the Assembler, Compiler, Linker, Librarian, Converter, or Configurator started at Compile, Assemble, Make, or Build.
The following operations can be performed automatically during Make or Build using this function:
- starting the syntax check before executing the Compiler,
- after executing the Converter, starting the S-format binary Converter (m2bs.exe) and converting Motorola S-format files to binary format files.
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 h a s the macros indicating that any file name and tool­specific options are specified as options.
Macro List
If any character string other than parameters is specified, it is passed directly to the tool. For details abo ut the parameters, see Section "1.11 Macro Descriptions Usable in Manager".
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 %(FILE) Load module file %(LOADMODULEFILE) Project file %(PRJFILE) Workspace file %(WSPFILE) Project directory %(PRJPATH) Target file directory %(ABSPATH) Object file directory %(OBJPATH) List file directory %(LSTPATH) Project construction name %(PRJCONFIG) Environment variable %(ENV[]) Temporary file %(TEMPFILE)
7
CHAPTER 1 BASIC FUNCTIONS
Note:
When checking [Use the Output window], note the following:
• Once a tool is activated, Make/Build is suspended until the tool is terminated.
• The Output window must not be used with a tool using a wait state for user input while the tool is executing. The user can not perform input while the Output window is in use, so the tool cannot be terminated. To forcibly terminate the tool, select the tool on the Task bar and input Control - C, or Control - Z.
8
CHAPTER 1 BASIC FUNCTIONS

1.5 Include Dependencies Analysis Function

This section describes the function of the Include Dependencies Analysis of SOFTUNE Workbench.
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 a built-in Include Dependencies Analysis function. Th is function can be activated by selecting the [Project] - [Include Dependencies] menu. By using this function, uses can know the exact dependencies, even if an include file includes another include file.
SOFTUNE Workbench automatically updates the dependenci e s of the com piled/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 execute the Include Dependencies command.
9
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.
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 sou rce files (common options) and th e 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
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 abo ut the
parameters, see Section "1.11 Macro Descriptions Usable in Manager". For details about the tool option s for each tool, see the manual of each tool.
10
CHAPTER 1 BASIC FUNCTIONS

1.7 Error Jump Function

This section describes the error jump function in SOFTUNE Workbench.
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 inform ation 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, th e modify error message formats for pre-installed Fujitsu language tools are defined as part of the system, these can not be modified.
Syntax
A new error message format should be added when working the Error Jump function with user register. To set Error Jump, execute the [Setup] - [Error Jump Setting] me nu.
An error message format can be described in Syntax. SOFTUNE Workbench uses macro descriptions as shown in the Table 1.7-1 to define such formats.
To analyze up to where %f, %h, and %* continue, SOFTUNE Workbench uses the character immediately after the above characters as a delimiter. Therefore, in Syntax, the description until a character that is used as a delimiter re-appears, is interpreted as a file name or a keyword for help, or i s 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
Characters Semantics
%f Interpret as source file name and inform editor. %l Interpret as line numb er and inform editor. %h Become keyword when searching help file. %* Skip any desired character. %[char] Skip as long as characters in [ ] continues.
11
CHAPTER 1 BASIC FUNCTIONS
[Example]
*** %f(%l) %h: or, %[*] %f(%l) %h:
The first four characters are "*** ", followed by the file name and parenthesized page number, and then the keyword for help continues after one blank character.
This represents the following message:
***C :\Sample\sample.c(100) E4062C: Syntax Error: near /int.
Reference Section
Setup Error Jump
12
CHAPTER 1 BASIC FUNCTIONS

1.8 Editor Functions

This section describes the functions of the SOFTUNE Workbench built-in standard editor.
Standard Editor
SOFTUNE Workbench has a built-in editor called the standard editor. The standard editor is activated as the Edit window in SOFTUNE Workbench. As many Edit windows as are required can be opened at one time.
The standard editor has the following functions in addition to regular editing functions.
- K e yword 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 j umps to the line. Once a book mark 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 function Tab stops can be specified by defining how many digits to skip when Tab codes are inserted. The default is 8.
- Font changing function The font size for character string displayed in the Edit window can be selected.
Reference Section
Edit Window (The Standard Editor)
13
CHAPTER 1 BASIC FUNCTIONS

1.9 Storing External Editors

This section describes the function to set an external editor to SOFTUNE Workbench.
External Editor
SOFTUNE Workbench has a built-in standard editor, and use of this standard editor is recommended. However, another accustomed editor can be used, with setting it, instead of an edit window. There is no particular limit on which editor can be set, but some precautions (below) may be necessary. Use the [Setup] ­[Editor setting] menu to set an external editor.
Precautions
- Error jump function The error jump cannot move the cursor to an error line if the external editor does not have a functi on to specify the cursor location when activated the external editor.
- File save at compiling/assembling SOFTUNE Workbench cannot control an external editor. Always save the file you are editing before compiling/assembling.
Setting Options
When activating an external editor from SOFTUNE Workbench, options must be add ed immediately after the editor name. The names of file to be opened by the editor and the initial location of the cursor (the li ne number). can be specified. SOFTUNE Workbench has a set of special parameters for specifying any file name and line number, as shown in the Table 1.9-1. If any other character string are described by these parameters, such characters string are passed as is to the editor.
%f (File name) is determined as follows:
1. If the focus is on the SRC tab of Project window, and if a valid file name is selected, the selected file
2. When a valid file name cannot be acquired by the above procedure, the file name w ith a focus in the
%x (project path) is determined as follows:
1. If a focus is on the SRC tab of project w indow and a valid file name is selected, the project path is a
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 edi tor, there are line
numbers to which there will be no correct jump if the entire option is not given double-quotes.
name becomes the file name.
built-in editor becomes the file name.
path to the project in which the file is stored.
14
Table 1.9-1 List of Special Characters for Analyzing Error Message
Parameter Semantics
%% Means specifying % itself
%f Means specifying file name %l Means specifying line number
%x Means specifying project path
Example of Optional Settings
Table 1.9-2 Example of Optional Settings
Editor name Argument
WZ Editor V4.0 %f /j%l MIFES V1.0 %f+%l UltraEdit32 %f/%l/1
CHAPTER 1 BASIC FUNCTIONS
TextPad32 %f(%l) PowerEDITOR %f -g%l Codewright32 %f -g%l Hidemaru for Win3.1/95 /j%l:1 %f ViVi /line=%l %f
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".
15
CHAPTER 1 BASIC FUNCTIONS

1.10 Storing External Tools

This section describes the function to set an external tool to SOFTUNE Workbench.
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 control 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] - [Setting Tool] menu. To select the title of a set tool, use the [Setup] - [Activating Tool] menu.
Setting Options
When activating an external tool from SOFTUNE Workbench, options must be added immediately after the external tool name. Specify the file names, and unique options, etc.
SOFTUNE Workbench has a set of special parameters for specifying any file name and unique tool options. If any characters string described other than these parameters, such characters string are passed as is to the
external tool. For details about the parameters, see Section "1.11 Macro Descriptions Usable in Manager".
Note:
When checking [Use the Output window], note the following:
• 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.
Reference Section
Setting Tools Starting Tools
16
Loading...
+ 324 hidden pages