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 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.
For either a pure Linux environment or a Windows/VirtualBox emulated environment, you'll need to do a small amount of setup.
Decide on a base directory. For all our examples here, we will use
~/ARTIK05X/tinyarabut you are welcome to choose your own.
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
openocdso there is no need to install it here.
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.
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.
.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 'master' branch.
git branch -a
git checkout master
Add "s" Module Signing Tool
This procedure is required only if you are using "s" modules.
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
Extract the file into the Downloads directory.
build/configs/artik05x/tools/codesigner/directory structure in the correct subdirectory of your Tizen RT installation.
Copy the code signer tool into the new subdirectory.
cp ~/Downloads/artik05x_codesigner .
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
USB drivers for the FTDI device. This procedure is only needed if you will be flashing using OpenOCD from a Windows application like
Browse to the
- Under Options, select List All Devices.
- Under the devices drop-down list, select Interface 1 of the dual COM port.
- Update the driver to the WinUSB driver by clicking Replace Driver.
- 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
libusb-1.0 driver package was installed in the earlier setup, and along with
openocd is sufficient for flashing over the JTAG interface.