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.

Compiler/TDA2PXEVM: Linux: Assertion while creating new plugin in linux:

Part Number: TDA2PXEVM

Tool/software: TI C/C++ Compiler

Hi all,

I created new plugin which for DSP1 and my usecase is as follows:

NullSource (A15) -> Decode -> VPE -> Alg_plugin (DSP1) -> Display

I have created plugin in rtos and my usecase is in hlos/adas/src/usecases .

I'm getting following assertion.

 [HOST] [HOST  ]     77.551302 s:  IPC_OUT_0   : Create in progress !!!
 [HOST] [HOST  ]     77.551363 s:  IPC_OUT_0   : Create Done !!!
 [HOST] [IPU2  ]     77.551515 s:  IPC_IN_0   : Create in progress !!!
 [HOST] [IPU2  ]     77.552705 s:  IPC_IN_0   : Create Done !!!
 [HOST] [IPU2  ]     77.553162 s:  DECODE: Create in progress ... !!!
 [HOST] [IPU2  ]     77.762856 s:  DECODE: Creating CH0 of 1280 x 720 [1] [0],target bitrate = 10000 Kbps ...
 [HOST] [IPU2  ]     77.763771 s:  DECODE: All CH Create ... DONE !!!
 [HOST] [IPU2  ]     77.765875 s:  DECODE: Create ... DONE !!!
 [HOST] [IPU2  ]     77.766363 s:  VPE: Create in progress !!!
 ASSERT (chains_nullSrc_Display_priv.c|chains_nullSrc_Display_Create|190)
 [HOST] [DSP1  ]     77.901238 s:  IPC_IN_0   : Create in progress !!!
 [HOST] [DSP1  ]     77.901665 s:  IPC_IN_0   : Create Done !!!
 [HOST] [DSP1  ]     77.901878 s:  ALG: ERROR: Invalid alg ID specified  (algId = 42) !!!
 [HOST] [IPU2  ]     77.899682 s:  VPE: Loading Down-scaling Co-effs
 [HOST] [IPU2  ]     77.899926 s:  VPE: Co-effs Loading ... DONE !!!
 [HOST] [IPU2  ]     77.900170 s:  VPE: Create Done !!!
 [HOST] [IPU2  ]     77.900567 s:  IPC_OUT_0   : Create in progress !!!
 [HOST] [IPU2  ]     77.900902 s:  IPC_OUT_0   : Create Done !!!

Can you please suggest me solution for this?

  • Hi,

    Please check value of ALGORITHM_LINK_DSP_ALG_MAXNUM and this should be higher than your new algorithm ID.

    Generally we assign ALGORITHM_LINK_DSP_ALG_MAXNUM's value to new alg id and increase ALGORITHM_LINK_DSP_ALG_MAXNUM by 1.

    Regards,

    Anuj

  • yes ALGORITHM_LINK_DSP_ALG_MAXNUM value is higher than new algorithm ID.

    I changed core from DSP1 to A15 and changed files accordingly but still getting following assertion. [HOST] [HOST  ]     46.536844 s:  IPC_OUT_0   : Create in progress !!!
     [HOST] [HOST  ]     46.536905 s:  IPC_OUT_0   : Create Done !!!
     [HOST] [IPU2  ]     46.537089 s:  IPC_IN_0   : Create in progress !!!
     [HOST] [IPU2  ]     46.538278 s:  IPC_IN_0   : Create Done !!!
     [HOST] [IPU2  ]     46.538705 s:  DECODE: Create in progress ... !!!
     [HOST] [IPU2  ]     46.745379 s:  DECODE: Creating CH0 of 1280 x 720 [1] [0],target bitrate = 10000 Kbps ...
     [HOST] [IPU2  ]     46.746263 s:  DECODE: All CH Create ... DONE !!!
     [HOST] [IPU2  ]     46.748276 s:  DECODE: Create ... DONE !!!
     [HOST] [IPU2  ]     46.748703 s:  VPE: Create in progress !!!
     [HOST] algId = 15  ALGORITHM_LINK_ALG_MAXNUM = 16 ASSERT (chains_nullSrc_Display_priv.c|chains_nullSrc_Display_Create|190)
     [HOST] [HOST  ]     46.881778 s:  IPC_IN_0   : Create in progress !!!
     [HOST] [HOST  ]     46.882236 s:  IPC_IN_0   : Create Done !!!
     [HOST] [HOST  ]     46.882327 s:  ALG: ERROR: No alg create function specified  (algId = 15) !!!
     [HOST] [IPU2  ]     46.880314 s:  VPE: Loading Down-scaling Co-effs
     [HOST] [IPU2  ]     46.880558 s:  VPE: Co-effs Loading ... DONE !!!
     [HOST] [IPU2  ]     46.880772 s:  VPE: Create Done !!!
     [HOST] [IPU2  ]     46.881168 s:  IPC_OUT_0   : Create in progress !!!
     [HOST] [IPU2  ]     46.881504 s:  IPC_OUT_0   : Create Done !!!



    Any other linux specific changes needed to be done?

  • Hi,

    If you move this alg link to A15 then you have to create a new link on hlos side.

    From the above error it seems its init function is not being called where you assign all calback function for create process and delete.

    Regards,

    Anuj

  • Hi Anuj,

    I created the same plugin on hlos side and called the init function in algorithmLink_cfg.c file but getting following error while compilation.

    /home/megha/VSDK_3_7/vision_sdk/binaries/apps/tda2px_evm_linux_all/lib/tda2px-evm/a15_0/release/links_a15_algorithm.a(algorithmLink_cfg.o): In function `AlgorithmLink_initAlgPlugins':
    algorithmLink_cfg.c:(.text+0x18): undefined reference to `AlgorithmLink_SurroundView3d_initPlugin'
    collect2: error: ld returned 1 exit status
    /home/megha/VSDK_3_7/vision_sdk/build/hlos/makerules/linux/common_footer_a15.mk:93: recipe for target 'exe' failed
    make[6]: *** [exe] Error 1

  • Hi,

    Please refer below alg plugin

    vision_sdk\apps\src\hlos\adas\src\alg_plugins\framecopy

    You are getting undefined reference that means you have not defined AlgorithmLink_SurroundView3d_initPlugin function in correct file.

    Regards,

    Anuj

  • Thanks for the reply.

    I referred the framecopy plugin but still i'm facing following issue while adding plugin in MAKEFILE_adas.MK.

    '/home/megha/VSDK_3_7/vision_sdk/binaries/apps/tda2px_evm_linux_all/obj/vision_sdk/tda2px-evm/ipu2/release/vision_sdk_configuro/osa_mem_map.h' -> '/home/megha/VSDK_3_7/vision_sdk/links_fw/src/hlos/osa/include/osa_mem_map.h'
    # links_a15_algorithm: tda2px-evm: Compiling algorithmLink_cfg.c
    # links_a15_algorithm: tda2px-evm: Creating archive links_a15_algorithm.a
    # system: tda2px-evm: Compiling system_common.c
    # system: tda2px-evm: Compiling system_ipc.c
    # osa: tda2px-evm: Compiling osa_mem.c
    # osa: tda2px-evm: Compiling osa_remote_log_client.c
    # osa: tda2px-evm: Compiling osa_remote_log_server.c
    # system: tda2px-evm: Creating archive system.a
    # osa: tda2px-evm: Creating archive osa.a
    make[6]: MAKEFILE.MK: No such file or directory
    make[6]: *** No rule to make target 'MAKEFILE.MK'.  Stop.
    MAKEFILE_adas.MK:14: recipe for target 'vision_sdk_linux_demo' failed
    make[5]: *** [vision_sdk_linux_demo] Error 2
    MAKEFILE_adas.MK:5: recipe for target 'apps' failed
    make[4]: *** [apps] Error 2
    Makefile:187: recipe for target 'apps_exe_hlos' failed
    make[3]: *** [apps_exe_hlos] Error 2
    Makefile:68: recipe for target 'apps_hlos' failed
    make[2]: *** [apps_hlos] Error 2
    Makefile:38: recipe for target 'apps' failed
    make[1]: *** [apps] Error 2
    Makefile:12: recipe for target 'vision_sdk' failed
    make: *** [vision_sdk] Error 2

    and algorithmLink_surroundView3d.h is not getting added in MAKEFILE.DEPEND.

    Please suggest me the solution to resolve my issue.

  • Hi Anuj,

    I created plugin in hlos and it worked for A15 successfully.

    But I want that plugin to work for DSP1. I made corresponding changes in usecase but it is giving following assertion in runtime:

     [HOST] [HOST  ]     49.126913 s:  IPC_OUT_0   : Create in progress !!!
     [HOST] [HOST  ]     49.126974 s:  IPC_OUT_0   : Create Done !!!
     [HOST] [IPU2  ]     49.127127 s:  IPC_IN_0   : Create in progress !!!
     [HOST] [IPU2  ]     49.128377 s:  IPC_IN_0   : Create Done !!!
     [HOST] [IPU2  ]     49.128774 s:  DECODE: Create in progress ... !!!
     [HOST] [IPU2  ]     49.338803 s:  DECODE: Creating CH0 of 1280 x 720 [1] [0],target bitrate = 10000 Kbps ...
     [HOST] [IPU2  ]     49.339687 s:  DECODE: All CH Create ... DONE !!!
     [HOST] [IPU2  ]     49.341731 s:  DECODE: Create ... DONE !!!
     [HOST] [IPU2  ]     49.342127 s:  VPE: Create in progress !!!
     ASSERT (chains_nullSrc_Display_priv.c|chains_nullSrc_Display_Create|220)
     [HOST] [DSP1  ]     49.477032 s:  IPC_IN_0   : Create in progress !!!
     [HOST] [DSP1  ]     49.477490 s:  IPC_IN_0   : Create Done !!!
     [HOST] [DSP1  ]     49.477703 s:  ALG: ERROR: Invalid alg ID specified  (algId = 42) !!!
     [HOST] [IPU2  ]     49.475599 s:  VPE: Loading Down-scaling Co-effs
     [HOST] [IPU2  ]     49.475843 s:  VPE: Co-effs Loading ... DONE !!!
     [HOST] [IPU2  ]     49.476056 s:  VPE: Create Done !!!
     [HOST] [IPU2  ]     49.476422 s:  IPC_OUT_0   : Create in progress !!!
     [HOST] [IPU2  ]     49.476758 s:  IPC_OUT_0   : Create Done !!!

    The value of ALGORITHM_LINK_DSP_ALG_MAXNUM is 43 and ALGORITHM_LINK_DSP_ALG_SURROUNDVIEW3D = 42.

    What changes do I need to do to resolve this issue.

  • Can anybody suggest the answer?

  • Hi,

    if(algId>=ALGORITHM_LINK_ALG_MAXNUM)
       {
           Vps_printf(" ALG: ERROR: Invalid alg ID specified "
                      " (algId = %d) !!!\n", pObj->algId);

           status = SYSTEM_LINK_STATUS_EINVALID_PARAMS;
       }

    Print the value of "ALGORITHM_LINK_ALG_MAXNUM" in Vps_printf & let me know the value of this macro

    filename: links_fw/src/rtos/links_common/algorithm/algorithmLink_tsk.c

    Regards

    Gaviraju