Renesas RX APPLICATION NOTE

APPLICATION NOTE
R20AN0451ES0130
Rev.1.30
Jan 25, 2019
RX Smart Configurator
User’s Guide: e² studio
Introduction
This application note describes the basic usage of the RX Smart Configurator (hereafter called the Smart Configurator), which is an e² studio plug-in tool.
References to the e² studio integrated development environment in this application note apply to the followi ng ver sions.
e² studio 7.3.0 and later
Target Devices and Compilers
Refer to the following URL for the range of supported devices and compilers:
https://www.renesas.com/smart-configurator
Contents
1. Overview .......................................................................................................................... 4
1.1 Purpose ......................................................................................................................................... 4
1.2 Features ........................................................................................................................................ 4
1.3 Software Components ................................................................................................................... 4
2. Creating a Project ............................................................................................................. 5
2.1 Create a project not using RTOS .................................................................................................. 5
2.2 Create a FreeRTOS project .......................................................................................................... 9
3. Operating the Smart Configurator ................................................................................... 16
3.1 Displaying the Smart Configurator Perspective .......................................................................... 16
3.2 Procedure for Operations ............................................................................................................ 17
3.3 File to be Saved as Project Information ...................................................................................... 18
3.4 Window ........................................................................................................................................ 19
3.4.1 Project Explorer..................................................................................................................... 20
3.4.2 Smart Configurator view ....................................................................................................... 20
3.4.3 MCU Package view ............................................................................................................... 21
3.4.4 Console view ......................................................................................................................... 22
3.4.5 Configuration Problems view ................................................................................................ 22
4. Setting of Peripheral Modules ......................................................................................... 23
4.1 Board Settings ............................................................................................................................. 23
4.2 Clock Settings ............................................................................................................................. 26
R20AN0451ES0130 Rev.1.30 Page 1 of 79 Jan 25, 2019
4.1.1 Selecting the device .............................................................................................................. 23
4.1.2 Selecting the board ............................................................................................................... 24
4.1.3 Exporting board settings ....................................................................................................... 25
4.1.4 Importing board settings ....................................................................................................... 25
RX Smart Configurator User's Guide: e² studio
4.3 Component Settings .................................................................................................................... 27
4.3.1 Adding Code Generator components ................................................................................... 27
4.3.2 Downloading a FIT module ................................................................................................... 29
4.3.3 Adding FIT drivers or middleware ......................................................................................... 30
4.3.4 Download and import FIT sample project ............................................................................. 31
4.3.5 Switching between the component view and hardware view ............................................... 34
4.3.6 Removing a software component ......................................................................................... 35
4.3.7 Setting a CG driver ............................................................................................................... 36
4.3.8 Changing the resource for a CG configuration ..................................................................... 37
4.3.9 Setting a FIT Software Component....................................................................................... 40
4.3.10 Version change of FIT software component ......................................................................... 41
4.3.11 Setting the FreeRTOS Kernel ............................................................................................... 43
4.3.12 Configure general setting of component ............................................................................... 44
4.4 Pin Settings ................................................................................................................................. 45
4.4.1 Changing the pin assignment of a software component ....................................................... 46
4.4.2 Assigning pins using the MCU Package view ....................................................................... 47
4.4.3 Exporting pin settings ............................................................................................................ 48
4.4.4 Importing pin settings ............................................................................................................ 48
4.4.5 Pin setting using board pin configuration information ........................................................... 49
4.4.6 Pin filter feature ..................................................................................................................... 49
4.5 Interrupt Settings ......................................................................................................................... 50
4.5.1 Changing the interrupt priority level and fast interrupt setting .............................................. 51
4.5.2 Changing the interrupt vector number .................................................................................. 52
4.6 MCU migration feature ................................................................................................................ 53
5. Managing Conflicts ......................................................................................................... 56
5.1 Resource Conflicts ...................................................................................................................... 56
5.2 Resolving pin conflicts ................................................................................................................. 57
5.3 Missing Dependencies ................................................................................................................ 58
6. Generating Source Code ................................................................................................ 59
6.1 Outputting Generated Source Code ........................................................................................... 59
6.2 Configuration of Generated Files and File Names ...................................................................... 60
6.3 Initializing Clocks ......................................................................................................................... 63
6.4 Initializing Pins............................................................................................................................. 64
6.5 Initializing Interrupts .................................................................................................................... 67
6.6 Component Settings .................................................................................................................... 68
6.6.1 FIT module configuration ...................................................................................................... 68
6.6.2 FreeRTOS Kernel configuration............................................................................................ 70
7. Creating User Programs ................................................................................................. 71
7.1 Adding Custom Code in the Case of Firmware Integration Technology (FIT) ............................ 71
7.2 Adding Custom Code in the Case of Code Generator ................................................................ 72
8. Backing up Generated Source Code .............................................................................. 74
9. Generating Reports ........................................................................................................ 75
R20AN0451ES0130 Rev.1.30 Page 2 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
9.1 Report on All Configurations (Text File) ...................................................................................... 75
9.2 Configuration of Pin Function List and Pin Number List (in csv Format) .................................... 76
9.3 Image of MCU Package (in png Format) .................................................................................... 76
10. Help ................................................................................................................................ 77
10.1 Help ............................................................................................................................................. 77
11. Documents for Reference ............................................................................................... 78
Website and Support ............................................................................................................. 79
R20AN0451ES0130 Rev.1.30 Page 3 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

1. Overview

1.1 Purpose

This application note describes the basic usage of the Smart Configurator and the e² studio integrated development environment, including the procedure for creating a project.
Refer to the User’s Manual of the e² studio for how to use the e² studio.

1.2 Features

The Smart Configurator is a utility for combining software to meet your needs. It handles the following three functions to support the embedding of drivers from Renesas in your syste ms: importing middleware in the form of FIT (Firmware Integration Technology) modules, generating driver code, and making pin settings.

1.3 Software Components

The Smart Configurator supports two types of software components: Code Generator (CG) and Firmware Integration Technology (FIT). Drivers and middleware supported by each software type are:
Basic drivers:
CG drivers (CMT, A/D Converter, SCI, etc.)
FIT modules (CMT, DTC, DMAC, RSPI, SCIFA, etc.)
Middleware:
FIT modules (USB, Ethernet, Flash Memory (programming the on-chip flash memory), etc.)
The basic driver is a control program for peripheral functions of microcomputer such as CMT, A/D converter, SCI, etc. It is convenient to embed a software component (CG driver or FIT module) using code generation function. In addition, FIT modules can be embedded for using middleware such as USB, Ethernet, and Flash memory (programming the on-c hi p flash memory) as software components.
R20AN0451ES0130 Rev.1.30 Page 4 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

2. Creating a Project

The following describes the procedure for creating a C project using the Smart Configurator. Refer to the related documents on the e² studio for the details of the e ² studio project creation wizard.

2.1 Create a project not using RTOS

The following describes the procedure for creating a project not using RTOS. (1) Start e² studio and launch a workspace. After star ting, select [File] [New] → [C/C++ Project] to activate the
project creation wizard.
Figure 2-1 Creating a New Project
(2) In the project creation wizard, select [Renesas RX] → [Renesas CC-RX C/C++ Executable Pr oj ect] or [GCC for
Renesas RX C/C++ Executable Project], and click on the [Next] button.
Figure 2-2 Templates for New C/C++ Project Dialog Box
R20AN0451ES0130 Rev.1.30 Page 5 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(3) Enter project information. Click on the [Next] button to continue.
(e.g. CC-RX executable project, Project name: "Smart_Configurator_Example")
Figure 2-3 Creating a New Renesas CC-RX Executable Project
(4) Select the toolchain, device, and debug configuration. Click on the [Next] button.
(e.g. Target Device: RX64M – 176 pins (Part number: R5F564MLCxFC))
Figure 2-4 Selecting the Toolchain, Device, and Debug Configuration
R20AN0451ES0130 Rev.1.30 Page 6 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(2)
(5) In the [Select Coding Assistant settings] dialog box, select the [Smart Configurator] checkbox and click on the
[Finish] button.
Note: [Smart Configurator] checkbox is enable only if device supported by Smart Configurator is selected at
(4).
Figure 2-5 Selecting the Coding Assistant Tool
(6) Wait for completion of project creation.
Figure 2-6 Progress of Project creation
R20AN0451ES0130 Rev.1.30 Page 7 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(7) After a new C Project is successfully created, the project will be opened in the Smart Configurator perspective.
Figure 2-7 Smart Configurator Perspective
R20AN0451ES0130 Rev.1.30 Page 8 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

2.2 Create a FreeRTOS project

The following describes the procedure for creating a FreeRTOS project. For FreeRTOS project supported devices and Renesas FreeRTOS, refer to Renesas FreeRTOS related documentation
("11 Documents for Reference"). (1) Start e² studio and launch a workspace. After star ting, select [File] [New] → [C/C++ Project] to activate the
project creation wizard.
Figure 2-8 Creating a New Project
(2) In the project creation wizard, select [Renesas RX] → [Renesas CC-RX C/C++ Executable Pr oj ect] and click on
the [Next] b utton.
Figure 2-9 Templates for New C/C++ Project Dialog Box
R20AN0451ES0130 Rev.1.30 Page 9 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(3) Enter project information. Click on the [Next] button to continue.
(e.g. CC-RX executable project, Project name: "Smart_Configurator_Example")
Figure 2-10 Creating a New Renesas CC-RX Executable Project
(4) Select the toolchain and RTOS configuration. (e.g. RTOS: FreeRTOS)
If FreeRTOS has not been downloaded, go to procedure (5). If FreeRTOS has been downloaded, go to procedure (7).
Figure 2-11 Selecting the Too l c hain and RTOS Configuration
R20AN0451ES0130 Rev.1.30 Page 10 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
Note: Downloading requires login to "My Renesa s ". If you have not logged in, the following dialog box will prompt
you to log in. To register as a new user, click on the [About My Renesas] button.
Figure 2-12 Login to My Renesas
(5) In the [RTOS Module Download] dialog, select the FreeRTOS package and click [Download].
Figure 2-13 [RTOS Module Download] dialog
(6) When [End User License Agreement] dialog is displayed, click [ Agree].
Figure 2-14
[End User License Agreement] dialog
R20AN0451ES0130 Rev.1.30 Page 11 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(7) Select the device and debug configuration. O nl y device supported by Renesas FreeRTOS can beselected. Click
on the [Next ] button (e.g. Target Device: RX64M – 176 pins (Part number: R5F564MLCxFC))
Figure 2-15 Selecting the Device and Debug Configuration
(8) Select or Confirm the version and click [Next] button.
Figure 2-16 RTOS version confirmation
R20AN0451ES0130 Rev.1.30 Page 12 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(9) If the FIT module is not downloaded, click [Download FIT module] and go to procedure (10).
If the FIT module has already been downloaded, click [Finish] to complete the project creation. When the creation of the project is completed, proceed to procedure (11).
Figure 2-17 Download FIT Modules
(10) Select the FIT module package and click [Download]. The [End User License Agreement] dialog will be
displayed as in procedure (6), so click [Agree] and execute the download. When the download is completed, you will return to the [Select Coding Assi s tant settings] dialog in procedure (9), so please complete the project creation by clicking [Finish].
Figure 2-18 [FIT Module Download] dialog
R20AN0451ES0130 Rev.1.30 Page 13 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(11) Wait for completion of project creation.
Figure 2-19 Progress of Project creation
(12) After a new C Project is successfully created, the project will be opened in the Smart Configurator perspective.
Figure 2-20 Smart Configurator Perspective
R20AN0451ES0130 Rev.1.30 Page 14 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(13) The [RTOS Module Do wnload] dialog is displayed. Select the FreeRTOS package and click [Download].
Figure 2-21 Confirmation of configuration status of FreeRTOS package.
For the setting of FreeRTOS, refer to "4.3.11 Setting the FreeRTOS Kernel".
R20AN0451ES0130 Rev.1.30 Page 15 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

3. Operating the Smart Configurator

3.1 Displaying the Smart Configurator Perspective

To fully utilize Smart Configurator features, ensure that the Smart Configurator perspective is opened. If it is not
opened, select the perspective icon in the upper right corner of the e
2
studio window:
Figure 3-1 Opening the Smart Configurator Perspective
R20AN0451ES0130 Rev.1.30 Page 16 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
Operations in the e² studio
Starting the e² studio
Creating and loading an e² studio project
Displaying the Smart Configurator perspective
Setting of peripheral modules
Generating source code
Creating user programs
Building
Execution a nd debugging
Setting of pins
Refer to chapter 4, Setting of Peripheral Modules.
Refer to section 4.4, Pin Settings.
Device information Toolchain information
Generating reports
Refer to chapter 9, Generating Reports.
Setting of interrupts
Refer to section 4.5, Interrupt Settings.
Refer to chapter 6, Generating
Refer to chapter 7, Creating User

3.2 Procedure for Operations

Figure 3-2 shows the procedure for using the Smart Configurator to set up peripheral modules and build the project with the e² studio. Refer to the related documents on the e² studio for the operation of the e² studio.
Source Code.
Programs.
Figure 3-2 Procedure for Operations
R20AN0451ES0130 Rev.1.30 Page 17 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

3.3 File to be Saved as Project Information

The Smart Configurator saves the setting information such as the target MCU for the project, build tool, peripheral modules, and pin functions in a project file (*.scfg), and refers to this information.
The project file from the Smart Configurator is saved in “project name.scfg”, which is at the same level as the project file (.project) of the e² studio.
R20AN0451ES0130 Rev.1.30 Page 18 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(2)
(3)
(4)
(5)
(1)

3.4 Window

The configuration of the Smart Configurator perspective is shown in Figure 3-3, Smart Config ura tor Perspective.
1) Project Explorer
2) Smart Configurator view
3) MCU Package view
4) Console view
5) Configuration Problems view
Figure 3-3 Smart Configurator Perspective
R20AN0451ES0130 Rev.1.30 Page 19 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

3.4.1 Project Explorer

The structure of the folders in the project is displayed in a tree form.
Figure 3-4 Project Explorer
When the Project Explorer is not opened, select [Window] → [Show View] → [Other] from the e select [General] → [Project Explorer] on the opened [Show View] dialog box.
2
studio menu and

3.4.2 Smart C onfigurator view

The Smart Configurator view consists of six pages: [Overview], [Board], [Clocks], [Components], [Pins], and [Interrupts]. Select a page by clicking on a tab; the displayed page will be changed.
Figure 3-5 Smart Configurator View
When this view is not op ened, right-click on the project file (*.scfg) in the Project Explorer and select [Open] from the context menu.
R20AN0451ES0130 Rev.1.30 Page 20 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

3.4.3 MCU Package view

The states of pins are displayed on the figure of the MCU package. The settings of pins can be modified from here. Two types of package view can be switched between [Assigned] and [Default Board]. [Assigned] displays the
assignment sta t us of the pin setting, and [De fault Board] displays the initial pin setting information of the board. The initial pin setting information of the board is the pin information of the board selected by [Board:] on the [Board] page (refer to "4.1.2 Selecting the board").
Figure 3-6 MCU Package View
When this view is not opened, select [Renesas Views] → [Smart Configurator] → [MCU Package] from the e menu.
2
studio
R20AN0451ES0130 Rev.1.30 Page 21 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

3.4.4 Console view

The Console view displays details of cha nges to the configuration made in the Smart Configurator or MCU Package view.
Figure 3-7 Conso le View
2
When this view is not opened, select [Wind ow] [Show View] [Other] from the e [General] [Console] on the opened [Show View] dialog box.

3.4.5 Configuration Problems view

The Configuration Problems view displays the details of conflicts between pins.
studio menu and select
Figure 3-8 Configuration Problems View
When this view is not op ened, select [Renesas Vie ws] → [Smart Configurator] → [Configuration Problems] from the e studio menu.
2
R20AN0451ES0130 Rev.1.30 Page 22 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

4. Setting of Peripheral Modules

You can select peripheral modules from the Smart Configurator view.

4.1 Board Settings

You can change the board and device on the [Board] tabbed page.

4.1.1 Selecting the device

Click on the [ ] button to select a device. MCU migration function is recommended when changing the device. Follow the procedure of "4.6 MCU migration
function" to change the device.
Figure 4-1 Selecting the Device
Note: Device change is not reflected to the device of e
migration feature".
2
studio project. To change the device, perform from "4.6 MCU
R20AN0451ES0130 Rev.1.30 Page 23 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio

4.1.2 Selecting the board

By selecting a board, the following settings can be changed at one time.
Pin assignment (Initial pin setting)
Frequency of the main clock
Frequency of the sub-clock
• Target device
The board setting information is defined in the Board Description File (.bdf). The .bdf file of Renesas made board (e.g. Renesas Starter Kit) can be downloaded from website and imported. In addition, by downloading the .bdf file provided by the alliance partner from website and importing it, it is possible to
select alliance part boards.
Figure 4-2 Selecting the Board
Note: Depending on the board selected, the device will change, Device change is not reflected to the target device of
2
studio project. If there is a change in the device, change the device suitable for that board from "4.6 MCU
e
migration feature".
R20AN0451ES0130 Rev.1.30 Page 24 of 79 Jan 25, 2019
RX Smart Configurator User's Guide: e² studio
(2)
(1)
(1)

4.1.3 Exporting board settings

Follow the procedure below to export the board settings. (1) Click on the [ (Export board setting)] button on the [Board] tabbed page.
(2) Select the output location and specify a name (Display Name) for the file to be exported.
Figure 4-3 Exporti ng Board Settings (bdf Fo rmat)

4.1.4 Importing board settings

Follow the procedure below to import board settings. (1) Click on the [ (Import board setting)] button and select a desired bdf file.
(2) The board of the imported settings is added to the board selection menu.
Figure 4-4 Importing Board Settings (bdf Format)
Once a board setting file is imported, the added board is also displayed in the board selection menu of other projects for the same device group.
R20AN0451ES0130 Rev.1.30 Page 25 of 79 Jan 25, 2019
Loading...
+ 57 hidden pages