A Brief Analysis of Embedded Operating Systems

Publisher:EnigmaticCharmLatest update time:2021-04-30 Source: eefocusKeywords:Embedded Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Embedded operating system is the software foundation of ARMCPU. From 8-bit/16-bit single-chip microcomputer to 32-bit embedded processor represented by ARMCPU core, embedded operating system will replace the traditional manually compiled monitoring program or scheduler and become an important basic component. More importantly, embedded operating system can shield the application program, allowing application programmers to develop application software at the operating system level and easily transplant it to different ARM core embedded processors.


Embedded operating systems all have a certain degree of real-time performance and are easy to cut and scale. They can be suitable for various ARMCPUs from ARM7 to Xscale and various grades of applications. Embedded operating systems can use widely popular ARM development tools, such as ARM's SDT/ADS and RealView, etc., or they can use development software such as GCC/GDB, KDE or Eclipse development environment. There are also special development tools on the market, such as Tornado, μC/View, μC/KA, CODE/Lab, Metroworks, etc.


This paper analyzes three embedded operating systems (μC/OS-II, μCLinux and Embedded Linux) that are currently widely used on ARM CPUs in China.


μC/OS-II embedded real-time kernel Hundreds of devices around the world are already using μC/OS-II, including mobile phones, routers, uninterruptible power supplies, aircraft, medical equipment and industrial control equipment. μC/OS-II has been ported to various ARMCPUs such as ARM7TDMI, ARM9 and StrongARM, and supports CPUs with ARM cores from companies such as Atmel, Hynix, Intel, Motorola, Philips, Samsung, and Sharp. The porting of μC/OS-II is also quite easy, and the CPU-related codes are packaged in three files, which are os_cpu.h, os_cpu_a.asm and os_cpu_c.c. μC/OS-II has more than 60 system calls, covering tasks, timers, semaphores, event flags, mailboxes, queues and memory management. It has included the functions of traditional embedded operating system kernels (such as PSOS, VRTX), and also supports mutually exclusive semaphores, which is a technology only available in embedded operating system kernels in the 1990s, such as VxWorks and VRTXsa.


Because μC/OS-II is a preemptive real-time kernel, there is no difference in performance between μC/OS-II and commercial embedded real-time kernels. μC/OS-II has no user state and kernel state, and the response of tasks (threads) or interrupts and task switching can be very fast, which is mainly related to ARMCPU. The latest 2.7x version also adds an algorithm to avoid modifying the stack pointer during porting, which can ensure that μC/OS-II runs more stably on different CPUs and is more convenient to port. In addition to the kernel, μC/OS-II currently has a commercial file system μC/FS, a graphics system μC/GUI, and task debugging tools μC/KA and μC/View, but μC/OS-II itself does not currently have a TCP/IP protocol system.


In general, μC/OS-II is an embedded operating system kernel that is very easy to learn, simple in structure, fully functional and highly real-time, and is suitable for a variety of embedded applications as well as teaching and scientific research in colleges and universities. Finally, it should be noted that μC/OS-II is not free software. Anyone who wants to learn to use μC/OS-II needs to purchase the book "Embedded Real-Time Operating System μC/OS-II". Products that use μC/OS-II need to purchase a product production license, and those who purchase this license can also get technical support and upgrade services during the development period.


μCLinux operating system μCLinux is an operating system that is miniaturized and tailored for microprocessor chips without MMU (memory management unit). If products such as ARM7TDMI, ARM940T in the ARMCPU series want to use the Linux operating system, they can only use μCLinux. Of course, μCLinux also supports other mid- and low-end embedded processors such as MotorolaDragonball and Coldfire.


μCLinux maintains the main features of the traditional Linux operating system, including stable and powerful network and file system support. μCLinux cuts a lot of Linux kernels to reduce the size, suitable for small-capacity, low-cost embedded systems such as 512k/b RAM and 1M/b Flash. Another simplification of the μCLinux system miniaturization is the use of μCLib library to replace Linux's Glib library. The use of μCLib can greatly reduce the code size of the application. For small and medium-sized embedded applications, the μCLib function can meet the needs, so even some Linux 2.4. Embedded Linux operating system What we want to discuss here is the Linux operating system with MMU function that can be embedded on ARMCPU, which can also be called embedded Linux operating system. Unlike Microsoft's software, Linux is not owned, maintained and developed by a single company. Linux has multiple distributions in the market. All distributions contain the same Linux kernel, basic tools and applications. Different distributions mainly differ in additional tool chains, applications, configurations and various kernel patches. Embedded Linux has mainly made improvements and improvements in real-time enhancement, kernel streamlining and reduction, and support for multiple CPU structures (such as ARMCPU).


There are two ways to use embedded Linux systems: the first is to assemble it yourself (called DIY kernel). You can find all the Linux codes, or go directly to the source code tree of ARMCPU to find the porting of the required Linux version at linux.org.uk">www.ARMlinux.org.uk, or some semiconductor companies, such as Samsung and Motorola, have a minimum Linux kernel system on their own websites or on their own ARM evaluation boards. If this minimum kernel does not contain the GCC/GDB tool chain, you may have to download all the source code from the GNU website, and then compile and generate the required version of the ARM tool chain and application library. This process is quite time-consuming and difficult. It should also be pointed out that the configuration of this DIY kernel, adding applications and drivers is also non-standard and complicated, which is the particularity of embedded systems.


The second is to choose a commercial embedded Linux operating system platform. Commercial embedded Linux versions are optimized for embedded processors, such as ARM, and support evaluation boards and major device drivers from various semiconductor manufacturers. Commercial embedded Linux includes file systems, applications, real-time extensions, and technical support and training services. Currently, well-known commercial embedded Linux products abroad include: Monta Vista Linux, Bluecat Linux, Timesys Linux, Metrowork Linux, Vlinux, and Redhat Linux, etc.


There are also Hongqi, Chinasoft, and Xinhua embedded Linux in China. Monta Vista Linux was launched by Monta Vista Software in 1999. It is currently the world's leading embedded Linux operating system and tool supplier. Monta Vista has a leading position in Linux technical key points such as real-time performance, cross-development tools, high availability, and dynamic power management of embedded Linux. The latest version of MontaVista Linux is 3.1, which uses Linux 2.4.20 and is a commercial version optimized and customized for 8 CPU series (including ARM and Xscale).


Choosing a commercial embedded Linux such as Monta Vista Linux allows users to focus their time and money on application software and specific hardware interfaces and device drivers. Using commercial embedded Linux can provide a certain period of time (usually 1 year) of technical support, upgrades and training (this is very important because Linux is changing every day).


Currently, except for domestic products, the price of commercial embedded Linux is still very expensive, ranging from several thousand to tens of thousands of dollars depending on the configuration and service time. Most domestic users can hardly afford it financially and psychologically. Compared with development tools from Microsoft and Tornado/VxWork, commercial embedded Linux development tools still need to be improved and enhanced in terms of ease of use and richness.


As a Linux operating system, I recommend using embedded Linux with MMU instead of mCLinux, because most of the new ARMCPUs are AMR9 cores, which have MMUs. The support and maintenance from both the open source Linux community and commercial embedded Linux companies are much better, faster and richer than mCLinux.


Conclusion


Earlier we made a detailed analysis of three popular embedded operating systems on ARM CPU. Before entering into a summary, the author would like to mention several internationally famous embedded operating systems, namely Wind River's VxWorks, ATI's Nucleus, iTron and WinCE, but they are not widely used on ARM CPU, so their introduction is omitted.


Finally, let's summarize several important factors in choosing a suitable ARMCPU embedded operating system: the first is application. If the embedded device you want to develop is closely related to network applications or is a network device, then you should choose embedded Linux or mCLinux instead of mC/OS-II. The second is real-time performance. There is no absolute number to tell you what is hard real-time and what is soft real-time, and the boundary between them is also very vague. This has something to do with what kind of ARMCPU you choose, its main frequency, memory and other parameters. If you use embedded Linux with real-time patches and other technologies, such as MontaVistaLinux (version 2.4.17), the worst case is only 436 microseconds, while 99.9% of the cases are 195 microseconds. Considering the latest Linux improvements in real-time performance. It can be suitable for 90~95% of various embedded system applications. Of course, if you want faster real-time response, such as high-speed A/D conversion requires interrupt delays within a few microseconds, it may be appropriate to use mC/OS-II. Of course, you can also meet such strong real-time requirements by using traditional embedded operating systems such as Vxworks.

[1] [2]
Keywords:Embedded Reference address:A Brief Analysis of Embedded Operating Systems

Previous article:Changes to μC/OS-II Ready List Algorithm on ARM Architecture
Next article:Summary of ARM debugging issues

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号