Gettingstartedrflasher
Gettingstartedrflasher
Overview and
Getting Started
November 2005
Table of Contents
1. INTRODUCTION 5
3. AUTO MODE 12
4. USING PROJECTS 15
5. PROGRAMMER OPTIONS 18
5.1 ST7 19
5.1.1 ICC with RLink 19
5.1.1.1 RLink options section 19
5.1.1.2 ICC Mode Entry section 19
5.1.1.3 Option Bytes Options section 20
5.2 STR7 20
-2-
5.2.1 JTAG with RLink-STR7 or JTAGJet 20
5.2.1.1 Test connect section 21
5.2.1.2 JTAG Clock section 21
5.2.1.3 Sector Selection section 21
5.2.1.4 JTAG Chain Description section 21
5.2.2 UART bootloader with COM port 22
5.2.2.1 Presentation 22
5.2.2.2 Options 22
5.2.2.3 Operation 22
-3-
RFlasher
Glossary
• Programmer / programming tool: the piece of hardware used to send some code from a
workstation to the target microcontroller, i.e. to write the code into the microcontroller
Flash memory.
• Target: the microcontroller or embedded device on which the current program is meant to run.
The target is connected to the workstation running RFlasher via the programming tool.
-4-
RFlasher Introduction
1. Introduction
RFlasher is a user-friendly Windows interface that allows you to program object files to a
microcontroller's flash memory.
You can connect to microcontrollers in order to manage their non-volatile memory: erase, blank-
check, program from the PC memory used by RFlasher, or read-out to the PC memory used by
Rflasher.
You can load object files into the PC memory that is used by RFlasher and then view, edit them
and save them.
RFlasher also provides a configurable automatic mode for grouping commands (for example,
erase and program in one single click) and for mass programming (for example programming
multiple devices in sequence).
RFlasher provides a third mode of operation: project mode. The project mode is slightly more
complex to use but offers more possibilities such as allowing you to save the configuration for
each application in case you have several different applications to handle. It also allows you to
create projects from several object files.
RFlasher can be used to program microcontrollers in any of several supported families using the
connection protocol specific to each. The list of supported devices is not fixed and will increase
as time passes; it is available in the target selection window.
This document provides information about RFlasher features that are common to all supported
targets and/or programming tools, general user information for the supported tools and device
families. For details about features that are specific to your target and/or programming tool,
please refer to the on-line help, after having selected your programming tool.
-5-
First steps with RFlasher RFlasher
This chapter walks you through the steps for programming your target
with RFlasher, the RIDE programming interface. These steps are
presented in the order that they are typically used.
13
1
2
6 5
7
4
9
11 10 12 8
These numbers represent both the order of the steps, and the section number for reference in this
document. For example, step n°4 is described in the section 2.4.
-6-
RFlasher First steps with RFlasher
The first time you launch RFlasher, the hardware configuration window is automatically opened;
otherwise, click on the “Hardware Config” button. The Settings dialog box appears as shown
below:
Select your target family, then click “Next” to go to the target tab. In the Target tab, select your
target derivative and note the start address for the flash memory shown in the device description,
then click "Next".
Important: note the Flash memory start address given in the description field for future
reference.
-7-
First steps with RFlasher RFlasher
In the Configuration tab, choose your programming tool. You can also enter a memory
initialization value (for advanced users).
When your hardware configuration is complete, click on “Finish” to close the window and go to
the next step.
You can load a file in any of the formats that Raisonance tools recognise as ready to program
(HEX, ELF, BIN, AOF ...).
Select your file, then click “Open”.
In the Options dialog box, click on “OK” - do not modify the default options.
The name of the file you have loaded now appears in the "Last file loaded" field.
Sample HEX files, are provided in the RIDE install directory. For standard installations of RIDE
and RFlasher go to:
c:\ride\examples\<family>\RFlasher\<derivative>\ex1_RFlasher.hex.
(These examples are designed to run on the REva board with the LED jumpers enabled.)
-8-
RFlasher First steps with RFlasher
This window shows the code loaded in the PC memory that is used by RFlasher prior to
programming the target. At this stage, the display is not an image of your device's memory as the
device has not yet been programmed. The file has only been loaded in the PC memory used by
RFlasher.
After communication with the target device, a dialog box informs you of the result of the
operation.
If the device is blank, you can jump directly to step 2.7; otherwise you must erase your device
first.
-9-
First steps with RFlasher RFlasher
2.6 Erase
Click on this button to erase your device's Flash memory prior to programming it:
You can do a blank check again after erasing to make sure your device is ready.
2.7 Program
You can program your device by clicking on this button:
The program operation consists of loading the content of the PC memory that is used by RFlasher
(initialized with “Load File”) into the target device's flash. After communicating with the device,
a dialog box informs you of the success of the operation.
2.9 Verify
Click on the "Verify" button to perform a strict verification of the program integrity in the Flash
memory by comparing its content with the program loaded in the PC memory, which is visible in
the Memory View:
2.10 Statistics
Depending on your hardware, you can click on this button to obtain statistics on the target.
Usually this includes the CheckSum.
If you go to the start address of Flash memory in the memory view, you should not longer see any
data.
- 10 -
RFlasher First steps with RFlasher
2.12 Read
Click on this button to copy the device's Flash memory content to the PC memory used by
RFlasher:
This button allows RFlasher to dump (make an exact copy of) the device Flash memory into the
RFlasher memory view. To see the Flash memory, go to its start address using the “Search”
field.
Enter the start and end addresses, then select “With file” and click on “Browse...”. Here you
can enter a file name such as “dump.hex”, and click on “Open”. Back in the
“Fill or Save segment” dialog box, click on the “Save” button. The file dump.hex is created,
containing the memory dump in Intel HEX format.
- 11 -
Auto Mode RFlasher
3. Auto Mode
- 12 -
RFlasher Auto Mode
Select the options you want, but uncheck the last one (“Loop”) for now. Click “OK” to validate
your choices.
Click on the “Go!” button to launch the auto mode sequence. The operations
are done, then a dialog box indicates the success or failure of the operations:
Select the “Configure” button again, and this time check the “Loop” option as
if you had several devices to program sequentially with the same program, and click “OK”.
When you select the “Go!” button, it launches the process. At the end of the sequence, a dialog
box asks you whether you want to program another device.
- 13 -
Auto Mode RFlasher
- 14 -
RFlasher Using projects
4. Using projects
In this case, you can gather your information and program files in a
project for management within Rflasher.
- 15 -
Using projects RFlasher
Choose a project name such as “first_steps”. Select a working directory (for example
“C:\RIDE\work”) and a Target family, then click “Next”.
The next steps are related to your hardware configuration, please refer to chapter 2, section 2.1,
page 7.
• Project
• Programmer Views
• Documentation
- 16 -
RFlasher Using projects
4. Click “Open”.
Change the order of objects in the project display by selecting an object and pressing Shift+↑ or
Shift+↓ to place your nodes in the expected order.
Repeat these steps for any object file or documentation file you want to include.
- 17 -
Programmer options RFlasher
5. Programmer options
- 18 -
RFlasher Programmer options
5.1 ST7
RFlasher supports most ST7 devices from ST.
The supported ST7 devices use the ICC protocol that has been designed for in-circuit programming
them. ST7 in-circuit programming tools use this protocol.
Option bytes control a variety of configurable features for ST7 Flash devices such as memory write
protection, clock source, watchdog and low voltage detection. RFlasher allows you to read, erase and
program the option bytes in the programmer specific panel. Please refer to the device datasheet for
more information about these bytes and their effect on the device. (watch out for read and write
protection bits)
Warning: For XFlash devices, if write protection is enabled the XFlash memory behaves like ROM
memory. You will not be able to debug your application and it is impossible to rewrite the XFlash
memory.
Some ST7 devices (ST7Litexxx, ST726x, etc.) feature EEPROM-like memory called XFlash. These
devices do not need to be erased before programming them.
The other type of memory, HDFlash, is based on real Flash and needs proper erasing before
reprogramming.
Please refer to your device's documentation for information about its Flash memory type.
• View REva Jumpers: this opens a window containing pictures showing how to set the jumpers
on the RLink attached to the REva board for communicating with ST7 devices through
ICC.
• Connect to RLink and read Serial Number: this connects to RLink and reads its serial
number. It is used to check the connection and the installation of the RLink USB driver.
Raisonance support team will need your RLink's serial number if you contact us.
• Ignore Option Bytes: when checked, RFlasher will first attempt to enter ICC mode using
the default option bytes. If unchecked, the first reset will be done using the custom option
bytes. If the first method fails, RFlasher will automatically attempt to enter ICC mode
using the other method.
You can refer to the ST application note “AN1813 In-Circuit Programming Considerations”
for more information on the ICC mode entry methods.
- 19 -
Programmer options RFlasher
• Action When Programming: these options tell RFlasher what it should do with the option
bytes when you launch the “Program” command in the “Commands” section of the panel.
• If “Leave as is” is checked, then the option bytes will not be modified.
• If “Restore Default” is checked, then the default value will be programmed in the
option bytes. To find out what this value is, check “Write” and then click “Default”
in the “Value to write” sub-section.
• If “Write” is checked, then the value that you entered in the “Value to write” sub-
section will be written in the option bytes.
• Value to write: this allows the specification of the value to write in the option bytes if
“Write” is checked in the “Action when programming” sub-section.
• Read Option Bytes: this allows the reading of the option bytes from the device.
• “Restore Default Option Bytes now!” / “Write Option Bytes now!”: this allows
writing the option bytes to the device without changing the Flash.
The text on the button changes depending on the option selected in the “Action when
programming” sub-section.
5.2 STR7
The STR7 family is a family of ARM-core based microcontrollers from ST. RFlasher supports
most of them.
They provide four JTAG pins that allow you to program them. Most programming tools use
them.
Some STR7 devices (STR73x) also provide a UART bootloader that can be used for
programming them.
Most STR7 devices provide several boot modes (FLASH, RAM, BOOT, etc.), usually selected
by jumpers on the target board. Make sure that the correct mode is selected before attempting to
use RFlasher: you should select FLASH mode for JTAG FLASH programming. You should
select BOOT mode for using the bootloader. See the device and the target board's documentation
for more information.
- 20 -
RFlasher Programmer options
• View REva Jumpers: this opens a window containing pictures showing how to set the jumpers
on the RLink attached to the REva board for communicating with STR7 devices through
JTAG. Appears with RLink, not JTAGJet.
• Connect to Rlink: this connects to RLink and reads its serial number. It is used to check the
connection and the installation of the RLink USB driver. Raisonance support team will
need your RLink's serial number if you contact us. Appears with RLink, not JTAGJet.
• Connect to Target: this connects to the target via JTAG and checks the target's IdCode. Use
this to check that connections, power and the other options in this window are correctly
set.
• Help: opens the help window.
- 21 -
Programmer options RFlasher
If your STR7 device is chained with other JTAG devices, describe the JTAG chain in this
section.
• Single Device: check this box if the STR7 is NOT chained with other JTAG devices.
Unchecking this is like setting DRB=0, IRB=0, DRA=0, IRA=0. (see below)
• Chain Parameters: this is the actual description of the chain. There are four parameters
needed to be able to communicate with the STR7 device:
• DRB & DRA: This is the number of devices before and after the target STR7.
• IRB & IRA: This is the sum of the lengths of the IR registers of the devices before and
after the target.
Example: if the chain contains two devices before the STR7, the first with IRlength=4 and the
second with IRlength=6, then you should configure the parameters like this: DRB=2, IRB=10,
DRA=0, IRA=0.
5.2.2.1 Presentation
The bootloader is a piece of software in the ROM of the STR730 devices.
It allows programming the device's Flash memory using the UART.
It is mapped at address zero and executed at reset if the M0 signal is tied to GND and the M1
signal is tied to VCC.
Most boards provide jumpers for doing this.
This part of RIDE and RFlasher provide an interface to it for easily programming your
application in the device.
5.2.2.2 Options
The only options are for the communication:
• COM port: you must tell the software which port of your PC is connected to the device.
• Baudrate: you must also tell it what speed you want the communication to be performed at.
Depending on the target's clock speed, you might want to use a lower speed than the
maximum available.
5.2.2.3 Operation
• Connection: when these options are correctly set, just follow these steps:
- 22 -
RFlasher Programmer options
• Reset: then, you must reset the target board before each operation (erase, program, blank-
check, etc.).
• Command-Line: the STR730_pgm.exe program installed with RIDE allows performing the
same operations from the command-line. Launch it without argument in order to see the
help that will tell you how to use it.
- 23 -