[ECOS] CDL error: "Attempt to divide non-numerical values"

Dan Jakubiec dan.jakubiec@systech.com
Wed Oct 25 22:05:00 GMT 2006

Awesome, thanks Bart.  I tried the constant value and that worked.  I 
will experiment with the TCL expressions you described.

Note that this was working until I updated my CDL files.  I guess that 
the '3*1024*1024' works fine (as a string) until you tell CDL to treat 
it like a number.  In this case, I imported updates which tried to do 
"CYGPKG_NET_MEM_USAGE/4" and that led to the broken config.  All is 
clear now.

Thanks for the help.

-- Dan

Bart Veer wrote:
> Clearly the default value does not match the 3*1024*1024 reported in
> the conflict. I suspect you have changed the value of
> CYGPKG_NET_MEM_USAGE in your configuration, and instead of specifying
> an absolute value 0x300000 you have typed in an expression
> 3*1024*1024. libcdl does not do expression parsing when reading in a
> saved configuration file so that expression is being treated as a
> string rather than a number, hence the conflict.
> If you are editing ecos.ecc by hand and really want to specify an
> expression you can exploit the fact that a .ecc savefile is also a Tcl
> script and specify:
>   cdl_option CYGPKG_NET_MEM_USAGE {
>       # Flavor: data
>       user_value [expr 3 * 1024 * 1024]
>       ...
>   }
> However whenever an updated savefile is written out that expression
> will be replaced by the numerical value.
> Bart

Dan Jakubiec
Systech Corporation

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

More information about the Ecos-discuss mailing list