Discussion on selection of Linux Embedded System Development Platform

Source: Internet
Author: User
Linux Embedded System Development Platform selection-Linux general technology-Linux programming and kernel information, the following is a detailed description. Abstract: there is a great advantage in developing embedded products using Linux, that is, rich development resources and low costs. However, the technical routes are complex and diverse, lack of professionals is a challenge for the development of Linux embedded systems. From the perspective of practical application, this article discusses and studies the platform selection issues in the development of Linux embedded systems, in order to benefit Linux developers.

1. Embedded System and Linux

According to an association of Electrical Engineers, an embedded system is a device used to control or monitor large-scale systems such as machines, devices, or factories. Specifically, it is a combination of computer software and hardware. It is application-centered, based on computer technology, and software and hardware can be reduced, so as to adapt to the functional, reliability, cost, volume, power consumption and other strict requirements of the dedicated computer system. Generally, embedded systems do not use general computers and run solid software. It is difficult or impossible for end users to change firmware. Linux has already become a household name in the IT field. To sum up, applying Linux to embedded systems has the following advantages:

① Linux itself has a complete tool chain, which makes it easy to establish the development environment and cross-run environment of embedded systems on its own, and can overcome the obstacle of simulation tool (ICE) in embedded system development.

② The kernel is fully open, so that you can design and develop a real-time hardware system. For soft real-time systems, it is also easy to implement in Linux.

③ Powerful network support allows Linux network protocol stack to be developed into an embedded TCP/IP network protocol stack.

2 Embedded System Design Process

According to the embedded system engineering design method, the embedded system design can be divided into three stages: analysis, design and implementation. The analysis stage is to determine the problems to be solved and the objectives to be completed, and is often referred to as the "demand stage". The design stage mainly addresses how to fulfill user requirements under given constraints; the implementation phase focuses on how to coordinate the entire software and hardware system on the basis of the Selected hardware and software. After the analysis stage ends, developers usually face a difficult problem: the selection of the hardware platform and software platform, because its quality directly affects the completion of current tasks.

Usually the hardware and software options include: processor, hardware components, operating systems, programming languages, software development tools, hardware debugging tools, software components, etc.

In the above selection, the processor is usually the most important, and the operating system and programming language are also critical. The selection of the processor often limits the selection of the operating system, and the selection of the operating system limits the selection of development tools.

3. hardware platform Selection

3.1 processor Selection

The core component of the embedded system is various types of embedded processors. According to incomplete statistics, the total number of embedded processors worldwide has exceeded more than 1000, and the popular architecture has 30 series. However, unlike the global PC market, there is no microprocessor or microprocessor company that can take the lead in an embedded system. In 32-bit CPUs alone, there are more than 100 types of embedded microprocessor. Because of the great differences in the design of embedded systems, the selection is diversified.

Investigating the CPU vendors listed on the market, some companies such as Motorola, Intel, and AMD are well-known, while some small companies such as QED (Santa Clara. CA) although well-known, it also produces excellent microprocessor. In addition, some companies, such as ARM and MIPS, only design but do not produce CPUs. They assign production rights to semiconductor manufacturers around the world. ARM is an influential microprocessor manufacturer in embedded systems in recent years. Its design is very suitable for small power supply systems. Apple uses ARM in the Newton handheld computer, and several other digital wireless phones are also using ARM.

When selecting a processor, designers should consider the following main factors:

① Processing performance. The performance of a processor depends on multiple factors, such as clock frequency, internal register size, and whether the command processes all the registers in a peering manner. For many embedded systems that require processors, the goal is not to select the fastest processor, but to select the processor and I/O subsystem that can complete the job. For high-performance application designs, we recommend that you consider some new processors at a relatively low price, such as IBM and Motorola Power PC.

② Technical indicators. At present, many embedded processors integrate the functions of peripheral devices, reducing the number of chips and the development cost of the entire system. The first consideration for developers is whether the hardware required by the system can be connected to the processor without the need for too much Glue Logic (GL, Glue Logic. The second is to consider some supporting chips of the processor, such as DMA controller, Memory Manager, interrupt controller, serial device, clock, and so on.

③ Power consumption. The largest and fastest growing market for embedded microprocessors is handheld devices, electronic notebooks, PDAs, mobile phones, GPS navigators, Smart appliances, and other consumer electronic products. Among these products, the microprocessor is typically characterized by high performance and low power consumption. Many CPU manufacturers have already entered this field. Today, users can buy an embedded microprocessor, which is as fast as the Pentium in a notebook, and it is only powered by a common battery, and the price is very low. If it is used for industrial control, the consideration for this aspect is weak.

④ Software support tools. Only one processor does not support good software development tools. Therefore, selecting appropriate software development tools will play a very good role in system implementation.

⑤ Whether the debugging tool is built in. If the processor has built-in debugging tools, the debugging cycle can be greatly reduced to reduce the debugging difficulty.

⑥ Whether the supplier provides the evaluation board. Many processor vendors can provide evaluation boards to verify that theories are correct and decisions are appropriate.

3.2 Other Factors in hardware part Selection

① Production scale. I plan to do 1 set? Multiple sets? Or scale production? If the production scale is large, you can design and prepare your own hardware to reduce the cost. Otherwise, it is best to purchase the motherboard and I/O board from a third party.

② Market goal of development. If you want to make the product available as soon as possible to gain competitiveness, you need to buy mature hardware as much as possible; otherwise, you can design your own hardware to reduce costs.

③ Software dependency on hardware. Can the software be designed or developed in parallel when the hardware is not in place.

④ Whenever possible, try to use common hardware. In terms of the choice of CPU and architecture, the principle is: as long as there is an alternative solution, try not to choose a hardware platform not supported by Linux.

4. Software Platform Selection

The embedded software development process is mainly involved in code programming, cross-compilation, cross-connection, download to the target board and debugging. Therefore, the selection of the software platform also involves the following aspects.

4.1 Operating System Selection

(1) Considerations for Operating System Selection

After the hardware solution is determined, the selection of the operating system is relatively easy. Different hardware may affect the selection of the operating system. For low-end CPUs without Memory Management units (MMU), the uClinux operating system is required. For relatively high-end hardware, the General Embedded Linux operating system can be used. UClinux and common Linux have their own advantages and disadvantages. There are many operating systems that can be used for embedded system software development, but the key is how to select an operating system suitable for development projects. After years of development practice, I think the following points should be taken into consideration:


① Development tools provided by the operating system. Some real-time operating systems (RTOS) only support the development tools of the system vendor. Therefore, the compiler and debugger must be obtained from the operating system vendor. Some operating systems are widely used, third-party tools are available, so there is a lot of room for choice.

② The difficulty of porting the operating system to the hardware interface. Porting the operating system to hardware is an important issue and a key factor that affects whether the entire system can be completed on schedule. Therefore, we need to select an operating system with high portability to avoid the difficulties that the operating system is difficult to transplant to the hardware and accelerate the development progress of the system.

③ Memory requirements of the operating system. Balance whether extra money is required to purchase RAM or EEPROM to cater to the large memory requirements of the operating system.

④ Are developers familiar with the operating system and its APIs.

⑤ Whether the operating system provides hardware drivers, such as network cards.

⑥ Tailoring of the operating system. Some operating systems have strong scalability, such as embedded Linux, Tornado/VxWorks, etc.

7. Real-time performance of the operating system.

(2) comparison of several types of Embedded Linux systems

Embedded Linux systems are mainly divided into three types:

The first category is specifically for Linux embedded applications. How to make Linux smaller and more easily embedded into the hardware with higher volume requirements and features and performance requirements is their product development direction, such as MontaVista Linux of MontaVista. The second type is a product designed specifically for the real-time features of Linux. Developing Linux into a real-time system, especially a hard real-time system, applies to some key control scenarios (not just information appliances ). For example, the RT-Linux product developed by Fsmlabs has been used in many aspects of industrial control; coimbra University in Portugal has used RT-Linux to implement a system for controlling reaction and program control in chemical production control plants. The third type of product is a combination of real-time and embedded solutions. Many companies do this and provide integrated development solutions, such as Lineo and TimeSys.

Therefore, when selecting an operating system, you need to select an embedded Linux system that suits your needs based on your embedded requirements and real-time requirements. At the same time, it is the same as the hardware selection principle. If possible, try to use a common embedded Linux system.

4.2 programming language selection

The selection of programming languages mainly takes into account the following factors:

① Versatility. Different types of microprocessors have their own specialized assembly languages. This sets a huge obstacle for system developers, making system programming more difficult and software reuse impossible. However, advanced languages generally have little connection with the hardware structure of specific machines. Most microprocessors have good support and good versatility.

② Portability degree. The assembly language is closely related to a specific microprocessor. A program designed for a microprocessor cannot be directly transplanted to another different type of microprocessor for use, with poor portability; advanced languages are common to all microprocessors, and programs can run on different microprocessors, which is highly portable.

③ Execution efficiency. In general, the more advanced the language is, the more compiler and overhead it will be, the more applications will be, the more slow it will be; but simply rely on low-level languages, such as assembly languages for application development, the problem is that programming is complex and the development cycle is long. Therefore, there is a trade-off between development time and running performance.

④ Maintainability. Low-level languages such as assembly languages do not have high maintainability. Advanced language programs are often modular, and interfaces between modules are fixed. When the system encounters a problem, you can quickly locate the problem in a module and solve it as soon as possible. In addition, the modular design also facilitates the expansion and upgrade of system functions.

Comparison of several development languages:

Many languages are used in the development of embedded systems. The advanced languages are Ada, C/C ++, Modula-2 and Java. The Ada Language is strictly defined, easy to read and understand, and supports a wide range of database programs. Currently, it is widely used in defense, aviation, aerospace, and other related fields, and will still play an important role in these fields in the future. C language supports a wide range of database programs. Currently, it is the most widely used programming language in embedded systems. It will still play an important role in the application field of embedded systems for a long time. C ++ is an object-oriented programming language. It has been widely used in embedded system design, such as gnu c ++. Visual C ++ is an integrated development environment that supports Visual programming and is widely used in GUI program development. However, compared with C ++, the Objective Code of C ++ is often large and complex. This factor should be fully considered in embedded system applications. Modula-2 is clearly defined, Supports rich, has a good modular structure, has a wide range of applications in teaching and scientific research. Although the development and application of this language have been relatively gentle, it has recovered in Europe in the past two years. The Java language is relatively young, but has strong cross-platform features, and is currently gaining momentum. The "one-time programming, available everywhere" feature of Java makes it popular in many fields. With the development of network technology and embedded technology, Java and embedded Java applications will become more and more extensive, but Java consumes a large amount of hardware resources.

4.3 considerations for the integrated development environment

The Integrated Development Environment (IDE) should consider the following factors:

① Functions of the system debugger. System debugging, especially remote debugging, is an important function.

② Supports database functions. Many development systems provide a lot of library functions and template Code. For example, a familiar C ++ compiler carries a standard template library. It provides a set of useful collection, storage, search, and sorting objects. Similar to the principle of choosing hardware and operating systems: Unless necessary, use standard glibc whenever possible.

③ Whether the compiler developer continuously upgrades the compiler.

④ Does the Connection Program support all file formats and symbol formats.

4.4 hardware debugging tool selection

Good software debugging programs can effectively detect most errors, but selecting a good hardware debugging will get twice the result with half the effort. Common hardware debugging tools include the following:

① Real-time online simulator (ICE, In-Circuit Emulator ). From the perspective of simulation plug to ICE, ICE should be a controllable MCU. ICE is connected to the target system through a short cable. One end of the cable has a plug-in inserted into the socket of the processor, while the processor is inserted into the plug-in. ICE supports regular debugging operations, such as single-step running, breakpoint, disassembly, memory check, and source program-level debugging.

② Logical analyzer. The logical analyzer is most commonly used for hardware debugging, but can also be used for software debugging. It is a passive device used to monitor system bus events.

③ ROM simulator. The ROM simulator is used to insert devices from the ROM socket on the target to simulate the ROM chip. You can download the program to the ROM simulator, and then debug the program on the target, as if the program is sintered in the PROM, thus avoiding the trouble of directly sintering after each program modification.

④ Online debugging of OCD or online simulation (on-chip emulator)

Special silicon-based materials and custom serial connections with CPU pins. In this special CPU Chip, OCD (On-Chip Debugging) can be used to take full advantage of OCD features. With a low-end adapter, you can connect the OCD port with the master workstation and front-end debugging software. From the basic form of OCD, it features the same as a single ROM monitor, but unlike the latter, it requires specialized programs and additional communication ports.

4.5 select Software Components

Some software components are free of charge, and some software components are licensed. The cost of software components authorized is generally high, but most of them have undergone strict tests, with high reliability and short debugging time. There are also some free software components, which have good performance and reliability. Therefore, developers should weigh the options to determine which solution is better.

5 Zhan Wang

Development outside China is in full swing, and Development in China is not weak. Linux has powerful vitality and application value in embedded systems. Many companies and universities are interested in this aspect to varying degrees. There is reason to believe that the development of embedded Linux will lead us into a new era of embedded systems.
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.