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.

TDA4VM: Creating OPENVX node on MCU2_1, Linux program crashes during vxGetStatus node in the create phase

Part Number: TDA4VM

HI ti

   I used the following py script to generate the node code for MCU 2,

which has been registered in the main application. After calling the node, I obtained the node status, but the program crashed. Below is the printed result that appeared using the gdb tool。

GDB tools error:

and I would like to know how to correctly configure openvx tasks on MCU2_1, and whether the steps are the same as those for chips such as c66

THANKS

  • Hi,

    The steps should be the same as registering a kernel on other cores.

    Could you share the application logs along with the remote core log (i.e. first run ./vision_apps_init.sh and then run the application)

    Please share this in the form of .txt file (instead of screenshot) for better reviewability.

    Regards,

    Nikhil

  • HI,

         The following is the script code I registered with c66 using a py script

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    byd_mcu21.py
    /********************************************************************************/
    from tiovx import *
    code_MCU2_1 = KernelExportCode("byd_mcu21", Core.C66, "VISION_APPS_PATH")
    code_MCU2_1.setCoreDirectory( "C66" )
    kernel_vdSelect_MCU2_1 = Kernel("byd_vdSelect_MCU2_1")
    kernel_vdSelect_MCU2_1.setParameter(Type.USER_DATA_OBJECT, Direction.INPUT, ParamState.REQUIRED, "INPUT", ['tivx_mcu21_test'])
    kernel_vdSelect_MCU2_1.setParameter(Type.USER_DATA_OBJECT, Direction.OUTPUT, ParamState.REQUIRED, "OUTPUT", ['tivx_mcu21_test'])
    kernel_vdSelect_MCU2_1.setTarget(Target.DSP2)
    code_MCU2_1.export(kernel_vdSelect_MCU2_1)
    tda4_sdk_v0806\tda4_rtos\vision_apps\platform\j721e\rtos\concerto_c6x_inc.mak
    /********************************************************************************/
    IDIRS+=$(VISION_APPS_PATH)/kernels/byd_mcu21/include
    STATIC_LIBS += vx_target_kernels_byd_mcu21_C66
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

         The following is the script code I registered in MCU2_1 using a py script

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    byd_mcu21.py
    /********************************************************************************/
    from tiovx import *
    code_MCU2_1 = KernelExportCode("byd_mcu21", Core.IPU, "VISION_APPS_PATH")
    code_MCU2_1.setCoreDirectory( "IPU" )
    kernel_vdSelect_MCU2_1 = Kernel("byd_vdSelect_MCU2_1")
    kernel_vdSelect_MCU2_1.setParameter(Type.USER_DATA_OBJECT, Direction.INPUT, ParamState.REQUIRED, "INPUT", ['tivx_mcu21_test'])
    kernel_vdSelect_MCU2_1.setParameter(Type.USER_DATA_OBJECT, Direction.OUTPUT, ParamState.REQUIRED, "OUTPUT", ['tivx_mcu21_test'])
    kernel_vdSelect_MCU2_1.setTarget(Target.MCU2_1)
    code_MCU2_1.export(kernel_vdSelect_MCU2_1)
    vision_apps\platform\j721e\rtos\concerto_r5f_inc.mak
    /********************************************************************************/
    IDIRS+=$(VISION_APPS_PATH)/kernels/byd_mcu21/include
    STATIC_LIBS += vx_target_kernels_byd_mcu21_IPU
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

        Here is the printed part registered on c66, and you can see that there are no errors

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [MCU2_0] 3274.344205 s: CIO: Init ... Done !!!
    [MCU2_0] 3274.344277 s: ### CPU Frequency = 1000000000 Hz
    [MCU2_0] 3274.344315 s: CPU is running FreeRTOS
    [MCU2_0] 3274.344342 s: APP: Init ... !!!
    [MCU2_0] 3274.344364 s: SCICLIENT: Init ... !!!
    [MCU2_0] 3274.344756 s: SCICLIENT: DMSC FW version [8.6.3--v08.06.03 (Chill Capybar]
    [MCU2_0] 3274.344812 s: SCICLIENT: DMSC FW revision 0x8
    [MCU2_0] 3274.344848 s: SCICLIENT: DMSC FW ABI revision 3.1
    [MCU2_0] 3274.344885 s: SCICLIENT: Init ... Done !!!
    [MCU2_0] 3274.344912 s: UDMA: Init ... !!!
    [MCU2_0] 3274.346722 s: UDMA: Init ... Done !!!
    [MCU2_0] 3274.346787 s: MEM: Init ... !!!
    [MCU2_0] 3274.346829 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ d9000000 of size 16777216 bytes !!!
    [MCU2_0] 3274.346903 s: MEM: Created heap (L3_MEM, id=1, flags=0x00000000) @ 3600000 of size 262144 bytes !!!
    [MCU2_0] 3274.346965 s: MEM: Init ... Done !!!
    [MCU2_0] 3274.346991 s: IPC: Init ... !!!
    [MCU2_0] 3274.347050 s: IPC: 6 CPUs participating in IPC !!!
    [MCU2_0] 3274.347101 s: IPC: Waiting for HLOS to be ready ... !!!
    [MCU2_0] 3282.931037 s: IPC: HLOS is ready !!!
    [MCU2_0] 3282.946527 s: IPC: Init ... Done !!!
    [MCU2_0] 3282.946591 s: APP: Syncing with 5 CPUs ... !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

       Here is the printed part registered on MCU, and you can see that there are have errors

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [MCU2_0] 862.908919 s: CIO: Init ... Done !!!
    [MCU2_0] 862.908991 s: ### CPU Frequency = 1000000000 Hz
    [MCU2_0] 862.909031 s: CPU is running FreeRTOS
    [MCU2_0] 862.909059 s: APP: Init ... !!!
    [MCU2_0] 862.909083 s: SCICLIENT: Init ... !!!
    [MCU2_0] 862.909360 s: SCICLIENT: DMSC FW version [8.6.3--v08.06.03 (Chill Capybar]
    [MCU2_0] 862.909427 s: SCICLIENT: DMSC FW revision 0x8
    [MCU2_0] 862.909463 s: SCICLIENT: DMSC FW ABI revision 3.1
    [MCU2_0] 862.909501 s: SCICLIENT: Init ... Done !!!
    [MCU2_0] 862.909529 s: UDMA: Init ... !!!
    [MCU2_0] 862.911114 s: UDMA: Init ... Done !!!
    [MCU2_0] 862.911173 s: MEM: Init ... !!!
    [MCU2_0] 862.911213 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ d9000000 of size 16777216 bytes !!!
    [MCU2_0] 862.911289 s: MEM: Created heap (L3_MEM, id=1, flags=0x00000000) @ 3600000 of size 262144 bytes !!!
    [MCU2_0] 862.911350 s: MEM: Init ... Done !!!
    [MCU2_0] 862.911374 s: IPC: Init ... !!!
    [MCU2_0] 862.911449 s: IPC: 6 CPUs participating in IPC !!!
    [MCU2_0] 862.911501 s: IPC: Waiting for HLOS to be ready ... !!!
    [MCU2_0] 871.437478 s: IPC: HLOS is ready !!!
    [MCU2_0] 871.453310 s: IPC: Init ... Done !!!
    [MCU2_0] 871.453379 s: APP: Syncing with 5 CPUs ... !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I connected the created nodes to one of the graphs in our original program, but there was an error in mcu2. Could you please help me confirm the issue

  • Hi,

    [MCU2_1] 897.282608 s: VX_ZONE_ERROR:[ownTargetKernelInstanceAlloc:116] kernel com.ti.byd_mcu21.byd_vdselect_mcu2_1 has not been registered on this CPU
    [MCU2_1] 897.282693 s: VX_ZONE_ERROR:[ownTargetKernelInstanceAlloc:117] Please register this kernel on the appropriate target core
    [MCU2_1] 897.282760 s: VX_ZONE_ERROR:[ownTargetNodeDescNodeCreate:761] target_kernel_instance is NULL

    The above error is because you kernel is not registered on MCU2_1

    Could you put a print in the generated Add function inside "tivxRegisterBydMcu21TargetIpuKernels()" and see if the prints are seen from [MCU2_1]?

    Also you should add "kernel.setTarget(Target.MCU2_1)" in your python script.

    Regards,

    Nikhil

  • HI ti:

    At present, I am able to create nodes on MCU2 and loop through them.

    Previously, the reason for my failure was that I was in # define MCU2_1 in vision.apps/platform/j721e/rtos/common/app_cfg_mcu2-1. h

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    tda4_sdk_v0806\tda4_rtos\vision_apps\platform\j721e\rtos\common\app_cfg_mcu2_1.h
    /*******************************************************************************/
    #ifndef APP_CFG_MCU2_1_H_
    #define APP_CFG_MCU2_1_H_
    #include <app_cfg.h>
    #define L3_MEM_SIZE (MAIN_OCRAM_MCU2_1_SIZE)
    #define DDR_HEAP_MEM_SIZE (DDR_MCU2_1_LOCAL_HEAP_SIZE)
    #define ENABLE_FVID2
    #define ENABLE_VHWA_DMPAC
    #define MCU2_1
    #endif /* APP_CFG_MCU2_1_H_ */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And the following code has been added under app init. c:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    tda4_sdk_v0806\tda4_rtos\vision_apps\platform\j721e\rtos\common\app_init.c
    /*******************************************************************************/
    static void appRegisterOpenVXTargetKernels()
    {
    #ifdef ENABLE_TIOVX
    appLogPrintf("APP: OpenVX Target kernel init ... !!!\n");
    #ifdef ENABLE_VHWA_VPAC
    tivxRegisterHwaTargetVpacMscKernels();
    tivxRegisterHwaTargetVpacLdcKernels();
    tivxRegisterHwaTargetVpacVissKernels();
    tivxRegisterHwaTargetVpacNfKernels();
    tivxRegisterHwaTargetArmKernels();
    #endif
    #ifdef ENABLE_VHWA_DMPAC
    tivxRegisterHwaTargetDmpacSdeKernels();
    tivxRegisterHwaTargetDmpacDofKernels();
    tivxRegisterBydMcu21TargetIpuKernels();
    appLogPrintf("wjh test using MCU2_1 !!!\n");
    #endif
    #ifdef ENABLE_CSI2RX
    tivxRegisterHwaTargetCaptureKernels();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    You can see that I originally registered under # ifdef MCU2_1. I think this way, I can only register on the MCU2 core, but the registration was not successful.

    I registered under # ifdef ENABLE_VHWA-DMPAC later, and that's it.

    I want to know what I should do if I want to define a separate define for registration, similar to this