Linux Embedded system design and development process

Source: Internet
Author: User
Embedded System Design Process

According to the conventional engineering design method, the design of the embedded system 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, also known 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 based on the selected hardware and software. After the analysis stage, developers usually face a difficult problem, namely the selection of the hardware platform and software platform, because its quality directly affects the completion of current tasks.

Generally, hardware and software options include processors, hardware components, operating systems, programming languages, software development tools, hardware debugging tools, and software components. In the above selection, the processor is often the most important, and the operating system and programming language are also critical. The selection of processors often limits the selection of operating systems, and the selection of operating systems also limits the selection of development tools.

Hardware Platform Selection

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, with more than 30 popular systems. However, unlike the global PC market. No microprocessor or microprocessor company can lead an embedded system. There are more than 100 types of embedded microprocessor for 32-bit CPUs. The design of embedded systems varies greatly, so the selection is diversified. Arm is an influential microprocessor architecture in embedded systems in recent years. Its design is very suitable for small embedded devices.

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.

Other factors in Hardware Selection

First, consider the production scale. 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.

Second, we need to consider the market goal of development. If we want to sell our products as soon as possible to gain competitiveness, we need to purchase mature hardware as much as possible. Instead, you can design your own hardware to reduce costs.

In addition, software dependency on hardware, that is, whether the software can be designed in parallel when the hardware is not in place or the first development is also a consideration for hardware selection.

Finally, try to use common hardware whenever possible. 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.

3. Software Platform Selection

The development process of embedded software mainly involves code programming, cross-compilation, cross-linking, downloading to the target board, debugging, and other steps, therefore, the software platform also involves three aspects: Operating System, programming language, and integrated development environment.

① 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.

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.

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.

For more information about CPU selection in the embedded field, see:

Arm: Samsung MICREL

PPC: Freescale IBM

X86: Intel

IDE reference:

Tornado + VxWorks: WinDriver

Linux: montavista

ADS: Freescale (Motorola)

I personally feel that a headache in embedded system design is the selection of solutions. A major benefit of the success of many good products is its successful selection. This is a process of continuous accumulation. The selection of CPU is the top priority among all models and is very important. Some domestic manufacturers blindly choose cheap CPU and hardware modules when growing consumer products, while ignoring the importance of some other modules (software modules), resulting in a longer R & D cycle or even a miscarriage, therefore, we must make it clear throughout our design. In general, the design of electronic products has the following options:

Design Tool (schematic and PCB): it is recommended to use Protel for ease of use. Cadence is powerful. You can also consider other features such as powerpcb.

Design Platform: Windows XP + LINUX (rack and software maintenance)

CPU: processing performance, technical indicators (bonding logic), power consumption, software support tools, built-in debugger, evaluation board, price

Operating System Selection: development tools (GCC, GDB, whether there are third-party tools, etc.), hardware interface porting difficulty, memory requirements, API familiarity, hardware driver (network port), whether it can be tailored, real-time performance, price, etc.

IDE Selection: whether it is easy to get started, whether it is continuously updated, and whether the debugger compilation function is powerful.

Hardware simulators: generally used for development and application.

 

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.