Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / WinCE Programming / July 2008

Tip: Looking for answers? Try searching our database.

USB Custom Client Driver

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GSR - 22 Jul 2008 17:19 GMT
Hi,

I am trying to implement USB Function Custom Client Driver.

For this purpose I have cloned BOT from following path to our BSP.

\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USBFN\CLASS\STORAGE\TRANSPORT\BOT

I have made the following changes to the Custom Client sources folder

TARGETNAME=USBTSTCLASS
TARGETTYPE=DYNLINK

TARGETLIBS= \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ufnclientlibbase.lib \
$(_COMMONOAKROOT)\LIB\$(_CPUINDPATH)\ceddk.lib \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib

I also modified registry entry to load USBTSTCLASS as default client driver.

Rest all registry keys related to USBFunction clients are removed.

I also modifed USBFunction PDD Sources file as below

TARGETLIBS= \
       $(_COMMONOAKROOT)\LIB\$(_CPUINDPATH)\ceddk.lib \
       $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib

SOURCELIBS= \
       $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ufnmddbase.lib \
       $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\ceosutil.lib \
       $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\defbuslib.lib

If we include ufnmdd.lib after rebuild it couldn't find the ufnmdd.lib, so I
have included ceosutil.lib and defbuslib.lib.

With the above modifications it successfully generates the USB Target Dll
and USBTSTCLASS dll.

But during the call to Init in BOT it always pointing to bot.cpp in
\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USBFN\CLASS\STORAGE\TRANSPORT\BOT

Please tell me if I am doing some thing in a wrong way.

Is the building of Custom Client Driver is correct or any thing else we have
to add ?

Thank You & Regards,
GSR
Bruce Eitman [eMVP] - 22 Jul 2008 18:49 GMT
I don't follow all of your changes or why you made them.  Did you run
buildrel?  or do you have WINCEREL set?  Is the timestamp on the dll what
you expect it to be in _FLATRELEASEDIR?

Also this might help:
http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-clone-
public-code.aspx


Signature

Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

> Hi,
>
[quoted text clipped - 48 lines]
> Thank You & Regards,
> GSR
GSR - 23 Jul 2008 13:01 GMT
Hello Bruce Eitman,

Thank You Very Much for the reply.

I went through the link and I followed the instructions as given.

I was able to create custom oalioctl dll, from the cloned oalioctl in Public
directory.

I have followed the same for cloning
\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USBFN\CLASS\STORAGE\TRANSPORT\BOT

When we run the sysgen_capture tool under builddll directory for usbmsfn
then it creates two source files. One source file is sources.ceddk and the
second one is sources.usbmsfn.

sources.ceddk contains the following lines

TARGETNAME=ceddk

TARGETTYPE=DYNLINK
RELEASETYPE=PLATFORM
SYNCHRONIZE_DRAIN=1

DLLENTRY=_DllMainCRTStartup

DEFFILE=$(_SYSGENOAKROOT)\inc\ceddk.def

SOURCELIBS=\
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ddk_bus.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ddk_dma.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ddk_io.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ddk_map.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ddk_power.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ddk_time.lib

TARGETLIBS=\
   $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib

SOURCES=

and the sources.usbmsfn contains the following lines

TARGETNAME=usbmsfn

TARGETTYPE=DYNLINK
RELEASETYPE=PLATFORM
SYNCHRONIZE_DRAIN=1

DLLENTRY=_DllEntryCRTStartup

DEFFILE=usbmsfn.def

SOURCELIBS=

TARGETLIBS=\
   $(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\usbmsfn_lib.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\scsi2dad.lib \
   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ufnclientlib.lib \
   $(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\storeapi.lib \
   $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib

SOURCES=

Could please tell how should I proceed with this.

Regards,
GSR

> I don't follow all of your changes or why you made them.  Did you run
> buildrel?  or do you have WINCEREL set?  Is the timestamp on the dll what
[quoted text clipped - 55 lines]
> > Thank You & Regards,
> > GSR
Bruce Eitman [eMVP] - 23 Jul 2008 14:07 GMT
Follow the same steps but use a different name.  You will need to use your
imagination and engineering skills to solve it.

You don't need to clone the ceddk for this, keep using the public version.

Signature

Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

> Hello Bruce Eitman,
>
[quoted text clipped - 127 lines]
>> > Thank You & Regards,
>> > GSR
Daniel Chi - 23 Jul 2008 09:07 GMT
Seems it still links the lib in the public directory.

> Hi,
>
[quoted text clipped - 45 lines]
> Thank You & Regards,
> GSR
GSR - 23 Jul 2008 10:43 GMT
Hi Daniel Chi,

Thank You for the reply.

I have seen the nk.bin through VS2005 and it doesn't contain usbmsfn.dll and
it contains usbtstclass.dll.

I don't know whether the method what we followed is correct or not to
generate custom USB Function Client Driver dll and USB Function Driver dll.

Please correct me if we are missing any thing.

Regards,
Sudheer

> Seems it still links the lib in the public directory.
>
[quoted text clipped - 47 lines]
> > Thank You & Regards,
> > GSR
Bruce Eitman [eMVP] - 23 Jul 2008 12:48 GMT
You didn't really tell us what you did to "generate custom USB Function
Client Driver."  You only told us where you found the code to use.  Did you
read my blog post on cloning public code?

Signature

Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

> Hi Daniel Chi,
>
[quoted text clipped - 68 lines]
>> > Thank You & Regards,
>> > GSR
GSR - 23 Jul 2008 16:59 GMT
Hi Bruce Eitman,

I have followed the following steps to generate custom USB Function Client
Driver.

I have copied entire USB Function Client Driver from the following path to
our USBClass in our BSP.
WINCE500\public\common\oak\drivers\usbfn\class\storage to USBClass\Storage

I have created BuildDll in USBClass and copied make file from some other
folder to it.

I ran the sysgen capture tool with follwoing command "sysgen_capture usbmsfn".

It generated sources.usbmsfn and sources.ceddk in BuildDll Directory.

I have modified sources.usbmsfn in BuildDll directory to sources.

SCSI2DAD.lib and usbmsfn_lib.lib paths are modified in such a way that they
link with the libraries in TARGETPLATROOT. The sources file is modified as
below for linking SCSI2DAD.lib and usbmsfn_lib.lib.

   $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\usbmsfn_lib.lib \
   $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\scsi2dad.lib \

The rest target libs are unchanged and they are

   $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ufnclientlib.lib \
   $(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\storeapi.lib \
   $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \

Thank You & Regards,
GSR

> You didn't really tell us what you did to "generate custom USB Function
> Client Driver."  You only told us where you found the code to use.  Did you
[quoted text clipped - 72 lines]
> >> > Thank You & Regards,
> >> > GSR
Bruce Eitman [eMVP] - 23 Jul 2008 17:10 GMT
I don't see a question, does that mean that it is working for you now?

Signature

Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

> Hi Bruce Eitman,
>
[quoted text clipped - 114 lines]
>> >> > Thank You & Regards,
>> >> > GSR
sudheer.gaddipati@gmail.com - 24 Jul 2008 05:02 GMT
On Jul 23, 9:10 pm, "Bruce Eitman [eMVP]"
<bruce.eitman.nos...@EuroTech.com.nospam> wrote:
> I don't see a question, does that mean that it is working for you now?
>
[quoted text clipped - 135 lines]
>
> - Show quoted text -

Hi Bruce Eitman,

It's not working.

I am trying to understand how to use the "sources.ceddk".

Thank You & Regards,
Sudheer
Michel Verhagen (eMVP) - 24 Jul 2008 05:41 GMT
> I am trying to understand how to use the "sources.ceddk".

You don't. Throw it away. You only use (merge) the sources.xxx file of
the component you are cloning. For an example on cloning a driver see
http://guruce.com/blogpost/sdmmcandwindowsce. In that article we clone
the SDBUS2 driver, step by step.

Good luck,

Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog

 GuruCE Ltd.
 Microsoft Embedded Partner
 http://GuruCE.com
 Consultancy, training and development services.

> On Jul 23, 9:10 pm, "Bruce Eitman [eMVP]"
> <bruce.eitman.nos...@EuroTech.com.nospam> wrote:
[quoted text clipped - 106 lines]
> Thank You & Regards,
> Sudheer
sudheer.gaddipati@gmail.com - 25 Jul 2008 06:17 GMT
Hi,

Thank You Bruce Eitman and Michel Verhagen.

It's working now.

Thank You & Regards,
Sudheer
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.