Share this

Research on ARM-based Embedded Linux Application Development

2026-04-06 06:21:28 · · #1
0 Introduction In today's society, embedded systems have permeated all aspects of people's work and life, and embedded processors now account for 94% of the distributed processor market share. Embedded Linux systems are also booming, inheriting the advantages of Linux such as open source code, stable and efficient kernel, and abundant software, while also possessing characteristics such as support for a wide range of processor architectures and hardware platforms, small footprint, low cost, and compact structure. 1 ARM Processors and Development Boards In the embedded field, ARM has achieved tremendous success, creating a legend of IP core commercialization and marketization. Statistics show that 103 giant IT companies worldwide use ARM technology, and 19 of the 20 largest semiconductor companies are ARM users. ARM series chips have been widely used in mobile phones, handheld computers, and various embedded applications, becoming the world's best-selling 32-bit microprocessor. ARM has become the de facto RISC chip standard in the industry. ARM series processors are applied in different fields according to their respective characteristics. From an application perspective, the general principles for selecting ARM chips include: MMU; processor speed; built-in memory capacity; USB interface; number of GPIOs; interrupt controller; IIS (Integrated Interface of Sound) audio interface; nWAIT signal; RTC (Real Time Clock); LCD controller; PWM output, etc. This article uses the ARM9, whose performance is far superior to the ARM7. The development board used is from Guangzhou Sidao Information Technology Co., Ltd., and the central processing unit is Samsung's S3C2410. The ARM9 has the following characteristics: 5-stage pipeline; Harvard architecture; introduction of cache and write cache; support for MMU. 2 Embedded Linux System Embedded operating systems are the foundation and development platform for embedded application software. Their emergence has solved the problem of standardization in embedded software development. Embedded systems have the most basic functions of an operating system. Currently, the mainstream embedded systems include: Linux, VxWorks, QNX, Windows CE, and Palm OS. Embedded Linux operating systems have some unique advantages: a completely open hierarchical structure and kernel; powerful network support; a complete toolchain; and extensive hardware support. There are many types of embedded Linux systems. This article uses the Red Hat 9 operating system. On a PC with both Windows and Linux installed, the system will use Linux's GRUB as the bootloader to choose which system to boot from. If the Linux partition is deleted directly, the system will either fail to boot Windows or require command-line commands to boot Windows. It's recommended to first install Linux in a virtual machine to practice and become familiar with it before installing it on the PC. 3. Application Development The general embedded development process is shown in Figure 1. The first three steps are omitted here; we will begin with application development. 3.1 Establishing a Cross-Development Environment For embedded systems, equipping them with only the necessary resources is a prerequisite. This also determines that the development environment for embedded applications cannot be a resource-limited embedded system; it must utilize a resource-rich PC for development, and then establish a cross-development platform. A cross-compiler is the main software tool for cross-platform development. It is a compiler that runs on one processor architecture but can generate target code that runs on another different processor architecture. To establish a cross-development environment, several toolkits are mainly needed: gcc, glib, binutils, gdb, etc. These tools are generally provided by development boards; if you are not using a development board, all the software packages can be downloaded online. Simply install them on your PC one by one. Linux software installation differs from Windows. Different commands are used to install Linux depending on the compression method. During installation, due to dependencies between packages, the system may warn you which packages are missing; these warnings can be ignored. 3.2 U-Boot Before U-Boot (UniversalBootloader), let's introduce the bootloader. Simply put, the bootloader is a boot program that runs before the operating system kernel, similar to the BIOS in a PC. It initializes the corresponding hardware devices and establishes a memory space mapping, preparing for the final call to the system kernel. U-Boot is an open-source project under the GPL license. It not only supports booting embedded Linux systems, but the "Universal" in U-Boot also signifies its support for various embedded operating systems, with Linux currently being the most comprehensively supported. Another aspect is that U-Boot supports various common processor series. U-Boot supports the following main functions: system boot; basic auxiliary functions (operating system interface function; can flexibly set and pass multiple key parameters to the operating system; supports multiple storage methods of the target board; CRC32 check); device driver; power-on self-test function; special function (XIP kernel boot). U-Boot porting is mainly divided into two steps: configuring the motherboard and setting the timing of Flash and SDRAM. 3.3 Embedded Linux system kernel compilation and porting The compilation of embedded Linux kernels is achieved through different make commands, generally divided into 3 steps: (1) Kernel configuration. This is mainly the option for users to select the processor architecture for the target board. The kernel supports 4 configuration methods. Although the interfaces are different, the functions are the same. Among them, make menuconfig is the most widely used; (2) Establishing dependencies. This occurs during the first compilation and generates the ".de-pend" file. Run "make dep"; (3) Building the kernel. Here, a compressed kernel image is built. Use "make zIm-age" or "make bzImage". This completes the compilation and can be downloaded to the development board. Generally, there are three ways to communicate with the development board: network download (TFTP, FTP, etc.), serial port download, and USB download. For TFTP download, you need to configure the TFTP service under Linux, and then directly connect the PC and the development board (not a network cable). For serial port download, you need to configure the serial communication tool Minicom under Linux. The configuration mainly involves some important parameters, such as the baud rate. However, the system kernel alone is not enough; to enable the system to boot normally, a file system also needs to be loaded, so a file system needs to be created. This can be done manually, but the workload is too large. Generally, an existing file system is loaded onto the target board, including creating a file system image and using NFS to load the file system. The development board usually already has the embedded system kernel image, file system, and U-Boot (mentioned earlier) flashed on it. After mastering the flashing method, you can download them yourself. 3.4 Obtaining, Compiling, and Debugging Source Code Since Linux is open-source software, the application software running on it is also open-source software, and the source code is freely available regardless of the type. You can directly modify the existing source code to obtain code that meets the requirements. The paper uses existing source code, as shown in Figure 2. The Linux operating system supports multiple programming languages, including assembly, C, C++, Basic, Fortran, Pascal, Java, and PHP. Its text editors are Vi and Emacs, both with powerful editing capabilities. Graphical interface programming uses Qt or MiniGUI. Using these software programs, the software development process is exactly the same as in Windows and other operating systems. The software development process is similar to other systems, the differences being in compilation and debugging. In embedded systems, this is called cross-compilation and cross-debugging. Cross-compilation involves compiling and linking source code written on a PC to generate code that can run on an embedded system, as shown in Figure 2. In cross-debugging, the debugger and the program being debugged reside on the PC and embedded system respectively, which differs from general debugging. Cross-debugging is generally divided into software debugging and hardware debugging. Software debugging is performed by inserting debug stubs. A typical example is the GDB debugger, which consists of GdbServer and GdbClient. The former is installed as a debug stub on the ARM embedded system, while the latter resides on the local PC. The two can communicate via serial port, network port, or parallel port. Hardware debugging typically uses emulators, such as ROMMonitor, ROMEmulator, In-CircuitEmulator, and In-CircuitDebugger. Hardware debugging offers more powerful functions and superior performance, but some are expensive, with additional equipment increasing costs. ARM's JTAG port, on the other hand, enables debugging within the CPU, sending commands and receiving information through the port. JTAG primarily uses boundary scan technology, the basic idea of ​​which is to add a shift register unit near the chip's input/output pins. When the chip is in debug mode, these boundary scan registers isolate the chip from external inputs and outputs. Through these boundary scan register units, the chip's input/output signals can be observed and controlled, providing a convenient way to observe and control the chip being debugged. The JTAG interface facilitates testing of the target system and also enables Flash programming, making it a very popular debugging method. 4. Conclusion The host computer downloads MP3 format songs from the network and transmits them to the development board via serial port (or TFTP). Using a debugged player and a power amplifier developed by the research group, the audio playback function is successfully implemented. Building upon this foundation, video playback functionality can be further developed. In addition to the player application software, other applications can be added depending on the available storage space.
Read next

CATDOLL 146CM Ya TPE (Customer Photos)

Height: 146cm A-cup Weight: 26kg Shoulder Width: 32cm Bust/Waist/Hip: 64/54/74cm Oral Depth: 3-5cm Vaginal Depth: 3-15c...

Articles 2026-02-22