📄 synth.sgml
字号:
possibly surrounded by various sub-windows for various devices. Forexample there could be a row of emulated LED's above the text window,and monitors of ethernet traffic and interrupt activity on the right.At the bottom of the window is a status line, including a smallanimation that shows whether or not the eCos application is stillrunning. </para> </refsect1> <refsect1 id="synth-gui-menus"><title>Menus and the Toolbar</title> <para>Usually there will be four menus on the menu bar:<guimenu>File</guimenu>, <guimenu>Edit</guimenu>,<guimenu>View</guimenu> and <guimenu>Help</guimenu>. </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="menu_file.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <para>On the <guimenu>File</guimenu> menu there are three entries related tosaving the current contents of the central text window.<guimenuitem>Save</guimenuitem> is used to save the currently visiblecontents of the text window. Any text that is hidden because offilters will not be written to the savefile. If there has been aprevious <guimenuitem>Save</guimenuitem> or <guimenuitem>SaveAs</guimenuitem> operation then the existing savefile will be re-used,otherwise the user will be asked to select a suitable file.<guimenuitem>Save As</guimenuitem> also saves just the currentlyvisible contents but will always prompt the user for a filename.<guimenuitem>Save All</guimenuitem> can be used to save the fullcontents of the text window, including any text that is currentlyhidden. It will always prompt for a new filename, to avoid confusionwith partial savefiles. </para> <para>Usually the eCos application will be run from inside gdb or from ashell prompt. Killing off the application while it is being debuggedin a gdb session is not a good idea, it would be better to use gdb'sown <command>kill</command> command. Alternatively the eCosapplication itself can use the <function>CYG_TEST_EXIT</function> or<filename>cyg_hal_sys_exit</filename> functionality. However it ispossible to terminate the application from the I/O auxiliary using<guimenuitem>Kill eCos</guimenuitem>. A clean shutdown will beattempted, but that can fail if the application is currently haltedinside gdb or if it has crashed completely. As a last resort<constant>SIGKILL</constant> will be used. </para> <para>When operating in graphical mode the I/O auxiliary will normallycontinue to run even after the eCos application has exited. Thisallows the user to examine the last few lines of output, and perhapsperform actions such as saving the output to a file. The<guimenuitem>Exit</guimenuitem> menu item can be used to shut down theauxiliary. Note that this behaviour can be changed with command linearguments <linklinkend="synth-running-arguments"><option>--exit</option></link> and<linklinkend="synth-running-arguments"><option>--no-exit</option></link>. </para> <para>If <guimenuitem>Exit</guimenuitem> is used while the eCos applicationis still running then the I/O auxiliary will first attempt toterminate the application cleanly, and then exit. </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="menu_edit.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <para>The <guimenu>Edit</guimenu> menu contains the usual entries fortext manipulation: <guimenuitem>Cut</guimenuitem>,<guimenuitem>Copy</guimenuitem>, <guimenuitem>Paste</guimenuitem>,<guimenuitem>Clear</guimenuitem> and <guimenuitem>SelectAll</guimenuitem>. These all operate on the central text window. Bydefault this window cannot be edited so the cut, paste and clearoperations are disabled. If the user wants to edit the contents of thetext window then the <guimenuitem>Read Only</guimenuitem> checkbuttonshould be toggled. </para> <para>The <guimenuitem>Preferences</guimenuitem> menu item brings up amiscellaneous preferences dialog. One of the preferences relates toonline help: the I/O auxiliary does not currently have a built-in htmlviewer; instead it will execute an external browser of some sort. Withthe example settings shown, the I/O auxiliary will first attempt tointeract with an existing mozilla session. If that fails it will tryto run a new mozilla instance, or as a last result use the Gnome helpviewer. </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="preferences.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <para>The <guimenu>View</guimenu> menu contains the <guimenuitem>SystemFilters</guimenuitem> entry, used to edit the settings for the current<link linkend="synth-gui-text">filters</link>. </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="menu_view.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <para>The <guimenu>Help</guimenu> menu can be used to activate online helpfor eCos generally, for the synthetic target as a whole, and forspecific devices supported by the generic target. The Preferencesdialog can be used to select the browser that will be used. </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="menu_help.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <note><para>At the time of writing there is no well-defined toplevel index filefor all eCos documentation. Hence the relevant menu item is disabled.Documentation for the synthetic target and the supported devicesis stored as part of the package itself so can usually be found fairlyeasily. It may be necessary to set the <envar>ECOS_REPOSITORY</envar>environment variable. </para></note> </refsect1> <refsect1 id="synth-gui-text"><title>The Main Text Window</title> <para>The central text window holds the console output from the eCosapplication: the screen shot above shows DHCP initialization data fromthe TCP/IP stack, and some output from the <function>main</function>thread at the bottom. Some devices can insert text of their own, forexample the ethernet device support can be configured to show detailsof incoming and outgoing packets. Mixing the output from the eCosapplication and the various devices can make it easier to understandthe order in which events occur. </para> <para>The appearance of text from different sources can be controlled bymeans of filters, and it is also possible to hide some of the text.For example, if tracing is enabled in the eCos configuration then thetrace output can be given its own colour scheme, making it stand outfrom the rest of the output. In addition the trace output is generallyvoluminous so it can be hidden by default, made visible only to findout more about what was happening when a particular problem occurred.Similarly the ethernet device support can output details of thevarious packets being transferred, and using a different backgroundcolour for this output again makes it easier to distinguish fromconsole output. </para> <para>The default appearance for most filters is controlled via the<link linkend="synth-running-tdf">target definition file</link>. Anexample entry might be: </para> <programlisting> filter trace {^TRACE:.*} -foreground HotPink1 -hide 1</programlisting> <para>The various colours and the hide flag for each filter can be changedat run-time, using the <guimenuitem>System Filters</guimenuitem> itemon the <guimenu>View</guimenu> menu. This will bring up a dialog likethe following: </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="filters.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <para>It should be noted that the text window is line-oriented, notcharacter-oriented. If an eCos application sends a partial line oftext then that will remain buffered until a newline character isreceived, rather than being displayed immediately. This avoidsconfusion when there is concurrent output from several sources. </para> <para>By default the text window is read-only. This means it will not allowcut, paste and clear operations, and keyboard input will be ignored.The <guimenu>Edit</guimenu> menu has a checkbutton <guimenuitem>ReadOnly</guimenuitem> which can be toggled to allow write operations. Forexample, a user could type in a reminder of what was happening at thistime, or paste in part of a gdb session. Such keyboard input does notget forwarded to the eCos application: if the latter requires keyboardinput then that should happen via a separate keyboard device. </para> </refsect1> <refsect1 id="synth-gui-layout"><title>Positioning Optional Windows</title> <para>Some devices may create their own subwindows, for example to monitorethernet traffic or to provide additional I/O facilities such asemulated LED's or buttons. Usually the target definition file can beused to control the <link linkend="synth-gui-layout">layout</link> ofthese windows. This requires an understanding of the overall layout ofthe display. </para> <informalfigure PgWide=1> <mediaobject> <imageobject> <imagedata fileref="layout.png" Scalefit=1 Align="Center"> </imageobject> </mediaobject> </informalfigure> <para>Subwindows are generally packed in one of eight frames surrounding thecentral text window: <varname>.main.nw</varname>,<varname>.main.n</varname>, <varname>.main.ne</varname>,<varname>.main.w</varname>, <varname>.main.e</varname>,<varname>.main.sw</varname>, <varname>.main.s</varname>, and<varname>.main.se</varname>. To position a row of LED's above the textwindow and towards the left, a target definition file could contain anentry such as: </para> <programlisting>synth_device led { pack -in .main.n -side left …}</programlisting> <para>Similarly, to put a traffic monitor window on the right of the textwindow would involve something like: </para> <programlisting> … monitor_pack -in .main.e -side bottom …</programlisting> <para>Often it will be sufficient to specify a container frame and one of<constant>left</constant>, <constant>right</constant>,<constant>top</constant> or <constant>bottom</constant>. Full controlover the positioning requires an understanding of Tcl/Tk and inparticular the packing algorithm, and an appropriate reference workshould be consulted. </para> </refsect1> <refsect1 id="synth-gui-global-config"><title>Global Settings</title> <note><para>This section still to be written - it should document the interactionbetween X resources and ecosynth, and how users can control settingssuch as the main foreground and background colours. </para></note> </refsect1></refentry><!-- }}} --><!-- {{{ The console device --><refentry id="synth-console"> <refmeta> <refentrytitle>The Console Device</refentrytitle> </refmeta> <refnamediv> <refname>The console device </refname> <refpurpose>Show output from the eCos application</refpurpose> </refnamediv> <refsect1 id="synth-console-description"><title>Description</title> <para>The eCos application can generate text output in a variety of ways,including calling <function>printf</function> or<function>diag_printf</function>. When the I/O auxiliary is enabledthe eCos startup code will instantiate a console device to process allsuch output. If operating in text mode the output will simply go tostandard output, or to a logfile if the <option>-l</option> commandline option is specified. If operating in graphical mode the outputwill go to the central text window, and optionally to a logfile aswell. In addition it is possible to control the appearance of the maintext via the target definition file, and to install extra filters forcertain types of text.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -