beautypg.com

3 executing from a command file – Epson S5U1C62000A User Manual

Page 151

background image

S5U1C62000A MANUAL

EPSON

139

(S1C60/62 FAMILY ASSEMBLER PACKAGE)

CHAPTER 9: DEBUGGER

9.7.3 Executing from a Command File

Another method for executing commands is to use a command file that contains descriptions of a series
of debug commands. By reading a command file into the debugger the commands written in it can be
executed.

Creating a command file

Create a command file as a text file using an editor.
Although there are no specific restrictions on the extension of a file name, Seiko Epson recommends
using ".cmd".

Command files can also be created using the rec command. The rec command creates a command file
and saves the executed commands to the file.

Example of a command file

The example below shows a command group necessary to read an object file and an option file.

Example

: File name = startup.cmd

lf test.abs

lo testf.hex

lo tests.hex

A command file to write the commands that come with a guidance mode can be executed. In this case,
be sure to break the line for each guidance input item as a command is written.

Reading in and executing a command file

There are two methods to read a command file into the debugger and to execute it, as described
below.

(1) Execution by the start-up option

By specifying a command file in the debugger start-up command, one command file can be executed
when the debugger starts up.
If the above example of a command file is specified, for example, the necessary files are read into the
debugger immediately after the debugger starts up, so everything is ready to debug the program.

Example

: Startup command of the debugger

db62 startup.cmd ics62xxp.par

(2) Execution by a command

The debugger has the com commands available that can be used to execute a command file.
The com command reads in a specified file and executes the commands in that file sequentially in the
order they are written. An execution interval between the commands can be specified up to 30
seconds.

Example

:

com startup.cmd

The commands written in the command file are displayed in the [Command] window.

Restrictions

Another command file can be read from within a command file. However, nesting of these command
files is limited to a maximum of five levels. An error is assumed and the subsequent execution is
halted when the com command at the sixth level is encountered.