1. All information included in this document is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please
confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to
additional and different inform ation to be disclosed by Renesas Electronics such as that disclosed through our website.
2. Renesas Electronics does not assume any liability for infringement of patents, copyrig hts, or other intellectual property rights
of third parties by or arising from the use of Renesa s Electronics products or technical information described in this document.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights
of Renesas Electronics or others.
3. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, w hether in whole or in part.
4. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software,
and information in the design of your equipment. Renesas Electronics assumes no responsi bility for any losses incurred by
you or third parties arising from the use of these circuits, software, or information.
5. When exporting the products or technology described in this document, you should comply with the applicable export control
laws and regulations and follow the procedures required by such laws and regulations. You sho uld not use Renesas
Electronics products or the technolog y described in this document for any purpose relating to military applications or use by
the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and
technology may not be used for or incorporate d into any products or systems whose manufac ture, use, or sale is prohibited
under any applicable domestic or foreign laws or regulations.
6. Renesas Electronics has used reasonable ca re in preparing the information included in this document, but Renesas Electronics
does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages
incurred by you resulting from errors in or omissions from the information included herein.
7. Renesas Electronics products are classified according to the following three quality grades: “Standard”, “High Quality”, and
“Specific”. The recommended applications for each Renesas Electronics product depends on the product’s quality grade, as
indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular
application. You may not use any Renesa s Electronics product for any application categorized as “Specific” without the prior
written consent of Renesas Electronic s. Further, you may not use any Renesas Electronics product for any application for
which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way
liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an
application categorized as “Spec ific” or for which the product is not intended where you have failed t o obtain the prior written
consent of Renesas Electronics. The quality grade of each Renesas Electronics product is “Standard” unless otherwise
expressly specified in a Renesas Electronics data sheets or data books, etc.
“Standard”: Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
“Specific”: Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or
8. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics,
especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and othe r product characteristics. Renesas Elec tronics shall have no liability for malfunctions or
damages arising out of the use of Renesa s Electronics products beyond such specified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of its products, se miconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further,
Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measure s to
guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a
Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire
control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because
the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system
manufactured by you.
10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental
compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable
laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS
Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with
applicable laws and regulations.
11. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this
document or Renesas Electronics products, or if you have any other inquiries.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majority-
owned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
equipment; home electronic applianc es; machine tools; personal electronic equipment; and industrial robots.
crime systems; safety equipment; and medical equipment not specifically designed for life support.
systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare
intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life.
User’s Manual
Stub Generator
V.1.00
User’s Manual
Renesas Microcomputer
Development Environment
System
Rev.1.01 2008.03
Notes regarding these materials
1. This document is provided for reference purposes only so that Renesas customers may select the appropriate
Renesas products for their use. Renesas neither makes warranties or representations with respect to the
accuracy or completeness of the information contained in this document nor grants any license to any
intellectual property rights or any other rights of Renesas or any third party with respect to the information in
this document.
2. Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising
out of the use of any information in this document, including, but not limited to, product data, diagrams, charts,
programs, algorithms, and application circuit examples.
3. You should not use the products or the technology described in this document for the purpose of military
applications such as the development of weapons of mass destruction or for the purpose of any other military
use. When exporting the products or technology described herein, you should follow the applicable export
control laws and regulations, and procedures required by such laws and regulations.
4. All information included in this document such as product data, diagrams, charts, programs, algorithms, and
application circuit examples, is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas products listed in this
document, please confirm the latest product information with a Renesas sales office. Also, please pay regular
and careful attention to additional and different information to be disclosed by Renesas such as that disclosed
through our website. (http://www.renesas.com )
5. Renesas has used reasonable care in compiling the information included in this document, but Renesas
assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information
included in this document.
6. When using or otherwise relying on the information in this document, you should evaluate the information in
light of the total system before deciding about the applicability of such information to the intended application.
Renesas makes no representations, warranties or guaranties regarding the suitability of its products for any
particular application and specifically disclaims any liability arising out of the application and use of the
information in this document or Renesas products.
7. With the exception of products specified by Renesas as suitable for automobile applications, Renesas
products are not designed, manufactured or tested for applications or otherwise in systems the failure or
malfunction of which may cause a direct threat to human life or create a risk of human injury or which require
especially high quality and reliability such as safety systems, or equipment or systems for transportation and
traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication
transmission. If you are considering the use of our products for such purposes, please contact a Renesas
sales office beforehand. Renesas shall have no liability for damages arising out of the uses set forth above.
8. Notwithstanding the preceding paragraph, you should not use Renesas products for the purposes listed below:
(1) artificial life support devices or systems
(2) surgical implantations
(3) healthcare intervention (e.g., excision, administration of medication, etc.)
(4) any other purposes that pose a direct threat to human life
Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who
elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas
Technology Corp., its affiliated companies and their officers, directors, and employees against any and all
damages arising out of such applications.
9. You should use the products described herein within the range specified by Renesas, especially with respect
to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas shall have no liability for malfunctions or
damages arising out of the use of Renesas products beyond such specified ranges.
10. Although Renesas endeavors to improve the quality and reliability of its products, IC products have specific
characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use
conditions. Please be sure to implement safety measures to guard against the possibility of physical injury, and
injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for
hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other applicable measures. Among others, since the
evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or
system manufactured by you.
11. In case Renesas products listed in this document are detached from the products to which the Renesas
products are attached or affixed, the risk of accident such as swallowing by infants and small children is very
high. You should implement safety measures so that Renesas products may not be easily detached from your
products. Renesas shall have no liability for damages arising out of such detachment.
12. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written
approval from Renesas.
13. Please contact a Renesas sales office if you have any questions regarding the information contained in this
document, Renesas semiconductor products, or if you have any other inquiries.
Preface
This manual describes how to use the stub generator. Read this manual and understand it well
before using the stub generator.
Notes on Descriptions
RPCGEN Abbreviation for the stub generator
Prefix Prefix 0x indicates a hexadecimal number. Numbers with no prefix are
decimal.
\ ‘\’ is the directory delimiter.
[Menu -> Menu item] ‘->’ leads to the menu item (e.g. File -> Save).
$(xxxx) Custom placeholder in the High-performance Embedded Workshop
i
Trademarks
All trademarks and registered trademarks belong to their respective owners.
1. TRON is an acronym formed from "The Real Time Operating system Nucleus". ITRON is
short for "Industrial TRON" and µITRON is short for "Micro Industrial TRON".
TRON, ITRON, and µITRON are the names of computer specifications and do not indicate
specific products or groups of products.
The µITRON4.0 specification is an open realtime-kernel specification defined by the TRON
Association. The µITRON4.0 specification can be downloaded from the TRON Association
homepage (
http://www.assoc.tron.org).
The copyright of the µITRON specification belongs to the TRON Association.
2. Microsoft® and Windows® are registered trademarks of Microsoft Corporation in the United
States and/or other countries. The formal name of Windows® is Microsoft Windows Operating
System.
3. All other product names are trademarks or registered trademarks of the respective holders.
Renesas Technology Homepage
Various support information are available on the following Renesas Technology homepage:
The stub generator (hereafter referred to as RPCGEN) is a tool used to generate the source code of
the client and server stubs that are required whenever the remote procedure call (RPC) facility of
the HI7200/MP realtime operating system is to be used. A config file is created by using a text
editor and then input to RPCGEN, which creates the source code of the client and server stubs.
C o n fig file
RPCGEN
Source code of the client
and server stubs
Figure 1.1 Overview of RPCGEN
Rev. 1.01 Mar. 17, 2008 Page 1 of 128
REJ10J1822-0101
Section 1 Overview
1.2 Operating Environment
RPCGEN is provided as a Perl script file. Table 1.1 shows the operating environment.
Table 1.1 Operating Environment
Item Operating Environment
Realtime OS HI7200/MP V.1.00 Release 00 or later
Perl environment We have confirmed correct execution of RPCGEN by ActivePerl
5.8.8.820 (for Windows® (x86)) produced by ActiveState Software Inc.
ActivePerl is available for free download from the following Web site:
http://www.activestate.com/Products/activeperl/
Host machine Any machine with Windows® XP (32 bits) or Windows® 2000 as the
operating system
Rev. 1.01 Mar. 17, 2008 Page 2 of 128
REJ10J1822-0101
Section 2 Installation
Section 2 Installation
2.1 Downloading
RPCGEN can be downloaded for free from the Renesas Web site at the following URL.
http://www.renesas.com
2.2 Installing RPCGEN
The file for downloading has been compressed in the zip format. Expanding the zip file generates
the files listed in table 2.1. These files must be stored in a suitable folder.
Table 2.1 Files Provided as RPCGEN
Filename Description
rpcgen.pl Main body of RPCGEN
rpcgen_clnt.pm
rpcgen_svr.pm
rpcgen_info.pm
rpcgen_misc.pm
Package modules for use by the main body of RPCGEN
Rev. 1.01 Mar. 17, 2008 Page 3 of 128
REJ10J1822-0101
Section 2 Installation
Rev. 1.01 Mar. 17, 2008 Page 4 of 128
REJ10J1822-0101
Section 3 Functions and Files Generated by RPCGEN
Section 3 Functions and Files Generated by RPCGEN
3.1 Functions Generated by RPCGEN
Figure 3.1 shows the functions generated by RPCGEN.
Client
Client-
init ia lization
function
Server
Server-
init ialization
function
C lient-s t u b
functions
Client-
shutdown
fun ctio n
Figure 3.1 Functions Generated by RPCGEN
Server-stub
functions
Server-
shutdown
fun ctio n
Rev. 1.01 Mar. 17, 2008 Page 5 of 128
REJ10J1822-0101
Section 3 Functions and Files Generated by RPCGEN
3.1.1 Client
(1) Client-initialization function
This function initiates the connection with the server. Specifying CLNT_NOINIT prevents the
creation of the client-initialization function.
(2) Client-shutdown function
This function ends the connection with the server. Specifying CLNT_NOSHUTDOWN prevents
the creation of the client-shutdown function.
(3) Client-stub functions
Each of these functions makes an RPC call and has the same API as or an API similar to the server
function. If SVRAUTH has not been specified, the API will be the same as that of the server
function. Specifying CLNTSTUB prevents the creation of a specific client-stub function.
3.1.2 Server
(1) Server-initialization function
This function starts up the server. Specifying SVR_NOINIT prevents the creation of the serverinitialization function.
(2) Server-shutdown function
This function shuts the server down. Specifying SVR_NOSHUTDOWN prevents the creation of
the server-shutdown function.
(3) Server-stub functions
Each of these functions is called back from the RPC library and then calls a server function.
Specifying SVRSTUB prevents the creation of a specific server-stub function, while specifying
SVRFUNC allows the name of the called server function to be replaced.
Rev. 1.01 Mar. 17, 2008 Page 6 of 128
REJ10J1822-0101
Section 3 Functions and Files Generated by RPCGEN
3.2 Files Generated by RPCGEN
RPCGEN generates the files listed in table 3.1 in accord with the name of the config file.
Table 3.1 Files Generated by RPCGEN
Filename Description Definition of the File Location
<config file>_clnt.c Client-stub source file CLNTS option or
CLNT_SOURCEPATH in the config file
<config file>_clnt.h Client-stub header file
<config file>_private.h Internal header file for the
client stub
<config file>_svr.c Server-stub source file SVRS option or SVR_SOURCEPATH
<config file>_svr.h Server-stub header file SVRI option or SVR_INCPATH in the
<config file>_public.h Header file for the client and
server stubs
When the config file is “sample.x,” for example, RPCGEN will generate the following files:
sample_clnt.c, sample_clnt.h, sample_svr.c, sample_svr.h, sample_private.h, and sample_public.h.
CLNTI option or CLNT_INCPATH in
the config file
in the config file
config file
PUBI option or PUB_INCPATH in the
config file
To temporarily save information during the process of file generation, RPCGEN also generates
intermediate files in the current directory. The names of these intermediate files consist of two
underscores (“__”) appended before the filenames given in the table above.
This file contains definitions required for use of the client-stub functions, client-initialization
function, and client-shutdown function. The definitions include prototype declarations of the
client-stub functions, client-initialization function, and client-shutdown function.
Rev. 1.01 Mar. 17, 2008 Page 7 of 128
REJ10J1822-0101
Section 3 Functions and Files Generated by RPCGEN
(3) <config file>_private.h (internal header file for the client stub)
This is a header file included by <config file>_clnt.c only.
(4) <config file>_svr.c (server-stub source file)
This file contains the server-stub functions, server-initialization function, server-shutdown
function, and server-stub function table.
(5) <config file>_svr.h (server-stub header file)
This file contains definitions required for use of the server-initialization function and servershutdown function. The definitions include prototype declarations of the server-stub functions,
server-initialization function, and server-shutdown function.
(6) <config file>_public.h (header file for the client and server stubs)
This is a header file for the client and server applications. For details, refer to section 8.9, <config
file>_public.h.
Rev. 1.01 Mar. 17, 2008 Page 8 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
Section 4 Executing RPCGEN
4.1 Executing RPCGEN
RPCGEN must be executed from the command prompt as follows.
<rpcgen path> is a path to the directory where RPCGEN has been installed.
<config file> refers to a file describing the specifications of the client and server stubs to be
generated. This file must be created by the user. The standard filename extension for the config
file is “.x”, which must not be omitted when the name is entered in a command line.
After execution of the above command, RPCGEN will generate the C-language source files and
header files for the client and server stubs in accord with the information contained in the config
file.
If <config file> and <option> are omitted, the command syntax will be shown.
Rev. 1.01 Mar. 17, 2008 Page 9 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
4.2 Options
4.2.1 PUBI
Format:
PUBI="<path>"
Description:
This option is used to specify the path for output of <config file>_public.h. If this option is used, a
definition of PUB_INCPATH in the config file is ignored.
4.2.2 CLNTS
Format:
CLNTS="<path>"
Description:
This option is used to specify the path for output of <config file>_clnt.c. If this option is used, a
definition of CLNT_SOURCEPATH in the config file is ignored.
4.2.3 CLNTI
Format:
CLNTI="<path>"
Description:
This option is used to specify the path for output of <config file>_clnt.h and
<config file>_private.h. If this option is used, a definition of CLNT_INCPATH in the config file
is ignored.
Rev. 1.01 Mar. 17, 2008 Page 10 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
4.2.4 SVRS
Format:
SVRS="<path>"
Description:
This option is used to specify the path for output of <config file>_svr.c. If this option is used, a
definition of SVR_SOURCEPATH in the config file is ignored.
4.2.5 SVRI
Format:
SVRI="<path>"
Description:
This option is used to specify the path for output of <config file>_svr.h. If this option is used, a
definition of SVR_INCPATH in the config file is ignored.
Rev. 1.01 Mar. 17, 2008 Page 11 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
4.3 Executing RPCGEN as a Build Phase in the High-performance
Embedded Workshop
After RPCGEN has been registered as a custom build phase in the workspace, it will be
automatically executed at the time of building.
(1) Defining Custom Placeholders
The following two custom placeholders must be defined.
• Path to RPCGEN
[Placeholder]: RPCGEN_INST
[Description]: RPCGEN Base directory
[Directory]: Directory under which RPCGEN is stored
• Path to Perl.exe
[Placeholder]: PERL_INST
[Description]: Perl Base directory
[Directory]: Directory under which perl.exe is stored
To define a custom placeholder, follow the procedure below.
Select [Setup->Customize] from the menu bar of the High-performance Embedded Workshop.
Then select the [Placeholders] tab of the [Customize] dialog box. Choose either [Application wide
custom placeholders] or [Workspace wide custom placeholders] and click on the [Add] button.
This opens the [New Custom Placeholder] dialog box shown in figure 4.1. Define the two custom
placeholders in this dialog box by filling in the information given above.
Figure 4.1 [New Custom Placeholder] Dialog Box
Rev. 1.01 Mar. 17, 2008 Page 12 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
(2) Adding a File Extension
To make execution as a custom build phase work, the filename extension “.x” for config files must
be added as a filename extension to be used in custom build phases. Select [Project->File
Extensions] from the menu bar of the High-performance Embedded Workshop. This opens the
[File Extensions] dialog box shown in figure 4.2.
Figure 4.2 [File Extensions] Dialog Box
Clicking the [Add] button opens the [Add File Extension] dialog box shown in figure 4.3. Add the
extension “.x” as shown in the figure.
Rev. 1.01 Mar. 17, 2008 Page 13 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
Figure 4.3 [Add File Extension] Dialog Box
Rev. 1.01 Mar. 17, 2008 Page 14 of 128
REJ10J1822-0101
Section 4 Executing RPCGEN
(3) Creating the RPCGEN Custom Build Phase
Select [Build->Build Phases] from the menu bar of the High-performance Embedded Workshop.
This opens the [Build Phases] dialog box shown in figure 4.4.
Figure 4.4 [Build Phases] Dialog Box
Clicking on the [Add] button invokes the [New Build Phase] wizard (figure 4.5).
[Phase name]: Any name defined by the user (“rpcgen” in this example)
[Command]: $(PERL_INST)\perl.exe
[Default options]: -I $(RPCGEN_INST) $(RPCGEN_INST)\rpcgen.pl $(FULLFILE)
[Initial directory]: $(FILEDIR)
Although no environment variables need to be added for RPCGEN, you can add environment
variables for the Perl environment as required.
Creation of the RPCGEN custom build phase is now complete.
Next, the syntax for messages about RPCGEN must be defined. After the syntax has been defined,
the corresponding config file (*.x) will be opened in response to double-clicking on an RPCGEN
error message output in the [Build] window of the High-performance Embedded Workshop.
In the [Build Phases] dialog box shown in figure 4.4, select “rpcgen” and click on the [Modify]
button. The [Modify rpcgen] dialog box opens. Select the [Output Syntax] tab and type in the
syntax for errors shown in figure 4.9.
Figure 4.9 [Add Output Syntax] Dialog Box
Rev. 1.01 Mar. 17, 2008 Page 18 of 128
REJ10J1822-0101
Loading...
+ 114 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.