Re: DDK build result different from VS result

From: Hannes (hannes_at_nospam.nospam)
Date: 01/31/05


Date: Mon, 31 Jan 2005 10:33:02 -0800

Hi Mark,

Thanks for your comments. Let me try to clarify your questions below:

"Mark Roddy" wrote:
> I'm confused. The only flags of interest with respect to
> compilation/linking of your driver are in the Sources file, not in the
> VC project file. That is th whole point of ddkbuild - to get your driver
> built using the standard settings from the ddk. So what flags are we
> talking about here?

For the past three-four years, I have developed this driver entirely using a
VS project, and I have found a number of compiler and linker settings that
have a good effect on our outcome. Now that I am starting a new VS project,
this time using a VS makefile project and ddkbuild, I have made an attempt to
translate all these settings (which have taken years to refine) into settings
that now go entirely into the sources file. No more settings in VS, it's all
in the sources file now.

>
> > Now, if I, in my own makefile comment out the call to
> >
> > !INCLUDE $(NTMAKEENV)\makefile.def
> >
> > and instead write my own makefile, like this...

> Then you are off on your own with an unsupported build process. This
> doesn't mean that your build process is wrong or faulty, it is just
> unsupported.

Ok, thanks. It's good to hear that. I was just making my own makefile to
prove that my driver *CAN* fit into 250kB. I'm still puzzled why the
supported ddk build makes it twice as big...

> > For instance, /G6 is passed, while I actually want /G7. So I end up with a
> > warning that /G7 overrides /G6. This I can take, but how about all the other
> > flags, can I not avoid all the "default" compiler flags and JUST use my own
> > flags?
> >
>
> So how exactly are you setting the optimization flags? Better yet, why
> not just leave the flags alone and use the default settings in the ddk?

These are my flags, and I wish they were the ONLY flags applied:

MSC_OPTIMIZATION=/O2 /G7 /Og
USER_C_FLAGS=/nologo /Gz /GF /FD /EHsc /MT /QI0f /TP

Performance is our highest priority with this driver, so I don't wanna take
chances on weird build flags or twice as large .sys files....at least not
without understanding what the differences are.

We are running solely on Pentium 4 and Pentium M, so I certainly don't want
to optimize using /G6 (which is Pentium 1-3 compliant) - so I don't
understand why DDK enforces /G6...?

Also the size of the output file worries me. We have a stable product that
has been running for years, at 250kB. I want to understand why the file
suddenly becomes 500kB, and I am also looking for some reasasurance that it's
not gonna affect our performance.

> Once again you seem to have conflicted goals here. You want to use the
> ddk toolset to get standard results, but you want to override all the
> settings from the toolset so that you can get non-standard results. The
> whole point of using the ddk toolset is to use standard tools with
> standard settings so that the ouput has a reasonable chance of working
> correctly, (ignoring source code defects.)

Thanks for that point. I thought using the DDK compiler was enough to be
"supported", but if it also takes only using a subset of compiler settings
and optimizations, I realize I am much more limited. It's hard to do real
benchmarking on our product, why I am trying to optimize as far as I can
based on the documentation of compiler and linker options.

> I suggest that you strip all the crap out of your sources file, and
> unless there is some real need to worry about compilation/linking size
> and or speed optimizations, accept what you get.

Thanks for all your input, it is highly appreciated.

             / Hannes.



Relevant Pages

  • Restore my flags (and PATH)!
    ... The simplest program I know of for restoring flag settings ... while also retaining the originally saved settings ... If I change some settings (flags and/or current directory) ... to automatically restore those flags after a RESTORE). ...
    (comp.sys.hp48)
  • Re: rs232 tcl
    ... of the tio flags, but you are taking the current settings and reset ... > the same settings as with my c-progs. ... Again that's raw input, no character mapping, no break, no XON. ... no CRLF processing by Tcl's channel system: ...
    (comp.lang.tcl)
  • Re: HP38/39: How to set DEG mode?
    ... they are linked to an applet, so each applet have their own flags and settings. ... If you do what you suggest, it will only switch the settings temporarily, if you ever suspend your aplet to run a calculation in the HOME screen for example, your settings will be lost. ... you need to change the settings as you describe (playing with the system flags) or using the supported entry SetSysAngle but you also need to set it up in your aplet structure. ...
    (comp.sys.hp48)
  • Re: HP38/39: How to set DEG mode?
    ... > they are linked to an applet, so each applet have their own flags and ... > If you do what you suggest, it will only switch the settings ... to TOL, because I like well-done work, but I have no documentation. ...
    (comp.sys.hp48)
  • MOUSE_INPUT_DATA for USB HID mouse
    ... I installed the firefly sample from DDK as a upper device filter for a USB ... HID mouse. ... The 'Flags' Attribute specifies 4 mouse indicator flags. ...
    (microsoft.public.development.device.drivers)