Filter results by

Prepare Linux Development Environment

To develop Tizen RT software from source, you'll need to set up a Linux cross-compilation development environment on your PC. Here we offer a couple of options that work well for us; you may come up with a better solution.

Method Looks Like This
Windows VirtualBox running Ubuntu – a general-purpose virtual machine environment, in which an ARM Linux virtual machine has been set up to run the Ubuntu Linux OS.
Linux PC running Ubuntu – a native Linux setting for running a flexible GNU development environment. This method is probably the best if you are already doing other Linux development.

Ubuntu Linux

In this article we'll be working from an Ubuntu 16.04 Linux environment.

  • If you are using a Linux PC using the Ubuntu Linux OS, you're already prepared to start installing tools. Go directly to the toolchain section below.

  • If you are using a Windows PC, you will first need to provide a "virtual" environment. You can set up a number of virtual machines using the Oracle VirtualBox® program.

    Click for instructions to install VirtualBox and to then load the Ubuntu OS in a virtual Linux machine.

    When your installation is complete, return here and proceed with the steps below.

Cross-compilation toolchain

For either a pure Linux environment or a Windows/VirtualBox emulated environment, you'll need to do a small amount of setup.

  1. Decide on a base directory. For all our examples here, we will use ~/ARTIK05X/tinyara but you are welcome to choose your own.

  2. Add necessary support packages.
    sudo apt-get update
    sudo apt-get install git gperf libncurses5-dev flex bison
    sudo apt-get install libusb-1.0
    You'll use a pre-built version of openocd so there is no need to install it here.

  3. Install the ARM toolchain.
    sudo apt-get install gcc-arm-none-eabi
    The installation location of /usr/bin/ should already be in your path.

  4. Edit the bash init script to add the correct toolchain path prefix.
    vi ~/.bashrc
    export CROSSDEV=arm-none-eabi-
    Restart your Linux instance for the changes to take effect.

Install Tizen RT

Tizen RT for ARTIK 05X is open-source code. You'll find the Tizen RT repository here:

You can either copy or clone the files to your development PC.

While you could put them anywhere, we'll create a directory
and then copy/clone the Tizen_RT OS to a subdirectory

We'll refer to these locations in the examples we show.

Copy Tizen RT compressed file

Copy and uncompress the Tizen_RT OS to your development system.

  1. cd ~/ARTIK05X

  2. Download the .zip file from the GitHub site link shown above.

  3. Un-zip the file contents as the tinyara folder underneath ARTIK05X.

Clone Tizen RT

Instead of using the .zip file, you can clone Tizen RT from GitHub in the usual way. Start by installing git.

  1. sudo apt-get install git

  2. cd ~/ARTIK05X

  3. git clone tinyara

  4. cd tinyara

  5. If you want to select a specific branch to work on, continue as follows. Here we'll use as an example the 'master' branch.

    1. git branch -a

    2. git checkout master

Add "s" Module Signing Tool

This procedure is required only if you are using "s" modules.

  1. Obtain the code signer tool for "s" module operation. Upon clicking the button to download, you will be presented with the license agreement. Read it through and accept to proceed.

                 Download 05Xs file    

  2. Extract the file into the Downloads directory.

  3. Create the build/configs/artik05x/tools/codesigner/ directory structure in the correct subdirectory of your Tizen RT installation.

    cd ~/ARTIK05X/tinyara/build/configs/artik05x
    mkdir tools
    cd tools
    mkdir codesigner
    cd codesigner

  4. Copy the code signer tool into the new subdirectory.

    cp ~/Downloads/artik05x_codesigner .

  5. Make the file executable.

    chmod 777 artik05x_codesigner

The tool presence will be checked for during the build process.

Enable JTAG Flashing

When you initially connected the ARTIK 05X Starter Kit, your PC discovered two COM ports on the FTDI dual RS232-HS device. Behind the first of those (interface 0) is a JTAG interface that will be accessed by OpenOCD for flashing the image.

To use JTAG, you'll need a driver on interface 0 that OpenOCD will recognize as a JTAG interface. Sounds easy, right? But if you're on a Windows PC, you've got multiple options:

  • Flash from the Ubuntu instance running within VirtualBox, which handles USB ports as we described in the installation instructions.

  • Flash from a Windows application (like an msys bash window) that uses Device Manager USB drivers.

If in doubt, you can stay within VirtualBox–Ubuntu for flash loading and also run a serial terminal (screen/minicom) from there, to avoid installing Windows JTAG drivers.

Flashing from Windows

Install Zadig for the FTDI device. This procedure is only needed if you will be flashing using OpenOCD from a Windows application like msys.

The program comes along with the ARTIK IDE installation. You can also find it at the Zadig Web site.
  1. Browse to the ARTIK_IDE_Installation_Directory\tools directory.
  2. Run the zadig-2.3.exe application.
  3. Under Options, select List All Devices.
  4. Under the devices drop-down list, select Interface 1 of the dual COM port.
  5. Update the driver to the WinUSB driver by clicking Replace Driver.
  6. Now select Interface 0 of the FTDI device, and change it to a `libusb` driver.

Interface 0 will now be recognizable by OpenOCD as a JTAG port and will be automatically selected when you upload a new image in the next article.

If you have set up the ARTIK IDE, note that it uses a WinUSB driver for the JTAG port, not libusb. You may need to alternate between the two drivers.

Flashing from Linux

The libusb-1.0 driver package was installed in the earlier setup, and along with openocd is sufficient for flashing over the JTAG interface.

Last updated on: