This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Fix for "ReferenceError: "trace" is not defined" in fc/edma3/package.xs

Other Parts Discussed in Thread: OMAP3530

FYI:  Here is a potential fix for the following build problem:

Context = Codec Engine 2.23.01 for Linux, XDCtools 3.10.03, CodeGen 6.1.8, building for OMAP3530, build crashes in examples/ti/sdo/fc/rman/examples/dmaXferScratch

======== .executables [examples/ti/sdo/fc/rman/examples/dmaXferScratch/] ========
configuring dmaXferScratch_3530.x64P from package/cfg/dmaXferScratch_3530_x64P.cfg ...
Using default memory setting for DDR2 in 3530
Auto register ti.sdo.fc.ires.edma3chan.EDMA3CHAN
Need to call RMAN_register explicitly for ti.sdo.fc.ires.bufres.BUFRES. Resource may not function correctly otherwise.
    will link with ti.sdo.fc.ires.edma3chan:lib/debug_trace/edma3Chan.a64P
js: "~/codec_engine-2_23_01/cetools/packages/ti/sdo/fc/edma3/package.xs", line 445: ReferenceError: "trace" is not defined. (~/codec_engine-2_23_01/cetools/packages/ti/sdo/fc/edma3/package.xs#445)
gmake[1]: *** [package/cfg/dmaXferScratch_3530_x64P.xdl] Error 1
gmake[1]: *** Deleting file `package/cfg/dmaXferScratch_3530_x64P.xdl'
gmake[1]: *** [package/cfg/dmaXferScratch_3530_x64P.xdl] Deleting file `package/cfg/dmaXferScratch_3530_x64P.h'
gmake[1]: *** [package/cfg/dmaXferScratch_3530_x64P.xdl] Deleting file `package/cfg/dmaXferScratch_3530_x64P.c'
gmake[1]: *** [package/cfg/dmaXferScratch_3530_x64P.xdl] Deleting file `package/cfg/dmaXferScratch_3530_x64Pcfg.cmd'
gmake[1]: *** [package/cfg/dmaXferScratch_3530_x64P.xdl] Deleting file `package/cfg/dmaXferScratch_3530_x64Pcfg_c.c'
gmake[1]: *** [package/cfg/dmaXferScratch_3530_x64P.xdl] Deleting file `package/cfg/dmaXferScratch_3530_x64Pcfg.s62'
gmake: *** [examples/ti/sdo/fc/rman/examples/dmaXferScratch/,.executables] Error 2

Looking into fc/edma3/package.xs:

if (!java.io.File(this.packageBase + dir + "/" + libs).exists()) {

    trace(this.$name + ": Requested profile '" + this.profile + "' does"
                + " not exist.\n\tDefaulting to the 'release' profile");

    dir = "lib/release";
}

The superficial problem is that the trace() function is not defined for this file.  A superficial fix is to change "trace" to "print".  I suspect there may be a better way (to get the trace function used everywhere else -- and I'd love to hear about such a fix), but this band aid allowed me to move on to building other examples.  -Dirk