E HEWrn 0 B
E HEWrn 0 B
Version 1.2
Release Note
HS6400EWIW1SE-RN000901
Rev. 1.2
September 1, 2000
Hitachi Company or Division
The time kept by a computer differs between computers. The time when a source file or an
output file is updated differs depending on a computer. It may happen that building a project can
be incorrect because of difference of times kept by computers if a source file or a output file is
shared via network. If such problem occurs, build a project using [Build-> Build All].
When you build a project on the network an error might occur depending on the conditioin of the
network. For example, a C/C++ compiler might output the following error message
When you add a file on a remote drive on the network via [Project-> Add Files…] or else, the
HEW might cause an application error depending on the condition of the network. In this case,
try to add the file to the project again. If application errors occur many times, consider copying
the file to a local drive then adding to the project.
With the syntax coloring capability of the HEW, comments and keywords in a source program
file are colored. But the syntax coloring of the HEW editor does not work correctly depending on
the way the source code is written. Disable the syntax coloring if you are not satisfied with the
syntax coloring. To disable it, select [Tools->Options…], uncheck “Enable Syntax Coloring” on
the “Editor” tab of the “Tools Options” dialog box, and click the OK button.
Try to avoid using the * characters and the / characters placed adjacent to each other in a C/C++
source file unless you specify a comment.
The HEW scans an include file of a C/C++ source file to show dependencies of source files on
the “Projects” tab of the “Workspace” window and to decide whether to build a file or not. Even
though the source code is syntactically correct, it may happen that a scan error is detected; that
an include file which is not actually included might be shown as a dependent file; or that an
include file which is included might not be shown as a dependent file. In these cases, (a) build all
files by selecting [Build->Build All] or (b) select the source file in the “Projects” tab of the
“Workspace” window and select [Build->Build File].
#define DEF 1
#ifdef DEF
void func(void)
{
}
#else
int func(int a)
{
}
cpp is a standard extension for the C++ source file group in the HEW while cpp, cp, and cc are
standard extensions for C++ source file in the C/C++ compiler of the Hitachi toolchain. If you
add cp or cc as a file extension to a file group, the file group must be the C++ source file group.
If cp or cc were added to the C source file group, a file with a file extension of cp or cc would be
compiled as a C++ source file instead of as a C source file. If you specify the “–lang=c” option
in the “User defined options” field of the “Other” tab of an option dialog box of the C/C++
compiler, a file will be compiled as a C source file regardless of its file extension.
If you add an extension other than cpp, cp, or cc to the C++ source file group, the HEW
regards a file with such an extension as C source file. For example, if cxx were added to the
C++ source file group, a file with the extension would be compiled as a C source file. If you
specify the “–lang=cpp” option in the “User defined options” field of the “Other” tab of an
option dialog box of a C/C++ compiler, a file will be compiled as a C++ source file regardless of
its file extension.
1.11 Note on the Format tab of the Tools Options dialog box
This is a note on the “Define Keywords” dialog box, which is launched when the “Add…”
button or the “Keywords…” button is clicked on the “Format” tab of the “Tools Options” dialog
box launched via [Tools->Options…]. On the “Keyword” field of the “Add Keyword” dialog
box launched by clicking the “Add…” button on the “Define Keywords” dialog box, specify a
1.12 Supplement to the Build tab of the Tools Options dialog box
This is a note on the “Stop build if no. of errors exceed” controls on the “Build” tab of the “Tools
Options” dialog box launched via [Tools-> Options…]. Note the following descriptions when
you check the check box and specify a number to the controls.
(1) “Stop build if no. of errors exceed” is not applied to a custom phase defined by a user. This
is applied only to system phases such as the C/C++ Compiler, the Assembler, the IM
OptLinker and the Stype Converter supplied from Hitachi.
(2) “no. of errors” in the statement means the number of errors output from an execution of a
tool. The total number of errors in more than one execution of a tool is irrelevant to “Stop
build if no. of errors exceed”. For example, the build stops when one execution of the
C/C++ Compiler outputs more than the number specified. If the number of errors output
from each compilation is no more than the specified number, the build does not stop even
though the total number of errors in more than one compilation exceeds the specified
number.
(3) The build stops after the whole phase is done. For example, suppose you compile more than
one file in a build. Even though the number of errors in the first compilation exceeds the
specified number, the HEW continues compilation of the other files and stops the build after
finishing the whole compiler phase.
(4) When the number of errors in one execution of a tool exceeds the specified number, the
number of error messages displayed on the “Output” window is the specified number plus
one. A message saying that the number of error has exceeded the specified number is NOT
displayed on the “Output” window.
The same things as “Stop build if no. of errors exceed” shown above hold also in “Stop build if
no. of warnings exceed”. There is no correlation between “Stop build if no. of errors exceed” and
“Stop build if no. of warnings exceed”. They are independent.
(1) Open the “Start” menu of Windows®, select “Program”, select “Hitachi Embedded
Workshop” and select “HIM to HEW Project Converter”.
(2) Double click HimToHew.exe which is installed in the same directory as HEW.EXE.
This section will describe how to convert a single HIM project into a HEW workspace and
a HEW project using the “Single” tab (figure 3.2.1.1)
(1) In the “HIM Project filename” field, specify a path of a HIM project database file, whose file
extension is “*.him”. You have two ways to specify the path. One is to type the path
manually into the “HIM Project filename” field. The other is to use the “Browse…” button.
When you click the “Browse…” button, the “Select project filename” dialog box (figure
3.2.1.2) will be displayed. Open the directory in which a HIM project database file exists, and
double click the project database file or select the file and click the “Select” button.
(2) In the “HEW workspace name” field on the “Single” tab, specify a workspace name. Use
only alphanumerics or an underscore (‘_’) in a workspace name.
(3) Click the “Convert” button, then conversion will start. The “Total complete” meter shows the
progress of the conversion. When the conversion finishes, “Project converted successfully”
will be shown in the “Results” field (figure 3.2.1.3).
HimToHew.exe will create a HEW workspace file whose directory path is the same as the file
specified in the “HEW Project filename” field, whose file name is the name specified in the
“HEW workspace name” field, and whose file extension is “*.hws”. Also HimToHew.exe
creates a HEW project database file which has the same file path as the HIM project database file
except that the extension is changed from “*.him” to “*.hws”.
This section will describe how to use the “Multiple” tab (figure 3.2.2.1). Using the “Multiple”
tab, you can convert multiple HIM projects in a directory and in its subdirectories into HEW
projects at a time and register them into a HEW workspace.
(1) In the “Workspace directory” field, specify a directory path under which one or more HIM
project database files (“*.him”) exist. When you choose the directory, note that all the HIM
project database files in this directory and its subdirectories will be converted at a time and
will be registered to a HEW workspace.
You have two ways to specify the directory path. One is to type the directory path manually
into the “Workspace directory” field. The other is to use the “Browse…” button. When you
click the “Browse…” button, the “Select workspace directory” dialog box (figure 3.2.2.2)
(2) In the “HEW workspace name” field on the “Multiple” tab, specify a workspace name. Use
only alphanumerics or an underscore (‘_’) in a workspace name.
(3) In the “CPU family” field, select a CPU family of the projects to be converted. Select one of
“SuperH RISC engine” or “H8S,H8/300” from the drop-down list.
(4) Click the “Convert” button, then the conversion will start. The “Current project” meter shows
the progress of conversion of a current project database file. “Total complete” meter shows
the overall progress of the conversion. The “Status” field shows a temporary status of the
conversion. The “Results” field shows a HIM project database file being converted. When
the conversion finishes, “XX project(s) converted successfully” will be displayed in the
“Results” field (figure 3.2.2.3).
HimToHew.exe will create a HEW workspace file whose directory path is the directory path file
specified in the “Workspace directory” field, whose file name is the name in the “HEW
workspace name” field, and whose file extension is “*.hws”. Also HimToHew.exe creates a
HEW project database file which has the same file path as each HIM project database file except
that the extension is changed from “*.him” to “*.hws”.
(1) External tools shown on the HIM toolbar will not be converted into the HEW.
(2) A build phase which is not shown on the “Build Order” tab of the “Phase Order” dialog box
of the HIM project builder will not be converted into the HEW. To launch the “Phase Order”
dialog box, select [Options->Build Phases…] on the HIM project builder and click the
“Phase Order…” button on the “Build Phases” dialog box.
(3) The output filename is unchangeable in the HEW. The filename here means a filename
excluding a directory path and a file extension. In the HIM, you can change a filename. In
HEW, however, you cannot change a filename. In table 3.4.1, output file groups whose
filenames are unchangeable by a user are shown.
(4) Furthermore, the output directory of some files will be fixed to $(CONFIGDIR) after
conversion into the HEW. In table 3.4.2, output file groups whose output directories are
unchangeable by a user are shown.
(5) You have a restriction regarding the “-speed=inline” option of H8S,H8/300 C Compiler
Version 2.x in the HIM. In this version of the compiler, you can not specify a number to the
“inline” sub-option. In version 3.0 or greater, however, you can do so. When options of
version 2.x of H8S,H8/300 C Compiler of the HIM are converted to those of version 3.0A of
H8S,H8/300 C/C++ Compiler of the HEW, the “speed=inline” options will be converted as
shown in table 3.4.3.
Table 3.4.3 Conversion of –speed=inline option from ver. 2.x of H8S,H8/300 C Compiler
HIM HEW
H8S,H8/300 C Compiler option window H8S,H8/300 C/C++ Compiler option window
Optimize tab Optimize tab
Speed Sub-options group Speed sub-options group
Inline Expansion check box Maximum nodes of inline function
checked 105
unchecked 0 (same as without –speed=inline)
(6) You will have a restriction regarding the “-optimize” option of the H8S,H8/300 Inter-Module
Optimizer. On the “Optimize” tab of SH IM OptLinker in the HEW, selecting “All” from the
“Optimize” drop-down list has the same result as selecting “Customize” from the drop-down
list and checking all the sub-options. But graphical representations of the selections are
different. In H8S,H8/300 IM Optimizer Ver. 1.x in the HIM, the “Optimize” tab does not
have a drop-down list as the HEW does, and sub-options are specified only though check
boxes. If all the sub-options are checked in H8S,H8/300 IM Optimizer Ver. 1.x, they will be
converted into “All” in HEW. The same conversion method holds in the “Safe” and “Speed”
options.
After you convert the HIM project into the HEW, the output file from the custom phase will
not be input to SH IM OptLinker or H8S,H8/300 IM OptLinker automatically. To solve this
problem, add a file mapping to a HEW project in the way shown below.
File group:
“Object file” (if OBJ is an extension of an output file of the custom phase.)
“Relocatable file” (if REL is an extension of an output file of the custom phase.)
“Library file” (if LIB is an extension of an output file of the custom phase.)
Source phase:
The name of the custom phase
Destination phase:
SH IM OptLinker or H8S,H8/300 IM OptLinker
For example, suppose you have added a file group, “aaa source file”, to a HIM project and
have defined a multiple phase “aaa phase”, which takes the “aaa source file” file group as
input, as a custom phase in the project. Also suppose that you have specified a file path,
whose file extension is OBJ, on the “Output Files” tab of the “aaa phase Options” dialog box
via [Options->aaa phase]. After you convert this HIM project into the HEW, define a file
mapping as shown in figure 3.4.1 on the “Define File Mapping” dialog box. Thus an OBJ file
generated from the “aaa phase” will be input to SH IM OptLinker or H8S,H8/300 IM
OptLinker automatically in build.
(8) A HIM project cannot be converted into the HEW if a user has added to the project an
extension which is the same as an extension already defined in the HEW and the file group
the extension belongs to differs from the file group of the extension in the HEW. In this case,
open the project with the HIM, remove that extension from the HIM project, and then convert
the project into the HEW again.
For example, assume that, to a HIM project, a user has added an extension, “INC”, in a
“ASM header file” file group, which is defined by a user. In the HEW, the extension, “INC”,
is defined as an extension in the “Assembly include file” file group instead of the “ASM
header file” file group. When you convert the HIM project into the HEW with
HimToHew.exe, an error message shown in figure 3.4.2 will be displayed. In this case, open
the HIM project with the HIM and remove the extension, “INC”, from the project. Then
convert it into the HEW again.
For another example, assume that, to a HIM project, a user has added an extension, “INC”,
in the “Assembly source file” file group, which is already defined by the HEW. But in the
HEW, the extension, “INC”, is defined as an extension in the “Assembly include file” file
group instead of the “Assembly include file” file group. When you convert the HIM project
into the HEW with HimToHew.exe, an error message shown in figure 3.4.3 will be displayed.
In this case, open the HIM project with the HIM and remove the extension, “INC”, from the
project. Then convert it into the HEW again.
(9) If you have added a custom phase whose input file group is the “Preprocessed C Source file”
or “Preprocessed C++ Source file” file group of the HIM to a HIM project, you need to
modify the project after conversion into the HEW. You need to remove that custom phase
from the HEW project. Then add the phase again as a custom phase whose input file group is
“Preprocessed C source file” or “Preprocessed C++ source file” if necessary.
(10) If you have added a file group whose name is the same as one of file groups shown in
table 2.2.1, “Standard File Extensions of the Hitachi Toolchains” EXCEPT for the cases of
the letters, you need to modify the project converted into the HEW. You need to remove all
the file extensions of that file group from the converted HEW project. (To do so, you might
need to remove a custom phase whose input file group is that file group and a project file in
that file group.) Then reconstruct your settings if necessary.
1 ― X X X
2 X X O
3 ■ ■ X X O
4 X O X
5 X O X
6 ■ ■ X X O
7 ■ ■ X O X
8 ■ ■ X O X
9 ■ ■ ■ X O X
10 O X X
11 O X O
12 ■ ■ X X O
13 O X X
14 O X O
15 ■ ■ X X O
16 ■ ■ X O X
17 ■ ■ X O X
18 ■ ■ ■ X O X
19 ■ ■ O X X
21 ■ ■ ■ O X O
22 ■ ■ O X X
23 ■ ■ O X X
24 ■ ■ ■ O X O
25 ■ ■ ■ O X X
26 ■ ■ ■ O X X
27 ■ ■ ■ ■ O X O