12
4
(11) Write to the flash memory
To transfer the user program to the user RAM and write it to the flash ROM, use the fl command. Enter “fl 0” at
the command prompt. Before writing to the flash ROM, erase the flash ROM first. Figure 10.2 shows the
procedure for writing the user program to the flash ROM and executing it from the flash memory. Specify “0”
as an option for the fl command.
After command entry, the monitor program displays the following transfer request message on the host system
screen.
When this message appears, use the file transfer function of the communication software to send the S format
object file.
The S format object file is provided with address information, and the object file is located according to this
information.
When the object file has no address information, i.e., it is a relocatable file, specify an offset address in the fl
command.
This offset address must be within a user area shown in Figure 12.1.
Upon completion of program loading into the memory, the following message is displayed on the host system
screen. (In this example, the program has been loaded into the address h’A0000000 within area 3.)
When flash ROM erasure begins, the monitor program displays the following message.
Upon completion of ROM erasure, the monitor program begins to write to the flash ROM.
When a write operation is complete, the monitor program displays the following command prompt on the screen.
Ready >fl 0
SH7760 Flash Memory Change Value!
Flash Memory data copy to RAM
Please Send A S-format Record
Flash chip erase:
Flash chip erase: complete
Program :
Ready >fl 0
SH7760 Flash Memory Change Value!
Flash Memory data copy to RAM
Please Send A S-format Record
Start Addrs = A0000000
End Addrs = A00FFFFF
Transfer complete
Flash chip erase: complete
Program :complete
Flash write complete
Ready >
Start Addrs = A0000000
End Addrs = A00FFFFF
Transfer complete