Vision Apps User Guide
Build Instructions

IMPORTANT NOTES

  • Make sure additional components and network proxies are setup as mentioned in Build Environment Setup before proceeding to building PSDK RTOS
  • Make sure you dont skip any of the steps mentioned below (for the selected configuration )
  • ${PSDKR_PATH} refers to the path where Processor SDK RTOS (PSDK RTOS) is installed
  • ${PSDKL_PATH} refers to the path where Processor SDK Linux (PSDK Linux) is installed
  • All folders like, , tiovx, vision_apps mentioned in the user guide are relative to ${PSDKR_PATH} unless explicitly stated otherwise.
  • The build is tested on Ubuntu (x86_64) 22.04 system and may not work on earlier or later Ubuntu systems.
  • 20GB of free space is required to install and build PSDK RTOS
  • Make sure you have sudo access

Quick Steps to build vision apps for selected configuration

This section details the build steps for each of the following HLOS setup configurations. Follow the steps in the appropriate section.

Linux+RTOS mode

  • Edit file sdk_builder/build_flags.mak and modify below variables
    BUILD_EMULATION_MODE=no
    BUILD_TARGET_MODE=yes
    BUILD_LINUX_MPU=yes
    PROFILE=release
  • Do below to build the source code using pre-built libraries provided in the SDK installer, with "N" being the number of parallel threads
    cd sdk_builder
    make vision_apps -jN
    make tidl_rt -jN
  • The RTOS, Linux executable are stored below
    vision_apps/out/$(TARGET_SOC)/$(MPU_CPU)/LINUX/$PROFILE
    vision_apps/out/$(TARGET_SOC)/R5F/$(RTOS)/$PROFILE
    vision_apps/out/$(TARGET_SOC)/$(TARGET_C7X)/$(RTOS)/$PROFILE


QNX+RTOS mode

  • Make sure that you have the QNX SDP 7.1 installed in your PC as mentioned in Step 2b: Download and Install PSDK QNX addon to run in QNX+RTOS mode (Optional, only needed for QNX+RTOS mode)
  • Edit file sdk_builder/build_flags.mak and modify below variables
    BUILD_EMULATION_MODE=no
    BUILD_TARGET_MODE=yes
    BUILD_LINUX_MPU=no
    BUILD_QNX_MPU=yes
    PROFILE=release
  • Edit the file sdk_builder/tools_path.mak and modify below variables
    QNX_BASE=<QNX SDP installation path>
  • Do below to build the source code using pre-built libraries provided in the SDK installer, with "N" being the number of parallel threads
    • Note: If using SBL as the bootloader, the BUILD_CPU_MCU1_0 should be set to "no" in sdk_builder/vision_apps_build_flags.mak. The boot app will be used as the MCU1-0 image in this case. For more information, please refer to the app note here.
      cd sdk_builder
      ./make_sdk.sh
  • The RTOS, QNX executables are stored below
    vision_apps/out/$(TARGET_SOC)/$(MPU_CPU)/QNX/$PROFILE
    vision_apps/out/$(TARGET_SOC)/R5F/$(RTOS)/$PROFILE
    vision_apps/out/$(TARGET_SOC)/C66/$(RTOS)/$PROFILE
    vision_apps/out/$(TARGET_SOC)/$(TARGET_C7X)/$(RTOS)/$PROFILE

PC emulation mode

  • Edit file sdk_builder/build_flags.mak and modify below variables
    BUILD_EMULATION_MODE=yes
    BUILD_TARGET_MODE=no
  • Do below to build the source code,
    cd sdk_builder
    ./make_sdk.sh
  • The PC executables are stored below
    vision_apps/out/PC/x86_64/LINUX/$PROFILE

Quick steps to clean vision apps generated files

  • To do a clean build of vision_apps do below,
    cd sdk_builder
    make vision_apps_scrub

Detailed steps to configure and build vision apps

Makefile and configuration options

  • Default makefile flag values are set to build the SDK properly. However below flags are recommended to be changed by users to speed up their build time, execution speed and/or configure what to build depending on their specific requirements.
  • Edit below variables in sdk_builder/build_flags.mak. These flags will affect app_utils, tiovx, imaging, video_io, as well as vision_apps builds.
Makefile flag Valid values (default value in bold) Description
PROFILE debug or release or all "debug" for debug only build,
"release" for release only build,
"all" for both debug and release builds
BUILD_TARGET_MODE yes or no "yes" to build for SoC platform. In case you are building only for PC keep this to "no"
BUILD_QNX_MPU yes or no "yes" if you want to build for QNX on the MPU. In case you are building for RTOS only mode or Linux + RTOS mode, keep this to "no"
BUILD_LINUX_MPU yes or no "yes" if you want to build for ARM Linux on the MPU. In case you are building for RTOS only mode or QNX + RTOS mode, keep this to "no"
BUILD_EMULATION_MODE yes or no "yes" to build for PC emulation mode. In case you are building only for SoC keep this to "no"
BUILD_CT_* yes or no "yes" to enable OpenVX conformance tests for specific group of tests (CT). Typically during development one would keep all to "no" and only enable the required tests in respective CT "test_main.h"
  • Edit below variables in sdk_builder/vision_apps_build_flags.mak,
Makefile flag Valid values (default value in bold) Description
BUILD_CPU_<cpu name> yes or no "yes" if you want that CPU in your build, else keep it to "no".
Note, BUILD_CPU_MPU1, BUILD_CPU_MCU2_0 MUST be kept as "yes"
Note, If building for MCU1_0, please refer to the developer note here.
Note, if switching between building with BUILD_CPU_MCU1_0 turned on and off, you will need to re-install the bootfs and targetfs to the SD card as described here Step 1: Prepare SD card for boot (one time only).
BUILD_APP_RTOS_LINUX yes or no "yes" to build Linux+RTOS mode binaries for selected CPUs. Keep to "no" if you are not interested in Linux+RTOS binaries.
By default this is set to BUILD_LINUX_MPU
BUILD_APP_RTOS_QNX yes or no "yes" to build QNX+RTOS mode binaries for selected CPUs. Keep to "no" if you are not interested in QNX+RTOS binaries.
By default this is set to BUILD_QNX_MPU
  • Edit vision_apps/platform/${SOC}/rtos/common/app_cfg*.h for additional build time configuration,
    Note, additional #define's are defined in these files, but only ones which typical users need to customize are listed below.
File #define Description
app_cfg.h ENABLE_IPC_<cpu name> #undef these to disable a CPU from the system, #define to enable in the system
Note, this must match the BUILD_CPU_<cpu name> sdk_builder/vision_apps_build_flags.mak
app_cfg_mcu2_0.h ENABLE_DSS_DSI #define this to enable DSI display, make sure to #undef ENABLE_DSS_EDP and ENABLE_DSS_HDMI as well

Build vision apps without prebuilt libraries

  • Do below to see values of make configuration variables
    cd sdk_builder
    make sdk_show_config
  • Do below to see additional make targets to do a granular SDK build
    cd sdk_builder
    make sdk_help
  • Do below to build the full PSDK RTOS, with "N" being the number of parallel threads
    cd sdk_builder
    make sdk -jN
  • This command does same as above, except it also traps all build errors and displays them at end of log (since parallel build otherwise may not display all errors at the end).
    cd sdk_builder
    ./make_sdk.sh
  • Do below to clean the full PSDK RTOS
    cd sdk_builder
    make sdk_scrub