Application Note

Integrated Development Environment e² studio
Creating and executing build CMake projectIntroduction
CMake's responsibility is to generate native build tool files from the platform and compiler independentconfiguration files named CMakeLists.txt.
This document explains processes how to create CMake project in e2 studio and execute Build.

Contents
1.

Overview.................................................................................................................................... 22.

Installation ................................................................................................................................. 2

3.

Creating a CMake project .......................................................................................................... 3

4.

Modifying items for Builder configuration ................................................................................... 4

4.1

Disable CDT Core Builder ....................................................................................................................... 4

4.2

Adding CMake configuration ................................................................................................................... 4

4.3

Adding Make configuration ...................................................................................................................... 6

5.

Executing Build .......................................................................................................................... 9

Revision History .............................................................................................................................. 10

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 1 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

1. Overview
CMake's responsibility is to generate native build tool files from the platform and compiler independentconfiguration files named CMakeLists.txt.
e2 studio supports CMake project since version 2020-04. e2 studio need some configurations to work with
CMake commands and build with its generated makefile. This document explains processes how to create
CMake project in e2 studio and execute Build.
This document does not explain processes how to create CMake toolchain file and configuration
file. Please prepare those files by yourself.

2. Installation
At first, please download and install the following tools from the website.
e2 studio
e² studio | Renesas(2021-04 used in this example)



CMake
Download | CMake(version 3.20.3 used in this example)



GNU Make for windows (If you already installed e2 studio, you can use "make" in e2 studio.)
Make for Windows (sourceforge.net)(version 3.81 used in this example)

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 2 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

3. Creating a CMake projectStart e2 studio and create CMake project in accordance with the following steps.
1)

Select menu items [File] > [New] > [C/ C++ Project].

2)

On the [New C/C++ Project - Templates for New C/C++ Project] dialog, select [CMake] > [Empty or
Exiting CMake Project]. Then press [Next >] button.

Figure 1
3)

After moving to [New CMake Project – Specify properties of new CMake project] screen, put an arbitrary
name in [Project name] field (e.g. “Sample”). Then, click [Finish].

4)

An empty project will be created.

5)

Copy source files, toolchain file and configuration file for CMake. And paste them into the createdproject.

* When you select [CMake Project] on the [New C/C++ Project - Templates for New C/C++ Project] dialog, acreated project has <project name>.cpp and CMakeLists.txt.

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 3 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

4. Modifying items for Builder configuration
There is no command to execute Build in the created project. To execute Build, you need to add “CMake”
and “Make” setting items for the builder configuration of the created project. Add the items in accordancewith the following steps.

4.1

Disable CDT Core Builder

CDT Core Builder in builder configuration is not used to execute Build. So, CDT Core Builder in builder
configuration need to be disable. This chapter explains how to disable CDT Core Builder commands asbuilder configuration.
1)

Select “Sample [Configuration]” in the [Project Explorer]. Then, open right-click context menu and select[Properties].

2)

In [Properties] dialog, select [Builders] in the tree box on the left.

3)

In a normal e2 studio project, the makefile is created by the CDT builder, but here uncheck registered[CDT Core Builder] and let CMake create it.

4)

A warning dialog turns up. Then, click [OK].

Figure 25)

Proceed to the next chapter.

4.2

Adding CMake configuration

This chapter explains how to add CMake commands as builder configuration. CMake will generate "Makefile"with the following settings in the toolchain and configuration files.
6)

Click [New…], then [choose configuration type] dialog will pop up. Select [Program] and click [OK] in the
dialog.

7)[Edit Configuration] will be displayed. Input an arbitrary name in [Name:] field. (e.g. “CMake”).

8)

Click [OK] after setting the following parameters.
[Main] tab[Location:]
Specify a location of installed cmake.exe.
(e.g. <CMake install folder>\bin\cmake.exe)[Working Directory:]
Specify the "${workspace_loc:/${project_name}}".

[Arguments:]
Specify CMake command parameters.
(e.g. -H. -B_builds -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=./ccrx.cmake)[Refresh] tab

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 4 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

Check [Refresh resources upon completion.].
Select [The entire workspace].

Figure 3[Environment] tab

[Environment variables to set:]
Add the environment variables needed to run CMake by click [Add...] button.

Check [Append environment to native environment]
For example, in case of using toolchain in a project is C/C++ Compiler Package for RX Family
CC-RX, specify "<CC-RX install folder>\bin" in Path as environment variable.

Figure 4

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 5 of 10

Integrated Development Environment e² studio
9)

Creating and executing build CMake project

Proceed to the next chapter.

4.3

Adding Make configuration

This chapter explains how to add Make commands as builder configuration. Build is executed with thegenerated makefile. It is the continuity of setting on [Builder] panel.
10) Click [New…].
11) [Choose configuration type] dialog will pop up. Select [Program] and click [OK] in the dialog.
12) [Edit Configuration] will be displayed. Input an arbitrary name in [Name:] field. (e.g. “Make”).
13) Click [OK] after setting the following parameters.
[Main] tab[Location:]
Specify location of installed make.exe. (e.g. : <make install folder>\bin\make.exe)
When using make.exe of e2 studio, check make.exe folder by following steps below.
a.

Select [Help] > [About e2 studio] on the menu bar.

b.

In [About e2 studio] dialog, click [Installation Details].

c.

Click [Support Folders] tab in [e2 studio Installation details] dialog.

d.

Click [e2 studio support area:] to confirm the location.
(e.g. C:\Users\<User name>\.eclipse\com.renesas.platform_XXXX\Utilities\make.exe)
The part “XXXX” differs from each version of e2 studio.

Figure 5[Working Directory:]
Specify "${workspace_loc:/${project_name}/<makefile folder>}"(e.g. ${workspace_loc:/${project_name}/_builds)

[Arguments:]
Specify "all".

[Refresh] tab

Check [Refresh resources upon completion.].
Select [The entire workspace].

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 6 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

Figure 6[Environment] tab

[Environment variables to set:]
Add the environment variables needed to run Make by click [Add...] button.

Check [Append environment to native environment]
For example, in case of using toolchain in a project is C/C++ Compiler Package for RX Family
CC-RX, specify the following environment variables using [Add…] button.
Variable name: Path
Value: <make install folder>\bin;<CC-RX install folder>\binVariable name: BIN_RX
Value: <CC-RX install folder>\binVariable name: INC_RX
Value: <CC-RX install folder>\include

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 7 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

Figure 714) Click [Apply and Close] on [Properties] dialog.

Figure 8

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 8 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

5. Executing Build
After editing source files, execute build. By following steps below, [CMake] and [Make] set as builder’sconfiguration will run, and [.abs file] will be generated in [_builds] folder.
1)

Select [Sample [Configuration]] in [Project Explorer]. Then, execute on any of the following procedures.
Click [Build Project] on the right click context menu.



Click [Project] > [Build Project] on the menu bar.

Once build is executed, execution results are output on [Console] view.

Figure 9

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Page 9 of 10

Integrated Development Environment e² studio

Creating and executing build CMake project

Revision History
Rev.
1.00
2.00

Date
Dec.25.20
Jun.30.21

2.01

Jun.28.22

R20AN0613EJ0201 Rev.2.01
Jun.28.22

Description
Page
Summary
New creationall
Update whole.
- Remove unnecessary information.
- Separate toolchain-specific settings.
P.6
Replace “The part “XXXX” differs from each user.” to “The part
“XXXX” differs from each version of e2 studio.”

Page 10 of 10

General Precautions in the Handling of Microprocessing Unit and Microcontroller
Unit Products
The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the
products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
1.

Precaution against Electrostatic Discharge (ESD)
A strong electrical field, when exposed to a CMOS device, can cause destruction of the gate oxide and ultimately degrade the device operation. Steps
must be taken to stop the generation of static electricity as much as possible, and quickly dissipate it when it occurs. Environmental control must be
adequate. When it is dry, a humidifier should be used. This is recommended to avoid using insulators that can easily build up static electricity.
Semiconductor devices must be stored and transported in an anti-static container, static shielding bag or conductive material. All test andmeasurement tools including work benches and floors must be grounded. The operator must also be grounded using a wrist strap. Semiconductor2.

devices must not be touched with bare hands. Similar precautions must be taken for printed circuit boards with mounted semiconductor devices.
Processing at power-on
The state of the product is undefined at the time when power is supplied. The states of internal circuits in the LSI are indeterminate and the states ofregister settings and pins are undefined at the time when power is supplied. In a finished product where the reset signal is applied to the external resetpin, the states of pins are not guaranteed from the time when power is supplied until the reset process is completed. In a similar way, the states of pins
in a product that is reset by an on-chip power-on reset function are not guaranteed from the time when power is supplied until the power reaches the3.

level at which resetting is specified.
Input of signal during power-off state
Do not input signals or an I/O pull-up power supply while the device is powered off. The current injection that results from input of such a signal or I/O
pull-up power supply may cause malfunction and the abnormal current that passes in the device at this time may cause degradation of internal

4.

elements. Follow the guideline for input signal during power-off state as described in your product documentation.
Handling of unused pins
Handle unused pins in accordance with the directions given under handling of unused pins in the manual. The input pins of CMOS products are
generally in the high-impedance state. In operation with an unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of
the LSI, an associated shoot-through current flows internally, and malfunctions occur due to the false recognition of the pin state as an input signal

5.

become possible.
Clock signals
After applying a reset, only release the reset line after the operating clock signal becomes stable. When switching the clock signal during program
execution, wait until the target clock signal is stabilized. When the clock signal is generated with an external resonator or from an external oscillator
during a reset, ensure that the reset line is only released after full stabilization of the clock signal. Additionally, when switching to a clock signal

6.

produced with an external resonator or by an external oscillator while program execution is in progress, wait until the target clock signal is stable.
Voltage application waveform at input pin
Waveform distortion due to input noise or a reflected wave may cause malfunction. If the input of the CMOS device stays in the area between VIL(Max.) and VIH (Min.) due to noise, for example, the device may malfunction. Take care to prevent chattering noise from entering the device when the7.

input level is fixed, and also in the transition period when the input level passes through the area between VIL (Max.) and VIH (Min.).
Prohibition of access to reserved addresses
Access to reserved addresses is prohibited. The reserved addresses are provided for possible future expansion of functions. Do not access these8.

addresses as the correct operation of the LSI is not guaranteed.
Differences between products
Before changing from one product to another, for example to a product with a different part number, confirm that the change will not lead to problems.
The characteristics of a microprocessing unit or microcontroller unit products in the same group but having a different part number might differ in termsof internal memory capacity, layout pattern, and other factors, which can affect the ranges of electrical characteristics, such as characteristic values,
operating margins, immunity to noise, and amount of radiated noise. When changing to a product with a different part number, implement a systemevaluation test for the given product.

Notice1.

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 yourproduct or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the useof 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 thisdocument, 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 be responsible for determining what licenses are required from any third parties, and obtaining such licenses for the lawful import, export,
manufacture, sales, utilization, distribution or other disposal of any products incorporating Renesas Electronics products, if required.
5. 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.
6. Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The intended applications foreach 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; homeelectronic appliances; machine tools; personal electronic equipment; industrial robots; etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key
financial terminal systems; safety control equipment; etc.
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 tohuman life or bodily injury (artificial life support devices or systems; surgical implantations; etc.), or may cause serious property damage (spacesystem; 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 productthat is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
7. No semiconductor product is absolutely secure. Notwithstanding any security measures or features that may be implemented in Renesas Electronics
hardware or software products, Renesas Electronics shall have absolutely no liability arising out of any vulnerability or security breach, including but
not limited to any unauthorized access to or use of a Renesas Electronics product or a system that uses a Renesas Electronics product. RENESASELECTRONICS DOES NOT WARRANT OR GUARANTEE THAT RENESAS ELECTRONICS PRODUCTS, OR ANY SYSTEMS CREATED USINGRENESAS ELECTRONICS PRODUCTS WILL BE INVULNERABLE OR FREE FROM CORRUPTION, ATTACK, VIRUSES, INTERFERENCE,
HACKING, DATA LOSS OR THEFT, OR OTHER SECURITY INTRUSION (“Vulnerability Issues”). RENESAS ELECTRONICS DISCLAIMS ANY AND
ALL RESPONSIBILITY OR LIABILITY ARISING FROM OR RELATED TO ANY VULNERABILITY ISSUES. FURTHERMORE, TO THE EXTENTPERMITTED BY APPLICABLE LAW, RENESAS ELECTRONICS DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, WITHRESPECT TO THIS DOCUMENT AND ANY RELATED OR ACCOMPANYING SOFTWARE OR HARDWARE, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8. 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 byRenesas 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 suchspecified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specificcharacteristics, 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 foraging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult and impractical, you areresponsible for evaluating the safety of the final products or systems manufactured by you.
10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas
Electronics product. You are responsible for carefully and sufficiently investigating applicable laws and regulations that regulate the inclusion or use ofcontrolled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics products in compliance with all theseapplicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliancewith applicable laws and regulations.
11. Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale isprohibited 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.
12. It is the responsibility of the buyer or distributor of Renesas Electronics products, or any other party who distributes, disposes of, or otherwise sells ortransfers the product to a third party, to notify such third party in advance of the contents and conditions set forth in this document.
13. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
14. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note1)(Note2)“Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its directly or indirectly controlledsubsidiaries.
“Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
(Rev.5.0-1 October 2020)

Corporate Headquarters

TOYOSU FORESIA, 3-2-24 Toyosu,
Koto-ku, Tokyo 135-0061, Japan
www.renesas.com

Contact information

For further information on a product, technology, the most up-to-dateversion 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 propertyof their respective owners.

© 2022 Renesas Electronics Corporation. All rights reserved.