Objective: This article presents a brief introduction on some aspects of Embedded Systems and to set the ground for the beginning of Yocto Embedded Linux development.
Recommended prerequisite article to read: None
As an Embedded Systems engineer or enthusiast, a common progression would involve a combination of any of the following:
Baremetal development for simple micro-controllers such as the 16-bit ATmega and PIC series. Mostly this would be in embedded C programming.
As system needs increase such as interfacing to more peripherals or networks, and need for higher speeds, modern 32-bit MCUs such as the STM32 and Kinetis families come in handy. More so, at this level development is more based on simple real time operating systems (RTOS) such as FreeRTOS. Nevertheless, many applications can still run as baremetal.
However, in the last decade there has been a plethora of Systems on Chip (SoCs) that have been developed and retailed as Single Board Computers (SBCs). Examples of these include the DragonBoard, Raspberry Pi, BeagleBoard, amongst hundreds of other boards. At this level, the system incorporates so much silicon peripherals and running at the GHz speeds that an operating system is inevitable. Most of these boards are shipped with ready-made Oss already installed and also offer downloadable images (OSs). These could be UNIX or Linux-based, or even stripped-down versions of Windows such as the Windows 10 IoT. More importantly, most of these boards provide the developer with the option to build or customize an operating system to suit their needs. This is the gist of this article.
Field Programmable Gate Arrays: In the lifetime of an embedded system engineer, he/she will most likely also handle FPGAs. With the recent “techfire” spread of artificial intelligence and machine learning that have a higher demand for real-time operation of computationally intensive applications, for example, computer vision, the need for FPGAs is at an all-time high. Traditionally, hardware description languages (HDLs) such as Verilog and VHDL have been the forte of FPGA developments. However, need to ease the experience of software developers making forays in this field has necessitated birth of High-Level Synthesis (HLS). This allows use of C, C++ and System C in development of FPGA designs (at least for Xilinx). More so, just like in the world of MCUs and SBCs, there is an upsurge of SoCs incorporating FPGA fabric and CPUs on the same board. This makes development for such systems need a more sophisticated approach, hence the need for an operating system. Therefore, the world of FPGAs is also making great use of Linux and this also forms the gist of these articles.
There are a number of ways to develop custom Linux systems for off-the-shelf or custom boards. I will not elaborate on these ways, but more can be found in this link written by Drew Moseley. These include Yocto, Buildroot, OpenWRT, distros such as Ubuntu Embedded Linux etc. After a rather short survey and projecting into the future, I made the decision from the onset to adopt the Yocto Environment for my Embedded Linux developments. This is a personal choice and the reader may choose any other approach depending on their needs and motivation.
Moving forward, all the Linux-based projects in these articles, unless stated otherwise, will be based on Yocto.
The above is a very narrow description of the vast field of embedded systems but it provides a background on which to build these articles and tutorials. From my experience, it pays to have a bird’s view of the various options available regardless of the paradigm you choose to follow. This allows you to understand how different systems fit together and thus makes your development much easier. It also allows you to generally know what options you have at any stage of development, and hopefully to choose the better one.
The Yocto Project is adequately covered in these excellent documentation. I will leave it to the reader to explore the documentations to have a greater view of the Yocto environment and its scope. The purpose of these articles is to present a hands-on approach and a gentle dive into the world of custom Embedded Linux development. This is a personal approach and I lay no claim to it being the best or recommended, but it has worked for me and hopefully will work for somebody else.
First thing to point out is that you need to be sure that you actually need Yocto. In other words, why are you developing on Yocto? If, for example, you have a raspberry pi or its compute module, why not just run the Raspbian or any other available distro? Once you are convinced that Yocto is the best option for whatever your goals are, then these articles will serve you well.