Design of Embedded Car Navigation System Based on Linux

Design of Embedded Car Navigation System Based on Linux

1 Introduction
The HMS30C7202 embedded microprocessor is currently an excellent chip with good performance-price ratio. Due to its excellent performance, it can be used to replace the early chip. The development and application of vehicle navigation has broad application prospects. In many operating systems, because Windows CE, Vxwork and other operating systems are commercial products, their prices are high and the source code is closed. In addition, for upper-layer application developers, what embedded systems need is a highly concise, reliable, widely used, easy to develop, multi-tasking, and low-cost operating system. Open source Linux can meet these requirements. Since the applications of embedded systems are diverse and the standard Linux operating system is relatively large, it is necessary to re-transplant, tailor and configure the standard Linux according to the actual application to generate a specific operating system with compact code and small amount of code.
2. The hardware of the navigation system The hardware platform of the car navigation system is the 32-bit high-performance embedded microprocessor of SAMSUNG company of HMS30C7202, with HMS30C7202 as the core, including LCD liquid crystal display module, memory module (Flash, SDRAM), GPS module , Serial interface, USB interface, IrDA infrared communication interface, network interface and other peripheral parts, its hardware structure is shown in Figure 1.
The HMS30C7202 embedded microprocessor uses a 16 / 32-bit reduced instruction set. It has the characteristics of high cost performance, low power consumption, and high performance. It provides a small microcontroller solution for handheld devices and general-type applications. In order to reduce the total system consumption, HMS30C7202 includes the following parts: independent 16KB instruction cache and 16KB data cache, MMU, LCD controller (STN / TFT), NAND Flash boot loader, storage manager (chip select logic and SDRAM control) Device),

3-channel UART, 4-channel DMA, 4-channel pulse width modulation timer, I / O port, RTC real-time clock, 8-channel 10-bit A / D controller and touch screen interface, IIC interface, IIS interface, audio interface , USB host, USB device, SD host / multimedia card interface, 2-channel SPI, camera interface, PLL clock generator and power management, etc.

1 3. Linux-based software system design
2 Software functions and composition


The software of the system includes three parts: embedded operating system, GUI graphical user interface, and application program. The embedded operating system and GUI graphical user interface belong to key technologies. Their quality determines whether the system can be successfully applied. The application is built on the embedded operating system and GUI graphical user interface. The startup process after power-on is shown in Figure 2. In this software design, the operating system uses embedded Linux that uses a wide range of kernel source codes, and the GUI graphical user interface uses Micro windows developed with source codes.

3.2 Establishment of cross-compilation environment On the basis of satisfying the stability, safety and reliability of the system, the volume of embedded products should be as small as possible, so that it cannot provide sufficient resources for the compilation process. Therefore, a cross-compilation environment must be established That is, compile the program that will run on the target machine on the high-performance host machine, generate a code format that can be run on the target machine, and then download it to the target machine to run. Under the Linux environment, use GNU tools to complete the compilation, linking and other processes, including the compiler gcc for the target system, the binary tool binuTIls for the target system, the standard c library glibc for the target system, and the Linux kernel header files for the target system.
Under the root directory of linux, decompress it by the command tar Ixvf cross-2.95.3.tar.bz2. After the execution is completed, the arm / 2.95.3 directory is automatically generated under the / usr / local / directory and enter the 2.93.3 directory You can see various directories such as arm-linux, bin, include, lib, etc., indicating that the cross compilation tool is installed and the compilation environment has been established.
3.3 The transplantation of the boot program is limited by the resources of the embedded system. The boot program of the embedded system is not composed of the BIOS and the boot program located in the hard disk MBR like the boot program on the PC. The boot loading task of the entire system is mainly composed of A boot program called BootLoader to complete. BootLoader is the first code to be executed after system reset, the main role is to initialize hardware devices, establish memory space mapping, etc., bring the system's hardware and software environment to a suitable state, so as to establish a good call for the operating system and applications environment of.
The boot program used in the software design of the system is the BootLoader ---- vivi developed by the South Korean Mizi company. In an embedded system, BootLoader is highly dependent on hardware. It is almost impossible to build a universal BootLoader in an embedded system. Therefore, for each specific platform, a BootLoader must be transplanted. It can be said that the establishment of an easy-to-use BootLoader supporting the platform is a key step in software design.
The idea of ​​transplanting the boot program for this system is to find the BootLoader of the platform closest to the designed platform, and then modify the BootLoader according to the hardware parameters of the designed platform, so as to complete the transplantation of BootLoader. First modify the relevant parameters in the Makefile file of the vivi project management file according to the actual situation, including the cross compiler library and header file path, the cross compilation switch option settings, the library and header file path in the Linux kernel code, etc. Then modify the corresponding configuration according to the parameters of the hardware platform, such as processor clock, memory initialization, general I / O initialization, and so on. Then configure and compile to generate executable code.
3.4 Kernel transplantation Because the embedded system is aimed at specific applications and has limited resources, standard Linux cannot be applied to the embedded system. Therefore, Linux must be tailored and configured according to the actual situation to produce a suitable embedded Linux operation system. The transplantation of Linux kernel includes obtaining source code, modifying settings, cutting configuration and compiling.
3.4.1 Obtaining source code
The Linux kernel source code is generally maintained by specialized agencies, and we can download and use them from their websites. The application of modification settings for embedded systems is very targeted. The kernel downloaded from the site cannot contain code for all embedded systems, so the code needs to be modified and set to suit the target platform. Generally contains the following steps.
â‘  Write code related to the processor. Mainly include clock settings, interrupt settings, memory allocation and other register settings, etc. These codes related to the HMS30C7202 processor are placed in the / arch / arm / mach-s3c2440 directory.
â‘¡ Modify the project management file Makefile in the root directory, and specify the path of the transplanted hardware platform and cross compiler.
â‘¢ Modify the project management file Makefile in the / arch / arm directory, specify the virtual address where the kernel runs, and modify the configuration file config.in in this directory so that the relevant information of HMS30C7202 can be displayed when the configuration command is executed.
â‘£Add the configured HMS30C7202 configuration file in the / arch / arm / def-configs directory. Add the processor initialization code head-s3c2440.s in the / arch / arm / boot / compressed directory.
⑤ Modify the Makefile in the project management file in the / arch / arm / kernel directory to determine the dependency between file types.

3.4.2 Cut configuration and compilation After modifying the kernel settings, you can cut configuration and compile the kernel, cut out the redundant part in the configuration, so that the final kernel image file code generated by the compilation is as small as possible. Run the following command:
# make menuconfig
Enter the configuration menu, select the processor type and various peripherals, protocol support, etc., including LCD, touch screen, serial port, sound, EXT2, FAT and JFFS2 file system and TCPIP protocol support.
# make dep
Search the dependency relationship between Linux compilation output and source code, and generate dependency files.
# make zImage
Compile the Linux kernel and generate a compressed kernel image file zImage. Stored in / arch / arm / boot / directory.
3.5 Writing driver The driver is the interface between the operating system kernel and the underlying hardware. The driver shields the details of the hardware for the application. Through the driver, the operation of the application on the hardware can be as convenient as the operation of ordinary files. The main function of the driver is to initialize and release the hardware device, detect and deal with the problems of the hardware device, and transfer data between the application program, the kernel and the underlying hardware.
Because the embedded system is aimed at specific applications, the driver of the corresponding device should be written according to the specific platform to facilitate the application program to access the underlying hardware. Each system call corresponds to each member of the file_operaTIons structure. Writing a driver program is mainly to write the various operation functions required by the underlying device and fill the structure file_operaTIons, which is defined in the /include/Linux/fs.h file.
The driver is connected to the specific hardware through the device name, master device number and slave device number. The driver can be loaded into the kernel in a dynamic or static manner. During the debugging phase, the driver is generally loaded in a dynamic manner, and when the product is finally formed, it is added to the kernel and automatically loaded each time the kernel is started.
3.6 Root file system The stable operation of an embedded product, in addition to the boot program and kernel, there must be a region for users to provide support architecture and user application software to store the results of data reading and writing, this region is the root File system. The root file systems commonly used in embedded systems are: Romfs, Cramfs, Ramfs, JFFS2, EXT2, etc. In addition, the root file system can be established on either RAMDISK, or Flash, and the root file system Cramfs on RAMDISK.
4. Conclusion This research tool has obtained the following innovations:
(1) Designed the hardware system of the car navigation device with HMS30C7202 as the core and its LCD liquid crystal display module, memory module (Flash, SDRAM), GPS module, serial interface, USB interface, IrDA infrared communication interface, river network interface and other peripherals section.
(2) Established a cross-compilation environment for software design and completed the software design of the car navigation device with HMS30C7202 as the core. This study draws the following conclusions:
1 (1) Using embedded Linux with completely open source code in the car navigation system can completely replace commercial operating systems such as WinCE, thereby reducing the cost of the system and increasing the competitiveness of the market. Through the development of the system, the author has the following feelings.
2 (2) Add some output statements in the program, so that during the debugging process, some debugging information printed through the serial port is displayed on the super terminal, and the operation of the program can be observed.
3 (3) Due to the slow download speed of the serial port, BootLoader should support the network as much as possible, download the kernel and file system through the network, and speed up the development progress.

Fast Recovery Diode (FRD) is a kind of semiconductor diode with good switching characteristics and short reverse recovery time. It is mainly used in electronic circuits such as switching power supply, PWM pulse width modulator and inverter, as high frequency Rectifier Diode. Use for freewheeling diodes or damper diodes. The internal structure of the fast recovery diode is different from that of a normal PN junction diode. It belongs to a PIN junction diode, which adds a base region I between the P-type silicon material and the N-type silicon material to form a PIN silicon wafer. Since the base region is thin and the reverse recovery charge is small, the reverse recovery diode has a short reverse recovery time, a low forward voltage drop, and a high reverse breakdown voltage (withstand voltage value).

Fast Diode

Fast Diode,Fast Recovery Rectifier Diode,Fast Recovery Diode,Fast Switching Diode

Dongguan Agertech Technology Co., Ltd. , https://www.agertechcomponents.com

Posted on