{{{#!html

  1. Yocto Software Development Kit (SDK)
    1. Using the SDK

Yocto Software Development Kit (SDK)

Gateworks provides a Software Development Kit (SDK) compatible with the Yocto Board Support Package (BSP). This SDK provides a cross-toolchain and libraries compatible with the gateworks-gui-image that we provide as a pre-built downloadable disk image so that you can build applications that will run on top of Yocto installed on a Ventana board without having to have build the entire BSP yourself.

Cross Compile SDK Downloads:

You can build your own SDK compatible with a filesystem image of your choice using information here.

Using the SDK

To use the SDK you need to source the setup-environment* script in the installation directory. This script will augment your path and set several env variables useful for cross-compiling:

  1. Run the downloaded/built .sh file and specify an install path:
    /bin/sh ventana-yocto-1.8-sdk-*.sh -d ~/sdk
    
    • Note that you need write access to the directory you wish to install to. By default this is /opt/poky/ but you can change it when prompted or via the -d <dir> parameter
    • do not run the install script as root - if you do, you will need to adjust some directory permissions
  1. cd into extracted toolchain:
    cd ~/sdk
    
  1. Activate the environment:
    source environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
    
    • You will need to do this per new shell
    • The toolchain executables and various support apps will be in your path, but you need to make sure you are using them by using the env vars above in your build instructions and Makefiles.
    • pkg-config is in the SDK path and will provide valid results based on PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_PATH env vars
    • autoconf/automake etc are in the SDK path and will provide valid results based on M4 CONFIGURE_FLAGS env vars
  1. Build:
    • to build a standalone single source app (ie hellowworld.c) use variables defined by the environment such as CC, LD, AR, etc:
      cat << EOF >> /tmp/helloworld.c
      #include <stdio.h>
      
      int main (int argc, char** argv)
      {
         printf("Hello World\n");
         return 0;
      }
      EOF
      
      ${CC} /tmp/helloworld.c -o /tmp/helloworld
      
    • to build using a Makefile which properly uses CC/CFLAGS/LDFLAGS/LIBS etc:
      make