Combination of Yocto and Qt create powerful and future-proof embedded systems

The programming of embedded systems on an industrial scale makes particular demands of development. Ultimately, software products should be highly individual and performant while at the same time flexible and comprehensible. The GNU/Linux-based framework Yocto offers a solution here in combination with Qt.

Figure 1. System and application developers work on separate levels. With the aid of the build system by Yocto, the parts are put together for the finished image of the target system. (Source: Yocto Project / Garz &Fricke)


By Christoph Kutzera, Garz & Fricke                                            Download PDF version of this article


Limited computing power, special interfaces and high demands on reliability make the programming of embedded systems demanding. Essentially, developers have the choice between various Linux-based systems – excluding of course other more seldom-used base systems. However, off-the-peg systems only prove to be suitable in rare cases or increase production costs considerably. Other solutions have to be sought, such as Yocto. This enables tailor-made software to be created that not only does justice to the high demands placed on embedded systems but can also be reproduced exactly even years later and thus securely maintained and developed further over the entire life cycle.

The Yocto Project is collaboratively maintained under the umbrella of the Linux Foundation and is actively used and supported by prominent major players in the industry such as Intel, NXP and Texas Instruments. Here Yocto needs to be seen as a toolbox for individual GNU/Linux-based operating systems. In addition to the tools for creating the system, the build system, Yocto contains sample recipes. These are templates for the software creation and configuration. the special feature is that the recipes are organized as a layer system. Different configurations that are each relevant for hardware, specific applications or even only for specific components can be readily separated from one another. As a result, Yocto can be used to create individual, adapted Linux distributions – hence specific combinations of kernel, libraries and applications. This means that developers are not restricted to individual systems but instead are able to manage entire platforms in addition to the necessary software landscape. Linux inherently supports a great variety of different processor architectures, chip sets and mainboards and can thus be employed on numerous target platforms. One of the great benefits is that the platform developer can configure use of the available resources such as computing time and working memory very finely and precisely with the aid of Yocto and numerous compiler switches to obtain a performant overall system.

Figure 2. Qt Creator in design mode with external graphics inserted. The tool generates the necessary code automatically (Source: Garz & Fricke)

 

One example of the high level of optimization that is possible with Yocto can be seen in a medical product for which the Hamburg-based microelectronics specialist Garz & Fricke supplied a complete human-machine interface. In addition to the touch display, an HMI also requires an appropriate single-board computer (SBC). Initially the standard product Santino LT was involved. However, this was adapted with particular regard to the energy demand. As the finished medical product should be able to operate completely independently from the electricity mains for periods of hours up to days, the Deep Sleep and Standby modes had to function perfectly – yet neither of these is trivial. Implementation requires a detailed knowledge of the hardware in order, for example, to switch loads off and on again as well as set the correct voltages. Not only the customer from medical technology were able to benefit from the adaptations. Garz & Fricke also adopted the optimizations in matters of standby and energy consumption into its Yocto framework, where they will continue to be maintained for future projects as well. Work with Yocto offers yet another benefit: a high level of traceability in the case of adaptations and modifications. The comprehensive release notes with the detailed list of software and licenses used are particularly helpful in gaining medical approval, for example, also because the auditors ascertain at a glance which software or software components are contained in which version of the finished system.

Companies avoid whenever possible the dreaded situation of being locked in, in other words being committed to only one manufacturer, which can only be resolved at very great expense. However, there is little fear of this with Yocto. After all other hardware manufacturers also supply adapted Yocto versions as well, which contain the necessary individualized configurations and – in some cases proprietary – drivers. Another factor in favour of Yocto is that, if need be, the target platform can be exchanged at reasonable expense so that the costs of changing do not break the budget. The developer can remain in the customary software environment.

Starting up with Yocto does require some work though. Fundamental configurations and the necessary tools such as compiler and linker are part of the Yocto package and are loaded subsequently during the first usage. In particular the comprehensive documentation contained as well as templates for beginners facilitate the start immensely. Manufacturers such as Garz & Fricke additionally give the customer best practice examples relevant to operation and step-by-step instructions. The approach and use of Yocto by system and application developers differs (Figure 1). In both cases, they can to use a wide range of languages and frameworks. Yocto offers the appropriate basis for translating the software sources from the bottom up. System developers will load the pure Yocto from the website of the software project together with additional components as necessary to match the hardware deployed or they can also access an already adapted Yocto environment from the chip manufacturer. In contrast, application developers make use of prepared or adapted versions from the device manufacturers which have been created by their own system developers.

Configurations in Yocto are stored in what are called recipes. These recipes can be backed up and recovered and thus guarantee reproducibility even after many years. The recipes contain configurations that control how the software components are constructed. Garz & Fricke, for instance, therefore supplies a so-called Board Support Package with every board that makes all recipes available to the developer in a completely open form. Embedded systems specialists thus enable their customers to integrate further software libraries and their own applications directly into the build process or reconfigure and compile the kernel with only a few adaptations.

This is where a major benefit of Yocto over conventional GNU/Linux distributions pays off. The changes made by system developers remain traceable. They can freeze the software project at a defined status. Even years later a project such as this can be resumed and developed further, such as in cases when security vulnerabilities must be eradicated. With a conventional distribution in these cases it is quite feasible that libraries and tools will have already evolved to such an extent that it is impossible to edit what is seen as ancient software from this advanced perspective, let alone translate it. In the field of embedded systems, which like vending machines or cash register systems have significantly longer life cycles than a desktop system, this is an absolute no-go. Yocto preserves, as it were, all recipes as well as the development path to the finished binary image in such a way that when the preserved item is unpacked again, the desired binary can be recreated with only one command.

The Qt framework has turned out to be the suited partner in the design and programming of the graphic user interface for Garz & Fricke as well as customers and partners. At the same time, it is very fitting that Qt is among those involved in the Yocto project. Work with Qt based on Yocto usually starts with the Qt Creator, a development environment primarily for the programming of graphic user interfaces (GUI) with C++. Since Qt5, it has been possible to program based on QML and in some cases even HTML. Qt Creator opens three ways of programming for developers. One the one hand, they can of course write source code directly. Alternatively, they can use a so-called WYSIWYG editor, which in the case of QT is UI Designer. Here developers order graphic and other elements directly and see what they obtain: a user interface nested in several layers with underlying program logic (Figure 2). In a third option for creating the GUI, UI Designer enables templates from other applications such as the image processing program Photoshop to be imported and developed further into the GUI. Many developers combine these three options. GUI developers do not necessarily meet with the actual operating system.

This declarative programming in QML enables the interfaces to be described intuitively. Scaling is supported in this process, which makes developing more flexible because it is no longer necessary to define every element exactly to the nearest pixel from the outset. Furthermore, graphics and video are very well supported, which greatly simplifies embedding into the graphic user interface. Added to this is OpenGL support, so that, with a suitable board and graphics chip, the display of the GUI, effects and animations as well as videos benefit from hardware acceleration. During development, Qt Creator helps developers with extensive opportunities for debugging and optimization. In this way, it is possible to integrate tests into the development. Furthermore, the development environment allows the program run to be stopped at any time or at defined points. To achieve the best possible display performance, Creator provides analytical tools to help developers identify heavyweight elements or unnecessary iterations.

Another example from practical applications shows how Qt simplifies the work of the developer. A machine that Garz & Fricke were to equip with displays including control system was originally planned with two screens. Despite the existence of a functioning prototype, a decision was made to dispense with one of the displays. Instead of having to restart the software and GUI development, the developers were able to implement the change in concept to just one screen inside a very short time within the existing software project. During this process, the changes to specific output graphics accounted for the greatest share. The necessary adjustments to layout, on-screen instructions and control logic were able to take place swiftly thanks to the good programming model in Qt and QML.

Qt uses dual licensing, which is something that companies should note. Basically, the entire framework is open source and is subject to the LGPLv3. Accompanying this is the fact that the person using Qt is subject to certain obligations. One of these obligations is that Qt cannot be compiled statically into the system binary but instead can only be dynamically linked. If it is to be integrated statically, the entire source code of the binary also must be disclosed. Furthermore, it must be possible for the buyer to carry out changes in the software components subject to (L)GPL v3. However, this is precisely what users should not be able to do under certain circumstances so as, for example, to guarantee the function of the product or maintain company secrets. In such a case, the company involved in development can make use of a commercial Qt licence, which then releases it from this and other obligations.


Related


Give Your Product a Voice with Alexa

Join us for a deep dive into the system architecture for voice-enabled products with Alexa Built-In. Device makers can use the Alexa Voice Service (AVS) to add conversational AI to a variety of produc...

The two big traps of code coverage

Code coverage is important, and improving coverage is a worthy goal. But simply chasing the percentage is not nearly so valuable as writing stable, maintainable, meaningful tests. By Arthur Hick...

Securing the smart and connected home

With the Internet of Things and Smart Home technologies, more and more devices are becoming connected and therefore can potentially become entry points for attackers to break into the system to steal,...

Accurate and fast power integrity measurements

Increasing demands on power distribution networks have resulted in smaller DC rails, as well as a proliferation of rails that ensure clean power reaches the pins of integrated circuits. Measuring r...

 

Perfect Motion Control For the Networked World

We live in a physical world where everything is connected. Trinamic transforms digital information into physical motion with accessible, flexible, and easy to use toolkits putting the world’s be...


New High-Performance Serial NAND: A Better High-Density Storage Option for Automotive Display

The automotive requirements: speed, reliability and compatibility. Winbond's high-performance serial NAND Flash technology offers both cost and performance advantages over the SPI NOR Flash typica...


President Tung-Yi talks about Winbond

Winbond is a leading specialty memory solution provider with a wide rage of product portfolio. Owned technology and innovation are our assets for our industry and our customers. Winbond we are high qu...


New Memory and Security Technologies for Designers of IoT Devices

Internet of Things (IoT) edge nodes are battery-powered, often portable, and are connected to an internet gateway or access point wirelessly. This means that the most important constraints on new I...


Winbond TrustMe Secure Flash - A Robust and Certifiable Secure Storage Solution

Winbond has introduced the TrustMe secure flash products to address the challenge of combining security with advanced process nodes and remove the barriers for adding secure non-volatile storage to pr...


Ultra-Low-Power DRAM: A “Green” Memory in IoT Devices

Winbond is offering a new way to extend the power savings available from Partial Array Self-Refresh (PASR), which was already specified in the JEDEC standard by implementing a new Deep Self-Refresh (D...


Polytronics Thermal Conductive Board (TCB) at Electronica 2018

This video introduce the basic product structure, advantage, and application of Polytronics thermal conductive board (TCB). Polytronics exhibit wide range of circuit protection products and thermal ma...


Arrow and Analog Devices strategic partnership and collaborative approach to provide solutions for our customers.

Mike Britchfield (VP for EMEA Sales) talks about why Analog Devices have a collaborative approach with Arrow Arrow’s design resources are key, from regional FAEs in the field to online des...


WE MAKE IT YOURS! Garz & Fricke to present the latest HMIs and SBCs at Electronica 2018

Sascha Ulrich, Head of Sales at Garz & Fricke, gives you a quick overview about the latest SBC, HMI and Panel-PC Highlights at electronica 2018. Learn more about the SANTOKA 15.6 Outdoor HMI, the ...


Macronix Innovations at electronica 2018

Macronix exhibited at electronica 2018 to showcase its latest innovations: 3D NAND, ArmorFlash secure memory, Ultra Low Vcc memory, and the NVM solutions with supreme quality mainly focusing on Automo...


ams CEO talks about their sensor solutions that define the mega trends of the future

In this video Alexander Everke, ams’ CEO, talks to Alix Paultre of EETimes about their optical, imaging and audio sensor solutions in fast-growing markets – from smartphones, mobile device...


Intel accelerated IoT Solutions by Arrow

Arrow is showing Intel’s Market Ready Solutions in a Retailer shop with complete eco environment. From sensors via gateways into the cloud, combined with data analytics, the full range of Intel ...


CSTAR - Manufacturers of cable assembly from Taiwan

CSTAR was founded in 2010 in Taipei, Taiwan. Through years of experience, we are experts in automotive products, LCD displays, LCD TVs, POS, computers, projectors, laptops, digital cameras, medical ca...


NXP Announces LPC5500 MCU Series

Check this video to discover the new NXP microcontroller LPC5500, the target application and focus area. Links to more information: LPC5500 Series: World’s First Arm® Cortex® -M...


Molex Meets Solutions at Electronica

These are exciting times in the electronics world as Molex migrates from a pure connectors company to an innovate solutions provider. Solutions often start at the component level, such as the connecto...


Alix Paultre investigates Bulgin's new optical fiber rugged connector range at Electronica 2018

Alix Paultre interviews Bulgin's Engineering Team Leader Christian Taylor to find out more about the company's new range of optical fiber connectors for harsh environments. As the smallest rug...


Cypress MCU and Connectivity are the best choice for real-world IoT solutions.

Cypress’ VP of Applications, Alan Hawse, explains why people should use Cypress for their IoT connectivity and MCU needs. Cypress wireless connectivity and MCU solutions work robustly and sea...


Chant Sincere unveils their latest High Speed/High Frequency connection solutions at Electronica 2018

Chant Sincere has been creating various of product families to provide comprehensive connection solutions to customers. USB Series Fakra Series QSFP Series Metric Connector Series Fibro ...


Addressing the energy challenge of IoT to unleash billions of devices

ON Semiconductor introduces various IoT use cases targeted towards smart homes/buildings, smart cities, industrial automation and medical applications on node-to-cloud platforms featuring ultra-low po...


ITECH, world leading manufacturer of power test instruments, shinned on electronica 2018

ITECH, as the leading power electronic instruments manufacturer, attended this show and brought abundant test solutions, such as automotive electronics, battery test, solar array simulator, and electr...


ITECH new series give users a fantastic user experience

ITECH latest series products have a first look at the electronics 2018, such as IT6000B regenerative power system, IT6000C bi-directional programmable DC power supply, IT6000D high power programmable ...


SOTB™ Process Technology - Energy Harvesting in Embedded Systems is Now a Reality

Exclusive SOTB technology from Renesas breaks the previous trade-off between achieving either low active current or low standby current consumption – previously you could only choose one. With S...


Power Integrations unveils their new motor control solution

In this video friend of the show Andy Smith of Power Integrations talks to Alix Paultre from Aspencore Media about their new BridgeSwitch ICs, which feature high- and low-side advanced FREDFETs (Fast ...


Panasonic talks about their automotive technology demonstrator

In this video Marco from Panasonic walks Alix Paultre of Aspencore Media through their automotive technology demonstrator at electronica 2018. The demonstrator highlights various vehicle subsystems an...