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

📄 language.properties.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
📖 第 1 页 / 共 3 页
字号:
>As a special case, if the parent is the empty string then the<SPANCLASS="APPLICATION">CDL</SPAN> entity is placed at the root of the hierarchy. This is usefulfor global preferences, default compiler flags, and other settingsthat may affect every package.</P><P>The <SPANCLASS="PROPERTY">script</SPAN> property can only be used in the body of a<TTCLASS="LITERAL">cdl_component</TT> command. The property takes a single filename asargument, and this should be another <SPANCLASS="APPLICATION">CDL</SPAN> script containingadditional options, sub-components and interfaces that should go belowthe current component in the hierarchy. If the <AHREF="package.html#PACKAGE.HIERARCHY">directory layout conventions</A> areobserved then the component framework will look for the specified filerelative to the <TTCLASS="FILENAME">cdl</TT>subdirectory of the package, otherwise the filename will be treated asrelative to the package's top-level directory.</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_component CYGPKG_LIBC_STDIO {    display       "Standard input/output functions"    flavor        bool    requires      CYGPKG_IO    requires      CYGPKG_IO_SERIAL_HALDIAG    default_value 1    description   "        This enables support for standard I/O functions from &lt;stdio.h&gt;."    script        stdio.cdl}</PRE></TD></TR></TABLE></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="LANGUAGE.PROPERTIES.VALUE">Value-related Properties</H2><P>There are seven properties which are related to option values andstate: <AHREF="ref.flavor.html"><SPANCLASS="PROPERTY">flavor</SPAN></A>,<AHREF="ref.calculated.html"><SPANCLASS="PROPERTY">calculated</SPAN></A>,<AHREF="ref.default-value.html"><SPANCLASS="PROPERTY">default_value</SPAN></A>,<AHREF="ref.legal-values.html"><SPANCLASS="PROPERTY">legal_values</SPAN></A>,<AHREF="ref.active-if.html"><SPANCLASS="PROPERTY">active_if</SPAN></A>,<AHREF="ref.implements.html"><SPANCLASS="PROPERTY">implements</SPAN></A>, and<AHREF="ref.requires.html"><SPANCLASS="PROPERTY">requires</SPAN></A>. More detailedinformation can be found in <AHREF="language.values.html">the Section called <I>Values and Expressions</I></A>.</P><P>In the context of configurability, the concept of an option's value issomewhat non-trivial. First an option may or may not be loaded: it ispossible to build a configuration which has the math library but notthe kernel; however the math library's <SPANCLASS="APPLICATION">CDL</SPAN> scripts still referencekernel options, for example<TTCLASS="VARNAME">CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE</TT> has a<SPANCLASS="PROPERTY">requires</SPAN> constraint on<TTCLASS="VARNAME">CYGVAR_KERNEL_THREADS_DATA</TT>. Even if an option isloaded it may or may not be active, depending on what is happeninghigher up in the hierarchy: if the C library's<TTCLASS="VARNAME">CYGPKG_LIBC_STDIO</TT> component is disabled then someother options such as <TTCLASS="VARNAME">CYGNUM_LIBC_STDIO_BUFSIZE</TT>become irrelevant. In addition each option has both a booleanenabled/disabled flag and a data part. For many options only theboolean flag is of interest, while for others only the data part is ofinterest. The <SPANCLASS="PROPERTY">flavor</SPAN> property can be used to control this:</P><P></P><DIVCLASS="VARIABLELIST"><DL><DT><TTCLASS="LITERAL">flavor none</TT></DT><DD><P>This flavor indicates that neither the boolean nor the data parts areuser-modifiable: the option is always enabled and the data is alwaysset to <TTCLASS="LITERAL">1</TT>. The most common use for this is to have acomponent that just acts as a placeholder in the hierarchy, allowingvarious options to be grouped below it.</P></DD><DT><TTCLASS="LITERAL">flavor bool</TT></DT><DD><P>Only the boolean part of the option is user-modifiable. The data partis fixed at <TTCLASS="LITERAL">1</TT>.</P></DD><DT><TTCLASS="LITERAL">flavor data</TT></DT><DD><P>Only the data part of the option is user-modifiable. The boolean partis fixed at enabled.</P></DD><DT><TTCLASS="LITERAL">flavor booldata</TT></DT><DD><P>Both the boolean and the data part of the option are user-modifiable.</P></DD></DL></DIV><P>For more details of <SPANCLASS="APPLICATION">CDL</SPAN> flavors and how a flavor affects expressionevaluation, and other consequences, see <AHREF="language.values.html">the Section called <I>Values and Expressions</I></A>. The <SPANCLASS="PROPERTY">flavor</SPAN> property cannot be used for apackage because packages always have the <TTCLASS="LITERAL">booldata</TT>flavor. Options and components have the <TTCLASS="LITERAL">bool</TT> flavorby default, since most configuration choices are simple yes-or-nochoices. Interfaces have the <TTCLASS="LITERAL">data</TT> flavor by default.</P><P>The <SPANCLASS="PROPERTY">calculated</SPAN> property can be used for options which should not beuser-modifiable, but which instead are fixed by the target hardware ordetermined from the current values of other options. In general<SPANCLASS="PROPERTY">calculated</SPAN> options should be avoided, since they can be confusing tousers who need to figure out whether or not a particular option canactually be changed. There are a number of valid uses for <SPANCLASS="PROPERTY">calculated</SPAN>options, and quite a few invalid ones as well. The <AHREF="ref.calculated.html">reference packages</A> should be consultedfor further details. The property takes an <AHREF="language.values.html#LANGUAGE.EXPRESSION">ordinary <SPANCLASS="APPLICATION">CDL</SPAN> expression</A> asargument, for example:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"># A constant on some target hardware, perhaps user-modifiable on other# targets.cdl_option CYGNUM_HAL_RTC_PERIOD {    display       "Real-time clock period"    flavor        data    calculated    12500}</PRE></TD></TR></TABLE><P>The <SPANCLASS="PROPERTY">calculated</SPAN> property cannot be used for packages or interfaces.The value of a package always corresponds to the version of thatpackage which is loaded, and this is under user control. Interfacesare implicitly calculated, based on the number of active and enabledimplementors.</P><P>The <SPANCLASS="PROPERTY">default_value</SPAN> property is similar to <SPANCLASS="PROPERTY">calculated</SPAN>, but onlyspecifies a default value which users can modify. Again this propertyis not relevant to packages or interfaces. A typical example would be:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_option CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT {    display       "Include GDB multi-threading debug support"    requires      CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT    default_value CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT    &#8230;}</PRE></TD></TR></TABLE><P>The <SPANCLASS="PROPERTY">legal_values</SPAN> property imposes a constraint on the possiblevalues of the data part of an option. Hence it is only applicable tooptions with the <TTCLASS="LITERAL">data</TT> or<TTCLASS="LITERAL">booldata</TT> flavors. It cannot be used for a packagesince the only valid value for a package is its version number. Thearguments to the <SPANCLASS="PROPERTY">legal_values</SPAN> property should constitute a <AHREF="language.values.html#LANGUAGE.LIST-EXPRESSION"><SPANCLASS="APPLICATION">CDL</SPAN> list expression</A>.</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {    display       "Default Standard Time offset"    flavor        data    legal_values  -- -90000 to 90000    default_value -- 0    &#8230;}</PRE></TD></TR></TABLE><P>The <SPANCLASS="PROPERTY">active_if</SPAN> property does not relate directly to an option'svalue, but rather to its active state. Usually this is controlled viathe configuration hierarchy: if the<TTCLASS="VARNAME">CYGPKG_LIBC_STDIO</TT> component is disabled then alloptions below it are inactive and do not have any consequences.In some cases the hierarchy does not provide sufficient control, forexample an option should only be active if two disjoint sets ofconditions are satisfied: the hierarchy could be used for one of theseconditions, and an additional <SPANCLASS="PROPERTY">active_if</SPAN> property could be used forthe other one. The arguments to <SPANCLASS="PROPERTY">active_if</SPAN> should constitute a<AHREF="language.values.html#LANGUAGE.GOAL-EXPRESSION"><SPANCLASS="APPLICATION">CDL</SPAN> goal expression</A>.</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"># Do not provide extra semaphore debugging if there are no semaphorescdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM {    active_if CYGPKG_KERNEL_SYNCH    &#8230;}</PRE></TD></TR></TABLE><P>The <SPANCLASS="PROPERTY">implements</SPAN> property is related to the concept of <AHREF="language.interface.html"><SPANCLASS="APPLICATION">CDL</SPAN> interfaces</A>. If an option isactive and enabled and it implements a particular interface then itcontributes <TTCLASS="LITERAL">1</TT> to that interface's value.</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_package CYGPKG_NET_EDB7XXX_ETH_DRIVERS {    display       "Cirrus Logic ethernet driver"    implements    CYGHWR_NET_DRIVERS    implements    CYGHWR_NET_DRIVER_ETH0    &#8230;}</PRE></TD></TR></TABLE><P>The <SPANCLASS="PROPERTY">requires</SPAN> property is used to impose constraints on the user'schoices. For example it is unreasonable to expect the C library toprovide thread-safe implementations of certain functions if theunderlying kernel support has been disabled, or even if the kernel isnot being used at all.</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_option CYGSEM_LIBC_PER_THREAD_ERRNO {    display       "Per-thread errno"    doc           ref/ecos-ref.15.html    requires      CYGVAR_KERNEL_THREADS_DATA    default_value 1    &#8230;}</PRE></TD></TR></TABLE><P>The arguments to the <SPANCLASS="PROPERTY">requires</SPAN> property should be a <AHREF="language.values.html#LANGUAGE.GOAL-EXPRESSION"><SPANCLASS="APPLICATION">CDL</SPAN> goal expression</A>.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="LANGUAGE.PROPERTIES.DEFINE">Generating the Configuration Header Files</H2><P>When creating or updating a build tree the component framework willalso generate configuration header files, one per package. By defaultit will generate a <TTCLASS="LITERAL">#define</TT> for each option,component or interface that is active and enabled. For options withthe <TTCLASS="LITERAL">data</TT> or <TTCLASS="LITERAL">booldata</TT> flavors the<TTCLASS="LITERAL">#define</TT> will use the option's data part, otherwiseit will use the constant <TTCLASS="LITERAL">1</TT>. Typical output wouldinclude:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">#define CYGFUN_LIBC_TIME_POSIX 1#define CYGNUM_LIBC_TIME_DST_DEFAULT_STATE -1</PRE></TD></TR></TABLE><P>There are six properties which can be used to control the header filegeneration process:<AHREF="ref.define-header.html"><SPANCLASS="PROPERTY">define_header</SPAN></A>,<AHREF="ref.no-define.html"><SPANCLASS="PROPERTY">no_define</SPAN></A>,<AHREF="ref.define-format.html"><SPANCLASS="PROPERTY">define_format</SPAN></A>,

⌨️ 快捷键说明

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