Embedded OS
Embedded operating systems
Most modern microprocessor devices contain embedded software (or firmware) which is much more complex than software used in more mature devices.
An increasing complexity demands more flexibility in hardware management tools, bringing the process of developing embedded software closer to developing software for large computers. This problem is solved by real-time operating systems (RTOS) that allow the developer to obtain almost all the instrumental comforts of a big operating system, while remaining within the limits of using the limited resources of the processor and the controller-integrated memory.
Key characteristics of RTOS
Typical RTOS hardware requirements are: RAM more than one kilobyte and a RISC processor operating at a frequency of a few megahertz and higher. In contrast to full-functional operating systems, an RTOS is a source code or library that is statically linked together with the developed software and forms a monolithic image of the firmware. This approach greatly simplifies the user isolation mechanism and the system code (there is no isolation in some RTOS), as well as optimizes the size of the firmware by deleting an unused code at the compilation stage.
The second important RTOS feature is determinism due to the computational complexity O(1) of any system call, which means that there is no dependence of time spent on processing the system call on the internal state of the system. This feature results in part from the ability of a real-time operating system to work on systems with minimum RAM and a low speed CPU.
Thus any algorithm implemented on top of an RTOS will be performed on a time scale, which is a linear function of the real-time clock rate (of course, provided the CPU clock frequency remains unchanged). This feature helps implement RTOS-based systems that control real-time processes: control of electric motors; signal capture, processing and transmission; control of technical processes, and more.
More complex operating systems (such as Linux or Windows) do not have this feature, so even with an operating system in place, real-time tasks are often performed in the RTOS on a dedicated controller or processor core.
In addition to low-level system calls which provide multitasking and working with basic hardware resources (timer, RAM), most RTOSs also provide higher-level services that help implement a graphical user interface (GUI), work with a large number of peripherals, create file systems, implement a variety of network protocols (TCP / IP, PPPoE, FTP, etc.), and much more.
Â
1. FreeRTOS
It is a ported free (GPL) real-time operating system for embedded systems. It is one of the most popular embedded operating systems (its market share is 13 per cent, according to EE Times).
FreeRTOS supports 33 hardware architectures and 18 toolchains. Promwad engineers have also added to this operating system support for the Power e200z0h architecture which is used in microcontrollers of the SPC56 family by STMicroelectronics designed for use in the corresponding nodes of vehicles.
FreeRTOS provides developers with a basic set of services typical of any RTOS:
- Dynamic priority-based preemptive scheduling
- Media synchronization (semaphores, critical sections) and control transfer (queues and events)
- Timer function
The community of FreeRTOS developers also offers a rich set of extensions provided both under free and commercial licenses: TCP/IP stack, graphic tracer, CLI, SSL/TLS functions, HTTP server. For applications that require a high-reliability certificate (IEC 61508, EN62304, FDA 510 (k)), WITTENSTEIN delivers SafeRTOS, which is a revised version of FreeRTOS that inherits its API.
2. ThreadX
It is one of the most popular commercial RTOSs, which is supplied by Express Logic under a Royalty Free license. The reliability and predictability of ThreadX is confirmed by 1.5 billion devices operated by this system, as well as by a number of security certificates.
ThreadX is supported by a large number of hardware architectures, including modern versions of ARM processors. Most system functions are written in assembler with a view to optimize them for a specific architecture, which delivers exceptional performance with low system requirements:
- The firmware size starts at 2 KB, requiring up to 500 bytes RAM
- The load time is 300 CPU cycles; the context switch time is less than 100 cycles
ThreadX is suitable for developing medical devices, military equipment, automotive electronics and industrial automation devices.
Express Logic provides a wide range of development tools that greatly simplify the debugging process. The system has a built-in tracer and a graphic analyzer operating on the host side. There is a plug-in for the Eclipse environment, which helps visibly observe the current status of the system: active task number, stack filling, function call return stack, the percentage of system resources used, etc.
3. RTEMS
It is one of the oldest RTOSs, now distributed under a free GPL license. The key area of RTEMS development is support for free development tools, application programming interface standards (POSIX, muITRON) and a trend for implementing services available only in commercial RTOSs.
So RTEMS contains the full-functional BSD TCP / IP stack, a graphic user interface based on libraries, such as picoTk, NanoX, OpenGUI, MicroWindows and FLTK. A large number of libraries have been ported to RTEMS, which are popular in other POSIX-compliant operating systems: zlib, tcl, ncurses and libavl.
Promwad engineers selected RTEMS for a project involving the development of an industrial computer based on the NXP QorIQ p1020 SoC, which is designed to control a power station. This project implements the following pattern of operation of the computer operating systems:
- One p1020 core executes RTEMS, which runs real-time tasks
- The other core executes Linux, which implements proprietary communication protocols and high-level business logic
- Interaction between the two operating systems is carried out through the standard OpenMCAPI interface, for which an appropriate adapter was implemented on the RTEMS side
4. Linux
Strictly speaking, Linux does not fit the definition of an RTOS, being rather a general-purpose operating system. However, the rapidly increasing performance of hardware platforms used for embedded systems enables the use of Linux in applications previously operated by an RTOS.
Typical system requirements for Linux:
- RISC CPU >100 MHz
- >16 MB FLASH memory
- >8 MB RAM
Using Linux, a firmware developer is able to use a huge number of open source libraries and tools operating on Linux desktop and server versions.
In addition, the Linux community has developed a lot of software designed specifically for embedded systems – NAND memory file systems, BSP with support for a variety of hardware platforms, distributions which help collect 1 MB images of the root file system.
At the moment, Linux is the most commonly used operating system at Promwad. It is applied in developing media players, set-top boxes, network routers and VoIP equipment. In applications that require real-time operating systems, Promwad engineers have worked out an asymmetric configuration of multi-core processors, which involves the use of one kernel for an RTOS and the other for Linux.
5. SYS/BIOS
SYS / BIOS is a proprietary operating system, which, however, is distributed in source codes without a license sale.
SYS / BIOS is a development by Texas Instruments, which was originally designed to run on DSP processors (it was called DSP / BIOS and later renamed to SYS / BIOS, to emphasize its more general applicability).
The latest versions of SYS / BIOS are able to work not only on the DSP processors, but also on a wide range of other processors and controllers by TI: ARM Cortex-M3, MSP430, ARM9, etc.
SYS / BIOS is part of the Linux SDK, which is available for the DaVinci video processors. Communication between Linux running on the ARM core and SYS / BIOS running on the DSP core is achieved through the standard programming interface DSP / BIOS Link.
6. PikeOS
PikeOS was developed by SYSGO AG specifically for mission-critical projects which require maximum firmware reliability and predictability.
To achieve maximum isolation of structurally independent software parts, PikeOS applies the concept of logical resources partitioning based on the use of a hypervisor. The PikeOS hypervisor is a small software layer that virtualizes accessible peripherals and hardware resources. Accessible hardware resources are statically assigned to each partition. Thus, a program running in one partition has no way of affecting the operation of a program in another partition.
PikeOS finds its application in avionics, mechanical engineering and automotive electronics.
Â
Our projects in embedded software development
Â
Are you looking for experts in embedded operating systems?
Please, drop us a line. We will contact you today or next business day. All submitted information will be kept confidential.