예제 #1
0
 void $$SINGLETONS() {
   pkgP.init(
       "host.platforms.SUN.Package",
       (Proto.Obj) om.findStrict("xdc.IPackage.Module", "host.platforms.SUN"));
   Scriptable cap =
       (Scriptable) Global.callFxn("loadCapsule", xdcO, "host/platforms/SUN/package.xs");
   om.bind("xdc.IPackage$$capsule", cap);
   Object fxn;
   fxn = Global.get(cap, "init");
   if (fxn != null)
     pkgP.addFxn(
         "init", (Proto.Fxn) om.findStrict("xdc.IPackage$$init", "host.platforms.SUN"), fxn);
   fxn = Global.get(cap, "close");
   if (fxn != null)
     pkgP.addFxn(
         "close", (Proto.Fxn) om.findStrict("xdc.IPackage$$close", "host.platforms.SUN"), fxn);
   fxn = Global.get(cap, "validate");
   if (fxn != null)
     pkgP.addFxn(
         "validate",
         (Proto.Fxn) om.findStrict("xdc.IPackage$$validate", "host.platforms.SUN"),
         fxn);
   fxn = Global.get(cap, "exit");
   if (fxn != null)
     pkgP.addFxn(
         "exit", (Proto.Fxn) om.findStrict("xdc.IPackage$$exit", "host.platforms.SUN"), fxn);
   fxn = Global.get(cap, "getLibs");
   if (fxn != null)
     pkgP.addFxn(
         "getLibs", (Proto.Fxn) om.findStrict("xdc.IPackage$$getLibs", "host.platforms.SUN"), fxn);
   fxn = Global.get(cap, "getSects");
   if (fxn != null)
     pkgP.addFxn(
         "getSects",
         (Proto.Fxn) om.findStrict("xdc.IPackage$$getSects", "host.platforms.SUN"),
         fxn);
   pkgP.bind("$capsule", cap);
   pkgV.init2(pkgP, "host.platforms.SUN", Value.DEFAULT, false);
   pkgV.bind("$name", "host.platforms.SUN");
   pkgV.bind("$category", "Package");
   pkgV.bind("$$qn", "host.platforms.SUN.");
   pkgV.bind("$vers", Global.newArray("1, 0, 0, 1"));
   Value.Map atmap = (Value.Map) pkgV.getv("$attr");
   atmap.seal("length");
   imports.clear();
   imports.add(Global.newArray("xdc.platform", Global.newArray()));
   pkgV.bind("$imports", imports);
   StringBuilder sb = new StringBuilder();
   sb.append("var pkg = xdc.om['host.platforms.SUN'];\n");
   sb.append("if (pkg.$vers.length >= 3) {\n");
   sb.append("pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));\n");
   sb.append("}\n");
   sb.append("pkg.build.libraries = [\n");
   sb.append("];\n");
   sb.append("pkg.build.libDesc = [\n");
   sb.append("];\n");
   sb.append("if('suffix' in xdc.om['xdc.IPackage$$LibDesc']) {\n");
   sb.append("}\n");
   Global.eval(sb.toString());
 }
예제 #2
0
 void $$SINGLETONS() {
   pkgP.init(
       "ti.platforms.evm6424.Package",
       (Proto.Obj) om.findStrict("xdc.IPackage.Module", "ti.platforms.evm6424"));
   pkgP.bind("$capsule", $$UNDEF);
   pkgV.init2(pkgP, "ti.platforms.evm6424", Value.DEFAULT, false);
   pkgV.bind("$name", "ti.platforms.evm6424");
   pkgV.bind("$category", "Package");
   pkgV.bind("$$qn", "ti.platforms.evm6424.");
   pkgV.bind("$vers", Global.newArray("1, 0, 0, 0"));
   Value.Map atmap = (Value.Map) pkgV.getv("$attr");
   atmap.seal("length");
   imports.clear();
   imports.add(Global.newArray("ti.catalog.c6000", Global.newArray()));
   imports.add(Global.newArray("xdc.platform", Global.newArray(1, 0, 1)));
   pkgV.bind("$imports", imports);
   StringBuilder sb = new StringBuilder();
   sb.append("var pkg = xdc.om['ti.platforms.evm6424'];\n");
   sb.append("if (pkg.$vers.length >= 3) {\n");
   sb.append("pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));\n");
   sb.append("}\n");
   sb.append("pkg.build.libraries = [\n");
   sb.append("];\n");
   sb.append("pkg.build.libDesc = [\n");
   sb.append("];\n");
   sb.append("if('suffix' in xdc.om['xdc.IPackage$$LibDesc']) {\n");
   sb.append("}\n");
   Global.eval(sb.toString());
 }
예제 #3
0
  void Platform$$SINGLETONS() {
    Proto.Obj po;
    Value.Obj vo;

    vo = (Value.Obj) om.findStrict("ti.platforms.evm6424.Platform", "ti.platforms.evm6424");
    po = (Proto.Obj) om.findStrict("ti.platforms.evm6424.Platform.Module", "ti.platforms.evm6424");
    vo.init2(po, "ti.platforms.evm6424.Platform", $$DEFAULT, false);
    vo.bind("Module", po);
    vo.bind("$category", "Module");
    vo.bind(
        "$capsule",
        om.findStrict("ti.platforms.evm6424.Platform$$capsule", "ti.platforms.evm6424"));
    vo.bind(
        "Instance",
        om.findStrict("ti.platforms.evm6424.Platform.Instance", "ti.platforms.evm6424"));
    vo.bind(
        "Params", om.findStrict("ti.platforms.evm6424.Platform.Params", "ti.platforms.evm6424"));
    vo.bind(
        "PARAMS",
        ((Proto.Str) om.findStrict("ti.platforms.evm6424.Platform.Params", "ti.platforms.evm6424"))
            .newInstance());
    vo.bind("$package", om.findStrict("ti.platforms.evm6424", "ti.platforms.evm6424"));
    tdefs.clear();
    proxies.clear();
    mcfgs.clear();
    vo.bind("Board", om.findStrict("xdc.platform.IPlatform.Board", "ti.platforms.evm6424"));
    tdefs.add(om.findStrict("xdc.platform.IPlatform.Board", "ti.platforms.evm6424"));
    vo.bind("Memory", om.findStrict("xdc.platform.IPlatform.Memory", "ti.platforms.evm6424"));
    tdefs.add(om.findStrict("xdc.platform.IPlatform.Memory", "ti.platforms.evm6424"));
    vo.bind("MemoryMap", om.findStrict("xdc.platform.IPlatform.MemoryMap", "ti.platforms.evm6424"));
    vo.bind("$$tdefs", Global.newArray(tdefs.toArray()));
    vo.bind("$$proxies", Global.newArray(proxies.toArray()));
    vo.bind("$$mcfgs", Global.newArray(mcfgs.toArray()));
    ((Value.Arr) pkgV.getv("$modules")).add(vo);
    ((Value.Arr) om.findStrict("$modules", "ti.platforms.evm6424")).add(vo);
    vo.bind("$$instflag", 1);
    vo.bind("$$iobjflag", 1);
    vo.bind("$$sizeflag", 1);
    vo.bind("$$dlgflag", 0);
    vo.bind("$$iflag", 1);
    vo.bind("$$romcfgs", "|");
    Proto.Str ps = (Proto.Str) vo.find("Module_State");
    if (ps != null) vo.bind("$object", ps.newInstance());
    vo.bind(
        "$$meta_iobj", om.has("ti.platforms.evm6424.Platform$$instance$static$init", null) ? 1 : 0);
    vo.bind("$$fxntab", Global.newArray());
    vo.bind("$$logEvtCfgs", Global.newArray());
    vo.bind("$$errorDescCfgs", Global.newArray());
    vo.bind("$$assertDescCfgs", Global.newArray());
    Value.Map atmap = (Value.Map) vo.getv("$attr");
    atmap.seal("length");
    vo.bind(
        "Object", om.findStrict("ti.platforms.evm6424.Platform.Object", "ti.platforms.evm6424"));
    pkgV.bind("Platform", vo);
    ((Value.Arr) pkgV.getv("$unitNames")).add("Platform");
  }
  void G711DEC$$SINGLETONS() {
    Proto.Obj po;
    Value.Obj vo;

    vo =
        (Value.Obj)
            om.findStrict(
                "ti.sdo.ce.examples.codecs.g711.G711DEC", "ti.sdo.ce.examples.codecs.g711");
    po =
        (Proto.Obj)
            om.findStrict(
                "ti.sdo.ce.examples.codecs.g711.G711DEC.Module", "ti.sdo.ce.examples.codecs.g711");
    vo.init2(po, "ti.sdo.ce.examples.codecs.g711.G711DEC", $$DEFAULT, false);
    vo.bind("Module", po);
    vo.bind("$category", "Module");
    vo.bind(
        "$capsule",
        om.findStrict(
            "ti.sdo.ce.examples.codecs.g711.G711DEC$$capsule", "ti.sdo.ce.examples.codecs.g711"));
    vo.bind(
        "$package",
        om.findStrict("ti.sdo.ce.examples.codecs.g711", "ti.sdo.ce.examples.codecs.g711"));
    tdefs.clear();
    proxies.clear();
    mcfgs.clear();
    vo.bind("$$tdefs", Global.newArray(tdefs.toArray()));
    vo.bind("$$proxies", Global.newArray(proxies.toArray()));
    vo.bind("$$mcfgs", Global.newArray(mcfgs.toArray()));
    ((Value.Arr) pkgV.getv("$modules")).add(vo);
    ((Value.Arr) om.findStrict("$modules", "ti.sdo.ce.examples.codecs.g711")).add(vo);
    vo.bind("$$instflag", 0);
    vo.bind("$$iobjflag", 1);
    vo.bind("$$sizeflag", 1);
    vo.bind("$$dlgflag", 0);
    vo.bind("$$iflag", 1);
    vo.bind("$$romcfgs", "|");
    Proto.Str ps = (Proto.Str) vo.find("Module_State");
    if (ps != null) vo.bind("$object", ps.newInstance());
    vo.bind(
        "$$meta_iobj",
        om.has("ti.sdo.ce.examples.codecs.g711.G711DEC$$instance$static$init", null) ? 1 : 0);
    vo.bind("$$fxntab", Global.newArray());
    vo.bind("$$logEvtCfgs", Global.newArray());
    vo.bind("$$errorDescCfgs", Global.newArray());
    vo.bind("$$assertDescCfgs", Global.newArray());
    Value.Map atmap = (Value.Map) vo.getv("$attr");
    atmap.seal("length");
    pkgV.bind("G711DEC", vo);
    ((Value.Arr) pkgV.getv("$unitNames")).add("G711DEC");
  }