Enterprise WDK seems like it's usable now

This is perhaps not new news, but last week I was looking at our build environment and was curious if the Enterprise WDK had ever been updated to support static driver verifier, which is required for driver certification submissions.

I’m happy to say, it looks like the current EWDK does support static driver verifier and code analysis. The attraction of the EWDK is it can be installed simply by unzipping a directory tree. This means you can check it into your version control system, so have a version controlled build environment.

As a quick test, all I had to do was unzip the EWDK install tree into c:\ewdk, run an environment variable setup .cmd file in the root of that tree, and then I could type msbuild with the correct parameters, and my project built. You can run SDV by using a target of “sdv” and can run code analysis by specifying an option. For driver certification testing, you can also specify a target of “dvl” to generate the merged code anlaysis+static driver verifier log file.

A few things I did notice:

  1. The ewdk tree is fairly deep, and the first time I expanded it some pathnames were too long, so I ended up expanding it into c:\ewdk. This would mean it might be a problem if checked out of a version control system, which may have the root path already many layers deep.

  2. Finding the doc pages spelling out how to enable sdv and code analysis took quite a bit of Googling, but there are doc pages on the Microsoft site. I’ll try to collect links and post them.

  3. The environment setup seemed to use an old style.cmd file, so am not sure what it would take to setup the environment if like myself you moved to powershell long ago.

  4. If you want to have an automatic build server, there is still a little issue of how to use the hardware token based signing keys. One could argue signing with final production keys should always take a human’s approval. On the other hand, one could also argue final production builds should run on a centralized automated server, so the process of shifting from almost final QA to a production build is simply a matter of giving some command to a build server with the correct source code version information. This is not really a ewdk issue, but is an issue in environments that likely will use the ewdk.

Jan

Sweet.

The EWDK is one of the “best kept secrets” in the driver dev business.

Nice update Jan… thanks for posting!

Peter
OSR
@OSRDrivers

Ewdk is sweet it works across boundaries seamlessly

If the devs pop in a /include. And /lib paths auto matically when invoklng launchcmdenv.bat and gift me a cmdline vcxprioj maker it would be an ultimately awesome thing that ever happened

Here are a few links for Enterprise WDK docs…

Download the EWDK from:
https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/installing-the-enterprise-wdk

A script that allows you to export legacy command shell environment variables to the powershell environment This allows you to start a powershell script, set the environment from the EWDK config .cmd file, and then write your build scripts in powershell

https://github.com/nightroman/PowerShelf/blob/master/Invoke-Environment.ps1 or
http://poshcode.org/2176

Running code analysis from a msbuild command line:
Example: msbuild mySolution.sln /p:configuration=“Win8.1 Release” /p:platform=x64 /p:RunCodeAnalysis=true

https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/creating-a-log-file-for-the-code-analysis-tool

Running static driver verifier from a msbuild command line:

msbuild.exe /p:Configuration=“Win8.1 Release” /p:Platform=x64 /target:sdv /p:inputs=“/clean”
then run
msbuild.exe /p:Configuration=“Win8.1 Release” /p:Platform=x64 /target:sdv /p:inputs=“/check:default.sdv”

SDV seemed to only work on projects not solutions

And the docs for sdv
https://msdn.microsoft.com/en-us/windows/hardware/drivers/devtest/-static-driver-verifier-commands--msbuild-

https://msdn.microsoft.com/windows/hardware/drivers/devtest/static-driver-verifier

https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/creating-a-log-file-for-static-driver-verifier

And for WHQL testing you need to generate the DVL file

msbuild.exe /target:dvl /p:Configuration=“Win8.1 Release” /P:Platform=x64

https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/creating-a-driver-verification-log