This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: CDL question
- To: tadams at extremeeng dot com
- Subject: Re: [ECOS] CDL question
- From: Bart Veer <bartv at redhat dot com>
- Date: Thu, 23 Aug 2001 18:39:25 +0100
- Cc: ecos-discuss at sourceware dot cygnus dot com
- References: <000001c12bf8$8b2b5080$090110ac@TRENT>
- Reply-To: bartv at redhat dot com
>>>>> "Trenton" == Trenton D Adams <tadams@extremeeng.com> writes:
Trenton> Is the following
Trenton> define_proc {__DEVICE_NAME "eth1"}
Trenton> the same as
Trenton> #define __DEVICE_NAME "eth1"
Trenton> ???
No.
define_proc provides a fragment of Tcl code which can be used to put
arbitrary text into a header file. The "proc" bit stands for
procedure, and "proc" also happens to be the standard Tcl command for
defining a new command.
What would happen in this case is that a Tcl interpreter running
inside the configuration tools would attempt to execute the Tcl
command __DEVICE_NAME with a single argument, eth1. Since there is no
such Tcl command that is not going to work very well.
Instead you can use something like:
define_proc {
puts $cdl_header "#define __DEVICE_NAME \"eth1\""
}
using the Tcl "puts" command with appropriate arguments. See
http://sources.redhat.com/ecos/docs-latest/cdl/ref.define-proc.html
and the Component Writer's Guide generally for more details.
Bart