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.|
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.
For either a pure Linux environment or a Windows/VirtualBox emulated environment, you'll need to do a small amount of setup.
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
Install the ARM toolchain.
sudo apt-get install gcc-arm-none-eabi
The installation location of
/usr/bin/should already be in your path.
Edit the bash init script to add the correct toolchain path prefix.
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:
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.
.zipfile from the GitHub site link shown above.
Un-zip the file contents as the
Clone Tizen RT
Instead of using the
.zip file, you can clone Tizen RT from GitHub in the usual way. Start by installing
sudo apt-get install git
git clone https://github.com/SamsungARTIK/TizenRT tinyara
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).
git branch -a
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.
Locate USB drivers for the FTDI device. There are tools available to simplify installation of an appropriate driver on the FTDI part, such as:
Select Interface 0 of the FTDI device, and change it to a
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
libusb-1.0 driver package was installed in the earlier setup, and along with
openocd is sufficient for flashing over the JTAG interface.