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.

RTOS/TMDSEVM6678: How to control priority of SWI used for IPC?

Part Number: TMDSEVM6678

Tool/software: TI-RTOS

I am running SYS/BIOS (6.46.4.53) on cores 0 and 1, and am using IPC (3.44.1.01) to communicate between these two cores. I am using compiler TI v8.1.3 and XDCtools 3.32.1.22_core.

It appears that the SWI for IPC is running at the maximum SWI priority (15), because one of my other SWIs, Swi.Servo_vSwi(), is also at priority 15, and apparently cannot preempt the IPC SWI (see Execution Analysis screen shot, below).  This is causing significant "jitter" on my high-priority Swi.Servo_vSwi(), which my application cannot tolerate.  So I assume that I need to lower the priority of the IPC SWI.

Any suggestions?

  • Hi Eric,

    I've forwarded this to the IPC experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Eric,

    Have you tried to lower the TransportShm_swiFxn task by updating the TransportShm_Instance_init() in packages/ti/sdo/ipc/transports/TransportShm.c? e.g.

       Swi_Params_init(&swiParams);

       swiParams.arg0 = (UArg)obj;

        swiParams.priority = 14;

       Swi_construct(Swi_struct(swiHandle),

                    (Swi_FuncPtr)TransportShm_swiFxn,

                    &swiParams, eb);

    Regards, Garrett

  • Hello Garrett,

    Thank you for your suggestion!  I found the code you were referring to, and made the change.  Unfortunately, I haven't been able to successfully rebuild my IPC library (I have never tried rebuilding any of the SDK prior to this).  I will keep trying.

    Regards, Eric

  • I'm still unable to rebuild the IPC library. Below are my modifications to the IPC products.mak file.

    DEPOT = C:/ti
    PLATFORM = C6678
    DESTDIR = C:/Temp/Temp
    XDC_INSTALL_DIR = $(DEPOT)/xdctools_3_32_02_25_core
    BIOS_INSTALL_DIR = $(DEPOT)/bios_6_46_04_53
    ti.targets.elf.C66 = $(DEPOT)/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3

    I then start the build, per the Install Guide, with the command:

    C:\ti_mine\ipc_3_44_01_01>make -f ipc-bios.mak all

    It then outputs about 580 lines of status, but then completely stalls, with the last few lines output being:

    configuring instrumented.pe66 from package/cfg/instrumented_pe66.cfg ...
    generating custom ti.sdo.ipc library makefile ...
    Starting build of library sources ...

    Any idea as to what might be going wrong with this?
  • Eric,

    Have you tried to use the xdctools_3_32_01_22_core (from Processor SDK 3.3 release) instead of xdctools_3_32_02_25_core?

    The PRSDK 3.3 component version can be found at processors.wiki.ti.com/index.php

    Regards, Garrett
  • Per your recommendation, I set XDC_INSTALL_DIR = $(DEPOT)/xdctools_3_32_01_22_core

    I than ran "make -f ipc-bios.mak clean", followed by "make -f ipc-bios.mak all"

    Unfortunately, the make all still hung at the same output line "Starting build of library sources ..."

  • Eric,

    >>C:\ti_mine\ipc_3_44_01_01

    Were you building the library in a Windows machine? Please try it on Linux.

    Regards, Garrett
  • Hi Garret,

    Thank you for your suggestion. We are pretty much a Windows shop here. I have relatively scant Linux experience, and my experience with TI on Linux is zilch. But I will look into trying to build the IPC on Linux.

    What would REALLY be sweet is if the fine folks that own the IPC module would create a new XDC attribute to control this, something along the lines of:

    var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
    Ipc.swiPriority = 14;

    placed into my .cfg file.

    Regards, Eric

  • HELP!  I'm still very keen to get this issue resolved!

    I have a new PC, new OS (Win10 Enterprise), and updated Processor SDK and CG tools...

     IPC 3.4.0.0

     BIOS 6.52.00.12

     XDCTOOLS  3.50.03.33 core

     ti-cgt-c6000_8.2.2

    But I am still UNSUCCESSFUL at building the IPC under Windows.   It still "hangs" at the same output line "Starting build of library sources ..."

    As suggested by Garrett, I did try Linux, but I could not even get through the Processor SDK installation without errors :-(

       ref:  support/dsp/c6000_multi-core_dsps/f/639/t/633182

    So I'm back to Windows.  Has anyone else ever successfully rebuilt the IPC using Windows?

    I've attached a .zip file containing the products.mak file, along with the console output from the build.

    1205.Files.zip

  • Hi Eric,

    I was able to successfully clean and build IPC using your products.mak file on my end. I did notice the step "Starting build of library sources" took about 5 minutes, so make sure you are giving it enough time to finish, especially if you have multiple programs/processes running on your machine.

    Also, I noticed in your log file you are running gmake from this directory: C:\ti\ipc_3_47_00_00>\ti\xdctools_3_50_03_33_core\

    On my end, I have my directories set up like this:
    C:\ti\xdctools_3_50_03_33_core
    C:\ti\ipc_3_47_00_00

    and I'm running the gmake command from the ipc_3_47_00_00 folder.

    I suggest setting up your directories like mine and running the build again from the IPC folder. I'm not convinced this would cause the hang but it's worth a shot.

    Regards,
    Sahin

  • Hello Sahin,

    Thank you, you were VERY close!

    > I suggest setting up your directories like mine
    > On my end, I have my directories set up like this:
    > C:\ti\xdctools_3_50_03_33_core
    > C:\ti\ipc_3_47_00_00

    My folder were the same. My working folder was C:\ti\ipc_3_47_00_00, and I was invoking gmake.exe which was in the C:\ti\xdctools_3_50_03_33_core folder. So then I copied gmake.exe over into the IPC folder and runr it from there, but that didn't improve anything.

    BUT, then I realized that I still had MinGW functions in the path (I previously had been using MinGW\make for my builds). So I started a new shell, WITHOUT MinGW functions in the path, and NOW the gmake build of ipc-bios.mak completes without a hitch!

    Thank you for pointing me at gmake, as it made me think of the MinGW utilities!

    So tomorrow I will test whether this modified IPC will actually lower my SWI priority, and if so, will close this out as resolved.

    Thank you again, Sahin!

    Eric
  • I have now successfully modified the priority of the IPC SWI (thank you Garrett Ding), and have successfully rebuilt my IPC library (thank you Sahin Okur).

    Lessons Learned (Windows):

       1) Do NOT have any MinGW / msys functions in the path,

       2) always use the gmake.exe that comes with XDCTOOLS to build the libraries

    Thank you again, Garrett and Sahin!

    Finally, I would STILL really like to have an XDC configuration variable to control this, so that I don't have to build and maintain a custom IPC library.

  • Hi Eric,

    Glad to hear it's been resolved!

    Regards,
    Sahin