public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] CDL question
@ 2006-08-01  2:37 Grant Edwards
  2006-08-01 16:27 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Grant Edwards @ 2006-08-01  2:37 UTC (permalink / raw)
  To: eCos Discussion

I've read through the CDL sections of the component developer's
guide, but I can't figure out what the command is to set a data
flavored option to an expression involving it's default value
or it's current value.

Assume I've got an ecos.ecc file that I generated via an
"ecosconfig new whatever" command.  Now I want to change the
value of CYGBLD_GLOBAL_CFLAGS (which has its default value) to
add "-DFooBar".  This needs to be done in a shell script so
that I can automate the entire build process.  Usually when I
need to make automated changes to ecos.ecc I create a .cdl file
and import it like this:

   cat >.tmp$$.cdl <<EOF
   cdl_option CYGBLD_BUILD_REDBOOT_WITH_GDB {user_value 0}
   cdl_option CYGBLD_BUILD_REDBOOT_WITH_ZLIB {user_value 0}
   EOF
   ecosconfig import .tmp$$.cdl

However, I can't figure out what the TCL expression is for "the
current value of option CYG_WHATEVER".  I thought perhaps something like
   
   option CYGBLD_GLOBAL_CFLAGS {user_value "$CYGBLD_GLOBAL_CFLAGS -DFooBar"}

But that doesn't work.  I'm sure it's something obvious, but
I've never been able to grok TCL no matter how hard I try...

-- 
Grant Edwards
grante@visi.com



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [ECOS] CDL question
@ 2009-06-06 14:01 Sergei Gavrikov
  2009-06-06 15:17 ` [ECOS] " John Dallaway
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Gavrikov @ 2009-06-06 14:01 UTC (permalink / raw)
  To: eCos discuss list

Hello

I'm trying to join a few HALs for almost the same boards in a single HAL
package. The boards have the same CPU and RAM, but they differ by the
FLASH parts and LAN controllers. I had an idea to select one target name
and then to select the kind of the hardware using the CDL validators:
is_substr, is_active.

It works fine, but, now I want evaluate `legal_values' list, and I found
that I cannot manage it like `default_value' or `calculated' things.  Is
it possible evaluate legal_values list? First, I think that I will can
manage the issue using quotes instead brackets, but that did not work
with the list. Well, it is possible to solve a puzzle using a few CDL
options, but, a question is, Is it possible to solve the puzzle inside
one component using no extra options and just using the expression for
`legal_values' list?

What I try to do using CDL expressions

if {board == A} {
	default_value A
	legal_values {A B C}
} else if {board == B} {
	default_value X
	legal_values {X Y Z}
}

and using in two-lines coding I could get only, for example,

	default_value B
	legal_values {A B C X Y Z}

Thanks for any comments on it.

Sergei

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-06-07 10:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-01  2:37 [ECOS] CDL question Grant Edwards
2006-08-01 16:27 ` Andrew Lunn
2006-08-01 18:08   ` [ECOS] " Grant Edwards
2009-06-06 14:01 [ECOS] " Sergei Gavrikov
2009-06-06 15:17 ` [ECOS] " John Dallaway
2009-06-06 17:47   ` Sergei Gavrikov
2009-06-07 10:04     ` Sergei Gavrikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).