I have a need to develop a USB device driver for Windows CE 5.0. I do have
platform builder for that version. But the units I need to run on already
have CE installed on them in ROM.

All of the help text I've found on debugging CE drivers assume that you're
developing an OS image as well. Is it possible to use this for what I need
to do, or can I debug my driver with something else, Visual Studio or
Embedded VC++? I hope so, printf debugging will be painful.

Thanks in advance for any help.

Re: Develop/debug driver without creating OS? by Paul

Paul
Wed Mar 19 15:37:38 PDT 2008

No, not really. You could dump some debug messages to a file and have the
lowest form of "debugging", but you can't get interactive debugging of a
driver unless you have 1) the kernel debugger (Platform Builder and a custom
OS), or 2) some sort of an application that simulates being the device
manager, loads your driver, etc., so that you can debug *that* and see what
your driver is doing. Since 2 is very difficult, it's generally better to
use 1, even if you have to target some hardware other than that of the
actual final device (use a CEPC, other demo board that you have, etc.)

Paul T.

"Skip" <Skip@discussions.microsoft.com> wrote in message
news:84200A81-673A-4A07-B088-7EE5477C7296@microsoft.com...
>I have a need to develop a USB device driver for Windows CE 5.0. I do
>have
> platform builder for that version. But the units I need to run on
> already
> have CE installed on them in ROM.
>
> All of the help text I've found on debugging CE drivers assume that you're
> developing an OS image as well. Is it possible to use this for what I
> need
> to do, or can I debug my driver with something else, Visual Studio or
> Embedded VC++? I hope so, printf debugging will be painful.
>
> Thanks in advance for any help.



Re: Develop/debug driver without creating OS? by Valter

Valter
Thu Mar 20 02:02:52 PDT 2008

=?Utf-8?B?U2tpcA==?= <Skip@discussions.microsoft.com> wrote in
news:84200A81-673A-4A07-B088-7EE5477C7296@microsoft.com:

> I have a need to develop a USB device driver for Windows CE 5.0.
> I do have platform builder for that version. But the units I
> need to run on already have CE installed on them in ROM.
>
> All of the help text I've found on debugging CE drivers assume
> that you're developing an OS image as well. Is it possible to
> use this for what I need to do, or can I debug my driver with
> something else, Visual Studio or Embedded VC++? I hope so,
> printf debugging will be painful.

USB driver must interact with USBD and so they must run inside driver
manager (in CE 5.0) or in kernel space (CE 6.0), so you can't debug
them using a debugger that relies on other drivers (network,
activesync) for its connectivity. If you break device.exe the
debugging connection will be stopped too, and so you won't be able to
restart it...
The simplest solution is to find an old PC with a USB host controller
and a NE2000, RTL8139 or 3COM 3Cx network card and use it to debug
your driver, building a very small OS image that include kernel debug
and USB host support.

--
Valter Minute
www.fortechembeddedlabs.it
Training, support and development for Windows CE
(the reply address of this message is invalid)