1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
22 TITLE="CDL Language Specification"
23 HREF="reference.html"><LINK
26 HREF="ref.cdl-option.html"><LINK
29 HREF="ref.cdl-package.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
60 HREF="ref.cdl-option.html"
74 HREF="ref.cdl-package.html"
85 NAME="REF.CDL-COMPONENT"><TT
99 > -- Define a component, a collection of configuration options</DIV
101 CLASS="REFSYNOPSISDIV"
113 >cdl_component <name> {
128 >A component is a configuration option that can contain additional
129 options and sub-components. The body of a <TT
133 the same properties as that of a <TT
136 >. There is an additional
140 > which allows configuration data to be split into
141 multiple files. It is also possible for a component body to include
151 > entities that should
152 go below this component in the configuration hierarchy.</P
157 > is implemented as a Tcl command that takes two
158 arguments, a name and a body. The name must be a valid C preprocessor
159 identifier: a sequence of upper or lower case letters, digits or
160 underscores, starting with a non-digit character; identifiers
161 beginning with an underscore should normally be avoided because they
162 may clash with system packages or with identifiers reserved for use by
163 the compiler. Within a single configuration, names must be unique. If
164 a configuration contained two packages which defined the same entity
167 >CYGIMP_SOME_OPTION</TT
168 >, any references to that entity
172 > property or any other expression would be ambiguous.
173 It is possible for a given name to be used by two different packages
174 if those packages should never be loaded into a single configuration.
175 For example, architectural HAL packages are allowed to re-use certain
176 names because a single configuration cannot target two different
177 architectures. For a recommended naming convention see <A
178 HREF="package.contents.html"
179 >the Section called <I
180 >Package Contents and Layout</I
184 >The second argument to <TT
187 > is a body of properties and
188 other commands, typically surrounded by braces so that the Tcl
189 interpreter treats it as a single argument. This body will be
190 processed by a recursive invocation of the Tcl interpreter, extended
191 with additional commands for the various properties that are allowed
195 >. The valid commands are:</P
203 HREF="ref.active-if.html"
211 >Allow additional control over the active state of this component.</P
215 HREF="ref.calculated.html"
223 >The component's value is not directly user-modifiable, it is calculated
224 using a suitable CDL expression.</P
228 HREF="ref.cdl-component.html"
236 >Define a sub-component.</P
240 HREF="ref.cdl-interface.html"
248 >Define an interface which should appear immediately below this
249 component in the configuration hierarchy.</P
253 HREF="ref.cdl-option.html"
261 >Define a configuration option which should appear immediately below
262 this component in the configuration hierarchy.</P
266 HREF="ref.compile.html"
274 >List the source files that should be built if this component is active
279 HREF="ref.default-value.html"
287 >Provide a default value for this component using a CDL expression.</P
291 HREF="ref.define.html"
299 >Specify additional <TT
302 > symbols that should go
303 into the owning package's configuration header file.</P
307 HREF="ref.define-format.html"
315 >Control how the component's value will appear in the configuration header
320 HREF="ref.define-proc.html"
328 >Use a fragment of Tcl code to output additional data to
329 configuration header files.</P
333 HREF="ref.description.html"
341 >Provide a textual description for this component.</P
345 HREF="ref.display.html"
353 >Provide a short string describing this component.</P
365 >The location of on-line documentation for this component.</P
369 HREF="ref.flavor.html"
377 >Specify the nature of this component.</P
381 HREF="ref.if-define.html"
389 >Output a common preprocessor construct to a configuration header file. </P
393 HREF="ref.implements.html"
401 >Enabling this component provides one instance of a more general
406 HREF="ref.legal-values.html"
414 >Impose constraints on the possible values for this component.</P
426 >An additional custom build step associated with this component, resulting
427 in a target that should not go directly into a library.</P
431 HREF="ref.make-object.html"
439 >An additional custom build step associated with this component, resulting
440 in an object file that should go into a library.</P
444 HREF="ref.no-define.html"
452 >Suppress the normal generation of a preprocessor
456 > symbol in a configuration header file.</P
460 HREF="ref.parent.html"
468 >Control the location of this component in the configuration hierarchy. </P
472 HREF="ref.requires.html"
480 >List constraints that the configuration should satisfy if this component is
481 active and enabled.</P
485 HREF="ref.script.html"
493 >Include additional configuration information from another
514 CLASS="PROGRAMLISTING"
515 >cdl_component CYGDBG_USE_ASSERTS {
516 display "Use asserts"
519 If this component is enabled, assertions in the code are
520 tested at run-time. Assert functions (CYG_ASSERT()) are
521 defined in 'include/cyg/infra/cyg_ass.h' within the 'install'
522 tree. If the component is disabled, these result in no
523 additional object code and no checking of the asserted
541 HREF="ref.cdl-option.html"
548 HREF="ref.cdl-package.html"
555 HREF="ref.cdl-interface.html"
567 SUMMARY="Footer navigation table"
578 HREF="ref.cdl-option.html"
587 HREF="cdl-guide.html"
596 HREF="ref.cdl-package.html"
615 HREF="reference.html"