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: errors building ti-vision-apps

Part Number: SK-AM62A-LP
Other Parts Discussed in Thread: SYSBIOS
I had some questions about building ti-vision-apps for the am62axx. Firstly, I wanted to make sure I understand what exactly vision apps builds. Here are a couple of figures I found in various TI docs
It's my understanding that vision apps builds the driver layer and above and that ti-edgeai-firmware is responsible for building the rtos that runs on the r5 and c7x cores. Is that correct or do I have a misunderstanding of how this works?
 
Next, I'm having issues getting vision apps to build. Out of the box, this is what do_compile looks like:
do_compile() {
    CROSS_COMPILE_LINARO=aarch64-oe-linux- \
    LINUX_SYSROOT_ARM=${STAGING_DIR_TARGET} \
    TREAT_WARNINGS_AS_ERROR=0 \
    GCC_LINUX_ARM_ROOT\
    GCC_LINUX_ARM_ROOT_A72\
    LINUX_FS_PATH=${STAGING_DIR_TARGET} \
    SOC=${PLAT_SOC} \
    oe_runmake yocto_build
}
 
Run this way, I get the following error:
| #######################################################################
| TARGET_COMBO=AM62A:LINUX:A53:1:release:GCC_LINUX_ARM
| [GCC] Compiling C99 app_log_reader.c
| [GCC] Compiling C99 app_log_writer.c
| [GCC] Compiling C99 app_get.c
| /bin/sh: line 1: aarch64-oe-linux-gcc: command not found
 
After googling around and also seeing which cross compilers I had on my machine, I changed the cross compiler to aarch64-linux-gnu-, but I get pretty much the same error:
| #######################################################################
| TARGET_COMBO=AM62A:LINUX:A53:1:release:GCC_LINUX_ARM
| [GCC] Compiling C99 app_log_reader.c
| [GCC] Compiling C99 app_log_writer.c
| [GCC] Compiling C99 app_get.c
| /bin/sh: line 1: aarch64-linux-gnu-gcc: command not found
 
Not sure why that is as I have aarch64-linux-gnu-gcc on my machine:
 
Any help appreciated. 
For reference, here's the full error I get when I run bitbake ti-vision-apps:
Initialising tasks: 100% |################################################################################################################################################################################| Time: 0:00:03
Sstate summary: Wanted 5 Local 0 Mirrors 0 Missed 5 Current 182 (0% match, 97% complete)
NOTE: Executing Tasks
ERROR: ti-vision-apps-1.0-r0_edgeai_0 do_compile: oe_runmake failed
ERROR: ti-vision-apps-1.0-r0_edgeai_0 do_compile: ExecutionError('/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481', 1, None, None)
ERROR: Logfile of failure stored in: /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/log.do_compile.481
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 24 -C /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder yocto_build
| make: Entering directory '/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder'
| cp -Rf /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/psdk_include/* /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/.
| PROFILE=release BUILD_EMULATION_MODE=no TARGET_CPU=A53 TARGET_OS=LINUX TIDL_PATH=/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/tidl_j7 make app_utils
| make[1]: Entering directory '/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder'
| make -C /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils
| make[2]: Entering directory '/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils'
| SHELL=/bin/sh
| TARGET_MAKEFILES=utils/console_io/src/concerto.mak utils/file_io/src/concerto.mak utils/ipc/src/concerto.mak utils/mem/src/concerto.mak utils/misc/src/concerto.mak utils/perf_stats/src/concerto.mak utils/remote_service/src/concerto.mak utils/rtos/src/concerto.mak utils/sciclient/src/concerto.mak utils/udma/src/concerto.mak
| Keep only LINUX OS in TARGET_COMBOS
| Keep only A53 CPU in TARGET_COMBOS
| undefined TIARMCGT_ROOT=
| file TIARMCGT_LLVM_ROOT=$(PSDK_TOOLS_PATH)/ti-cgt-armllvm_2.1.3.LTS
| undefined GCC_SYSBIOS_ARM_ROOT=
| file CGT6X_ROOT=$(PSDK_TOOLS_PATH)/ti-cgt-c6000_8.3.7
| file CGT7X_ROOT=$(PSDK_TOOLS_PATH)/ti-cgt-c7000_3.1.0.LTS
| undefined GCC_WINDOWS_ROOT=
| file GCC_LINUX_ROOT=/usr/
| environment GCC_QNX_ROOT=/tmp/tmp6gvryv9p/qnx710/host/linux/x86_64/usr/bin
| #######################################################################
| TARGET_COMBO=AM62A:LINUX:A53:1:release:GCC_LINUX_ARM
| [GCC] Compiling C99 app_log_writer.c
| [GCC] Compiling C99 app_log_reader.c
| [GCC] Compiling C99 app_get.c
| [GCC] Compiling C99 app_log_linux.c
| /bin/sh: line 1: aarch64-linux-gnu-gcc: command not found
| make[2]: *** [/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder/concerto/finale.mak:316: /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils/out/AM62A/A53/LINUX/release/module/utils.console_io.src/app_log_writer.o] Error 127
| make[2]: *** Waiting for unfinished jobs....
| /bin/sh: line 1: aarch64-linux-gnu-gcc: command not found
| make[2]: *** [/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder/concerto/finale.mak:316: /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils/out/AM62A/A53/LINUX/release/module/utils.console_io.src/app_log_reader.o] Error 127
| /bin/sh: line 1: aarch64-linux-gnu-gcc: command not found
| make[2]: *** [/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder/concerto/finale.mak:316: /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils/out/AM62A/A53/LINUX/release/module/utils.console_io.src/app_get.o] Error 127
| /bin/sh: line 1: aarch64-linux-gnu-gcc: command not found
| make[2]: *** [/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder/concerto/finale.mak:316: /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils/out/AM62A/A53/LINUX/release/module/utils.console_io.src/app_log_linux.o] Error 127
| make[2]: Leaving directory '/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/app_utils'
| make[1]: *** [makerules/makefile_tiovx_ptk_imaging_remote_device.mak:8: app_utils] Error 2
| make[1]: Leaving directory '/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder'
| make: *** [makerules/makefile_linux_arm.mak:340: yocto_build] Error 2
| make: Leaving directory '/build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder'
| ERROR: oe_runmake failed
| WARNING: /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481:173 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|       #1: bbfatal_log, /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481, line 173
|       #2: die, /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481, line 157
|       #3: oe_runmake, /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481, line 152
|       #4: do_compile, /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481, line 140
|       #5: main, /build/tmp/work/aarch64-poky-linux/ti-vision-apps/1.0-r0_edgeai_0/temp/run.do_compile.481, line 186
ERROR: Task (/build/../repo/meta-vaddio-ark/recipes-backports/ti-psdk-rtos/ti-vision-apps.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 715 tasks of which 714 didn't need to be rerun and 1 failed.
  • Can you first confirm you can build the AM62A SDK tisdk-edgeai-image image target as per SDK instructions? 

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/09_00_01/exports/docs/linux/Overview_Building_the_SDK.html

    This image includes the ti-vision-apps Open VX middleware artifacts that get pulled via repo from https://git.ti.com/cgit/processor-sdk/psdk_repo_manifests/tree/vision_apps_yocto.xml?h=REL.PSDK.ANALYTICS.09.00.01.01&id=32aaafe2b177edcaef9ec82295b2372503425394 (for the current SDK v9.00.01.01). I was just able to build this recipe as part of my image build without issues.

    Here's the repo manifest file that tells you what all goes into there:

    https://git.ti.com/cgit/processor-sdk/psdk_repo_manifests/tree/vision_apps_yocto.xml?h=REL.PSDK.ANALYTICS.09.00.01.01&id=32aaafe2b177edcaef9ec82295b2372503425394

    Regards, Andreas

  • Thanks for the suggestion. I got the SDK image to build w/ 2 passes. Here are the errors from the first pass. 

    | ninja: build stopped: subcommand failed.
    | WARNING: /home/osmans/git/tisdk/build/arago-tmp-default-glibc/work/aarch64-oe-linux/vulkan-cts/1.3.3.1-r0/temp/run.do_compile.2278370:159 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/osmans/git/tisdk/build/arago-tmp-default-glibc/work/aarch64-oe-linux/vulkan-cts/1.3.3.1-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
    | WARNING: Backtrace (BB generated script):
    | 	#1: cmake_runcmake_build, /home/osmans/git/tisdk/build/arago-tmp-default-glibc/work/aarch64-oe-linux/vulkan-cts/1.3.3.1-r0/temp/run.do_compile.2278370, line 159
    | 	#2: cmake_do_compile, /home/osmans/git/tisdk/build/arago-tmp-default-glibc/work/aarch64-oe-linux/vulkan-cts/1.3.3.1-r0/temp/run.do_compile.2278370, line 153
    | 	#3: do_compile, /home/osmans/git/tisdk/build/arago-tmp-default-glibc/work/aarch64-oe-linux/vulkan-cts/1.3.3.1-r0/temp/run.do_compile.2278370, line 148
    | 	#4: main, /home/osmans/git/tisdk/build/arago-tmp-default-glibc/work/aarch64-oe-linux/vulkan-cts/1.3.3.1-r0/temp/run.do_compile.2278370, line 172
    ERROR: Task (/home/osmans/git/tisdk/sources/meta-arago/meta-arago-distro/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.3.1.bb:do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 11493 tasks of which 886 didn't need to be rerun and 2 failed.
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 7 seconds
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 2 seconds
    
    Summary: 2 tasks failed:
      virtual:native:/home/osmans/git/tisdk/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.19.1.bb:do_fetch
      /home/osmans/git/tisdk/sources/meta-arago/meta-arago-distro/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.3.1.bb:do_compile
    Summary: There were 23 WARNING messages.
    Summary: There were 3 ERROR messages, returning a non-zero exit code.

  • I'm looking thru the SDK build dirs to see what the delta is b/w the SDK and my own setup. So far, one thing I noticed is the SDK expects the following at ~/ti:

    arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu

    However, if I follow the GCC AARCH64 Compiler setup instructions in the docs (mcu_plus_sdk_am62ax_09_00_00_19/docs/api_guide_am62ax/SDK_DOWNLOAD_PAGE.html), I end up w/ this at ~/ti:

    gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf
    Am I missing a step or following the wrong guide?
  • The Linux SDK and MCU+ SDKs use different toolchains, so you need to have two sets of toolchains installed when you work with both SDKs.

    Regards, Andreas