Skip to content

CPU OS Build Support

The Hexagon SDK provides support to build use cases for both Android and Linux--Linux Embedded (LE), Linaro and Ubuntu--HLOS running on the application processor.

The SDK includes libraries for both Android and Linux variants:

  • Libraries for Android variants are located in folders starting with Android (e.g., Android_Debug)
  • Libraries for all supported Linux variants (LE, Linaro and Ubuntu) are located in folders starting with Ubuntu (e.g., Ubuntu_Debug)

For example, see $HEXAGON_SDK_ROOT/ipc/fastrpc/remote/ship to view the libraries available for various OS configurations.

In the remainder of this page, all Linux variants are referred to as Ubuntu.

Cross-compilation tools for Linux are not provided with the Hexagon SDK. This page explains how to download, install, and use these tools to build examples for Ubuntu variants.

Android executables

The focus of this page is to provide support for building SDK examples for Ubuntu variants, because the Hexagon SDK already supports Android natively. For simple step-by-step instructions to build and run an Android executable, see the calculator example instructions. For an example on how to build an Android APK, please refer to the calculator C++ APK example.

Ubuntu executables

This section discusses the steps to cross-compile and build Ubuntu binaries for hard-float ARM ABI or soft-float ARM ABI, using a Windows or Linux machine on which the Hexagon SDK is installed.

Linaro support

The following instructions are for using the gcc-linaro-7.5 tools with which all Hexagon SDK examples are tested.

  1. Download the correct version of the tools based on the specified configuration.

    Configuration Hard-float ABI Soft-float ABI
    Windows tools to build 64-bit Linaro i686-mingw32_aarch64-linux-gnu N.A.
    Windows tools to build 32-bit Linaro i686-mingw32_arm-linux-gnueabihf i686-mingw32_arm-linux-gnueabi
    Linux tools to build 64-bit Linaro x86_64_aarch64-linux-gnu N.A.
    Linux tools to build 32-bit Linaro x86_64_arm-linux-gnueabihf x86_64_arm-linux-gnueabi
  2. Extract the tools under the $HEXAGON_SDK_ROOT/tools/ folder.

  3. Rename the tools folder as linaro for all 32-bit Linaro flavors, or linaro64 for all 64-bit Linaro flavors

  4. Build your projects with the following commands:

    Linaro flavor Hard-float ABI Soft-float ABI
    64-bit Linaro make ubuntuARM N.A.
    32-bit Linaro make ubuntuARM HLOS_ARCH=32 make ubuntuARM HLOS_ARCH=32 SOFT_FLOAT=1

    NOTE:

    If you get the following error while building:

    screenshot

    Download libwinpthread-1.dll from this location, add the local path to this DLL into your SYSTEM PATH, and try again.

OELinux Toolchain Support

Follow the steps below to install OE v11.3 tools on Ubuntu host for building Hexagon SDK examples,

  1. Download the correct version of the tools based on the specified configuration.

    Configuration Hard-float ABI Soft-float ABI
    Linux tools to build 64-bit OELinuxTools aarch64-oe-linux-gcc-11.2-2023.03-vt-x86_64.tar N.A.
  2. Extract the aarch64-oe-linux-gcc-11.2-2023.03-vt-x86_64.tar under the $HEXAGON_SDK_ROOT/tools folder or any other location on your local machine. By Default, the command used is tar -xvf aarch64-oe-linux-gcc-11.2-2023.03-vt-x86_64.tar OELinuxTools.

  3. Decompress the OE v11.3 tools using the following command. For example, $HEXAGON_SDK_ROOT/tools/OELinuxTools/fetch.sh $HEXAGON_SDK_ROOT/tools/OELinuxTools/ . You can replace this installation path $HEXAGON_SDK_ROOT/tools/OELinuxTools with the path where the OELinuxTools are installed on your local machine.

LE and Ubuntu support

For LE and Ubuntu support, follow the same procedure as described for Linaro, with the appropriate tools. For LE support, OELinux Toolchain can also be used, follow the same procedure as described for OELinux Toolchain, with appropriate tools.

Snap support

A Snap is a package that holds the application along with its dependencies. It can run across Linux distributions without any modifications. Snapcraft is a framework that is used to build Snap. Users can build their own Snap using Snapcraft and publish them to the Snap store. The Snap store provides a place to upload snaps, and for users to browse and install the software they want.

Follow these steps to build snaps from Hexagon SDK.

Run the project

After the Ubuntu binaries are generated, follow the same steps as illustrated in the calculator example for signing, loading, and running the project.