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

📄 ref.cdl-option.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>cdl_option</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="The eCos Component Writer's Guide"HREF="cdl-guide.html"><LINKREL="UP"TITLE="CDL Language Specification"HREF="reference.html"><LINKREL="PREVIOUS"TITLE="CDL Language Specification"HREF="reference.html"><LINKREL="NEXT"TITLE="cdl_component"HREF="ref.cdl-component.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">The <SPANCLASS="APPLICATION">eCos</SPAN> Component Writer's Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="reference.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="ref.cdl-component.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="REF.CDL-OPTION"><TTCLASS="LITERAL">cdl_option</TT></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN2940"></A><H2>Name</H2>Command <TTCLASS="LITERAL">cdl_option</TT>&nbsp;--&nbsp;Define a single configuration option</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN2944"><H2>Synopsis</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SYNOPSIS">cdl_option &lt;name&gt; {    &#8230;}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN2946"></A><H2>Description</H2><P>The option is the basic unit of configurability. Generally each optioncorresponds to a single user choice. Typically there is a certainamount of information associated with an option to assist the user inmanipulating that option, for example a textual description. Therewill also be some limits on the possible values that the user canchoose, so an option may be a simple yes-or-no choice or it may besomething more complicated such as an array size or a device name.Options may have associated constraints, so if that option is enabledthen certain conditions have to satisfied elsewhere in theconfiguration. Options usually have direct consequences such aspreprocessor <TTCLASS="LITERAL">#define</TT> symbols in a configurationheader file.</P><P><TTCLASS="LITERAL">cdl_option</TT> is implemented as a Tcl command that takes two arguments,a name and a body. The name must be a valid C preprocessor identifier:a sequence of upper or lower case letters, digits or underscores,starting with a non-digit character; identifiers beginning with anunderscore should normally be avoided because they may clash withsystem packages or with identifiers reserved for use by the compiler.Within a single configuration, names must be unique. If aconfiguration contained two packages which defined the same entity<TTCLASS="LITERAL">CYGIMP_SOME_OPTION</TT>, any references to that entityin a <SPANCLASS="PROPERTY">requires</SPAN> property or any other expressionwould be ambiguous. It is possible for a given name to be used by twodifferent packages if those packages should never be loaded into asingle configuration. For example, architectural HAL packages areallowed to re-use names because a single configuration cannot targettwo different architectures. For a recommended naming convention see<AHREF="package.contents.html">the Section called <I>Package Contents and Layout</I> in Chapter 2</A>.</P><P>The second argument to <TTCLASS="LITERAL">cdl_option</TT> is a body ofproperties, typically surrounded by braces so that the Tcl interpretertreats it as a single argument. This body will be processed by arecursive invocation of the Tcl interpreter, extended with additionalcommands for the various properties that are allowed inside a<TTCLASS="LITERAL">cdl_option</TT>. The valid properties are:</P><P></P><DIVCLASS="VARIABLELIST"><DL><DT><AHREF="ref.active-if.html"><SPANCLASS="PROPERTY">active_if</SPAN></A></DT><DD><P>Allow additional control over the active state of this option.</P></DD><DT><AHREF="ref.calculated.html"><SPANCLASS="PROPERTY">calculated</SPAN></A></DT><DD><P>The option's value is not directly user-modifiable, it is calculatedusing a suitable CDL expression.</P></DD><DT><AHREF="ref.compile.html"><SPANCLASS="PROPERTY">compile</SPAN></A></DT><DD><P>List the source files that should be built if this option is activeand enabled.</P></DD><DT><AHREF="ref.default-value.html"><SPANCLASS="PROPERTY">default_value</SPAN></A></DT><DD><P>Provide a default value for this option using a CDL expression.</P></DD><DT><AHREF="ref.define.html"><SPANCLASS="PROPERTY">define</SPAN></A></DT><DD><P>Specify additional <TTCLASS="LITERAL">#define</TT> symbols that should gointo the owning package's configuration header file.</P></DD><DT><AHREF="ref.define-format.html"><SPANCLASS="PROPERTY">define_format</SPAN></A></DT><DD><P>Control how the option's value will appear in the configuration headerfile.</P></DD><DT><AHREF="ref.define-proc.html"><SPANCLASS="PROPERTY">define_proc</SPAN></A></DT><DD><P>Use a fragment of Tcl code to output additional data toconfiguration header files.</P></DD><DT><AHREF="ref.description.html"><SPANCLASS="PROPERTY">description</SPAN></A></DT><DD><P>Provide a textual description for this option.</P></DD><DT><AHREF="ref.display.html"><SPANCLASS="PROPERTY">display</SPAN></A></DT><DD><P>Provide a short string describing this option.</P></DD><DT><AHREF="ref.doc.html"><SPANCLASS="PROPERTY">doc</SPAN></A></DT><DD><P>The location of on-line documentation for this option.</P></DD><DT><AHREF="ref.flavor.html"><SPANCLASS="PROPERTY">flavor</SPAN></A></DT><DD><P>Specify the nature of this option.</P></DD><DT><AHREF="ref.if-define.html"><SPANCLASS="PROPERTY">if_define</SPAN></A></DT><DD><P>Output a common preprocessor construct to a configuration header file. </P></DD><DT><AHREF="ref.implements.html"><SPANCLASS="PROPERTY">implements</SPAN></A></DT><DD><P>Enabling this option provides one instance of a more generalinterface. </P></DD><DT><AHREF="ref.legal-values.html"><SPANCLASS="PROPERTY">legal_values</SPAN></A></DT><DD><P>Impose constraints on the possible values for this option.</P></DD><DT><AHREF="ref.make.html"><SPANCLASS="PROPERTY">make</SPAN></A></DT><DD><P>An additional custom build step associated with this option, resultingin a target that should not go directly into a library.</P></DD><DT><AHREF="ref.make-object.html"><SPANCLASS="PROPERTY">make_object</SPAN></A></DT><DD><P>An additional custom build step associated with this option, resultingin an object file that should go into a library.</P></DD><DT><AHREF="ref.no-define.html"><SPANCLASS="PROPERTY">no_define</SPAN></A></DT><DD><P>Suppress the normal generation of a preprocessor<TTCLASS="LITERAL">#define</TT> symbol in a configuration header file.</P></DD><DT><AHREF="ref.parent.html"><SPANCLASS="PROPERTY">parent</SPAN></A></DT><DD><P>Control the location of this option in the configuration hierarchy. </P></DD><DT><AHREF="ref.requires.html"><SPANCLASS="PROPERTY">requires</SPAN></A></DT><DD><P>List constraints that the configuration should satisfy if this option isactive and enabled.</P></DD></DL></DIV></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3075"></A><H2>Example</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {    display       "Preconditions"    default_value 1    description   "        This option allows individual control of preconditions.        A precondition is one type of assert, which it is        useful to control separately from more general asserts.        The function is CYG_PRECONDITION(condition,msg)."}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3078"></A><H2>See Also</H2><P>Command <AHREF="ref.cdl-component.html"><TTCLASS="LITERAL">cdl_component</TT></A>,command <AHREF="ref.cdl-package.html"><TTCLASS="LITERAL">cdl_package</TT></A>,command <AHREF="ref.cdl-interface.html"><TTCLASS="LITERAL">cdl_interface</TT></A>.</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="reference.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="cdl-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="ref.cdl-component.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">CDL Language Specification</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="reference.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><TTCLASS="LITERAL">cdl_component</TT></TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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