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.

SK-AM62A-LP: Compilation Error for edgeai-tiovx-modules

Part Number: SK-AM62A-LP

Tool/software:

Hello TI Experts

I would like to build the edgeai-tiovx-modules on my host for the target am62a. This is necessary since some new image sensors were added.

During compilation I get the following error:

pmu@htkwnb999-ubuntu:~/git/ti-edgeai/edgeai-tiovx-modules/build$ make -j2
[  6%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dl_color_convert_module.c.o
[  6%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_color_convert_module.c.o
In file included from /home/pmu/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/targetNFS/usr/include/processor_sdk/vision_apps/kernels/img_proc/include/TI/tivx_img_proc.h:67,
                 from /home/pmu/git/ti-edgeai/edgeai-tiovx-modules/include/tiovx_modules_common.h:69,
                 from /home/pmu/git/ti-edgeai/edgeai-tiovx-modules/include/tiovx_dl_color_convert_module.h:65,
                 from /home/pmu/git/ti-edgeai/edgeai-tiovx-modules/src/tiovx_dl_color_convert_module.c:62:
/home/pmu/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/targetNFS/usr/include/processor_sdk/vision_apps/kernels/img_proc/include/TI/tivx_img_proc_kernels.h:69:10: fatal error: itidl_ti.h: No such file or directory
   69 | #include "itidl_ti.h"
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from /home/pmu/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/targetNFS/usr/include/processor_sdk/vision_apps/kernels/img_proc/include/TI/tivx_img_proc.h:67,
                 from /home/pmu/git/ti-edgeai/edgeai-tiovx-modules/include/tiovx_modules_common.h:69,
                 from /home/pmu/git/ti-edgeai/edgeai-tiovx-modules/include/tiovx_color_convert_module.h:65,
                 from /home/pmu/git/ti-edgeai/edgeai-tiovx-modules/src/tiovx_color_convert_module.c:62:
/home/pmu/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/targetNFS/usr/include/processor_sdk/vision_apps/kernels/img_proc/include/TI/tivx_img_proc_kernels.h:69:10: fatal error: itidl_ti.h: No such file or directory
   69 | #include "itidl_ti.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/edgeai-tiovx-modules.dir/build.make:76: src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_color_convert_module.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/CMakeFiles/edgeai-tiovx-modules.dir/build.make:90: src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dl_color_convert_module.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:116: src/CMakeFiles/edgeai-tiovx-modules.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Steps done until now:

  • Cloned GitHub - TexasInstruments/edgeai-tiovx-modules: Repository to host TI's OpenVx modules used in the EdgeAI SDK. to my local git directory
  • Checked out "am62a_master"
  • Adapted the cross compile paths to the following:
    • export CROSS_COMPILER_PATH=$HOME/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/linux-devkit/sysroots/x86_64-arago-linux/usr
    • export CROSS_COMPILER_PREFIX=aarch64-oe-linux-
    • export TARGET_FS=$HOME/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/targetNFS
  • Fixed TOOLCHAIN_PREFIX to find the compilers (aka instead of /bin/${CROSS_COMPILER_PREFIX} it must be /bin/aarch64-oe-linux/${CROSS_COMPILER_PREFIX})

Any help appreciated, thanks.

Additionally, what is the best practice to keep track of changes of the tiovx modules and have them compiled on the target? Target has and will never have internet connection.

  • I think you are mixing versions by getting the latest version from the edgeai-tiovx-modules and using version 09.01.00.07 of the ti-processor-sdk. I think if you check out version 09.01.00.07 (or similar) of the edgeai-tiovx-modules instead, things will compile. I think the source code for edgeai-tiovx-modules is installed in /opt of the default edgeai image, so you wouldn't have to clone github. You can make your changes in the source code in /opt, and work from there.

  • There is no tag or release for the SKD version 09.01.00.07 specifically, hence the usage of the mentioned branch.

    It is indeed in the /opt folder but no as a repository but rather extracted during the creation of the targetfs via the setup script. Problem is, that changes there without version control can not be ported and used on other boards / image creations. Modifying the source code in the targetfs is not a very clean solution.

    In the end it is about how to reflect changes done and apply them as patches for example when switching SDK versions or boards.

  • The easiest way would be to use the yocto environment of the ti-processor-sdk. It has a recipe for edgeai-tiovx-modules. If you add a .bbappend file for that in a custom layer, you can add your patches in there. The layer can be under version control, controlled by you.

    my file (meta-mylayer/recipes-tisdk/edgeai-components/edgeai-tiovx-modules.bbappend) contains this:

    FILESEXTRAPATHS:prepend := "${THISDIR}/tiovx-modules:"
    
    SRC_URI:append = " \
        file://0001-tiovx-modules-add-AR0521-sensor.patch \
    "

    I think that's the easiest way to handle things like this.

  • Thank you for the suggestion with the yocto. However, we do not intend to use the yocto environment at all. I would appreciate insights from the TI experts here.

  • Hi folks,

    There are a few ways to do this, Yocto being one of them.

    Most of our git repos have been version controlled and tagged to have SDK versions mentioned appropriately. As you noted, that seems to be missing for recent versions of edgeai-tiovx-modules. However, that project hasn't changed substantially within the last 2 years, so no extra releases would be relevant.

    I would say preferred way to do cross-compile builds (outside Yocto) is to use the edgeai-app-stack repo on github. Below is a link that is version tagged to 9.1. This will treat all the related edgeai- repos as submodules set to specific commits.

    Otherwise, it is an option to compile edgeai-tiovx-modules on the host. There is a script under /opt/edgeai-gst-apps/scripts/install_gst_plugins.sh that will also rebuild gstreamer plugins and its dependencies (tiovx-modules being one of them).

    I also see the am62a_master branch. That is several commits old. Please use the master branch at the commit mentioned from edgeai-app-stack.

    It sounds like your engineering is in development stages, and you're looking for the best way to test new features and version control changes related to those features. Edgeai-app-stack will probably be best here since it will have each of the individual repositories, which you can of course fork (and make PR's if relevant) as you please

    Does this address your questions?

  • Hi Reese,

    That worked perfectly. Thank you very much!