OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [cdl-guide/] [language.properties.html] - Diff between revs 28 and 174

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 174
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>CDL Properties</TITLE
>CDL Properties</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
<META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="The eCos Component Writer's Guide"
TITLE="The eCos Component Writer's Guide"
HREF="cdl-guide.html"><LINK
HREF="cdl-guide.html"><LINK
REL="UP"
REL="UP"
TITLE="The CDL Language"
TITLE="The CDL Language"
HREF="language.html"><LINK
HREF="language.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="CDL Commands"
TITLE="CDL Commands"
HREF="language.commands.html"><LINK
HREF="language.commands.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="Option Naming Convention"
TITLE="Option Naming Convention"
HREF="language.naming.html"></HEAD
HREF="language.naming.html"></HEAD
><BODY
><BODY
CLASS="SECT1"
CLASS="SECT1"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
SUMMARY="Header navigation table"
SUMMARY="Header navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>The <SPAN
>The <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>eCos</SPAN
>eCos</SPAN
> Component Writer's Guide</TH
> Component Writer's Guide</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="language.commands.html"
HREF="language.commands.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
>Chapter 3. The CDL Language</TD
>Chapter 3. The CDL Language</TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="language.naming.html"
HREF="language.naming.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><DIV
><DIV
CLASS="SECT1"
CLASS="SECT1"
><H1
><H1
CLASS="SECT1"
CLASS="SECT1"
><A
><A
NAME="LANGUAGE.PROPERTIES">CDL Properties</H1
NAME="LANGUAGE.PROPERTIES">CDL Properties</H1
><P
><P
>Each package, component, option, and interface has a body of
>Each package, component, option, and interface has a body of
properties, which provide the component framework with information
properties, which provide the component framework with information
about how to handle each option. For example there is a property for a
about how to handle each option. For example there is a property for a
descriptive text message which can be displayed to a user who is
descriptive text message which can be displayed to a user who is
trying to figure out just what effect manipulating the option would
trying to figure out just what effect manipulating the option would
have on the target application. There is another property for the
have on the target application. There is another property for the
default value, for example whether a particular option should be
default value, for example whether a particular option should be
enabled or disabled by default.</P
enabled or disabled by default.</P
><P
><P
>All of the properties are optional, it is legal to define a
>All of the properties are optional, it is legal to define a
configuration option which has an empty body. However some properties
configuration option which has an empty body. However some properties
are more optional than others: users will not appreciate having to
are more optional than others: users will not appreciate having to
manipulate an option if they are not given any sort of description or
manipulate an option if they are not given any sort of description or
documentation. Other properties are intended only for very specific
documentation. Other properties are intended only for very specific
purposes, for example <SPAN
purposes, for example <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make_object</SPAN
>make_object</SPAN
> and <SPAN
> and <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_files</SPAN
>include_files</SPAN
>, and are used
>, and are used
only rarely.</P
only rarely.</P
><P
><P
>Because different properties serve very different purposes, their
>Because different properties serve very different purposes, their
syntax is not as uniform as the top-level commands. Some properties
syntax is not as uniform as the top-level commands. Some properties
take no arguments at all. Other properties take a single argument such
take no arguments at all. Other properties take a single argument such
as a description string, or a list of arguments such as a <SPAN
as a description string, or a list of arguments such as a <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
>
>
property which specifies the file or files that should be compiled if
property which specifies the file or files that should be compiled if
a given option is active and enabled. The <SPAN
a given option is active and enabled. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_proc</SPAN
>define_proc</SPAN
> property takes
> property takes
as argument a snippet of <SPAN
as argument a snippet of <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>Tcl</SPAN
>Tcl</SPAN
> code. The <SPAN
> code. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>active_if</SPAN
>active_if</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
>,
>,
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>default_value</SPAN
>default_value</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>legal_values</SPAN
>legal_values</SPAN
> and <SPAN
> and <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>requires</SPAN
>requires</SPAN
> properties take various
> properties take various
expressions. Additional properties may be defined in future which take
expressions. Additional properties may be defined in future which take
new kinds of arguments.</P
new kinds of arguments.</P
><P
><P
>All property parsing code supports options for every property,
>All property parsing code supports options for every property,
although at present the majority of properties do not yet take any
although at present the majority of properties do not yet take any
options. Any initial arguments that begin with a hyphen character
options. Any initial arguments that begin with a hyphen character
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>-</TT
>-</TT
> will be interpreted as an option, for example:</P
> will be interpreted as an option, for example:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_HAL_ARM {
>cdl_package CYGPKG_HAL_ARM {
    &#8230;
    &#8230;
    make -priority 1 {
    make -priority 1 {
        &#8230;
        &#8230;
    }
    }
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>If the option involves additional data, as for the
>If the option involves additional data, as for the
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>-priority</TT
>-priority</TT
> example above, then this can be written
> example above, then this can be written
as either <TT
as either <TT
CLASS="LITERAL"
CLASS="LITERAL"
>-priority=1</TT
>-priority=1</TT
> or as
> or as
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>-priority&nbsp;1</TT
>-priority&nbsp;1</TT
>. On occasion the option parsing
>. On occasion the option parsing
code can get in the way, for example:</P
code can get in the way, for example:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
>cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
    &#8230;
    &#8230;
    legal_values -1 to 1
    legal_values -1 to 1
    default_value -1
    default_value -1
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>Neither the <SPAN
>Neither the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>legal_values</SPAN
>legal_values</SPAN
> nor the <SPAN
> nor the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>default_value</SPAN
>default_value</SPAN
> property will
> property will
accept <TT
accept <TT
CLASS="LITERAL"
CLASS="LITERAL"
>-1</TT
>-1</TT
> as a valid option, so this will result in
> as a valid option, so this will result in
syntax errors when the <SPAN
syntax errors when the <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> script is read in by the component
> script is read in by the component
framework. To avoid problems, the option parsing code will recognize
framework. To avoid problems, the option parsing code will recognize
the string <TT
the string <TT
CLASS="LITERAL"
CLASS="LITERAL"
>--</TT
>--</TT
> and will not attempt to interpret any
> and will not attempt to interpret any
subsequent arguments. Hence this option should be written as:</P
subsequent arguments. Hence this option should be written as:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
>cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
    &#8230;
    &#8230;
    legal_values  -- -1 to 1
    legal_values  -- -1 to 1
    default_value -- -1
    default_value -- -1
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The property parsing code involves a recursive invocation of the Tcl
>The property parsing code involves a recursive invocation of the Tcl
interpreter that is used to parse the top-level commands. This means
interpreter that is used to parse the top-level commands. This means
that some characters in the body of an option will be treated
that some characters in the body of an option will be treated
specially. The <TT
specially. The <TT
CLASS="LITERAL"
CLASS="LITERAL"
>#</TT
>#</TT
> character can be used for
> character can be used for
comments. The backslash character <TT
comments. The backslash character <TT
CLASS="LITERAL"
CLASS="LITERAL"
>\</TT
>\</TT
>, the
>, the
dollar character <TT
dollar character <TT
CLASS="LITERAL"
CLASS="LITERAL"
>$</TT
>$</TT
>, square brackets
>, square brackets
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>[</TT
>[</TT
> and <TT
> and <TT
CLASS="LITERAL"
CLASS="LITERAL"
>]</TT
>]</TT
>, braces
>, braces
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>{</TT
>{</TT
> and <TT
> and <TT
CLASS="LITERAL"
CLASS="LITERAL"
>}</TT
>}</TT
>, and the quote character
>, and the quote character
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>"</TT
>"</TT
> may all receive special treatment. Most of the
> may all receive special treatment. Most of the
time this is not a problem because these characters are not useful for
time this is not a problem because these characters are not useful for
most properties. On occasion having a <SPAN
most properties. On occasion having a <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>Tcl</SPAN
>Tcl</SPAN
> interpreter around
> interpreter around
performing the parser can be very powerful. For more details of
performing the parser can be very powerful. For more details of
how the presence of a <SPAN
how the presence of a <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>Tcl</SPAN
>Tcl</SPAN
> interpreter can affect <SPAN
> interpreter can affect <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> scripts,
> scripts,
see <A
see <A
HREF="language.tcl.html"
HREF="language.tcl.html"
>the Section called <I
>the Section called <I
>An Introduction to Tcl</I
>An Introduction to Tcl</I
></A
></A
>.</P
>.</P
><P
><P
>Many of the properties can be used in any of <TT
>Many of the properties can be used in any of <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_package</TT
>cdl_package</TT
>,
>,
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_component</TT
>cdl_component</TT
>, <TT
>, <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_option</TT
>cdl_option</TT
> or <TT
> or <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_interface</TT
>cdl_interface</TT
>. Other properties are
>. Other properties are
more specific. The <SPAN
more specific. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>script</SPAN
>script</SPAN
> property is only relevant to components.
> property is only relevant to components.
The <SPAN
The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_header</SPAN
>define_header</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>hardware</SPAN
>hardware</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_dir</SPAN
>include_dir</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_files</SPAN
>include_files</SPAN
>, and
>, and
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>library</SPAN
>library</SPAN
> properties apply to a package as a whole, so can only occur
> properties apply to a package as a whole, so can only occur
in the body of a <TT
in the body of a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_package</TT
>cdl_package</TT
> command. The <SPAN
> command. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
>,
>,
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>default_value</SPAN
>default_value</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>legal_values</SPAN
>legal_values</SPAN
> and <SPAN
> and <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>flavor</SPAN
>flavor</SPAN
> properties are not
> properties are not
relevant to packages, as will be explained later. The <SPAN
relevant to packages, as will be explained later. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
> and
> and
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>default_value</SPAN
>default_value</SPAN
> properties are also not relevant to interfaces.</P
> properties are also not relevant to interfaces.</P
><P
><P
>This section lists the various properties, grouped by purpose. Each
>This section lists the various properties, grouped by purpose. Each
property also has a full reference page in <A
property also has a full reference page in <A
HREF="reference.html"
HREF="reference.html"
>Chapter 5</A
>Chapter 5</A
>.
>.
Properties related to values and expressions are described in more
Properties related to values and expressions are described in more
detail in <A
detail in <A
HREF="language.values.html"
HREF="language.values.html"
>the Section called <I
>the Section called <I
>Values and Expressions</I
>Values and Expressions</I
></A
></A
>. Properties related to
>. Properties related to
header file generation and to the build process are described in
header file generation and to the build process are described in
<A
<A
HREF="build.html"
HREF="build.html"
>Chapter 4</A
>Chapter 4</A
>.</P
>.</P
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="LANGUAGE.PROPERTIES.USER">Information-providing Properties</H2
NAME="LANGUAGE.PROPERTIES.USER">Information-providing Properties</H2
><P
><P
>Users can only be expected to manipulate configuration options
>Users can only be expected to manipulate configuration options
sensibly if they are given sufficient information about these options.
sensibly if they are given sufficient information about these options.
There are three properties which serve to explain an option in plain
There are three properties which serve to explain an option in plain
text: the <A
text: the <A
HREF="ref.display.html"
HREF="ref.display.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>display</SPAN
>display</SPAN
></A
></A
> property gives
> property gives
a textual alias for an option, which is usually more comprehensible
a textual alias for an option, which is usually more comprehensible
than something like <TT
than something like <TT
CLASS="LITERAL"
CLASS="LITERAL"
>CYGPKG_LIBC_TIME_ZONES`</TT
>CYGPKG_LIBC_TIME_ZONES`</TT
>; the
>; the
<A
<A
HREF="ref.description.html"
HREF="ref.description.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>description</SPAN
>description</SPAN
></A
></A
> property gives a
> property gives a
longer description, typically a paragraph or so; the <A
longer description, typically a paragraph or so; the <A
HREF="ref.doc.html"
HREF="ref.doc.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>doc</SPAN
>doc</SPAN
></A
></A
> property specifies the location of
> property specifies the location of
additional on-line documentation related to a configuration option. In
additional on-line documentation related to a configuration option. In
the context of a graphical tool the <SPAN
the context of a graphical tool the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>display</SPAN
>display</SPAN
> string will be the
> string will be the
primary way for users to identify configuration options; the
primary way for users to identify configuration options; the
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>description</SPAN
>description</SPAN
> paragraph will be visible whenever the option is
> paragraph will be visible whenever the option is
selected; the on-line documentation will only be accessed when the
selected; the on-line documentation will only be accessed when the
user explicitly requests it.</P
user explicitly requests it.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_UITRON {
>cdl_package CYGPKG_UITRON {
    display       "uITRON compatibility layer"
    display       "uITRON compatibility layer"
    doc           ref/ecos-ref.a.html
    doc           ref/ecos-ref.a.html
    description   "
    description   "
        eCos supports a uITRON Compatibility Layer, providing
        eCos supports a uITRON Compatibility Layer, providing
        full Level S (Standard) compliance with Version 3.02 of
        full Level S (Standard) compliance with Version 3.02 of
        the uITRON Standard, plus many Level E (Extended) features.
        the uITRON Standard, plus many Level E (Extended) features.
        uITRON is the premier Japanese embedded RTOS standard."
        uITRON is the premier Japanese embedded RTOS standard."
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>All three properties take a single argument. For <SPAN
>All three properties take a single argument. For <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>display</SPAN
>display</SPAN
> and
> and
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>description</SPAN
>description</SPAN
> this argument is just a string. For <SPAN
> this argument is just a string. For <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>doc</SPAN
>doc</SPAN
> it should be a
> it should be a
pointer to a suitable HTML file, optionally including an anchor within
pointer to a suitable HTML file, optionally including an anchor within
that page. If the <A
that page. If the <A
HREF="package.html#PACKAGE.HIERARCHY"
HREF="package.html#PACKAGE.HIERARCHY"
>directory layout
>directory layout
conventions</A
conventions</A
> are observed then the component framework will look
> are observed then the component framework will look
for the HTML file in the package's <TT
for the HTML file in the package's <TT
CLASS="FILENAME"
CLASS="FILENAME"
>doc</TT
>doc</TT
> sub-directory, otherwise the <SPAN
> sub-directory, otherwise the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>doc</SPAN
>doc</SPAN
>
>
filename will be treated as relative to the package's top-level directory.</P
filename will be treated as relative to the package's top-level directory.</P
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="LANGUAGE.PROPERTIES.HIERARCHY">The Configuration Hierarchy</H2
NAME="LANGUAGE.PROPERTIES.HIERARCHY">The Configuration Hierarchy</H2
><P
><P
>There are two properties related to the hierarchical organization of
>There are two properties related to the hierarchical organization of
components and options: <A
components and options: <A
HREF="ref.parent.html"
HREF="ref.parent.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>parent</SPAN
>parent</SPAN
></A
></A
> and
> and
<A
<A
HREF="ref.script.html"
HREF="ref.script.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>script</SPAN
>script</SPAN
></A
></A
>.</P
>.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>parent</SPAN
>parent</SPAN
> property can be used to move a <SPAN
> property can be used to move a <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> entity somewhere
> entity somewhere
else in the hierarchy. The most common use is for packages, to avoid
else in the hierarchy. The most common use is for packages, to avoid
having all the packages appear at the top-level of the configuration
having all the packages appear at the top-level of the configuration
hierarchy. For example an architectural HAL package such as
hierarchy. For example an architectural HAL package such as
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGPKG_HAL_SH</TT
>CYGPKG_HAL_SH</TT
> is placed below the common HAL
> is placed below the common HAL
package <TT
package <TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGPKG_HAL</TT
>CYGPKG_HAL</TT
> using a <SPAN
> using a <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>parent</SPAN
>parent</SPAN
> property.</P
> property.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_HAL_SH {
>cdl_package CYGPKG_HAL_SH {
    display       "SH architecture"
    display       "SH architecture"
    parent        CYGPKG_HAL
    parent        CYGPKG_HAL
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>parent</SPAN
>parent</SPAN
> property can also be used in the body of a
> property can also be used in the body of a
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_component</TT
>cdl_component</TT
>, <TT
>, <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_option</TT
>cdl_option</TT
> or <TT
> or <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_interface</TT
>cdl_interface</TT
>, but this is less
>, but this is less
common. However care has to be taken since excessive re-parenting can
common. However care has to be taken since excessive re-parenting can
be confusing. Care also has to be taken when reparenting below some
be confusing. Care also has to be taken when reparenting below some
other package that may not actually be loaded in a given
other package that may not actually be loaded in a given
configuration, since the resulting behavior is undefined.</P
configuration, since the resulting behavior is undefined.</P
><P
><P
>As a special case, if the parent is the empty string then the
>As a special case, if the parent is the empty string then the
<SPAN
<SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> entity is placed at the root of the hierarchy. This is useful
> entity is placed at the root of the hierarchy. This is useful
for global preferences, default compiler flags, and other settings
for global preferences, default compiler flags, and other settings
that may affect every package.</P
that may affect every package.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>script</SPAN
>script</SPAN
> property can only be used in the body of a
> property can only be used in the body of a
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_component</TT
>cdl_component</TT
> command. The property takes a single filename as
> command. The property takes a single filename as
argument, and this should be another <SPAN
argument, and this should be another <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> script containing
> script containing
additional options, sub-components and interfaces that should go below
additional options, sub-components and interfaces that should go below
the current component in the hierarchy. If the <A
the current component in the hierarchy. If the <A
HREF="package.html#PACKAGE.HIERARCHY"
HREF="package.html#PACKAGE.HIERARCHY"
>directory layout conventions</A
>directory layout conventions</A
> are
> are
observed then the component framework will look for the specified file
observed then the component framework will look for the specified file
relative to the <TT
relative to the <TT
CLASS="FILENAME"
CLASS="FILENAME"
>cdl</TT
>cdl</TT
>
>
subdirectory of the package, otherwise the filename will be treated as
subdirectory of the package, otherwise the filename will be treated as
relative to the package's top-level directory.</P
relative to the package's top-level directory.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_component CYGPKG_LIBC_STDIO {
>cdl_component CYGPKG_LIBC_STDIO {
    display       "Standard input/output functions"
    display       "Standard input/output functions"
    flavor        bool
    flavor        bool
    requires      CYGPKG_IO
    requires      CYGPKG_IO
    requires      CYGPKG_IO_SERIAL_HALDIAG
    requires      CYGPKG_IO_SERIAL_HALDIAG
    default_value 1
    default_value 1
    description   "
    description   "
        This enables support for standard I/O functions from &lt;stdio.h&gt;."
        This enables support for standard I/O functions from &lt;stdio.h&gt;."
 
 
    script        stdio.cdl
    script        stdio.cdl
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="LANGUAGE.PROPERTIES.VALUE">Value-related Properties</H2
NAME="LANGUAGE.PROPERTIES.VALUE">Value-related Properties</H2
><P
><P
>There are seven properties which are related to option values and
>There are seven properties which are related to option values and
state: <A
state: <A
HREF="ref.flavor.html"
HREF="ref.flavor.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>flavor</SPAN
>flavor</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.calculated.html"
HREF="ref.calculated.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.default-value.html"
HREF="ref.default-value.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>default_value</SPAN
>default_value</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.legal-values.html"
HREF="ref.legal-values.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>legal_values</SPAN
>legal_values</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.active-if.html"
HREF="ref.active-if.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>active_if</SPAN
>active_if</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.implements.html"
HREF="ref.implements.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>implements</SPAN
>implements</SPAN
></A
></A
>, and
>, and
<A
<A
HREF="ref.requires.html"
HREF="ref.requires.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>requires</SPAN
>requires</SPAN
></A
></A
>. More detailed
>. More detailed
information can be found in <A
information can be found in <A
HREF="language.values.html"
HREF="language.values.html"
>the Section called <I
>the Section called <I
>Values and Expressions</I
>Values and Expressions</I
></A
></A
>.</P
>.</P
><P
><P
>In the context of configurability, the concept of an option's value is
>In the context of configurability, the concept of an option's value is
somewhat non-trivial. First an option may or may not be loaded: it is
somewhat non-trivial. First an option may or may not be loaded: it is
possible to build a configuration which has the math library but not
possible to build a configuration which has the math library but not
the kernel; however the math library's <SPAN
the kernel; however the math library's <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> scripts still reference
> scripts still reference
kernel options, for example
kernel options, for example
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE</TT
>CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE</TT
> has a
> has a
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>requires</SPAN
>requires</SPAN
> constraint on
> constraint on
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGVAR_KERNEL_THREADS_DATA</TT
>CYGVAR_KERNEL_THREADS_DATA</TT
>. Even if an option is
>. Even if an option is
loaded it may or may not be active, depending on what is happening
loaded it may or may not be active, depending on what is happening
higher up in the hierarchy: if the C library's
higher up in the hierarchy: if the C library's
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGPKG_LIBC_STDIO</TT
>CYGPKG_LIBC_STDIO</TT
> component is disabled then some
> component is disabled then some
other options such as <TT
other options such as <TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGNUM_LIBC_STDIO_BUFSIZE</TT
>CYGNUM_LIBC_STDIO_BUFSIZE</TT
>
>
become irrelevant. In addition each option has both a boolean
become irrelevant. In addition each option has both a boolean
enabled/disabled flag and a data part. For many options only the
enabled/disabled flag and a data part. For many options only the
boolean flag is of interest, while for others only the data part is of
boolean flag is of interest, while for others only the data part is of
interest. The <SPAN
interest. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>flavor</SPAN
>flavor</SPAN
> property can be used to control this:</P
> property can be used to control this:</P
><P
><P
></P
></P
><DIV
><DIV
CLASS="VARIABLELIST"
CLASS="VARIABLELIST"
><DL
><DL
><DT
><DT
><TT
><TT
CLASS="LITERAL"
CLASS="LITERAL"
>flavor none</TT
>flavor none</TT
></DT
></DT
><DD
><DD
><P
><P
>This flavor indicates that neither the boolean nor the data parts are
>This flavor indicates that neither the boolean nor the data parts are
user-modifiable: the option is always enabled and the data is always
user-modifiable: the option is always enabled and the data is always
set to <TT
set to <TT
CLASS="LITERAL"
CLASS="LITERAL"
>1</TT
>1</TT
>. The most common use for this is to have a
>. The most common use for this is to have a
component that just acts as a placeholder in the hierarchy, allowing
component that just acts as a placeholder in the hierarchy, allowing
various options to be grouped below it.</P
various options to be grouped below it.</P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="LITERAL"
CLASS="LITERAL"
>flavor bool</TT
>flavor bool</TT
></DT
></DT
><DD
><DD
><P
><P
>Only the boolean part of the option is user-modifiable. The data part
>Only the boolean part of the option is user-modifiable. The data part
is fixed at <TT
is fixed at <TT
CLASS="LITERAL"
CLASS="LITERAL"
>1</TT
>1</TT
>.</P
>.</P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="LITERAL"
CLASS="LITERAL"
>flavor data</TT
>flavor data</TT
></DT
></DT
><DD
><DD
><P
><P
>Only the data part of the option is user-modifiable. The boolean part
>Only the data part of the option is user-modifiable. The boolean part
is fixed at enabled.</P
is fixed at enabled.</P
></DD
></DD
><DT
><DT
><TT
><TT
CLASS="LITERAL"
CLASS="LITERAL"
>flavor booldata</TT
>flavor booldata</TT
></DT
></DT
><DD
><DD
><P
><P
>Both the boolean and the data part of the option are user-modifiable.</P
>Both the boolean and the data part of the option are user-modifiable.</P
></DD
></DD
></DL
></DL
></DIV
></DIV
><P
><P
>For more details of <SPAN
>For more details of <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> flavors and how a flavor affects expression
> flavors and how a flavor affects expression
evaluation, and other consequences, see <A
evaluation, and other consequences, see <A
HREF="language.values.html"
HREF="language.values.html"
>the Section called <I
>the Section called <I
>Values and Expressions</I
>Values and Expressions</I
></A
></A
>. The <SPAN
>. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>flavor</SPAN
>flavor</SPAN
> property cannot be used for a
> property cannot be used for a
package because packages always have the <TT
package because packages always have the <TT
CLASS="LITERAL"
CLASS="LITERAL"
>booldata</TT
>booldata</TT
>
>
flavor. Options and components have the <TT
flavor. Options and components have the <TT
CLASS="LITERAL"
CLASS="LITERAL"
>bool</TT
>bool</TT
> flavor
> flavor
by default, since most configuration choices are simple yes-or-no
by default, since most configuration choices are simple yes-or-no
choices. Interfaces have the <TT
choices. Interfaces have the <TT
CLASS="LITERAL"
CLASS="LITERAL"
>data</TT
>data</TT
> flavor by default.</P
> flavor by default.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
> property can be used for options which should not be
> property can be used for options which should not be
user-modifiable, but which instead are fixed by the target hardware or
user-modifiable, but which instead are fixed by the target hardware or
determined from the current values of other options. In general
determined from the current values of other options. In general
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
> options should be avoided, since they can be confusing to
> options should be avoided, since they can be confusing to
users who need to figure out whether or not a particular option can
users who need to figure out whether or not a particular option can
actually be changed. There are a number of valid uses for <SPAN
actually be changed. There are a number of valid uses for <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
>
>
options, and quite a few invalid ones as well. The <A
options, and quite a few invalid ones as well. The <A
HREF="ref.calculated.html"
HREF="ref.calculated.html"
>reference packages</A
>reference packages</A
> should be consulted
> should be consulted
for further details. The property takes an <A
for further details. The property takes an <A
HREF="language.values.html#LANGUAGE.EXPRESSION"
HREF="language.values.html#LANGUAGE.EXPRESSION"
>ordinary <SPAN
>ordinary <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> expression</A
> expression</A
> as
> as
argument, for example:</P
argument, for example:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
># A constant on some target hardware, perhaps user-modifiable on other
># A constant on some target hardware, perhaps user-modifiable on other
# targets.
# targets.
cdl_option CYGNUM_HAL_RTC_PERIOD {
cdl_option CYGNUM_HAL_RTC_PERIOD {
    display       "Real-time clock period"
    display       "Real-time clock period"
    flavor        data
    flavor        data
    calculated    12500
    calculated    12500
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
> property cannot be used for packages or interfaces.
> property cannot be used for packages or interfaces.
The value of a package always corresponds to the version of that
The value of a package always corresponds to the version of that
package which is loaded, and this is under user control. Interfaces
package which is loaded, and this is under user control. Interfaces
are implicitly calculated, based on the number of active and enabled
are implicitly calculated, based on the number of active and enabled
implementors.</P
implementors.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>default_value</SPAN
>default_value</SPAN
> property is similar to <SPAN
> property is similar to <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>calculated</SPAN
>calculated</SPAN
>, but only
>, but only
specifies a default value which users can modify. Again this property
specifies a default value which users can modify. Again this property
is not relevant to packages or interfaces. A typical example would be:</P
is not relevant to packages or interfaces. A typical example would be:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_option CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT {
>cdl_option CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT {
    display       "Include GDB multi-threading debug support"
    display       "Include GDB multi-threading debug support"
    requires      CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
    requires      CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
    default_value CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
    default_value CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>legal_values</SPAN
>legal_values</SPAN
> property imposes a constraint on the possible
> property imposes a constraint on the possible
values of the data part of an option. Hence it is only applicable to
values of the data part of an option. Hence it is only applicable to
options with the <TT
options with the <TT
CLASS="LITERAL"
CLASS="LITERAL"
>data</TT
>data</TT
> or
> or
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>booldata</TT
>booldata</TT
> flavors. It cannot be used for a package
> flavors. It cannot be used for a package
since the only valid value for a package is its version number. The
since the only valid value for a package is its version number. The
arguments to the <SPAN
arguments to the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>legal_values</SPAN
>legal_values</SPAN
> property should constitute a <A
> property should constitute a <A
HREF="language.values.html#LANGUAGE.LIST-EXPRESSION"
HREF="language.values.html#LANGUAGE.LIST-EXPRESSION"
><SPAN
><SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> list expression</A
> list expression</A
>.</P
>.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
>cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
    display       "Default Standard Time offset"
    display       "Default Standard Time offset"
    flavor        data
    flavor        data
    legal_values  -- -90000 to 90000
    legal_values  -- -90000 to 90000
    default_value -- 0
    default_value -- 0
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>active_if</SPAN
>active_if</SPAN
> property does not relate directly to an option's
> property does not relate directly to an option's
value, but rather to its active state. Usually this is controlled via
value, but rather to its active state. Usually this is controlled via
the configuration hierarchy: if the
the configuration hierarchy: if the
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGPKG_LIBC_STDIO</TT
>CYGPKG_LIBC_STDIO</TT
> component is disabled then all
> component is disabled then all
options below it are inactive and do not have any consequences.
options below it are inactive and do not have any consequences.
In some cases the hierarchy does not provide sufficient control, for
In some cases the hierarchy does not provide sufficient control, for
example an option should only be active if two disjoint sets of
example an option should only be active if two disjoint sets of
conditions are satisfied: the hierarchy could be used for one of these
conditions are satisfied: the hierarchy could be used for one of these
conditions, and an additional <SPAN
conditions, and an additional <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>active_if</SPAN
>active_if</SPAN
> property could be used for
> property could be used for
the other one. The arguments to <SPAN
the other one. The arguments to <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>active_if</SPAN
>active_if</SPAN
> should constitute a
> should constitute a
<A
<A
HREF="language.values.html#LANGUAGE.GOAL-EXPRESSION"
HREF="language.values.html#LANGUAGE.GOAL-EXPRESSION"
><SPAN
><SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> goal expression</A
> goal expression</A
>.</P
>.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
># Do not provide extra semaphore debugging if there are no semaphores
># Do not provide extra semaphore debugging if there are no semaphores
cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM {
cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM {
    active_if CYGPKG_KERNEL_SYNCH
    active_if CYGPKG_KERNEL_SYNCH
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>implements</SPAN
>implements</SPAN
> property is related to the concept of <A
> property is related to the concept of <A
HREF="language.interface.html"
HREF="language.interface.html"
><SPAN
><SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> interfaces</A
> interfaces</A
>. If an option is
>. If an option is
active and enabled and it implements a particular interface then it
active and enabled and it implements a particular interface then it
contributes <TT
contributes <TT
CLASS="LITERAL"
CLASS="LITERAL"
>1</TT
>1</TT
> to that interface's value.</P
> to that interface's value.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_NET_EDB7XXX_ETH_DRIVERS {
>cdl_package CYGPKG_NET_EDB7XXX_ETH_DRIVERS {
    display       "Cirrus Logic ethernet driver"
    display       "Cirrus Logic ethernet driver"
    implements    CYGHWR_NET_DRIVERS
    implements    CYGHWR_NET_DRIVERS
    implements    CYGHWR_NET_DRIVER_ETH0
    implements    CYGHWR_NET_DRIVER_ETH0
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>requires</SPAN
>requires</SPAN
> property is used to impose constraints on the user's
> property is used to impose constraints on the user's
choices. For example it is unreasonable to expect the C library to
choices. For example it is unreasonable to expect the C library to
provide thread-safe implementations of certain functions if the
provide thread-safe implementations of certain functions if the
underlying kernel support has been disabled, or even if the kernel is
underlying kernel support has been disabled, or even if the kernel is
not being used at all.</P
not being used at all.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_option CYGSEM_LIBC_PER_THREAD_ERRNO {
>cdl_option CYGSEM_LIBC_PER_THREAD_ERRNO {
    display       "Per-thread errno"
    display       "Per-thread errno"
    doc           ref/ecos-ref.15.html
    doc           ref/ecos-ref.15.html
    requires      CYGVAR_KERNEL_THREADS_DATA
    requires      CYGVAR_KERNEL_THREADS_DATA
    default_value 1
    default_value 1
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The arguments to the <SPAN
>The arguments to the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>requires</SPAN
>requires</SPAN
> property should be a <A
> property should be a <A
HREF="language.values.html#LANGUAGE.GOAL-EXPRESSION"
HREF="language.values.html#LANGUAGE.GOAL-EXPRESSION"
><SPAN
><SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>CDL</SPAN
>CDL</SPAN
> goal expression</A
> goal expression</A
>.</P
>.</P
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="LANGUAGE.PROPERTIES.DEFINE">Generating the Configuration Header Files</H2
NAME="LANGUAGE.PROPERTIES.DEFINE">Generating the Configuration Header Files</H2
><P
><P
>When creating or updating a build tree the component framework will
>When creating or updating a build tree the component framework will
also generate configuration header files, one per package. By default
also generate configuration header files, one per package. By default
it will generate a <TT
it will generate a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>#define</TT
>#define</TT
> for each option,
> for each option,
component or interface that is active and enabled. For options with
component or interface that is active and enabled. For options with
the <TT
the <TT
CLASS="LITERAL"
CLASS="LITERAL"
>data</TT
>data</TT
> or <TT
> or <TT
CLASS="LITERAL"
CLASS="LITERAL"
>booldata</TT
>booldata</TT
> flavors the
> flavors the
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>#define</TT
>#define</TT
> will use the option's data part, otherwise
> will use the option's data part, otherwise
it will use the constant <TT
it will use the constant <TT
CLASS="LITERAL"
CLASS="LITERAL"
>1</TT
>1</TT
>. Typical output would
>. Typical output would
include:</P
include:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>#define CYGFUN_LIBC_TIME_POSIX 1
>#define CYGFUN_LIBC_TIME_POSIX 1
#define CYGNUM_LIBC_TIME_DST_DEFAULT_STATE -1</PRE
#define CYGNUM_LIBC_TIME_DST_DEFAULT_STATE -1</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>There are six properties which can be used to control the header file
>There are six properties which can be used to control the header file
generation process:
generation process:
<A
<A
HREF="ref.define-header.html"
HREF="ref.define-header.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_header</SPAN
>define_header</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.no-define.html"
HREF="ref.no-define.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>no_define</SPAN
>no_define</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.define-format.html"
HREF="ref.define-format.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_format</SPAN
>define_format</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.define.html"
HREF="ref.define.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define</SPAN
>define</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.if-define.html"
HREF="ref.if-define.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>if_define</SPAN
>if_define</SPAN
></A
></A
>, and
>, and
<A
<A
HREF="ref.define-proc.html"
HREF="ref.define-proc.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_proc</SPAN
>define_proc</SPAN
></A
></A
>.</P
>.</P
><P
><P
>By default the component framework will generate a configuration
>By default the component framework will generate a configuration
header file for each package based on the package's name: everything
header file for each package based on the package's name: everything
up to and including the first underscore is discarded, the rest of the
up to and including the first underscore is discarded, the rest of the
name is lower-cased, and a <TT
name is lower-cased, and a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>.h</TT
>.h</TT
> suffix is appended.
> suffix is appended.
For example the configuration header file for the kernel package
For example the configuration header file for the kernel package
<TT
<TT
CLASS="VARNAME"
CLASS="VARNAME"
>CYGPKG_KERNEL</TT
>CYGPKG_KERNEL</TT
> is <TT
> is <TT
CLASS="FILENAME"
CLASS="FILENAME"
>pkgconf/kernel.h</TT
>pkgconf/kernel.h</TT
>. The <SPAN
>. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_header</SPAN
>define_header</SPAN
>
>
property can be used to specify an alternative filename. This applies
property can be used to specify an alternative filename. This applies
to all the components and options within a package, so it can only be
to all the components and options within a package, so it can only be
used in the body of a <TT
used in the body of a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_package</TT
>cdl_package</TT
> command. For example the following
> command. For example the following
specifies that the configuration header file for the SPARClite HAL
specifies that the configuration header file for the SPARClite HAL
package is <TT
package is <TT
CLASS="FILENAME"
CLASS="FILENAME"
>pkgconf/hal_sparclite.h</TT
>pkgconf/hal_sparclite.h</TT
>.</P
>.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_HAL_SPARCLITE {
>cdl_package CYGPKG_HAL_SPARCLITE {
    display "SPARClite architecture"
    display "SPARClite architecture"
    parent        CYGPKG_HAL
    parent        CYGPKG_HAL
    hardware
    hardware
    define_header hal_sparclite.h
    define_header hal_sparclite.h
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><DIV
><DIV
CLASS="NOTE"
CLASS="NOTE"
><BLOCKQUOTE
><BLOCKQUOTE
CLASS="NOTE"
CLASS="NOTE"
><P
><P
><B
><B
>Note: </B
>Note: </B
>At present the main use for the <SPAN
>At present the main use for the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_header</SPAN
>define_header</SPAN
> property is related
> property is related
to hardware packages, see the <A
to hardware packages, see the <A
HREF="ref.hardware.html"
HREF="ref.hardware.html"
>reference
>reference
pages</A
pages</A
> for more details.</P
> for more details.</P
></BLOCKQUOTE
></BLOCKQUOTE
></DIV
></DIV
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>no_define</SPAN
>no_define</SPAN
> property is used to suppress the generation of the
> property is used to suppress the generation of the
default <TT
default <TT
CLASS="LITERAL"
CLASS="LITERAL"
>#define</TT
>#define</TT
>. This can be useful if an option's
>. This can be useful if an option's
consequences are all related to the build process or to constraints,
consequences are all related to the build process or to constraints,
and the option is never actually checked in any source code. It can
and the option is never actually checked in any source code. It can
also be useful in conjunction with the <SPAN
also be useful in conjunction with the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define</SPAN
>define</SPAN
>, <SPAN
>, <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>if_define</SPAN
>if_define</SPAN
> or
> or
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_proc</SPAN
>define_proc</SPAN
> properties. The <SPAN
> properties. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>no_define</SPAN
>no_define</SPAN
> property does not take any
> property does not take any
arguments. </P
arguments. </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_component CYG_HAL_STARTUP {
>cdl_component CYG_HAL_STARTUP {
    display       "Startup type"
    display       "Startup type"
    flavor        data
    flavor        data
    legal_values  { "RAM" "ROM" }
    legal_values  { "RAM" "ROM" }
    default_value {"RAM"}
    default_value {"RAM"}
    no_define
    no_define
    define -file system.h CYG_HAL_STARTUP
    define -file system.h CYG_HAL_STARTUP
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>This example also illustrates the <SPAN
>This example also illustrates the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define</SPAN
>define</SPAN
> property, which can be used
> property, which can be used
to generate a <TT
to generate a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>#define</TT
>#define</TT
> in addition to the default
> in addition to the default
one. It takes a single argument, the name of the symbol to be defined.
one. It takes a single argument, the name of the symbol to be defined.
It also takes options to control the configuration header file in
It also takes options to control the configuration header file in
which the symbol should be defined and the format to be used.</P
which the symbol should be defined and the format to be used.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_format</SPAN
>define_format</SPAN
> property can be used to control how the value part
> property can be used to control how the value part
of the default <TT
of the default <TT
CLASS="LITERAL"
CLASS="LITERAL"
>#define</TT
>#define</TT
> gets formatted. For example
> gets formatted. For example
a format string of  <TT
a format string of  <TT
CLASS="LITERAL"
CLASS="LITERAL"
>"0x%04x"</TT
>"0x%04x"</TT
> could be used to
> could be used to
generate a four-digit hexadecimal number. </P
generate a four-digit hexadecimal number. </P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>if_define</SPAN
>if_define</SPAN
> property is intended for use primarily to control
> property is intended for use primarily to control
assertions, tracing, and similar functionality. It supports a specific
assertions, tracing, and similar functionality. It supports a specific
implementation model for these, allowing control at the grain of
implementation model for these, allowing control at the grain of
packages or even individual source files. The <A
packages or even individual source files. The <A
HREF="ref.if-define.html"
HREF="ref.if-define.html"
>reference pages</A
>reference pages</A
> provide additional
> provide additional
information.</P
information.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>define_proc</SPAN
>define_proc</SPAN
> property provides an escape mechanism for those
> property provides an escape mechanism for those
cases where something special has to happen at configuration header
cases where something special has to happen at configuration header
file generation time. It takes a single argument, a fragment of <SPAN
file generation time. It takes a single argument, a fragment of <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>Tcl</SPAN
>Tcl</SPAN
>
>
code, which gets executed when the header file is generated. This code
code, which gets executed when the header file is generated. This code
can output arbitrary data to the header file, or perform any other
can output arbitrary data to the header file, or perform any other
actions that might be appropriate.</P
actions that might be appropriate.</P
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="LANGUAGE.PROPERTIES.BUILD">Controlling what gets Built</H2
NAME="LANGUAGE.PROPERTIES.BUILD">Controlling what gets Built</H2
><P
><P
>There are six properties which affect the build process:
>There are six properties which affect the build process:
<A
<A
HREF="ref.compile.html"
HREF="ref.compile.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.make.html"
HREF="ref.make.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.make-object.html"
HREF="ref.make-object.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make_object</SPAN
>make_object</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.library.html"
HREF="ref.library.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>library</SPAN
>library</SPAN
></A
></A
>,
>,
<A
<A
HREF="ref.include-dir.html"
HREF="ref.include-dir.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_dir</SPAN
>include_dir</SPAN
></A
></A
>, and
>, and
<A
<A
HREF="ref.include-files.html"
HREF="ref.include-files.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_files</SPAN
>include_files</SPAN
></A
></A
>.
>.
The last three apply to a package as a whole, and can only occur in
The last three apply to a package as a whole, and can only occur in
the body of a <TT
the body of a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_package</TT
>cdl_package</TT
> command.</P
> command.</P
><P
><P
>Most of the source files that go into a package should simply be
>Most of the source files that go into a package should simply be
compiled with the appropriate compiler, selected by the target
compiled with the appropriate compiler, selected by the target
architecture, and with the appropriate flags, with an additional set
architecture, and with the appropriate flags, with an additional set
defined by the target hardware and possible modifications on a
defined by the target hardware and possible modifications on a
per-package basis. The resulting object files will go into the library
per-package basis. The resulting object files will go into the library
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>libtarget.a</TT
>libtarget.a</TT
>, which can then be linked against
>, which can then be linked against
application code. The <SPAN
application code. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
> property is used to list these source
> property is used to list these source
files: </P
files: </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_ERROR {
>cdl_package CYGPKG_ERROR {
    display       "Common error code support"
    display       "Common error code support"
    compile       strerror.cxx
    compile       strerror.cxx
    include_dir   cyg/error
    include_dir   cyg/error
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The arguments to the <SPAN
>The arguments to the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
> property should be one or more source
> property should be one or more source
files. Typically most of the sources will be needed for the package as
files. Typically most of the sources will be needed for the package as
a whole, and hence they will be listed in one or more <SPAN
a whole, and hence they will be listed in one or more <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
>
>
properties in the body of the <TT
properties in the body of the <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_package</TT
>cdl_package</TT
>. Some sources may be
>. Some sources may be
specific to particular configuration options, in other words there is
specific to particular configuration options, in other words there is
no point in compiling them unless that option is enabled, in which
no point in compiling them unless that option is enabled, in which
case the sources should be listed in a <SPAN
case the sources should be listed in a <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
> property in the
> property in the
corresponding <TT
corresponding <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_option</TT
>cdl_option</TT
>, <TT
>, <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_component</TT
>cdl_component</TT
> or <TT
> or <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_interface</TT
>cdl_interface</TT
> body.</P
> body.</P
><P
><P
>Some packages may have more complicated build requirements, for
>Some packages may have more complicated build requirements, for
example they may involve a special target such as a linker script
example they may involve a special target such as a linker script
which should not end up in the usual library, or they may involve
which should not end up in the usual library, or they may involve
special build steps for generating an object file. The <SPAN
special build steps for generating an object file. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
> and
> and
<SPAN
<SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make_object</SPAN
>make_object</SPAN
> properties provide support for such requirements, for
> properties provide support for such requirements, for
example:</P
example:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_HAL_MN10300_AM33 {
>cdl_package CYGPKG_HAL_MN10300_AM33 {
    display       "MN10300 AM33 variant"
    display       "MN10300 AM33 variant"
    &#8230;
    &#8230;
    make {
    make {
        &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/mn10300_am33.ld
        &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/mn10300_am33.ld
        $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) \
        $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) \
            $(CFLAGS) -o $@ $&lt;
            $(CFLAGS) -o $@ $&lt;
        @echo $@ ": \\" &gt; $(notdir $@).deps
        @echo $@ ": \\" &gt; $(notdir $@).deps
        @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
        @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
        @echo &gt;&gt; $(notdir $@).deps
        @echo &gt;&gt; $(notdir $@).deps
        @rm target.tmp
        @rm target.tmp
    }
    }
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>For full details of custom build steps and the build process
>For full details of custom build steps and the build process
generally, see <A
generally, see <A
HREF="build.html"
HREF="build.html"
>Chapter 4</A
>Chapter 4</A
>.</P
>.</P
><P
><P
>By default all object files go into the library
>By default all object files go into the library
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>libtarget.a</TT
>libtarget.a</TT
>. It is possible to override this at
>. It is possible to override this at
the package level using the <SPAN
the package level using the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>library</SPAN
>library</SPAN
> property, but this should be
> property, but this should be
avoided since it complicates application development: instead of just
avoided since it complicates application development: instead of just
linking with a single library for all <SPAN
linking with a single library for all <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>eCos</SPAN
>eCos</SPAN
>-related packages, it
>-related packages, it
suddenly becomes necessary to link with several libraries.</P
suddenly becomes necessary to link with several libraries.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_dir</SPAN
>include_dir</SPAN
> and <SPAN
> and <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_files</SPAN
>include_files</SPAN
> properties relate to a package's
> properties relate to a package's
exported header files. By default a package's header files will be
exported header files. By default a package's header files will be
exported to the <TT
exported to the <TT
CLASS="FILENAME"
CLASS="FILENAME"
>install/include</TT
>install/include</TT
>
>
directory. This is the desired behavior for some packages like the C
directory. This is the desired behavior for some packages like the C
library, since headers like <TT
library, since headers like <TT
CLASS="FILENAME"
CLASS="FILENAME"
>stdio.h</TT
>stdio.h</TT
> should exist at that level.
> should exist at that level.
However if all header files were to end up in that directory then
However if all header files were to end up in that directory then
there would be a significant risk of a name clash. Instead it is
there would be a significant risk of a name clash. Instead it is
better for packages to specify some sub-directory for their exported
better for packages to specify some sub-directory for their exported
header files, for example:</P
header files, for example:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_INFRA {
>cdl_package CYGPKG_INFRA {
    display       "Infrastructure"
    display       "Infrastructure"
    include_dir   cyg/infra
    include_dir   cyg/infra
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>The various header files exported by the infrastructure, for example
>The various header files exported by the infrastructure, for example
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>cyg_ass.h</TT
>cyg_ass.h</TT
> and <TT
> and <TT
CLASS="FILENAME"
CLASS="FILENAME"
>cyg_trac.h</TT
>cyg_trac.h</TT
> will now end up in the
> will now end up in the
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>install/include/cyg/infra</TT
>install/include/cyg/infra</TT
>
>
sub-directory, where a name clash is very unlikely.</P
sub-directory, where a name clash is very unlikely.</P
><P
><P
>For packages which follow the <A
>For packages which follow the <A
HREF="package.html#PACKAGE.HIERARCHY"
HREF="package.html#PACKAGE.HIERARCHY"
>directory layout conventions</A
>directory layout conventions</A
> the
> the
component framework will assume that the package's
component framework will assume that the package's
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>include</TT
>include</TT
> sub-directory contains
> sub-directory contains
all exported header files. If this is not the case, for example
all exported header files. If this is not the case, for example
because the package is sufficiently simple that the layout convention
because the package is sufficiently simple that the layout convention
is inappropriate, then the exported header files can be listed
is inappropriate, then the exported header files can be listed
explicitly in an <SPAN
explicitly in an <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>include_files</SPAN
>include_files</SPAN
> property.</P
> property.</P
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="LANGUAGE.PROPERTIES.MISCELLANEOUS">Miscellaneous Properties</H2
NAME="LANGUAGE.PROPERTIES.MISCELLANEOUS">Miscellaneous Properties</H2
><P
><P
>The <A
>The <A
HREF="ref.hardware.html"
HREF="ref.hardware.html"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>hardware</SPAN
>hardware</SPAN
></A
></A
> property is
> property is
only relevant to packages. Some packages such as device drivers and
only relevant to packages. Some packages such as device drivers and
HAL packages are hardware-specific, and generally it makes no sense to
HAL packages are hardware-specific, and generally it makes no sense to
add such packages to a configuration unless the corresponding hardware
add such packages to a configuration unless the corresponding hardware
is present on your target system. Typically hardware package selection
is present on your target system. Typically hardware package selection
happens automatically when you select your target. The <SPAN
happens automatically when you select your target. The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>hardware</SPAN
>hardware</SPAN
>
>
property should be used to identify a hardware-specific package, and
property should be used to identify a hardware-specific package, and
does not take any arguments.</P
does not take any arguments.</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_HAL_MIPS {
>cdl_package CYGPKG_HAL_MIPS {
    display "MIPS architecture"
    display "MIPS architecture"
    parent        CYGPKG_HAL
    parent        CYGPKG_HAL
    hardware
    hardware
    include_dir   cyg/hal
    include_dir   cyg/hal
    define_header hal_mips.h
    define_header hal_mips.h
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>At present the <SPAN
>At present the <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>hardware</SPAN
>hardware</SPAN
> property is largely ignored by the component
> property is largely ignored by the component
framework. This may change in future releases.</P
framework. This may change in future releases.</P
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
SUMMARY="Footer navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="language.commands.html"
HREF="language.commands.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="cdl-guide.html"
HREF="cdl-guide.html"
ACCESSKEY="H"
ACCESSKEY="H"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="language.naming.html"
HREF="language.naming.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
>CDL Commands</TD
>CDL Commands</TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="language.html"
HREF="language.html"
ACCESSKEY="U"
ACCESSKEY="U"
>Up</A
>Up</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
>Option Naming Convention</TD
>Option Naming Convention</TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.