⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 synth-console.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 Red Hat, Inc.                                --><!-- This material may be distributed only subject to the terms      --><!-- and conditions set forth in the Open Publication License, v1.0  --><!-- or later (the latest version is presently available at          --><!-- http://www.opencontent.org/openpub/).                           --><!-- Distribution of the work or derivative of the work in any       --><!-- standard (paper) book form is prohibited unless prior           --><!-- permission is obtained from the copyright holder.               --><HTML><HEAD><TITLE>The Console Device</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="eCos Synthetic Target"HREF="hal-synth-arch.html"><LINKREL="PREVIOUS"TITLE="The I/O Auxiliary's User Interface"HREF="synth-gui.html"><LINKREL="NEXT"TITLE="System Calls"HREF="synth-syscalls.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="synth-gui.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="synth-syscalls.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="SYNTH-CONSOLE">The Console Device</H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN18091"></A><H2>Name</H2>The console device &nbsp;--&nbsp;Show output from the eCos application</DIV><DIVCLASS="REFSECT1"><ANAME="SYNTH-CONSOLE-DESCRIPTION"></A><H2>Description</H2><P>The eCos application can generate text output in a variety of ways,including calling <TTCLASS="FUNCTION">printf</TT> or<TTCLASS="FUNCTION">diag_printf</TT>. 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 <TTCLASS="OPTION">-l</TT> 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.    </P><P>It should be noted that the console device is line-oriented, notcharacter-oriented. This means that outputting partial lines is notsupported, and some functions such as <TTCLASS="FUNCTION">fflush</TT> and<TTCLASS="FUNCTION">setvbuf</TT> will not operate as expected. Thislimitation prevents much possible confusion when using filters tocontrol the appearance of the text window, and has some performancebenefits - especially when the eCos application generates a great dealof output such as when tracing is enabled. For most applications thisis not a problem, but it is something that developers should be awareof.     </P><P>The console device is output-only, it does not provide any support forkeyboard input. If the application requires keyboard input then thatshould be handled by a separate eCos device package and matchinghost-side code.    </P></DIV><DIVCLASS="REFSECT1"><ANAME="SYNTH-CONSOLE-INSTALL"></A><H2>Installation</H2><P>The eCos side of the console device is implemented by thearchitectural HAL itself, in the source file<TTCLASS="FILENAME">synth_diag.c</TT>, rather than in a separate devicepackage. Similarly the host-side implementation,<TTCLASS="FUNCTION">console.tcl</TT>, is part of the architectural HAL'shost-side support. It gets installed automatically alongside the I/Oauxiliary itself, so no separate installation procedure is required.    </P></DIV><DIVCLASS="REFSECT1"><ANAME="SYNTH-CONSOLE-TDF"></A><H2>Target Definition File</H2><P>The <AHREF="synth-running.html#SYNTH-RUNNING-TDF">target definition file</A>can contain a number of entries related to the console device. Theseare all optional, they only control the appearance of text output. Ifsuch control is desired then the relevant options should appear in thebody of a <BCLASS="COMMAND">synth_device</B> entry:    </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">synth_device console {    &#8230;}</PRE></TD></TR></TABLE><P>The first option is <BCLASS="COMMAND">appearance</B>, used to control theappearance of any text generated by the eCos application that does notmatch one of the installed filters. This option takes the sameargument as any other filter, for example:    </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">synth_device console {    appearance -foreground white -background black    &#8230;}</PRE></TD></TR></TABLE><P>Any number of additional filters can be created with a<BCLASS="COMMAND">filter</B> option, for example:    </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">synth_device console {    &#8230;    filter trace {^TRACE:.*} -foreground HotPink1 -hide 1    &#8230;}</PRE></TD></TR></TABLE><P>The first argument gives the new filter a name which will be used inthe <AHREF="synth-gui.html#SYNTH-GUI-TEXT">filters dialog</A>. Filter namesshould be unique. The second argument is a Tcl regular expression. Theconsole support will match each line of eCos output against thisregular expression, and if a match is found then the filter will beused for this line of text. The above example matches any line ofoutput that begins with <TTCLASS="LITERAL">TRACE:</TT>, which correspondsto the eCos infrastructure's tracing facilities. The remaining optionscontrol the desired appearance for matched text. If some eCos outputmatches the regular expressions for several different filters thenonly the first match will be used.    </P></DIV><DIVCLASS="REFSECT1"><ANAME="SYNTH-CONSOLE-TARGET-CONFIG"></A><H2>Target-side  Configuration Options</H2><P>There are no target-side configuration options related to the consoledevice.     </P></DIV><DIVCLASS="REFSECT1"><ANAME="SYNTH-CONSOLE-ARGUMENTS"></A><H2>Command Line Arguments</H2><P>The console device does not use any command-line arguments.    </P></DIV><DIVCLASS="REFSECT1"><ANAME="SYNTH-CONSOLE-HOOKS"></A><H2>Hooks</H2><P>The console device does not provide any hooks.    </P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN18133"></A><H2>Additional Tcl Procedures</H2><P>The console device does not provide any additional Tcl procedures thatcan be used by other scripts.    </P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="synth-gui.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="synth-syscalls.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">The I/O Auxiliary's User Interface</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="hal-synth-arch.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">System Calls</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -