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.

PROCESSOR-SDK-TDAX: Vision SDK UseCase generation example

Part Number: PROCESSOR-SDK-TDAX


Hi,

I am trying to get familiarize with Vision SDK. I created a new usecase in path :~/VISION_SDK_02_12_00_00/vision_sdk$ ls examples/tda2xx/src/usecases/new_usecase/

created a chains_new_usecase.txt in that folder and the content  of this files is

UseCase: new_usecase

Capture -> Alg_FrameCopy (A15) -> Display_Video
GrpxSrc -> Display_Grpx

the issued the command to generate .c and .h files

$INSTALL_DIR/vision_sdk/build/scripts/vsdk_linux.out -img -file chains_new_usecase.txt

Then created a SRC_FILES.MK in that folder with content


SRCDIR += $(vision_sdk_PATH)/examples/tda2xx/src/usecases/new_usecase

SRCS_$(IPU_PRIMARY_CORE) += \
chains_new_usecase.c \
chains_new_usecase_priv.c

Then include the project in examples Makefile like this

include $(MODULE_SRC_BASE_PATH)/usecases/new_usecase/SRC_FILES.MK

After than when i issue make -s -j command its showing error

tij6@tij6-desktop:~/VISION_SDK_02_12_00_00/vision_sdk$ make -s -j
Linux
make[4]: *** No rule to make target `chains_new_usecase.c', needed by `/home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/obj/vision_sdk_examples/tda2xx-evm/ipu2/release/chains_new_usecase.oem4'. Stop.
make[3]: *** [ipu2] Error 2
make[2]: *** [examples] Error 2
make[1]: *** [vision_sdk_examples] Error 2
make: *** [vision_sdk] Error 2

I just generated the files new_usecase_priv.h and new_usecase_priv.c didnt add any extra code any file. i created this with reference to vip_single_cam_frame_copy project 

  • Hi Ganesh,

    To create a new linux use case you should add the folder to vision_sdk\hlos\examples\adas\src\usecases and modify the make system accordingly.
    You can refer to one use case say lvds_vip_multi_cam_2mp_3d_srv as an example.

    Regards,
    Rishabh
  • Hi Ganseh,

    In addition to what Rishabh said: you need to create "chains_new_usecase.c" yourself.
    The usecase gen tools create only [use case name]_priv.h and [use case name]_priv.c files.
    You can refer to /vision_sdk/examples/tda2xx/src/usecases/vip_single_cam_view or any other similar usecase.

    You can check also this post:
    e2e.ti.com/.../1982716

    and also:
    /vision_sdk/docs/FeatureSpecificUserGuides/VisionSDK_Overview_UsecaseGen.pdf

    Regards,
    Yordan
  • Hi Rishabh,
    The example you suggested "lvds_vip_multi_cam_2mp_3d_srv " is not available in adas folder

    I followed the same steps which i followed previously in adas folder
    created a new usecase at the location ~/VISION_SDK_02_12_00_00/vision_sdk/hlos/examples/adas/src/usecases/new_usecase

    copied Makefile and chains_new_usecase.txt contents from example lvds_vip_multi_cam_3d_srv generated the files for that folder

    chains_new_usecase_img.txt chains_new_usecase_priv.h
    chains_new_usecase.jpg chains_new_usecase.txt MAKEFILE.MK
    chains_new_usecase_priv.c

    edited MAKEFILE_adas.MK in ~/VISION_SDK_02_12_00_00/vision_sdk/hlos/examples and added
    ifeq ($(UC_new_usecase),yes)
    $(MAKE) -fMAKEFILE.MK -C$(vision_sdk_PATH)/hlos/examples/adas/src/usecases/new_usecase MODULE=vision_sdk_linux_demo $(TARGET)
    endif

    and then when i issue the make command this is the output i am getting

    tij6@tij6-desktop:~/VISION_SDK_02_12_00_00/vision_sdk$ make -s -j
    Linux
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Making tda2xx-evm:c66xdsp_1:release:vision_sdk_lib...
    # Making tda2xx-evm:c66xdsp_2:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_2:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_1:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_3:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_4:release:vision_sdk_lib...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_2_release.xe66...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_1_release.xearp32F...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_3_release.xearp32F...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_2_release.xearp32F...
    #
    #
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_4_release.xearp32F...
    #
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_4_release.xearp32F created.
    #
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_2_release.xearp32F created.
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_3_release.xearp32F created.
    #
    #
    Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_2_release.xearp32F.
    Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_4_release.xearp32F.Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_3_release.xearp32F.

    File conversion complete!
    File conversion complete!
    File conversion complete!
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_1_release.xearp32F created.
    #
    Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_1_release.xearp32F.
    File conversion complete!
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66 created.
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_2_release.xe66 created.
    #
    #


    Converting binary file [/home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/AppImage] to C array ... Done. (1767324 bytes)
    # Invoking configuro...
    # Configuro done!
    # Making tda2xx-evm:ipu2:release:vision_sdk_lib...
    # Making tda2xx-evm:ipu2:release:sbl_lib...
    # Compiling tda2xx-evm:ipu2:release:vision_sdk: src/eve_firmware.c
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_ipu2_release.xem4...
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_ipu2_release.xem4 created.
    #
    # vision_sdk_linux_lib: tda2xx-evm: Compiling system_ipc.c
    # vision_sdk_linux_lib: tda2xx-evm: Creating archive vision_sdk_linux_lib.a
    # vision_sdk_linux_lib: tda2xx-evm: Compiling osa_mem.c
    # vision_sdk_linux_lib: tda2xx-evm: Compiling osa_remote_log_client.c
    # vision_sdk_linux_lib: tda2xx-evm: Compiling osa_remote_log_server.c
    # vision_sdk_linux_lib: tda2xx-evm: Creating archive vision_sdk_linux_lib.a
    # vision_sdk_linux_demo: tda2xx-evm: Linking
    # Final executable /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm//vision_sdk_linux_demo.out !!!
    #
    tij6@tij6-desktop:~/VISION_SDK_02_12_00_00/vision_sdk$

    I couldnt see any compiling or linking on new_usecase. Do i need to configure it in somewhere else. Is the any document mentioning this?
  • Hi Rishabh,
    The example you suggested "lvds_vip_multi_cam_2mp_3d_srv " is not available in adas folder

    I followed the same steps which i followed previously in adas folder
    created a new usecase at the location ~/VISION_SDK_02_12_00_00/vision_sdk/hlos/examples/adas/src/usecases/new_usecase

    copied Makefile and chains_new_usecase.txt contents from example lvds_vip_multi_cam_3d_srv generated the files for that folder

    chains_new_usecase_img.txt chains_new_usecase_priv.h
    chains_new_usecase.jpg chains_new_usecase.txt MAKEFILE.MK
    chains_new_usecase_priv.c

    edited MAKEFILE_adas.MK in ~/VISION_SDK_02_12_00_00/vision_sdk/hlos/examples and added
    ifeq ($(UC_new_usecase),yes)
    $(MAKE) -fMAKEFILE.MK -C$(vision_sdk_PATH)/hlos/examples/adas/src/usecases/new_usecase MODULE=vision_sdk_linux_demo $(TARGET)
    endif

    and then when i issue the make command this is the output i am getting

    tij6@tij6-desktop:~/VISION_SDK_02_12_00_00/vision_sdk$ make -s -j
    Linux
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Invoking configuro...
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Configuro done!
    # Making tda2xx-evm:c66xdsp_1:release:vision_sdk_lib...
    # Making tda2xx-evm:c66xdsp_2:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_2:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_1:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_3:release:vision_sdk_lib...
    # Making tda2xx-evm:arp32_4:release:vision_sdk_lib...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_2_release.xe66...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_1_release.xearp32F...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_3_release.xearp32F...
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_2_release.xearp32F...
    #
    #
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_4_release.xearp32F...
    #
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_4_release.xearp32F created.
    #
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_2_release.xearp32F created.
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_3_release.xearp32F created.
    #
    #
    Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_2_release.xearp32F.
    Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_4_release.xearp32F.Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_3_release.xearp32F.

    File conversion complete!
    File conversion complete!
    File conversion complete!
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_1_release.xearp32F created.
    #
    Parsing the input object file, /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_arp32_1_release.xearp32F.
    File conversion complete!
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66 created.
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_2_release.xe66 created.
    #
    #


    Converting binary file [/home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/AppImage] to C array ... Done. (1767324 bytes)
    # Invoking configuro...
    # Configuro done!
    # Making tda2xx-evm:ipu2:release:vision_sdk_lib...
    # Making tda2xx-evm:ipu2:release:sbl_lib...
    # Compiling tda2xx-evm:ipu2:release:vision_sdk: src/eve_firmware.c
    # Linking into /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_ipu2_release.xem4...
    #
    #
    # /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm/vision_sdk_ipu2_release.xem4 created.
    #
    # vision_sdk_linux_lib: tda2xx-evm: Compiling system_ipc.c
    # vision_sdk_linux_lib: tda2xx-evm: Creating archive vision_sdk_linux_lib.a
    # vision_sdk_linux_lib: tda2xx-evm: Compiling osa_mem.c
    # vision_sdk_linux_lib: tda2xx-evm: Compiling osa_remote_log_client.c
    # vision_sdk_linux_lib: tda2xx-evm: Compiling osa_remote_log_server.c
    # vision_sdk_linux_lib: tda2xx-evm: Creating archive vision_sdk_linux_lib.a
    # vision_sdk_linux_demo: tda2xx-evm: Linking
    # Final executable /home/tij6/VISION_SDK_02_12_00_00/vision_sdk/binaries/tda2xx_evm_linux_all/vision_sdk/bin/tda2xx-evm//vision_sdk_linux_demo.out !!!
    #
    tij6@tij6-desktop:~/VISION_SDK_02_12_00_00/vision_sdk$

    I couldnt see any compiling or linking on new_usecase. Do i need to configure it in somewhere else. Is the any document mentioning this?
  • Hi Ganesh,

    You need to enable use case for TDA2xx linux build i.e. you should modify uc_cfg.mk in vision_sdk/configs/tda2xx_evm_linux_all folder.
    E.g. UC_lvds_vip_multi_cam_3d_srv=yes

    Regards,
    Rishabh
  • Hi Rishabh,

    The contents of uc_cfg.mk is like this, i added new usecase to it

    ifeq ($(AVBRX_INCLUDE),yes)

    UC_avb_rx_multi_cam_decode_sgx_display=yes

    UC_avb_rx_multi_cam_3d_srv=yes

    endif

    UC_lvds_vip_multi_cam_3d_perception=yes

    UC_lvds_vip_multi_cam_3d_srv=yes

    UC_new_usecase=yes

    UC_lvds_vip_multi_cam_view=yes

    UC_lvds_vip_multi_srv_calibration=yes

    UC_null_src_decode_display=yes

    #UC_ov490_vip_multi_cam_3d_srv=yes

    UC_vip_single_cam_connectorLinksA15_sgx_display=yes

    UC_vip_single_cam_enc_dec_sgx_display=yes

    UC_vip_single_cam_framecopy_sgx_display=yes

    UC_vip_single_cam_framecopyEve_sgx_display=yes

    UC_vip_single_cam_sgx_display=yes

    ifeq ($(ENABLE_OPENCV),yes)

    UC_vip_single_cam_opencvcanny_sgx_display=yes

    endif

    when i issue make -s -j it shows output similar to previous i couldnt see new_usecase used anywhere? i hope there is no need to use make -s -j depend, please correect me if am wrong.

  • Hi Ganesh,

    Do you have the corresponding makefiles as are present in vision_sdk\hlos\examples\adas\src\usecases\lvds_vip_multi_cam_3d_srv folder?

    Regards,
    Rishabh
  • Hi Rishabh,

    Yes, i copied the Makefiles directly from lvds_vip_multi_cam_3d_srv folder didn't make any changes to it
  • Hi Ganesh,

    You need to refer to cfg.mk in new_usecase folder and specify what all cores and algorithms are needed for this use case.
    You also need to add UC_new_usecase to LINUX_TDA2XX_UC_LIST in vision_sdk/configs/cfg.mk.

    Regards,
    Rishabh
  • Hi Rishabh,

    How cfg.mk is generated, is it through any command or is it manually created.
  • Hi Ganesh,

    cfg.mk is handwritten. It depends on what you intend to do in the use case.
    E.g. Surround view uses surround view and SW mosaic algorithm and involves 3 cores: A15_0, IPU1_0 and DSP1.

    Regards,
    Rishabh
  • Hi Rishabh,

    I added UC_new_usecase to cfg.mk

    LINUX_TDA2XX_UC_LIST = \
    UC_avb_rx_multi_cam_decode_sgx_display \
    UC_avb_rx_multi_cam_3d_srv \
    UC_lvds_vip_multi_cam_3d_perception \
    UC_lvds_vip_multi_cam_3d_srv \
    UC_new_usecase \
    UC_csi2Cal_multi_cam_3d_srv \
    UC_csi2Cal_multi_srv_calibration \
    UC_lvds_vip_multi_cam_view_sgx_display \
    UC_lvds_vip_multi_srv_calibration \
    UC_null_src_decode_display \
    UC_ov490_vip_multi_cam_3d_srv \
    UC_vip_single_cam_connectorLinksA15_sgx_display \
    UC_vip_single_cam_dualSgxDisplay \
    UC_vip_single_cam_enc_dec_sgx_display \
    UC_vip_single_cam_framecopy_sgx_display \
    UC_vip_single_cam_framecopyEve_sgx_display \
    UC_vip_single_cam_opencvcanny_sgx_display \
    UC_vip_single_cam_opencvopencldilation_sgx_display \
    UC_vip_single_cam_sgx_display

    copied cfg.mk from lvds_vip_multi_cam_3d_srv folder to new_usecase folder

    Then i issued make -s -j. The log was almost same didn't see new_usecase building anywhere

  • Hi Ganesh,

    Does the new_usecase need all these cores? What are the contents of new_usecase folder?
    There should be a top level use case function in new_usecase_drv.c file like chains_lvdsVipMultiCam_Sgx3Dsrv() which is called from main function in vision_sdk/hlos/examples/adas/src/common/chains_main.c.
    You need not copy contents of cfg.mk of surround view use case in new_usecase.
    I would suggest you to first go through Vision SDK documentation on how to create a new use case.

    Regards,
    Rishabh
  • Hi Rishabh,

    The new usecase folder's chains_new_usecase.txt contains the same content of lvds_vip_multi_cam_3d_srv then copied cfg.mk from lvds_vip_multi_cam_3d_srv folder to new_usecase folder the contents of the chains_new_usecase.txt is same as lvds_vip_multi_cam_3d_srv copied and added the folder to cfg.mk but still i didnt see the project building.

    Other than the generated chains_new_usecase_priv.c and header file we creates one c file to link these files right. How to get started in writing that c program?
  • Hi Ganesh,

    You cannot have the 100% same contents in both the text files as the use case name is different and hence text file will have a different name. I would suggest you to pick up 2.12.01 Vision SDK release from: cdds.ext.ti.com/.../emxNavigator.jsp
    Then you can see the differences in txt file between lvds_vip_multi_cam_2mp_3d_srv and lvds_vip_multi_cam_3d_srv folder.
    You should also do a grep for UC_<lvds_use_case> and main usecase function (e.g. chains_lvdsVipMultiCam2mp_Sgx3Dsrv) and replicate the same for your use case.

    Regards,
    Rishabh