Electronic – Are there resources for learning to write drivers


I have a decent amount of experience designing hardware and embedded systems in general, but I have never written a driver for an operating system.

I would like to know if there are any good guides, preferably online, although good books would interest me, that will give me a good start on what I need to know to design and implement drivers for an operating system.

This will probably have people shooting at me, and although I would love to see a good guide no matter what OS it is based on, I would like to see a guide that is windows based, mostly due to the fact that most of the people I would sell a product would have windows.

Please let me know if there is any extra information I can add to make this more clear.

Best Answer

Most of my recent experience in writing actual OS drivers has been with Linux, and the best reference IMO is Linux Device Drivers, 3rd Edition by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman (2005), which has already been mentioned. It is available on Amazon, Safari Books On-Line, and also as a free download.

A couple more books on the same subject are Essential Linux Device Drivers, by Sreekrishnan Venkateswaran (2008) (also available on Safari Books Online) and Writing Linux Device Drivers: a guide with exercises (Volume 3) by Dr Jerry Cooperstein (2009).

For Windows device drivers, the latest book on the subject (published two weeks ago) appears to be Windows 7 Device Driver, by Ronald D. Reeves, Ph.D. (2010). It is also available on Safari Books Online.

An older book, which would cover Windows XP, is: Programming the Microsoft Windows Driver Model, Second Edition, by Walter Oney (2002). It is also available on Safari Books Online.

Another book, which appears to be out of print but available on Safari Books Online, is Developing Drivers with the Windows Driver Foundation, by Penny Orwick and Guy Smith (2007). I assume it would cover Windows Vista.

Finally, Microsoft has pointers to a lot of blogs etc. discussing driver development.