Introduction to embedded Linux development

Source: Internet
Author: User
Embedded systems are dedicated computer systems that focus on applications and are based on computer technology and can be tailored to the functional, reliability, cost, volume, and power consumption requirements of application systems. It has been developing for more than 20 years, and some well-known embedded operating systems, such as VxWorks, Palm OS, and Windows CE, have emerged internationally. However, these operating systems are commercial products, expensive and the source code is not open, leading to a series of problems such as Device Support and application software porting. As an excellent free OS, Linux has become the most promising embedded operating system in the embedded field in recent years.

Embedded Linux integrates the characteristics of embedded and Linux, and its development has its own characteristics compared with general application development. The following briefly introduces the general process of Embedded Linux development.

Understanding hardware is the first step, which is determined by the characteristics of embedded development. Understanding hardware refers to understanding the entire hardware and determining whether the hardware is suitable for the current application. The CPU and various peripheral devices need to be used in the embedded system. Therefore, relevant hardware information, including the CPU, chip manual, various peripheral device manuals, and related circuit diagrams, must be collected, have a deep understanding of the overall system.

After learning about the hardware, you should prepare the required Linux tools and other tools. These tools include the compilers, compilers, and connectors for the CPU used, and the corresponding library tools, target File Analysis/management tools, symbol viewer, and so on. Fortunately, thanks to the openness of Linux, Linux tools for different target platforms are available for free on the Internet. Most of these tools are provided by GNU. Other required tools include tools provided by hardware manufacturers to companies, such as programmers, download tools, and error detectors. All these tools are essential for future development and debugging.

After completing the above preparations, we will enter a substantive stage. First, you need to arrange the memory address, such as the memory address of SDRAM and the memory address of flash. This needs to be considered in combination with the actual application and hardware conditions, make reasonable arrangements for memory addresses based on hardware restrictions and actual application needs, and pay attention to the scalability of memory address arrangements, to minimize the changes required in the future. In general, the memory address arrangement of Embedded Linux is reflected in the connection script.

Next, you should enter the preparation of startup code and machine-related code. The startup code and machine-related code of different target systems and even the same target system are also different. Generally, the startup code requires hardware initialization, kernel loading, root file system installation, and kernel execution, the startup code of different target platforms can be compiled by referring to the existing startup Code and related CPU manual in Linux.

After the startup code and machine-related code are programmed and the system can be started, you can start writing the driver in the next step. Writing a driver in Linux is not much different from writing a driver in general. You need to understand the relevant hardware and follow the rules for writing a driver in Linux, after writing a driver, you can write a corresponding test program and test it at any time. In Linux, various types of devices have a considerable number of driver source code for reference. Therefore, in actual writing, more time is spent on familiarity with specific hardware features.

In addition to the above steps, during actual development, libraries (the libraries mentioned here refer to C libraries), guis, and system program porting are often required. This is because the libraries used in Embedded Linux generally do not directly use standard libraries, but need to be streamlined. Although some simplified C libraries such as uclibc are available, but it still needs to be modified frequently. Common guis in Embedded Linux include Microwindows, MiniGUI, QT/embedded, tinyx, and so on, each of which has its own application scenarios. The target platforms and application layers are different, it must be selected based on actual needs. System programs, such as Mount and LS, are required for applications, while others are required for debugging. At the beginning, some general system programs are required.

Author: Li Xiaoping
He is a project engineer at: Bolis software Co., Ltd.

This article was published in the Journal of "co-creation software ".
Reprinted: Embedded LinuxAuthor's blog:Http://blog.csdn.net/zcatlinux/Related Articles

Use tmpfs to accelerate your Linux Server
Redhat7.2 DNS configuration notes
JSP environment engine -- WebSphere
J2EE 1.4 Application Server for Linux installation and configuration
How to select middleware technically

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.