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 MCSDK 2.0.7.19

Hi

I have a sample NDK project which builds and runs successfully with MCSDK 2.0.3.15.

But same thing when I am compiling and running with MCSDK 2.0.7.19 and all other corresponding packages, I am getting following QMSS error.

[C66XX_0] Error: Inserting memory region 0, Error code : -129
[C66XX_0] Failed to initialize the QMSS subsystem
[C66XX_0]
[C66XX_0] 0:48 0:96 0:128 0:256
[C66XX_0] 0:512 0:1536 0:3072
[C66XX_0] (0/0 mmAlloc: 0/0/0, mmBulk: 0/0/0)
[C66XX_0]

Please let me know what can be the issue here.

Also it looks the error is coming from qmss_drv.c -->Qmss_insertMemoryRegion with error code QMSS_INVALID_PARAM.

So how can I debug runtime with this file by putting breakpoint. If I include this file in my project I get following redefinition error.

<Linking>
error: symbol "qmssGObj" redefined: first defined in "./qmss_drv.obj";
redefined in
"D:\TICCS\pdk_C6670_1_0_0_19\packages\ti\drv\qmss\lib\ti.drv.qmss.ae66<qmss_
drv.oe66>"
error: symbol "qmssLObj" redefined: first defined in "./qmss_drv.obj";
redefined in
"D:\TICCS\pdk_C6670_1_0_0_19\packages\ti\drv\qmss\lib\ti.drv.qmss.ae66<qmss_
drv.oe66>"

...................................................

There must be another way to debug this issue.Please advise the same.

regards

Soumya

  • I cannot reproduce the linker error when I add qmss_drv.c (as well as ti/drv/qmss to include path because of qmss_osal.h) to an existing project that uses the library.  Can you paste the entire command line of the failed link?  I suspect changing the linker flags would work around the linker error due to duplicate symbols, since its both grabbing the same file from the project and library.  I suspect that flipping "Reread libraries; resolve backwards references" and "search libraries in priority order" may avoid this linker error (these are in "File Search Path" options for the C6000 Linker).

    However, this error is debuggable without single stepping.   If you examine the source code of qmss_drv:Qmss_insertMemoryRegion() after putting a breakpoint on the function, and inspect your memRegCfg, each of the reasons for QMSS_INVALID_PARAM are pretty directly derived from the input arguments.  I excerpted the parameter checks below and added a little more information to the check for descBase and ending index below.

        if (memRegCfg == NULL)
            return QMSS_INVALID_PARAM;

        /* Descriptor size should be a multiple of 16 */
        if ((memRegCfg->descSize % 16) != 0)
        {
            return QMSS_INVALID_PARAM;
        }

        /* Number of descriptors should be a power of 2 >= 2^5.  The upper limit is checked
         * below inside Qmss_osalCsEnter() */
        descNum = memRegCfg->descNum;
        if (descNum < 32)
        {
            return QMSS_INVALID_PARAM;
        }

        /* Check if # of descriptors is a power of 2 */
        if (oneBits != 1) {
            return QMSS_INVALID_PARAM;
        }

    Note: on the DSP, this is just memRegCfg->descBase (Qmss_osalVirtToPhy doesn't do anything).

        descBasePhy = (uint32_t*)Qmss_osalVirtToPhy((void *)(memRegCfg->descBase));
        if (!descBasePhy) {
            return QMSS_INVALID_PARAM;
        }


        /* The region base address must be aligned to 16 bytes.  It is suggested
         * to align to 64 bytes if the descriptor size > 32 bytes for performance
         * reasons.
         */
        if (((uint32_t)descBasePhy) & 0xf) {
            return QMSS_INVALID_PARAM;
        }

        /* startIndex should be a multiple of 32 */
        if ((startIndex % 32) != 0)
        {
            result = QMSS_INVALID_PARAM;
            goto exitCs; /* common exit to close CsEnter and MemAccess */
        }

    This one is a little more complex.  If the ending index of the new region is more than the total allowed descriptors, this will barf.  You can check qmssGObj.obj.initCfg.maxDescNum with a watch expression.
            if (newRegEndIndex > qmssGObj.obj.initCfg.maxDescNum)
            {
                result = QMSS_INVALID_PARAM;