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.

Link errors encountered when I use System_printf

Hi Shreyas,

I'm compiling the scale(/usr/local/dvsdk/codec-engine_2_26_02_11/examples/ti/sdo/ce/examples/codecs/scale) example application in my DVSDK Linux development kit. And then I add System_printf lines to scale_ti_impl.c file.

And errors encountered during linking, log as follows:

undefined                                                      first referenced
symbol                                                            in file
---------                                                             ----------------
___xdc__init                                                      package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_Core_assignLabel__I           package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_Core_createObject__I          package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_Core_deleteObject__I          package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_Error_check__F                     package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_HeapStd_Instance_init__F  package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_HeapStd_alloc__F                package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_HeapStd_free__F                  package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_HeapStd_getStats__F           package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_HeapStd_isBlocking__F       package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674
_xdc_runtime_System_printf_va__F            package/cfg/bin/ti_platforms_evmOMAPL138/all_x674.o674

error: unresolved symbols remain
error: errors encountered during linking;

Attached are my scale_ti_impl.c(ti/sdo/ce/examples/codecs/scale directory)

1856.scale_ti_impl.c

and all.cfg file(located in the ti/sdo/ce/examples/servers/all_codecs directory) .

4807.all.cfg

what shall I do?

  • Buga tti,

    I went ahead and split this post off into a new thread.  In general, it's best not to append your question to an old thread, as it decreases the chance of getting an answer, and it will be harder for others to search for it.

  • Hi Buga,

    In order to use System_printf(), you need to bring in the rts library. To do so, comment out the line that sets rtsName to null in the server's package.bld file:

    Pkg.addExecutable(name, targ, platform,
    {
        cfgScript: serverName + ".tcf", 
        cfgArgs: "{ platform: \"" + platform + "\" }",
        lopts: "-l link.cmd",
        // rtsName: null   /* comment this out */
    }
    ).addObjects(["main.c"]);

    Keep in mind that XDAIS-compliant algorithms/codecs are not supposed to call System_printf - it is a direct violation of Rule 9 in the XDAIS specifications. (It is fine if you are simply doing this temporarily in a debug session).

    Best regards,

    Vincent

  • Hi Vincent,

    I appreciate your help.

    So I do some modifiers as suggested, and it now is compiled properly. But I still got noting output of System_printf.

    Did I miss some steps?

  • Hi Buga,

    I see that you are using SysMin. Did you look under Viewable Modules->SysMin->OutputBuffer tab in the ROV to see if there is any output?

    Best regards,

    -Vincent

  • Hi Vincent,

    Sorry for not replying sooner. I don't really know what you mean. I just compiled the SCALE example of codec engine

    and ran my app on omapl138-evm board. Then got noting output of System_printf.

    Attached are my SysMin's files if you need.

    5417.SysMin.zip

    Best regards,

    Buga

  • Hi Buga,

    Do you have CCS setup with JTAG access to your device? If you do, you can run your application/example, then attach to the DSP using CCS: http://processors.wiki.ti.com/index.php/Debugging_the_DSP_side_of_a_CE_application_using_CCS

    If you are using CCS v5, select Tools->ROV from the menu bar.  Then look under Viewable Modules->SysMin->OutputBuffer to see the output from SysMin.

    Alternatively, you can check out the content of the SysMin log buffer in the Memory Window. Simply look up the address of the symbol xdc_runtime_SysMin_Module_State_0_outbuf__A.

    Or, if you want the output of System_printf() to directly go to the Console, you can change the configuration .cfg file to use SysStd as support proxy:

    var SysStd = xdc.useModule('xdc.runtime.SysStd');

    System.SupportProxy = SysStd;

    This adds a bit of overhead, but may be more convenient to use in some debug sessions.

    Best regards,

    Vincent