Font Size: a A A

Development For USB Device Driver Based On UCLinux Embedded Platform

Posted on:2008-04-24Degree:MasterType:Thesis
Country:ChinaCandidate:T SongFull Text:PDF
GTID:2178360215952545Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Since the birth of PC, peripheral interface is generally used with the serial interface and parallel interface. With the rapid development of the computers, there are increasingly obvious shortcomings of interfaces: slow speed of data transmission, each interface can connect one equipment, can not support plug-and-play well.Normally, a PC only have two serial and one parallel port, it can not expand well. USB was to address speed and the ability to expand the accessibility of these three questions and low-cost solution. USB Device at a phenomenal rate, there has been thousands of USB Device. The proposal makes USB2.0 USB application development market prospects even brighter. Meanwhile, in the wake of the rapid development of information technology and network technology, embedded system has been infiltrated into scientific research, industrial control, military, instrumentation, telecommunications and other areas. Embedded System integrate with computer hardware and software technology, communications technology and microelectronics technology, users can be tailored to specific application needs, put the corresponding microprocessor embedded into a specific application system. With the increasingly wide range of embedded system applications, new hardware used in embedded system corresponding to expand system, this driver must be matched by support for hardware, system expansion meets functional requirements. Currently, the USB technology is widely applied, the development of products based on embedded platforms is also increasing.This research is that USB device driver development on embedded platform.First this paper analyzes the development modes of embedded application software, and establishes development environment. Usually embedded system software development uses a cross compiler debug mode.Cross compiler places debugging environment on the mainframe (a PC), corresponding development board is called the target board. In this paper the target board is embedded platform on Motorola ColdFire 5249 microprocessor developed by Huaheng company.After being debugged on host, the application programs are downloaded to the target board. In this period, hardware environment is built by serial line and Ethernet line. Since Linux is an open source code with the good portability and resource-rich characteristics, the paper choose it as development system.PC is setuped with Red Hat9 Linux, establish ColdFire software platform development under Linux, compiler is GNU ggc. This paper introduces the application and driver debugging method: There are two methods of debugging application directly on the target board, Serial document printing and the use of log records. And introduces Gdb debugger and if transplant gdbserver on target boards, Ethernet and serial port can support remote debugging; Driver belongs to the Linux kernel. So its code is not easy to implement on the debugger, it is impossible to track for testing Driver in the debugging process. Huaheng offers uCLinux RAM kernel debugging support, this can be quite convenient debugging driver.Then designs the target board and hosts USB driver development. Firstly, designs ColdFire 5249 USB drive module, implement driver with three parts, initializing modules, input module and the output module. After put into uCLinux kernel with USB Driver, USB device is supported by uCLinux kernel. Thus, applications can use USB devices through a USB document nodes.Next, design USB driver under Linux. This paper introduces equipments types: the character device,block device,network interface. As USB devices belong to character device, the focus on the characters in the process of adding a device driver. In the first analyse three data structures of device driver: file_operations,strcut file and struct inode; Then the driver of equipment used in the realization of several important function; Finally, bring forward a way of adding a device driver. On this basis, introduce how to confirm the performance parameter of USB device with information tested by Linux, and USB device driver design method. The paper gives the primary interface's pseudo codes in USB communication device driver module(USB devices open and release,read and write,I/Ocontrol), and these pseudo codes can translate material USB communication device drivers conveniently.Finally based on the success of USB Device Driver Development of the target board and mainframe, the article designs and realizes a application programs to test the function of USB driver. System can run correctly and steadily.So far, although the paper of development for USB device driver based on uCLinux embedded platform is completed, there are still some deficiencies. USB driver for PC-Control function is not perfect; Linux USB drivers are not common use; the probe and disconnect function of plug-and-play characteristics under USB support require further research.
Keywords/Search Tags:Development
PDF Full Text Request
Related items