研究生: |
蔡廷鴻 Tyng-Horng Tsai |
---|---|
論文名稱: |
USB介面韌體及驅動程式之自動產生 An Approach to the Generatorfor USB I/F Firmware and WDM Driver |
指導教授: |
許孟超
Mon-Chau Shie |
口試委員: |
阮聖彰
Shanq-Jang Ruan 吳晉賢 Chin-Hsien Wu 林昌鴻 Chang-Hong Lin |
學位類別: |
碩士 Master |
系所名稱: |
電資學院 - 電子工程系 Department of Electronic and Computer Engineering |
論文出版年: | 2010 |
畢業學年度: | 98 |
語文別: | 中文 |
論文頁數: | 72 |
中文關鍵詞: | WDM驅動程式 、GadgetFS 、USB連線 、嵌入式 |
外文關鍵詞: | WDM Driver, GadgetFS, USB connection, embedded |
相關次數: | 點閱:237 下載:3 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
在我們的資訊生活中USB裝置一直被廣泛運用,對嵌入式系統的發展人員而言,依研究方向,有時常會需要透過USB介面連接電腦主機與發展裝置。要達到這需求,程式發展人員要了解USB規範、編寫USB裝置程式、編寫主機端的驅動程式及應用程式。
在本論文中,我們結合軟硬體整合開發,建立一個USB裝置的連線。可以分為電腦主機及裝置兩部份來看,主機端需要作業系統上的應用程式及驅動程式,裝置端則需要裝置應用程式及USB Bus硬體驅動程式。
在主機端探討Windows AP啟用WDM驅動程式的方式,了解AP如何開啟裝置、傳送資料。另外還有WDM驅動程式的運作方式,了解WDM Driver在Windows作業系統如何掛載、使用系統資源、進行傳輸。
在裝置端則研究如何使用Embedded Linux內建的USB硬體驅動程式安裝GadgetFS,再用使用者模式的裝置程式以檔案格式形式存取GadgetFS接收、傳送USB匯流排傳送的資料。
本研究編寫了工具軟體以產生WDM驅動程式以及Linux裝置程式,在實際的開發板上驗證,我們已經確認可以使用工具軟體產生的Windows驅動程式及Linux裝置程式建立起USB連線,並且正確無誤的傳送資料。也可以在電腦主機的應用程式及Linux裝置程式加入新的功能,從電腦端傳送控制碼到開發板控制I/O,例如開發板的GPIO、ADC、DAC、LCD模組等等,都可以透過主機經由USB匯流排來控制。
Nowadays, USB devices are widely spread in use at our daily life. According to the demands of research purposes, sometimes embedded system developers need an USB interface connection between the host PC and developing environments. To fulfill this target requirement, developers need to understand USB SPEC., to build up the abilities to program USB Device function and host device driver/application as well.
In this research, we combine the developments of Windows SW and embedded Linux to build up an USB connection. In a host PC, it needs the Windows application and WDM Driver. In device side, it needs the Linux user mode application to implement device behavior and USB HW driver.
In the host, we study the method of how to activate the WDM Driver by a Windows application. Also study how does a Windows application open devices and transmit/receive data. The principle of WDM Driver is also a topic. We research how does the WDM Driver load in Windows OS, and how does it use system resource to communicate with devices.
In the device side, we study how to use the USB Driver of Linux Kernel built-in to install GadgetFS. Then, we mount the GadgetFS by a way of file system from the user mode application to transmit/receive data of USB bus.
The research also edits some utilities to generate the WDM Driver and Linux Device application. By approving on a physical developing board, it is successful to create the USB connection between host and device by the WDM Driver and Linux application which created by utilities. They transmit and receive data from each other accurately. Of course, we could add some more specific functions in the host and Linux application for some other research purposes. Such as GPIO, ADC, DAC, LCD module of the develop board, could control from host via the USB bus.
[1] Compaq, Intel, Microsoft, NEC,
“Universal Serial Bus Specification Revision 1.1,” Sep. 23, 1998
[2] 張帆、史彩成等編著,“Windows Device Driver Programming 驅動程式設計”,
博碩文化,2009年6月
[3] David A. Solomon, “The Windows NT Kernel Architecture,” COMPUTER, Oct, 1998
[4] 蔡孟哲,“WDM Driver程式設計實務”,碁峰資訊,2004
[5] Mohamad (Hani) Atassi, “Microsoft Windows Driver Model (WDM),”
Submitted to Dr.Dessis R. Hafemann, Winter Quarter,
2001-2002 CS-384 Section 1, January 28, 2002
[6] 周德凱, “微軟視窗系統之USB裝置驅動程式整合開發環境”, 南台科技大學碩士論文, Jul. 2007
[7] Walter Oney , “PROGRAMMING THE MICROSOFT WINDOWS DRIVER MODEL”
2nd Edition, Microsoft Press
[8] 張眾函, “微軟視窗系統之USB裝置驅動程式產生器之研製”, 南台科技大學碩士論文, Jun. 2006
[9] 葛湘達, “WDM驅動程式設計手冊”, 碁峰資訊, 2000
[10] Compaq, Hewlett-Packard, Intel, Lucent, Microsoft, NEC, Philips,
“Universal Serial Bus Specification Rev 2.0,” April 27, 2000
[11] PLX Technology, “NET2272 USB 2.0 Peripheral Controller,”
Data Book Version 1.6, April 2005
[12] Pat Villani原著,“API環境下的WIN32程式環境”,全華科技圖書,2005年4月
[13] Abraham Silberschatz, Peter B. Galvin, Greg Gagne,
“Operating System Concepts,” John Wiley & Sons (Asia) Pte Ltd, 2010
[14] Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman,
“Linux Device Drivers, Third Edition,”
O’Reilly & Associates, Inc., May, 2006
[15] 陳俊宏,“Embedded Linux嵌入式系統實作演練 第二版”,學貫行銷,2006年
[16] Karim Yaghmour, “Building Embedded Linux Systems,”
O’Reilly & Associates, Inc., 2003
[17] Christopher Hallinan, “Embedded Linux Primer,”
Prentice Hall Professional Technical Reference, 2007
[18] 位元文化編著,“Linux C/C++ 入門進階”,文魁資訊,2004年
[19] Todd Meadors, “Linux Shell Script Programming,”
COURSE TECHNOLOGY INC., Mar. 2003
[20] 楊玄彰,鄧姚文,“Visual C++ 6 超級手冊”,碁峰資訊,1999年5月初版
[21] HP, Intel, Microsoft, NEC, ST-NXP, TI,
“Universal Serial Bus 3.0 Specification Revision 1.0”, Nov. 12, 2008