O.S. SDK

Embedded systems need special tools for software development. Different processor architectures, limited resources and restricted goals are some of the reasons. Without appropriate tools or a team of embedded specialists, the application development for embedded systems is much harder compared to desktop computers, and consequently slower and more expensive.

To value our customers' time by improving their software development productivity, O.S. Systems provides a development kit for developers to build their own software for our systems. The possibility of developing applications independently allows your company to add value to the solution using your own team, being it with little or none knowledge of the system particularities, which means you will skip the cost of training an embedded specialist team to learn the domain of your problem. Once your team is familiar with our SDK (Software Development Kit), developing an application will be as easy as to develop it to any other system.

The O.S. SDK is a set of tools used for developing software to the O.S. Systems products. It is installed on a development machine, which means that you will develop your solution from a common computer and not from the final target, such as a resource-limited thin client. This allows faster prototyping, faster build times, faster test cycles and so on. With our SDK, the application development has its time-to-market accelerated.

Integrated with the Eclipse (http://www.eclipse.org/) platform, the O.S. SDK allows developers to use the cross debugging and profiling tools from the development machine, inside the Eclipse interface. To make things even easier, NFS can be used so both development machine and target device can access the same file system.

Exactly what we provide

  • Exactly what we provide

    The cross-toolchain consists of a cross-compiler, cross-linker and cross-debugger that are used to develop user-space applications for targeted hardware. The cross-toolchain works with a matching target sysroot. In simpler words, is a directory which is decompressed on the development machine.

  • The sysroot

    The matching target sysroot contains needed headers and libraries for generating binaries that run on the target architecture. The sysroot is based on the target root filesystem image. As well as the cross-toolchain, it is a directory which is decompressed on the development machine.

  • The target device filesystem

    The target device filesystem is the ready-to-boot filesystem for your device. It usually is a single file which is dumped to a SD card yet on the development machine. This SD card is then plugged on the target device and booted.

  • User-space tools

    These are tools for debug and profiling, provided from the target device filesystem, such as: LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, Lttng-ust, among others.

How to use what we provide (Quick Tutorial)

As an example, we will show you how to develop a Hello World application for the Freescale i.MX53 board.

Assuming you've configured your environment correctly (you've installed eclipse, its plugins, the toolchain and the sysroot on the development machine; on the target machine booted the filesystem successfully), creating an application is as easy as the following steps:

  • open Eclipse, on the menubar, click on "File", "New", "Project..."
  • select "C Project", click on "Next"
New_Project
  • type a name for your new project
  • expand the "Yocto Project ADT Project" folder
  • here you could select "Empty Project" if you wish, but let's select "Hello World ANSI C Autotools Project", this way Eclipse creates an Autotools project and its files and folders preconfigured. Click on "Next"
C Project
  • here you can set more information about the project, like: "Author", "Copyright notice", "Hello world greeting", the "Source" folder and the "License". Fill them as you wish and click "Finish"
Basic Settings

At this point your project was created. Let's make sure that the Yocto configuration was set right:


  • on the menubar, click on "Project", "Change Yocto Project Settings"
  • here you can check the "Toolchain" and "Sysroot" locations and the "Target architecture" as well. Change them if needed or just close the window if everything is right
Project Settings

Now that your project is set up, lets build it:


  • on the menubar, click on "Project", "Reconfigure Project". You don't have to do this every time you build it, but only when a project configuration is changed
  • on the menubar, click on "Project", "Build Project"
Build

Your application binary is already created! Now it's time to test it. For the following steps, you need to setup the target device. This includes: boot the corresponding filesystem on it, have a network connection between the target device and the development machine and have started the TCF agent on the target device.

If the description above sounds simplified, it's because it's simple! The filesystem to be booted on the device is provided along with the toolchain and the sysroot. For the i.MX53, on the development machine you just have to do a binary copy of the filesystem to a SD card, plug the SD card on the board and power it on. To setup a valid network configuration, you can do it with a simple command (ex.: ifconfig eth0 10.9.0.1) and to start the TCF agent a single command as well (/etc/init.d/tcf-agent start).

After the device have been set up, let's test and debug your application:

  • on the menubar, click on "Run", "Debug configurations"
  • on the left area, expand "C/C++ Remote Application"
  • locate your project to bring the view of the Debug configurations on the right area
  • at the right side of the "Connection" field, click on "New" to create a new connection with the target device
  • select "TCF" which means Target Communication Framework, click on "Next"
  • fill the IP address of the target device, the name of the connection and a description if desired. Click on "Finish" to create the connection
  • at the "Connection" field, select the just created connection
  • fill in a remote absolute path for your application, click on "Apply"
Debug Configuration
  • click on "Debug"
  • a login screen will be shown, fill with the target device credentials, click "OK"
Login
  • accept the debug perspective when prompted
  • Your application is now running in Debug mode! Press F8 to resume it and complete the execution.
Debug Run

After the application finished its first run, lets add a segmentation fault on the code to see what happens:

  • add the following lines between the "includes" and the "main" function

1.

2.

3.

4.

struct segfault

{

int field;

};


  • add the following lines inside the "main" function

1.

struct segfault *s = NULL;

1.

int dummy = s->field;

  • on the menubar, click on "Project", "Build Project"
  • on the menubar, click on "Run", "Debug Configurations"
  • click on "Debug"
Seg Default

Now you can use the Eclipse IDE with all of its features to debug your application.

That's it, these are the basics to start with the O.S. SDK. Happy coding!