This is documentation for the old, first-generation Kaa platform v0.x.
Next generation Kaa Enterprise IoT platform is now available! Try it free with a 30-days trial.
Kaa Enterprise documentation is here.
. . .


This guide explains how to cross-compile Kaa C++ SDK for BeagleBone or BeagleBone Black. Alternatively, you can build the Kaa C++ SDK directly on the BeagleBone board. For more information, see Linux guide for Kaa C++ SDK.


NOTE: This guide is verified against:

Perform the following instructions on the host machine:

  1. Install CMake.

    sudo apt-get install cmake build-essential
  2. Download toolchain.

    mkdir bb_root && cd bb_root
    export BB_ROOT
    wget -c
    tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
    export CROSS="${BB_ROOT}"/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
    export SYSROOT="${BB_ROOT}"/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/libc/usr
  3. Download and install zlib.

    cd "${BB_ROOT}"
    tar -xvzf zlib-1.2.8.tar.gz
    cd zlib-1.2.8
    CROSS_PREFIX="${CROSS}" ./configure --prefix="${SYSROOT}"
    make && make install
  4. Download and install bzip2.

    cd "${BB_ROOT}"
    tar -xvzf bzip2-1.0.6.tar.gz
    cd bzip2-1.0.6
    make CC="${CROSS}"gcc AR="${CROSS}"ar LD="${CROSS}"ld AS="${CROSS}"as PREFIX="${SYSROOT}" install
  5. Download and install Boost.

    cd "${BB_ROOT}"
    wget -O boost_1_59_0.tar.bz2
    tar -xvf boost_1_59_0.tar.bz2
    cd boost_1_59_0
    sed -r 's#(using\s+gcc)(\s+;)#\1 : arm : '${CROSS}c++'\2#g' -i  project-config.jam
    ./b2 install --prefix="${SYSROOT}"
  6. Install Apache Avro for the host and target machines. Avro depends on some Boost components, therefore it is critical that you install them as described in the previous step.

    Install Avro for host machine.

    cd "${BB_ROOT}"
    sudo apt-get install libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev
    mkdir -p avro/host
    tar -xvzf avro-cpp-1.7.5.tar.gz -C ./avro/host
    cd ./avro/host/avro-cpp-1.7.5
    mkdir build && cd build
    cmake ..
    sudo make install

    Patch and install Avro for target machine.

    cd "${BB_ROOT}"
    mkdir -p avro/target
    tar -xvzf avro-cpp-1.7.5.tar.gz -C ./avro/target
    cd ./avro/target/avro-cpp-1.7.5
    patch < avro-cpp-disable-tests.patch
    mkdir build && cd build
    make && make install
  7. Build and install Botan.

    cd "${BB_ROOT}"
    tar -xvzf Botan-1.11.27.tgz
    cd Botan-1.11.27
    ./ --cpu=arm --cc-bin="${CROSS}"g++ --prefix="${SYSROOT}"
    make && make install

Create application

After you installed the required dependencies and built the C++ SDK, you can build and run your Kaa application.

Since BeagleBone (BeagleBone Black) runs on Linux, you can use the Linux guide to build and run your application.

NOTE: The CMAKE_CXX_COMPILER specifies C++ compiler to use and CMAKE_FIND_ROOT_PATH tells CMake where to look for required libraries installed in the previous step.