Renesas Flash Programmer Usage from the Command Line

Renesas Flash Programmer Usage from the Command Line

Application Note R20AN0547EJ0200 Renesas Flash Programmer Rev.2.00 Usage from the Command Line Dec.24.20 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 SynergyTM 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 Page 1 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line 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 R20AN0547EJ0200 Rev.2.00 Page 2 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line 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 R20AN0547EJ0200 Rev.2.00 Page 3 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line 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. R20AN0547EJ0200 Rev.2.00 Page 4 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line Figure 2.4 [Tool Details] Dialog Box Select “3.3V” and click on the [OK] button. After returning to the [Create New Project] dialog box, click on the [Connect] button. R20AN0547EJ0200 Rev.2.00 Page 5 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line The project file is created and the display returns to the main window. Figure 2.5 Main Window R20AN0547EJ0200 Rev.2.00 Page 6 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line 2.4 Setting a Project Specify “C:\rfp\sample.mot” for [Program File] on the [Operation] tabbed page. Figure 2.6 [Operation] Tabbed Page R20AN0547EJ0200 Rev.2.00 Page 7 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line On the [Operation Settings] tabbed page, select the [Erase], [Program], and [Verify] checkboxes in the [Command] category and confirm this. Figure 2.7 [Operation Settings] Tabbed Page R20AN0547EJ0200 Rev.2.00 Page 8 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line Specify “1,000,000 bps” for [Speed] on the [Connect Settings] tabbed page. Figure 2.8 [Connect Settings] Tabbed Page Select [Save Project] from the [File] menu to save the project. Select [Exit] from the [File] menu to close the RFP window. R20AN0547EJ0200 Rev.2.00 Page 9 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line 2.5 Creating a Batch File Enter the following in a text editor and save it as “C:\rfp\sample.bat”. SET PATH=%PATH%;C:\Program Files (x86)\Renesas Electronics\Programming Tools\Renesas Flash Programmer V3.06 RFPV3.exe /silent "C:\rfp\sample\sample.rpj" ECHO Result Code: %ErrorLevel% PAUSE Figure 2.9 Creating a Batch File Using the silent option starts the RFP in a silent mode in which the GUI is not displayed. After the specified project file (sample.rpj) is opened and processing which is equivalent to execution (in this case, erasure, programming, and verification) in response to pressing the [Start] button once is done, the RFP is closed. If the processing succeeded, result code 0 is returned. Otherwise, 1 is returned. Specify the folder in which the RFP has been installed as the folder indicated by “SET PATH”. “PAUSE” is added so that the output against the command prompts can be confirmed after the RFP has been closed. 2.6 Executing the Batch File Execute the sample.bat batch file. The following lines are displayed in the command prompt window. C:\rfp>SET PATH=%PATH%;C:\Program Files (x86)\Renesas Electronics\Programming Tools\Renesas Flash Programmer V3.06 C:\rfp>RFPV3.exe /silent "C:\rfp\sample\sample.rpj" C:\rfp>ECHO Result Code: 0 Result Code: 0 C:\rfp>PAUSE Press any key to continue… Figure 2.10 Executing the Batch File R20AN0547EJ0200 Rev.2.00 Page 10 of 16 Dec.24.20 Renesas Flash Programmer Usage from the Command Line 3. Examples of Processing from the Simple Command Line with the Use of Project Files This chapter describes examples of processing from the simple command line with the use

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    18 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us