Flash Programmer Mode; Preparation For Flash Programming - Epson S5U1C17001H User Manual

Cmos 16-bit single chip microcomputer
Hide thumbs Also See for S5U1C17001H:
Table of Contents

Advertisement

6 FlaSH PrOGraMMer MODe

6 Flash Programmer Mode
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.

6.1 Preparation for Flash Programming

The Flash programming feature allows programming the target system's Flash memory with data such as a pro-
gram, 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 de-
scribed below.
(1) Convert the file for programming the Flash memory into a Motorola S3 file.
Use "objcopy.exe" included in the S1C17 Family C Compiler Package for file conversion.
Example: 1. Convert "sample.elf" into a Motorola S3 file.
(2) Start up the S5U1C17001H in ICD mode (see Section 5.2).
(3) Start up the debugger.
1. Launch GDB.
>gdb
2. Connect the target.
(gdb) target icd usb
(4) If the S5U1C17001H contains an unnecessary program/data used previously, clear it using the c17 fwe com-
mand.
(5) Download a Flash erase/program routine into the S5U1C17001H using the c17 fwlp command.
Example: Load the data erase/write program file "writer.sa."
(6) Download the data for programming the target system's Flash memory into the S5U1C17001H using the c17
fwld (or c17 fwdc) command. At the same time, specify the range of the Flash memory to be erased.
Example: Erase all sectors and load "sample.saf" to the Flash.
(7) Quit the debugger.
For details of the debugger (gdb.exe) and "objcopy.exe," refer to the "S5U1C17001C Manual (C Compiler Package
for S1C17 Family)."
16
Downloaded from
Elcodis.com
electronic components distributor
>objcopy -O srec -R .gbss --srec-forceS3 sample.elf sample.sa
2. Fill the unused addresses in "sample.sa" and generate "sample.saf."
(when the start address and block size to be filled are 0x8000 and 0x1000, respectively)
>moto2ff 0x8000 1000 sample.sa
(when the erase routine start address is 0x4c and the write routine start address is 0x80)
(gdb) c17 fwlp writer.sa 0x4c 0x80
(when the Flash start address is 0x8000)
(gdb) c17 fwld sample.saf 0 0 0x8000
ePSOn
S5U1C17001H USer ManUal
(ICD MInI Ver. 1.0)

Advertisement

Table of Contents
loading

Table of Contents