H8S, H8SX Family E10A-USB Emulator
Section 2 Specifications of the Emulator’s Software
R20UT0271EJ0100 Rev. 1.00
Page 19 of 20
May 13, 2011
2.2.7
Interface with Initialization, Write, and Erase Modules and Emulator Firmware
The initialization, write, and erase modules must be branched from the firmware when the
emulator is initiated and the external flash memory is written or read*.
Note: The modules are not called if the external flash memory data is not updated.
To branch from the emulator firmware to the initialization, write, and erase modules, or to return
from the initialization, write, and erase modules to the emulator firmware, the following
conditions must be observed:
•
The size of each initialization, write, or erase module must be consecutive 4 Kbytes or less
(including work areas and stack areas).
•
Save and return all the general register values and control register values before and after
calling the initialization, write, or erase module.
•
Return the initialization, write, or erase module to the calling source after processing.
•
The initialization, write, and erase modules must be Motorola S-type files.
•
For the write module, write data ER1(L) to address ER0(L) and store the top address of flash
memory ER2(L) then the result in ER0(L).
•
For the erase module, erase the block of address ER0(L) and store the top address of flash
memory ER1(L) then the result in ER0(L).
•
Set the write size of the write module as described in No. 13 ‘Bus width’ in table 2.7 (byte,
word, or longword).
•
The initialization module is used to set the device that is required for accessing the external
flash memory. Store the result in ER0(L).
The module interface must be as follows to correctly pass the information that is required for
accessing flash memory.