Returning to drivers after an absence

I have a new driver project to do, but I’ve been away for some time. The last one I did I used VS 2005 as the IDE, and Mark Roddy’s ddkbuild.bat script to actually build the driver. I understand things have changed since then; so if you can point me in the right direction, it would help me get back up to speed.

  1. Which version of Visual Studio are folks using? I saw some chatter that the latest (VS 2019) may not be the best choice. If not, which one is?
  2. I’m also unsure of what the signing requirements are these days. The client wants the driver to run on as many previous versions of Windows as possible (the driver is a software-only driver for their SBC running Windows). What is practical? And they will want me to deal with signing it; what do I need to tell them to get (certificate-wise)? Is it possible for them to purchase the certificate, but for me to handle all of the signing?
  3. For debugging, I see lots of recommendations to not bother with debugging from within VS, but to install WinDBG and use it directly. Is that still the case? And what about connections–do folks find network debugging works OK? I’m not sure if the SBC has a NIC in it; can I use an external card? Which one(s) have people found reliable?

Thanks in advance for any pointers you can share.

–mkj

  1. I’m still using VS 2015, just because it works, and I haven’t seen a strong incentive to move forward. The WDK is now an add-on to Visual Studio, so you need to match the VS version with the WDK version.

  2. The signing requirements are in a transition period right now. If you don’t need to support WIndows 10, then you do it the way you always have: sign with your own cert, cross-sign with a Microsoft-supplied cross-certificate. This whole mechanism is scheduled to terminate July 1, after which it will not be possible to ship signed packages for older versions.

For WIndows 10, the driver package must be signed by Microsoft. You need to create a “hardware partner” account, so you can submit your packages to them for attestation signing. Opening a hardware partner account requires an “extended validation” certificate, which must reside on a USB dongle. They can certainly give the dongle to you, assuming they trust you to act on behalf of their company.

  1. Yes, most of us use Windbg, in part because we can’t predict was VS is doing. Windbg over Ethernet is the best choice, if your NIC works. If not, then your choices are not clear. Windbg over USB has never been easy. Do you have access to a serial port?

Use VS2019 and the latest WDK… this supports building drivers back to Win7.

And, yes… definitely WinDbg.

Peter

lulzd.

I use VSCODE as an IDE, EWDK for the toolchain, and I’ve re-incarnated the
equivalent of ddkbuild.bat as a powershell script to build from the command
line. I absolutely loathe the mess made integrating the WDK into VS. It
would have been fine if it had ever been promoted to a ‘required to ship’
component of VS. But it never was, so now not only is it tightly
coupled with specific VS releases, but it is almost never available when VS
is released, and is routinely broken in various ways, for example the
recent mess with running software driver verifier.

If I need a driver template project, I’ll use VS to generate that.

Mark Roddy