User configuration files, Session information, Warning – Comtrol eCos User Manual

Page 757

Advertising
background image

Running a Synthetic Target Application

used. The

-V

command line option can be used to get warnings about unused device entries in the target definition

file.

If the body of a synth_device command contains an unrecognised option and the relevant device is in use, the I/O
auxiliary will always issue a warning about such options.

User Configuration Files

During initialization the I/O auxiliary will execute two user configuration files,

initrc.tcl

and

mainrc.tcl

. It

will look for these files in the directory

~/.ecos/synth/

. If that directory does not yet exist it will be created and

populated with initial dummy files.

Both of these configuration files are Tcl scripts and will be run in the main interpreter used by the I/O auxiliary
itself. This means that they have full access to the internals of the auxiliary including the various Tk widgets, and
they can perform file or socket I/O if desired. The section

Writing New Devices - host

contains information about

the facilities available on the host-side for writing new device drivers, and these can also be used in the initialization
scripts.

The

initrc.tcl

script is run before the auxiliary has processed any requests from the eCos application, and hence

before any devices have been instantiated. At this point the generic command-line arguments has been processed,
the target definition file has been read in, and the hooks functionality has been initialized. If running in graphical
mode the main window will have been created, but has been withdrawn from the screen to allow new widgets to
be added without annoying screen flicker. A typical

initrc.tcl

script could add some menu or toolbar options,

or install a hook function that will be run when the eCos application exits.

The

mainrc.tcl

script is run after eCos has performed all its device initialization and after C++ static constructors

have run, and just before the call to

cyg_start

which will end up transferring control to the application itself. A

typical

mainrc.tcl

script could look at what interrupt vectors have been allocated to which devices and create a

little monitor window that shows interrupt activity.

Session Information

When running in graphical mode, the I/O auxiliary will read in a file

~/.ecos/synth/guisession

containing

session information. This file should not normally be edited manually, instead it gets updated automatically when
the auxiliary exits. The purpose of this file is to hold configuration options that are manipulated via the graphical
interface, for example which browser should be used to display online help.

Warning

GUI session functionality is not yet available in the current release. When that functionality
is fully implemented it is possible that some target definition file options may be removed, to
be replaced by graphical editing via a suitable preferences dialog, with the current settings
saved in the session file.

653

Advertising