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.

Problem with include NDK modules

Other Parts Discussed in Thread: MATHLIB, SYSBIOS

Hi all!

I have problem with include NDK modules into my project.

I take small function Init_Qmss() from

ti/pdk_C6678_1_1_2_6/packages/ti/drv/exampleProject/PA_multicoreExample_exampleProject

I inserted function into my project and receive error message:

....

'Building file:
C:/Users/Borovikov_O/My_projects/my_dsp/soft/dsp_qmss_init.cpp'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x"
-mv6600
--abi=eabi
-Ooff
-g
--include_path="C:/ti/ccsv5/tools/compiler/c6000_7.4.4/include"
--include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/csl"
--include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss"
--include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi"
--include_path="C:/ti/mathlib_c66x_3_0_1_1/inc"
--include_path="C:/ti/dsplib_c66x_3_1_0_0/inc"
--include_path="C:/ti/ndk_2_21_01_38/packages/ndk"
--include_path="C:/ti/ndk_2_21_01_38/packages"
--include_path="C:/ti/ndk_2_21_01_38/packages/ndk/ti/ndk/netctrl"
--include_path="C:/ti/ndk_2_21_01_38/packages/ndk/ti/ndk/nettools"
--gcc
--display_error_number
--diag_warning=225
--diag_wrap=off
--mem_model:data=far
--preproc_with_compile
--preproc_dependency="soft/dsp_qmss_init.pp"
--obj_directory="soft"
--cmd_file="./configPkg/compiler.opt"
"C:/Users/Borovikov_O/My_projects/my_dsp/soft/soft/dsp_qmss_init.cpp"
'Finished building: C:/Users/Borovikov_O/My_projects/my_dsp/soft/dsp_qmss_init.cpp'


'Building target: dsp.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x"
-mv6600
--abi=eabi
-Ooff
-g
--gcc
--display_error_number
--diag_warning=225
--diag_wrap=off
--mem_model:data=far
-z -m"dsp.map"
-i"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/lib"
-i"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/include"
-i"C:/ti/mathlib_c66x_3_0_1_1/lib"
-i"C:/ti/dsplib_c66x_3_1_0_0/lib"
-i"C:/ti/ndk_2_21_01_38/packages/ti/ndk/nettools/lib"
-i"C:/ti/ndk_2_21_01_38/packages/ti/ndk/netctrl/lib"
--reread_libs
--warn_sections
--display_error_number
--diag_wrap=off
--xml_link_info="link_info.xml"
--ram_model -o "dsp.out"
-l"./configPkg/linker.cmd"
. . . .
"./soft/dsp_qmss_init.obj"
"./soft/dsp_intc_cppmult.obj"
.  .  .
-l"libc.a"
-l"mathlib.ae66"
-l"dsplib.ae66"
<Linking>

undefined first referenced
symbol in file
--------- ----------------
Cppi_initDescriptor ./soft/dsp_qmss_init.obj
Qmss_init ./soft/dsp_qmss_init.obj
Qmss_insertMemoryRegion ./soft/dsp_qmss_init.obj
Qmss_start ./soft/dsp_qmss_init.obj
qmssGblCfgParams ./soft/dsp_qmss_init.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "dsp.out" not built

>> Compilation failure
gmake: *** [dsp.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

Original project works successfuly

What are my mistakes?

Best regards,

     Oleg

  • Oleg,

    It appears that there is a library associated with the Qmss function that you need to link with. You probably just need to add that library to the set of libraries passed to your linker command.

    Alan

  • Hi Alan,

    I added the path to the libraries

    but this did not solve the problem

    I can delete this error if I include to my project small module at C.

    but I don't sure that it is true way

    Best regards,

          Oleg

  • Oleg,

    I can’t tell from the screen shot:  have you added both the library file name *and* the search path for that library that has the missing symbols?

    Also, can you please clarify “I can delete this error if I include to my project small module at C.”

    Thanks,
    Scott

  • Hi Scott,

    1. I have two path to libraries

    Project->Properties->CCS Build->C6000 Compiler->Include Options

    "{TI_PDK_C6678_INSTALL_DIR}/packages/ti/drv/qmss"

    "{TI_PDK_C6678_INSTALL_DIR}/packages/ti/drv/cppi"

    and

    Project->Properties->CCS Build->C6000 Linker->File Search Path

    "C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\qmss\lib"

    C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\cppi\lib"

    Text of my function (by fully borrow to C:\ti\pdk_C6678\ti\packages\ti\drv\exampleProjects\PA_multicoreExample_exampleProject) is

    #include <ti/drv/pa/pa.h>
    #include <ti/drv/qmss/qmss_drv.h>

    #include <ti/drv/cppi/cppi_drv.h>
    #include <ti/drv/cppi/cppi_desc.h>
    #include <ti/drv/qmss/qmss_firmware.h>

    /* QMSS device specific configuration */
    extern Qmss_GlobalConfigParams qmssGblCfgParams;
    /* CPPI device specific configuration */
    extern Cppi_GlobalConfigParams cppiGblCfgParams;

    #pragma DATA_SECTION(gHostDesc, ".sharedDDR")
    #pragma DATA_ALIGN (gHostDesc, 16)
    UInt8 gHostDesc[SIZE_HOST_DESC * NUM_HOST_DESC];

    #pragma DATA_SECTION(gGlobalFreeQHnd, ".sharedDDR")
    Qmss_QueueHnd gGlobalFreeQHnd;

    #pragma DATA_SECTION(gCpdmaHnd, ".sharedDDR")
    Cppi_Handle gCpdmaHnd;

    #pragma DATA_SECTION(gCpdmaTxChanHnd, ".sharedDDR")
    Cppi_ChHnd gCpdmaTxChanHnd [NUM_PA_TX_QUEUES];

    #pragma DATA_SECTION(gCpdmaRxChanHnd, ".sharedDDR")
    Cppi_ChHnd gCpdmaRxChanHnd [NUM_PA_RX_CHANNELS];

    Int Init_Qmss(void) {

    Int32 result;
    Qmss_MemRegInfo memCfg;
    Qmss_InitCfg qmssInitConfig;
    Cppi_DescCfg cppiDescCfg;
    UInt32 numAllocated;

    /* Initialize QMSS */
    memset (&qmssInitConfig, 0, sizeof (Qmss_InitCfg));

    qmssInitConfig.linkingRAM0Base = 0;
    qmssInitConfig.linkingRAM0Size = 0;
    qmssInitConfig.linkingRAM1Base = 0x0;
    qmssInitConfig.maxDescNum = NUM_HOST_DESC;

    qmssInitConfig.pdspFirmware[0].pdspId = Qmss_PdspId_PDSP1;

    /*Little Endiad */
    qmssInitConfig.pdspFirmware[0].firmware = (void *) &acc48_le;
    qmssInitConfig.pdspFirmware[0].size = sizeof (acc48_le);

    result = QMSS_SOK;
    result = Qmss_init (&qmssInitConfig, &qmssGblCfgParams);
    if (result != QMSS_SOK) {
    return -1;
    }

    Qmss_start ();

    memset (gHostDesc, 0, SIZE_HOST_DESC * NUM_HOST_DESC);
    memCfg.descBase = (UInt32 *) gHostDesc;
    memCfg.descSize = SIZE_HOST_DESC;
    memCfg.descNum = NUM_HOST_DESC;
    memCfg.manageDescFlag = Qmss_ManageDesc_MANAGE_DESCRIPTOR;
    memCfg.memRegion = Qmss_MemRegion_MEMORY_REGION0;
    memCfg.startIndex = 0;

    result = Qmss_insertMemoryRegion(&memCfg);
    if (result == QMSS_MEMREGION_ALREADY_INITIALIZED)
    {
    ;
    }
    else if (result < QMSS_SOK)
    {
    return -1;
    }

    memset (&cppiDescCfg, 0, sizeof (cppiDescCfg));
    cppiDescCfg.memRegion = Qmss_MemRegion_MEMORY_REGION0;
    cppiDescCfg.descNum = NUM_HOST_DESC;
    cppiDescCfg.destQueueNum = QMSS_PARAM_NOT_SPECIFIED;
    cppiDescCfg.queueType = Qmss_QueueType_GENERAL_PURPOSE_QUEUE;
    cppiDescCfg.initDesc = Cppi_InitDesc_INIT_DESCRIPTOR;
    cppiDescCfg.descType = Cppi_DescType_HOST;

    cppiDescCfg.returnPushPolicy = Qmss_Location_TAIL;
    cppiDescCfg.cfg.host.returnPolicy = Cppi_ReturnPolicy_RETURN_ENTIRE_PACKET;
    cppiDescCfg.cfg.host.psLocation = Cppi_PSLoc_PS_IN_DESC;
    cppiDescCfg.returnQueue.qMgr = 0;
    cppiDescCfg.returnQueue.qNum = QMSS_PARAM_NOT_SPECIFIED;
    cppiDescCfg.epibPresent = Cppi_EPIB_EPIB_PRESENT;

    if ((gGlobalFreeQHnd = Cppi_initDescriptor (&cppiDescCfg, &numAllocated)) <= 0)
    {
    return -1;
    }

    return 0;

    }

    Description Resource Path Location Type
    unresolved symbol Cppi_initDescriptor, first referenced in ./soft/qmss_oth.obj app C/C++ Problem
    unresolved symbol Qmss_init, first referenced in ./soft/qmss_oth.obj app C/C++ Problem
    unresolved symbol Qmss_insertMemoryRegion, first referenced in ./soft/qmss_oth.obj app C/C++ Problem
    unresolved symbol qmssGblCfgParams, first referenced in ./soft/qmss_oth.obj app C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain app C/C++ Problem
    #10010 errors encountered during linking; "dsp.out" not built app C/C++ Problem

    2. If I make make small project to C - I don't have this problems with build

    But I have very big project to C++ and I shell used MulticoreNavigator at my project

    Thanks,

        Oleg

  • Oleg,

    Besides the compiler include path, and the linker library search path, (both which you’ve specified), you also need to include the names of the libraries with the functions you are calling.  You can do that in the CCS project properties, or have these specified in a linker command file, or explicitly list the library names when invoking the linker from the command line.

    Looking at your CCS project properties picture, in the upper box, you have these libraries: libc.a, mathlib.ae66, dsplib.ae66.  For the linker to know to search the appropriate qmss and cppi libraries for symbols, you need to specify something like “ti.drv.qms.ae66” and “ti.drv.cppi.ae66”.  (I look at a PDK installation I have which is a much later version, and there are subdirectories under the “lib” directories for different devices; so I don’t know the exact library names you need for your version, but they should be similar to those library names I list above).  If you don’t include the library names, they must be specified in a linker command file, or else the linker will report errors like you are seeing.

    I don’t know why this would be working for a simpler program, but maybe in that case these library names are specified in the linker command file?

    Hope this helps.

    Scott

  • Hi Scott

    I do as you advised.  I inserted names of libraries to my project

    and received next error message:

    Description Resource Path Location Type
    #10010 errors encountered during linking;"dsp.out" not built app C/C++ Problemunresolved symbol Osal_qmssCsEnter, first referenced in C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss/lib/ti.drv.qmss.ae66<qmss_drv.oe66> app C/C++ Problemunresolved symbol qmssGblCfgParams, first referenced in ./soft/qmss_oth.obj app C/C++ Problem<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain app C/C++ Problemunresolved symbol Osal_qmssCsExit, first referenced in C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss/lib/ti.drv.qmss.ae66<qmss_drv.oe66> app C/C++ Problemunresolved symbol Osal_qmssEndMemAccess, first referenced in C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss/lib/ti.drv.qmss.ae66<qmss_drv.oe66> app C/C++ Problem

    my linker.cmd file is

    /*
    * Do not modify this file; it is automatically generated from the template
    * linkcmd.xdt in the ti.targets.elf package and will be overwritten.
    */

    /*
    * put '"'s around paths because, without this, the linker
    * considers '-' as minus operator, not a file name character.
    */

    -l"C:\Users\Borovikov_O\IKBO_Multicore\ikbo_dsp\app\debug\configPkg\package\cfg\k10sv_pe66.oe66"
    -l"C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.ae66"
    -l"C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.intc.ae66"
    -l"C:\ti\xdctools_3_25_05_94\packages\ti\targets\rts6000\lib\ti.targets.rts6000.ae66"
    -l"C:\ti\xdctools_3_25_05_94\packages\ti\targets\rts6000\lib\boot.ae66"

    --retain="*(xdc.meta)"

    and example linker.cmd is

    -l"C:\Users\Borovikov_O\garbidge_ntk_workplace\PA_multicoreExample_exampleProject\Debug\configPkg\package\cfg\multicore_example_pe66.oe66"
    -l"C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\pa\lib\ti.drv.pa.ae66"
    -l"C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\cppi\lib\ti.drv.cppi.ae66"
    -l"C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\qmss\lib\ti.drv.qmss.ae66"
    -l"C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.ae66"
    -l"C:\ti\bios_6_33_05_46\packages\ti\sysbios\lib\instrumented_e66\sysbios\sysbios.lib"
    -l"C:\ti\xdctools_3_25_05_94\packages\ti\targets\rts6000\lib\ti.targets.rts6000.ae66"
    -l"C:\ti\xdctools_3_25_05_94\packages\ti\targets\rts6000\lib\boot.ae66"

    --retain="*(xdc.meta)"

    If compare old and new error messages we can see then library qmss is included,

    but linker.cmd files not identicaly. 

    What am I should do?

    Thanks

        Oleg

  • Hi Oleg,

    I think these new errors are because of the ordering of symbol references and the library order in the linker command file.  

    For example, “Osal_qmssEndMemAccess” resides in the ti.drv.cppi library, but that library is listed before the ti.drv.qmss library in your linker command file.

    If you reverse the order of these two libraries in your linker command file that will probably resolve this error.  But it might trigger some other similar ordering issues.  

    If you instead use the “-x” linker option, it will tell the linker to reread libraries it has already processed, to try to resolve backward references.  I think that will make these link errors go away…

    Scott

  • Hi Scott,

    Unfortunately it didn't not help

    I wil try to the rebuild library

    Thanks,

           Oleg

  • Hi Scott,
    I failed in an attempt to connect the library.
    I have to collect the necessary functionality from source texts.
    I hope it my attempt will succesful.Thank you for your tips, they were very helpful.
    Best regards,
    Oleg