5 ICD Mode
S5U1C17001H USER MANUAL
Seiko Epson Corporation
15
(ICDMINI VER1.0 and VER1.1)
6 Flash Programmer Mode
As flash writer at main unit, flash programmer mode is an S5U1C17001H operating mode for using it as a
standalone Flash programmer. The following explains the settings for activating the Flash programmer mode and
operations.
This mode is not used when debugging programs. This task is only performed when using the ICDmini as a Flash
writer without a PC for mass production and so on.
6.1 Preparation for Flash Programming
The Flash programming feature allows programming the target system’s Flash memory with data such as a
program, which has been downloaded into the S5U1C17001H’s internal Flash memory.
First download the data to program the target system’s Flash memory into the S5U1C17001H by the procedure
described below.
(1) Start up the S5U1C17001H in ICD mode (see Section 5.2).
(2) Start up the debugger.
1. Launch GDB.
2. Connect the target.
(gdb) target icd usb
(3) Save the Flash erase/write program (FLS program) in the ICDmini with the
c17 fwlp
command.
Example: When the S1C17701 is the target (ICDmini firmware ver1.1)
(gdb) c17 fwlp C:\EPSON\GNU17\mcu_model\17701\fls\fwr17701v11.saf 0x48 0x80
A Flash erase/write program for the Mini target (S1C processor) or external Flash memory must be saved
in the ICDmini. For details of the Flash erase/write program, refer to the readme file below following
installation of GNU17.
C:\EPSON\GNU17\mcu_model\xxxxx\fls\
(Default installation)
(4) Save the user program for writing to the target Flash memory in the ICDmini with the
c17 fwlp
(or
c17
fwdc
) command. At the same time, set the range of the Flash memory to erase.
Example: Erase all sectors and load sample.saf in the Flash memory
(When the Flash starting address is 0x8000)
(gdb) c17 fwld sample.saf 0 0 0x8000
(5) Quit the debugger.
For details of the debugger (gdb.exe) and “objcopy.exe,” refer to the “S5U1C17001C Manual (C Compiler Package
for S1C17 Family).”
6.2 Operations in Flash Programmer Mode
The following describes how to start up the S5U1C17001H and procedure for Flash programming.
(1) Set SW2 and SW3 according to the Flash operation to be performed.
One of the three sequences, erasing and programming, verification only, or erasing, programming, and
verification, can be selected.
Table 6.2.1 DIP Switch Settings in Flash Programmer Mode
SW2
SW3
Setting
OPEN (
h
)
OPEN (
h
)
ICD mode (default)
ON (
i
)
OPEN (
h
)
Flash programmer mode Erase
g
program
OPEN (
h
)
ON (
i
)
Flash programmer mode Verify
ON (
i
)
ON (
i
)
Flash programmer mode Erase
g
program
g
verify