- open Eclipse, on the menubar, click on "File", "New", "Project..."
- select "C Project", click on "Next"
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.
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 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 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.
These are tools for debug and profiling, provided from the target device filesystem, such as: LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, Lttng-ust, among others.
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:
At this point your project was created. Let's make sure that the Yocto configuration was set right:
Now that your project is set up, lets build it:
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:
After the application finished its first run, lets add a segmentation fault on the code to see what happens:
1.
2.
3.
4.
{
int field;
};
1.
1.
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!