[ECOS] CDL question
Bart Veer
bartv@redhat.com
Thu Aug 23 10:39:00 GMT 2001
>>>>> "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
More information about the Ecos-discuss
mailing list