1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >The I/O Auxiliary's User Interface</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="eCos Synthetic Target"
23 HREF="hal-synth-arch.html"><LINK
25 TITLE="Running a Synthetic Target Application"
26 HREF="synth-running.html"><LINK
28 TITLE="The Console Device"
29 HREF="synth-console.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="synth-running.html"
71 HREF="synth-console.html"
82 NAME="SYNTH-GUI">The I/O Auxiliary's User Interface</H1
90 >User Interface -- Controlling the I/O Auxiliary</DIV
94 NAME="SYNTH-GUI-DESCRIPTION"
99 >The synthetic target auxiliary is designed to support both extensions
100 and user customization. Support for the desired devices is dynamically
101 loaded, and each device can extend the user interface. For example it
102 is possible for a device to add menu options, place new buttons on the
103 toolbar, create its own sub-window within the overall layout, or even
104 create entire new toplevel windows. These subwindows or toplevels
105 could show graphs of activity such as interrupts or packets being
106 transferred. They could also allow users to interact with the eCos
107 application, for example by showing a number of buttons which will be
108 mapped on to digital inputs in the eCos application. Different
109 applications will have their own I/O requirements, changing the
110 host-side support files that get loaded and that may modify the user
111 interface. The I/O auxiliary also reads in user configuration scripts
112 which can enhance the interface in the same way. Therefore the exact
113 user interface will depend on the user and on the eCos application
114 being run. However the overall layout is likely to remain the same.
117 CLASS="INFORMALFIGURE"
125 SRC="screen_main.png"
132 >The title bar identifies the window as belonging to an eCos synthetic
133 target application and lists both the application name and its process
134 id. The latter is especially useful if the application was started
135 directly from a shell prompt and the user now wants to attach a gdb
136 session. The window has a conventional menu bar with the usual
137 entries, plus a toolbar with buttons for common operations such as cut
138 and paste. Balloon help is supported.
141 >There is a central <A
142 HREF="synth-gui.html#SYNTH-GUI-TEXT"
145 possibly surrounded by various sub-windows for various devices. For
146 example there could be a row of emulated LED's above the text window,
147 and monitors of ethernet traffic and interrupt activity on the right.
148 At the bottom of the window is a status line, including a small
149 animation that shows whether or not the eCos application is still
156 NAME="SYNTH-GUI-MENUS"
159 >Menus and the Toolbar</H2
161 >Usually there will be four menus on the menu bar:
178 CLASS="INFORMALFIGURE"
196 > menu there are three entries related to
197 saving the current contents of the central text window.
201 > is used to save the currently visible
202 contents of the text window. Any text that is hidden because of
203 filters will not be written to the savefile. If there has been a
211 > operation then the existing savefile will be re-used,
212 otherwise the user will be asked to select a suitable file.
216 > also saves just the currently
217 visible contents but will always prompt the user for a filename.
221 > can be used to save the full
222 contents of the text window, including any text that is currently
223 hidden. It will always prompt for a new filename, to avoid confusion
224 with partial savefiles.
227 >Usually the eCos application will be run from inside gdb or from a
228 shell prompt. Killing off the application while it is being debugged
229 in a gdb session is not a good idea, it would be better to use gdb's
233 > command. Alternatively the eCos
234 application itself can use the <TT
240 >cyg_hal_sys_exit</TT
241 > functionality. However it is
242 possible to terminate the application from the I/O auxiliary using
246 >. A clean shutdown will be
247 attempted, but that can fail if the application is currently halted
248 inside gdb or if it has crashed completely. As a last resort
255 >When operating in graphical mode the I/O auxiliary will normally
256 continue to run even after the eCos application has exited. This
257 allows the user to examine the last few lines of output, and perhaps
258 perform actions such as saving the output to a file. The
262 > menu item can be used to shut down the
263 auxiliary. Note that this behaviour can be changed with command line
265 HREF="synth-running.html#SYNTH-RUNNING-ARGUMENTS"
272 HREF="synth-running.html#SYNTH-RUNNING-ARGUMENTS"
283 > is used while the eCos application
284 is still running then the I/O auxiliary will first attempt to
285 terminate the application cleanly, and then exit.
288 CLASS="INFORMALFIGURE"
306 > menu contains the usual entries for
307 text manipulation: <SPAN
325 >. These all operate on the central text window. By
326 default this window cannot be edited so the cut, paste and clear
327 operations are disabled. If the user wants to edit the contents of the
328 text window then the <SPAN
338 > menu item brings up a
339 miscellaneous preferences dialog. One of the preferences relates to
340 online help: the I/O auxiliary does not currently have a built-in html
341 viewer; instead it will execute an external browser of some sort. With
342 the example settings shown, the I/O auxiliary will first attempt to
343 interact with an existing mozilla session. If that fails it will try
344 to run a new mozilla instance, or as a last result use the Gnome help
348 CLASS="INFORMALFIGURE"
356 SRC="preferences.png"
366 > menu contains the <SPAN
370 > entry, used to edit the settings for the current
372 HREF="synth-gui.html#SYNTH-GUI-TEXT"
377 CLASS="INFORMALFIGURE"
395 > menu can be used to activate online help
396 for eCos generally, for the synthetic target as a whole, and for
397 specific devices supported by the generic target. The Preferences
398 dialog can be used to select the browser that will be used.
401 CLASS="INFORMALFIGURE"
422 >At the time of writing there is no well-defined toplevel index file
423 for all eCos documentation. Hence the relevant menu item is disabled.
424 Documentation for the synthetic target and the supported devices
425 is stored as part of the package itself so can usually be found fairly
426 easily. It may be necessary to set the <TT
430 environment variable.
438 NAME="SYNTH-GUI-TEXT"
441 >The Main Text Window</H2
443 >The central text window holds the console output from the eCos
444 application: the screen shot above shows DHCP initialization data from
445 the TCP/IP stack, and some output from the <TT
449 thread at the bottom. Some devices can insert text of their own, for
450 example the ethernet device support can be configured to show details
451 of incoming and outgoing packets. Mixing the output from the eCos
452 application and the various devices can make it easier to understand
453 the order in which events occur.
456 >The appearance of text from different sources can be controlled by
457 means of filters, and it is also possible to hide some of the text.
458 For example, if tracing is enabled in the eCos configuration then the
459 trace output can be given its own colour scheme, making it stand out
460 from the rest of the output. In addition the trace output is generally
461 voluminous so it can be hidden by default, made visible only to find
462 out more about what was happening when a particular problem occurred.
463 Similarly the ethernet device support can output details of the
464 various packets being transferred, and using a different background
465 colour for this output again makes it easier to distinguish from
469 >The default appearance for most filters is controlled via the
471 HREF="synth-running.html#SYNTH-RUNNING-TDF"
472 >target definition file</A
474 example entry might be:
483 CLASS="PROGRAMLISTING"
484 > filter trace {^TRACE:.*} -foreground HotPink1 -hide 1</PRE
489 >The various colours and the hide flag for each filter can be changed
490 at run-time, using the <SPAN
492 >System Filters</SPAN
497 > menu. This will bring up a dialog like
501 CLASS="INFORMALFIGURE"
516 >It should be noted that the text window is line-oriented, not
517 character-oriented. If an eCos application sends a partial line of
518 text then that will remain buffered until a newline character is
519 received, rather than being displayed immediately. This avoids
520 confusion when there is concurrent output from several sources.
523 >By default the text window is read-only. This means it will not allow
524 cut, paste and clear operations, and keyboard input will be ignored.
528 > menu has a checkbutton <SPAN
532 > which can be toggled to allow write operations. For
533 example, a user could type in a reminder of what was happening at this
534 time, or paste in part of a gdb session. Such keyboard input does not
535 get forwarded to the eCos application: if the latter requires keyboard
536 input then that should happen via a separate keyboard device.
542 NAME="SYNTH-GUI-LAYOUT"
545 >Positioning Optional Windows</H2
547 >Some devices may create their own subwindows, for example to monitor
548 ethernet traffic or to provide additional I/O facilities such as
549 emulated LED's or buttons. Usually the target definition file can be
550 used to control the <A
551 HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
554 these windows. This requires an understanding of the overall layout of
558 CLASS="INFORMALFIGURE"
573 >Subwindows are generally packed in one of eight frames surrounding the
574 central text window: <TT
602 >. To position a row of LED's above the text
603 window and towards the left, a target definition file could contain an
613 CLASS="PROGRAMLISTING"
615 pack -in .main.n -side left
622 >Similarly, to put a traffic monitor window on the right of the text
623 window would involve something like:
632 CLASS="PROGRAMLISTING"
634 monitor_pack -in .main.e -side bottom
640 >Often it will be sufficient to specify a container frame and one of
655 over the positioning requires an understanding of Tcl/Tk and in
656 particular the packing algorithm, and an appropriate reference work
663 NAME="SYNTH-GUI-GLOBAL-CONFIG"
674 >This section still to be written - it should document the interaction
675 between X resources and ecosynth, and how users can control settings
676 such as the main foreground and background colours.
686 SUMMARY="Footer navigation table"
697 HREF="synth-running.html"
715 HREF="synth-console.html"
725 >Running a Synthetic Target Application</TD
731 HREF="hal-synth-arch.html"
739 >The Console Device</TD