3 executing from a command file, 4 executing program – Epson S5U1C63000A User Manual

Page 153

Advertising
background image

CHAPTER 8: DEBUGGER

S5U1C63000A MANUAL

EPSON

139

(S1C63 FAMILY ASSEMBLER PACKAGE)

8.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 test.fsa

lo test.ssa

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

db63 startup.cmd par63xxx.par

(2) Execution by a command

The debugger has the com and cmw 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.
The cmw command performs the same function as the com command except that each command is
executed at intervals specified by the md command (1 to 256 seconds).

Examples:

com startup.cmd

cmw test.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 or cmw command at the sixth level is encountered.

Advertising