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 14.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. Add necessary support packages.
    sudo apt-get update
    sudo apt-get install git gperf libncurses5-dev flex bison
    sudo apt-get install openocd libusb-1.0

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

  3. Edit the bash init script to add the correct toolchain path prefix.
    vi ~/.bashrc
    export CROSSDEV=arm-none-eabi-
    You'll need to restart your system before the changes take effect.

Install Tizen RT

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

https://github.com/SamsungARTIK/TizenRT

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

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

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 ~/ARTIK053

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

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

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 ~/ARTIK053

  3. git clone https://github.com/SamsungARTIK/TizenRT 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 'end-to-end' branch, which you would need to recreate the Onboarding environment (from the Getting Started article).

    1. git branch -a

    2. git checkout artik-e2e

Enable JTAG Flashing

When you initially connected the ARTIK 053 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

This procedure is needed if you will be flashing from a native Windows application.

  1. Locate USB drivers for the FTDI device. There are tools available to simplify installation of an appropriate driver on the FTDI part, such as:

  2. 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.

Interface 1 must remain as the default COM port driver so that you can continue using the debug interface with PuTTY.

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: