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.

UNIVERSAL_process failure

Other Parts Discussed in Thread: CCSTUDIO

I've been debugging my remote codec. I've completed most debugging associated with the _control function and would like to debug the _process function. In the snippet from the GT_ trace output below, please not that the first line is the exit from the last _control call. The handle and return suggest that it went fine. At the end of the snippet, find the UNIVERSAL_process entry and exit, which did not go well, but I'm not sure why. I've reviewed the code in universal.c, and I believe that I'm meeting the requirements for the call. The first line in my process function is a trace which should print the parameters, but I'm sure I'm not getting there, because I should see trace output for the VISA entry and exit and I don't.

@11,002,673us: [+0 T:0x4001cf50] ti.sdo.ce.universal.UNIVERSAL - UNIVERSAL_control> Exit (handle=0x50818, retVal=0x0)
@11,002,839us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - processLoop->Call StartProgram returned 0
@15,003,272us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - GetVQMResults (handle = 0x50818, buffer = 0x411db000
@15,140,586us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_alloc(8) = 0x411fc000.
@15,144,291us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_getPhys(0x411fc000) = 0xc4dfa000.
@15,144,585us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - In args allocated at 0x411fc000
@15,283,075us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_alloc(8) = 0x411fd000.
@15,286,778us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_getPhys(0x411fd000) = 0xc4df9000.
@15,287,073us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - Out args allocated at 0x411fd000
@15,422,759us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_alloc(196) = 0x411fe000.
@15,426,575us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_getPhys(0x411fe000) = 0xc4df8000.
@15,426,872us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - Out bufs allocated at 0x411fe000
@15,427,096us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - inArgs size = 8, inArgs cmd = 11
@15,427,295us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - outBufs numBufs = 1, outBufs buf = 0x411db000, outBufs bufsize = 42208
@15,427,476us: [+0 T:0x4001cf50] ti.sdo.ce.universal.UNIVERSAL - UNIVERSAL_process> Enter (handle=0x50818, inBufs=0x0, outBufs=0x411fe000, inOutBufs=0x0, inArgs=0x411fc000, outArgs=0x411fd000)
@15,427,670us: [+0 T:0x4001cf50] ti.sdo.ce.universal.UNIVERSAL - UNIVERSAL_process> Exit (handle=0x50818, retVal=0xffffffff)

  • Could you please try adding the following line to your app's .cfg file:

    /* set to true to enable checked libraries */
    xdc.useModule('ti.sdo.ce.Settings').checked = true;

    This will do some validation of the parameters passed to UNIVERSAL_process(), and you should see some more trace output.

    Thanks,

        Janet

  • That worked! I was not setting the size of outArgs. Now I don't get a failure, but the process hangs (as described elsewhere in threads where you are responding). In this case, you might remember that the never-returning SEM_pendBinary is running, although in a background task, not the codec, or at least that is the expectation.

    I have two background tasks. One get mail from the codec. One gets mail from the other. The first is intended to pend for semaphores posted by two different interrupt service routines, neither of which has been written. (I know I can't SEM_pend from an ISR, but I'm hoping that I can SEM_post from one, as long as I don't include a timeout.)

    You'll notice below (where the entire end of the debug trace is recorded from just before the SEM_pendBinary call), that there is no further output from the DSP. It seems as though the SEM_pendBinary call put the whole DSP out of service, even though it has a timeout on it. Further note that I've included a 4 second timeout between the _control call that triggered the SEM_pendBinary and the next call (_process). It seems that I'm going to have to debug that SEM_pendBinary problem before I can continue with my _process call.

    Any clues as to how I can get more output from the SEM_pendBinary call? I know that I see SEM_pend output associated with the codec engine, but my SEM_pend doesn't seem to provide similar output. It is all on the DSP side, and I've been unable to run the CCS debugger on my target. (Another question pending to the experts.) CCS refuses to load my symbol table because it thinks that the .x674 file created on the Linux box is for the wrong target type. (It may be tagged somehow as an eval board target. My board is custom. I don't know how to change the Linux-box generated target type.)

    [DSP] @10,857,303tk: [+1 T:0xc25e20bc] DSP_TSK -     About to call SEM_pendBinary with parameters 0xc25befd4, 0x7d0
    @11,706,351us: [+0 T:0x4001cf50] CE - Engine_fwriteTrace> returning count [3994]
    @11,706,542us: [+0 T:0x4001cf50] CV - VISA_call Completed: messageId=0x000227c5, command=0x1, return(status=0)
    @11,706,732us: [+5 T:0x4001cf50] CV - VISA_freeMsg(0x50818, 0x41169c80): Freeing message with messageId=0x000227c5
    @11,706,909us: [+0 T:0x4001cf50] ti.sdo.ce.universal.UNIVERSAL - UNIVERSAL_control> Exit (handle=0x50818, retVal=0x0)
    @11,707,070us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - processLoop->Call StartProgram returned 0
    @15,707,551us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - GetVQMResults (handle = 0x50818, buffer = 0x411db000
    @15,843,297us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_alloc(8) = 0x411fc000.
    @15,847,204us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_getPhys(0x411fc000) = 0xc4dfa000.
    @15,847,499us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - In args allocated at 0x411fc000
    @15,988,096us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_alloc(8) = 0x411fd000.
    @15,991,990us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_getPhys(0x411fd000) = 0xc4df9000.
    @15,992,283us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - Out args allocated at 0x411fd000
    @16,133,245us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_alloc(196) = 0x411fe000.
    @16,137,021us: [+4 T:0x4001cf50] OM - Memory_contigAlloc> CMEM_getPhys(0x411fe000) = 0xc4df8000.
    @16,137,317us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - Out bufs allocated at 0x411fe000
    @16,137,539us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - inArgs size = 8, inArgs cmd = 11
    @16,137,735us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - outArgs size = 8
    @16,137,910us: [+1 T:0x4001cf50] mycompany.z2_apps.vqm_results - outBufs numBufs = 1, outBufs buf = 0x411db000, outBufs bufsize = 42208
    @16,138,086us: [+0 T:0x4001cf50] XU - XdmUtils_validateExtendedStruct> Enter (pStruct=0x411fc000, minSize=0x4, name=inArgs
    @16,138,251us: [+0 T:0x4001cf50] XU - XdmUtils_validateExtendedStruct> return (0x1)
    @16,138,396us: [+0 T:0x4001cf50] XU - XdmUtils_validateExtendedStruct> Enter (pStruct=0x411fd000, minSize=0x4, name=outArgs
    @16,138,548us: [+0 T:0x4001cf50] XU - XdmUtils_validateExtendedStruct> return (0x1)
    @16,138,686us: [+0 T:0x4001cf50] ti.sdo.ce.universal.UNIVERSAL - UNIVERSAL_process> Enter (handle=0x50818, inBufs=0x0, outBufs=0x411fe000, inOutBufs=0x0, inArgs=0x411fc000, outArgs=0x411fd000)
    @16,138,870us: [+0 T:0x4001cf50] XU - XdmUtils_validateSparseBufDesc1> Enter (bufDesc=0x411fe000, name=outBufs
    @16,139,025us: [+0 T:0x4001cf50] XU - XdmUtils_validateSparseBufDesc1> return (0x1)
    @16,139,185us: [+5 T:0x4001cf50] CV - VISA_allocMsg> Allocating message for messageId=0x000227c6
    @16,139,513us: [+0 T:0x4001cf50] CV - VISA_call(visa=0x50818, msg=0x41169c80): messageId=0x000227c6, command=0x0
    Entered MSGQ_put ()
        msgqQueue    [0x2]
        msg    [0x41169c80]
    Entered DRV_Invoke ()
        drvObj    [0x50630]
        cmdId    [0x6f0a]
        arg1    [0xbef72a7c]
        arg2    [0x0]
    Entered _POOL_xltBuf ()
        poolId    [0x0]
        bufPtr    [0xbef72a84]
        xltFlag    [0x200]
    Leaving _POOL_xltBuf ()     status [0x8000]
    Status: 8000
    Leaving DRV_Invoke
     ()     status [0x8000]
    Leaving MSGQ_put ()     status [0x8000]
    Entered MSGQ_get ()
        msgqQueue    [0x10001]
        timeout    [0xffffffff]
        msg    [0xbef72b1c]
    Entered DRV_Invoke ()
        drvObj    [0x50630]
        cmdId    [0x6f0b]
        arg1    [0xbef72a74]
        arg2    [0x0]

  • You could try running the BIOS semaphore example (I think it's in the 'mutex' subdirectory of the basic examples), just to make sure your SEM_pend() and SEM_pendBinary() calls with timeouts are working.

    Regards,

        Janet

  • I can not build the example project. This same failure mode exists in an old project of mine. It may be related to the fact that I'm using a custom board, and I'd be willing to convert the project to run on my board, but I can't figure out what to change. (I've tried changing the "-mv6740" to "-mv64P", but that results in the project not finding rts6740.lib. Only one of those exists on my disk, so I add the path to the linker paths, and then I get lots of mismatched objects.) I don't know how to change the "but configuration is for C64+" part.

    Build output follows:

    -----------------------------  mutex.pjt - Debug  -----------------------------
    [mutexcfg.s62] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -pdr -fr"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137/Debug" -i"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137" -i"." -d"_DEBUG" -mv6740 -@"Debug.lkf" "mutexcfg.s62"
    "mutexcfg.s62", ERROR!   at line 365: [ ***** USER ERROR ***** - ]
             Project build options do not match Global configuration settings.
               Compiler options do not specify -mv64+, but configuration is for
               C64x+
                    .emsg "Project build options do not match Global configuration settings.  Compiler options do not specify -mv64+, but configuration is for C64x+"

    "mutexcfg.s62", ERROR!   at EOF: [E0300] The following symbols are undefined:
    2 Assembly Errors, No Assembly Warnings
      GBL_L2MARMASK
      HWI_INTRMULTLOW
      HWI_INTRMULTHIGH

    Errors in Source - Assembler Aborted

    >> Compilation failure

    Build Complete,
      2 Errors, 0 Warnings, 0 Remarks.

     

  • You shouldn't need to change the compiler opts. Did you change the platform in the examples\basic\mutex\evmOMAPL137\mutex.tcf? Can you try doing a build clean and then build? I am using CCS 3.3, set up to the DM6446 simulator, and am able to build this example without any errors.

    Regards,

        Janet

  • I still have the old EVMC6747 CCStudio v3.3 shortcut provided with the eval boaard, so I opened CCS with that.

    I then try to open the mutex pjt for the evmOMAPL137 platform.

    I get the following setup message: Error reading one or more XML files: C:\CCStudio_v3.3\drivers\TargetDB\drivers\sdxds510cla.xml, C\:CCStudio_v3.3\drivers\TargetDB\drivers\sdxds510usbcla.xml. This message has something to do with the fact that my JTAG is not the USB-to-USB/JTAG provided with the eval board, but an actual USB to JTAG module recommended by TI. (The USB/JTAG is proprietary and we don't have room on our board for it anyway.)

    I always do a build clean, build when I open a new project, so, yes, I did a build clean. The build output using evmOMAPL137 mutex.pjt (with no changes to the project) is:

    -----------------------------  mutex.pjt - Debug  -----------------------------
    [mutex.tcf] "C:\CCStudio_v3.3\bios_5_33_03\xdctools\tconf" -b -Dconfig.importPath=".;../;C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/common;C:/CCStudio_v3.3/bios_5_33_03/packages" mutex.tcf

    [mutex.c] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -pdr -fr"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137/Debug" -i"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137" -i"." -d"_DEBUG" -mv6740 -@"evmOMAPL137/Debug.lkf" "mutex.c"

    [mutexcfg.s62] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -pdr -fr"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137/Debug" -i"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137" -i"." -d"_DEBUG" -mv6740 -@"Debug.lkf" "mutexcfg.s62"
    "mutexcfg.s62", ERROR!   at line 365: [ ***** USER ERROR ***** - ]
             Project build options do not match Global configuration settings.
               Compiler options do not specify -mv64+, but configuration is for
               C64x+
                    .emsg "Project build options do not match Global configuration settings.  Compiler options do not specify -mv64+, but configuration is for C64x+"

    "mutexcfg.s62", ERROR!   at EOF: [E0300] The following symbols are undefined:
    2 Assembly Errors, No Assembly Warnings
      GBL_L2MARMASK
      HWI_INTRMULTLOW
      HWI_INTRMULTHIGH

    Errors in Source - Assembler Aborted

    >> Compilation failure

    [mutexcfg_c.c] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -pdr -fr"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137/Debug" -i"C:/CCStudio_v3.3/bios_5_33_03/packages/ti/bios/examples/basic/mutex/evmOMAPL137" -i"." -d"_DEBUG" -mv6740 -@"Debug.lkf" "mutexcfg_c.c"

    Build Complete,
      2 Errors, 0 Warnings, 0 Remarks.

  • What version of the codegen tools are you using? You need at least 6.1 to support the Primus device. If you have a 6.0.xx, that may be the problem.

    Regards,

        Janet

  • I've updated to 6.1.9. I can now build, but I still can't load the object onto my target board. Brad is currently helping me with this. Thanks.