Figure 4. 1 Hardware connection of development environment
Generally, the development environment based on embedded linux system generally consists of target machine, development board, cross-compiler tool chain, remote debugging tool and download mechanism. The work of this subject is carried out on the target machine of linux operating system (RedHat9.0) and the target board based on S3C24 10a.
Set serial interface
The serial port is mainly used for the target board to send commands and monitor the output information of the target board during the program running.
It should be said that the COM 1 port of the development board and the COM port of the PC are connected through serial lines respectively, while on the host side, minicom and armsys24 10 communicate through serial lines.
First, set up minicom. Enter minicom on the command line with the keyboard, select Serialportsetup after input, then press the setting key A to set SerialDevice, and then enter the serial interface number accessed on the PC. If the system is connected to the serial port 1, write /dev/ttyS0 accordingly. Then we need to set the transmission rate. We need to set the transmission rate to 1 1520. Press the E key to set the baud rate to 1 1520. After setting, there is no parity check, no software control flow and no hardware control flow. After setting, select the default settings, save and exit.
After the setting is completed, the development board will be reset, and then the system will display the information that the system has started printing.
1.2 embedded linux system software environment
The author's research direction mainly focuses on the software development level of embedded linux system. Embedded linux system can develop a variety of upper-level software, which can be roughly divided into four levels from the perspective of software analysis:
First, the boot of the operating system. There should be a loader in the operating system, mainly including firmware and Bootloader.
Second, the control core of the system. In order to better allocate system resources, it is necessary to transplant the operating system linux to specific hardware platforms and practical applications. This is an important part of process management, which mainly includes the parameters of customizing kernel and controlling kernel boot system.
Third, the guidance and establishment of system files. The establishment of a file refers to the physical space where the file exists. Each partition in linxu system is a file system, which contains its own directory hierarchy, including the root file system (RamDisk) and the file system built on Flash. The operation of a system is inseparable from the operation of text, so it is necessary to have and maintain its own file system.
Fourth, the program users on the software. After years of accumulation and development, people who have been working hard in the field of free software have contributed a lot of excellent software to the field of open source. According to the different needs of customers, tailor-made for customers, or even add a graphical interface, can be more convenient for users to use. However, no matter how the embedded linux system is built, it is inseparable from the following points:
1) Install the cross-compiling tool on the embedded target machine.
2) The writing of 2)Bootloader depends on the development board hardware.
3) Compile the embedded Linux kernel according to customer's requirements to reduce redundancy.
4) According to the needs of customers and system operation, write device drivers and embedded linux applications.
5) The last and most important part is to establish the directory of system files.