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.

[OMAPL137] codec engine undefineds

Other Parts Discussed in Thread: OMAP-L137

I am using OMAP-L137. I have transferred my codec library and my main and other .c and .h files from my Windows box to my Linux box. I have run genpackage and genserver. Then I edited the main.c file. I finally have the compilation completing, but the link fails with undefineds. The .c files are there, but I think they are not included in the link. How would I add additional .c file (other than main, which seems to be there) to the build?

I can not find a Makefile that doesn't say "don't edit this". I would have expected to add files in the genserver run, but that wasn't an option. It seems unreasonable to have to paste all of my code into main.c, but I suppose that is a fallback position.

 

  • In the generated server package, look at the package build script (package.bld). You should see something like:

        Pkg.addExecutable( serverName, targ, "ti.platforms.evmOMAPL137",
            {
                tcopts: "-Dxdc.cfg.check.fatal=false",
                cfgScript: "server.tcf",
                profile:  arguments[0],
                lopts: "-l link.cmd",
            }).
            addObjects( [
                "main.c",
            ] );

    Here the addObjects just means "array of source files needed to be compiled into objects used when linking this executable".


    Similar to this would be found in the codec package where source files can be added to the library via something like:

    var SRCS = [
            "fir_ti.c",
            "fir_ti_filter.c",
            "fir_ti_ialg.c",
            "fir_ti_vt.c",
            "fir_ti_xdm.c",
    ];

    for (var i = 0; i < Build.targets.length; i++) {
        var targ = Build.targets[i];
        Pkg.addLibrary("lib/fir_ti",targ, {
            suffix: ".l" + targ.suffix}).addObjects(SRCS);
    }