31

I need a little advice for development of a custom PCIe driver. The driver must support both Windows CE 6.0 and Windows Desktop (xp, 7, and 8 when ready).

We have a lot of experience developing drivers for Windows CE but none for Windows Desktop. I am pretty sure that we can develop a good, solid Windows CE driver, but I think we will not be able to do the same for Windows Desktop without some external help. I think that we have two options:

1) Use an existing driver framework such as Jungo WinDriver, which allows us to develop the driver once and compile to mulitiple platforms. This also has the advantage that most of the development will be in user space, so it should make the development process simpler.

2) Get some external help to setup a good Windows Desktop driver where all the plumbing is done and we simply need to add the code that communicates with our board and expose relevant IOControls. Perhaps move as much as possible of the code into a user space library.

What would be the benefits and downsides of each option? Would you recommend alternative approaches?

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
Allan Larsen
  • 476
  • 4
  • 10
  • Allan for better chances to get an answer you should've tagged also with "windows" your question. I think you have low chances to get an answer only on windows-ce section. I also recommend you to take a look over Jan Axelson book USB Complete Fourth Edition - www.lvr.com, you'll get good information from there. Personally I would try to use WinDriver, having a as back-up solution external help. – garzanti Sep 20 '11 at 08:05
  • Thanks for the note about the "windows" tag and your general recomendation. However, I don't see how a book about USB will help me with a decision about a PCI driver? I have the third edition of the book you recommend, and it is as far as I remember mostly about the USB protocol and very little about drivers (WinDriver for USB is mentioned, but not more than that). – Allan Larsen Sep 20 '11 at 10:33
  • For me it helped that book. But what kind of USB class/subclass your device belong to? Is it a HID? what exactly is it? at least in general terms to get a better idea. – garzanti Sep 20 '11 at 12:10
  • Sorry Allan I haven't payed enough attention and I focused on USB, I've used in the past Jungo for USB. – garzanti Sep 20 '11 at 14:14
  • @ctacke Thanks for trying with the bounty – Allan Larsen Sep 28 '11 at 19:02
  • 4
    You might try to get comments from people who have used WinDriver (maybe ask a specific question). Committing to such a framework can be a blessing if it satifies all your needs but if there's something missing that you need all hell breaks loose. Do take a look at KMDF and the samples provided in the WDK for the kind of driver you are developing – msam May 03 '12 at 09:59
  • @AllanLarsen: Did you make any progress? If yes, can you please share your experiences. We're in the same boat as you were and it would help tremendously if you reported your experiences. Thanks – SomethingBetter May 27 '12 at 12:28
  • If you want to support XP, forget about KMDF which was introduced with Vista. You'll have to stick to WDM. As msam suggested, samples in WDK can help you a lot to get going. Microsoft has extensive documentation about driver development. http://msdn.microsoft.com/en-us/library/windows/hardware/ff553208(v=vs.85).aspx – Sedat Kapanoglu Sep 25 '12 at 06:51

2 Answers2

2

As requested a little while ago, I will try to share my experience now more than one year after I asked the original question. We decided to use Windriver, but so far we have only written a driver for Windows CE 6.0, so I cannot comment on the cross-platform support.

Using Windriver on Windows CE 6.0 has both advantages and disadvantages. It means all our driver code is now in library, so it has been easier to develop and debug (compared to a standard driver that requires Platform Builder). So from a development point of view it has been nice. Performance has also been fine. There were some overhead in the beginning learning the Windriver API and how to use it, especially with DMA and interrupts, but I don't think it was worse than learning the raw Windows CE 6.0 PCI API.

The only real disadvantage I can think about is that a "real" driver is easier to share between multiple processes than the library we have created using Windriver. In our application (embedded system with one process) it is not really a problem, but it is harder to create debug/development utilities that operate on the hardware behind the back of the main process. We have used that approach for testing/debugging on other platforms but it is a bit more complicated to do here.

To sum everything up, I think we made the right choice and I am happy that we have the ability to port our "driver" to Windows Desktop with (hopefully) very little effort when we need it.

Allan Larsen
  • 476
  • 4
  • 10
1

Having used Windriver to develop drivers for Windows/Linux, I want to answer this question.

I prefer Windriver, if the application which uses the driver is also going to be written by you. Since you mention that you are developing a custom driver, I assume that you are going to write the application also by yourself. In this case, the application need not change much between windows and windows CE, as most of the driver functions are going to be generated by Windriver itself. It is like calling standard library functions as opposed to use IOCTLs etc.

In the past, I have used windriver to generate basic driver interface code, and developed applications (Mostly diagnostic applications) which uses the windriver generated code. With little modifications, we were able to used the driver and application between windows and linux. I am not advocating to use Jungo, but it was easy to use.

Since the question is about asking for suggestions, It is difficult to provide exact answer, I am just sharing my feedback.

Durairaj Packirisamy
  • 4,635
  • 1
  • 21
  • 27