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

Bart Veer bartv@ecoscentric.com
Wed Oct 25 21:58:00 GMT 2006


>>>>> "Dan" == Dan Jakubiec <dan.jakubiec@systech.com> writes:

    Dan> I'm in the process of trying to upgrade our eCos sources to a
    Dan> more recent version (snapshot from 2006-10-18). After merging
    Dan> in all the changes and attempting to create an ECC file via
    Dan> ecosconfig, I'm running into the follow errors:

    Dan>     C CYGPKG_NET_MEMPOOL_SIZE, CYGPKG_NET_MEMPOOL_SIZE, property
    Dan>     DefaultValue
    Dan>       Error while evaluation expression: Attempt to divide non-numerical
    Dan>     values: `3*1024*1024' / `4'.
    Dan>       Expression: CYGPKG_NET_MEM_USAGE/4

    <snip>

    Dan> Here is some of the pertinent CDL:

    Dan>         cdl_option CYGPKG_NET_MEM_USAGE {
    Dan>             ...
    Dan>             default_value (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)
    Dan>             ...
    Dan>         }

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

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
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