At some point in my career I would definitely like to get involved in some embedded programming. I was thinking that starting out with developing some drivers would be a good place to develop my abilities in the regard. I'm open to doing so on either windows or linux platform (eventually will want to probably attempt both). What tools would you recommend that I look into to get me started on this project? Any other resources that you have found to be helpful (i.e. books, websites, programs, etc)? Any advice/recommendations? Thanks!
7 Answers
The source code of existing drivers is the obvious one.
Other than that, your best bet is probably reading the technical specification of some devices and trying to write one. I'd suggest a cheap network adapter (if such a thing still exists) as it is quite challenging but you're less likely to screw your entire computer up after a failed attempt. You don't need to write a full driver, a standalone program that can do a couple of things by using low-level magic will do.
The other trail you can follow is to concentrate on the driver-ness and create a real driver for a non-hardware device, like a virtual disk drive.
You can then put the two together. Well, if you still fancy it, because you might easily have had enough at this point.
If you want to do embedded programming, get some hardware!
For a first introduction, I highly recommend getting an Arduino. I got an Inventor's Kit for Arduino from Sparkfun. It contains a lot of hardware and easy to follow instructions for creating lots of projects. It walks you through assembly on a breadboard, writing the software, and making LEDs blink and motors turn. Lots of fun! Arduino is very expandable, with lots of shields (add-on boards) that give your Arduino extra functionality, like an SD Card reader, GPS and more.
If you want a little more advanced board, the PIC32 Ethernet Starter Kit has a 32-bit microcontroller and USB and Ethernet interfaces. Load the sample projects from the free IDE and you have a web server on a little board. The PIC32 is a powerful device and you can use this kit to experiment with it.
Both of these boards load over USB, no separate programmers needed. They both have all the software and tools free to download.
-
2Doing embedded programming is indeed awesome and a lot of fun. Keep in mind though that it's different than writing device drivers. When writing for Arduino, all you're worried about is the Arduino itself. When doing device drivers, a lot of your time and energy is spent interfacing with the kernel and userland on the computer. This is something that Arduino doesn't prepare you for.– Jay P.Mar 17, 2011 at 2:04
Check out the book Linux Device Drivers. I'm reading it at the moment and it seems to be quite good (can't say way too much though, at roughly page 50 now).
Other than that, program, and as the source code is available for existing drivers, use it!
I know that it may seem obvious at this point, but device driver development and embedded systems are both areas where one has to know something about computer architecture and digital design. One cannot write a device driver for a new device unless one can read and comprehend data sheets and understand timing diagrams. Embedded systems is an area where one has to be half computer scientist/half electrical engineer.
Theirs a few online blogs that talk about people writing USB drivers for "unknown" USB devices, it's pretty cool. I think when I found them I typed into google: "making a linux usb driver"
I started because my job required it so I started reading hardwards and OS specs.
Seriously though. I need to write a driver. So I learned the hardware API, then the OS driver specs. Got the sample source code of drivers and (in my case it was the Windows NT DDK) development kit and started coding and learning.
The trick I found was to actually write one and hone it to do what I wanted which was to link to a 16bit process. It was tough learning process which I beleive would have be harder if I actually didn't have to produce commercial driver.
In your case I'd definitly recommend getting some programmable hardware like the Arduino perhaps the Rasbery PI and start making the hardware obey your command.
Caveat: I'd already done Assembler for years so the machine interface wasn't new to me.
the following link gives a brief introduction about developing device drivers in windows platform http://msdn.microsoft.com/en-us/library/windows/hardware/ff554690(v=vs.85).aspx
but before starting driver development you should have full knowledge about the hardware that your are interfacing with the computer.In embedded systems the main communication channel between two components is established with help of RX/TX ports(RX for receiving, TX for transmitting).This even holds true in case of hardware and a PC.Any hardware connected to PC will continuously communicate with each other.Consider if we send 01 to a computer from hardware.we can program a specific task in driver development.conversely if we want switch an LED in the hardware then we need write a program such that on extrapolating information from computer the hardware should switch the light on.
the above link describes this topic far better than me take a look at it.