Why embedded system development does not use Linux?

Source: Internet
Author: User
For embedded system development, the reason for not using Linux-general Linux technology-Linux programming and kernel information is as follows. Source http://blog.csdn.net/raymondxu/archive/2005/01/31/275191.aspx

I should be able to count as the first it developer playing Linux in China. When I first developed Linux, the high-end configuration in the computer market was still 486. With the increase in project experience, I deeply feel that there are still many misunderstandings about Linux in China, especially embedded development. At present, I still have many projects on the Linux platform, however, I think that for embedded devices, Linux is not the first choice in most cases. In many cases, it is even the best practice.

In addition to Linux, you have many options:

There are a variety of popular operating systems. Let's talk about the following:

With the development of the IC industry, more and more low-cost CPU and peripherals have emerged. The bottleneck restricting the development of embedded systems is highlighted in the software aspect. Although some embedded operating systems have emerged since the end of 1980s, the most famous ones include Vxwork, pSOS (acquired), QNX, Neculeus, Windows CE, PALM, and SmartPhone. However, these specialized operating systems are commercial products, and the high price of these systems can be discouraged by small companies with low-end products. In addition, the closed source code also greatly limits developers' enthusiasm.
On the other hand, these commercial operating systems often have excellent technical support and rich software packages. Taking WinCE as an example, his PlatForm Bulider has 7 installation discs, supports a large number of application frameworks, and users only need to make few changes to generate an application. There is no big difference between the working intensity and development on a common PC.

At present, the development of open-source embedded systems headed by Linux is strong, and representative include Linux (including uClinux, RtLinux, etc.), RTEMS, eCos, and ucoⅱ. Most users in China use Linux and uCOSII. However, I think various systems have their own reasons. In most of my projects, I recommend RTEMS and eCos instead of Linux and ucoⅱ. The reason is simple. Linux is too complex, slow, and real-time. uCOSII is too simple and requires royalty.

Linux is not designed for embedded systems. Now the size of the kernel source package of Linux2.6 is more than 30 mb. For Linux source code parsing, how many people have read it from start to end. As a result, many problems cannot be solved. In the past, a customer asked to use Linux as the bottom router for them. We used a mature ARM + uClinux system. As a result, the system would occasionally crash, after debugging for a long time, there was no result. After a few months, I found it was a bug in uCLinux itself. During this period, the customer missed several large orders because the system was not stable enough. Since then, another Linux system is used for the VoIP gateway. As a result, it runs very slowly and consumes a lot of resources. There is almost no way to meet the design requirements. Later, switching to eCos not only met the encoding/decoding speed requirements, but also greatly reduced the memory usage and Flash usage. Such a project is not exhaustive. Later I came up with an experience that Linux is used for Demo and other RTOS for commercial versions.

In fact, there are still many such examples. Now, many embedded system design service providers are still Linux, and it seems that the Linux and embedded systems are assigned an equal sign. Why? The reason is as follows:

1 open source code of the Operating System

2. There are abundant resources on the Internet. It is very likely that the entire open source environment can be found, which can greatly shorten the development cycle.

3. Easy and familiar with programming interfaces, which is almost the same as development on the platform

4. Rich upper-layer applications and open source code

5 unified low-layer Interfaces

6 TCP/IP and other protocols

But I think this is untenable. Let's take a look at the so-called advantages of Linux:

1. "Open Source code" many embedded systems are open source code such as eCos, RTEMS, and NetBSD. These systems are easier to understand than Linux. In addition, it is worth mentioning that. Linux is based on the GPL Protocol. That is to say, any modifications to Linux must be made public. NetBSD and other systems are not. They follow a more open BSD Protocol and you have the right to keep any changes to the system confidential. This is very important for commercial systems.

2. "Rich online resources ...... I can only say that other system application resources are also rich. But in general, Linux resources are more abundant than other systems, mainly reflected in the desktop system. Linux has no obvious advantages in the embedded application software field.

3. "programming interfaces are convenient and familiar, and there is almost no difference between programming interfaces and development on the platform". For programming interfaces, eCos, RTEMS, and NetBSD both provide POSIX APIs, which means that, the Code on Linux can be transplanted to the above system without any modifications.

4. The "Rich upper-layer applications and open source code" embedded systems are mostly used for professional purposes. Many upper-layer applications, such as GNOM, are not very useful in the embedded field.

5. "unified low-layer interfaces. TCP/IP comes with "on the one hand, the underlying layer of Linux is very complicated, and its interfaces are also very complicated, which leads to a lot of time (of course, many drivers are ready-made) for Linux drivers ), at the same time, complicated hierarchies lead to lower efficiency.

6. "TCP/IP and other built-in protocols" Almost all embedded systems provide TCP/IP, which is not a Linux patent.

In addition, uCosII has many problems. He is very simple. He is not free as most people think. His free is only displayed in his educational version. If you use uCOSII to export things to the EU, it is very likely that kaka will. What's more, there are very few free ucocios. Do you need TCP/IP? Do you need file support? Pay for it... as a result, the free version of ucoⅱ can only be regarded as a toy.

A really good embedded system should meet the requirements of 1-6, in addition to the following points, note that these have always been Linux Scale

1. Real-time support (do not think that RTLinux's real-time performance is good, but it just improves)

2. low resource usage

3. Low Power Consumption

In addition, when Linux is used to reduce the software cost, it will greatly increase the hardware cost, as if some programs can run with 386 + DOS, but now it is necessary to increase the cost by 586 + windows2000, the speed will only slow down. Nowadays, the market is fiercely competitive, and the profit of many hardware devices is only a few dollars. If Linux is used, the cost may not be controlled.

In short, Linux is only suitable for high-end embedded systems (such as commercial routers), if the CPU <100 MIPS, it is best not to use Linux.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.