【编者按】网学网其他类别频道为大家收集整理了“嵌入式Linux下USB驱动程序的研究与开发“提供大家参考,希望对大家有所帮助!
论文字数:15092,页数:34 有开题报告,任务书,PPT
摘 要
嵌入式是一个快速发展的领域,目前50%左右的项目选择源代码开放的Linux作为嵌入式操作系统。但嵌入式Linux操作系统仍然没有做到在硬件配置上的即插即用。 通用串行总线(USB)是一种高传输速率的串行接口总线, 综合了一个多平台标准,其低成本,兼容性强,可连接大量的外部设备,融合先进的功能等优点,使其在嵌入式系统领域得到了广泛的应用。因此,研究和开发嵌入式Linux系统下的USB设备驱动程序就具有很好的应用价值。
本文首先介绍了嵌入式开发的基础知识,包括Linux环境下的makefile程序编译,目标机与宿主机的交叉编译环境的建立以及交叉编译的步骤, USB的系统组成、传输方式以及嵌入式Linux下设备驱动程序的开发模式,最后针对JXARM-2410平台,具体实现了一个USB设备驱动程序, 通过模块加载,表明该USB设备驱动程序能够实现对U盘的挂接,读取U盘中的数据。
关键词:Linux; 源代码开放; 嵌入式; 即插即用; USB驱动
Research and development of USB drivers under Embedded Linux
Abstract
Embedded System is a rapidly developing area; currently about 50 percent of Embedded System projects choose the open-source Linux as the embedded operating system. However, Embedded Linux operating system hasn’t solved the problem on the hardware configuration of plug-and-play yet. Universal Serial Bus (USB) is a high-speed serial interface bus, a comprehension of multi-platform standards. Its low cost, compatibility,the ability of connecting a large number of external equipments simultaneously and the integration of advanced functions,made Linux widely used in Embedded System areas. Therefore, it is of good value to research and develop the USB device driver under Embedded Linux.
This paper introduces the knowledge of how to develop USB device drive under embedded Linux environment, including the compiler procedures using makefile tools, as well as the steps of establishing a cross-compiler environment. It also introduces USB transmission and the development model of embedded Linux device driver. Finally, a concrete realization of the USB device driver was made, which was loaded onto JXARM-2410 platform through module loading, showing that the USB device driver can achieve certain tasks such as articulated U, read U disk data.
Keyword: Linux;plug-and-play;Open-Source;Embedded;USB Driver
目 录
1 引言 1
1.1 嵌入式系统的发展 1
1.2 国内外研究状况 1
1.3 课题背景及目的 2
2 基础知识 3
2.1 ARM简介 3
2.2 Linux下程序的编译:makefile 3
2.2.1 Makefile的书写规则 4
2.2.2 Makefile的自动推导 4
2.2.3清空目标文件的规则 5
2.3 交叉编译环境 5
2.3.1开发环境的建立 5
2.3.2 交叉编译步骤 6
3 USB系统组成 8
3.1 USB的物理层 8
3.2 USB设备 8
3.3 HUB 10
3.4即插即用 10
3.5设备的挂起 11
3.6 USB数据流模型 11
3.7 USB 传输类型 12
3.7.1 控制传送 12
3.7.2 批量传输 13
3.7.3 同步传输 14
3.7.4 中断传输 14
4 嵌入式Linux下的设备驱动 15
4.1 设备类型分类 15
4.2 USB系统软件 17
4.3 USB驱动程序开发 18
4.4 调度对象 URB 19
4.5 类URB 队列 20
5 在JXARM-2410下配置USB设备 23
5.1 配置Linux内核以支持USB接口及U盘 23
5.2 编译Linux内核 23
5.3 运行内核并加载模块 24
5.4 在JXARM9-2410下使用U盘 24
总 结 26
致 谢 27
参 考 文 献 28