Renesas CC-RX User Manual

User’s Manual
CS+
User’s Manual: CC-RX Build Tool Operation
Target Device
RX Family
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.08 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 RX family, and provides an outline of its features.
CS+ is an integrated development environment (IDE) for RX family, integrating the necessary tools for the development
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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.2 Output an assemble list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.3 Output map information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.4 Output library information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4 Set Compile Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.1 Perform optimization with the code size precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.2 Perform optimization with the execution speed precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.3 Add an include path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.4 Set a macro definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5 Set Assemble Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5.1 Add an include path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5.2 Set a macro definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.6 Set Link Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.6.1 Add a user library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.6.2 Prepare for using the overlaid section selection function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.7 Set Hex Output Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.7.1 Set the output of a hex file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.7.2 Fill the vacant area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.8 Set Librarian Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.8.1 Set the output of a library file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.9 Set Library Generate Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.9.1 Set the output of a standard library file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.10 Preparation before Using the PIC/PID Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.11 Set Build Options Separately . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.11.1 Set build options at the project level. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.11.2 Set build options at the file level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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-RX.

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.
R20UT3478EJ0108 Rev.1.08 Page 6 of 285 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), (7), and (8).
(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) 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(C)] tab (for a C source file), [Individual Compile
Options(C++)] tab (for a C++ source file), and [Individual Assemble Options] tab (for an assembly
source file).
Caution When the build tool starts the compiler, the path to the temporary folder of Windows is always set
as environment variable TMP_RX.
(8) Save the project
Save the setting contents of the project to the project file.
R20UT3478EJ0108 Rev.1.08 Page 7 of 285 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 Librarian 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(C)] tab (for a C source file), [Individual Compile
Options(C++)] tab (for a C++ source file), and [Individual Assemble Options] tab (for an assembly
source file).
Caution When the build tool starts the compiler, the path to the temporary folder of Windows is always set
as environment variable TMP_RX.
(7) Save the project
Save the setting contents of the project to the project file.
R20UT3478EJ0108 Rev.1.08 Page 8 of 285 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 ccrx command
when there are multiple files to be built.
An image of calling the ccrx command is shown below.
Example When build target files are aaa.c, bbb.c, and ccc.c
- When a build is run simultaneously
>ccrx 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
>ccrx aaa.c <- "aaa.obj" is generated. >ccrx bbb.c <- "bbb.obj" is generated. >ccrx 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.
R20UT3478EJ0108 Rev.1.08 Page 9 of 285 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.
R20UT3478EJ0108 Rev.1.08 Page 10 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
For details on setting the dependencies between projects, see "CS+ Integrated Development Envi­ronment User's Manual: Project Operation".

2.3 Set the Type of the Output File

Set the type of the file to be output as the product of the build.
(1) For the application project
A load module file is generated. The load module file will be the debug target. Select the type of the convert file to be output as the product of the build other than the load module file.
Select the build tool node on the project tree and select the [Hex Output Options] tab on the Property panel. Select the file type in the [Hex file format] property in the [Hex Format] category.
Figure 2.4 [Hex file format] Property
- When [Hex file (-FOrm=Hexadecimal)] is selected A hex file is output from the generated load module file.
- When [S record file (-FOrm=Stype)] is selected (default) A Motorola S type file is output from the generated load module file.
- When [Binary file (-FOrm=Binary)] is selected A binary file is output from the generated load module file.
(2) For the library project
Select the build tool node on the project tree and select the [Librarian Options] tab on the Property panel. Select the file type in the [Output file type] property in the [Output] category.
Figure 2.5 [Output file type] Property
- When [User library file (-FOrm=Library=U)] is selected (default) A user library file is generated.
- When [System library file (-FOrm=Library=S)] is selected A system library file is generated.
- When [Relocatable module file (-FOrm=Relocate)] is selected A relocatable module file is generated.
If the extension of output files is changed, the following message dialog box will open.
R20UT3478EJ0108 Rev.1.08 Page 11 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.6 Message Dialog Box
Clicking [Yes] in the dialog box replaces the current file extension with the one for the output file type. Clicking [No], on
the other hand, does not replace the current file extension.

2.3.1 Change the output file name

The names of the load module file, hex file, S record file, binary data file, relocatable module file, and library file output
by the build tool are set to the following names by default.
Load module file name: %ProjectName%.abs Hex file name: %ProjectName%.hex S record file name: %ProjectName%.mot Binary data file name: %ProjectName%.bin Relocatable module file name: %ProjectName%.rel 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 on the [Output file name] property in the [Output] category.
Figure 2.7 [Output file name] Property (For Load Module File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
(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 file name to be changed to on the [Output file name] property in the [Output File] category.
R20UT3478EJ0108 Rev.1.08 Page 12 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.8 [Output file name] Property (For Hex File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
(3) When changing the S record file name
Select the build tool node on the project tree and select the [Hex Output Options] tab on the Property panel. Enter the file name to be changed to on the [Output file name] property in the [Output File] category.
Figure 2.9 [Output file name] Property (For S Record File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
(4) When changing the binary data file name
Select the build tool node on the project tree and select the [Hex Output Options] tab on the Property panel. Enter the file name to be changed to on the [Output file name] property in the [Output File] category.
R20UT3478EJ0108 Rev.1.08 Page 13 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.10 [Output file name] Property (For Binary Data File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
(5) When changing the user library file name
Select the build tool node on the project tree and select the [Librarian Options] tab on the Property panel. Enter the file name to be changed to on the [Output file name] property in the [Output] category.
Figure 2.11 [Output file name] Property (For User Library File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
(6) When changing the system library file name
Select the build tool node on the project tree and select the [Librarian Options] tab on the Property panel. Enter the file name to be changed to on the [Output file name] property in the [Output] category.
Figure 2.12 [Output file name] Property (For System Library File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.
(7) When changing the relocatable module file name
Select the build tool node on the project tree and select the [Librarian Options] tab on the Property panel. Enter the file name to be changed to on the [Output file name] property in the [Output] category.
R20UT3478EJ0108 Rev.1.08 Page 14 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.13 [Output file name] Property (For Relocatable Module File)
This property supports the following placeholders.
%ActiveProjectName%: Replaces with the active project name. %BuildModeName%: Replaces with the build mode name. %MainProjectName%: Replaces with the main project name. %ProjectName%: Replaces with the project name.

2.3.2 Output an assemble list

The results of the assembly are output to the assemble list file.
(1) For a C source file and C++ source 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, select [Yes (-listfile)] on the [Outputs a source list file] property in the [List] category.
Figure 2.14 [Outputs a source list file] Property
(2) For an assembler source file
Select the build tool node on the project tree and select the [Assemble Options] tab on the Property panel. To output the assemble list, select [Yes (-listfile)] on the [Outputs an assemble list file] property in the [List] cate­gory.
Figure 2.15 [Outputs an assemble list file] Property
Remark See "CC-RX Compiler User's Manual" for the assemble list.

2.3.3 Output map information

The map information (i.e. information on the result of linkage) is output to the linkage list file.
(1) For the load module file
Select the build tool node on the project tree and select the [Link Options] tab on the Property panel. The setting to output the linkage list file is made with the [List] category.
R20UT3478EJ0108 Rev.1.08 Page 15 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.16 [Outputs the linkage list file] Property
To output the linkage list file, select [Yes (List contents=specify) (-LISt)] in the [Outputs the linkage list file] property. When outputting the linkage list file, you can select the contents of the linkage list output by the linker.
(a) When outputting a symbol name list in a module
Select [Yes (-SHow=SYmbol)] in the [Outputs a symbol name list in a module] property.
(b) When outputting the number of symbol references
Select [Yes (-SHow=Reference)] in the [Outputs the number of symbol references] property.
(c) When outputting the cross-reference information
Select [Yes (-SHow=Xreference)] in the [Outputs the cross-reference information] property.
(d) When outputting the total sizes of sections
Select [Yes (-SHow=Total_size)] in the [Shows the total sizes of sections] property.
(e) When outputting the vector information
Select [Yes (-SHow=VECTOR)] in the [Outputs vector information] property.
(f) When outputting relocation attributes related to sections
Select [Yes (-SHow=RELOCATION_ATTRIBUTE)] in the [Outputs relocation attributes related to sections] prop­erty.
(g) When outputting a list of functions that are safe in terms of the detection of illegal invalid function calls
Select [Yes (-SHow=CFI)] in the [Outputs function list for detecting illegal indirect function call] property.
(2) For the relocatable module file
Select the build tool node on the project tree and select the [Librarian Options] tab on the Property panel. The setting to output the linkage list file is made with the [List] category.
Figure 2.17 [Outputs the linkage list file] Property
To output the linkage list file, select [Yes (List contents=specify) (-LISt)] in the [Outputs the linkage list file] property. When outputting the linkage list file, you can select the contents of the linkage list output by the linker.
(a) When outputting a symbol name list in a module
Select [Yes (-SHow=SYmbol)] in the [Outputs a symbol name list in a module] property.
(b) When outputting the cross-reference information
Select [Yes (-SHow=Xreference)] in the [Outputs the cross-reference information] property.
(c) When outputting the total sizes of sections
Select [Yes (-SHow=Total_size)] in the [Shows the total sizes of sections] property.
Remark See "CC-RX Compiler User's Manual" for the linkage list file.

2.3.4 Output library information

The library information (i.e. information on the result of linkage) is output to the library list file. Select the build tool node on the project tree and select the [Librarian Options] tab on the Property panel.
R20UT3478EJ0108 Rev.1.08 Page 16 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
The setting to output a library list file is made with the [List] category.
Figure 2.18 [Outputs the linkage list file] Property
To output the library list file, select [Yes (List contents=specify) (-LISt)] in the [Outputs the linkage list file] property. When outputting the library list file, you can select the contents of the library list output by the linker.
(1) When outputting a symbol name list in a module
Select [Yes (-SHow=SYmbol)] in the [Outputs a symbol name list in a module] property.
(2) When outputting a section list in a module
Select [Yes (-SHow=SEction)] in the [Outputs a section list in a module] property.
Remark See "CC-RX Compiler User's Manual" for the library list file.
R20UT3478EJ0108 Rev.1.08 Page 17 of 285 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 [Optimizes with emphasis on code size (-size)] on the
[Optimization type] property in the [Optimization] category.
Figure 2.19 [Optimization type] Property (Code Size Precedence)
Remark You can also set the option in the same way with the [Optimization type] 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 [Optimizes with emphasis on execution perfor-
mance (-speed)] on the [Optimization type] property in the [Optimization] category.
Figure 2.20 [Optimization type] Property (Execution Speed Precedence)
Remark You can also set the option in the same way with the [Optimization type]] 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 [Source] category.
Figure 2.21 [Additional include paths] Property
If you click the [...] button, the Path Edit dialog box will open.
R20UT3478EJ0108 Rev.1.08 Page 18 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.22 Path Edit Dialog Box
Enter an include path per line in [Path(One path per one line)]. You can specify up to 247 characters per line.
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 [Subfolders are automatically included] 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.23 [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.
R20UT3478EJ0108 Rev.1.08 Page 19 of 285 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 [Source] category.
Figure 2.24 [Macro definition] Property
If you click the [...] button, the Text Edit dialog box will open.
Figure 2.25 Text Edit Dialog Box
Enter the macro definition in the format of "macro name=string", with one macro name per line. You can specify up to 32767 characters per line, up to 65535 line. The "=string" part can be omitted, and in this case, the macro name is assumed to be defined. If you click the [OK] button, the entered macro definitions are displayed as subproperties.
Figure 2.26 [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.
R20UT3478EJ0108 Rev.1.08 Page 20 of 285 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 [Source] category.
Figure 2.27 [Additional include paths] Property
If you click the [...] button, the Path Edit dialog box will open.
Figure 2.28 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.
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.
R20UT3478EJ0108 Rev.1.08 Page 21 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
- Double click a row in [Placeholder].
Remark 3. Select the [Subfolders are automatically included] 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.29 [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 [Source] category.
Figure 2.30 [Macro definition] Property
If you click the [...] button, the Text Edit dialog box will open.
Figure 2.31 Text Edit Dialog Box
Enter the macro definition in the format of "macro name=string", with one macro name per line. You can specify up to 32767 characters per line, up to 65535 line.
R20UT3478EJ0108 Rev.1.08 Page 22 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
If you click the [OK] button, the entered macro definitions are displayed as subproperties.
Figure 2.32 [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.
R20UT3478EJ0108 Rev.1.08 Page 23 of 285 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

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 [Input] category.
Figure 2.33 [Using libraries] Property
If you click the [...] button, the Path Edit dialog box will open.
Figure 2.34 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)].
R20UT3478EJ0108 Rev.1.08 Page 24 of 285 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.35 [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.6.2 Prepare for using the overlaid section selection function

The optimizing linker (rlink) used by CC-RX 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.36 [ROM to RAM mapped section] Property
If you click the [...] button, the Text Edit dialog box will open.
R20UT3478EJ0108 Rev.1.08 Page 25 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.37 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.38 [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.39 [Section start address] Property
R20UT3478EJ0108 Rev.1.08 Page 26 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
<1> Set ROM sections
If you click the [...] button, the Section Settings dialog box will open.
Figure 2.40 Section Settings Dialog Box
If you click the [Add...] button, the Section Address dialog box will open.
Figure 2.41 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.
R20UT3478EJ0108 Rev.1.08 Page 27 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Click here, and then click the [Add...] button.
Figure 2.42 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.43 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.
R20UT3478EJ0108 Rev.1.08 Page 28 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Figure 2.44 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.45 Section Settings Dialog Box (After Multiple ROM Sections Are Added)
R20UT3478EJ0108 Rev.1.08 Page 29 of 285 Nov 01, 2020
CS+ 2. FUNCTIONS
Click here, and then click the [New Overlay...] 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.46 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.47 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.48 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.
R20UT3478EJ0108 Rev.1.08 Page 30 of 285 Nov 01, 2020
Loading...
+ 255 hidden pages