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/TDA2: Cannot build SDK on Linux with opencx

Part Number: TDA2
Other Parts Discussed in Thread: PGA460

Tool/software: Linux

Hello

Im trying to use opencv with linux on TDA2xx SoC, vision version 03.04.00.
Building the kernel and running it, is working fine but when i try to build SDK i get the following error:

# Making tda2xx-evm:c66xdsp_1:release:vision_sdk_lib...
# Linking into /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66...

 undefined                 first referenced

  symbol                       in file

 ---------                 ----------------

 EDMA3_semCreate           /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/c66xdsp_1/release/utils_common.ae66<utils_dma_edma3cc.oe66>
 EDMA3_semDelete           /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/c66xdsp_1/release/utils_common.ae66<utils_dma_edma3cc.oe66>
 edma3OsProtectEntry       /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/66/release/edma3lld_drv.ae66<edma3_drv_adv.oe66>
 edma3OsProtectExit        /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/66/release/edma3lld_drv.ae66<edma3_drv_adv.oe66>
 edma3OsSemGive            /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/66/release/edma3lld_drv.ae66<edma3_drv_adv.oe66>
 edma3OsSemTake            /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/66/release/edma3lld_drv.ae66<edma3_drv_adv.oe66>
 rtos_init_ocl_dsp_monitor /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/lib/tda2xx-evm/c66xdsp_1/release/links_common_system.ae66<system_common.oe66>

error: unresolved symbols remain
error: errors encountered during linking;
   "/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx
   _evm_linux_opencx/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe6
   6" not built
/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/rtos/makerules/rules_66.mk:271: recipe for target '/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66' failed
make[7]: *** [/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66] Error 1
/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/rtos/makerules/common.mk:271: recipe for target 'c66xdsp_1' failed
make[6]: *** [c66xdsp_1] Error 2
MAKEFILE.MK:116: recipe for target 'apps_dsp1' failed
make[5]: *** [apps_dsp1] Error 2
MAKEFILE.MK:31: recipe for target 'apps' failed
make[4]: *** [apps] Error 2
MAKEFILE.MK:287: recipe for target 'apps' failed
make[3]: *** [apps] Error 2
Makefile:171: recipe for target 'apps_exe' failed
make[2]: *** [apps_exe] Error 2
Makefile:36: recipe for target 'apps' failed
make[1]: *** [apps] Error 2
Makefile:12: recipe for target 'vision_sdk' failed
make: *** [vision_sdk] Error 2
________________________________________

I do not get this when i build SDK for (normal) linux without opencx.

I tried to figure out where are those functions, and it seems they are both in
ti_components/codecs/framework_components_3_40_02_07/packages/ti/sdo/fc/edma3/edma3_config.c
and
ti_components/codecs/codec_engine_3_24_00_08/cetools/packages/ti/sdo/fc/edma3/edma3_config.c

I also tried to change mkefiles so build would pass but with no success.

I followed the Linux User Guide pdf and should have setup both Codec Engine and Framework Components correctly.

Thanks for reading this and for help in advance!

  • Hi,

    can you try to delete directory "vision_sdk/binaries/$(MAKEAPPNAME)/$(MAKECONFIG)" and then run "make -s depend" and "make -s" (sometimes -j option causes such errors) and see if you get the error?

    Regards,
    Yordan

  • Hi Yordan, thank you for responding,

    I have tried what you said and it did not help, how ever i came to conclusion that edma3_config.c files dont even get compiled.
    I placed intentional errors in those .c files and make return no errors for them, everything runs the same.

    Is it possible that make files dont have correct paths? Im running out of ideas.
  • Hi,

    I have pinged VisionSDK experts for further help.

    Regards,
    Yordan
  • Hi,
    Could you make sure dsp compiler bin path added to PATH variable ?
    If not please run below command
    export PATH=<path_to_dsp_compiler_8.1.0>/bin:$PATH
    & then build

    Regards
    Surya
  • Yes dsp compiler is installed and path is exported.
    I have removed every opencl build for dps, edited some make files so opencvCannyLink_priv and iOpenCVCannyAlgo could be compiled and now i have this error:

    Compiling OpenCL file copy.cl
    >> WARNING: invalid compiler option --bc_file=copy.bc (ignored)
    "/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/../ti_components/os_tools/linux/targetfs/usr/share/ti/opencl/dsp.syms", line 9: error #10022-D:
    invalid option: --single_data_segment
    "/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/../ti_components/os_tools/linux/targetfs/usr/share/ti/opencl/dsp.syms", line 10: error #10022-D:
    invalid option: --no_entry_point
    warning #10247-D: creating output section ".stack" without a SECTIONS
    specification
    warning #10210-D: creating ".stack" section with default size of 0x400; use the
    -stack option to change the default size

    undefined first referenced

    symbol in file

    --------- ----------------

    main /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/cg_tools/linux/ti-cgt-c6000_8.1.0/lib/rts6600_elf.lib<args_main.obj>

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "copy.out" not built

    >> Compilation failure
    Makefile:5: recipe for target 'copy.dsp_h' failed
    make[7]: *** [copy.dsp_h] Error 255
    MAKEFILE.MK:14: recipe for target 'opencl_build' failed
    make[6]: *** [opencl_build] Error 2
    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:183: recipe for target 'apps_exe_hlos' failed
    make[3]: *** [apps_exe_hlos] Error 2
    Makefile:64: recipe for target 'apps_hlos' failed
    make[2]: *** [apps_hlos] Error 2
    Makefile:36: recipe for target 'apps' failed
    make[1]: *** [apps] Error 2
    Makefile:12: recipe for target 'vision_sdk' failed
    make: *** [vision_sdk] Error 2

  • Hi
    Could you just run "echo $PATH" & share ?

    Regards
    Surya
  • Here it is:

    [~/PROCESSOR_SDK_VISION_03_03_00_00/vision_sdk/build]$ echo $PATH
    /home/rtrk/bin:/home/rtrk/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/rtrk/PROCESSOR_SDK_VISION_03_03_00_00/ti_components/os_tools/linux/xdctools_3_32_01_22_core:/snap/bin:/home/rtrk/.fzf/bin:/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/cg_tools/linux/ti-cgt-c6000_8.1.0/bin:/home/rtrk/PROCESSOR_SDK_VISION_03_03_00_00/ti_components/cg_tools/linux/ti-cgt-c6000_8.1.0/bin
  • Hi
    OpenCL uses prebuilt dsp binaries which is part of OpenCL file system patch
    Could you please confirm OpenCL file system patch extracted in targetfs folder ?
    Also please run "ls -al" in ti_components\cg_tools\linux & share ?

    Regards
    Surya
  • Here they are:

    [~/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/os_tools/linux/targetfs]$ ll
    total 52M
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 12 12:10 bin
    drwxr-xr-x 2 rtrk rtrk 4,0K сеп 19 09:17 boot
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 11 22:01 dev
    drwxrwxr-x 32 rtrk rtrk 4,0K мар 6 2018 etc
    drwxr-xr-x 3 rtrk rtrk 4,0K јун 11 22:01 home
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 11 22:19 include
    -rwxrw-r-- 1 rtrk rtrk 1,5M сеп 18 14:56 install-extra.tar.gz
    drwxr-xr-x 9 rtrk rtrk 4,0K јун 12 12:10 lib
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 11 22:01 media
    drwxr-xr-x 3 rtrk rtrk 4,0K јун 11 22:01 mnt
    drwxrwxr-x 4 rtrk rtrk 4,0K јун 8 2017 opencl_fs_patches
    -rwxr-xr-x 1 root root 50M сеп 19 09:17 opencl_fs_patches.tar.gz
    drwxr-xr-x 4 rtrk rtrk 4,0K сеп 13 12:07 opt
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 11 22:01 proc
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 12 12:10 run
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 12 12:10 sbin
    drwxr-xr-x 2 rtrk rtrk 4,0K јун 11 22:01 sys
    drwxrwxr-x 2 rtrk rtrk 4,0K јун 11 22:01 tmp
    drwxrwxr-x 11 rtrk rtrk 4,0K мар 6 2018 usr
    drwxr-xr-x 8 rtrk rtrk 4,0K јун 12 12:10 var

    and:

    [~/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/cg_tools/linux]$ ll
    total 16
    drwxrwsr-x 8 rtrk rtrk 4096 сеп 7 14:40 arp32_1.0.7
    drwxrwsr-x 8 rtrk rtrk 4096 сеп 7 14:40 C6000_7.4.2
    drwxrwsrwx 6 rtrk rtrk 4096 сеп 7 14:40 ti-cgt-arm_16.9.2.LTS
    drwxrwxr-x 7 rtrk rtrk 4096 сеп 18 13:42 ti-cgt-c6000_8.1.0
  • Hi
    I got the issue, while building VSDK pass target as "opencx"
    make -s -j depend
    make -s -j opencx

    Regards
    Surya
  • Hi,
    Even though you extracted opencl_fs_patches.tar.gz in targetfs folder, the content of the tar ball is not copied to respective folder (lib/ & usr/ folder)
    you can cross check this by navigating to below folder
    ti_components/os_tools/linux/targetfs/usr/share/ti -> are you able to see "opencl" folder ?

    If not,Please manually copy the folders using below commands from "ti_components/os_tools/linux/targetfs" folder
    cp -r opencl_fs_patches/lib .
    cp -r opencl_fs_patches/usr .
    & then build

    Regards
    Surya
  • Hi Surya
    Sorry if im posting multiple and same answers, im being filtered by forum moderator and im not sure how that exactly works.

    I cleared my previous build and tried running
    make -s -j depend
    make -s -j opencx
    and now problem looks like this:

    [~/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build]$ make opencx
    echo yes
    yes
    make -C /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/hlos/makerules/linux -fbuild_opencv.mk _vision_sdk_opencx PROFILE=release BUILD_OS=Linux BUILD_OPENCV_SRC=yes
    make[1]: Entering directory '/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/hlos/makerules/linux'
    export OpenCV_BUILD_PATH
    make -fbuild_opencv.mk -C/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/hlos/makerules/linux vision_sdk_opencv_linux PROFILE=release
    make[2]: Entering directory '/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/hlos/makerules/linux'
    make: cd /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/open_compute/opencv_src/tiopencv/build_linux_release
    make: cd /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk
    mkdir -p /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/open_compute/opencv_src/tiopencv/build_linux_release
    /bin/sh: 1: cd: can't cd to /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk;
    build_opencv.mk:9: recipe for target 'vision_sdk_opencv_linux' failed
    make[2]: *** [vision_sdk_opencv_linux] Error 2
    make[2]: Leaving directory '/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/hlos/makerules/linux'
    build_opencv.mk:22: recipe for target '_vision_sdk_opencx' failed
    make[1]: *** [_vision_sdk_opencx] Error 2
    make[1]: Leaving directory '/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/hlos/makerules/linux'
    Makefile:83: recipe for target 'opencx' failed
    make: *** [opencx] Error 2
  • Hi,
    Can you just run make -s showconfig & share ?

    Regards
    Surya
  • Output:

    #
    # Build Config is [ tda2xx_evm_linux_opencx ]
    # Build Config file is @ /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/configs/tda2xx_evm_linux_opencx/cfg.mk
    # Build Config .h file is @ /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/links_fw/include/config/apps/tda2xx_evm_linux_opencx/system_cfg.h
    # Build CPUs is @ ipu1_0 ipu2 a15_0 dsp1
    #
    # CPUs included in application,
    # PROC_IPU1_0_INCLUDE=yes
    # PROC_IPU1_1_INCLUDE=no
    # PROC_IPU2_INCLUDE=yes
    # PROC_DSP1_INCLUDE=yes
    # PROC_DSP2_INCLUDE=no
    # PROC_EVE1_INCLUDE=no
    # PROC_EVE2_INCLUDE=no
    # PROC_EVE3_INCLUDE=no
    # PROC_EVE4_INCLUDE=no
    # PROC_A15_0_INCLUDE=yes
    #
    # Platform config,
    # VSDK_BOARD_TYPE=TDA2XX_EVM [options: TDA2XX_EVM TDA2EX_EVM TDA3XX_EVM TDA3XX_RVP TDA2XX_RVP]
    # PLATFORM=tda2xx-evm
    # DUAL_A15_SMP_BIOS=no
    # IPU1_SMP_BIOS=no
    # DDR_MEM=DDR_MEM_1024M [options: DDR_MEM_128M DDR_MEM_512M DDR_MEM_1024M]
    # EMIFMODE=SINGLE_EMIF_512MB [options: SINGLE_EMIF_512MB SINGLE_EMIF_1GB ref build_pdk.mk]
    # NDK_PROC_TO_USE=ipu1_0 [options: a15_0 ipu1_0 ipu1_1 ipu2 none]
    # NSP_TFDTP_INCLUDE=no [options: yes no]
    # TDA2EX_ETHSRV_BOARD=no [options: yes no]
    # FATFS_PROC_TO_USE=none [options: ipu1_0 none]
    # RADAR_BOARD=none [options: TDA3XX_AR12_ALPS TDA3XX_AR12_VIB_DAB_BOOSTER TDA3XX_RADAR_RVP none]
    #
    # Build config,
    # BUILD_OS=Linux [options: Windows_NT Linux]
    # BUILD_DEPENDENCY_ALWAYS=no
    # BUILD_ALGORITHMS=no
    # BUILD_INFOADAS=no
    # PROFILE=release [options: debug release]
    # KW_BUILD=no
    # CPLUSPLUS_BUILD=no
    # IPU_PRIMARY_CORE=ipu2 [options: ipu1_0 ipu2]
    # IPU_SECONDARY_CORE=ipu1_0 [options: ipu1_0 ipu2]
    # A15_TARGET_OS=Linux [options: Bios Linux Qnx]
    # BSP_STW_PACKAGE_SELECT=all [options: all vps-iss-dss-only vps-vip-vpe]
    #
    # Safety Module config,
    # RTI_INCLUDE=no
    # ECC_FFI_INCLUDE=no
    # DCC_ESM_INCLUDE=no
    #
    # Video Module config,
    # IVAHD_INCLUDE=no
    # VPE_INCLUDE=no
    # CAL_INCLUDE=no
    # ISS_INCLUDE=no
    # ISS_ENABLE_DEBUG_TAPS=no
    # WDR_LDC_INCLUDE=no
    # DSS_INCLUDE=yes
    #
    # Open Compute config,
    # OPENCL_INCLUDE=yes
    # TARGET_ROOTDIR=/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/../ti_components/os_tools/linux/targetfs
    # ENABLE_OPENCV=yes
    # ENABLE_OPENCV_TESTS=no
    # OPENVX_INCLUDE=no
    #
    # Log config,
    # ENABLE_UART_LOG=yes
    # ENABLE_NETWORK_LOG=no
    # ENABLE_CCS_LOG=no
    # CIO_REDIRECT=no
    #
    # IPC config,
    # WORKQ_INCLUDE=no
    # IPC_LIB_INCLUDE=no
    #
    # Surround View config,
    # SRV_FAST_BOOT_INCLUDE=no
    #
    # Other Module config,
    # AVB_INCLUDE=no
    # DCAN_INCLUDE=no
    # RADAR_ONLY=no
    # CPU_IDLE_ENABLED=yes
    # FAST_BOOT_INCLUDE=no
    # DATA_VIS_INCLUDE=no
    # HS_DEVICE=no
    # ULTRASONIC_INCLUDE=no
    # PGA450=
    # PGA460=
    # ENABLE_ALL_DEPTH=
    #
    # Linux config,
    # DEFAULT_UBOOT_CONFIG=dra7xx_evm_vision_config
    # DEFAULT_KERNEL_CONFIG=ti_sdk_dra7x_release_defconfig
    # DEFAULT_DTB=dra7-evm-infoadas.dtb
    # CMEM_INCLUDE=yes
    # IPUMM_INCLUDE=no
    # IPU1_EVELOADER_INCLUDE=no
    # ROBUST_RVC_INCLUDE=no
    # BUILD_ADAM_CAR=no
    #
    # Alg plugins included in build,
    # ALG_framecopy ALG_opencvcanny ALG_opencvopencldilation ALG_openclframecopy
    #
    # Use-cases included in build,
    # UC_vip_single_cam_openclframe_copy UC_vip_single_cam_framecopy_sgx_display UC_vip_single_cam_opencvcanny_sgx_display
    UC_vip_single_cam_opencvopencldilation_sgx_display
    #
    #
    # CPUs that are NOT required but included in config [ tda2xx_evm_linux_opencx ],
    #
    #
    # CPUs that are required but not included in config [ tda2xx_evm_linux_opencx ],
    #
    #
    # Edit /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/configs/tda2xx_evm_linux_opencx/cfg.mk to include or exclude CPUs in an application
    #
  • Hi
    Looks like cfg.mk file has been modified
    & also I am not able to find out the value set for BUILD_OPENCV_SRC
    Could you please share the cfg.mk file for tda2xx_evm_linux_opencx

    Regards
    Surya
  • Hi

    Yes i have modified cfg.mk file for tda2xx_evm_linux_opencx build.
    When i run make -s -j depend it gives me warning that i need to add ipu1_0 and dsp1 cores to build.

    cfg file:

    #
    # This file defines the modules included in $(MAKECONFIG) config
    #
    # Modules are split into,
    # - Use-cases specified in uc_cfg.mk
    # - Other system config/feature, specified in this file
    #
    # Any specific overrides are also specified in this file
    # Example, for TDA3x SoC EVE2/3/4 are not present and hence force marked as <blank>, i.e disabled
    #

    #
    # Additional config options
    #

    #
    # CPUs to included in build
    #
    # IPU1 (core 0 & 1 are) not supported when IPU_PRIMARY_CORE=ipu2
    PROC_IPU1_0_INCLUDE=yes
    PROC_IPU1_1_INCLUDE=no
    PROC_IPU2_INCLUDE=yes
    PROC_A15_0_INCLUDE=yes
    PROC_DSP1_INCLUDE=yes
    PROC_DSP2_INCLUDE=no
    PROC_EVE1_INCLUDE=no
    PROC_EVE2_INCLUDE=no
    PROC_EVE3_INCLUDE=no
    PROC_EVE4_INCLUDE=no


    VSDK_BOARD_TYPE=TDA2XX_EVM

    # Supported values: DDR_MEM_1024M
    DDR_MEM=DDR_MEM_1024M

    # Supported values: ipu1_0 ipu1_1 a15_0 none
    NDK_PROC_TO_USE=ipu1_0

    #
    # Used to control building of algorithm source.
    # By default algorithm source not included in Vision SDK
    #
    BUILD_ALGORITHMS=no



    #
    # Applies profile to all cores
    #
    # Supported profiles: release debug
    #PROFILE=debug
    PROFILE ?= release

    PROFILE_ipu1_0 ?= $(PROFILE)
    PROFILE_ipu1_1 ?= $(PROFILE)
    PROFILE_ipu2 ?= $(PROFILE)
    PROFILE_c66xdsp_1 ?= $(PROFILE)
    PROFILE_c66xdsp_2 ?= $(PROFILE)
    PROFILE_arp32_1 ?= $(PROFILE)
    PROFILE_arp32_2 ?= $(PROFILE)
    PROFILE_arp32_3 ?= $(PROFILE)
    PROFILE_arp32_4 ?= $(PROFILE)
    PROFILE_a15_0 ?= $(PROFILE)


    #
    # For TDA2xx & TDA2Ex - vision SDK can run on either IPU1 or IPU2 subsystem
    # For TDA3xx - We have only IPU1 and hence IPU1 is the only option
    # Select IPU primary core from the available IPU1 & IPU2 subsytems
    #
    # Supported values: ipu1_0 ipu2
    IPU_PRIMARY_CORE=ipu2
    IPU_SECONDARY_CORE=ipu1_0

    #
    # Set A15_TARGET_OS
    # A15 can run Linux or Bios
    #
    #                 A15_TARGET_OS support
    #   Platform        BIOS        Linux
    #
    #   TDA2XX_EVM      yes         yes
    #   TDA3XX_EVM      yes         no
    #   TDA2EX_EVM      yes         yes
    #
    # Supported values: Bios Linux
    A15_TARGET_OS=Linux

    IVAHD_INCLUDE=no
    VPE_INCLUDE=no
    DSS_INCLUDE=yes

    AVB_INCLUDE=no

    #
    # Enable below macro to enable DCAN integration into Vision SDK.
    #
    DCAN_INCLUDE=no

    CPU_IDLE_ENABLED=yes

    #
    # Enable below macro to view the bandwidth used by different IPs in the device
    # as a graphical plot on the display screen.
    #
    DATA_VIS_INCLUDE=no
    OPENCL_INCLUDE=yes
    TREAT_WARNINGS_AS_ERROR = yes
    HS_DEVICE=no

    DEFAULT_UBOOT_CONFIG  := dra7xx_evm_vision_config
    DEFAULT_KERNEL_CONFIG := ti_sdk_dra7x_release_defconfig
    # For TDA2x
    DEFAULT_DTB := dra7-evm-infoadas.dtb

    #
    # Enable macro for OpenCV
    #
    ENABLE_OPENCV=yes
    CMEM_INCLUDE=yes
    BUILD_OPENCV_SRC=yes
    BUILD_LLVM=yes

    include $($(MAKEAPPNAME)_PATH)/configs/$(MAKECONFIG)/uc_cfg.mk


  • Hi,
    You can ignore those warnings & disable those cores
    In case of Linux ipu2 is only required as it is the primary core
    & OpenCL uses prebuilt dsp firmwares

    And I observed you enabled BUILD_OPENCV_SRC=yes
    Did you intend to build openCV source ?
    Did you clone the OpenCV source repo before building?

    The below issue reported by you while running make opencx is because of BUILD_OPENCV_SRC=yes
    e2e.ti.com/.../2693282

    You can set BUILD_OPENCV_SRC=no & run command make opencx

    Regards
    Surya
  • Hi

    I did not clone opnencv repo, where can i refer to setting up opencv source?
    I must have overlooked that part in VisionSDK_UserGuide_opencx.pdf if its there.

    Also im nearly 100% positive i did not touch BUILD_OPENCV_SRC flag, ok ill set it to no and try again.

    Ill get back to you as soon as i try that, thanks.
  • Hi, again

    The guide for opencv states this:

    This repository can be cloned with the below command
    git clone git://git.ti.com/opencv/tiopencv.git
    In order to build opencv source as part of vision sdk build, follow the below
    procedures
    * Navigate to ‘ti_components’ folder
    * Then, navigate to ‘algorithms_codecs’
    * Now, clone the ‘tiopencv’ repo using the above mentioned command
    * Set the env variable, ‘BUIILD_OPENCV_SRC’ to ‘yes’ in the ‘tda2xx_evm_<OS>_opencx’ config

    Now my ti_components dir looks like this:

    [~/PROCESSOR_SDK_VISION_03_04_00_00/ti_components]$ ll
    total 36
    drwxrwxr-x 18 rtrk rtrk 4096 сеп 7 14:38 algorithms
    drwxrwxr-x 3 rtrk rtrk 4096 сеп 7 14:38 ccs_csp
    drwxrwxr-x 3 rtrk rtrk 4096 сеп 7 14:39 cg_tools
    drwxrwxr-x 11 rtrk rtrk 4096 сеп 10 09:44 codecs
    drwxrwxr-x 4 rtrk rtrk 4096 сеп 7 14:38 drivers
    drwxrwxr-x 5 rtrk rtrk 4096 сеп 7 14:39 networking
    drwxrwxr-x 5 rtrk rtrk 4096 сеп 7 14:39 open_compute
    drwxrwxr-x 5 rtrk rtrk 4096 сеп 7 14:39 os_tools
    drwxrwxr-x 3 rtrk rtrk 4096 сеп 7 14:39 radar

    I dont have algorithms_codecs dir, should i make one and proceed or use existing algorithm or codecs dirs?

    Also there it states that i should set BUILD_OPENCV_SRC=yes, and i noticed this:
    tools_path.mk:145:OpenCV_BUILD_PATH ?= build_dummy
    is this ok, or should i change OpenCV_BUILD_PATH to correct path?

    What should i do?
  • Hi 

    You can clone under open_compute dir, We will update the document in upcoming release

    Set BUILD_OPENCV_SRC to "yes", if you intend to build opencv src & to "No", if you want to use prebuilt

    No need to change anything in tools_path.mk file "OpenCV_BUILD_PATH ?= build_dummy" as when you build for either BIOS or Linux config, it will be overwritten accordingly

    To verify whether you able to build opencx on Linux,

    set BUILD_OPENCV_SRC = no, so that it will use the prebuilts

    Also ipu1_0 & dsp1 to no & then try a clean build

    Regards

    Surya

  • Hi

    I did as you said, i cloned tiopencv

    [~/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/open_compute]$ ll
    total 16
    drwxrwxr-x 5 rtrk rtrk 4096 сеп 7 14:39 opencl_rtos_am57xx_01_01_10_00
    drwxrwxr-x 3 rtrk rtrk 4096 сеп 7 14:39 opencv
    drwxrwxr-x 12 rtrk rtrk 4096 сеп 21 11:50 tiopencv
    drwxrwxr-x 11 rtrk rtrk 4096 сеп 7 14:39 tiovx_01_00_01_00

    i set ipu1, dsp1 BUILD_OPENCV_SRC to no in cfg file, and i got same error back:

    Compiling OpenCL file copy.cl
    >> WARNING: invalid compiler option --bc_file=copy.bc (ignored)
    "/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/../ti_components/os_tools/linux/targetfs/usr/share/ti/opencl/dsp.syms", line 9: error #10022-D:
    invalid option: --single_data_segment
    "/home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/../ti_components/os_tools/linux/targetfs/usr/share/ti/opencl/dsp.syms", line 10: error #10022-D:
    invalid option: --no_entry_point
    warning #10247-D: creating output section ".stack" without a SECTIONS
    specification
    warning #10210-D: creating ".stack" section with default size of 0x400; use the
    -stack option to change the default size

    undefined first referenced

    symbol in file

    --------- ----------------

    main /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/cg_tools/linux/ti-cgt-c6000_8.1.0/lib/rts6600_elf.lib<args_main.obj>

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "copy.out" not built

    >> Compilation failure
    Makefile:5: recipe for target 'copy.dsp_h' failed
    make[9]: *** [copy.dsp_h] Error 255
    MAKEFILE.MK:14: recipe for target 'opencl_build' failed
    make[8]: *** [opencl_build] Error 2
    MAKEFILE_adas.MK:14: recipe for target 'vision_sdk_linux_demo' failed
    make[7]: *** [vision_sdk_linux_demo] Error 2
    MAKEFILE_adas.MK:5: recipe for target 'apps' failed
    make[6]: *** [apps] Error 2
    Makefile:183: recipe for target 'apps_exe_hlos' failed
    make[5]: *** [apps_exe_hlos] Error 2
    Makefile:64: recipe for target 'apps_hlos' failed
    make[4]: *** [apps_hlos] Error 2
    Makefile:36: recipe for target 'apps' failed
    make[3]: *** [apps] Error 2
    Makefile:12: recipe for target 'vision_sdk' failed
    make[2]: *** [vision_sdk] Error 2
    build_opencv.mk:22: recipe for target '_vision_sdk_opencx' failed
    make[1]: *** [_vision_sdk_opencx] Error 2
    Makefile:83: recipe for target 'opencx' failed
    make: *** [opencx] Error 2

    If i build with BUILD_OPENCV_SRC set to yes i get again this error (im pointing this out so maybe it can help):

    make: cd /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/open_compute/opencv_src/tiopencv/build_linux_release
    make: cd /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk
    /bin/sh: 1: cd: can't cd to /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk;
    build_opencv.mk:9: recipe for target 'vision_sdk_opencv_linux' failed
    make[2]: *** [vision_sdk_opencv_linux] Error 2
    build_opencv.mk:22: recipe for target '_vision_sdk_opencx' failed
    make[1]: *** [_vision_sdk_opencx] Error 2
    Makefile:83: recipe for target 'opencx' failed
    make: *** [opencx] Error 2
  • Hi,
    can you just check & confirm prebuilt dsp symbols are present in below folder of file system ?
    ti_components\os_tools\linux\targetfs\usr\share\ti\opencl

    Regards
    Surya
  • Here it is:

    [~/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/os_tools/linux/targetfs/usr/share/ti/opencl]$ ll
    total 19868
    drwxrwxr-x 3 rtrk rtrk 4096 сеп 18 14:53 bin
    -rwxrwxr-x 1 rtrk rtrk 86607 сеп 19 16:41 clc.h
    -rwxrwxr-x 1 rtrk rtrk 12124 сеп 19 16:41 cpu.h
    -rwxrwxr-x 1 rtrk rtrk 4088 сеп 19 16:41 dsp_c.h
    -rwxrwxr-x 1 rtrk rtrk 17300 сеп 19 16:41 dsp_edmamgr.h
    -rwxrwxr-x 1 rtrk rtrk 35697 сеп 19 16:41 dsp.h
    -rwxrwxr-x 1 rtrk rtrk 19745928 сеп 19 16:41 dsp.out
    -rwxrwxr-x 1 rtrk rtrk 3558 сеп 19 16:41 dsp.syms
    -rwxrwxr-x 1 rtrk rtrk 422224 сеп 19 16:41 dsp_syms.obj
  • Hi
    Everything looks fine
    I briefed the steps followed by me which is working fine for me, Could you please try at your end ?

    1. Ensure kernel/u-boot/sgx/cmem all are cloned & are on vsdk 3.4 release tag
    2. Ensure file system downloaded from the link provided in vsdk 3.4 Linux user guide & untarred in targetfs folder
    3. Ensure Opencl file system patch applied on file system
    4. Ensure dsp tool chain ti-cgt-c6000_8.1.0 downloaded & installed in ti_components/cg_tools/linux folder
    5. cd vision_sdk/build
    6. Modify MAKECONFIG=tda2xx_evm_linux_opencx in Rules.mk file
    7. export PATH= <path to ti-cgt-c6000_8.1.0/bin>:$PATH
    8. make clean
    9. make linux_clean
    10. make linux
    11. make linux_install
    12. make -s -j depend
    13. make -s -j

    Regards
    Surya
  • Ok ill do clean instal.

    Just should i run
    12. make -s -j depend
    13. make -s -j
    or
    12. make -s -j depend
    13. make -s -j opencx
  • Hi,
    I ran without opencx, it build successfully

    Regards
    Surya
  • Hi Surya

    I did clean install of vision 3.04 and everything as you listed, now i dont have any dsp errors but undefined main symbol error remains.

    Im using ubuntu 16.04 and not 14.04, could that cause any errors?
  • Hi,
    Suspecting some issue with dsp tool chain (ti-cgt-c6000_8.1.0)
    Could you please let us know from where die you download the dsp tool chain (ti-cgt-c6000_8.1.0) ?
    Also could you please download dsp tool chain (ti-cgt-c6000_8.1.0) one more time & try building ?

    undefined first referenced

    symbol in file

    --------- ----------------

    main /home/rtrk/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/cg_tools/linux/ti-cgt-c6000_8.1.0/lib/rts6600_elf.lib<args_main.obj>

    Regards
    Surya
  • Hi Surya

    Link from where i downloaded dsp dgt:
    www.ti.com/.../8.1.0

    "Also could you please download dsp tool chain (ti-cgt-c6000_8.1.0) one more time & try building ?"
    I did that multiple times before, same results.

    I have now moved to work with rules for MAKECONFIG?=tda2xx_evm_linux_all
    where i have set flags to include openCL and openCV to build.

    That passes with no major problems, but now when i login to system on TDA2x platform and when i try to test openCL this is what i get:

    root@dra7xx-evm:/usr/share/ti/examples/opencl/vecadd# ./vecadd
    CMEM Error: init: Failed to open /dev/cmem: 'No such file or directory'
    TIOCL FATAL: The cmemk kernel module is not installed. Consult the OpenCL UserGuide at software-dl.ti.com/.../index.html

    I did install cmem in ~/PROCESSOR_SDK_VISION_03_04_00_00/ti_components/os_tools/linux/kernel/cmem, and apply opencl_fs_patches.tar.gz
    Have i missed some steps for correctly making cmem?
  • Hi
    After login as root
    did you run "load_ocl_kos.sh" under "/opt/vision_sdk" dir or not ?
    This is required to initialize CMEM

    Regards
    Surya
  • Hi
    Any progress on this ?

    Regards
    Surya
  • Hello Surya, i dont know why am i getting notification for your reply just now.

    We have found existing issue in vision release note:
    ADASVISION-1894 [TDA2xx Linux] OpenCL UC, Cmem initialization fails.

    So we have paused that part of project until that gets fixed.
  • Hi,
    For now, We can close this thread
    When We will get any fix, we will create a new thread & link to this

    Regards
    Surya