Thank you for purchasing the C checker, Softune C Checker.
The C checker, Softune C Checker (referred to as the C Checker in the remainder of this
manual), is a built-in development support tool that accepts source programs written in C as
input and points out coding errors as well as lines where performance can be improved.
The Softune C Checker runs on Windows XP, Windows Me, Windows 2000, Windows 98 and
Windows NT 4.0.
This manual is written for those who wish to use this system to check C source programs.
This system can check those C source programs that conform to the "American National
Standard for Information System Programming Language C, X3.159-1989" (referred to as the
ANSI standard in the remainder of this manual).
Readers of this manual require familiarity with the basic operation of Windows XP, Windows Me,
Windows 2000, Windows 98 or Windows NT 4.0 as well as the basic knowledge of the C
language specifications.
For an explanation of the C language specifications, see the "Programming Language C JIS X
3010-1993" or any other book on C conforming to the ANSI standard.
■ Trademarks
SOFTUNE is a trademark of FUJITSU LIMITED.
Microsoft, Windows, and Windows NT are registered trademarks of Microsoft Corporation in the
U.S. and other countries.
The names of products and systems appearing in this manual are trademarks or registered
trademarks of their respective companies.
■ Configuration of this manual
To get an overview of this system, read Chapter 1, "Overview."
To learn how to use this system to check a source program, read Chapter 2, "Checking
Procedures."
To learn how to set the check conditions for the source program to be checked, read Chapter 3,
"Setting up Check Options."
To learn how to handle the source program file to be checked, read Chapter 4, "File," Chapter 5,
"Edit," and Chapter 6, "Search."
To learn how to display and manipulate windows, read Chapter 7, "View" and Chapter 12,
"Window."
To learn how to manage source program projects, read Chapter 8, "Project."
To learn how to display and manipulate diagnostic messages, read Chapter 9, "Message."
To learn how to compile source programs, read Chapter 10, "Compile."
To learn how to set the compiler environment, read Chapter 11, “Setup.”
To learn how to manipulate help files, read Chapter 13, "Help."
i
This manual consists of the following twelve chapters:
Chapter 1 Overview
This chapter provides an overview of using the C Checker to check C source programs.
Chapter 2 Checking Procedures
This chapter explains the procedures required to use the C Checker to check a C source
program.
Chapter 3 Setting up Check Options
This chapter explains how to set up check conditions.
Chapter 4 File
This chapter explains how to manipulate files.
Chapter 5 Edit
This chapter explains how to use the Edit menu.
Chapter 6 Search
This chapter explains how to use the Search menu.
Chapter 7 View
This chapter explains the View menu.
Chapter 8 Project
This chapter explains how to create and manipulate projects.
Chapter 9 Message
This chapter explains how to display and manipulate diagnostic messages.
Chapter 10 Compile
This chapter explains how to compile programs.
Chapter 11 Setup
This chapter explains the setup operation.
Chapter 12 Window
This chapter explains how to display and manipulate windows.
Chapter 13 Help
This chapter explains how to display and manipulate help files.
Chapter 14 Sorting of the Diagnostic Message
This chapter explains how to sort and manipulate diagnostic message.
ii
■ Related manual
When using this system, refer to the following manual as required:
•“FR/F
2
MC Family Softune C Compiler Manual”
The contents of this document are subject to change without notice. Customers are advised to consult
•
with FUJITSU sales representatives before ordering.
The information and circuit diagrams in this document are presented as examples of semiconductor
•
device applications, and are not intended to be incorporated in devices for actual use. Also, FUJITSU is
unable to assume responsibility for infringement of any patent rights or other rights of third parties arising
from the use of this information or circuit diagrams.
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 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.
If any products described in this document represent goods or technologies subject to certain restrictions
•
on export under the Foreign Exchange and Foreign Trade Law of Japan, the prior authorization by
Japanese government will be required for export of those products from Japan.
2002 FUJITSU LIMITED Printed in Japan
iii
Reading This Manual
■ Product name abbreviation
In this manual and this product, product names are designated as follows:
SOFTUNE is designated as Softune.
2
F
MC is designated as FFMC.
®
The Microsoft
The Microsoft
The Microsoft
the Microsoft
Windows NT 4.0.
The Microsoft
the Microsoft
the Microsoft
the Microsoft
Windows 2000.
The Microsoft
the Microsoft
Windows® 98 operating system is abbreviated to Windows 98.
®
Windows® Millennium Edition operating system is abbreviated to Windows Me.
®
Windows NT® Workstation operating system Version 4.0 and
®
Windows NT® Server network operating system Version 4.0 are abbreviated to
®
Windows® 2000 Professional operating system,
®
Windows® 2000 Server operating system,
®
Windows® 2000 Advanced Server operating system and
®
Windows® 2000 Datacenter Server operating system are abbreviated to
®
Windows® XP Professional operating system and
®
Windows® XP Home Edition operating system are abbreviated to Windows XP.
■ Note on descriptions
The figures and screen examples presented in this manual are those that appear when
Windows 98 is used. Depending on the OS, environment, machine type, and resolution, your
screen may look slightly different.
1.1Softune C Checker .................................................................................................................................2
2.1Starting the C Checker .........................................................................................................................24
2.2Selection of a Source File .....................................................................................................................25
2.3Setting up Check Options .....................................................................................................................30
2.4Starting a Check ...................................................................................................................................31
2.5Aborting a Check ..................................................................................................................................36
2.6Exiting from the C Checker ...................................................................................................................37
CHAPTER 3 Setting up Check Options .............................................................................39
4.1File Menu ..............................................................................................................................................52
4.2Dialog Box of the [Open] Command .....................................................................................................54
4.3Dialog Box of the [Save as] Command .................................................................................................55
4.4Dialog Box of the [Print Set] Command ................................................................................................56
5.1Edit Menu .............................................................................................................................................60
6.1Search Menu ........................................................................................................................................62
6.2Dialog Box of the [Find in Current File] Command ...............................................................................64
6.3Dialog Box of the [Replace] Command .................................................................................................65
6.4Dialog Box of the [Find in Files] Command ..........................................................................................66
6.5Dialog Box of the [List Tag] Command .................................................................................................67
7.1View Menu ........................................................................................................................................... 70
7.3Status Bar ............................................................................................................................................ 73
8.1Project Menu ........................................................................................................................................ 86
8.2Creating a New Project ........................................................................................................................ 88
9.1Message Menu .................................................................................................................................... 94
10.1Compile Menu ...................................................................................................................................... 98
10.2Setting up fcc911s Compiler Options ................................................................................................... 99
10.2.1Detailed options for the fcc911s preprocessor ............................................................................. 102
10.2.2Detailed options related to the fcc911s language specifications .................................................. 106
10.2.3Detailed optimization options of the fcc911s compiler .................................................................. 108
10.2.4Detailed options related to fcc911s output .................................................................................... 111
10.3Setting up fcc907s Compiler Options ................................................................................................. 112
10.3.1Detailed options for the fcc907s preprocessor ............................................................................. 115
10.3.2Detailed options related to the fcc907s language specifications .................................................. 119
10.3.3Detailed optimization options of the fcc907s compiler .................................................................. 121
10.3.4Detailed options related to fcc907s output .................................................................................... 123
10.4Setting up fcc896s Compiler Options ................................................................................................. 125
10.4.1Detailed options for the fcc896s preprocessor ............................................................................. 128
10.4.2Detailed options related to the fcc896s language specifications .................................................. 132
10.4.3Detailed optimization options of the fcc896s compiler .................................................................. 134
10.4.4Detailed options related to fcc896s output .................................................................................... 136
10.5Setting up ANSI Compiler Options ..................................................................................................... 138
10.5.1Detailed options for the ANSI preprocessor ................................................................................. 140
11.1Setup Menu ....................................................................................................................................... 146
12.1Window Menu .................................................................................................................................... 152
vi
CHAPTER 13 Help .............................................................................................................153
13.1Help Menu ..........................................................................................................................................154
CHAPTER 14 Sorting of the diagnostic message ..........................................................155
14.1Pop-up menu of the diagnostic message ...........................................................................................156
14.2Sorting of the diagnostic message ......................................................................................................157
INDEX ...................................................................................................................................167
vii
viii
CHAPTER 1Overview
This chapter provides an overview of using the C Checker to check C source
programs.
1.1Softune C Checker
1.2Function Outlines
1
CHAPTER 1 Overview
1.1Softune C Checker
The Softune C Checker is a tool that accepts source programs written in C as input to
point out the lines where quality and performance can be improved and to display and
to print diagnostic messages useful in software development. This tool offers
information effective for improving the efficiency of program development and object
code. This tool supports the built-in functions of C compilers for FUJITSU
microcontrollers.
■ Effects of using the Softune C Checker
The C Checker assists in meeting the following needs:
•Removes coding mistakes in early stages.
•Gives new programs a thorough review in a short time.
•Writes high-quality code (even for novices in C).
•Writes high-performance code.
•Allows non-FUJITSU CPU software resources to be used with FUJITSU CPUs.
•Understands the features of FUJITSU C compilers
2
1.2 Function Outlines
1.2Function Outlines
The functions provided by the C Checker are largely divided into the following groups.
This section briefly explains these groups, in the indicated order.
• Check
• Set check conditions
• File
•Edit
•Search
•View
• Project management
• Diagnostic message
• Compile
•Setup
• Window
•Help
■ Check
Contains functions for pointing out the lines with a problem found in a source program.
■ Set checking conditions
Contains functions for setting check conditions according to the purpose.
■ File
Contains functions for creating, displaying, saving, and printing files.
■ Edit
Contains functions assisting in editing a source program to reflect diagnostic results.
■ Search
Contains functions for searching for a character string through the file being edited.
■ View
Contains functions used to display a variety of windows.
■ Project management
Contains functions for managing the source programs to be checked.
■ Diagnostic message
Contains functions used to display the messages for the lines with a problem found.
■ Compile
Contains functions for compiling a source program in which diagnostic results have been
reflected.
3
CHAPTER 1 Overview
■ Setup
Contains functions for customizing the internal editor and for setting the environment of the
compiler which has already been installed.
■ Window
Contains functions for changing the state of a window.
■ Help
Contains functions for displaying, searching for, and printing function outlines and operating
instructions.
4
1.2 Function Outlines
1.2.1Check
The check functions are for outputting messages calling the user's attention to the
problem lines in a source program. It contains the functions for selecting the file to be
checked and for setting up check options. These functions enable the user to easily
view the problem lines in a program, according to the purpose.
■ Files that can be checked
The C Checker can check C source files.
■ Selecting the file to be checked
Select the source file to be checked by the C Checker. A source file can be selected as
described below. A file can also be selected by using the corresponding buttons located in the
check tool bar.
❍ File being edited
A check can be performed on the active window of the file opened by the editor.
❍ Selected file in a project
A check can be performed on the file selected in the project management window.
In the project management window, select a file as described below:
•To select a single file: Click it with the left mouse button.
•To select multiple files: Press and hold down the Control key and click them with the
left mouse button; or press and hold down the Shift key and click them with the left
mouse button.
❍ All files in a project
A check can be performed on all files in a project.
5
CHAPTER 1 Overview
■ Setting up check options
The following conditions can be set:
❍ Check mode
•Target compiler
•Chip classification
•Target MCU
❍ Language
❍ Quality
•Portability
•Extended specification
•Possibility of coding mistake
•Maintainability
•Porting mode
❍ Performance
•Architecture independent
•Architecture dependent
❍ Other options
•Include path
•Macro definition
•Suppressing messages
6
1.2 Function Outlines
1.2.2Set check conditions
The functions in this group are for setting check conditions. Choosing the [Set up
check options] command from the [Check] menu displays the [Set up check options]
dialog box, in which check conditions can be selected. These functions enable the user
to specify check conditions appropriate to the purpose.
■ Check mode
Select the target compiler and target MCU to be used by the C Checker.
The options set up in the [Set up check options] dialog box can be saved in a file by using the
[Save information file] button.
An existing check option information file can be opened by using the [Open information file]
button.
This is very useful because it enables multiple check option patterns to be stored.
The file identifier of a check option information file is “.cif.”
7
CHAPTER 1 Overview
■ Include paths
Set up the include path of the header file used with the source file to be checked by the C
Checker.
To register an include path, enter the include path name directly in the column. Alternatively,
click the [Browse] button to display the folder browse dialog box and enter the include path.
Click the [Add] button to register the entered include path.
Registered include paths are used, starting from the uppermost one, to search for the files to be
included.
It is possible to change the order in which paths are registered and to delete registered paths.
■ Macro definitions
Set up the macro definitions used in the source file to be checked by the C Checker. To register
a macro definition, enter the macro name directly in the column. Click the [Add] button to register
the entered macro name. Registered macros are defined starting from the uppermost one. It is
possible to change the order in which the macro names are registered and to delete registered
names. If macro definitions with the same name are registered, the macro definition registered
last takes precedence.
■ Suppressing messages
Set the numbers of the messages that the C Checker is to suppress.
To suppress the message number, the check box of the number which wants to be suppressed
id checked. If the icon + in front of the check box is clicked, the suppress of a more detailed
message becomes possible.
8
1.2 Function Outlines
1.2.3Files
The functions in this group are for manipulating source program files. These functions
enable the user to save and print corrected source program files.
■ New
Creates a new file.
A file with no title is opened on the editor.
■ Open
Opens an existing file.
Choosing the [Open] command from the [File] menu displays the dialog box for opening a file.
From this dialog box, select the file to be opened and click the [Open] button, and the file is
opened.
Either the “*.c” or “*.*” file type can be selected so that files of that file type can be displayed.
By default, files with the “.c” file identifier are displayed.
■ Close
■ Overwrite
■ Save as
■ Print
Closes an open file.
If the open file has been modified, a confirmation message dialog box appears asking whether
the contents of the file should be saved.
Saves an open file, overwriting its previous contents. If the open file is a newly created one, the
Save as dialog box appears.
Saves an open file with a name.
In the Save as dialog box, the locations in which the file can be saved are displayed as well as
the directories and files saved in them.
Either the “*.c” or “*.*” file type can be selected so that files of that file type can be displayed.
By default, files with the “.c” file identifier are displayed.
Prints an open file.
Selecting the [Print] command from the [File] menu displays the [Print] dialog box.
In the dialog box, specify the printer to be used, printing range, number of copies, and other
detailed printing information. Then click the [OK] button, to begin printing.
■ Print preview
Displays what is to be printed in a window.
Printing can be started by selecting the [Print] dialog box from this window.
9
CHAPTER 1 Overview
■ Recent File
Stores the names of up to five previously opened files.
If more than five files are opened, the excess names are removed from the list, beginning with
the oldest one.
■ Exit SOFTUNE C checker
Exits from the C Checker.
If any open file has not been saved, a conformation message dialog box appears asking whether
the contents of the file should be saved.
10
1.2 Function Outlines
1.2.4Edit
The functions in this group are for editing source programs. The cutting and pasting
operations can be performed on the file being edited. These functions enable the user
to efficiently correct the lines in the source program that require attention as indicated
by the check function.
■ Undo
Undoes the immediately preceding editing operation.
■ Redo
Redoes the immediately preceding undo operation.
■ Cut
Cuts a selected portion and copies it to the clipboard.
■ Copy
Copies a selected portion to the clipboard.
■ Paste
■ Delete
■ Select all
Pastes the contents of the clipboard to the cursor position.
Deletes a selected portion.
Selects all files.
11
CHAPTER 1 Overview
1.2.5Search
The functions in this group are for searching for a character string through the source
program opened on the editor. They include the functions for specifying search
conditions, setting tags during search, and jumping to tags. These functions enable
the user to efficiently search for the desired character string on the editor.
■ Search
Searches for a character string through the file being edited.
If Search is chosen, the search dialog box appears.
■ Replace
Replaces a character string in the file being edited.
If Replace is chosen, the replace dialog box appears.
■ Find in Files
Search a string on some file in the target directory.
■ Tag
■ Jump
For a search from a file, the [Find in Files] dialog box is displayed.
The following tag operations can be performed in the file being edited:
❍ Jump Tag Next (Down)
Jumps to the next tag.
❍ Jump Tag Next (Up)
Jumps to the previous tag.
❍ Add Tag (or Delete Tag)
Adds tags to or deletes tags from the line on which the cursor is positioned.
❍ Delete Tag All
Deletes all tags.
❍ List Tag
Displays a list of tags.
Note: To delete diagnostic message jump tags, use [Delete all tags].
Allows the user to select the line to jump to, from among a specified line, last line, and first line.
12
1.2 Function Outlines
1.2.6View
The view functions are for turning tool bars and windows on or off and for customizing
a variety of windows and the editor. These functions enable the user to change screen
settings freely.
■ Tool bars
Turns the following tool bars on or off.
•Standard tool bar
•Check tool bar
•Window state changing tool bar
•Find tool bar
■ Status bar
Turns the status bar on or off.
■ Window
■ Customize
Turns the following windows on or off:
•Project management window
•Diagnostic message window
•Check log display window
Allows customization of font type and size for the following windows. It also provides a function
which allows all windows to be reset to their standard settings.
•Project management window
•Diagnostic message window
•Check log display window
•Standard built-in editor
In addition, the editor can be customized as follows:
•Show the New Line
•Show the EOF
•Show the Ruler
•Show the Line Number
•Automatic Indent
•Show double-byte blank
•Show the Tab and Number of Tabs
•Highlighting the keywords
13
CHAPTER 1 Overview
1.2.7Project management
The project management functions are for managing the source program to be
checked. They include the following functions:
• Create a new project
• Use an existing project
• Create a project from Softune Workbench project file
These functions enable the user to manage source programs for all projects.
■ Project files
The file identifier for project files is “.cpj”.
■ Create a project
Creates a new project or Creates a project from Softune Workbench project file.
In the dialog box, specify the desired project name and project file folder name.
The folder browse dialog box can be displayed to specify the desired project file folder.
The dialog box for allocating networked drives can also be displayed.
In the dialog box, the name of the drive to which a networked drive is to be allocated can be
specified and an actual path can be selected.
In addition, reconnection at logon can be set.
In a project file folder, the “Summary” folder, the “Output” folder and the option files (extension is
.opt) are created. The “Summary” folder will contain summary information for each file. The
“Output” folder will contain output files that make by C compiler. The option files are used by the
project.
■ Select a project
To select an existing project, choose the [Open] command from the [Project] menu. The [Open]
dialog box appears. From this box, select the desired project file.
■ Save a project
Saves the contents of a project.
If the project contains a file that has been edited, a confirmation message dialog box appears
asking whether the contents of the file should be saved.
The project can be renamed before being saved.
■ Load a file into a project
Loads a file into an open project to register the file.
14
To load a file, specify the file name in the dialog box. The file names with identifiers “.” and “.h”
can be specified.
1.2 Function Outlines
1.2.8Diagnostic message
The diagnostic message functions are used to display information about the lines that
have been checked. Display information includes file names, line numbers with a
problem found, message numbers, simple messages, and file path names. Doubleclicking the file name at the beginning of a diagnostic message or another item causes
a jump to the line with a problem found in the source program. These functions enable
the user to find problem lines in the source program quickly. By choosing Detailed
message from the popup menu, which is displayed by clicking the right mouse button,
a detailed message displayed and diagnostic message can be sorted.
■ Diagnostic messages
The check results are displayed in the diagnostic message window.
The messages displayed in the diagnostic message window are in the following format.
The diagnostic message format is as follows:
Figure 1.2-a The diagnostic message format
The diagnostic message functions are as follows:
❍ Open
Reads a diagnostic message file to display the diagnostic messages in the diagnostic
message window.
❍ Close
Closes the displayed diagnostic message file.
❍ Save
Saves the displayed diagnostic messages into a file.
❍ Save as
Saves the displayed diagnostic messages with another name.
❍ Print
Prints the displayed diagnostic messages.
The three commands, [Open], [Save], [Save as], and [Print] are effective only when diagnostic
messages are displayed.
15
CHAPTER 1 Overview
■ Format for detailed messages
Detailed messages are displayed in help format. These messages contain the following items.
A “program example,” “program correction example,” and “hint” can be displayed in a popup
window by clicking their respective buttons with the left mouse button.
❍ Detailed explanation of what problem was found in the line
Explains what problem was found in the line and how to correct it.
❍ Sample program
Shows a program example that could be output messages for a problem found.
❍ Program correction plan
Proposes an example of correcting the line with a problem found in the checked program.
❍ Key advice
Shows a hint etc. for coding.
❍ Related items
Displays a list of similar items. Other detailed messages can be retrieved and displayed
from the list.
16
1.2 Function Outlines
1.2.9Compile
The compile functions are for compiling a source program. The following compilers
can be selected:
• fcc911s (compiler for the FR Family)
• fcc907s (compiler for the F2MC-16 Family)
• fcc896s (compiler for the F2MC-8L Family)
• ANCI (ANSI compiler)
These functions enable the user to translate and verify a source program in which the
lines with a problem found by a check have been corrected. To use the Compile
functions, either compiler must be installed.
■ File to be compiled
Select the file to be compiled. The following files can be selected.
A file can also be selected using the Compile button in the check tool bar.
•File being edited
■ Select the compiler
Select the compiler used with the C Checker.
The following compilers can be selected:
•File selected in a project
•All files in a project
•fcc911s (compiler for the FR Family)
2
•fcc907s (compiler for the F
•fcc896s (compiler for the F
•ANSI (ANSI compiler)
MC-16 Family)
2
MC-8L Family)
17
CHAPTER 1 Overview
■ Compile options
This function allows the user to set up the options for the selected compiler. The following
options can be set up. The options that have been set up can be verified.
❍ Target compiler
❍ Language
❍ Chip classification
❍ Optimization level
❍ Warning level
Select the target C compiler.
Select the language of message which the compiler outputs.
Select the chip classification.
Set the optimization level for the compiler.
Set the warning level for the compiler.
❍ Translation control
Select the range in which translation is to be executed.
❍ Memory model
Specify the memory model of target CPU. (fcc907s only)
❍ Target MCU
Specify the target MCU.
❍ Output the debug information
Specify whether to output the debug information.
❍ Suppress reading of default option file
Specify whether to suppress the reading of the default option file.
❍ Output the used stack information
Specify whether to output used stack information.
❍ Position the const variables on RAM
Specify whether to position the const variables on RAM. (fcc907s only)
❍ Details of options
•Preprocessor: Set up the detailed options for the preprocessor.
18
•Language specification: Set up the detailed options for the language specifications.
•Optimization: Set up the detailed options for optimization.
•Output object: Set up the detailed options for output.
❍ Other options
Sets up the other options specifiable for the compiler directly.
Loading...
+ 154 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.