Select an ARM CPU embedded operating system -μCOS-II, μClinux, or Linux?

xiaoxiao2021-03-06  76

He Xiaoqing, McTai Software Technology Company

Abstract: From the 8-bit / 16-bit microcontroller to the 32-bit embedded processor represented by the ARM CPU, the embedded operating system will alternative to the traditional basic components of the traditional monitor or scheduler. This article makes an analysis of three embedded operating systems, which are widely used in the ARM CPU. Keywords: embedded operating system, ARM, μC / OS-II, μClinux, embedded Linux ARM is the world's largest semiconductor intellectual property supplier, with nearly 200 semiconductor companies in the world. Currently, 80% of GSM mobile phones, 99% of CDMA phones, and future 3G mobile phones are also based on ARM core-based embedded processors. Provide research analysis information, Gartner Inc, Statistics in June 2003, 2002 ARM ranked first in global semiconductor IP suppliers, accounting for 19.8% of the market share, sales revenue reached 180 million US round, an increase of 10% from 2001. Currently, in addition to the mobile terminal processor like Ti OMAP, Intel XScale and Motorola, there is also a processor that is similar to Samsung, Atmel, Sharp, Oki, and Philip semiconductor company. It can be widely used in various embedded systems, and now there are more S3C44B0, 4510, 2410, AT91 series, and Intel PXA255, etc. in the market. The ARM processor is a 32-bit design, and the 16-bit instruction set is also configured. The software can save approximately 35% compared to the equivalent 32-bit code. The ARM processor currently has ARM7, ARM9, ARM9E, ARM10, ARM11 series, and from partner Intel Xscale and Strong ARM Series ARM7, suitable for medium and low-end network devices, terminals, various universal embedded applications and industrial controls. Equisical fields. ARM9 is suitable for smartphones, PDAs, and advanced control management and instrumentation applications. Intel Xscale series provides high-performance price ratio, low power consumption, applicable to applications such as smart wireless terminals, PDAs, home networks, and network memory devices. The embedded operating system is an important software foundation of the ARM CPU to the 8-bit / 16-bit microcontroller to 32-bit embedded processors represented by the ARM CPU. The embedded operating system will replace the traditional monitors or scheduling. Program, becomes an important infrastructure. Embedded operating systems can provide device management of ARM CPU cores and peripherals, such as nuclear initialization, MMU (memory management unit), timer, interrupt, serial port, SPI, GPIO, Ethernet, graphics interface, etc., embedded operating system Provides task scheduling, memory management, interrupt processing, synchronous mutual exclusion mechanism, file system, and network function, more importantly, the embedded operating system can play a mask for the application, allowing appkers to develop applications for operating system-level development applications Software and easy to transplant on different ARM-based embedded processors. Embedded operating systems generally have certain real-time, easy to cut and telescopically, can be adapted to applications from ARM7 to Xscale ARM CPU and various grades, and embedded operating systems can use a wide popular ARM development tool, such as ARM. The company's SDT / ADS and REAL VIEW, IAR EW can also use open source software, such as GCC / GDB, KDE, or Eclipe development environment, and commercial manufacturers in the market, such as Tornado, μC / View, μC / KA, CODE / LAB, Metroworks et al. This paper is analyzed in the three embedded operating systems widely used in the ARM CPU, μC / OS-II, μClinux and embedded Linux.

The latter two kinds belong to Linux, the former is a microprocessor without MMU, such as the ARM7 TDMI core, the latter can apply to the vast majority of MMU-based microprocessors, such as ARM920T, of course, articles will also involve other support ARM CPU's embedded operating system. μC / OS-II embedded real-time kernel Mr. Jean Labrosse, "Embedded Real-time Operating System μC / OS-II" translated by Shao Beibei, was published by Power Press (First Edition) and Aeronautics University Press (Second Edition) Nearly 10,000 books, I believe there are thousands of students, teachers and engineers are using μC / OS-II, in the past year (2003), in the "Electronic Products", "Electronic Design Applications and "MCU and Embedded System Applications" and a [μC / OS-II related papers at various academic conferences ". Hundreds of equipment around the world have been using μC / OS-II, including mobile phones, routers, uninterruptible power, aircraft, medical equipment and industrial control equipment, have also included Hong Kong authorities, first Kohi, Ann More than 10 companies in the control technology purchased product authorization. μC / OS-II has various ARM CPUs such as ARM7TDMI, ARM9 and STRON ARM, supports CPUs including ARM cores including ATMEL, HYNIX, Intel, Motorola, Philips, Samsung, Sharp. The transplant of μC / OS-II is also very easy, and the code related to the CPU is packaged in three files, OS_CPU.H, OS_CPU_A.ASM, OS_CPU_C.C, and Mr. Jean Labrosse's application notes AN-1011 and AN-1012 pairs ARM7, AN-1337 has made a detailed description of the transplantation process of ARM9. The μC / OS-II has more than 60 system calls, overwrites tasks, timers, semapys, events, mailboxes, queues, and memory management, have the function of traditional embedded operating system kernels (such as PSOS, VRTX), Supports Mutual Exclusion Semaphone, which is an embedded operating system core, such as VxWorks and VRTXSA, in the 1990s. μC / OS-II is because it is a real-time kernel, so μC / OS-II and commercial embedded real-time kernel do not differ in performance, μC / OS-II does not have user-state and kernel, task (thread) or interrupt And the response of task switches can be quickly, mainly related to different ARM CPUs. The latest 2.7X version also adds an algorithm to avoid modifying the stack pointers in Osintcexsw () in porting. This ensures that the μC / OS-II runs more stable on different CPUs and more convenient. In short, μC / OS-II is a very easy to learn (with a very good way to explain the book, the structure is simple, the function is complete, the real-time embedded operating system core is suitable for various embedded applications and Teaching and research in colleges and universities. μC / OS-II is currently in addition to the core outside the commercial file system μC / FS, graphics system μC / GUI and task debugging tool μC KA and μC View, but μC / OS-II did not have TCP / IP (plan ) If needed, you can purchase commercial TCP / IP, such as INterniche (www.iniche.com), but the price is still very expensive, free TCP / IP items such as lwip (http://www.sics.se/~adam/ LWIP /), but no matter the function or stability and commercial code, this may also be the weakness of μC / OS-II.

Finally, the μC / OS-II is not a free software. Anyone who learns to use μC / OS-II to purchase "embedded real-time operating system μC / OS-II" book, using μC / OS-II products need to purchase Product production license, purchase this authorization can also be obtained from technical support and upgrade services during development. The μClinux operating system μclinux is a miniaturized Linux operating system that is cut without MMU microprocessor chip, in ARM CPU series, ARM CPU series, ARM core CPU products, if you want to use Linux The operating system can only use μclinux, of course, μclinux also supports other medium and low-end embedded processors such as Motorola Dragonball, ColdFire. μClinux maintains the main features of the traditional Linux operating system, including stable, powerful network and file system support, μClinux cuts a large number of Linux kernels to narrow the size, suitable for small capacity, low cost embedded in 512K RAM, 1M Flash system. The μClinux project is started by the Linux 2.0.38, the first project is Motorola 68EZ328, which has some transplant versions of 2.4 Linux support, such as S3C2500, 44B0 and other ARM chips, which you can in μClinux official website Www.uclinux.org, μClinux has recently developed a variety of 2.4.x versions of transplants, with a view to the development trend of Linux social mainstream (because this year Linux 2.6 will begin to become the mainstream kernel). Another important reason for miniaturization of μclinux system is to use μclib libraries to replace Linux's GLIB libraries, using μCLIB can greatly reduce the code size of the application, for small and medium-sized embedded applications, μCLIB features can meet the needs, so it is currently certain Embedded Linux systems using Linux 2.4 kernels also use μclib libraries. In μClinux, due to the non-memory protection mechanism, application code generally uses a static connection method, and in μclinux performs format (Linux is a COFF or ELF format), μclinux and application code can support cure, stored in Flash storage media In, there is no need to pass a copy of the rash to the RAM in LINUX. All of this makes μClinux more like a traditional embedded operating system. μClinux is mainly for embedded processor development design without MMU, then it has lost the characteristics of the Linux operating system brought by MMU, such as the static loading (Linux supported dynamic application), μClinux For memory operations, it is direct physical memory, so that any procedure can cause the kernel crash, μclinux uses vfovk (), supports multi-process, but requires the parent-child process to coordinate synchronization, μClinux file system is relatively old, supported CPU and The reference design is relatively small, and the development and maintenance of the community is relatively slow. More importantly, there is no software company, there is no software company has commercial μClinux software products and services. At present, the official website of μClinux also sees the giant company figure like IBM, Intel, only 2 ~ 3 small hardware or Program providers, this is a certain risk in commercial product development.

Embedded Linux Operating System We will discuss here that the Linux operating system that can be embedded on the ARM CPU, or a MMU function, or an embedded Linux operating system. Finnish Student Linux TorvalDs When you write the first Linux version in 1991, how can I imagine that today Linux is widely apparent and applying in the world. The embedded system is an important field of Linux applications due to its extensive and diverse is growing rapidly. Unlike Microsoft software, Linux is not owned by a company, maintenance development, Linux has a variety of distributions in the market, all release versions contain the same Linux kernel, basic tools and applications, different releases are mainly Additional tool chains, applications, configurations, and various kernel patches are different. Embedded Linux is mainly in real-time enhancement, kernel streamline and cut, supporting multiple CPU structures (such as ARM CPUs), etc. have improved and improved. There are two ways to use Linux in an embedded system. The first is that the user is assembled (called DIY kernel), you can find all Linux code at www.kernel.org, or directly to the source code of the ARM CPU to find the Linux version you need. Migration under ARM, or some semiconductor companies, such as Samsung, Motorola also gives a CD when they sell their own websites or sell their own ARM evaluation boards, with a minimum Linux kernel system that supports them to evaluate boards. If this minimum kernel does not contain a GCC / GDB toolchain, you may want to download all source code to the GNU website, then compile generation to generate the version of the ARM toolchain and application library, this process is quite time consuming and difficult of. It also needs to be pointed out that the configuration of this DIY kernel is not standardized and complex, which is the particularity of the embedded system. For example, some ARM-based applications are small interconnections on the network. Equipment, he needs multiple Ethernet, USB host, small NOR flash file system, and an ARM handheld terminal, it cares about the LCD touch screen, infrared or Bluetooth interface, USB user, fast start, dynamic Power Management and Nada Flash, so you need to download a variety of patchs, applications and tools in dozens of Linux related websites, repeated compiler and debugging them with the kernel you get, and confident that they are The ARM CPU hardware evaluation board you use is stable and reliable, which is done without any technical support. Of course, if you can get the "minimum kernel" from a semiconductor company or open source website, it is close to the components (such as drivers, applications, and file systems) and your application, and code is reliable, or you are in time. Get the guidance of Linux users, then you are lucky. It is said that there is a famous telecommunications equipment manufacturer for 2 years and 1.5 million US dollars to develop their own Linux in a project, and finally have to stop. The second is to select a commercial embedded Linux operating system platform. Commercial embedded Linux versions are for embedded processors, such as ARM optimized, has supported various semiconductor manufacturers' evaluation boards and main equipment drivers, commercial embedded Linux, including file systems, applications, Real-time expansion and technical support training services, today's famous commercial embedded Linux products include: Montavista Linux, Bluecat Linux, Timesys Linux, Metrowork Linux (formerly Lineo), Vlinux (South Korea) and Redhat Linux, etc., China has red flags, China Soft, Xinhua embedded Linux.

Montavista Linux is launched in 1999, which is currently the world's best embedded Linux operating system and tools suppliers, Montavista's real-time, cross-developing tools, high availability, dynamic power management, etc. Linux in embedded Linux. Technical points have world leadership. Montavista Linux is 3.1, using Linux 2.4.20, a customized commercial version of 8 CPU series (including ARM and XScale), including the latest O (1) real-time scheduler, can preempt the kernel, microsecond level High score timer, Eclipse-based Devrocket development environment, support applications, kernel, and file system (cured) configuration and debugging, and test and analysis tools, pure Windows, Linux and Solaris development hosts, more than 80 evaluation boards and applications System device driver support. Select Montavista Linux such a commercial embedded Linux that allows users to put time and funds in application software and specific hardware interfaces and device drivers, using commercial embedded Linux, can get a certain period of time (generally 1 year) technology Support, upgrade, and training (this is important because Linux is changing every day). Commercial embedded Linux is currently except for domestic products, the price is still very expensive, according to the configuration and service time, about thousands to a million yuan, most domestic users are still difficult to bear, commercial embedded Linux development Tools relative to Microsoft and Tornado / VxWork have improved and improved in terms of easy use and richness. As a Linux operating system, I recommend using Linux with MMU, instead of μClinux, because most new ARM CPUs are AMR9 cores, they all have MMU, whether it is open source Linux community or commercial The support and maintenance of embedded Linux is more than μClinux, which is better, fast and rich. In front of end language, we have made detailed analysis of three embedded operating systems on ARM CPU. Before entering a summary, I also want to mention several embedded operating systems in the world, they are Windriver's VxWorks, ATI's Nucleus, Japanese Itron and Wince.

WinDriver's VxWorks used to be the most influential embedded operating system two or three years ago, almost major communication equipment manufacturers use PowerPC VxWorks, but on the ARM CPU, VxWorks is not more common; ATI's Nucleus (now is already a Mentor's embedded department) once as the most famous source code, an embedded operating system without a vending, in North America and Asia, Taiwan, the most successful design example is a variety of GSM mobile phones, NUCLEUS Just a real-time kernel, users need to purchase its TCP / IP, GUI, file system and device drivers to form a full-functional embedded system, which makes it lose the advantage in recent years; Japanese Itron is in Japan Almost a household-known embedded kernel, standard programming interface, low price (1 ~ 3 thousand US round), no royalty, support almost all CPUs (especially for many Japanese CPUs), but in addition to Japan, Itron is good象 无 建 树; Microsoft Wince, almost all high-end PDAs use it, use of Xscale or ARM9 CPUs, but Microsoft is only cares about the same Embedded equipment manufacturer, so he doesn't It is easy to port as different CPUs as Linux to different CPUs and add equipment drivers. Microsoft is more willing to do everything like Windows. You just take it. If you don't have a quite level, it is difficult to get Its personalized customization service. Finally, we summarize several important factors that choose a suitable ARM CPU's embedded operating system. The first is the application. If you want to develop embedded devices closely related to web apps or is a network device, then you should choose embedded Linux or μClinux, not μC / OS-II, because Linux is not only integrated with TCP / IP Agreement, there is also a rich other network protocol, such as DHCP Server, PPPoE, WebServer, and more. The second is real-time. None of an absolute number can tell you what is hard, what is soft, the boundaries between them are also very vague, this is to choose what kind of ARM CPU, its clock, memory and other parameters have a certain relationship Even if the INTEL XSCALE has a delay in the kernel, the worst case of the kernel is only 1.743 milliseconds, while 99.9% of the situation is 1.42 milliseconds, and if you use an embedded in technology such as adding real-time patches Linux, such as Montavista Linux (2.4.17 version kernel), the worst case is only 436 microseconds, while 99.9% of the situation is 195 microseconds, the above number, and the latest Linux improvements in real-time (such as low profile " When o (1) debugger, microsecond high resolution POSIX timer), embedded Linux can be suitable for various embedded system applications 90 ~ 95%. Of course, if you want a higher level of real-time response, such as high-speed A / D conversion requires a few microseconds within a few microseconds, requires a millisecond-level serial real-time processor, such as a macrpers, may have similar applications, etc. It is suitable to use μC / OS-II. Of course, you can meet such a strong time-based requirement using traditional embedded operating systems like VxWorks. The third is the development tool.

转载请注明原文地址:https://www.9cbs.com/read-120692.html

New Post(0)