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.

Build codec with DSPLIB in CCS5.5 failed

Other Parts Discussed in Thread: MATHLIB, SYSBIOS

Hi,

I use XDM GenAlg tools to create a codec project. I use the DSPLIB to do autocorrelation in my code. I include the "ti/dsplib/dsplib.h" in my program. When I build the project I get the following error:

"cod_ld8a.c", line 53: fatal error: could not open source file "ti/dsplib/dsplib.h"

I set the include path and lib path in the project property, the following pictures show what I set.

I also check the package.bld file and do not know how to solve the problem. Could someone know that?

Thanks in advance! Appreciate for your reply!

  • Hi,

    "cod_ld8a.c", line 53: fatal error: could not open source file "ti/dsplib/dsplib.h"

    From the 1st picture,

    I hope that you installed the DSP libraries,

    Provide this path "<CCS_install_path>/dsplib_c66x_3_1_0_0/inc" for DSP libraries,

  • Hi Stalin,

    Thanks so much for your reply! I do installed the DSP lib "dsplib_c674x_3_2_0_1_Win32". "<CCS_install_path>/DDSPLIB" is my install path. I could not find the /inc folder.  Do you mean I should create "<CCS_install_path>/dsplib_c66x_3_1_0_0/incand install it in it?

  • The following picture shows the project explorer view. You could see that the "ti/dsplib/dsplib.h" is in the project's Includes folder.

  • Hi,

    "cod_ld8a.c", line 53: fatal error: could not open source file "ti/dsplib/dsplib.h"

    Can you please attach the screen shot the issue,

    Need to check what is the causing the error in line no:53!

    "<CCS_install_path>/DDSPLIB" is my install path. I could not find the /inc folder.  Do you mean I should create "<CCS_install_path>/dsplib_c66x_3_1_0_0/incand install it in it?

    No, I didn't create "inc" folder manually and it is available by default,

    If you added the library manually and then ensure that you have given with "-i" arg,

    Refer the following link,

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/212792.aspx

  • Hi Stalin,

    The following picture shows where the issue happens. The place to set include path in XDM project is different from that in CCS project. I set the Includes and Libraries in the Paths and Symbols option. The result is showed in the second picture.

  • Hi,

    Can you please try to add for include the "dsplib.h" file into your code,

    Locate your "dsplib.h" file in your PC,

    Ex:

    #include "F:\Titus_CCS\ti\dsplib_c674x_3_1_0_0\inc\dsplib.h"

  • Hi Stalin,

    I use the absolute path to reference “dsplib.h” and also modify the include path in the file dsplib.h all to absolute path. Now the project could be compiled. But when I use the QualiTi to check the builded lib. I get the following message:

    XDAIS Rules 8, 9, 10: Namespace compliance

    Report: Failed

    Test Description:

    (Rule 8) All external definitions must be either API identifiers or API and vendor prefixed.

    (Rule 9) All undefined references must refer either to the operations specified in Appendix B (a subset of C runtime support library functions and a subset of the DSP/BIOS HWI API functions), or TI's DSPLIB or IMGLIB functions or other XDAIS-compliant modules.

    (Rule 10) All modules must follow the eXpressDSP naming conventions for those external declarations disclosed to the client.

    Test Status Details:

    Problem: Not all external symbols declared by the module have the "_THU_" prefix (i.e. module_vendor_).

    The following is the list of offending symbols:
    DSPF_sp_autocor
    DSPF_sp_convol
    _c6xabi_divd
    _c6xabi_divf
    pow
    sqrt
    acos
    cos

    The DSPF_sp_autocor and DSPF_sp_convol are in the dsplib, the pow,sqrt,acos and cos are defined in math.h. I don't know if it means that the dsplib was not properly linked in the project.

  • Hi Bing liu,

    Thanks for your update.

    In addition to linking dsplib, you should also link MATHLIB to achieve the above mentioned higher level mathematical functions (cos, acos, sqrt, pow etc). if needed, you should also link run-time support library MATHLIB RTS. To know the difference, please see below:

    MATHLIB contains optimized versions of most floating-point math routines currently provided in existing run-time-support libraries.

    MATHLIB RTS override library contains floating-point math routines with same symbol names as in run-time-support library. These routines can be used to replace existing run-time-support library function calls.

    To download the above MATHLIB & MATHLIB RTS libraries for c674x, please check the below link:

    http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mathlib/latest/index_FDS.html

    After installing the above libraries, you should link the library path & include path in the project properties as below:

    ~\mathlib_c674x_3_0_2_0\lib\mathlib.a674

    ~\mathlib_c674x_3_0_2_0\lib\mathlib.ae674

    To include the header file,

    ~\mathlib_c674x_3_0_2_0\inc\mathlib.h

    Please ensure that you link both DSPLIB & MATHLIB in your project properties to utilize their functionality to the whole.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------
  • Hi Sivaraj,

    Thanks for your reply!

    I will check the MATHLIB and have a try.  In addition, how could I know if the DSPLIB and MATHLIB were correctly linked in my project ?

  • Hi Sivaraj,

    Now I want to integrate the g729aenc.ae674 to dvr_rdk_c6xdsp_debug_1024M_256M.xe674. Firstly I do "make rpe_all" and generate rpe.ae674 successfully. Then, I do make dvr_rdk to generate the firmware. The following error appares. It fails at the final stage.

    # Linking into /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_c6xdsp_debug_1024M_256M.xe674...
    #
    /bin/cp /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/MAIN_APP_c6xdsp_pe674.oe674 /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/dvr_rdk_configuro/package/cfg
    /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/cgt_dsp/cgt6x_7_3_5//bin/lnk6x --emit_warnings_as_errors --diag_warning=10063-D --display_error_number --warn_sections -q --silicon_version=6740 -c  --dynamic  -x --zero_init=off --retain=_Ipc_ResetVector     /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/main_c6xdsp.oe674 /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/MAIN_APP_c6xdsp_pe674.oe674 /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/dvr_rdk_configuro/linker_mod.cmd -o /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_c6xdsp_debug_1024M_256M.xe674 -m /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_c6xdsp_debug_1024M_256M.xe674.map -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/mcfw/src_bios6/lib/ti816x-evm/c6xdsp/debug/dvr_rdk_bios6.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/cgt_dsp/cgt6x_7_3_5//lib/rts6740_elf.lib -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/framework_components/framework_components_3_22_02_08_patched/packages/ti/sdo/fc/ecpy/lib/debug/ecpy.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/mcfw/src_bios6/alg/scd/lib/scd.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/mcfw/src_bios6/alg/va/lib/vlib.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/mcfw/src_bios6/alg/va/lib/analytics.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/rpe/remote-processor-execute/lib/lib/c674/debug/rpe.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/c674x_aaclcdec_01_41_00_00_elf/packages/ti/sdo/codecs/aaclcdec/lib/aacdec_tii_lc_elf.l64P -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/c674x_aaclcenc_01_00_01_00_elf_patched/packages/ti/sdo/codecs/aaclcenc/lib/mp4aacenc_tij_lc_elf.l67 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/naroah_g722enc/naroah/g722enc/lib/release/g722enc.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/naroah_g722dec/naroah/g722dec/lib/release/g722dec.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/naroah_yuvds/naroah/yuvds/lib/release/yuvds.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/thu_dctsq/thu/dctsq/lib/release/dctsq.ae674 -l/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/thu_g729/thu/g729aenc/lib/release/g729aenc.ae674 /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/mcfw/src_bios6/cfg/ti816x/link_algs.cmd

     undefined       first referenced                                                                                                        
      symbol             in file                                                                                                             
     ---------       ----------------                                                                                                        
     DSPF_sp_autocor /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/thu_g729/thu/g729aenc/lib/release/g729aenc.ae674<cod_ld8a.oe674>
     DSPF_sp_convol  /usr/local/DVRRDK_04.00.00.03/dvr_rdk/../ti_tools/codecs/thu_g729/thu/g729aenc/lib/release/g729aenc.ae674<cod_ld8a.oe674>

    error #10234-D: unresolved symbols remain
    warning #10063-D: entry-point symbol other than "_c_int00" specified:
       "ti_sysbios_family_c64p_Hwi0"
    error #10010: errors encountered during linking;
       "/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/bin/ti816x-e
       vm/dvr_rdk_c6xdsp_debug_1024M_256M.xe674" not built
    make[2]: *** [/usr/local/DVRRDK_04.00.00.03/dvr_rdk/../dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_c6xdsp_debug_1024M_256M.xe674] 错误 1
    make[2]:正在离开目录 `/usr/local/DVRRDK_04.00.00.03/dvr_rdk/mcfw/src_bios6/main_app'
    make[1]: *** [apps] 错误 2
    make[1]:正在离开目录 `/usr/local/DVRRDK_04.00.00.03/dvr_rdk/mcfw/src_bios6'
    make: *** [dvr_rdk_bios6] 错误 2

    It seems the dsplib has not been linked.  I already set the library path in CCS5 when generating g729aenc.ae674. But I am not sure if the dsplib was linked through the build info below.

    make all
    "D:/CCS5/xdctools_3_25_03_72/xdc" XDCOPTIONS= XDCARGS="CGTOOLS_C64P=\"D:/CCS5/ccsv5/tools/compiler/c6000_7.4.4\"  CGTOOLS_C674=\"D:/CCS5/ccsv5/tools/compiler/c6000_7.4.4\"" --xdcpath="D:/CCS5/xdais_7_21_01_07/packages" release
    cle674 g729aenc.c ...
    cle674 cod_ld8a.c ...
    archiving package/lib/lib/debug/g729aenc/package/package_thu.g729aenc.oe674 package/lib/lib/debug/g729aenc/g729aenc.oe674 package/lib/lib/debug/g729aenc/cod_ld8a.oe674 package/lib/lib/debug/g729aenc/qua_lsp.oe674 into lib/debug/g729aenc.ae674 ...
    cle674 g729aenc.c ...
    cle674 cod_ld8a.c ...
    archiving package/lib/lib/release/g729aenc/package/package_thu.g729aenc.oe674 package/lib/lib/release/g729aenc/g729aenc.oe674 package/lib/lib/release/g729aenc/cod_ld8a.oe674 package/lib/lib/release/g729aenc/qua_lsp.oe674 into lib/release/g729aenc.ae674 ...
    all files complete.
    generating external release references package/rel/thu_g729aenc/thu/g729aenc/package/package.rel.xml ...
    making release file thu_g729aenc.zip (because of lib/debug/g729aenc.a64P) ...