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

📄 language.database.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>Updating the ecos.db database</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="The CDL Language"HREF="language.html"><LINKREL="PREVIOUS"TITLE="Interfaces"HREF="language.interface.html"><LINKREL="NEXT"TITLE="The Build Process"HREF="build.html"></HEAD><BODYCLASS="SECT1"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="language.interface.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 3. The CDL Language</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="build.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="LANGUAGE.DATABASE">Updating the <SPANCLASS="DATABASE">ecos.db</SPAN> database</H1><P>The current implementation of the component framework requires thatall packages be present in a single component repository and listed inthat repository's <SPANCLASS="DATABASE">ecos.db</SPAN> database. This is notgenerally a problem for application developers who can consider thecomponent repository a read-only resource, except when adding orremoving packages via the administration tool. However it means thatcomponent writers need to do their development work inside acomponent repository as well, and update the database with details oftheir new package or packages. Future enhancements to the componentframework may allow new components to be developed outside arepository. </P><P>Like most files related to the component framework, the<SPANCLASS="DATABASE">ecos.db</SPAN> database is actually a <SPANCLASS="APPLICATION">Tcl</SPAN> script.Typical package entries would look like this:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">package CYGPKG_LIBC {	alias		{ "C library" libc clib clibrary }	directory	language/c/libc	script		libc.cdl        description  "This package enables compatibility with the ISO C standard - ISO/IEC9899:1990. This allows the user application to use well known standardC library functions, and in eCos starts a thread to invoke the userfunction main()"}package CYGPKG_IO_PCI	{	alias		{ "PCI configuration library" io_pci }	directory	io/pci	script		io_pci.cdl	hardware        description "           This package contains the PCI configuration library."}</PRE></TD></TR></TABLE><P>The <TTCLASS="LITERAL">package</TT> command takes two arguments, a name anda body. The name must be the same as in the <TTCLASS="LITERAL">cdl_package</TT> command inthe package's top-level <SPANCLASS="APPLICATION">CDL</SPAN> script. The body can contain thefollowing five commands: <TTCLASS="LITERAL">alias</TT>,<TTCLASS="LITERAL">directory</TT>, <TTCLASS="LITERAL">script</TT>,<TTCLASS="LITERAL">hardware</TT> and <TTCLASS="LITERAL">description</TT>.</P><P></P><DIVCLASS="VARIABLELIST"><DL><DT><TTCLASS="LITERAL">alias</TT></DT><DD><P>Each package should have one or more aliases. The first alias istypically used when listing the known packages, because a string like<TTCLASS="LITERAL">C&nbsp;library</TT> is a bit easier to read andunderstand than <TTCLASS="VARNAME">CYGPKG_LIBC</TT>. The other aliases arenot used for output, but are accepted on input. For example the<SPANCLASS="APPLICATION">ecosconfig</SPAN> command-linetool will accept <TTCLASS="LITERAL">add&nbsp;libc</TT> as an option, as wellas <TTCLASS="LITERAL">add&nbsp;CYGPKG_LIBC</TT>.</P></DD><DT><TTCLASS="LITERAL">directory</TT></DT><DD><P>This is used to specify the location of the package relative to theroot of the component repository. It should be noted that in thecurrent component framework this location cannot be changed insubsequent releases of the package: if for some reason it is desirableto install a new release elsewhere in the repository, all the oldversions must first be uninstalled; the database cannot hold twoseparate locations for one package.</P></DD><DT><TTCLASS="LITERAL">script</TT></DT><DD><P>The <TTCLASS="LITERAL">script</TT> command specifies the location of thepackage's top-level <SPANCLASS="APPLICATION">CDL</SPAN> script, in other words the one containing the<TTCLASS="LITERAL">cdl_package</TT> definition. If the package follows the <AHREF="package.html#PACKAGE.HIERARCHY">directory layout conventions</A> thenthis script will be in the <TTCLASS="FILENAME">cdl</TT>sub-directory, otherwise it will be relative to the package's top-leveldirectory. Again once a release has been made this file should notchange in later releases. In practice the top-level script is generallynamed after the package itself, so changing its name is unlikely to beuseful. </P></DD><DT><TTCLASS="LITERAL">hardware</TT></DT><DD><P>Packages which are tied to specific hardware, for example devicedrivers and HAL packages, should indicate this in both the<TTCLASS="LITERAL">cdl_package</TT> command of the <SPANCLASS="APPLICATION">CDL</SPAN> script and in the database entry.</P></DD><DT><TTCLASS="LITERAL">description</TT></DT><DD><P>This should give a brief description of the package. Typically thetext for the <SPANCLASS="PROPERTY">description</SPAN> property in the <TTCLASS="LITERAL">cdl_package</TT> command willbe re-used.</P></DD></DL></DIV><DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>Note: </B>Most of the information in the <SPANCLASS="DATABASE">ecos.db</SPAN> file couldbe obtained by a relatively simple utility. This would be passed asingle argument identifying a package's top-level <SPANCLASS="APPLICATION">CDL</SPAN> script. Thedirectory path relative to the component repository root could bedetermined from the filename. The name, <TTCLASS="LITERAL">description</TT>and <TTCLASS="LITERAL">hardware</TT> fields could be obtained from thescript's <TTCLASS="LITERAL">cdl_package</TT> command. The <SPANCLASS="PROPERTY">display</SPAN> property would supplythe first alias, additional aliases could be obtained by extending thesyntax of that property or by other means. Something along these linesmay be provided by a future release of the component framework.</P></BLOCKQUOTE></DIV><P>Currently the <SPANCLASS="DATABASE">ecos.db</SPAN> database also holdsinformation about the various targets. When porting to a new target itwill be necessary to add information about the target to the database,as well as the details of the new platform HAL package and any relatedpackages. </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="language.interface.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="build.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Interfaces</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="language.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">The Build Process</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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