Win2000 DDK Development Environment

zhaozj2021-02-17  47

1. Driver development environment

Developing the driver under Win2000 requires at least two machines, one for development, one for debugging.

If the driver relies on a low-level device, including a advanced terminal and a server, the driver must be commissioned and testing in a multiprocessor environment.

1.1 Free Build and Checked Build

Test and debug the driver under Win2000 requires free build and checked build under Win2000.

l Free Build (or Retail Build) is an operating system for end users. In this case, the system and the driver have fully optimized in the configuration, and the debug declaration does not work, and the debug information is peeled from the binary file. Post-released systems and drivers are small and run fast, accounting for less memory.

l CHECK Build As the test and debug assist tool for the development of the system and core mode driver in the development, it has overflow error detection, parameter confirmation, and debug information not in Free Build. Systems or drivers in this environment can help isolate and track drivers, for example, unpredictable motions lead to memory leaks, or causing inappropriate device configuration.

Although Check Build provides additional protection, more memory and hard disk space are consumed than Free Build. Due to the following reasons, the system and drivers are slower:

l The symbol debugging information is included.

l Execute the additional path code due to parameter selection and debug output (diagnostic information)

> New driver development process generally contains the following steps:

1. Write the driver code, which should contain the conditional compilation flag for debugging inspection;

2. Using the operating system's Checked Build Environment Test and Debug Specifies the driver version;

3. Using the Free Build environment test and debug driver's release version;

4. Adjustment of the execution period of the driver under the Free Build environment;

5. Test and debugging of operating systems and drivers in Free Build and Check Build;

6. Final testing and analysis with Free Build

In the early stage of the development phase of the driver, it is necessary to use Checked Build under Win2000 for debugging. Additional commissioning in Checked Build can prevent many drivers from manufacturing errors (for example, recursive spin lock).

Perform a period of adjustment, final test, and driver inspection to perform in the Free Build environment. Faster Free Build makes it possible to find competitive restrictions and other synchronization issues.

When Free Build and Win2000 retail versions are the same, the final testing and inspection should also be done under Free Build.

The driver typically contains a processor flag that allows for Free build and Checked Build.

DBG Reserved Word When you detect what Win2000 version is running, if Win2000 Checked Build is running, DBG is set, if free build is running, DBG will not be defined (when WDM.H or NTDDK.h header file is Contains time 0).

The driver should be tested and debugged in a multiprocessor and a single processor environment, as both platforms run the current Win2000.

1.2 debugging environment

Debugging of core modes requires a target machine and a local machine. Target machines are typically used to run current drivers or other core mode applications, and local machines are generally used to run debug programs.

Figure 1 shows a typical WIN2000 configuration for debugging the driver. Core state debug does not need to clarify Free Build or Checked Build. Perhaps debuging the Free system will under the Free or Checked system, or debug the Checked system under the Free or Checked system. However, there is general no reason to run slow Checked Build on the local machine.

转载请注明原文地址:https://www.9cbs.com/read-30204.html

New Post(0)