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.

Linux: ALG: ERROR: No alg create function specified (algId = 12) !!!

Tool/software: Linux

Hi.

I'm working on porting TIDL_OD Usecase to Linux + BIOS using TDA2xx EVM.

I think the porting operation is almost finished, but the following errors occur during the execution.

// Alg_tidlpreproc
status = System_linkCreate(pObj->Alg_tidlpreprocLinkID, &pObj->Alg_tidlpreprocPrm, sizeof(pObj->Alg_tidlpreprocPrm));
UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);

ASSERT (chains_dl_od_priv.c|chains_dl_od_Create|542)

ALG: ERROR: No alg create function specified (algId = 12) !!!

I found the ALG_ID 12 is tidl_preproc. (TIDL_Preproc(A15))

I searched the forum and checked the file in "/src/common/app_init/app_init_a15.c", but it was found.

#include <system_cfg.h>
#include <src/rtos/utils_common/include/utils.h>
#include <include/link_api/system_common.h>


/*******************************************************************************
 *  Function prototypes
 *******************************************************************************
 */

#ifdef ALG_framecopy
    Int32 AlgorithmLink_FrameCopy_initPlugin(void);
#endif
#ifdef ALG_safe_framecopy
    Int32 AlgorithmLink_SafeFrameCopy_initPlugin(void);
#endif
#ifdef ALG_objectdetection
    Int32 AlgorithmLink_objectDraw_initPlugin(void);
#endif
#ifdef ALG_tidl
    Int32 AlgorithmLink_tidlpreproc_initPlugin(void);
    Int32 AlgorithmLink_tidlpostproc_initPlugin(Void);
#endif

/**
 *******************************************************************************
 *
 * \brief Application init
 *
 *******************************************************************************
 */
void App_init(void)
{
    /* Algorithms plug in init */
#ifdef ALG_framecopy
    AlgorithmLink_FrameCopy_initPlugin();
#endif
#ifdef ALG_safe_framecopy
    AlgorithmLink_SafeFrameCopy_initPlugin();
#endif
#ifdef ALG_objectdetection
    AlgorithmLink_objectDraw_initPlugin();
#endif
#ifdef ALG_tidl
    AlgorithmLink_tidlpreproc_initPlugin();
    AlgorithmLink_tidlpostproc_initPlugin();
#endif
}

/**
 *******************************************************************************
 *
 * \brief Application deinit
 *
 *******************************************************************************
 */
void App_deInit(void)
{
        /* Algorithms plug in deinit */
}

/* Nothing beyond this point */

How can i fix this error?

  • Hi,

    can you make sure that you have "ALG_tidl=yes" in cfg.mk file in your usecase. Also can you add print in AlgorithmLink_tidlpreproc_initPlugin() function to confirm that it gets called.

    Regards,
    Yordan
  • Hi, Yordan.

    Thanks for answer.

    I checked cfg.mk file and found "ALG_tidl=yes" already exist it.

    ALG_tidl=yes
    Alg_ObjectDraw=yes
    ALG_tiop=yes
    
    NEED_PROC_IPU1_0=yes
    NEED_PROC_EVE1=yes
    NEED_PROC_EVE2=yes
    NEED_PROC_EVE3=yes
    NEED_PROC_EVE4=yes
    NEED_PROC_DSP1=yes
    NEED_PROC_DSP2=yes
    NEED_PROC_A15_0=yes
    

    Tomorrow morning, i will add print() to the AlgorithmLink_tidlpreproc_initPlugin() function.

    And I'll share the results.

    In addition, are there any files that need to be written in relation to the algorithm?

    Thanks.

    tmlee.

  • Hi,

    you can go thru chapter "2 Use Case Development" in VisionSDK_DevelopmentGuide.pdf and check if you have missed something when porting your usecase.

    Also you can look at this post and following discussion, it is related to some problems faced when porting tidl to Linux, you may also need those changes:
    e2e.ti.com/.../2674121

    Regards,
    Yordan
  • Hi, Yordan.

    I've been looking all day, but I don't know why.

    I checked the document(VisionSDK_DevelopmentGuide.pdf) that you told me.

    chains_vadas_dl_od_priv.c

    When I check the source of my Usecase, dl_od_priv.c, there seems to be no problem with the link.

    Also, cfg.mk is the same as it was posted yesterday.

    Similarly, the App_init_$CORE contains TIDL-related content, as was the first post.

    The last suspect is MAKEFILE. Can you check it please?

    APP/src/hlos/MAKEFILE.MK

    include $($(MAKEAPPNAME)_PATH)/configs/cfg.mk
    DEFINE := -DA15_TARGET_OS_LINUX -DLINUX_BUILD
    apps:
    # Add Algplugins here
    ifeq ($(ALG_framecopy),yes)
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/framecopy MODNAME=$(MAKEAPPNAME) CORE=a15_0 depend
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/framecopy MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    endif
    ifeq ($(ALG_tidl),yes)
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/tidl MODNAME=$(MAKEAPPNAME) CORE=a15_0 depend
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/tidl MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    endif
    ifeq ($(ALG_tiop),yes)
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/tiop MODNAME=$(MAKEAPPNAME) CORE=a15_0 depend
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/tiop MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    endif
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/rtos/modules/osal MODNAME=$(MAKEAPPNAME) CORE=a15_0 depend
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/rtos/modules/osal MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/usecases/vadas_null_src_decode_display MODNAME=$(MAKEAPPNAME) CORE=a15_0 depend
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/usecases/vadas_null_src_decode_display MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/usecases/vadas_dl_od MODNAME=$(MAKEAPPNAME) CORE=a15_0 depend
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/usecases/vadas_dl_od MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    	
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/chains_common MODNAME=$(MAKEAPPNAME) CORE=a15_0 lib
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/chains_common MODNAME=$(MAKEAPPNAME) CORE=a15_0 exe
    
    clean:
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/usecases/vadas_null_src_decode_display MODNAME=$(MAKEAPPNAME) CORE=a15_0 clean
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/usecases/vadas_dl_od MODNAME=$(MAKEAPPNAME) CORE=a15_0 clean
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/chains_common MODNAME=$(MAKEAPPNAME) CORE=a15_0 clean
    # Clean Algplugins here
    ifeq ($(ALG_framecopy),yes)
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/framecopy MODNAME=$(MAKEAPPNAME) CORE=a15_0 clean
    endif
    ifeq ($(ALG_tidl),yes)
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/tidl MODNAME=$(MAKEAPPNAME) CORE=a15_0 clean
    endif
    ifeq ($(ALG_tiop),yes)
    	$(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/hlos/alg_plugins/tiop MODNAME=$(MAKEAPPNAME) CORE=a15_0 clean
    endif
    all: clean apps
    
    .PHONY: apps clean all

    And, APP/src/hlos/alg_plugins/tidl/MAKEFILE.MK

    include $(vision_sdk_PATH)/build/hlos/makerules/linux/common_header_a15.mk
    
    INCLUDE+= -I$(vision_sdk_PATH)/../ti_components/algorithms/REL.TIDL.01.01.03.00 -I$(vision_sdk_PATH)/../ti_components/algorithms/REL.TIDL.01.01.03.00/modules
    INCLUDE+= -I$(vision_sdk_PATH)/../ti_components/algorithms/REL.TIDL.01.01.03.00/modules -I$(vision_sdk_PATH)/../ti_components/algorithms/REL.TIDL.01.01.03.00/modules/ti_dl
    INCLUDE+= -I$(vision_sdk_PATH)/../ti_components/algorithms/REL.TIDL.01.01.03.00/modules/ti_dl/inc -I$(vision_sdk_PATH)/../ti_components/algorithms/REL.TIDL.01.01.03.00/common
    INCLUDE+= -I$(ipc_PATH)/hlos_common/include -I$(ipc_PATH)/packages -I$(kernel_PATH)/include/generated/uapi $(OSA_INC) -I$(ipc_PATH)/linux/include -I$($(MAKEAPPNAME)_PATH)
    
    LIBS += $(LIB_BASE_DIR)/$(MAKEAPPNAME).a
    LIBS += $(shell cat $(DEST_ROOT)/appLiblist_a15_0.txt)
    
    include $(vision_sdk_PATH)/build/hlos/makerules/linux/common_footer_a15.mk
    

    If there is any problem, please let me know.

    Thanks.

    tmlee.

  • Hi,

    You need to call the init function of algorithmlink from links_fw/src/hlos/links_a15/algorithm/algorithmLink_cfg.c file.

    Regards,
    Anuj
  • Hi, Anuj.

    Thanks for answer.

    Tomorrow morning, i will check this file.

    And I'll share the results.

    Regards,

    tmlee

  • Hi, Anuj.

    I checked " links_fw/src/hlos/links_a15/algorithm/algorithmLink_cfg.c" file, and add TIDL option.
    But, the result is same error.

    #include <system_cfg.h>
    #include "algorithmLink_priv.h"
    #include "algorithmLink_cfg.h"
    #include <include/link_api/algorithmLink.h>
    
    #ifdef ALG_framecopy
    #include <include/alglink_api/algorithmLink_frameCopy.h>
    #endif
    
    #ifdef ALG_tidl
    #include <include/alglink_api/algorithmLink_tidlpreproc.h>
    #include <include/alglink_api/algorithmLink_tidl.h>
    #endif
    
    AlgorithmLink_FuncTable gAlgorithmLinkFuncTable[ALGORITHM_LINK_ALG_MAXNUM];
    
    AlgorithmLink_Obj gAlgorithmLink_obj[ALGORITHM_LINK_OBJ_MAX];
    
    Int32 AlgorithmLink_initAlgPlugins(void)
    {
        memset(gAlgorithmLinkFuncTable, 0, sizeof(gAlgorithmLinkFuncTable));
    
        /** For all alorithms on A15 */
    #ifdef ALG_framecopy
        AlgorithmLink_FrameCopy_initPlugin();
    #endif
    
    #ifdef ALG_openclframecopy
        AlgorithmLink_OpenCLFrameCopy_initPlugin();
    #endif
    
    #ifdef ALG_opencvcanny
        AlgorithmLink_OpenCVCanny_initPlugin();
    #endif
    
    #ifdef ALG_opencvopencldilation
        AlgorithmLink_OpenCVOpenCLDilation_initPlugin();
    #endif
    
    #ifdef ALG_tidl
        AlgorithmLink_tidlpreproc_initPlugin();
        AlgorithmLink_tidlpostproc_initPlugin();
    #endif
    
        return SYSTEM_LINK_STATUS_SOK;
    }

    In addition, I checked the "links_fw/include/config/my_app/tda2xx_evm_linux_all/system_cfg" file, but no definition related to TIDL.

    #ifndef SYSTEM_CFG_H
    #define SYSTEM_CFG_H
    
     /* Alg-plugin links and functions included in build */
    
    
     /* Use-cases included in build */
    
    #define UC_nullSrc_display
    #define UC_dl_od
    
    #endif /* _CFG_H */

    Maybe there is more my mistake.
    I'll check it a little more and update this thread.

    If there is anything you can refer to me, I would appreciate it if you let me know.

    Regards,

    tmlee

  • Hi, Anuj.

    I've been working on it all day, but I haven't succeeded.

    1. "links_fw/include/config/my_app/tda2xx_evm_linux_all/system_cfg" file, but no definition related to TIDL.
    -> The cfg.mk file has been modified and resolved.

    2. " links_fw/src/hlos/links_a15/algorithm/algorithmLink_cfg.c" add tidl function
    -> but a build error has occurred.
    The contents of the file are the same as in the post above.
    How do I fix this error??

    # vadas_app: tda2xx-evm: Linking
    /home/user/tda2x/vision_sdk/binaries/my_app/tda2xx_evm_linux_all/lib/tda2xx-evm/a15_0/release/links_a15_algorithm.a(algorithmLink_cfg.o): In function `AlgorithmLink_initAlgPlugins':
    algorithmLink_cfg.c:(.text+0x14): undefined reference to `AlgorithmLink_tidlpreproc_initPlugin'
    collect2: error: ld returned 1 exit status
    make[5]: *** [exe] Error 1
    make[4]: *** [apps] Error 2
    make[3]: *** [my_apps_exe_hlos] Error 2
    make[2]: *** [my_app_hlos] Error 2
    make[1]: *** [my_app] Error 2
    make: *** [vision_sdk] Error 2


    Thanks.
    tmlee.

  • Hi,

    As you are getting the below linking error that means ALG_tidl is defined so it calling init function but somehow you are not building you link files.
    Can you put some error in your alg_plugin.c file and check whether you get that error or not.
    Check your make file also.

    Regards,
    Anuj
  • Hi, Anuj.

    TIDL_Preproc has been modified to run on IPU instead of A15.

    After modify, solved the problem.with rebuild after make clean.

    Thanks.