Has the following advantages of the Linux operating system in embedded system

Posted by: admin  • Information section:Electronic project

The computer for history and embedded computer control equipment in the field of their long history. The first is used to control the electromechanical telephone exchanger in communication equipment "solid control program" is the embedded program. "Computer system" is not common at the time; so the corresponding solid program stored in memory device control. At that time, the operation control program is very advanced ideas, but was only That's all.

在嵌入式系统中使用Linux操作系统有以下优势

When the computer is designed for user specific design, special application instructions, I/O equipment and the main computing devices are integrated together. The microprocessor has changed this situation, low price, compact structure CPU And peripherals connected to the bus system formed a relatively large. The hardware structure is very stable, and on this basis, it has established a general software development environment and programming model, which simplifies the programming,.

The software also with the development of hardware and development; start only simple tools for programming and debugging, and each software must be written from scratch. The program is mostly used in assembly language, assembler is not perfect, debugging is a very troublesome thing. So until the middle of 70s, the modular runtime program and standard did not become popular. In late 70s, the operating system of embedded system. They are using assembly language, and can only be run on a special processor on the corresponding processor; out of date, the operating system is useless, all of the code of the new operating system of the processor must be re written. Since the C language, using C language operating system more efficient, operating system programming has been greatly improved. C language has good stability and portability, so many operating system today are using C to write. So at the end of 80s, appeared in several commercial embedded operating system. And they have become the mainstream of embedded operating system today. For example, many of the famous user operating system: Vxwork, pSOS, Neculeus and Windowss CE.

But many embedded systems do not use the operating system, they only contain some control flow. In the embedded system is relatively simple case, the control flow to meet. However, when the function of the embedded system is complex, simple control logic is not enough, then you must use the operating system. If you do not use the operating system will make the control system complicated logical structure confusion, error prone. Furthermore, some embedded systems need to access network system, such as the hotel door lock control have been required to access the network, so it needs to support the operating system of embedded application software.

In addition to commercial operating system, and the non commercial embedded operating system can use the copyright requirements. However, todayLinux The system has a need for embedded operating system features, many outstanding advantages: suitable for many kinds of CPU and hardware platform, stable performance, good cutting, development and use easily. Therefore, we decided to use the Linux operating system in embedded system.

1. it is a very good tool, ICE can cross the barrier

The development of the embedded system is the key that needs a good for the development and debugging tools; and in different stages of development also need different tools. For example, artisans, only good tools can make the work better and faster.

 

The development of the traditional debugging tool is ice Online simulator It replaces the target board; the microprocessor, the target program to provide a simulation environment, also can be connected to monitors; allows developers to debug and monitoring program. Although this mode of operation will cause some strange questions, but it can let you know in the target board working state, from the software and hardware interface on the bottom of the speculation. However, the price of this equipment is very expensive. In the past, even in the whole development period, the development of embedded systems mainly rely on these debugging tools. However, we found that once the hardware can support normal serial port operation, we can use the debugging method. The embedded system adopts mature microprocessor. It is very easy to make serial work. Serial connection is successful, can be a lot of development and debugging. So we can not ICE good start development and debugging, but also reduces the development cost.
 

Linux use the GNU C compiler to compile the program, using GDB source program level debugger to debug program. The Linux system provides a suitable means to them you can develop embedded. In order to develop the embedded system based on Linux, can be carried out according to the following methods:

To the serial output Prompt string, such as "word" or "Waston here I you!" Then, through the serial port, GDB command to work. In this way, and the other one to run the GDB program of Linux host system "talk", through the serial port, you can easily make GDB debugging program. Through the serial port and GDB communication procedures, debugging can be C source. You can even put the serial program to RAM Or memory. Through the serial port, GDB can use the software and hardware initialization code to continue running to the core of all start.

Once the core in the operation, you can use other better debugging tools, such as Kgdb, if connected to the network, you can also make the network work. At the same time, you can use GUI xgdb to debug the application.

2. meet the real-time requirements

Careful analysis, most of the system does not need strict real-time. The embedded system is often misunderstood as is the real-time system. In fact, most of the embedded system does not require real-time, and real-time itself is a relative concept of real-time absolute refers to the need to define the service mode and provides in the room, such as a response within microsecond level. The hard real-time function is for special equipment, such as digital signal processing etc.. These require the use of special hardware such as, DMA And other special hardware can also meet the.
 

Some designers can not accurately analyze the system in real time demand, many cases of real-time demand response within 1-5 milliseconds; in most cases, soft real-time response to meet the requirements: WINDOWSS 98Crashed_Yet can response at 4 per second at 98% of the time, if the time is 20 seconds, it will always be response. The soft real-time easy to meet. Factors to consider include context switching time, interrupt latency, the priority of the task and task scheduling. The context switching time was once the focus of real time analysis, but because the CPU speed is greatly improved, it is no longer the key problem.
 

Now, determinants of real-time tasks is the strict requirements of the other interrupt driver routines in the kernel itself and related; and the response delay time is mainly affected by the interrupt priority and other processes will be temporarily closed the interrupt response. Therefore, management mechanism and drive interrupt must ensure the real-time requirements.
 

For the x86 processor, real time extension can be easily performed in the Linux system, RT-Linux is a very good example. It is mainly to the Linux task as a task, so the interference of real-time tasks by real-time Linux, can be met. It also provides the basic core of real-time tasks and Linux tasks and other interfaces, these interfaces are not need real-time strong. This architecture provides a reference for other embedded system. The key factor is that the real-time and non real time code code designed separately, and the handling of real-time applications and other similar procedures.

 

3. for embedded system Linux

One view is that the user does not have to intervene directly in the operation of the machine, the application system that no user interface is embedded system. For example, other systems should be embedded system, but it needs human control. Need to connect to the network system to monitor and control the operation of the network system, is still embedded system; therefore should be according to the main purpose and function of the system to determine whether it is a embedded system.

The smallest embedded Linux system must include following main elements:

1. start the program;

The core 2. integrates memory management, process management and service in time;

3. initialization procedure.

In order to meet the requirements, and in order to maintain a minimum system, you need to add the following elements:

Hardware driver;

The application must be.

According to other needs, you may add the following functions:

1. (in the file management system ROM Or RAM);

2.TCP/IP communication protocol;

3. disk.

4. select the appropriate choice of hardware platform the hardware platform is a very troublesome thing, affected by many factors, such as the company's guiding principles, personal bias, past products influence and ill informed. The cost is a main consideration. To remind you to consider the price not only pay attention to the price of CPU, considering the whole system. But if you are a system designer, you must put the real-time software and hardware combine. First consider how fast the CPU, and then select three times the results; because the application in the actual use of cache (buffer), so the actual speed of the theory of fast CPU will reduce. Secondly, considering how fast the BUS (bus); if you can include other bus, such as PCI, and it. Because sometimes even using DMA mode of transmission, will make rapid CPU become like a snail. With the integrated peripherals CPU is quite good, but also can choose ready-made peripheral drivers, greatly reduce the debugging work, in fact some chip function is not what we need, so don't think that any integration are good stuff.

 

5. compression for the Linux system on the Linux generally feel, do not seem to be suitable for embedded system. That is not the case. Because of the typical issue Linux integrated many desktop PC machines need to embedded system does not need the function. First of all, we can put the core (kernel) separated from other tasks. The standard Linux core is always stored in the memory; when the needs of the application, it need the program to run into memory from disk. The program is complete, clear memory, uninstall program. In embedded systems, there is often no disk. There are two ways to deal with the situation there is no disk. The system is relatively simple, the core (kernel) and the application program stored in memory at the same time, when the system starts, will start the application. Embedded system is the same as previous work this way. The Linux system also supports this way. The second way is, considering Linux load (load) and unload (unloading) program, the embedded system can also use this feature to save memory. If there is a typical embedded system includes: 8 to 16 M and 8 M to 16 RAM; can build file system, driver used to drive the Flash file system. In addition, you can also use the Flash Didsk, one example is m OnChip, it can support up to 160 M Flash. To use the application files stored in the Flash file system, according to the needs of call program.



Tagged:

read ()  •  Jan 10, 2019  •  Edit


YOU MAY ALSO LIKE:

image

The PCB board copper residue rate concept: manufacturing pro

Central air conditioning system common fault repair method

Date: Jan 06, 2019  | Click 14 times

image

Central air conditioning system common fault repair method

image

Talking about the maintenance and maintenance skills of cent

Five rules for designing single-chip system development

Date: Dec 06, 2018  | Click 12 times

image

Five rules for designing single-chip system development

[Ru

image

 The minimum application system of a single-chip microcompu

copyright

© 2018-2019 www.loveelectronics.net Corp.All Rights Reserved.