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.

TDA4VH-Q1: QNX IPC binary modification

Part Number: TDA4VH-Q1

Tool/software:

I have vision apps running on the MCU cores and on the  A72 i have QNX .  In  QNX i am running the binary vx_app_arm_ipc.out. 

./vx_app_arm_ipc.out  
APP: Init QNX ... !!!
appIpcInit: IPC: Init QNX ... !!!
appIpcInit: IPC: Init ... Done !!!
  5188.155546 s: REMOTE_SERVICE: Init ... !!!
  5188.155650 s: REMOTE_SERVICE: Init ... Done !!!
  5188.155682 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
  5188.155712 s:  VX_ZONE_INIT:Enabled
  5188.155726 s:  VX_ZONE_ERROR:Enabled
  5188.155739 s:  VX_ZONE_WARNING:Enabled
  5188.155915 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
  5188.155979 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
  5188.156034 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
  5188.156091 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
  5188.156113 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
  5188.156152 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
  5188.156292 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0000
  5188.156382 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0001
  5188.156466 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0002
  5188.156556 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0003
  5188.156643 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0004
  5188.156728 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0005
  5188.156812 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0006
  5188.156897 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0007
  5188.157021 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0008
  5188.157102 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0009
  5188.157183 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000a
  5188.157263 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000b
  5188.157341 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000c
  5188.157414 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000d
  5188.157486 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000e
  5188.157558 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000f
APP IPC: Waiting for all messages to get echoed from remote core...
  5188.292827 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0000
  5188.292863 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0001
  5188.292895 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0002
  5188.292925 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0003
  5188.292955 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0004
  5188.292986 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0005
  5188.293016 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0006
  5188.293047 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0007
  5188.293077 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0008
  5188.293107 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0009
  5188.293137 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000a
  5188.293167 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000b
  5188.293197 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000c
  5188.293227 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000d
  5188.293257 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000e
  5188.293287 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000f
  5188.293318 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0000
  5188.293348 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0001
  5188.293377 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0002
  5188.427929 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0003
  5188.427961 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0004
  5188.427991 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0005
  5188.428022 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0006
  5188.428052 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0007
  5188.428083 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0008
  5188.428113 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0009
  5188.428143 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000a
  5188.428174 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000b
  5188.428204 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000c
  
  
  ..
  
  
  
  
  
   5360.126949 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000e
  5360.126986 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000f
  5360.127022 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0000
  5360.127059 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0001
  5360.127095 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0002
  5360.127130 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0003
  5360.127167 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0004
  5360.127204 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0005
  5360.127241 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0006
  5360.127277 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0007
  5360.127313 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0008
  5360.127349 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0009
  5360.127386 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000a
  5360.261926 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000b
  5360.261964 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000c
  5360.262001 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000d
  5360.262037 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000e
  5360.262072 s: IPC: RX: mcu2_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead000f
  5360.262109 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0000
  5360.262145 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0001
  5360.262181 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0002
  5360.262218 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0003
  5360.262253 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0004
  5360.262290 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0005
  5360.262326 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0006
  5360.262363 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0007
  5360.262399 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0008
  5360.262435 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead0009
  5360.262472 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000a
  5360.262508 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000b
  5360.262545 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000c
  5360.262581 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000d
  5360.397125 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000e
  5360.397162 s: IPC: RX: mcu2_1 (port 13) -> mpu1_0 (port 102) msg = 0xdead000f
APP IPC: Waiting for all messages to get echoed ... Done.
APP IPC: Running remote service test ... 
  5367.693925 s: REMOTE_SERVICE_TEST: Running test for CPU mcu1_0 !!!
  5367.694510 s: REMOTE_SERVICE_TEST: Test passed !!!
  5367.694637 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu1_0 !!!
  5367.695261 s: REMOTE_SERVICE_TEST: Test passed !!!
  5367.695287 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu1_0 !!!
  5377.695086 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu1_0 ... DONE !!!
  5377.695165 s: REMOTE_SERVICE_TEST: Test passed !!!
  5377.695180 s: REMOTE_SERVICE_TEST: Running test for CPU mcu2_0 !!!
  5377.695725 s: REMOTE_SERVICE_TEST: Test passed !!!
  5377.695812 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu2_0 !!!
  5377.696413 s: REMOTE_SERVICE_TEST: Test passed !!!
  5377.696437 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu2_0 !!!
  5387.696314 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu2_0 ... DONE !!!
  5387.696397 s: REMOTE_SERVICE_TEST: Test passed !!!
  5387.696413 s: REMOTE_SERVICE_TEST: Running test for CPU mcu2_1 !!!
  5387.696938 s: REMOTE_SERVICE_TEST: Test passed !!!
  5387.697024 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu2_1 !!!
  5387.697613 s: REMOTE_SERVICE_TEST: Test passed !!!
  5387.697636 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu2_1 !!!
  5397.697313 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu2_1 ... DONE !!!
  5397.697392 s: REMOTE_SERVICE_TEST: Test passed !!!
  5397.697406 s: REMOTE_SERVICE_TEST: Running test for CPU mcu3_0 !!!
  5397.697930 s: REMOTE_SERVICE_TEST: Test passed !!!
  5397.698014 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu3_0 !!!
  5397.698599 s: REMOTE_SERVICE_TEST: Test passed !!!
  5397.698622 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu3_0 !!!
  5407.697746 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu3_0 ... DONE !!!
  5407.697825 s: REMOTE_SERVICE_TEST: Test passed !!!
  5407.697840 s: REMOTE_SERVICE_TEST: Running test for CPU mcu3_1 !!!
  5407.698368 s: REMOTE_SERVICE_TEST: Test passed !!!
  5407.698459 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu3_1 !!!
  5407.699049 s: REMOTE_SERVICE_TEST: Test passed !!!
  5407.699072 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu3_1 !!!
  5417.698570 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu3_1 ... DONE !!!
  5417.698649 s: REMOTE_SERVICE_TEST: Test passed !!!
  5417.698663 s: REMOTE_SERVICE_TEST: Running test for CPU mcu4_0 !!!
  5417.699185 s: REMOTE_SERVICE_TEST: Test passed !!!
  5417.699270 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu4_0 !!!
  5417.699847 s: REMOTE_SERVICE_TEST: Test passed !!!
  5417.699874 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu4_0 !!!
  5427.699538 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu4_0 ... DONE !!!
  5427.699617 s: REMOTE_SERVICE_TEST: Test passed !!!
  5427.699631 s: REMOTE_SERVICE_TEST: Running test for CPU mcu4_1 !!!
  5427.700193 s: REMOTE_SERVICE_TEST: Test passed !!!
  5427.700281 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU mcu4_1 !!!
  5427.700902 s: REMOTE_SERVICE_TEST: Test passed !!!
  5427.700934 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu4_1 !!!
  5437.700176 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu4_1 ... DONE !!!
  5437.700258 s: REMOTE_SERVICE_TEST: Test passed !!!
  5437.700273 s: REMOTE_SERVICE_TEST: Running test for CPU c7x_1 !!!
  5437.701019 s: REMOTE_SERVICE_TEST: Test passed !!!
  5437.701148 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU c7x_1 !!!
  5437.701826 s: REMOTE_SERVICE_TEST: Test passed !!!
  5437.701857 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU c7x_1 !!!
  5447.701434 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU c7x_1 ... DONE !!!
  5447.701512 s: REMOTE_SERVICE_TEST: Test passed !!!
  5447.701527 s: REMOTE_SERVICE_TEST: Running test for CPU c7x_2 !!!
  5447.702050 s: REMOTE_SERVICE_TEST: Test passed !!!
  5447.702135 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU c7x_2 !!!
  5447.702696 s: REMOTE_SERVICE_TEST: Test passed !!!
  5447.702720 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU c7x_2 !!!
  5457.702499 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU c7x_2 ... DONE !!!
  5457.702578 s: REMOTE_SERVICE_TEST: Test passed !!!
  5457.702592 s: REMOTE_SERVICE_TEST: Running test for CPU c7x_3 !!!
  5457.703114 s: REMOTE_SERVICE_TEST: Test passed !!!
  5457.703196 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU c7x_3 !!!
  5457.703775 s: REMOTE_SERVICE_TEST: Test passed !!!
  5457.703799 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU c7x_3 !!!
  5467.703573 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU c7x_3 ... DONE !!!
  5467.703651 s: REMOTE_SERVICE_TEST: Test passed !!!
  5467.703666 s: REMOTE_SERVICE_TEST: Running test for CPU c7x_4 !!!
  5467.704188 s: REMOTE_SERVICE_TEST: Test passed !!!
  5467.704275 s: REMOTE_SERVICE_TEST: Running test @ 0x900000000 of 1024 bytes size for CPU c7x_4 !!!
  5467.704833 s: REMOTE_SERVICE_TEST: Test passed !!!
  5467.704860 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU c7x_4 !!!
  5477.704320 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU c7x_4 ... DONE !!!
  5477.704398 s: REMOTE_SERVICE_TEST: Test passed !!!
APP IPC: Running remote service test ... Done.
  5477.704424 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
  5477.711890 s:  VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
APP: Deinit ... !!!

I am not really sure which source code files  correspond to the vx_app_arm_ipc.out binary. In the SDK i see several places where IPC code is scattered.  For example in the vision_apps/utilities/app_ipc and   in the root at app_utils/utils/ipc. It is quite hard to understand what is the minimum  software package required to run IPC on the QNX side. What i understand is that each application running on QNX that involves IPC comm. , needs to connect to tiipc_mgr .  Can you please help figure out which  are the files with source code for IPC application on QNX. I want to modify it. What is the target that i should use to build it.

  • IPC is a messaging framework that must be built for multiple targets.   The QNX A72 source, and the R5 / C7x source, can be found at below locations.   The vx_app_arm_ipc.out is an example of using the PSDK QNX IPC resource manager on the A7.

    vision_apps/apps/utililties/app_ipcLocation of source files for the Vision Apps application testing IPC

    psdkqa/resmgr/ipc_qnx_rsmgr/A72 side srouce for QNX IPC resource manager.  Vision apps applications / test, uses this IPC messaging

    ${PDK_INSTALL}/packages/ti/drv/ipc/IPC code which is built for the R5 / C7x cores.

    Regards,

    kb

  • Thanks for the info I looked into the  vision_apps/apps/utilities/app_ipc/main_ipc.c  and understood that the code is sending notify message to each core and then waiting for each core to respond. But what i cannot wrap my head around is the next part of the code as shown below where some remote service is started. What are the magic numbers as shown in the last snippet

    ......
    
     printf("APP IPC: Waiting for all messages to get echoed from remote core...\n");
            appLogWaitMsecs(10000);
            printf("APP IPC: Waiting for all messages to get echoed ... Done.\n");
            #endif
    
            #if 1
            {
                int32_t appRemoteServiceTestRun(uint32_t cpu_id);
    
                printf("APP IPC: Running remote service test ... \n");
                for(i=0; i<APP_IPC_CPU_MAX; i++)
                {
                    if(appIpcIsCpuEnabled(i) && i != appIpcGetSelfCpuId())
                    {
                        appRemoteServiceTestRun(i);
                    }
                }
                printf("APP IPC: Running remote service test ... Done.\n");
            }
            #endif
            
            
    .....

    int32_t appRemoteServiceTestRun(uint32_t cpu_id)
    {
        appRemoteServiceTestRunCmd0(cpu_id);
        appRemoteServiceTestRunCmd1(cpu_id);
        appRemoteServiceTestRunTimerTest(cpu_id);
    
        return 0;
    }

    int32_t appRemoteServiceTestRunCmd0(uint32_t cpu_id)
    {
        int32_t status = 0;
        volatile uint32_t value = 0;
        uint32_t i, count = 10;
        uint32_t test_pass = 1;
    
        appLogPrintf("REMOTE_SERVICE_TEST: Running test for CPU %s !!!\n",
            appIpcGetCpuName(cpu_id)
            );
    
        for(i=0; i<count; i++)
        {
            status = appRemoteServiceRun(cpu_id, APP_REMOTE_SERVICE_TEST_NAME, APP_REMOTE_SERVICE_TEST_CMD_0, (void*)&value, sizeof(uint32_t), 0);
            if(status!=0 || value != (i+1))
            {
                test_pass = 0;
                status = -1;
                break;
            }
        }
        if(test_pass)
        {
            appLogPrintf("REMOTE_SERVICE_TEST: Test passed !!!\n");
        }
        else
        {
            appLogPrintf("REMOTE_SERVICE_TEST: Test failed @ iteration %d !!!\n", i);
        }
        return status;
    }
    

    /* #define APP_REMOTE_SERVICE_TEST_DEBUG */
    #define APP_REMOTE_SERVICE_TEST_NAME  "com.ti.remote_service_test"
    
    #define APP_REMOTE_SERVICE_TEST_CMD_0   (0x1234)
    #define APP_REMOTE_SERVICE_TEST_CMD_1   (0x5678)
    #define APP_REMOTE_SERVICE_TEST_CMD_2   (0x0002)

  • Hi, will loop in someone more familiar with the vision apps ipc example code.

    Regards,

    kb

  • Hi

    appRemoteServiceRun is also a IPC call to other cores where the remote service handler gets invoked on the remote core.

    If you search for the service APP_REMOTE_SERVICE_TEST_NAME in the file app_remote_service_test.c, you can see a handler being registered under the name appRemoteServiceTestHandler

    This is a callback function everytime appRemoteServiceRun () is called with service mentioned as APP_REMOTE_SERVICE_TEST_NAME 

    APP_REMOTE_SERVICE_TEST_CMD_0, APP_REMOTE_SERVICE_TEST_CMD_1, APP_REMOTE_SERVICE_TEST_CMD_2 are the switch cases inside this callback handler that executes on the respective target core.

    Regards,

    Nikhil

  • Thanks Nikhil for explaining it.  I have another doubt.

     if(status == VX_SUCCESS)
        {
            #if 1
            for(k=0; k<NUM_ITERATIONS; k++)
            {
               for(i=0; i<APP_IPC_CPU_MAX; i++)
                {
                
                    if(appIpcIsCpuEnabled(i) && i != appIpcGetSelfCpuId())
                    {
                        for(msg=0; msg<NUM_MSGS; msg++)
                        {
                            //status = appIpcSendNotify(i, (0xDEAD0000 | (msg & 0xFFFF)));
                            status = appIpcSendNotify(i, (0xDEAD0000 | (msg & 0xFFFF)));
                            APP_PRINTF("Rexroth: APP IPC: Sent msg %d to CPU [%s]\n", msg+1, appIpcGetCpuName(i));
                            if(status != VX_SUCCESS)
                            {
                                printf("APP IPC: ERROR: Send msg %d to CPU [%s] failed !!!\n", msg+1, appIpcGetCpuName(i));
                                break;
                            }
                            /* appLogWaitMsecs(10); */
                        }
                    }
                }
            }
            printf("APP IPC: Waiting for all messages to get echoed from remote core...\n");
            appLogWaitMsecs(10000);

    In the code snippet above that corresponds to the vx_app_arm_ipc.out binary on QNX,  there is a appIpcSendNotify() function. The payload here can be only 4 bytes. But as i understand IPC can sand 496 bytes of data. Can you please explain this. Or is this function only used to notify the other core that there is new data.?

    In such a case what would be the sequence of sending. First send the data (what would be the API?) then use appIpcSendNotify() to tell the remote core that there is new data?. (assuming this API calls the mailbox interrupts). Can you please elaborate on this?

  • Hi,

    Can you please explain this. Or is this function only used to notify the other core that there is new data.?

    Yes, this API is used to send only 4 bytes of data, typically used to notify the cores.

    For sending 496 bytes of data, we use the remote service API. Please refer the implementation of appRemoteServiceRun() in utils/remote_service for the flow.

    Regards,

    Nikhil

  • Thanks for your response.  Just one more question what is the  MCU counterpart  that will interact with the  vx_app_arm_ipc.out  binary.  I am currently building  ti-processor-sdk-rtos-j784s4-evm-09_02_00_05/vision_apps/platform/j784s4/rtos/main.c  using command

    make vx_app_rtos_qnx_mcu1_0 

    Then i am building a new tispl and using the newly buit binary and am using it  on the MCU1_0

    Here is the output (MCU1_0)

    On the QNX side i am running  vx_app_arm_ipc.out   (MPU)

    I have enabled UART prints in the MCU code. I expected to see 0xdead000  but instead i see ping pong messages on the MCU1_0 UART. Am i using incorrect source code on the MCU1_0.   

    PS: I am sending appNotify to only MCU1_0 thats why only one message on Main domain UART (889.724088 s: IPC: RX: mcu1_0 (port 13) -> mpu1_0 (port 102) msg = 0xdead0000)

    Could you please explain this behaviour.

  • Hi,

    From the logs, if you are using vx_app_rtos_qnx_mcu1_0, then I believe the MCU1_0 core is enabled in vision_apps right?

    Could you please share the remote core logs from "./vision_apps_init.sh" ?

    As i see IPC command only for A72 to mcu1_0, and remote services for other cores. Did you disable ipc from A72 to other cores?

    Regards,

    Nikhil

  • From the logs, if you are using vx_app_rtos_qnx_mcu1_0, then I believe the MCU1_0 core is enabled in vision_apps right?

    Correct, i have enabled vision apps for all cores in the  app_cfg.h file. 

    As i see IPC command only for A72 to mcu1_0, and remote services for other cores. Did you disable ipc from A72 to other cores?

    Yes i havemodified  it to send to only MCU1_0

    OUTPUT OF vx_app_arm_remote_log
    
    
    
    
    ./vx_app_arm_remote_log.out                                                                                  
    [MCU1_0]      0.200170 s: CIO: Init ... Done !!!                                                                                     
    [MCU1_0]      0.200250 s: ### CPU Frequency = 1000000000 Hz                                                                          
    [MCU1_0]      0.200285 s: CPU is running FreeRTOS                                                                                    
    [MCU1_0]      0.200309 s: APP: Init ... !!!                                                                                          
    [MCU1_0]      0.200349 s: MEM: Init ... !!!                                                                                          
    [MCU1_0]      0.200387 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ ba000000 of size 8388608 bytes !!!             
    [MCU1_0]      0.200464 s: MEM: Init ... Done !!!                                                                                     
    [MCU1_0]      0.200489 s: IPC: Init ... !!!                                                                                          
    [MCU1_0]      0.200536 s: IPC: 12 CPUs participating in IPC !!!                                                                      
    [MCU1_0]      0.211657 s: IPC: Init ... Done !!!                                                                                     
    [MCU1_0]      0.211720 s: APP: Syncing with 11 CPUs ... !!!                                                                          
    [MCU1_0]     23.848138 s: APP: Syncing with 11 CPUs ... Done !!!                                                                     
    [MCU1_0]     23.848371 s: REMOTE_SERVICE: Init ... !!!                                                                               
    [MCU1_0]     23.860964 s: REMOTE_SERVICE: Init ... Done !!!                                                                          
    [MCU1_0]     23.861031 s: APP: Init ... Done !!!                                                                                     
    [MCU1_0]     23.861660 s: 5sepAPP: Run ... !!!                                                                                       
    [MCU1_0]     23.879444 s: 5sepIPC: Starting echo test ...                                                                            
    [MCU1_0]     24.173442 s: IPC: RecvTask: Creating ...                                                                                
    [MCU1_0]     24.188488 s: IPC: RecvTask: Started ...                                                                                 
    [MCU1_0]     24.188778 s: IPC: RecvTask: Waiting for messages ...                                                                    
    [MCU1_0]     24.188830 s: IPC: RecvTask: Revcvd msg #1 "ping 0" len 7 bytes from mcu2_1                                              
    [MCU1_0]     24.188919 s: IPC: RecvTask: Sending msg #1 "pong 0" len 6 bytes from mcu1_0 to mcu2_1                                   
    [MCU1_0]     24.188976 s: IPC: RecvTask: Revcvd msg #2 "ping 0" len 7 bytes from mcu3_0                                              
    [MCU1_0]     24.189040 s: IPC: RecvTask: Sending msg #2 "pong 0" len 6 bytes from mcu1_0 to mcu3_0                                   
    [MCU1_0]     24.189095 s: IPC: RecvTask: Revcvd msg #3 "ping 0" len 7 bytes from mcu3_1                                              
    [MCU1_0]     24.189150 s: IPC: RecvTask: Sending msg #3 "pong 0" len 6 bytes from mcu1_0 to mcu3_1                                   
    [MCU1_0]     24.189201 s: IPC: RecvTask: Revcvd msg #4 "ping 0" len 7 bytes from mcu4_0                                              
    [MCU1_0]     24.189258 s: IPC: RecvTask: Sending msg #4 "pong 0" len 6 bytes from mcu1_0 to mcu4_0                                   
    [MCU1_0]     24.189310 s: IPC: RecvTask: Revcvd msg #5 "ping 0" len 7 bytes from mcu2_0                                              
    [MCU1_0]     24.189364 s: IPC: RecvTask: Sending msg #5 "pong 0" len 6 bytes from mcu1_0 to mcu2_0                                   
    [MCU1_0]     24.189415 s: IPC: RecvTask: Revcvd msg #6 "ping 0" len 7 bytes from mcu4_1                                              
    [MCU1_0]     24.514448 s: IPC: SendTask3: Received msg #1 "pong 1" len 6 bytes from mcu2_0 endPt 14  

    output of ./visionapps_init.sh
    
    
    
     0.200170 s: CIO: Init ... Done !!!                                                             
    [MCU1_0]      0.200464 s: MEM: Init ... Done !!!                                                                                     
    [MCU1_0]      0.200489 s: IPC: Init ... !!!                                                                                          
    [MCU1_0]      0.200536 s: IPC: 12 CPUs participating in IPC !!!                                                                      
    [MCU1_0]      0.211657 s: IPC: Init ... Done !!!                                                                                     
    [MCU1_0]      0.211720 s: APP: Syncing with 11 CPUs ... !!!                                                                          
    [MCU1_0]     23.848138 s: APP: Syncing with 11 CPUs ... Done !!!                                                                     
    [MCU1_0]     23.848371 s: REMOTE_SERVICE: Init ... !!!                                                                               
    [MCU1_0]     23.860964 s: REMOTE_SERVICE: Init ... Done !!!                                                                          
    [MCU1_0]     23.861660 s: 5sepAPP: Run ... !!!                                                                                       
    [MCU1_0]     23.879444 s: 5sepIPC: Starting echo test ...                                                                            
    [MCU1_0]     24.188488 s: IPC: RecvTask: Started ...                                                                                 
    [MCU1_0]     24.188778 s: IPC: RecvTask: Waiting for messages ...                                                                    
    [MCU1_0]     24.188919 s: IPC: RecvTask: Sending msg #1 "pong 0" len 6 bytes from mcu1_0 to mcu2_1                                   
    [MCU1_0]     24.188976 s: IPC: RecvTask: Revcvd msg #2 "ping 0" len 7 bytes from mcu3_0                                              
    [MCU1_0]     24.189040 s: IPC: RecvTask: Sending msg #2 "pong 0" len 6 bytes from mcu1_0 to mcu3_0                                   
    [MCU1_0]     24.189150 s: IPC: RecvTask: Sending msg #3 "pong 0" len 6 bytes from mcu1_0 to mcu3_1                                   
    [MCU1_0]     24.189201 s: IPC: RecvTask: Revcvd msg #4 "ping 0" len 7 bytes from mcu4_0                                              
    [MCU1_0]     24.189258 s: IPC: RecvTask: Sending msg #4 "pong 0" len 6 bytes from mcu1_0 to mcu4_0                                   
    [MCU1_0]     24.189364 s: IPC: RecvTask: Sending msg #5 "pong 0" len 6 bytes from mcu1_0 to mcu2_0                                   
    [MCU1_0]     24.189415 s: IPC: RecvTask: Revcvd msg #6 "ping 0" len 7 bytes from mcu4_1                                              
    [MCU1_0]     24.189476 s: IPC: RecvTask: Sending msg #6 "pong 0" len 6 bytes from mcu1_0 to mcu4_1                                   
    [MCU1_0]     24.189583 s: IPC: RecvTask: Sending msg #7 "pong 0" len 6 bytes from mcu1_0 to c7x_1                                    
    [MCU1_0]     24.189634 s: IPC: RecvTask: Revcvd msg #8 "ping 0" len 7 bytes from c7x_2                                               
    [MCU1_0]     24.189687 s: IPC: RecvTask: Sending msg #8 "pong 0" len 6 bytes from mcu1_0 to c7x_2                                    
    [MCU1_0]     24.189793 s: IPC: RecvTask: Sending msg #9 "pong 0" len 6 bytes from mcu1_0 to c7x_3                                    
    [MCU1_0]     24.189844 s: IPC: RecvTask: Revcvd msg #10 "ping 0" len 7 bytes from c7x_4                                              
    [MCU1_0]     24.189898 s: IPC: RecvTask: Sending msg #10 "pong 0" len 6 bytes from mcu1_0 to c7x_4                                   
    [MCU1_0]     27.260527 s: IPC: SendTask11: Sending messages to c7x_3 ...   

  • Here is the QNX side of the code 

    #define NUM_MSGS (1u)
    int main(int argc, char *argv[])
    {
        vx_status status = 0;
        uint32_t i, msg, k;
    
    
        status = appInit();
    
        if(status == VX_SUCCESS)
        {
            #if 1
            for(k=0; k<NUM_ITERATIONS; k++)
            {
                for(i=0; i<APP_IPC_CPU_MAX; i++)
                {
                    if(appIpcIsCpuEnabled(i) && i != appIpcGetSelfCpuId())
                    {
                        for(msg=0; msg<NUM_MSGS; msg++)
                        {
                            status = appIpcSendNotify(1, (0xDEAD0000 | (msg & 0xFFFF)));
                            APP_PRINTF("APP IPC: Sent msg %d to CPU [%s]\n", msg+1, appIpcGetCpuName(1));
                            if(status != VX_SUCCESS)
                            {
                                printf("APP IPC: ERROR: Send msg %d to CPU [%s] failed !!!\n", msg+1, appIpcGetCpuName(1));
                                break;
                            }
                            /* appLogWaitMsecs(10); */
                        }
                    }
                }
            }
            printf("APP IPC: Waiting for all messages to get echoed from remote core...\n");
            appLogWaitMsecs(10000);
            printf("APP IPC: Waiting for all messages to get echoed ... Done.\n");
            #endif
    
            #if 1
            {
                int32_t appRemoteServiceTestRun(uint32_t cpu_id);
    
                printf("APP IPC: Running remote service test ... \n");
                for(i=0; i<APP_IPC_CPU_MAX; i++)
                {
                    if(appIpcIsCpuEnabled(i) && i != appIpcGetSelfCpuId())
                    {
                        appRemoteServiceTestRun(i);
                    }
                }
                printf("APP IPC: Running remote service test ... Done.\n");
            }
            #endif
    
            appDeInit();
        }
        printf("APP IPC: Done !!!\n");
    
        return status;
    }

  • It seems only  the pingpongs sent by    appRemoteServiceTestRun(i); are there on the other side.  Can MPU and MCU1_0 use multiple endpoints to communicate with each other?

  • Hi,

    Can MPU and MCU1_0 use multiple endpoints to communicate with each other?

    Yes, that is correct.

    In the file app_ipc.h, you can see the macros APP_IPC_TIOVX_RPMSG_PORT_ID and APP_IPC_REMOTE_SERVICE_RPMSG_PORT_ID 
    So the appIpcSendNotify and appRemoteServiceTestRun uses the respective endpoints to communicate with the cores.

    Regards,

    Nikhil

  • Thanks alot for clarifying.  I found the declarations for QNX binary. I am trying to find where is the port numbers APP_IPC_TIOVX_RPMSG_PORT_ID  and  APP_IPC_REMOTE_SERVICE_RPMSG_PORT_ID  defined in the MCU1_0 code. Where can i find them for the MCU1_0 

  • Okay got it the  mcu code is also using the same app_ipc.h. Thanks