
Flash Development Toolkit
Method for Using the User Program Mode (SH7086 Application)
6.2 Main Process and ROM Main Process
(1) Hierarchical module structure
The hierarchical structure of the main process and ROM main process modules is shown below.
Branch from the reset vector to start, set the stack pointer (Strt7086.src) and branch to the main process
(GenTest.c, main).
In the main process, initialize the SCI (GetTest.c, InitSCI) to make it capable of transmission/reception,
and branch to ROM main process (Ugenu.c, RomMain).
In the ROM main process, transfer RAM main process, etc. to the RAM (Ugenu.c, TransStart) and
process the commands (Ugenu.c, CmdFunc). At end of data, branch to RAM main process (FDTUMain.c,
RamMain).
The main process and the ROM main process are executed in the ROM.
(2) Reset vector (GenTest.c, GenTest.h)
The reset vector is shown below.
• GenTest.c
/*Declare the vector table*/
#pragma section _VECT
const DWORD RESET_VECTOR = (DWORD)RESET_JMP_ADDRESS;
#pragma section
• GenTest.h
#define RESET_JMP_ADDRESS 0x1000
(3) Transfer start (Ugenu.c, rom2ram.src)
In the transfer of RAM main process, etc., transfer the modules listed below from ROM to RAM according
to the transfer table (rom2ram.src). The sections use the ROM option.
(4) Command functions (Ugenu.c, commands.h, CmdFunc.c, DeviceInfo.h)
The command function (CmdFunc) processes inquiries and the set commands. The commands are
macro-defined (commands.h), and the processes (CmdFunc.c) corresponding to the respective
commands are executed. For inquiry commands, the processes (CmdFunc.c, ReferFunc) that output the
responses (DeviceInfo.h) corresponding to the commands are executed.
REJ06J0071-0100 /Rev.1.00 2009.2 Page 92 of 106
Komentarze do niniejszej Instrukcji