Build and Run Tizen RT Applications
With the ARTIK IDE program set up and running, you're ready to begin a development session. But once you build an image, you'll need to be able to flash-load it to your ARTIK device. So let's take care of installing the drivers for that now.
Installing JTAG Drivers
You'll need to set up a direct data channel between the ARTIK IDE and your ARTIK board. Configuring the host system to open this channel, for program loading and remote debug, only requires installation of a JTAG driver.
Prerequisites. Before you begin, you need to:
Set up and power your ARTIK board
Install the ARTIK IDE
as shown in Getting Started.
Installing Windows JTAG Driver
Close any open terminal windows to the ARTIK 053 serial ports before proceeding.
In the original installation, you accepted the default Windows drivers that were installed when you connected the USB cable. The port that handles JTAG transfers will need a new driver installed for flashing and remote debug activities.
- Browse to the
<ARTIK IDE Installation Directory>\toolsdirectory, and open the
- Under Options, select List All Devices.
- Under the devices drop-down list, select Interface 0 of the dual COM port interfaces.
- Replace the FTDIBUS driver with the WinUSB driver by clicking Replace Driver.
After successful driver installation, the Windows Device Manager will display only one serial COM port under the Ports (COM & LPT) tree and a new Dual RS232-HS device under the Universal Serial Bus Devices tree.
With the ARTIK IDE and the USB JTAG driver installed, you are ready to develop, flash load, and debug applications on the ARTIK 053 Starter Kit.
Installing Linux JTAG Driver
libusb-1.0 driver package is installed during the IDE setup, and along with
openocd is sufficient for flashing over the JTAG interface.
Building Tizen RT Applications
Here you will create your first Tizen RT application, load it to the ARTIK 053 module, and debug it, all using the ARTIK IDE. The ARTIK IDE includes the ARTIK 053 software package, GNU tool chain, and drivers to build and debug your Tizen RT application.
Before starting, open the ARTIK IDE, then run the terminal emulator program (either the integrated console or another program of your choice) to interact with the ARTIK 053 Starter Kit.
Select File » New » C Project to create a new project.
Specify the Project Name. Select ARTIK 053 C Project as Project Type. Click Next.
You can select from any example project listed. To be ready for our first Tutorial, choose SystemIO. Click Next to continue.
In the final two screens, you can specify details for use with your application. For now, accept the defaults and click Next and Finish to create the application.
The application project will include the source file of the example project.
To build the application, right-click on the application project and select Build Project. This will cross-compile the application to be run on the ARTIK 053 module.
Running Tizen RT Applications
The ARTIK IDE communicates with the ARTIK 053 Starter Kit via JTAG for running and debugging the application. The ARTIK 053 JTAG interface on the Starter Kit is accessed through a USB interface; you already installed the necessary JTAG driver.
Using the other COM port, you interact with the ARTIK 053 module using a console program (ARTIK IDE, or another program of your choice).
Hit Enter on the console. You should see the
TASH> prompt of the ARTIK 053 CLI.
Flash the Tizen RT image
To flash the Tizen RT application, and other system images like boot loaders, Wi-Fi subsystem and security subsystem, click the Flash All button in the tool bar (upper right).
You are flash loading the ARTIK 053 with the entire system image as well as your Tizen RT application. You can see the progress in the Build console.
If the flash operation exits immediately and does nothing, then you may not have the JTAG driver installed on the correct port. Review the previous instructions and try again.
Run from the IDE
After you edit and build the Tizen RT application, right-click on the application project and select Run As » Tizen RT Application.
The output can be viewed in the console.
Debug the application
Right-click on the application project and select Debug As » Tizen RT Application to launch the debug session and open the Debug Perspective. The application will be stopped at the first breakpoint. You can now set breakpoints, step, continue, stop, observe variables and perform other debug operations.
Run from the console
TASH> prompt in the ARTIK IDE console window (or you can also switch back to your terminal emulator), type
help and you will see the
sensor app listed. You're ready to test it out! Go to the Tutorials for the next step.