Telematics SDK - User Guide  v1.50.0
Building TelSDK based applications

You have access to ChipCode portal

The TelSDK deliverables (headers, libraries, prebuilt artifacts, selinux policies etc.) are delivered to the Qualcomm Technologies, Inc customers as part of a software product release through ChipCode™ portal. This delivery contains both public and non-public TelSDK deliverables. Given this information, the steps to develop and build an application would be:

  1. Sync whole software product release package from ChipCode portal.
  2. Write a TelSDK based application.
  3. Write a Yocto recipe to build this application.
  4. Integrate this application and recipe in the Yocto build system.
  5. Finally, build the application and test it on the target hardware.

Setting up a build environment

The build environment can be setup by running set_bb_env.sh script in poky directory.

1 $ cd poky
2 $ source build/conf/set_bb_env.sh
3 $ build-<target>-image

The target can be sa515m, sa415m, sa2150p or 9650 etc.

Building a sample application

The build environment is ready once set_bb_env.sh script has been run. The TelSDK supplied sample applications can be built by using telux-samples recipe as shown below.

1 $ bitbake telux-samples

You do not have access to ChipCode portal

It is possible to develop an application based on TelSDK up to a certain extent, using only publicly available part of the TelSDK source code. Minimum requirements and how they are met is discussed below:

  1. An overall build environment which comprises of a cross-toolchain to compile application for a given QTI target processor's architecture. Standard Linux header files, libraries, root file system directory structure and various environment variables to facilitate build and link process. This build environment is obtained with the help of standard Yocto platform SDK application development and environment creation support feature.
  2. The TelSDK header files and libraries to compile and link an application. This is done by enabling TelSDK specific recipes that builds and installs these header files and libraries in root file system used in our build environment.

Creating build environment

The steps to create such a build environment are as follows:

  1. Install necessary packages on host machine to sync and build the Yocto platform SDK.
    1 $ sudo apt-get install repo gawk wget git-core diffstat unzip texinfo xterm
    2 $ sudo apt-get install gcc-multilib build-essential chrpath socat libsdl1.2-dev

  2. Identify tag of the latest software image (SI) release from Qualcomm Technologies, Inc for the desired target processor from codeaurora forum. LE.UM.4.1.1.C9 is the SI for SA515M target, LE.UM.3.2.1.C1 is the SI for SA415M target and LE.UM.1.3.r5 is SI for MDM9650 target. TAGS are listed here: https://source.codeaurora.org/quic/le/le/manifest/refs/tags

  3. Create fully qualified manifest file name for the source code repository. Add "caf_" as prefix and ".xml" as suffix to the tag obtained at step 2. Example manifest file name: caf_AU_LINUX_EMBEDDED_LE.UM.4.1.1.C9_TARGET_ALL.01.311.164.xml

  4. Sync the open-source code part of the software image release using manifest file obtained at step 3.
    1 $ repo init -u git://codeaurora.org/quic/le/le/manifest.git -b release -m <caf_TAG.xml>
    2 $ repo sync -j 16

  5. Enable building and installing TelSDK libraries on target image by appending following lines in poky/build/conf/local.conf file.
    (a) For all software images except LE.UM.1.3.r5:
    1 CORE_IMAGE_EXTRA_INSTALL += "telux"
    2 CORE_IMAGE_EXTRA_INSTALL += "telux-lib"
    (b) For LE.UM.1.3.r5 software image:
    1 CORE_IMAGE_EXTRA_INSTALL += "telux"
    2 CORE_IMAGE_EXTRA_INSTALL += "telephony-lib"

  6. Run the SDK environment setup script (required by Yocto build system).
    1 $ cd poky
    2 $ source build/conf/set_bb_env.sh

  7. Setup the machine and OS distribution environment.
    1 # For sa515m
    2 $ export MACHINE=sa515m
    3 $ export DISTRO=auto
    4 # For sa415m
    5 $ export MACHINE=sa415m
    6 $ export DISTRO=auto
    7 # For sa2150p
    8 $ export MACHINE=sa2150p
    9 $ export DISTRO=msm

  8. Build the Yocto platform SDK and generate SDK installer.
    1 $ bitbake core-image-minimal -c do_populate_sdk
    Once the build completes, the SDK installer will be found in poky/build/tmp-glibc/deploy/sdk directory. For example, oecore-x86_64-armv7at2hf-neon-toolchain-nodistro.0.sh is the installer for SA515M LE.2.1.

  9. Finally, install the build environment on host machine using installer generated at step 8. When prompted specify directory for installation.
    1 $ poky/build/tmp-glibc/deploy/sdk/oecore-x86_64-<arch>-toolchain-nodistro.0.sh

  10. An application can be now written and compiled against TelSDK libraries by following build procedure mentioned in Yocto SDK project manual here: https://docs.yoctoproject.org/sdk-manual/index.html

Building a sample application

Our build environment is setup now. As an example, TelSDK supplied location sample application for SA515M LE.2.1 can be built by executing following instructions.

1 $ cd <platform_sdk_installation_directory>
2 $ source environment-setup-armv7at2hf-neon-oe-linux-gnueabi
3 $ cd telux/public/apps/samples/loc/loc_app/
4 $ ${CC} SampleLocationApp.cpp -ltelux_loc -std=c++11 -lstdc++ -o testapp