Renesas CC-RL User Manual

User’s Manual
CS+
User’s Manual: CC-RL Build Tool Operation
Target Device
RL78 Family
Target Version
V3.00.00 or higher
All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by Renesas Electronics Corp. without notice. Please review the latest information published by Renesas Electronics Corp. through various means, including the Renesas Electronics Corp. website (http://www.renesas.com).
www.renesas.com
Rev.1.09 2020.11
Notice
1. 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 or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2. Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other claims involving patents, copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical information described in this document, including but not limited to, the product data, drawings, charts, programs, algorithms, and application examples.
3. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others.
4. You shall not alter, modify, copy, or reverse engineer any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copying or reverse engineering.
5. Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended applications for each Renesas Electronics product depends on the product's quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key
Unless expressly designated as a high reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesas Electronics products are not intended or authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems; surgical implantations; etc.), or may cause serious property damage (space system; undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user's manual or other Renesas Electronics document.
6. When using Renesas Electronics products, refer to the latest product information (data sheets, user's manuals, application notes, "General Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat dissipation characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions, failure or accident arising out of the use of Renesas Electronics products outside of such specified ranges.
7. Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specific characteristics, such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Unless designated as a high reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesas Electronics products are not subject to radiation resistance design. You are responsible for implementing safety measures to guard against the possibility of bodily injury, injury or damage caused by fire, and/or danger to the public in the event of a failure or malfunction of Renesas Electronics products, 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 and imp responsible for evaluating the safety of the final products or systems manufactured by you.
8. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. You are responsible for carefully and sufficiently investigating applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics products in compliance with all these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
9. Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You shall comply with any applicable export control laws and regulations promulgated and administered by the governments of any countries asserting jurisdiction over the parties or transactions.
10. It is the responsibility of the buyer or distributor of Renesas Electronics products, or any other party who distributes, disposes of, or otherwise sells or transfers the product to a third party, to notify such third party in advance of the contents and conditions set forth in this document.
11. This document shall not be reprinted, 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.
(Note1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its directly or indirectly controlled
subsidiaries.
(Note2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
electronic appliances; machine tools; personal electronic equipment; industrial robots; etc.
financial terminal systems; safety control equipment; etc.
ractical, you are
Corporate Headquarters Contact Information
TOYOSU FORESIA, 3-2-24 Toyosu,
Koto-ku, Tokyo 135-0061, Japan
www.renesas.com
For further information on a product, technology, the most up-to-date version of a document, or your nearest sales office, please visit:
www.renesas.com/contact/
Trademarks
Renesas and the Renesas logo are trademarks of Renesas Electronics Corporation. All trademarks and registered trademarks are the property of their respective owners.
© 2020 Renesas Electronics Corporation. All rights reserved.
(Rev.4.0-1 November 2017)
How to Use This Manual
This manual describes the role of the CS+ integrated development environment for developing applications and sys-
tems for RL78 family, and provides an outline of its features.
CS+ is an integrated development environment (IDE) for RL78 family, integrating the necessary tools for the develop-
ment phase of software (e.g. design, implementation, and debugging) into a single platform.
By providing an integrated environment, it is possible to perform all development using just this product, without the
need to use many different tools separately.
Readers This manual is intended for users who wish to understand the functions of the CS+ and
design software and hardware application systems.
Purpose This manual is intended to give users an understanding of the functions of the CS+ to use
for reference in developing the hardware or software of systems using these devices.
Organization This manual can be broadly divided into the following units.
1.GENERAL
2.FUNCTIONS A.WINDOW REFERENCE
How to Read This Manual It is assumed that the readers of this manual have general knowledge of electricity, logic
circuits, and microcontrollers.
Conventions Data significance: Higher digits on the left and lower digits on the right
Active low representation: XXX Note: Footnote for item marked with Note in the text Caution: Information requiring particular attention Remarks: Supplementary information Numeric representation: Decimal ... XXXX
(overscore over pin or signal name)
Hexadecimal ... 0xXXXX
TABLE OF CONTENTS
1. GENERAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2. FUNCTIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 Create a load module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.2 Create a user library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Speeding-up of Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Running simultaneous build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.2 Running parallel build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Set the Type of the Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.1 Change the output file name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.2 Output an assemble list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.3 Output map information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.4 Output library information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Set Compile Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.1 Perform optimization with the code size precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.2 Perform optimization with the execution speed precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.3 Add an include path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.4 Set a macro definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.5 Set Assemble Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5.1 Add an include path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5.2 Set a macro definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.6 Set Link Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.6.1 Add a user library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.6.2 Prepare for using the overlaid section selection function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.7 Set Hex Output Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.7.1 Set the output of a hex file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.7.2 Fill the vacant area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.8 Set Create Library Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.8.1 Set the output of a library file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.9 Set Build Options Separately. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.9.1 Set build options at the project level. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.9.2 Set build options at the file level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.10 Efficiently Allocate Variables and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.11 Automatically Update the I/O Header File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.12 Estimate the Stack Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A. WINDOW REFERENCE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
A.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Revision Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C - 1
CS+ 1. GENERAL

1. GENERAL

This chapter explains the overview of the build tool plug-in of CC-RL.

1.1 Overview

The build tool plug-in can be used to set build options for creating load modules or user libraries.

1.2 Features

The features of the build tool plug-in are shown below.
- Build option setting Most build options can be set via the graphical user interface (GUI).
- Speeding-up of build Two types of facilities are provided to speed up build: simultaneous build and parallel build. The build time can be shortened in simultaneous build by simultaneously compiling or assembling the files with a sin­gle call of the build command and in parallel build by executing multiple build commands in parallel.
R20UT3284EJ0109 Rev.1.09 Page 6 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2. FUNCTIONS

This chapter describes the build procedure using CS+ and about the main build functions.

2.1 Overview

This section describes how to create a load module and user library.

2.1.1 Create a load module

The procedure for creating a load module is shown below.
Remark See "CS+ Integrated Development Environment User’s Manual: Project Operation" for details about (1),
(2), (3), (8), and (9).
(1) Create or load a project
Create a new project, or load an existing one.
(2) Set a build target project
Set a build target project.
(3) Set build target files
Add or remove build target files and update the dependencies.
(4) Set speeding-up of build
Set a build speed-up facility as required (see "2.2Speeding-up of Build").
(5) Set the type of the output file
Select the type of the load module to be generated (see "2.3Set the Type of the Output File").
(6) Set build options
Set the options for the compiler, assembler, linker, and the like (see "2.4Set Compile Options", "2.5Set Assemble
Options", "2.6Set Link Options", and the like).
(7) Set the update method of the I/O header file
Update the I/O header file in accordance with the update of the device file (see "2.11Automatically Update the I/O
Header File").
(8) Run a build
Run a build.
Remark If there are any commands you wish to run before or after the build process, on the Property panel,
from the [Common Options] tab, in the [Others] category, set the [Commands executed before build processing] and [Commands executed after build processing] properties. If there are any commands you wish to run before or after the build process at the file level, you can set them from the [Individual Compile Options] tab (for a C source file) and [Individual Assemble
Options] tab (for an assembly source file).
(9) Save the project
Save the setting contents of the project to the project file.
R20UT3284EJ0109 Rev.1.09 Page 7 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.1.2 Create a user library

The procedure for creating a user library is shown below.
Remark See "CS+ Integrated Development Environment User’s Manual: Project Operation" for details about (1),
(2), (3), (6), and (7).
(1) Create or load a project
Create a new project, or load an existing one. When you create a new project, set a library project.
(2) Set a build target project
Set a build target project.
(3) Set build target files
Add or remove build target files and update the dependencies.
(4) Set speeding-up of build
Set a build speed-up facility as required (see "2.2Speeding-up of Build").
(5) Set build options
Set the options for the compiler, assembler, librarian, and the like (see "2.4Set Compile Options", "2.5Set Assem-
ble Options", "2.8Set Create Library Options").
(6) Run a build
Run a build.
Remark If there are any commands you wish to run before or after the build process, on the Property panel,
from the [Common Options] tab, in the [Others] category, set the [Commands executed before build processing] and [Commands executed after build processing] properties. If there are any commands you wish to run before or after the build process at the file level, you can set them from the [Individual Compile Options] tab (for a C source file) and [Individual Assemble
Options] tab (for an assembly source file).
(7) Save the project
Save the setting contents of the project to the project file.
R20UT3284EJ0109 Rev.1.09 Page 8 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.2 Speeding-up of Build

The build speed-up facilities of this build tool are described here.
There are the following types of build speed-up facilities.
Simultaneous build Multiple files are simultaneously passed by a single call of the build command.
See "2.2.1Running simultaneous build" for details about simultaneous build.
Parallel build Multiple build commands are executed in parallel.
See "2.2.2Running parallel build" for details about parallel build.

2.2.1 Running simultaneous build

Simultaneous build is a facility to simultaneously compile or assemble the files with a single call of the ccrl command
when there are multiple files to be built.
An image of calling the ccrl command is shown below.
Example When build target files are aaa.c, bbb.c, and ccc.c
- When a build is run simultaneously
>ccrl aaa.c bbb.c ccc.c <- "aaa.obj", "bbb.obj", and "ccc.obj" are generated. >rlink aaa.obj bbb.obj ccc.obj <- "aaa.abs" is generated.
- When a build is not run simultaneously
>ccrl aaa.c <- "aaa.obj" is generated. >ccrl bbb.c <- "bbb.obj" is generated. >ccrl ccc.c <- "ccc.obj" is generated. >rlink aaa.obj bbb.obj ccc.obj <- "aaa.abs" is generated.
Whether to run a build simultaneously is made with the property. Select the build tool node on the project tree and select the [Common Options] tab on the Property panel. Select [Yes] in the [Build simultaneously] property in the [Build Method] category.
Figure 2.1 [Build simultaneously] Property
Remark 1. The files with the individual build options and files to be executed prior to the build are excluded from run-
ning build simultaneously. A build of the file that is not targeted for a simultaneous build is run separately.
Remark 2. If the source file is older than the generated object module file or related properties and project or the like,
the object module file will be used for the build instead of the source file.
Another facility to speed up build is parallel build. See "2.2.2Running parallel build" for details about parallel build.
R20UT3284EJ0109 Rev.1.09 Page 9 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.2.2 Running parallel build

Parallel build is a facility to build multiple source files in parallel at build in order to reduce the build time. In parallel build, since build is performed simultaneously for the number of logical CPUs in the host machine, the effect
is greater in a machine with a large number of CPU cores.
There are two types of parallel build facilities. Each processing and its setting method are given below.
(1) Parallel build between source files
When running parallel build between multiple source files registered in a project, make the setting in the [Build in parallel] property in the [Common Options] tab on the Property panel.
Figure 2.2 [Build in parallel] Property
Remark Another facility to speed up build is simultaneous build.
Simultaneous build is a facility to process the build command for multiple source files at once, and specifying it simultaneously with parallel build has no effect due to its nature. Generally, the more CPU cores there are in the host machine in use or the more source files there are registered in a project, parallel build is faster than simultaneous build. However, as there are properties that need to be used together with simultaneous build, such as inter-module optimization, use the suitable facility for the situation. See "2.2.1Running simultaneous build" for details about simultaneous build.
(2) Parallel build between projects
When running parallel build between the main project and subprojects, make the setting in [Enable parallel build among projects] of the [General - Build] category of the Option dialog box.
Figure 2.3 Option Dialog Box ([General - Build] Category)
In addition, select [Yes] in the [Build in parallel] property in the [Common Options] tab on the Property panel.
Remark When there are dependencies between projects, set the dependencies between the projects cor-
rectly before using the parallel build facility. If a parallel build is performed for the main project and subprojects without the dependencies being set, build is performed in parallel regardless of the build order of the projects. For details on setting the dependencies between projects, see "CS+ Integrated Development Envi­ronment User's Manual: Project Operation".
R20UT3284EJ0109 Rev.1.09 Page 10 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.3 Set the Type of the Output File

Set the type of the file to be output as the product of the build. Select the build tool node on the project tree and select the [Common Options] tab on the Property panel. Select the file type in the [Output file type] property in the [Output File Type and Path] category.
Figure 2.4 [Output file type] Property
(1) When [Execute Module(Load Module File)] is selected (Default)
The load module file will be the debug target.
(2) When [Execute Module(Hex File)] is selected
The hex file will be the debug target.
Caution For the library project, this property is always [Library] and cannot be changed.

2.3.1 Change the output file name

The names of the load module file, hex file, and library file output by the build tool are set as follows by default.
Load module file name: %ProjectName%.abs Hex file name: %ProjectName%.mot Library file name: %ProjectName%.lib
Remark "%ProjectName%" is a placeholder. It is replaced with the project name.
The method to change these file names is shown below.
(1) When changing the load module file name
Select the build tool node on the project tree and select the [Link Options] tab on the Property panel. Enter the file name to be changed to in the [Output file name] property in the [Output File] category.
Figure 2.5 [Output file name] Property
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
Remark You can also change the option in the same way with the [Output file name] property in the [Fre-
quently Used Options(for Link)] category on the [Common Options] tab.
(2) When changing the hex file name
Select the build tool node on the project tree and select the [Hex Output Options] tab on the Property panel. Enter the hex file name to be changed to in the [Output file name] property in the [Output File] category.
Figure 2.6 [Output file name] Property
This property supports the following placeholders.
R20UT3284EJ0109 Rev.1.09 Page 11 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
%ActiveProjectName%: Replaces with the active project name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
Remark You can also change the option in the same way with the [Output file name] property in the [Fre-
quently Used Options(for Hex Output)] category on the [Common Options] tab.
If the [Hex file format] property in the [Hex Format] category is changed, the following message dialog box will open.
Figure 2.7 Message Dialog Box
When [Yes] is selected in the dialog box, the extension of the output file name is changed according to the format selected in the [Hex file format] property.
Figure 2.8 [Output file name] and [Hex file format] Property
(3) When changing the library file name
Select the build tool node on the project tree and select the [Create Library Options] tab on the Property panel. Enter the library file name to be changed to on the [Output file name] property in the [Output File] category.
Figure 2.9 [Output file name] Property
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
Remark You can also change the option in the same way with the [Output file name] property in the [Fre-
quently Used Options(for Create Library)] category on the [Common Options] tab.
If the [Output file format] property is changed, the following message dialog box will open.
R20UT3284EJ0109 Rev.1.09 Page 12 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.10 Message Dialog Box
When [Yes] is selected in the dialog box, the extension of the output file name is changed according to the format selected in the [Output file format] property.
Figure 2.11 [Output file format] and [Output file name] Property

2.3.2 Output an assemble list

The assemble list (the code of the assemble result) is output to the assemble list file. Select the build tool node on the project tree and select the [Compile Options] tab on the Property panel. To output the assemble list file, select [Yes(-asm_option=-prn_path)] in the [Output assemble list file] property in the
[Assemble List] category.
Figure 2.12 [Output assemble list file] Property
When outputting the assemble list file, you can set the output folder and output file name.
(1) Set the output folder
Setting the output folder is made with the [Output folder for assemble list file] property by directly entering in the text box or by the [...] button. This property supports the following placeholder.
%BuildModeName%: Replaces with the build mode name.
"%BuildModeName%" is set by default.
The file name will be the source file name with the extension replaced by ".prn".
Remark See "CC-RL Compiler User’s Manual" for details about the assemble list file.

2.3.3 Output map information

The map information (the information of the link result) is output to the link map file. Select the build tool node on the project tree and select the [Link Options] tab on the Property panel. To output the link map file, set the [Output link map file] property in the [List] category.
(1) Output information according to the output format
Select [Yes(List contents=not specify)(-LISt -SHow)] or [Yes(List contents=ALL)(-LISt -SHow=ALL)] in the [Output link map file] property.
Figure 2.13 [Output link map file] Property (When Information According To Output Format Is Output)
R20UT3284EJ0109 Rev.1.09 Page 13 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Remark See "CC-RL Compiler User’s Manual" for differences between the -SHow and -SHow=ALL options.
(2) Specify information to be output
Select [Yes(List contents=specify)(-LISt)] in the [Output link map file] property. The following property will be dis­played.
- [Output symbol information] property
- [Output number of symbol reference] property
- [Output cross reference information] property
- [Output total sizes of sections] property
- [Output vector information] property
- [Output information of members of struct or union] property
- [Output relocation attributes related to sections] property
- [Output function list for detecting illegal indirect function call] property
Select [Yes] for each output information property.
Figure 2.14 [Output link map file] Property (When Information To Be Output Is Specified)
The link map file is output to the folder specified in the [Output folder] property in the [Output File] category. It is also shown on the project tree, under the Build tool generated files node. Specify the file name in the [Output file name] property.
Remark See "CC-RL Compiler User’s Manual" for details about the link map file.

2.3.4 Output library information

The library information (information from the library creation result) is output to the library list file. Select the build tool node on the project tree and select the [Create Library Options] tab on the Property panel. To output the library list file, set the [Output link map file] property in the [List] category.
(1) Output information according to the output format
Select [Yes(List contents=not specify)(-LISt -SHow)] or [Yes(List contents=ALL)(-LISt -SHow=ALL)] in the [Output link map file] property.
Figure 2.15 [Output link map file] Property (When Information According To Output Format Is Output)
Remark See "CC-RL Compiler User’s Manual" for differences between the -SHow and -SHow=ALL options.
(2) Specify information to be output
Select [Yes(List contents=specify)(-LISt)] in the [Output link map file] property. The following property will be dis­played.
- [Output symbol information] property
R20UT3284EJ0109 Rev.1.09 Page 14 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
- [Output section list in a module] property
- [Output cross reference information] property
- [Output total sizes of sections] property
Note 1
Note 2
Note 2
Note 1. This property is displayed only when [User libraries(-FOrm=Library=U)] or [System libraries(-
FOrm=Library=S)] in the [Output file format] property in the [Output File] category is selected.
Note 2. This property is displayed only when [Relocate file(-FOrm=Relocate)] in the [Output file format]
property in the [Output File] category is selected.
Select [Yes] for each output information property.
Figure 2.16 [Output link map file] Property (When Information To Be Output Is Specified)
The library list file is output to the project folder. It is also shown on the project tree, under the Build tool generated files node. Specify the file name in the [Output file name] property.
Remark See "CC-RL Compiler User’s Manual" for details about the library list file.
R20UT3284EJ0109 Rev.1.09 Page 15 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.4 Set Compile Options

To set options for the compile phase, select the Build tool node on the project tree and select the [Compile Options] tab
on the Property panel.
You can set the various compile options by setting the necessary properties in this tab.
Remark Often used options have been gathered under the [Frequently Used Options(for Compile)] category on
the [Common Options] tab.

2.4.1 Perform optimization with the code size precedence

Select the build tool node on the project tree and select the [Compile Options] tab on the Property panel. To perform optimization with the code size precedence, select [Code size precedence(-Osize)] in the [Optimization
Level] property in the [Optimization] category.
Figure 2.17 [Level of optimization] Property (Code Size Precedence)
Remark You can also set the option in the same way with the [Optimization Level] property in the [Frequently
Used Options(for Compile)] category on the [Common Options] tab.

2.4.2 Perform optimization with the execution speed precedence

Select the build tool node on the project tree and select the [Compile Options] tab on the Property panel. To perform optimization with the execution speed precedence, select [Speed precedence(-Ospeed)] in the [Optimization
Level] property in the [Optimization] category.
Figure 2.18 [Level of optimization] Property (Execution Speed Precedence)
Remark You can also set the option in the same way with the [Optimization Level] property in the [Frequently
Used Options(for Compile)] category on the [Common Options] tab.

2.4.3 Add an include path

Select the build tool node on the project tree and select the [Compile Options] tab on the Property panel. The include path setting is made with the [Additional include paths] property in the [Preprocess] category.
Figure 2.19 [Additional include paths] Property
If you click the [...] button, the Path Edit dialog box will open.
R20UT3284EJ0109 Rev.1.09 Page 16 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.20 Path Edit Dialog Box
Enter the include path per line in [Path(One path per one line)]. You can specify up to 247 characters per line, up to 256 lines.
Remark 1. This property supports placeholders.
If a line is double clicked in [Placeholder], the placeholder will be reflected in [Path(One path per one line)].
Remark 2. You can also specify the include path by one of the following procedures.
- Drag and drop the folder using such as Explorer.
- Click the [Browse...] button, and then select the folder in the Browse For Folder dialog box.
- Double click a row in [Placeholder].
Remark 3. Select the [Include subfolders automatically] check box before clicking the [Browse...] button to add all
paths under the specified one (down to 5 levels) to [Path(One path per one line)].
If you click the [OK] button, the entered include paths are displayed as subproperties.
Figure 2.21 [Additional include paths] Property (After Adding Include Paths)
To change the include paths, you can use the [...] button or enter the path directly in the text box of the subproperty. When the include path is added to the project tree, the path is added to the top of the subproperties automatically.
Remark You can also set the option in the same way with the [Additional include paths] property in the [Frequently
Used Options(for Compile)] category on the [Common Options] tab.
R20UT3284EJ0109 Rev.1.09 Page 17 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.4.4 Set a macro definition

Select the build tool node on the project tree and select the [Compile Options] tab on the Property panel. The macro definition setting is made with the [Macro definition] property in the [Preprocess] category.
Figure 2.22 [Macro definition] Property
If you click the [...] button, the Text Edit dialog box will open.
Figure 2.23 Text Edit Dialog Box
Enter the macro definition in [Text] in the format of "macro name=defined value", with one macro name per line. You can specify up to 256 characters per line, up to 256 lines. The "=defined value" part can be omitted, and in this case, "1" is used as the defined value. If you click the [OK] button, the entered macro definitions are displayed as subproperties.
Figure 2.24 [Macro definition] Property (After Setting Macros)
To change the macro definitions, you can use the [...] button or enter the path directly in the text box of the subproperty.
Remark You can also set the option in the same way with the [Macro definition] property in the [Frequently Used
Options(for Compile)] category on the [Common Options] tab.
R20UT3284EJ0109 Rev.1.09 Page 18 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.5 Set Assemble Options

To set options for the assemble phase, select the Build tool node on the project tree and select the [Assemble Options]
tab on the Property panel.
You can set the various assemble options by setting the necessary properties in this tab.
Remark Often used options have been gathered under the [Frequently Used Options(for Assemble)] category on
the [Common Options] tab.

2.5.1 Add an include path

Select the build tool node on the project tree and select the [Assemble Options] tab on the Property panel. The include path setting is made with the [Additional include paths] property in the [Preprocess] category.
Figure 2.25 [Additional include paths] Property
If you click the [...] button, the Path Edit dialog box will open.
Figure 2.26 Path Edit Dialog Box
Enter the include path per line in [Path(One path per one line)]. You can specify up to 247 characters per line, up to 256 lines.
Remark 1. This property supports placeholders.
If a line is double clicked in [Placeholder], the placeholder will be reflected in [Path(One path per one line)].
Remark 2. You can also specify the include path by one of the following procedures.
- Drag and drop the folder using such as Explorer.
- Click the [Browse...] button, and then select the folder in the Browse For Folder dialog box.
R20UT3284EJ0109 Rev.1.09 Page 19 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
- Double click a row in [Placeholder].
Remark 3. Select the [Include subfolders automatically] check box before clicking the [Browse...] button to add all
paths under the specified one (down to 5 levels) to [Path(One path per one line)].
If you click the [OK] button, the entered include paths are displayed as subproperties.
Figure 2.27 [Additional include paths] Property (After Adding Include Paths)
To change the include paths, you can use the [...] button or enter the path directly in the text box of the subproperty. When the include path is added to the project tree, the path is added to the top of the subproperties automatically.
Remark You can also set the option in the same way with the [Additional include paths] property in the [Frequently
Used Options(for Assemble)] category on the [Common Options] tab.

2.5.2 Set a macro definition

Select the build tool node on the project tree and select the [Assemble Options] tab on the Property panel. The macro definition setting is made with the [Macro definition] property in the [Preprocess] category.
Figure 2.28 [Macro definition] Property
If you click the [...] button, the Text Edit dialog box will open.
Figure 2.29 Text Edit Dialog Box
Enter the macro definition in [Text] in the format of "macro name=defined value", with one macro name per line. You can specify up to 256 characters per line, up to 256 lines.
R20UT3284EJ0109 Rev.1.09 Page 20 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
The "=defined value" part can be omitted, and in this case, "1" is used as the defined value. If you click the [OK] button, the entered macro definitions are displayed as subproperties.
Figure 2.30 [Macro definition] Property (After Setting Macros)
To change the macro definitions, you can use the [...] button or enter the path directly in the text box of the subproperty.
Remark You can also set the option in the same way with the [Macro definition] property in the [Frequently Used
Options(for Assemble)] category on the [Common Options] tab.
R20UT3284EJ0109 Rev.1.09 Page 21 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS

2.6 Set Link Options

To set options for the link phase, select the Build tool node on the project tree and select the [Link Options] tab on the
Property panel.
You can set the various link options by setting the necessary properties in this tab.
Caution This tab is not displayed for the library project.
Remark Often used options have been gathered under the [Frequently Used Options(for Link)] category on the
[Common Options] tab.

2.6.1 Add a user library

Adding a user library is made with the property or on the project tree.
(1) Addition using the property
Select the build tool node on the project tree and select the [Link Options] tab on the Property panel. Adding a user library is made with the [Using libraries] property in the [Library] category.
Figure 2.31 [Using libraries] Property
If you click the [...] button, the Path Edit dialog box will open.
Figure 2.32 Path Edit Dialog Box
Enter the library file (including the path) per line in [Path(One path per one line)]. You can specify up to 259 characters per line, up to 65536 lines.
Remark 1. This property supports placeholders.
If a line is double clicked in [Placeholder], the placeholder will be reflected in [Path(One path per one line)].
R20UT3284EJ0109 Rev.1.09 Page 22 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Remark 2. You can also specify the library file by one of the following procedures.
- Drag and drop the folder using such as Explorer.
- Click the [Browse...] button, and then select the folder in the Specify Using Library File dialog box.
- Double click a row in [Placeholder].
If you click the [OK] button, the entered library files are displayed as subproperties.
Figure 2.33 [Using libraries] Property (After Setting Library Files)
To change the library files, you can use the [...] button or enter the path directly in the text box of the subproperty.
Remark You can also set the option in the same way with the [Using libraries] property in the [Frequently
Used Options(for Link)] category on the [Common Options] tab.
(2) Addition from the project tree
Adding a library file to the project tree is performed from the Add Existing File dialog box. Dropping a library file in the project tree is also possible. When a library file is added from the project tree, it is subject to timestamp comparison with the load module at build, and the link processing is executed when the added library file is updated.

2.6.2 Prepare for using the overlaid section selection function

The optimizing linker (rlink) used by CC-RL can allocate multiple sections defined in a program to the same address.
The sections allocated in this way are called "overlaid sections".
The debug tool provides a function to select the debug target section from the overlaid sections (priority sections) allo-
cated to the same address. The function is called "overlaid section selection function".
A load module using overlaid sections can be debugged with switching of the priority section before program execution. The method for generating a load module to use the overlaid section selection function is shown below.
(1) Copy the ROM area contents to RAM
Copy the ROM area contents to the RAM area to expand the code and data in the RAM.
(2) Set build options
Set the ROM-to-RAM mapped sections and overlaid sections to use the overlaid section selection function. Select the build tool node on the project tree and select the [Link Options] tab on the Property panel.
(a) Set ROM-to-RAM mapped sections
Setting the ROM-to-RAM mapped sections is made with the [ROM to RAM mapped section] property in the [Section] category. This reserves the RAM section with the same size as that of the ROM section and relocates the symbols defined in the ROM section to addresses in the RAM section.
Figure 2.34 [ROM to RAM mapped section] Property
If you click the [...] button, the Text Edit dialog box will open.
R20UT3284EJ0109 Rev.1.09 Page 23 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.35 Text Edit Dialog Box
Enter the section name in [Text] in the format of "ROM section name=RAM section name", with one section name per line. You can specify up to 32767 characters per line, up to 65535 lines. If you click the [OK] button, the entered section names are displayed as subproperties.
Figure 2.36 [ROM to RAM mapped section] Property (After Setting Sections)
To change the section names, you can use the [...] button or enter them directly in the text box of the subprop­erty.
(b) Set ROM sections and RAM sections (overlaid sections)
Setting the sections is made with the [Section start address] property in the [Section] category.
Figure 2.37 [Section start address] Property
<1> Set ROM sections
If you click the [...] button, the Section Settings dialog box will open.
R20UT3284EJ0109 Rev.1.09 Page 24 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.38 Section Settings Dialog Box
If you click the [Add...] button, the Section Address dialog box will open.
Figure 2.39 Section Address Dialog Box
Enter in [Address] the address of the ROM section to be added and click the [OK] button to add the entered address to [Address] in the Section Settings dialog box.
R20UT3284EJ0109 Rev.1.09 Page 25 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Click here, and then click the [Add...] button.
Figure 2.40 Section Settings Dialog Box (After ROM Section Addresses Are Added)
Click the Section column on the added address row and click the [Add...] button to open the Add Section dia-
log box.
Figure 2.41 Add Section Dialog Box
Enter in [Section name] the name of the ROM section to be added and click the [OK] button to add the entered section to [Section] in the Section Settings dialog box.
R20UT3284EJ0109 Rev.1.09 Page 26 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.42 Section Settings Dialog Box (After ROM Sections Are Added)
For other ROM sections, set addresses and section names in the same way.
Remark Click the Address column and click the [Add...] button to open the Section Address dialog box,
allowing you to add a new address.
Figure 2.43 Section Settings Dialog Box (After Multiple ROM Sections Are Added)
R20UT3284EJ0109 Rev.1.09 Page 27 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Click here, and then click the [New Over­lay...] button.
<2> Set RAM sections (overlaid sections)
Click an added address and click the [Add...] button to open the Section Address dialog box.
Figure 2.44 Section Address Dialog Box
Enter in [Address] the address of the RAM section to be added and click the [OK] button to add the entered address to [Address] in the Section Settings dialog box.
Figure 2.45 Section Settings Dialog Box (After RAM Section Addresses Are Added)
Click the added address row (Address column or Section column) and click the [New Overlay...] button to open the Add Overlay dialog box.
Figure 2.46 Add Overlay Dialog Box
Enter in [Section name] the name of the RAM section to be added and click the [OK] button to add the entered section to [Section] in the Section Settings dialog box.
R20UT3284EJ0109 Rev.1.09 Page 28 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Click here, and then click the [New Over­lay...] button.
Figure 2.47 Section Settings Dialog Box (After RAM Sections Are Added)
Add the sections to be allocated to the same address by using the [New Overlay...] button in the same way. The added sections are displayed under [Overlay n] (n: number starting with "1").
R20UT3284EJ0109 Rev.1.09 Page 29 of 231 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.48 Section Settings Dialog Box (After Overlaid Sections Are Added)
For other RAM sections, set addresses and section names in the same way.
Remark Click the Address column and click the [Add...] button to open the Section Address dialog box,
allowing you to add a new address.
R20UT3284EJ0109 Rev.1.09 Page 30 of 231 Nov 01, 2020
Loading...
+ 201 hidden pages