A beginner builds an eclipse + winDDK driver development platform

Source: Internet
Author: User
Tags visual studio 2010

Recently, to learn about windows driver development, you need to build a driver development IDE (after all, it is easier to integrate it into the IDE ).

Previously, I used visual studio 2010 to build the environment, but it was not successful. It was very troublesome to configure it, And vs2010 was stuck on my computer. It would take one minute to start it, therefore, we are ready to use eclipse to build driver development.

I found some information on the internet today and configured it on eclipse. Let's summarize it first.

Step 1:

Download jre and google to go to the official website.

Download eclipse at http://www.eclipse.org/downloads/

Select a C/C ++ developer.

However, jre is required to run eclipse. You can search and install it online. It is best to install jre first, and then use eclipse to decompress eclipse.

Step 2:

Download winddk and go to the official website on google.

Modify WinDDK \ 7600.16385.1 \ bin \ setenv. bat.

There is the following section near the end

echo   Example:  setenv d:\ddk chk        set checked environmentecho   Example:  setenv d:\ddk            set free environment for Windows Win7 (default)echo   Example:  setenv d:\ddk fre WIN7   set free environment for Windows Win7 (default)echo   Example:  setenv d:\ddk fre 64     sets IA-64 bit free environmentecho   Example:  setenv d:\ddk fre x64    sets x64 bit free environmentecho   Example:  setenv d:\ddk fre x32-64 sets x64 bit free environmentecho   Example:  setenv d:\ddk fre WXP    sets free build environment for Windows XPecho.echo.:end

If "% CPU %" = "AMD64" set PATH = % BASEDIR % \ bin \ amd64; % PATH %
Set _ FreeBuild =
REM set _ AMD64bit =
Set _ IA64bit =
Set _ ddkspec =
Set _ title =
Set _ BscMake =
Set _ VersionedHeaders =
Set _ LatestOsTarget =
Set _ NTDRIVE = % ~ D0
Set _ NTROOT = % ~ P0
Set _ NTROOT = % _ NTROOT :~ 0,-1%.
Set _ BuildType = % DDKBUILDENV %

 

 

Change the above to (note that the red part is modified,

Start e: \ eclipse \ eclipse.exe & exit is the eclipse path, that is, start eclipse

):

Echo Example: setenv d: \ ddk chk set checked environmentecho Example: setenv d: \ ddk set free environment for Windows Win7 (default) echo Example: setenv d: \ ddk fre WIN7 set free environment for Windows Win7 (default) echo Example: setenv d: \ ddk fre 64 sets IA-64 bit free environmentecho Example: setenv d: \ ddk fre x64 sets x64 bit free environmentecho Example: setenv d: \ ddk fre x32-64 sets x64 bit free Environmentecho Example: setenv d: \ ddk fre WXP sets free build environment for Windows XPecho. echo. @ rem Add a command. If the user's DDK parameter is incorrect, the eclipsegoto quit: end @ rem will be started to start the eclipse program. Note that & exit next to start eclipse will close start e in the current window: \ eclipse \ eclipse.exe & exit: quitif "% CPU %" = "AMD64" set PATH = % BASEDIR % \ bin \ amd64; % PATH % set _ FreeBuild = REM set _ AMD64bit = set _ IA64bit = set _ ddkspec = set _ title = set _ BscMake = set _ VersionedHeaders = set _ Late StOsTarget = set _ NTDRIVE = % ~ D0set _ NTROOT = % ~ P0set _ NTROOT = % _ NTROOT :~ 0,-1% set _ BuildType = % DDKBUILDENV %

 

Then you can start eclipse in build environments.

 

Step 3:

Create a project.

File/new/C project

Select Makefile Project as project type, and tool chains as other tool chain.

After the project is created, right-click the project name and choose Properties

Modify the Configuration:

Select C/C ++ General/Paths and Symbols

Select add,

Select variables, enter ddk, select add DDK_INC_PATH, and check add to all mappings and add to all ages.

Add SDK_INC_PATH, WDM_INC_PATH, and so on.

 

The final confirmation is enough.

 

Step 4:

Compile makefiles and sources in eclipse and compile the source files (project/build project.

 

The output window for successful compilation is:

 

Problems:

After configuration, I encountered several fatal error problems (for example, the header file "**. h" cited by sal. h was not found). After the winddk was reinstalled, the problem disappeared.

 

Link to the appendix (I do not know whether it is original ):

Http://ezdiary.yo2.cn/articles/%E5%B7%A7%E7%94%A8start%E5%91%BD%E4%BB%A4%E5%90%AF%E5%8A%A8eclipse%E7%BC%96%E8%AF%91ddk.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.