Application Note
R20AN0547EJ0200 Rev.2.00 Page 1 of 16
Dec.24.20
Renesas Flash Programmer
Usage from the Command Line
Introduction
This document introduces the command line control by using the Renesas Flash Programmer. Using
command lines enables the automated control of programming.
Target Devices
RA family
RL78 family
RX family
RH850 family
Renesas Synergy
TM
microcontrollers
RE family
Power management (power-management IC)
Renesas USB Power Delivery family (C30 group)
ICs for driving motors and actuators (ICs for motor control)
Contents
1. Overview ................................................................................................................................. 3
2. Procedure before Using Project Files from the Simple Command Line .................................... 3
2.1 Connecting a System ......................................................................................................................... 3
2.2 Connecting a Target System .............................................................................................................. 4
2.3 Creating a Project File ........................................................................................................................ 4
2.4 Setting a Project................................................................................................................................. 7
2.5 Creating a Batch File ........................................................................................................................ 10
2.6 Executing the Batch File ................................................................................................................... 10
3. Examples of Processing from the Simple Command Line with the Use of Project Files ......... 11
3.1 Programming Multiple Program Files ................................................................................................ 11
3.2 Consecutive Programming of Different Specified Projects ................................................................ 11
3.3 Executing the Specified Commands (Erasure, Programming, and Verification) ................................. 11
3.4 Programming Sections of the Option Bytes (OPBTs) of MCUs with RH850G4MH Cores .................. 11
3.5 Programming with a Specified Emulator ........................................................................................... 11
3.6 Simultaneous Programming through Multiple Devices Connected to a PC (Gang Programming) ...... 12
3.7 Output of Descriptions of the Executed Command Lines to the Windows Command Prompt............. 13
4. Examples of Processing from Command Lines with the Use of rfp-cli .................................... 14
4.1 Programming a Program File ........................................................................................................... 14
R20AN0547EJ0200
Rev.2.00
Dec.24.20
Renesas Flash Programmer Usage from the Command Line
R20AN0547EJ0200 Rev.2.00 Page 2 of 16
Dec.24.20
4.2 Programming Multiple Program Files ................................................................................................ 14
4.3 Executing the Specified Commands (Erasure, Programming, Verification, and Checksum) ............... 14
4.4 Programming Options in Flash Memory ............................................................................................ 14
4.5 Reading Options for Flash Memory .................................................................................................. 14
4.6 Reading or Programming Sections of the Option Bytes (OPBTs) of MCUs with RH850G4MH Cores 15
4.7 Programming with a Specified Emulator ........................................................................................... 15
4.8 Setting Reset Signals with a Serial Connection through a COM Port ................................................ 15
4.9 Simultaneous Programming through Multiple Devices Connected to a PC (Gang Programming) ...... 15
Renesas Flash Programmer Usage from the Command Line
R20AN0547EJ0200 Rev.2.00 Page 3 of 16
Dec.24.20
1. Overview
The Renesas Flash Programmer (RFP) enables the automated control of programming by using command
lines.
There are two types of command line control of the RFP.
Use of project files from a simple command line (for Windows)
Use of rfp-cli from a command line (for Windows and Linux)
For rfp-cli, programming can be controlled from the command line alone without the use of project files. This
facility is supported by V3.08.00 and later versions of the RFP.
This document introduces various examples of processing by using command lines so try using them and
adapting them to your own needs.
For details on the RFP, refer to the user’s manual.
https://www.renesas.com/rfp
2. Procedure before Using Project Files from the Simple Command Line
This chapter helps you to understand the sequence of the basic procedures to follow before setting up
processing that uses project files of the RFP from the simple command line, taking the RL78/G14 as an
example of the target MCU.
The descriptions in this chapter apply under the following conditions.
Target MCU: R5F104LE (RL78/G14)
Tool: E2 emulator Lite
Connection: 1-wire UART (single-wire UART)
Bit rate: 1,000,000 bps
Clock to be supplied: None (on-chip clock oscillator)
Power supply: E2 emulator Lite (3.3 V)
Operations of flash memory: Erasure, programming, and verification
Options for flash memory: None
This chapter describes the following procedures. If you already understand the items up to step 4, Setting
a project, start with reference to step 5, Creating a batch file.
1. Connecting a system
2. Connecting a target system
3. Creating a project file
4. Setting a project
5. Creating a batch file
6. Executing the batch file
2.1 Connecting a System
Connect the USB port of the host PC to the tool to be used via a USB cable.
Figure 2.1 Connecting a Tool
Renesas Flash Programmer Usage from the Command Line
R20AN0547EJ0200 Rev.2.00 Page 4 of 16
Dec.24.20
2.2 Connecting a Target System
Connect the target cable of the tool to be used to the target system.
Target system
Figure 2.2 Connecting a Target System
2.3 Creating a Project File
Start the RFP GUI to open the main window.
Select [New Project] from the [File] menu to open the [Create New Project] dialog box.
Figure 2.3 [Create New Project] Dialog Box
Select “RL78” for [Microcontroller], enter “sample” for [Project Name], specify “C:\rfp” for [Project Folder], and
select “E2 emulator Lite” for [Tool].
Clicking on the [Tool Details] button opens the [Tool Details] dialog box.
Renesas Flash Programmer Usage from the Command Line
R20AN0547EJ0200 Rev.2.00 Page 5 of 16
Dec.24.20
Figure 2.4 [Tool Details] Dialog Box
Select 3.3Vand click on the [OK] button.
After returning to the [Create New Project] dialog box, click on the [Connect] button.
Renesas Flash Programmer Usage from the Command Line
R20AN0547EJ0200 Rev.2.00 Page 6 of 16
Dec.24.20
The project file is created and the display returns to the main window.
Figure 2.5 Main Window