OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [synth-running.html] - Diff between revs 28 and 174

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 174
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>Running a Synthetic Target Application</TITLE
>Running a Synthetic Target Application</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
<META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="eCos Reference Manual"
TITLE="eCos Reference Manual"
HREF="ecos-ref.html"><LINK
HREF="ecos-ref.html"><LINK
REL="UP"
REL="UP"
TITLE="eCos Synthetic Target"
TITLE="eCos Synthetic Target"
HREF="hal-synth-arch.html"><LINK
HREF="hal-synth-arch.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="Installation"
TITLE="Installation"
HREF="synth-install.html"><LINK
HREF="synth-install.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="The I/O Auxiliary's User Interface"
TITLE="The I/O Auxiliary's User Interface"
HREF="synth-gui.html"></HEAD
HREF="synth-gui.html"></HEAD
><BODY
><BODY
CLASS="REFENTRY"
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
SUMMARY="Header navigation table"
SUMMARY="Header navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>eCos Reference Manual</TH
>eCos Reference Manual</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="synth-install.html"
HREF="synth-install.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
></TD
></TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="synth-gui.html"
HREF="synth-gui.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><H1
><H1
><A
><A
NAME="SYNTH-RUNNING">Running a Synthetic Target Application</H1
NAME="SYNTH-RUNNING">Running a Synthetic Target Application</H1
><DIV
><DIV
CLASS="REFNAMEDIV"
CLASS="REFNAMEDIV"
><A
><A
NAME="AEN17751"
NAME="AEN17751"
></A
></A
><H2
><H2
>Name</H2
>Name</H2
>Execution&nbsp;--&nbsp;Arguments and configuration files</DIV
>Execution&nbsp;--&nbsp;Arguments and configuration files</DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="SYNTH-RUNNING-DESCRIPTION"
NAME="SYNTH-RUNNING-DESCRIPTION"
></A
></A
><H2
><H2
>Description</H2
>Description</H2
><P
><P
>The procedure for configuring and building eCos and an application for
>The procedure for configuring and building eCos and an application for
the synthetic target is the same as for any other eCos target. Once an
the synthetic target is the same as for any other eCos target. Once an
executable has been built it can be run like any Linux program, for
executable has been built it can be run like any Linux program, for
example from a shell prompt,
example from a shell prompt,
    </P
    </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>$ ecos_hello &lt;options&gt;</PRE
>$ ecos_hello &lt;options&gt;</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>or using gdb:
>or using gdb:
    </P
    </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>$ gdb --nw --quiet --args ecos_hello &lt;options&gt;
>$ gdb --nw --quiet --args ecos_hello &lt;options&gt;
(gdb) run
(gdb) run
Starting program: ecos_hello &lt;options&gt;</PRE
Starting program: ecos_hello &lt;options&gt;</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>By default use of the I/O auxiliary is disabled. If its I/O facilities
>By default use of the I/O auxiliary is disabled. If its I/O facilities
are required then the option <TT
are required then the option <TT
CLASS="OPTION"
CLASS="OPTION"
>--io</TT
>--io</TT
> must be used.
> must be used.
    </P
    </P
><DIV
><DIV
CLASS="NOTE"
CLASS="NOTE"
><BLOCKQUOTE
><BLOCKQUOTE
CLASS="NOTE"
CLASS="NOTE"
><P
><P
><B
><B
>Note: </B
>Note: </B
>In future the default behaviour may change, with the I/O auxiliary
>In future the default behaviour may change, with the I/O auxiliary
being started by default. The option <TT
being started by default. The option <TT
CLASS="OPTION"
CLASS="OPTION"
>--nio</TT
>--nio</TT
> can be
> can be
used to prevent the auxiliary from being run.
used to prevent the auxiliary from being run.
    </P
    </P
></BLOCKQUOTE
></BLOCKQUOTE
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="SYNTH-RUNNING-ARGUMENTS"
NAME="SYNTH-RUNNING-ARGUMENTS"
></A
></A
><H2
><H2
>Command-line Arguments</H2
>Command-line Arguments</H2
><P
><P
>The syntax for running a synthetic target application is:
>The syntax for running a synthetic target application is:
    </P
    </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>$ &lt;ecos_app&gt; [options] [-- [app_options]]</PRE
>$ &lt;ecos_app&gt; [options] [-- [app_options]]</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>Command line options up to the <TT
>Command line options up to the <TT
CLASS="OPTION"
CLASS="OPTION"
>--</TT
>--</TT
> are passed on to
> are passed on to
the I/O auxiliary. Subsequent arguments are not passed on to the
the I/O auxiliary. Subsequent arguments are not passed on to the
auxiliary, and hence can be used by the eCos application itself. The
auxiliary, and hence can be used by the eCos application itself. The
full set of arguments can be accessed through the variables
full set of arguments can be accessed through the variables
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>cyg_hal_sys_argc</TT
>cyg_hal_sys_argc</TT
> and
> and
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>cyg_hal_sys_argv</TT
>cyg_hal_sys_argv</TT
>.
>.
    </P
    </P
><P
><P
>The following options are accepted as standard:
>The following options are accepted as standard:
    </P
    </P
><P
><P
></P
></P
><DIV
><DIV
CLASS="VARIABLELIST"
CLASS="VARIABLELIST"
><DL
><DL
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>--io</TT
>--io</TT
></DT
></DT
><DD
><DD
><P
><P
>This option causes the eCos application to spawn the I/O auxiliary
>This option causes the eCos application to spawn the I/O auxiliary
during HAL initialization. Without this option only limited I/O will
during HAL initialization. Without this option only limited I/O will
be available.
be available.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>--nio</TT
>--nio</TT
></DT
></DT
><DD
><DD
><P
><P
>This option prevents the eCos application from spawning the I/O
>This option prevents the eCos application from spawning the I/O
auxiliary. In the current version of the software this is the default.
auxiliary. In the current version of the software this is the default.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-nw</TT
>-nw</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--no-windows</TT
>--no-windows</TT
></DT
></DT
><DD
><DD
><P
><P
>The I/O auxiliary can either provide a graphical user interface, or it
>The I/O auxiliary can either provide a graphical user interface, or it
can run in a text-only mode. The default is to provide the graphical
can run in a text-only mode. The default is to provide the graphical
interface, but this can be disabled with <TT
interface, but this can be disabled with <TT
CLASS="OPTION"
CLASS="OPTION"
>-nw</TT
>-nw</TT
>.
>.
Emulation of some devices, for example buttons connected to digital
Emulation of some devices, for example buttons connected to digital
inputs, requires the graphical interface.
inputs, requires the graphical interface.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-w</TT
>-w</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--windows</TT
>--windows</TT
></DT
></DT
><DD
><DD
><P
><P
>The <TT
>The <TT
CLASS="OPTION"
CLASS="OPTION"
>-w</TT
>-w</TT
> causes the I/O auxiliary to provide a
> causes the I/O auxiliary to provide a
graphical user interface. This is the default.
graphical user interface. This is the default.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-v</TT
>-v</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--version</TT
>--version</TT
></DT
></DT
><DD
><DD
><P
><P
>The <TT
>The <TT
CLASS="OPTION"
CLASS="OPTION"
>-v</TT
>-v</TT
> option can be used to determine the version of
> option can be used to determine the version of
the I/O auxiliary being used and where it has been installed. Both the
the I/O auxiliary being used and where it has been installed. Both the
auxiliary and the eCos application will exit immediately.
auxiliary and the eCos application will exit immediately.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-h</TT
>-h</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--help</TT
>--help</TT
></DT
></DT
><DD
><DD
><P
><P
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-h</TT
>-h</TT
> causes the I/O auxiliary to list all accepted
> causes the I/O auxiliary to list all accepted
command-line arguments. This happens after all devices have been
command-line arguments. This happens after all devices have been
initialized, since the host-side support for some of the devices may
initialized, since the host-side support for some of the devices may
extend the list of recognised options. After this both the auxiliary
extend the list of recognised options. After this both the auxiliary
and the eCos application will exit immediately. This option implies
and the eCos application will exit immediately. This option implies
<TT
<TT
CLASS="OPTION"
CLASS="OPTION"
>-nw</TT
>-nw</TT
>.
>.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-k</TT
>-k</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--keep-going</TT
>--keep-going</TT
></DT
></DT
><DD
><DD
><P
><P
>If an error occurs in the I/O auxiliary while reading in any of the
>If an error occurs in the I/O auxiliary while reading in any of the
configuration files or initializing devices, by default both the
configuration files or initializing devices, by default both the
auxiliary and the eCos application will exit. The <TT
auxiliary and the eCos application will exit. The <TT
CLASS="OPTION"
CLASS="OPTION"
>-k</TT
>-k</TT
>
>
option can be used to make the auxiliary continue in spite of errors,
option can be used to make the auxiliary continue in spite of errors,
although obviously it may not be fully functional.
although obviously it may not be fully functional.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-nr</TT
>-nr</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--no-rc</TT
>--no-rc</TT
></DT
></DT
><DD
><DD
><P
><P
>Normally the auxiliary processes two <A
>Normally the auxiliary processes two <A
HREF="synth-running.html#SYNTH-RUNNING-USER-CONFIG"
HREF="synth-running.html#SYNTH-RUNNING-USER-CONFIG"
>user configuration files</A
>user configuration files</A
>
>
during startup: <TT
during startup: <TT
CLASS="FILENAME"
CLASS="FILENAME"
>initrc.tcl</TT
>initrc.tcl</TT
> and
> and
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>mainrc.tcl</TT
>mainrc.tcl</TT
>. This can be suppressed using the
>. This can be suppressed using the
<TT
<TT
CLASS="OPTION"
CLASS="OPTION"
>-nr</TT
>-nr</TT
> option.
> option.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-x</TT
>-x</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--exit</TT
>--exit</TT
></DT
></DT
><DD
><DD
><P
><P
>When providing a graphical user interface the I/O auxiliary will
>When providing a graphical user interface the I/O auxiliary will
normally continue running even after the eCos application has exited.
normally continue running even after the eCos application has exited.
This allows the user to take actions such as saving the current
This allows the user to take actions such as saving the current
contents of the main text window. If run with <TT
contents of the main text window. If run with <TT
CLASS="OPTION"
CLASS="OPTION"
>-x</TT
>-x</TT
> then
> then
the auxiliary will exit as soon the application exits.
the auxiliary will exit as soon the application exits.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-nx</TT
>-nx</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--no-exit</TT
>--no-exit</TT
></DT
></DT
><DD
><DD
><P
><P
>When the graphical user interface is disabled with
>When the graphical user interface is disabled with
<TT
<TT
CLASS="OPTION"
CLASS="OPTION"
>-nw</TT
>-nw</TT
> the I/O auxiliary will normally exit immediately
> the I/O auxiliary will normally exit immediately
when the eCos application exits. Without the graphical frontend there
when the eCos application exits. Without the graphical frontend there
is usually no way for the user to interact directly with the
is usually no way for the user to interact directly with the
auxiliary, so there is no point in continuing to run once the eCos
auxiliary, so there is no point in continuing to run once the eCos
application will no longer request any I/O operations. Specifying the
application will no longer request any I/O operations. Specifying the
<TT
<TT
CLASS="OPTION"
CLASS="OPTION"
>-nx</TT
>-nx</TT
> option causes the auxiliary to continue running
> option causes the auxiliary to continue running
even after the application has exited.
even after the application has exited.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-V</TT
>-V</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--verbose</TT
>--verbose</TT
></DT
></DT
><DD
><DD
><P
><P
>This option causes the I/O auxiliary to output some additional
>This option causes the I/O auxiliary to output some additional
information, especially during initialization.
information, especially during initialization.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-l &lt;file&gt;</TT
>-l &lt;file&gt;</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--logfile &lt;file&gt;</TT
>--logfile &lt;file&gt;</TT
></DT
></DT
><DD
><DD
><P
><P
>Much of the output of the eCos application and the I/O auxiliary is
>Much of the output of the eCos application and the I/O auxiliary is
simple text, for example resulting from eCos
simple text, for example resulting from eCos
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>printf</TT
>printf</TT
> or <TT
> or <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>diag_printf</TT
>diag_printf</TT
> calls.
> calls.
When running in graphical mode this output goes to a central text
When running in graphical mode this output goes to a central text
window, and can be saved to a file or edited via menus. The
window, and can be saved to a file or edited via menus. The
<TT
<TT
CLASS="OPTION"
CLASS="OPTION"
>-l</TT
>-l</TT
> can be used to automatically generate an
> can be used to automatically generate an
additional logfile containing all the text. If graphical
additional logfile containing all the text. If graphical
mode is disabled then by default all the text just goes to the current
mode is disabled then by default all the text just goes to the current
standard output. Specifying <TT
standard output. Specifying <TT
CLASS="OPTION"
CLASS="OPTION"
>-l</TT
>-l</TT
> causes most of the
> causes most of the
text to go into a logfile instead, although some messages such as
text to go into a logfile instead, although some messages such as
errors generated by the auxiliary itself will still go to stdout as
errors generated by the auxiliary itself will still go to stdout as
well.
well.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-t &lt;file&gt;</TT
>-t &lt;file&gt;</TT
>, <TT
>, <TT
CLASS="OPTION"
CLASS="OPTION"
>--target &lt;file&gt;</TT
>--target &lt;file&gt;</TT
></DT
></DT
><DD
><DD
><P
><P
>During initialization the I/O auxiliary reads in a target definition
>During initialization the I/O auxiliary reads in a target definition
file. This file holds information such as which Linux devices should
file. This file holds information such as which Linux devices should
be used to emulate the various eCos devices. The <TT
be used to emulate the various eCos devices. The <TT
CLASS="OPTION"
CLASS="OPTION"
>-t</TT
>-t</TT
>
>
option can be used to specify which target definition should be used
option can be used to specify which target definition should be used
for the current run, defaulting to <TT
for the current run, defaulting to <TT
CLASS="FILENAME"
CLASS="FILENAME"
>default.tdf</TT
>default.tdf</TT
>.
>.
It is not necessary to include the <TT
It is not necessary to include the <TT
CLASS="FILENAME"
CLASS="FILENAME"
>.tdf</TT
>.tdf</TT
> suffix,
> suffix,
this will be appended automatically if necessary.
this will be appended automatically if necessary.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-geometry &lt;geometry&gt;</TT
>-geometry &lt;geometry&gt;</TT
></DT
></DT
><DD
><DD
><P
><P
>This option can be used to control the size and position of the main
>This option can be used to control the size and position of the main
window, as per X conventions.
window, as per X conventions.
         </P
         </P
></DD
></DD
></DL
></DL
></DIV
></DIV
><P
><P
>The I/O auxiliary loads support for the various devices dynamically
>The I/O auxiliary loads support for the various devices dynamically
and some devices may accept additional command line arguments. Details
and some devices may accept additional command line arguments. Details
of these can be obtained using the <TT
of these can be obtained using the <TT
CLASS="OPTION"
CLASS="OPTION"
>-h</TT
>-h</TT
> option or by
> option or by
consulting the device-specific documentation. If an unrecognised
consulting the device-specific documentation. If an unrecognised
command line argument is used then a warning will be issued.
command line argument is used then a warning will be issued.
    </P
    </P
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="SYNTH-RUNNING-TDF"
NAME="SYNTH-RUNNING-TDF"
></A
></A
><H2
><H2
>The Target Definition File</H2
>The Target Definition File</H2
><P
><P
>The eCos application will want to access devices such as
>The eCos application will want to access devices such as
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>eth0</TT
>eth0</TT
> or <TT
> or <TT
CLASS="VARNAME"
CLASS="VARNAME"
>/dev/ser0</TT
>/dev/ser0</TT
>. These need to
>. These need to
be mapped on to Linux devices. For example some users may all traffic
be mapped on to Linux devices. For example some users may all traffic
on the eCos <TT
on the eCos <TT
CLASS="VARNAME"
CLASS="VARNAME"
>/dev/ser0</TT
>/dev/ser0</TT
> serial device to go via the
> serial device to go via the
Linux serial device <TT
Linux serial device <TT
CLASS="VARNAME"
CLASS="VARNAME"
>/dev/ttyS1</TT
>/dev/ttyS1</TT
>, while ethernet I/O
>, while ethernet I/O
for the eCos <TT
for the eCos <TT
CLASS="VARNAME"
CLASS="VARNAME"
>eth0</TT
>eth0</TT
> device should be mapped to the
> device should be mapped to the
Linux ethertap device <TT
Linux ethertap device <TT
CLASS="VARNAME"
CLASS="VARNAME"
>tap3</TT
>tap3</TT
>. Some devices may need
>. Some devices may need
additional configuration information, for example to limit the
additional configuration information, for example to limit the
number of packets that should be buffered within the I/O auxiliary.
number of packets that should be buffered within the I/O auxiliary.
The target definition file provides all this information.
The target definition file provides all this information.
    </P
    </P
><P
><P
>By default the I/O auxiliary will look for a file
>By default the I/O auxiliary will look for a file
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>default.tdf</TT
>default.tdf</TT
>. An alternative target definition can
>. An alternative target definition can
be specified on the command line using <TT
be specified on the command line using <TT
CLASS="OPTION"
CLASS="OPTION"
>-t</TT
>-t</TT
>, for
>, for
example:
example:
    </P
    </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>$ bridge_app --io -t twineth</PRE
>$ bridge_app --io -t twineth</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>A <TT
>A <TT
CLASS="FILENAME"
CLASS="FILENAME"
>.tdf</TT
>.tdf</TT
> suffix will be appended automatically if
> suffix will be appended automatically if
necessary. If a relative pathname is used then the I/O auxiliary will
necessary. If a relative pathname is used then the I/O auxiliary will
search for the target definition file in the current directory, then
search for the target definition file in the current directory, then
in <TT
in <TT
CLASS="FILENAME"
CLASS="FILENAME"
>~/.ecos/synth/</TT
>~/.ecos/synth/</TT
>, and finally
>, and finally
in its install location.
in its install location.
    </P
    </P
><P
><P
>A typical target definition file might look like this:
>A typical target definition file might look like this:
    </P
    </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>synth_device console {
>synth_device console {
    # appearance -foreground white -background black
    # appearance -foreground white -background black
    filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
    filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
}
}
 
 
synth_device ethernet {
synth_device ethernet {
    eth0 real eth1
    eth0 real eth1
    eth1 ethertap tap4 00:01:02:03:FE:06
    eth1 ethertap tap4 00:01:02:03:FE:06
 
 
    ## Maximum number of packets that should be buffered per interface.
    ## Maximum number of packets that should be buffered per interface.
    ## Default 16
    ## Default 16
    #max_buffer 32
    #max_buffer 32
 
 
    ## Filters for the various recognised protocols.
    ## Filters for the various recognised protocols.
    ## By default all filters are visible and use standard colours.
    ## By default all filters are visible and use standard colours.
    filter ether  -hide 0
    filter ether  -hide 0
    #filter arp    -hide 1
    #filter arp    -hide 1
    #filter ipv4   -hide 1
    #filter ipv4   -hide 1
    #filter ipv6   -hide 1
    #filter ipv6   -hide 1
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>A target definition file is actually a Tcl script that gets run in the
>A target definition file is actually a Tcl script that gets run in the
main interpreter of the I/O auxiliary during initialization. This
main interpreter of the I/O auxiliary during initialization. This
provides a lot of flexibility if necessary. For example the script
provides a lot of flexibility if necessary. For example the script
could open a socket to a resource management server of some sort to
could open a socket to a resource management server of some sort to
determine which hardware facilities are already in use and adapt
determine which hardware facilities are already in use and adapt
accordingly. Another possibility is to adapt based on <A
accordingly. Another possibility is to adapt based on <A
HREF="synth-new-host.html#SYNTH-NEW-HOST-ARGS"
HREF="synth-new-host.html#SYNTH-NEW-HOST-ARGS"
>command line arguments</A
>command line arguments</A
>. Users who
>. Users who
are not familiar with Tcl programming should still be able to edit a
are not familiar with Tcl programming should still be able to edit a
simple target definition file without too much difficulty, using a
simple target definition file without too much difficulty, using a
mixture of cut'n'paste, commenting or uncommenting various lines, and
mixture of cut'n'paste, commenting or uncommenting various lines, and
making small edits such as changing <TT
making small edits such as changing <TT
CLASS="LITERAL"
CLASS="LITERAL"
>tap4</TT
>tap4</TT
> to
> to
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>eth2</TT
>eth2</TT
>.
>.
    </P
    </P
><P
><P
>Each type of device will have its own entry in the target definition
>Each type of device will have its own entry in the target definition
file, taking the form:
file, taking the form:
    </P
    </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>synth_device &lt;device type&gt; {
>synth_device &lt;device type&gt; {
    &lt;options&gt;
    &lt;options&gt;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The documentaton for each synthetic target device should provide
>The documentaton for each synthetic target device should provide
details of the options available for that device, and often a suitable
details of the options available for that device, and often a suitable
fragment that can be pasted into a target definition file and edited.
fragment that can be pasted into a target definition file and edited.
There is no specific set of options that a given device will always
There is no specific set of options that a given device will always
provide. However in practice many devices will use common code
provide. However in practice many devices will use common code
exported by the main I/O auxiliary, or their implementation will
exported by the main I/O auxiliary, or their implementation will
involve some re-use of code for an existing device. Hence certain
involve some re-use of code for an existing device. Hence certain
types of option are common to many devices.
types of option are common to many devices.
    </P
    </P
><P
><P
>A good example of this is filters, which control the appearance of
>A good example of this is filters, which control the appearance of
text output. The above target definition file defines a filter
text output. The above target definition file defines a filter
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>trace</TT
>trace</TT
> for output from the eCos application. The
> for output from the eCos application. The
regular expression will match output from the infrastructure package's
regular expression will match output from the infrastructure package's
tracing facilities when <TT
tracing facilities when <TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGDBG_USE_TRACING</TT
>CYGDBG_USE_TRACING</TT
> and
> and
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE</TT
>CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE</TT
> are enabled.
> are enabled.
With the current settings this output will not be visible by default,
With the current settings this output will not be visible by default,
but can be made visible using the menu item <SPAN
but can be made visible using the menu item <SPAN
CLASS="GUIMENUITEM"
CLASS="GUIMENUITEM"
>System
>System
Filters</SPAN
Filters</SPAN
>. If made visible the trace output will appear in
>. If made visible the trace output will appear in
an unusual colour, so users can easily distinguish the trace output
an unusual colour, so users can easily distinguish the trace output
from other text. All filters accept the following options:
from other text. All filters accept the following options:
    </P
    </P
><P
><P
></P
></P
><DIV
><DIV
CLASS="VARIABLELIST"
CLASS="VARIABLELIST"
><DL
><DL
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-hide [0|1]</TT
>-hide [0|1]</TT
></DT
></DT
><DD
><DD
><P
><P
>This controls whether or not text matching this filter should be
>This controls whether or not text matching this filter should be
invisible by default or not. At run-time the visibility of each filter
invisible by default or not. At run-time the visibility of each filter
can be controlled using the <SPAN
can be controlled using the <SPAN
CLASS="GUIMENUITEM"
CLASS="GUIMENUITEM"
>System Filters</SPAN
>System Filters</SPAN
>
>
menu item.
menu item.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-foreground &lt;colour&gt;</TT
>-foreground &lt;colour&gt;</TT
></DT
></DT
><DD
><DD
><P
><P
>This specifies the foreground colour for all text matching this
>This specifies the foreground colour for all text matching this
filter. The colour can be specified using an RGB value such as
filter. The colour can be specified using an RGB value such as
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>#F08010</TT
>#F08010</TT
>, or a symbolic name such as
>, or a symbolic name such as
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>"light steel blue"</TT
>"light steel blue"</TT
>. The X11 utility
>. The X11 utility
<SPAN
<SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>showrgb</SPAN
>showrgb</SPAN
> can be used to find out
> can be used to find out
about the available colours.
about the available colours.
         </P
         </P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="OPTION"
CLASS="OPTION"
>-background &lt;colour&gt;</TT
>-background &lt;colour&gt;</TT
></DT
></DT
><DD
><DD
><P
><P
>This specifies the background colour for all text matching the filter.
>This specifies the background colour for all text matching the filter.
As with <TT
As with <TT
CLASS="OPTION"
CLASS="OPTION"
>-foreground</TT
>-foreground</TT
> the colour can be specified using
> the colour can be specified using
a symbolic name or an RGB value.
a symbolic name or an RGB value.
         </P
         </P
></DD
></DD
></DL
></DL
></DIV
></DIV
><P
><P
>Some devices may create their own subwindows, for example to monitor
>Some devices may create their own subwindows, for example to monitor
ethernet traffic or to provide additional I/O facilities such as
ethernet traffic or to provide additional I/O facilities such as
emulated LED's or buttons. Usually the target definition file can be
emulated LED's or buttons. Usually the target definition file can be
used to control the <A
used to control the <A
HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
>layout</A
>layout</A
> of
> of
these windows.
these windows.
    </P
    </P
><P
><P
>The I/O auxiliary will not normally warn about
>The I/O auxiliary will not normally warn about
<B
<B
CLASS="COMMAND"
CLASS="COMMAND"
>synth_device</B
>synth_device</B
> entries in the target definition file
> entries in the target definition file
for devices that are not actually needed by the current eCos
for devices that are not actually needed by the current eCos
application. This makes it easier to use a single file for several
application. This makes it easier to use a single file for several
different applications. However it can lead to confusion if an entry
different applications. However it can lead to confusion if an entry
is spelled incorrectly and hence does not actually get used. The
is spelled incorrectly and hence does not actually get used. The
<TT
<TT
CLASS="OPTION"
CLASS="OPTION"
>-V</TT
>-V</TT
> command line option can be used to get warnings
> command line option can be used to get warnings
about unused device entries in the target definition file.
about unused device entries in the target definition file.
    </P
    </P
><P
><P
>If the body of a <B
>If the body of a <B
CLASS="COMMAND"
CLASS="COMMAND"
>synth_device</B
>synth_device</B
> command contains an
> command contains an
unrecognised option and the relevant device is in use, the I/O
unrecognised option and the relevant device is in use, the I/O
auxiliary will always issue a warning about such options.
auxiliary will always issue a warning about such options.
    </P
    </P
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="SYNTH-RUNNING-USER-CONFIG"
NAME="SYNTH-RUNNING-USER-CONFIG"
></A
></A
><H2
><H2
>User Configuration Files</H2
>User Configuration Files</H2
><P
><P
>During initialization the I/O auxiliary will execute two user
>During initialization the I/O auxiliary will execute two user
configuration files, <TT
configuration files, <TT
CLASS="FILENAME"
CLASS="FILENAME"
>initrc.tcl</TT
>initrc.tcl</TT
> and
> and
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>mainrc.tcl</TT
>mainrc.tcl</TT
>. It will look for these files in the
>. It will look for these files in the
directory <TT
directory <TT
CLASS="FILENAME"
CLASS="FILENAME"
>~/.ecos/synth/</TT
>~/.ecos/synth/</TT
>. If
>. If
that directory does not yet exist it will be created and populated
that directory does not yet exist it will be created and populated
with initial dummy files.
with initial dummy files.
    </P
    </P
><P
><P
>Both of these configuration files are Tcl scripts and will be run in
>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
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
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
various Tk widgets, and they can perform file or socket I/O if
desired. The section <A
desired. The section <A
HREF="synth-new-host.html"
HREF="synth-new-host.html"
>Writing New Devices - host</A
>Writing New Devices - host</A
> contains
> contains
information about the facilities available on the host-side for
information about the facilities available on the host-side for
writing new device drivers, and these can also be used in the
writing new device drivers, and these can also be used in the
initialization scripts.
initialization scripts.
    </P
    </P
><P
><P
>The <TT
>The <TT
CLASS="FILENAME"
CLASS="FILENAME"
>initrc.tcl</TT
>initrc.tcl</TT
> script is run before the auxiliary
> script is run before the auxiliary
has processed any requests from the eCos application, and hence before
has processed any requests from the eCos application, and hence before
any devices have been instantiated. At this point the generic
any devices have been instantiated. At this point the generic
command-line arguments has been processed, the target definition file
command-line arguments has been processed, the target definition file
has been read in, and the hooks functionality has been initialized. If
has been read in, and the hooks functionality has been initialized. If
running in graphical mode the main window will have been created, but
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
has been withdrawn from the screen to allow new widgets to be added
without annoying screen flicker. A typical
without annoying screen flicker. A typical
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>initrc.tcl</TT
>initrc.tcl</TT
> script could add some menu or toolbar
> script could add some menu or toolbar
options, or install a hook function that will be run when the
options, or install a hook function that will be run when the
eCos application exits.
eCos application exits.
    </P
    </P
><P
><P
>The <TT
>The <TT
CLASS="FILENAME"
CLASS="FILENAME"
>mainrc.tcl</TT
>mainrc.tcl</TT
> script is run after eCos has
> script is run after eCos has
performed all its device initialization and after C++ static
performed all its device initialization and after C++ static
constructors have run, and just before the call to
constructors have run, and just before the call to
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cyg_start</TT
>cyg_start</TT
> which will end up transferring control
> which will end up transferring control
to the application itself. A typical <TT
to the application itself. A typical <TT
CLASS="FILENAME"
CLASS="FILENAME"
>mainrc.tcl</TT
>mainrc.tcl</TT
>
>
script could look at what interrupt vectors have been allocated to
script could look at what interrupt vectors have been allocated to
which devices and create a little monitor window that shows interrupt
which devices and create a little monitor window that shows interrupt
activity.
activity.
    </P
    </P
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="SYNTH-RUNNING-SESSION"
NAME="SYNTH-RUNNING-SESSION"
></A
></A
><H2
><H2
>Session Information</H2
>Session Information</H2
><P
><P
>When running in graphical mode, the I/O auxiliary will read in a file
>When running in graphical mode, the I/O auxiliary will read in a file
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>~/.ecos/synth/guisession</TT
>~/.ecos/synth/guisession</TT
> containing session
> containing session
information. This file should not normally be edited manually, instead
information. This file should not normally be edited manually, instead
it gets updated automatically when the auxiliary exits. The purpose of
it gets updated automatically when the auxiliary exits. The purpose of
this file is to hold configuration options that are manipulated via
this file is to hold configuration options that are manipulated via
the graphical interface, for example which browser should be used to
the graphical interface, for example which browser should be used to
display online help.
display online help.
    </P
    </P
><DIV
><DIV
CLASS="WARNING"
CLASS="WARNING"
><P
><P
></P
></P
><TABLE
><TABLE
CLASS="WARNING"
CLASS="WARNING"
BORDER="1"
BORDER="1"
WIDTH="100%"
WIDTH="100%"
><TR
><TR
><TD
><TD
ALIGN="CENTER"
ALIGN="CENTER"
><B
><B
>Warning</B
>Warning</B
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
ALIGN="LEFT"
ALIGN="LEFT"
><P
><P
>GUI session functionality is not yet available in the current release.
>GUI session functionality is not yet available in the current release.
When that functionality is fully implemented it is possible that some
When that functionality is fully implemented it is possible that some
target definition file options may be removed, to be replaced by
target definition file options may be removed, to be replaced by
graphical editing via a suitable preferences dialog, with the
graphical editing via a suitable preferences dialog, with the
current settings saved in the session file.
current settings saved in the session file.
    </P
    </P
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
SUMMARY="Footer navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="synth-install.html"
HREF="synth-install.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="ecos-ref.html"
HREF="ecos-ref.html"
ACCESSKEY="H"
ACCESSKEY="H"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="synth-gui.html"
HREF="synth-gui.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
>Installation</TD
>Installation</TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="hal-synth-arch.html"
HREF="hal-synth-arch.html"
ACCESSKEY="U"
ACCESSKEY="U"
>Up</A
>Up</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
>The I/O Auxiliary's User Interface</TD
>The I/O Auxiliary's User Interface</TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.