Skip to main content
Version: kirkstone_1-08-00

Linux SDKs

Introduction

SECO Linux images are built using the Yocto Project/OpenEmbedded-core. The same build system can be used to generate SDKs specific to these images. Alternatively, SDKs for each SECO demo image and device can be downloaded as pre-built artifacts. A standard Yocto Project SDK includes:

  • Cross-development toolchain containing cross-compiler, cross-linker, cross-debugger, etc.
  • Native sysroot containing cross-compiler, linker and other development tools
  • Target sysroot containing libraries, headers & symbols
  • Environment setup script

For more information, refer to the Yocto Project documentation.

Downloading a pre-built SDK

Pre-built SDKs for each SECO device and its demo image can be found under the respective CLEA OS Release page. Under the "Link References" section of each release, the SDK artifacts can be located under the "SDK" column of each machine's artifacts. Please note that the Qt SDK is only included in the "Embedded" distro.

alt text

After downloading the SDK in archived form, extract it to a temporary location.

$ mkdir sdk-directory && cd sdk-directory

Place the SDK inside the 'sdk-directory' and then extract its contents.

$ tar -zxf seco_<board>_sdk-clea-os-embedded-full-image-wayland-<version>.tar.gz

The next section can be skipped and we can now proceed with the SDK installation.

Generating an SDK

Whether building an SDK for the standard SECO demo image or for your own custom image, the method of generating the SDK is the same. After building the image as described in the Compile Clea OS article, you can use bitbake to generate the SDK:

$ bitbake <image_name>-full -c populate_sdk

The generated SDK will be located at tmp/deploy/sdk/.

The Embedded distro is already configured to build the Qt SDK, so there is no need to include it in the configuration.

SDK Installation

As the toolchain can be installed to work with either Wayland or XWayland backend, adjust the wayland or xwayland section of the path according to your compilation settings.

Execute the generated SDK script file to initiate installation:

$ ./clea-os-embedded-[x]wayland-glibc-x86_64-seco-image-clea-os-armv8a-seco-<board>-toolchain-<version>.sh

When prompted, accept the default installation path (or enter an alternate path) for the SDK.

Application Development

Begin by changing into the SDK's installation directory and sourcing the environment script:

$ cd /opt/clea-os-embedded-[x]wayland/<version>
$ . environment-setup-armv8a-poky-linux

To validate the environment setup, one can run

$ echo ${CC}

The expected output will be similar to this:

aarch64-poky-linux-gcc -mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/chris/opt/clea-os-embedded-wayland/4.0.5/sysroots/cortexa53-crypto-poky-linux

Here we can validate the architecture of the target machine (-march=<architecture>), as well as the distro (clea-os-[things|embedded]).

The newly exported environment variables expand the PATH variable with the bin directory of the native sysroots (containing cross compiler etc.) and define the SDK's associated cross-development tools and flags. To make use of this environment in development, use the environment variables.

For information on how to use the SDK to develop C/C++ applications, please consult the official Yocto Documentation on Using the SDK Toolchain.

For Qt based applications, please consult the CLEA OS documentation on the Qt Framework SDK.